skip blocks with small chroma dc too (if the user wants it) needed to avoid IDCT(input coeffs !=0) == 0 problems which cause catastrophic error accumulation at qp=1

Originally committed as revision 853 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 23 years ago
parent 890f093a76
commit f5866a0340
  1. 6
      libavcodec/mpegvideo.c

@ -1589,7 +1589,11 @@ static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int th
const int last_index= s->block_last_index[n];
if(skip_dc) skip_dc=1;
if(threshold<0){
skip_dc=0;
threshold= -threshold;
}
/* are all which we could set to zero are allready zero? */
if(last_index<=skip_dc - 1) return;

Loading…
Cancel
Save