[FFmpeg-devel] [PATCH] Allow mpeg encoding with qscale and very low frame rate

Michael Niedermayer michaelni
Fri Sep 3 12:17:02 CEST 2010


On Fri, Sep 03, 2010 at 12:58:51AM +0200, James Darnley wrote:
> On 2 September 2010 21:39, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Thu, Sep 02, 2010 at 07:02:47PM +0200, James Darnley wrote:
> > [...]
> >> - ? ?if(avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){
> >> + ? ?if(/* !s->fixed_qscale && */ avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){
> >
> > it is expected that the author reads his patch before submission
> >
> 
> Yikes, sorry
> 
> That'll teach me for going back, editing, compiling, copying error,
> making diff when I should have just copied the f-ing source.

>  mpegvideo_enc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> a00db64faec6a0b2cb268ee781c548c6f2cd2956  qscale_bitrate_tolerance.diff
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index 9f8682c..b48e88f 100644
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -356,7 +356,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
>          return -1;
>      }
>  
> -    if(avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){
> +    if(!s->fixed_qscale && avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){
>          av_log(avctx, AV_LOG_ERROR, "bitrate tolerance too small for bitrate\n");
>          return -1;
>      }

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100903/2ec732ea/attachment.pgp>



More information about the ffmpeg-devel mailing list