[MPlayer-dev-eng] [PATCH] fix for ve_xvid4 fixed quantizer mode problem
Michael Neuhauser
mike at firmix.at
Tue Jul 13 17:46:57 CEST 2004
Hi, all!
Fixed quantizer mode does not work properly with the XviD 1.0 export
module libmpcodecs/xvid4.c: With the command
mencoder in.vob -o out.avi -oac copy -endpos 10 -ovc xvid \
-xvidencopts fixed_quant=2:psnr
(i.e. encode 10 secs with xvid at a fixed quantizer of 2 and generate
psnr stats), the following quantizer histograms can be obtained from the
psnr_* files:
original mencoder (cvs HEAD of 2004-07-13)
Q #
1 48 (20.3%) ************
2 70 (29.7%) ******************
3 86 (36.4%) **********************
4 32 (13.6%) ********
cvs-mencoder + attached patch
2 82 (34.7%) *********************
4 154 (65.3%) ****************************************
The latter being correct (q=4 values because of B-frames).
An inspection of libmpcodecs/xvid4.c and
xvidcore-1.0.1/src/plugins/plugin_single.c:rc_single_before() revealed
that the fixed quantizer zone parameters base & increment are set to 1/q
instead of q (for fixed_quant == q) in set_create_struct() (i.e. base
has to be set to the denominator of q, not the numerator as it is done
in cvs).
Regards,
Mike
--
Dr. Michael Neuhauser phone: +43 1 789 08 49 - 30
Firmix Software GmbH fax: +43 1 789 08 49 - 55
Vienna/Austria/Europe email: mike at firmix.at
Embedded Linux Development and Services http://www.firmix.at/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xvid4-fixed_quant-reciprocal-fix.patch
Type: text/x-patch
Size: 770 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040713/ca4ae0f8/attachment.bin>
More information about the MPlayer-dev-eng
mailing list