[FFmpeg-devel] [RFC] vp56 qscale_table
Aurelien Jacobs
aurel
Fri Jan 29 01:25:25 CET 2010
On Thu, Jan 28, 2010 at 11:23:40PM +0100, Reimar D?ffinger wrote:
> On Sat, Jan 23, 2010 at 03:51:10PM +0100, Reimar D?ffinger wrote:
> > this adds support for qscale_table to vp5 and vp6 filters to allow for easy
> > postprocessing.
> > The conversion of the "native" quantizer is based on what vp3.c does and
> > it seems to give the best results e.g. with MPlayer's fspp.
> > Suggestions for improvements welcome.
>
> This adds a new qscale_type instead, since I expect it to be non-controversial
> like this I'll apply soon if nobody speaks up.
I'm not really familiar with qscale_table but anyway, small comment:
> Index: libavcodec/vp56.c
> ===================================================================
> --- libavcodec/vp56.c (revision 21518)
> +++ libavcodec/vp56.c (working copy)
> @@ -33,6 +33,7 @@
> s->quantizer = quantizer;
> s->dequant_dc = vp56_dc_dequant[quantizer] << 2;
> s->dequant_ac = vp56_ac_dequant[quantizer] << 2;
> + memset(s->qscale_table, quantizer, s->mb_width);
> }
>
> static int vp56_get_vectors_predictors(VP56Context *s, int row, int col,
> @@ -481,6 +482,7 @@
> return -1;
> }
>
> + s->qscale_table = av_realloc(s->qscale_table, s->mb_width * sizeof(s->qscale_table));
Should be sizeof(*s->qscale_table), but anyway, you could as well drop the
sizeof(), because you already assume that sizeof(*s->qscale_table) == 1
in the above memset().
Except this, patch looks OK to me.
Aurel
More information about the ffmpeg-devel
mailing list