Commit dbc7fae7 authored by michaelni's avatar michaelni

skip blocks with small chroma dc too (if the user wants it) needed to avoid...

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@853 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 73bab97f
...@@ -1589,6 +1589,10 @@ static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int th ...@@ -1589,6 +1589,10 @@ static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int th
const int last_index= s->block_last_index[n]; const int last_index= s->block_last_index[n];
if(skip_dc) skip_dc=1; 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? */ /* are all which we could set to zero are allready zero? */
if(last_index<=skip_dc - 1) return; if(last_index<=skip_dc - 1) return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment