mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 04:30:02 +00:00
avcodec/mpegvideo_enc: fix integer overflow with -skip_exp >= 2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3f307d79d3
commit
241eccd628
@ -1148,9 +1148,9 @@ static int skip_check(MpegEncContext *s, Picture *p, Picture *ref)
|
||||
switch (s->avctx->frame_skip_exp) {
|
||||
case 0: score = FFMAX(score, v); break;
|
||||
case 1: score += FFABS(v); break;
|
||||
case 2: score += v * v; break;
|
||||
case 3: score64 += FFABS(v * v * (int64_t)v); break;
|
||||
case 4: score64 += v * v * (int64_t)(v * v); break;
|
||||
case 2: score64 += v * (int64_t)v; break;
|
||||
case 3: score64 += FFABS(v * (int64_t)v * v); break;
|
||||
case 4: score64 += (v * (int64_t)v) * (v * (int64_t)v); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user