Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2390:ce45e1dd4b09 libavcodec
quantizer overflow warning + AAN dct fix
author | michael |
---|---|
date | Tue, 14 Dec 2004 20:17:23 +0000 |
parents | 4605a8b188c3 |
children | 81516be6d0e4 |
comparison
equal
deleted
inserted
replaced
2389:429c1eedeee9 | 2390:ce45e1dd4b09 |
---|---|
162 qmat16[qscale][1][i]= ROUNDED_DIV(bias<<(16-QUANT_BIAS_SHIFT), qmat16[qscale][0][i]); | 162 qmat16[qscale][1][i]= ROUNDED_DIV(bias<<(16-QUANT_BIAS_SHIFT), qmat16[qscale][0][i]); |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 for(i=intra; i<64; i++){ | 166 for(i=intra; i<64; i++){ |
167 while(((8191LL * qmat[qscale][i]) >> shift) > INT_MAX){ | 167 int64_t max= 8191; |
168 if (dsp->fdct == fdct_ifast | |
169 #ifndef FAAN_POSTSCALE | |
170 || dsp->fdct == ff_faandct | |
171 #endif | |
172 ) { | |
173 max= (8191LL*aanscales[i]) >> 14; | |
174 } | |
175 while(((max * qmat[qscale][i]) >> shift) > INT_MAX){ | |
168 shift++; | 176 shift++; |
169 } | 177 } |
170 } | 178 } |
171 } | 179 } |
172 if(shift){ | 180 if(shift){ |