[FFmpeg-devel] [PATCH] mpeg2 non linear quantizer full support
Fri Mar 14 02:57:16 CET 2008
On Wed, Mar 12, 2008 at 07:38:42PM +0100, Baptiste Coudurier wrote:
> Diff for some files is to show possible simplifications of existing
> code. I'll of course split the commits. Only mpeg-2 unquantize functions
> are affected.
> Regression tests pass.
> Index: libavcodec/mpegvideo.c
> --- libavcodec/mpegvideo.c (revision 12407)
> +++ libavcodec/mpegvideo.c (working copy)
> @@ -33,6 +33,7 @@
> #include "mpegvideo_common.h"
> #include "mjpegenc.h"
> #include "msmpeg4.h"
> +#include "mpeg12.h"
> #include "faandct.h"
> #include <limits.h>
> @@ -2149,6 +2150,8 @@
> block = block * s->y_dc_scale;
> block = block * s->c_dc_scale;
> + qscale = s->qscale_table[qscale];
Doing the remaping in the dequant function means that its done 6 times (
4 luma and 2 chroma) for 420, it might be more efficient to do it at some
oher place or maybe even keep qscale some linear quantizer scale instead
of a possibly non linear qp.
That is have 2 variables, qp which might be non linear and qscale which is
always the actual scale with which things get multiplied. Although iam not
sure if this really is better, maybe there are some problems iam missing ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel