diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-16 16:55:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-16 17:01:13 +0100 |
commit | c2cbc80ae9e3f00e21235915a80f81a2aeb7db0a (patch) | |
tree | e38e74f3a93eaadfd5b340343f67a813b08daf49 /libavcodec/ffv1enc.c | |
parent | ee6ae8355e9203b40f5202b76e444a3acfb022cd (diff) | |
download | ffmpeg-streaming-c2cbc80ae9e3f00e21235915a80f81a2aeb7db0a.zip ffmpeg-streaming-c2cbc80ae9e3f00e21235915a80f81a2aeb7db0a.tar.gz |
ffv1enc: consider 2pass float rounding, fix loop
Found-by: "Peter B." <pb@das-werkstatt.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r-- | libavcodec/ffv1enc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 41ace3f..b3879fc 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -604,7 +604,7 @@ static int sort_stt(FFV1Context *s, uint8_t stt[256]) double size0 = COST2(i, i) + COST2(i2, i2); 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; FFSWAP(int, stt[i], stt[i2]); FFSWAP(int, s->rc_stat[i][0], s->rc_stat[i2][0]); |