aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-02 08:52:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-02 08:52:37 +0000
commit16c3c1ecb46a73c6648edba28353742086acce06 (patch)
treebf815fbbab93fe9eea3d5120e74013e2a8bf0fbd
parent6955a88293ea3dc98beb31f43993b7cd6a24b4c9 (diff)
downloadffmpeg-16c3c1ecb46a73c6648edba28353742086acce06.tar.gz
rd cbp + single coeff elimination fix
Originally committed as revision 2333 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index baad534e85..3276b6ff11 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -3025,12 +3025,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
}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 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
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){