[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mpegvideo.h, 1.239, 1.240 h263.c, 1.307, 1.308

Michael Niedermayer CVS michael
Fri Apr 28 19:29:10 CEST 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv961

Modified Files:
	mpegvideo.h h263.c 
Log Message:
use previous qscale for intra_dc_threshold check


Index: mpegvideo.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.h,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -d -r1.239 -r1.240
--- mpegvideo.h	3 Apr 2006 07:52:24 -0000	1.239
+++ mpegvideo.h	28 Apr 2006 17:29:07 -0000	1.240
@@ -602,6 +602,7 @@
     int vo_type;
     int vol_control_parameters;      ///< does the stream contain the low_delay flag, used to workaround buggy encoders
     int intra_dc_threshold;          ///< QP above whch the ac VLC should be used for intra dc
+    int use_intra_dc_vlc;
     PutBitContext tex_pb;            ///< used for data partitioned VOPs
     PutBitContext pb2;               ///< used for data partitioned VOPs
     int mpeg_quant;

Index: h263.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -d -r1.307 -r1.308
--- h263.c	9 Apr 2006 06:53:40 -0000	1.307
+++ h263.c	28 Apr 2006 17:29:07 -0000	1.308
@@ -3748,6 +3748,8 @@
     mb_type= s->current_picture.mb_type[xy];
     cbp = s->cbp_table[xy];
 
+    s->use_intra_dc_vlc= s->qscale < s->intra_dc_threshold;
+
     if(s->current_picture.qscale_table[xy] != s->qscale){
         ff_set_qscale(s, s->current_picture.qscale_table[xy] );
     }
@@ -4484,6 +4486,9 @@
             return -1;
         }
         cbp = (cbpc & 3) | (cbpy << 2);
+
+        s->use_intra_dc_vlc= s->qscale < s->intra_dc_threshold;
+
         if (dquant) {
             ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]);
         }
@@ -4779,7 +4784,7 @@
     //Note intra & rvlc should be optimized away if this is inlined
 
     if(intra) {
-      if(s->qscale < s->intra_dc_threshold){
+      if(s->use_intra_dc_vlc){
         /* DC coef */
         if(s->partitioned_frame){
             level = s->dc_val[0][ s->block_index[n] ];
@@ -5003,7 +5008,7 @@
   }
  not_coded:
     if (intra) {
-        if(s->qscale >= s->intra_dc_threshold){
+        if(!s->use_intra_dc_vlc){
             block[0] = ff_mpeg4_pred_dc(s, n, block[0], &dc_pred_dir, 0);
 
             i -= i>>31; //if(i == -1) i=0;





More information about the ffmpeg-cvslog mailing list