changeset 1497:37e16bd36d2c libavcodec

rd cbp + single coeff elimination fix
author michaelni
date Thu, 02 Oct 2003 08:52:37 +0000
parents b78a9ba6a568
children 9eb9b77cf418
files mpegvideo.c
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Thu Oct 02 05:20:07 2003 +0000
+++ b/mpegvideo.c	Thu Oct 02 08:52:37 2003 +0000
@@ -3025,12 +3025,6 @@
             }else
                 s->block_last_index[i]= -1;
         }
-        if(s->flags & CODEC_FLAG_CBP_RD){
-            for(i=0;i<6;i++) {
-                if(s->block_last_index[i] == -1)
-                    s->coded_score[i]= INT_MAX/256;
-            }
-        }
         
         if(s->luma_elim_threshold && !s->mb_intra)
             for(i=0; i<4; i++)
@@ -3038,6 +3032,13 @@
         if(s->chroma_elim_threshold && !s->mb_intra)
             for(i=4; i<6; i++)
                 dct_single_coeff_elimination(s, i, s->chroma_elim_threshold);
+
+        if(s->flags & CODEC_FLAG_CBP_RD){
+            for(i=0;i<6;i++) {
+                if(s->block_last_index[i] == -1)
+                    s->coded_score[i]= INT_MAX/256;
+            }
+        }
     }
 
     if((s->flags&CODEC_FLAG_GRAY) && s->mb_intra){