# HG changeset patch # User michaelni # Date 1029631378 0 # Node ID 40874804a5afd15ccdd3348c0129125a23c89c7c # Parent 4344cc8033bdb74b2746d2d0a53b16d1189d0813 same dc skip behavior for chroma & luma elimination, its confusing otherwise imho diff -r 4344cc8033bd -r 40874804a5af mpegvideo.c --- a/mpegvideo.c Sat Aug 17 20:10:27 2002 +0000 +++ b/mpegvideo.c Sun Aug 18 00:42:58 2002 +0000 @@ -1571,7 +1571,7 @@ emms_c(); //FIXME remove } -static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int threshold, int skip_dc) +static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int threshold) { static const char tab[64]= {3,2,2,1,1,1,1,1, @@ -1587,12 +1587,13 @@ int i; DCTELEM *block= s->block[n]; const int last_index= s->block_last_index[n]; + int skip_dc; - if(skip_dc) skip_dc=1; if(threshold<0){ skip_dc=0; threshold= -threshold; - } + }else + skip_dc=1; /* are all which we could set to zero are allready zero? */ if(last_index<=skip_dc - 1) return; @@ -1811,10 +1812,10 @@ } if(s->luma_elim_threshold && !s->mb_intra) for(i=0; i<4; i++) - dct_single_coeff_elimination(s, i, s->luma_elim_threshold, 0); + dct_single_coeff_elimination(s, i, s->luma_elim_threshold); if(s->chroma_elim_threshold && !s->mb_intra) for(i=4; i<6; i++) - dct_single_coeff_elimination(s, i, s->chroma_elim_threshold, 1); + dct_single_coeff_elimination(s, i, s->chroma_elim_threshold); } if((s->flags&CODEC_FLAG_GRAY) && s->mb_intra){