[Mplayer-cvslog] CVS: main/libmpcodecs ve_xvid4.c,1.9,1.10
Dominik Mierzejewski CVS
syncmail at mplayerhq.hu
Mon Oct 18 22:00:12 CEST 2004
CVS change done by Dominik Mierzejewski CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv20321/libmpcodecs
Modified Files:
ve_xvid4.c
Log Message:
Bitrate setting option in ve_xvid4.c doesn't follow the rules described
in manpage (i.e. if bitrate > 16000, then it's in bits/s, not kbits),
unlike lavc and the old ve_xvid.c do. Fixed.
Index: ve_xvid4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid4.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ve_xvid4.c 11 Oct 2004 15:48:18 -0000 1.9
+++ ve_xvid4.c 18 Oct 2004 20:00:07 -0000 1.10
@@ -674,7 +674,8 @@
* The single pass plugin
* ---------------------------------------------------------------- */
- onepass->bitrate = xvidenc_bitrate;
+ if (xvidenc_bitrate > 16000) onepass->bitrate = xvidenc_bitrate;
+ else onepass->bitrate = xvidenc_bitrate*1000;
onepass->reaction_delay_factor = xvidenc_cbr_reaction_delay_factor;
onepass->averaging_period = xvidenc_cbr_averaging_period;
onepass->buffer = xvidenc_cbr_buffer;
@@ -949,7 +950,8 @@
/* There is not much left to initialize after dispatch settings */
onepass->version = XVID_VERSION;
- onepass->bitrate = xvidenc_bitrate*1000;
+ if (xvidenc_bitrate > 16000) onepass->bitrate = xvidenc_bitrate;
+ else onepass->bitrate = xvidenc_bitrate*1000;
/* Quantizer mode uses the same plugin, we have only to define
* a constant quantizer zone beginning at frame 0 */
@@ -972,7 +974,7 @@
} else {
mp_msg(MSGT_MENCODER, MSGL_INFO,
"xvid: CBR Rate Control -- bitrate=%dkbit/s\n",
- xvidenc_bitrate);
+ xvidenc_bitrate>16000?xvidenc_bitrate/1000:xvidenc_bitrate);
}
create->plugins[create->num_plugins].func = xvid_plugin_single;
@@ -1008,10 +1010,11 @@
* value is negative it is considered as being a total size
* to reach (in kilobytes) */
if(xvidenc_bitrate > 0) {
- pass2->bitrate = xvidenc_bitrate*1000;
+ if(xvidenc_bitrate > 16000) pass2->bitrate = xvidenc_bitrate;
+ else pass2->bitrate = xvidenc_bitrate*1000;
mp_msg(MSGT_MENCODER, MSGL_INFO,
"xvid: 2Pass Rate Control -- 2nd pass -- bitrate=%dkbit/s\n",
- xvidenc_bitrate);
+ xvidenc_bitrate>16000?xvidenc_bitrate/1000:xvidenc_bitrate);
} else {
pass2->bitrate = xvidenc_bitrate;
mp_msg(MSGT_MENCODER, MSGL_INFO,
More information about the MPlayer-cvslog
mailing list