[Ffmpeg-devel] update ratecontol to new eval API

Oded Shimon ods15
Fri Oct 27 22:17:34 CEST 2006


On Fri, Oct 27, 2006 at 09:55:54PM +0200, Michael Niedermayer wrote:
> Hi
> 
> 
> On Fri, Oct 27, 2006 at 09:42:19PM +0200, Oded Shimon wrote:
> > last patch, I think.
> > 
> > - ods15
> 
> > Index: libavcodec/ratecontrol.c
> > ===================================================================
> > --- libavcodec/ratecontrol.c	(revision 6797)
> > +++ libavcodec/ratecontrol.c	(working copy)
> > @@ -48,12 +48,70 @@
> [...]
> > +    rcc->rc_eq_eval = ff_parse(s->avctx->rc_eq, const_names, func1, func1_names, NULL, NULL, &error);
> > +    if (!rcc->rc_eq_eval) {
> > +        av_log(s->avctx, AV_LOG_ERROR, "Error evaluating rc_eq \"%s\": %s\n", s->avctx->rc_eq, error? error : "");
>                                                  ^^^^^^^^^^
> parsing
> 
> 
> [...]
> > -    bits= ff_eval2(s->avctx->rc_eq, const_values, const_names, func1, func1_names, NULL, NULL, rce, &error);
> > -    if (isnan(bits)) {
> > -        av_log(s->avctx, AV_LOG_ERROR, "Error evaluating rc_eq \"%s\": %s\n", s->avctx->rc_eq, error? error : "");
> > -        return -1;
> > -    }
> > +    bits= ff_parse_eval(rcc->rc_eq_eval, const_values, rce);
> 
> NAN can still occur (0/0) so some check should maybe remain
> 
> except these the patch looks ok assuming regression tests pass

I did only 'make codectest', I hope that's enough.
Committed.

- ods15




More information about the ffmpeg-devel mailing list