mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
ffv1enc: consider 2pass float rounding, fix loop
Found-by: "Peter B." <pb@das-werkstatt.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ee6ae8355e
commit
c2cbc80ae9
@ -604,7 +604,7 @@ static int sort_stt(FFV1Context *s, uint8_t stt[256])
|
|||||||
|
|
||||||
double size0 = COST2(i, i) + COST2(i2, i2);
|
double size0 = COST2(i, i) + COST2(i2, i2);
|
||||||
double sizeX = COST2(i, i2) + COST2(i2, i);
|
double sizeX = COST2(i, i2) + COST2(i2, i);
|
||||||
if (sizeX < size0 && i != 128 && i2 != 128) {
|
if (size0 - sizeX > size0*(1e-14) && i != 128 && i2 != 128) {
|
||||||
int j;
|
int j;
|
||||||
FFSWAP(int, stt[i], stt[i2]);
|
FFSWAP(int, stt[i], stt[i2]);
|
||||||
FFSWAP(int, s->rc_stat[i][0], s->rc_stat[i2][0]);
|
FFSWAP(int, s->rc_stat[i][0], s->rc_stat[i2][0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user