Browse Source

quantizer overflow warning + AAN dct fix

Originally committed as revision 3754 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 21 years ago
parent
commit
3c9ec07ef2
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      libavcodec/mpegvideo.c

+ 9
- 1
libavcodec/mpegvideo.c View File

@@ -164,7 +164,15 @@ static void convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[
}
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++;
}
}


Loading…
Cancel
Save