changeset 11493:495095fb615b libavcodec

use mpeg2 quantization bias for mjpeg. this seems to improve RD performance.
author michael
date Mon, 15 Mar 2010 16:37:02 +0000
parents 7bfe7456e372
children ed6cd3544622
files mpegvideo_enc.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo_enc.c	Mon Mar 15 14:03:01 2010 +0000
+++ b/mpegvideo_enc.c	Mon Mar 15 16:37:02 2010 +0000
@@ -503,10 +503,7 @@
 //        return -1;
     }
 
-    if(s->codec_id==CODEC_ID_MJPEG){
-        s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x
-        s->inter_quant_bias= 0;
-    }else if(s->mpeg_quant || s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO){
+    if(s->mpeg_quant || s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO || s->codec_id==CODEC_ID_MJPEG){
         s->intra_quant_bias= 3<<(QUANT_BIAS_SHIFT-3); //(a + x*3/8)/x
         s->inter_quant_bias= 0;
     }else{