[FFmpeg-cvslog] r11903 - in trunk/libavcodec: avcodec.h libmp3lame.c utils.c

Baptiste Coudurier baptiste.coudurier
Wed Feb 13 12:28:24 CET 2008


Hi,

andoma wrote:
> Author: andoma
> Date: Mon Feb 11 09:01:07 2008
> New Revision: 11903
> 
> Log:
> Add 'reservoir' flag to lavc's flags2 controlling whether or not codes may
> utilize a bit reservoir. Also, make the lame encoder utilize this flag.
> 
> patch by Paul Kelly, paul a stjohnspoint d co d uk
> 
> 
> 
> Modified:
>    trunk/libavcodec/avcodec.h
>    trunk/libavcodec/libmp3lame.c
>    trunk/libavcodec/utils.c
> 
> Modified: trunk/libavcodec/avcodec.h
> ==============================================================================
> --- trunk/libavcodec/avcodec.h	(original)
> +++ trunk/libavcodec/avcodec.h	Mon Feb 11 09:01:07 2008
> @@ -33,8 +33,8 @@
>  #define AV_STRINGIFY(s)         AV_TOSTRING(s)
>  #define AV_TOSTRING(s) #s
>  
> -#define LIBAVCODEC_VERSION_INT  ((51<<16)+(50<<8)+0)
> -#define LIBAVCODEC_VERSION      51.50.0
> +#define LIBAVCODEC_VERSION_INT  ((51<<16)+(50<<8)+1)
> +#define LIBAVCODEC_VERSION      51.50.1
>  #define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT
>  
>  #define LIBAVCODEC_IDENT        "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
> @@ -439,6 +439,7 @@ typedef struct RcOverride{
>  #define CODEC_FLAG2_SKIP_RD       0x00004000 ///< RD optimal MB level residual skipping
>  #define CODEC_FLAG2_CHUNKS        0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
>  #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer.
> +#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
>  
>  /* Unsupported options :
>   *              Syntax Arithmetic coding (SAC)
> 
> Modified: trunk/libavcodec/libmp3lame.c
> ==============================================================================
> --- trunk/libavcodec/libmp3lame.c	(original)
> +++ trunk/libavcodec/libmp3lame.c	Mon Feb 11 09:01:07 2008
> @@ -61,6 +61,7 @@ static int MP3lame_encode_init(AVCodecCo
>          lame_set_VBR_q(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA);
>      }
>      lame_set_bWriteVbrTag(s->gfp,0);
> +    lame_set_disable_reservoir(s->gfp, avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR ? 0 : 1);
>      if (lame_init_params(s->gfp) < 0)
>          goto err_close;
>  

Sorry for noticing it so late, but
isn't !(avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR) better ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-cvslog mailing list