Mercurial > libavcodec.hg
diff 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 |
line wrap: on
line diff
--- a/mpegvideo.c Tue Dec 14 12:04:45 2004 +0000 +++ b/mpegvideo.c Tue Dec 14 20:17:23 2004 +0000 @@ -164,7 +164,15 @@ } for(i=intra; i<64; i++){ - while(((8191LL * qmat[qscale][i]) >> shift) > INT_MAX){ + int64_t max= 8191; + if (dsp->fdct == fdct_ifast +#ifndef FAAN_POSTSCALE + || dsp->fdct == ff_faandct +#endif + ) { + max= (8191LL*aanscales[i]) >> 14; + } + while(((max * qmat[qscale][i]) >> shift) > INT_MAX){ shift++; } }