aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Rapp <t.rapp@noa-archive.com>2017-03-06 08:53:28 +0100
committerTobias Rapp <t.rapp@noa-archive.com>2017-03-17 11:55:16 +0100
commit205b8fd078e50aa3f7f401646dbb73de1bb35a10 (patch)
treeabbe5fa686d8d01a1c3bde998e712e5c26f6a561
parent8db301deadfcf113fb274881e65afcbe3e1bd645 (diff)
downloadffmpeg-205b8fd078e50aa3f7f401646dbb73de1bb35a10.tar.gz
avcodec: estimate output bitrate for uncompressed video codecs
Allows to get a more realistic total bitrate (and estimated file size) in avi_write_header. Previously a static default value of 200k was assumed. Adds an internal helper function for bitrate guessing. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/internal.h6
-rw-r--r--libavcodec/r210enc.c15
-rw-r--r--libavcodec/rawenc.c2
-rw-r--r--libavcodec/utils.c21
-rw-r--r--libavcodec/v210enc.c3
-rw-r--r--libavcodec/v308enc.c3
-rw-r--r--libavcodec/v408enc.c2
-rw-r--r--libavcodec/v410enc.c3
-rw-r--r--libavcodec/y41penc.c1
-rw-r--r--tests/ref/fate/v410enc2
-rw-r--r--tests/ref/vsynth/vsynth1-bpp12
-rw-r--r--tests/ref/vsynth/vsynth1-bpp152
-rw-r--r--tests/ref/vsynth/vsynth1-r2102
-rw-r--r--tests/ref/vsynth/vsynth1-rgb2
-rw-r--r--tests/ref/vsynth/vsynth1-v2102
-rw-r--r--tests/ref/vsynth/vsynth1-v210-102
-rw-r--r--tests/ref/vsynth/vsynth1-v3082
-rw-r--r--tests/ref/vsynth/vsynth1-v4082
-rw-r--r--tests/ref/vsynth/vsynth1-y41p2
-rw-r--r--tests/ref/vsynth/vsynth1-yuv2
-rw-r--r--tests/ref/vsynth/vsynth2-bpp12
-rw-r--r--tests/ref/vsynth/vsynth2-bpp152
-rw-r--r--tests/ref/vsynth/vsynth2-r2102
-rw-r--r--tests/ref/vsynth/vsynth2-rgb2
-rw-r--r--tests/ref/vsynth/vsynth2-v2102
-rw-r--r--tests/ref/vsynth/vsynth2-v210-102
-rw-r--r--tests/ref/vsynth/vsynth2-v3082
-rw-r--r--tests/ref/vsynth/vsynth2-v4082
-rw-r--r--tests/ref/vsynth/vsynth2-y41p2
-rw-r--r--tests/ref/vsynth/vsynth2-yuv2
-rw-r--r--tests/ref/vsynth/vsynth3-bpp12
-rw-r--r--tests/ref/vsynth/vsynth3-bpp152
-rw-r--r--tests/ref/vsynth/vsynth3-r2102
-rw-r--r--tests/ref/vsynth/vsynth3-rgb2
-rw-r--r--tests/ref/vsynth/vsynth3-v2102
-rw-r--r--tests/ref/vsynth/vsynth3-v210-102
-rw-r--r--tests/ref/vsynth/vsynth3-v3082
-rw-r--r--tests/ref/vsynth/vsynth3-v4082
-rw-r--r--tests/ref/vsynth/vsynth3-yuv2
-rw-r--r--tests/ref/vsynth/vsynth_lena-bpp12
-rw-r--r--tests/ref/vsynth/vsynth_lena-bpp152
-rw-r--r--tests/ref/vsynth/vsynth_lena-r2102
-rw-r--r--tests/ref/vsynth/vsynth_lena-rgb2
-rw-r--r--tests/ref/vsynth/vsynth_lena-v2102
-rw-r--r--tests/ref/vsynth/vsynth_lena-v210-102
-rw-r--r--tests/ref/vsynth/vsynth_lena-v3082
-rw-r--r--tests/ref/vsynth/vsynth_lena-v4082
-rw-r--r--tests/ref/vsynth/vsynth_lena-y41p2
-rw-r--r--tests/ref/vsynth/vsynth_lena-yuv2
49 files changed, 96 insertions, 40 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 6e93eeb1a9..e5f132a673 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -363,4 +363,10 @@ int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, i
int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len,
void **data, size_t *sei_size);
+/**
+ * Get an estimated video bitrate based on frame size, frame rate and coded
+ * bits per pixel.
+ */
+int64_t ff_guess_coded_bitrate(AVCodecContext *avctx);
+
#endif /* AVCODEC_INTERNAL_H */
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c
index 65b3c069fc..a55e5434f3 100644
--- a/libavcodec/r210enc.c
+++ b/libavcodec/r210enc.c
@@ -24,6 +24,18 @@
#include "internal.h"
#include "bytestream.h"
+static av_cold int encode_init(AVCodecContext *avctx)
+{
+ int aligned_width = FFALIGN(avctx->width,
+ avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
+
+ avctx->bits_per_coded_sample = 32;
+ if (avctx->width > 0)
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx) * aligned_width / avctx->width;
+
+ return 0;
+}
+
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic, int *got_packet)
{
@@ -73,6 +85,7 @@ AVCodec ff_r210_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_R210,
+ .init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB48, AV_PIX_FMT_NONE },
.capabilities = AV_CODEC_CAP_INTRA_ONLY,
@@ -84,6 +97,7 @@ AVCodec ff_r10k_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_R10K,
+ .init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB48, AV_PIX_FMT_NONE },
.capabilities = AV_CODEC_CAP_INTRA_ONLY,
@@ -95,6 +109,7 @@ AVCodec ff_avrp_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_AVRP,
+ .init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB48, AV_PIX_FMT_NONE },
.capabilities = AV_CODEC_CAP_INTRA_ONLY,
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index a2d5ccc0a6..d181b74570 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -44,6 +44,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
if(!avctx->codec_tag)
avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx);
+
return 0;
}
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6f7b2e7af7..63a6349703 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -4343,3 +4343,24 @@ int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len,
return 0;
}
+
+int64_t ff_guess_coded_bitrate(AVCodecContext *avctx)
+{
+ AVRational framerate = avctx->framerate;
+ int bits_per_coded_sample = avctx->bits_per_coded_sample;
+ int64_t bitrate;
+
+ if (!(framerate.num && framerate.den))
+ framerate = av_inv_q(avctx->time_base);
+ if (!(framerate.num && framerate.den))
+ return 0;
+
+ if (!bits_per_coded_sample) {
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
+ bits_per_coded_sample = av_get_bits_per_pixel(desc);
+ }
+ bitrate = (int64_t)bits_per_coded_sample * avctx->width * avctx->height *
+ framerate.num / framerate.den;
+
+ return bitrate;
+}
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index d3a8e26bc1..a6afbbfc41 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -110,6 +110,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
ff_v210enc_init(s);
+ avctx->bits_per_coded_sample = 20;
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx) * 16 / 15;
+
return 0;
}
diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c
index b60a72cee6..e88f1f4648 100644
--- a/libavcodec/v308enc.c
+++ b/libavcodec/v308enc.c
@@ -31,6 +31,9 @@ static av_cold int v308_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
+ avctx->bits_per_coded_sample = 24;
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx);
+
return 0;
}
diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c
index f37f360b73..e12965b7ad 100644
--- a/libavcodec/v408enc.c
+++ b/libavcodec/v408enc.c
@@ -26,6 +26,8 @@
static av_cold int v408_encode_init(AVCodecContext *avctx)
{
+ avctx->bits_per_coded_sample = 32;
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx);
return 0;
}
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index f35ff75963..5e2450279f 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -32,6 +32,9 @@ static av_cold int v410_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
+ avctx->bits_per_coded_sample = 32;
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx);
+
return 0;
}
diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c
index 94acc343fb..ca94a3c171 100644
--- a/libavcodec/y41penc.c
+++ b/libavcodec/y41penc.c
@@ -31,6 +31,7 @@ static av_cold int y41p_encode_init(AVCodecContext *avctx)
}
avctx->bits_per_coded_sample = 12;
+ avctx->bit_rate = ff_guess_coded_bitrate(avctx);
return 0;
}
diff --git a/tests/ref/fate/v410enc b/tests/ref/fate/v410enc
index b2c728e9b2..139da7b875 100644
--- a/tests/ref/fate/v410enc
+++ b/tests/ref/fate/v410enc
@@ -1 +1 @@
-f7cf1b743c18f74d047ce8d6ea05d3d9
+5fd2d9a7b3311f5c19dbdd647bb9eae6
diff --git a/tests/ref/vsynth/vsynth1-bpp1 b/tests/ref/vsynth/vsynth1-bpp1
index af1fb0ecd4..b647ba0a14 100644
--- a/tests/ref/vsynth/vsynth1-bpp1
+++ b/tests/ref/vsynth/vsynth1-bpp1
@@ -1,4 +1,4 @@
-a0b35707a9aa7144e3e1c70c1d01f4ce *tests/data/fate/vsynth1-bpp1.avi
+1c78e77c971b1ce31f229c6fc23d0902 *tests/data/fate/vsynth1-bpp1.avi
640460 tests/data/fate/vsynth1-bpp1.avi
cd1e1448d9895561347ceb66d0add34d *tests/data/fate/vsynth1-bpp1.out.rawvideo
stddev: 84.48 PSNR: 9.60 MAXDIFF: 218 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-bpp15 b/tests/ref/vsynth/vsynth1-bpp15
index 855383810e..d687b963d6 100644
--- a/tests/ref/vsynth/vsynth1-bpp15
+++ b/tests/ref/vsynth/vsynth1-bpp15
@@ -1,4 +1,4 @@
-dc37d1db0429f44000a03a60862751cd *tests/data/fate/vsynth1-bpp15.avi
+6147f5f235657fa9ced6ec6146be6ff0 *tests/data/fate/vsynth1-bpp15.avi
10144452 tests/data/fate/vsynth1-bpp15.avi
3aee2d6e82a9507d7f01844c04d2b57b *tests/data/fate/vsynth1-bpp15.out.rawvideo
stddev: 38.44 PSNR: 16.43 MAXDIFF: 159 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-r210 b/tests/ref/vsynth/vsynth1-r210
index e25b1de6d2..825e1d4789 100644
--- a/tests/ref/vsynth/vsynth1-r210
+++ b/tests/ref/vsynth/vsynth1-r210
@@ -1,4 +1,4 @@
-fd2bb8b3d3e47f5ea7769443324ee0ae *tests/data/fate/vsynth1-r210.avi
+1ea72f280b110ed65fc535c3438d27f9 *tests/data/fate/vsynth1-r210.avi
22125252 tests/data/fate/vsynth1-r210.avi
ecaafa9eec11b5e1453a63ed6d194eed *tests/data/fate/vsynth1-r210.out.rawvideo
stddev: 3.23 PSNR: 37.94 MAXDIFF: 48 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-rgb b/tests/ref/vsynth/vsynth1-rgb
index 0a3947c7eb..6d9629b5e9 100644
--- a/tests/ref/vsynth/vsynth1-rgb
+++ b/tests/ref/vsynth/vsynth1-rgb
@@ -1,4 +1,4 @@
-c8a4b8648436e73ced7fe32f6f65a1b3 *tests/data/fate/vsynth1-rgb.avi
+9d2bd1fa569a803c41b5dc5dd03f088e *tests/data/fate/vsynth1-rgb.avi
15213252 tests/data/fate/vsynth1-rgb.avi
93695a27c24a61105076ca7b1f010bbd *tests/data/fate/vsynth1-rgb.out.rawvideo
stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-v210 b/tests/ref/vsynth/vsynth1-v210
index 388e8b6688..1b69da4e9f 100644
--- a/tests/ref/vsynth/vsynth1-v210
+++ b/tests/ref/vsynth/vsynth1-v210
@@ -1,4 +1,4 @@
-0712d60b3a00cf2d5a7e39aa21e2547a *tests/data/fate/vsynth1-v210.avi
+767471c71d60daf46ca3a758771c4f8e *tests/data/fate/vsynth1-v210.avi
14752452 tests/data/fate/vsynth1-v210.avi
2ba7f4ca302f3c4147860b9dfb12b6e4 *tests/data/fate/vsynth1-v210.out.rawvideo
stddev: 1.84 PSNR: 42.81 MAXDIFF: 29 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-v210-10 b/tests/ref/vsynth/vsynth1-v210-10
index 4621b9d69a..f459cfa8e1 100644
--- a/tests/ref/vsynth/vsynth1-v210-10
+++ b/tests/ref/vsynth/vsynth1-v210-10
@@ -1,4 +1,4 @@
-230bbd31c82d4fbb92d5ea2ac591ded5 *tests/data/fate/vsynth1-v210-10.avi
+9269ce2a5294a4c9a8346328d06b23af *tests/data/fate/vsynth1-v210-10.avi
14752452 tests/data/fate/vsynth1-v210-10.avi
50973792d3f1abe04a51ee0121f077f2 *tests/data/fate/vsynth1-v210-10.out.rawvideo
stddev: 1.85 PSNR: 42.78 MAXDIFF: 29 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-v308 b/tests/ref/vsynth/vsynth1-v308
index 9eb2911006..162624e286 100644
--- a/tests/ref/vsynth/vsynth1-v308
+++ b/tests/ref/vsynth/vsynth1-v308
@@ -1,4 +1,4 @@
-58ea26d3060f9d47cf95056ed9361c90 *tests/data/fate/vsynth1-v308.avi
+5d868b73c554a9a2422d6c8a18ce9c02 *tests/data/fate/vsynth1-v308.avi
15213252 tests/data/fate/vsynth1-v308.avi
10fb42f1abf40a289c3edafc0390482c *tests/data/fate/vsynth1-v308.out.rawvideo
stddev: 2.67 PSNR: 39.60 MAXDIFF: 43 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-v408 b/tests/ref/vsynth/vsynth1-v408
index bf16cbd489..5d5f816fc0 100644
--- a/tests/ref/vsynth/vsynth1-v408
+++ b/tests/ref/vsynth/vsynth1-v408
@@ -1,4 +1,4 @@
-4ac68e91ac25bc422abb3febe86a4acd *tests/data/fate/vsynth1-v408.avi
+4e977bec707cda2b09edb717805cb960 *tests/data/fate/vsynth1-v408.avi
20282052 tests/data/fate/vsynth1-v408.avi
c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-v408.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-y41p b/tests/ref/vsynth/vsynth1-y41p
index cb4c001f09..84e790b4a0 100644
--- a/tests/ref/vsynth/vsynth1-y41p
+++ b/tests/ref/vsynth/vsynth1-y41p
@@ -1,4 +1,4 @@
-862ffddd90c82163d2505031e5bbcd9a *tests/data/fate/vsynth1-y41p.avi
+7355fc7614e1ba50d364fc13af5fc3e1 *tests/data/fate/vsynth1-y41p.avi
7610052 tests/data/fate/vsynth1-y41p.avi
3aef1d83732a3f9835ee2523a11c95c1 *tests/data/fate/vsynth1-y41p.out.rawvideo
stddev: 5.98 PSNR: 32.59 MAXDIFF: 87 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth1-yuv b/tests/ref/vsynth/vsynth1-yuv
index 8498d68e6a..9f73c6fc26 100644
--- a/tests/ref/vsynth/vsynth1-yuv
+++ b/tests/ref/vsynth/vsynth1-yuv
@@ -1,4 +1,4 @@
-2b930d809c19e8d50eb4c92474085c27 *tests/data/fate/vsynth1-yuv.avi
+795ce63f1fe371b98822b1cb385b062f *tests/data/fate/vsynth1-yuv.avi
7610052 tests/data/fate/vsynth1-yuv.avi
c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-yuv.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-bpp1 b/tests/ref/vsynth/vsynth2-bpp1
index 4005755662..3b512e9a6a 100644
--- a/tests/ref/vsynth/vsynth2-bpp1
+++ b/tests/ref/vsynth/vsynth2-bpp1
@@ -1,4 +1,4 @@
-a0330430d7dbd76cbd6d099b778397e8 *tests/data/fate/vsynth2-bpp1.avi
+22664dc7e6cefc580b1456502c46eb10 *tests/data/fate/vsynth2-bpp1.avi
640460 tests/data/fate/vsynth2-bpp1.avi
f0dfc0e87e5d96bce29a5944b1bd7471 *tests/data/fate/vsynth2-bpp1.out.rawvideo
stddev: 68.98 PSNR: 11.36 MAXDIFF: 218 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-bpp15 b/tests/ref/vsynth/vsynth2-bpp15
index 153b21e555..9236c25b95 100644
--- a/tests/ref/vsynth/vsynth2-bpp15
+++ b/tests/ref/vsynth/vsynth2-bpp15
@@ -1,4 +1,4 @@
-4bf0992de6b40389a35cd744f76bb213 *tests/data/fate/vsynth2-bpp15.avi
+1760b76ddf1df0092333434f1a97407b *tests/data/fate/vsynth2-bpp15.avi
10144452 tests/data/fate/vsynth2-bpp15.avi
9a40133384e3f22c960d70c8cfe51781 *tests/data/fate/vsynth2-bpp15.out.rawvideo
stddev: 33.97 PSNR: 17.51 MAXDIFF: 154 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-r210 b/tests/ref/vsynth/vsynth2-r210
index 3e19ef840d..dc5ff1849c 100644
--- a/tests/ref/vsynth/vsynth2-r210
+++ b/tests/ref/vsynth/vsynth2-r210
@@ -1,4 +1,4 @@
-50e82830a941457a3cade01394e34dd0 *tests/data/fate/vsynth2-r210.avi
+2f928096d892ce0239832afc369e117c *tests/data/fate/vsynth2-r210.avi
22125252 tests/data/fate/vsynth2-r210.avi
2ade5f6167d7a4a1589e168ddbbc35d0 *tests/data/fate/vsynth2-r210.out.rawvideo
stddev: 1.17 PSNR: 46.71 MAXDIFF: 15 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-rgb b/tests/ref/vsynth/vsynth2-rgb
index 93fe634b9e..6d44b25489 100644
--- a/tests/ref/vsynth/vsynth2-rgb
+++ b/tests/ref/vsynth/vsynth2-rgb
@@ -1,4 +1,4 @@
-707159e45a20b22d383e71d3e5960753 *tests/data/fate/vsynth2-rgb.avi
+3f8f04636aa027d1fc8245b08c7a8414 *tests/data/fate/vsynth2-rgb.avi
15213252 tests/data/fate/vsynth2-rgb.avi
32fae3e665407bb4317b3f90fedb903c *tests/data/fate/vsynth2-rgb.out.rawvideo
stddev: 1.54 PSNR: 44.37 MAXDIFF: 17 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-v210 b/tests/ref/vsynth/vsynth2-v210
index cc72bb2220..3bd4598b40 100644
--- a/tests/ref/vsynth/vsynth2-v210
+++ b/tests/ref/vsynth/vsynth2-v210
@@ -1,4 +1,4 @@
-211a901d7e6327cc7a48a80250acf4f8 *tests/data/fate/vsynth2-v210.avi
+7a4f5840860ae0bec0c354025b488118 *tests/data/fate/vsynth2-v210.avi
14752452 tests/data/fate/vsynth2-v210.avi
99e367a50da75c2c187230889bee8e2e *tests/data/fate/vsynth2-v210.out.rawvideo
stddev: 0.40 PSNR: 56.06 MAXDIFF: 9 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-v210-10 b/tests/ref/vsynth/vsynth2-v210-10
index db38b2f598..4e973aa2a4 100644
--- a/tests/ref/vsynth/vsynth2-v210-10
+++ b/tests/ref/vsynth/vsynth2-v210-10
@@ -1,4 +1,4 @@
-02a5d983deb4bc91bb273c2b26c3100f *tests/data/fate/vsynth2-v210-10.avi
+d078cb3cbbbc022ed7c5c448026b050a *tests/data/fate/vsynth2-v210-10.avi
14752452 tests/data/fate/vsynth2-v210-10.avi
8bb1c449e1a2a94fd0d98841c04246bb *tests/data/fate/vsynth2-v210-10.out.rawvideo
stddev: 0.39 PSNR: 56.17 MAXDIFF: 9 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-v308 b/tests/ref/vsynth/vsynth2-v308
index f1fee2d7d4..cc36d8a3a1 100644
--- a/tests/ref/vsynth/vsynth2-v308
+++ b/tests/ref/vsynth/vsynth2-v308
@@ -1,4 +1,4 @@
-a07c9e12508dec90a414a4a6119c5ae4 *tests/data/fate/vsynth2-v308.avi
+866fb5095976d62279c402023526d7a9 *tests/data/fate/vsynth2-v308.avi
15213252 tests/data/fate/vsynth2-v308.avi
8394327c14ef0b6fbaae3b69fcc5572a *tests/data/fate/vsynth2-v308.out.rawvideo
stddev: 0.50 PSNR: 54.10 MAXDIFF: 13 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-v408 b/tests/ref/vsynth/vsynth2-v408
index 808135ff2d..688e4e469a 100644
--- a/tests/ref/vsynth/vsynth2-v408
+++ b/tests/ref/vsynth/vsynth2-v408
@@ -1,4 +1,4 @@
-01612752a44782cd99bf6399875d313c *tests/data/fate/vsynth2-v408.avi
+a9b25bf6f9559cdbe795913cc69d5c0f *tests/data/fate/vsynth2-v408.avi
20282052 tests/data/fate/vsynth2-v408.avi
36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-v408.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-y41p b/tests/ref/vsynth/vsynth2-y41p
index e40a0f3359..164a84581e 100644
--- a/tests/ref/vsynth/vsynth2-y41p
+++ b/tests/ref/vsynth/vsynth2-y41p
@@ -1,4 +1,4 @@
-34425303a27433cfa2cf077258c21c68 *tests/data/fate/vsynth2-y41p.avi
+4eda6db518001a8f2bbb2ec4b414b05a *tests/data/fate/vsynth2-y41p.avi
7610052 tests/data/fate/vsynth2-y41p.avi
7c760febffcf1c2e43e494f38b010af1 *tests/data/fate/vsynth2-y41p.out.rawvideo
stddev: 1.32 PSNR: 45.72 MAXDIFF: 34 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-yuv b/tests/ref/vsynth/vsynth2-yuv
index 08c9593c8e..7199968024 100644
--- a/tests/ref/vsynth/vsynth2-yuv
+++ b/tests/ref/vsynth/vsynth2-yuv
@@ -1,4 +1,4 @@
-3d7ecff63ce4863a3d299ff82d910d78 *tests/data/fate/vsynth2-yuv.avi
+5eda550fac21e8913cbb2c88e4f0791a *tests/data/fate/vsynth2-yuv.avi
7610052 tests/data/fate/vsynth2-yuv.avi
36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-yuv.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-bpp1 b/tests/ref/vsynth/vsynth3-bpp1
index 3c8c47ac86..639a2b15de 100644
--- a/tests/ref/vsynth/vsynth3-bpp1
+++ b/tests/ref/vsynth/vsynth3-bpp1
@@ -1,4 +1,4 @@
-4c8777a88a9e52b99d5a345acffcbf06 *tests/data/fate/vsynth3-bpp1.avi
+7eafab02a501b3b0ac9f854cd334f47a *tests/data/fate/vsynth3-bpp1.avi
20460 tests/data/fate/vsynth3-bpp1.avi
52ae74ef7910e5b603c12288d425b9ae *tests/data/fate/vsynth3-bpp1.out.rawvideo
stddev: 84.76 PSNR: 9.57 MAXDIFF: 232 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-bpp15 b/tests/ref/vsynth/vsynth3-bpp15
index fff803721c..fe67e1a980 100644
--- a/tests/ref/vsynth/vsynth3-bpp15
+++ b/tests/ref/vsynth/vsynth3-bpp15
@@ -1,4 +1,4 @@
-9ac236c12757cbf9ee6f95c24a374524 *tests/data/fate/vsynth3-bpp15.avi
+ad67910bcee1f3fe49ba7312499a3b16 *tests/data/fate/vsynth3-bpp15.avi
122452 tests/data/fate/vsynth3-bpp15.avi
85ac2fa98252ae907b97a7a561ca676f *tests/data/fate/vsynth3-bpp15.out.rawvideo
stddev: 37.76 PSNR: 16.59 MAXDIFF: 156 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-r210 b/tests/ref/vsynth/vsynth3-r210
index cdbdb283bc..75c424cf28 100644
--- a/tests/ref/vsynth/vsynth3-r210
+++ b/tests/ref/vsynth/vsynth3-r210
@@ -1,4 +1,4 @@
-40b93804d521e2b7c82a3060dec81221 *tests/data/fate/vsynth3-r210.avi
+229e700e0fab4e81481e99a70e00bec9 *tests/data/fate/vsynth3-r210.avi
442052 tests/data/fate/vsynth3-r210.avi
e1d882babc8754f7418aa91ce48f7ab0 *tests/data/fate/vsynth3-r210.out.rawvideo
stddev: 3.48 PSNR: 37.28 MAXDIFF: 42 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-rgb b/tests/ref/vsynth/vsynth3-rgb
index f67d285802..1a882ce104 100644
--- a/tests/ref/vsynth/vsynth3-rgb
+++ b/tests/ref/vsynth/vsynth3-rgb
@@ -1,4 +1,4 @@
-000bd5f3251bfd6a2a2b590b2d16fe0b *tests/data/fate/vsynth3-rgb.avi
+3e2909a69865eb88df72916c38d265de *tests/data/fate/vsynth3-rgb.avi
183652 tests/data/fate/vsynth3-rgb.avi
693aff10c094f8bd31693f74cf79d2b2 *tests/data/fate/vsynth3-rgb.out.rawvideo
stddev: 3.67 PSNR: 36.82 MAXDIFF: 43 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-v210 b/tests/ref/vsynth/vsynth3-v210
index 658f90c31e..f5282eee4b 100644
--- a/tests/ref/vsynth/vsynth3-v210
+++ b/tests/ref/vsynth/vsynth3-v210
@@ -1,4 +1,4 @@
-df0ae6cafc1aedbf17176eb44a732e4d *tests/data/fate/vsynth3-v210.avi
+6824f941ed079952cdf22cc9cdfaa35d *tests/data/fate/vsynth3-v210.avi
224452 tests/data/fate/vsynth3-v210.avi
198ffb24c06927d8aaac5e59d81a0934 *tests/data/fate/vsynth3-v210.out.rawvideo
stddev: 2.11 PSNR: 41.61 MAXDIFF: 27 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-v210-10 b/tests/ref/vsynth/vsynth3-v210-10
index 1a664afdcc..46fe24dc7e 100644
--- a/tests/ref/vsynth/vsynth3-v210-10
+++ b/tests/ref/vsynth/vsynth3-v210-10
@@ -1,4 +1,4 @@
-b68ad16e3bfd78556b816ec1a676445c *tests/data/fate/vsynth3-v210-10.avi
+83eef7004f81a2f9529941ed27554509 *tests/data/fate/vsynth3-v210-10.avi
224452 tests/data/fate/vsynth3-v210-10.avi
0cf7cf68724fa5146b1667e4fa08b0e1 *tests/data/fate/vsynth3-v210-10.out.rawvideo
stddev: 2.12 PSNR: 41.58 MAXDIFF: 26 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-v308 b/tests/ref/vsynth/vsynth3-v308
index 347d4755dc..b823c7bad4 100644
--- a/tests/ref/vsynth/vsynth3-v308
+++ b/tests/ref/vsynth/vsynth3-v308
@@ -1,4 +1,4 @@
-073e24cc00a27436e97e0b242d4fd077 *tests/data/fate/vsynth3-v308.avi
+e1259287375d05431ee718e50eb7f37b *tests/data/fate/vsynth3-v308.avi
180252 tests/data/fate/vsynth3-v308.avi
02a85ec07377df6b483281038f8882ee *tests/data/fate/vsynth3-v308.out.rawvideo
stddev: 3.06 PSNR: 38.40 MAXDIFF: 40 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-v408 b/tests/ref/vsynth/vsynth3-v408
index 2da09e1825..b64f7d8e1a 100644
--- a/tests/ref/vsynth/vsynth3-v408
+++ b/tests/ref/vsynth/vsynth3-v408
@@ -1,4 +1,4 @@
-e74a1abf73b9df90f5103d901b37185f *tests/data/fate/vsynth3-v408.avi
+c75fc69c19c6c578ec95c3972f4af339 *tests/data/fate/vsynth3-v408.avi
238052 tests/data/fate/vsynth3-v408.avi
a038ad7c3c09f776304ef7accdea9c74 *tests/data/fate/vsynth3-v408.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-yuv b/tests/ref/vsynth/vsynth3-yuv
index aa2cf2fad2..ceeb1059c6 100644
--- a/tests/ref/vsynth/vsynth3-yuv
+++ b/tests/ref/vsynth/vsynth3-yuv
@@ -1,4 +1,4 @@
-080401647f4b08df4fb44a253c914cc0 *tests/data/fate/vsynth3-yuv.avi
+7935fee60d3eb567baf312900616dec0 *tests/data/fate/vsynth3-yuv.avi
93552 tests/data/fate/vsynth3-yuv.avi
a038ad7c3c09f776304ef7accdea9c74 *tests/data/fate/vsynth3-yuv.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-bpp1 b/tests/ref/vsynth/vsynth_lena-bpp1
index 3489989268..a3772551ba 100644
--- a/tests/ref/vsynth/vsynth_lena-bpp1
+++ b/tests/ref/vsynth/vsynth_lena-bpp1
@@ -1,4 +1,4 @@
-32673399a8442e397a608839eb3e95cb *tests/data/fate/vsynth_lena-bpp1.avi
+8dc90696dabf220a8f4413af20e93073 *tests/data/fate/vsynth_lena-bpp1.avi
640460 tests/data/fate/vsynth_lena-bpp1.avi
6183ba861d4e48d4aaefc514fde270e5 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
stddev: 83.28 PSNR: 9.72 MAXDIFF: 215 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-bpp15 b/tests/ref/vsynth/vsynth_lena-bpp15
index 96dbf6d493..65bff0bfd0 100644
--- a/tests/ref/vsynth/vsynth_lena-bpp15
+++ b/tests/ref/vsynth/vsynth_lena-bpp15
@@ -1,4 +1,4 @@
-b1b2dd35bcb3d5c20651ffe0da55cb46 *tests/data/fate/vsynth_lena-bpp15.avi
+64516ba947d531db2bccc2ecc338b7be *tests/data/fate/vsynth_lena-bpp15.avi
10144452 tests/data/fate/vsynth_lena-bpp15.avi
ccf6fc507e938e8cc5c2a97b644de51c *tests/data/fate/vsynth_lena-bpp15.out.rawvideo
stddev: 32.84 PSNR: 17.80 MAXDIFF: 92 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-r210 b/tests/ref/vsynth/vsynth_lena-r210
index 3ed30ff506..8fd1a666af 100644
--- a/tests/ref/vsynth/vsynth_lena-r210
+++ b/tests/ref/vsynth/vsynth_lena-r210
@@ -1,4 +1,4 @@
-e5f96a1d0fe5c519f6cb954838e105bc *tests/data/fate/vsynth_lena-r210.avi
+94874a48987fd401494f4d7ca8e1273b *tests/data/fate/vsynth_lena-r210.avi
22125252 tests/data/fate/vsynth_lena-r210.avi
6ea4fcd93fc83defc8770e85b64b60bb *tests/data/fate/vsynth_lena-r210.out.rawvideo
stddev: 0.70 PSNR: 51.12 MAXDIFF: 12 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-rgb b/tests/ref/vsynth/vsynth_lena-rgb
index 9706ffba83..f3d232e76c 100644
--- a/tests/ref/vsynth/vsynth_lena-rgb
+++ b/tests/ref/vsynth/vsynth_lena-rgb
@@ -1,4 +1,4 @@
-f083e812216195c1e9454b5fac681c92 *tests/data/fate/vsynth_lena-rgb.avi
+6ffbbd6939b3fe9f5dcf036ee46aad2d *tests/data/fate/vsynth_lena-rgb.avi
15213252 tests/data/fate/vsynth_lena-rgb.avi
98d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth_lena-rgb.out.rawvideo
stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-v210 b/tests/ref/vsynth/vsynth_lena-v210
index ef5020b3f3..549bf43fe1 100644
--- a/tests/ref/vsynth/vsynth_lena-v210
+++ b/tests/ref/vsynth/vsynth_lena-v210
@@ -1,4 +1,4 @@
-20af8b986704b9713cd75d3e6e41efa4 *tests/data/fate/vsynth_lena-v210.avi
+0e0db58fa269cffbfb15f81277fa2828 *tests/data/fate/vsynth_lena-v210.avi
14752452 tests/data/fate/vsynth_lena-v210.avi
7ba6e411e43c6b57c95c49d6848f41e6 *tests/data/fate/vsynth_lena-v210.out.rawvideo
stddev: 0.34 PSNR: 57.41 MAXDIFF: 6 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-v210-10 b/tests/ref/vsynth/vsynth_lena-v210-10
index 1e5732bd55..9541b57d7f 100644
--- a/tests/ref/vsynth/vsynth_lena-v210-10
+++ b/tests/ref/vsynth/vsynth_lena-v210-10
@@ -1,4 +1,4 @@
-a3913b719397fae870c1d9bc35053259 *tests/data/fate/vsynth_lena-v210-10.avi
+0d638c575c7784c2d445f7f7e3b889bc *tests/data/fate/vsynth_lena-v210-10.avi
14752452 tests/data/fate/vsynth_lena-v210-10.avi
a627fb50c8276200fd71383977d87ca3 *tests/data/fate/vsynth_lena-v210-10.out.rawvideo
stddev: 0.34 PSNR: 57.43 MAXDIFF: 6 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-v308 b/tests/ref/vsynth/vsynth_lena-v308
index 6de15b5aa4..81766df82f 100644
--- a/tests/ref/vsynth/vsynth_lena-v308
+++ b/tests/ref/vsynth/vsynth_lena-v308
@@ -1,4 +1,4 @@
-5bff4d7763e624272835e056c9faf4c2 *tests/data/fate/vsynth_lena-v308.avi
+eabb002088244fa802b67aea78271641 *tests/data/fate/vsynth_lena-v308.avi
15213252 tests/data/fate/vsynth_lena-v308.avi
d43cb310c130c69214332d74f6ee5f9a *tests/data/fate/vsynth_lena-v308.out.rawvideo
stddev: 0.41 PSNR: 55.80 MAXDIFF: 7 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-v408 b/tests/ref/vsynth/vsynth_lena-v408
index ba19e28d2e..2c67dcdac8 100644
--- a/tests/ref/vsynth/vsynth_lena-v408
+++ b/tests/ref/vsynth/vsynth_lena-v408
@@ -1,4 +1,4 @@
-e2a1c097a78f1a5c8ad1bccc4077844b *tests/data/fate/vsynth_lena-v408.avi
+ba166cd36099177b3942b16cd2c200fc *tests/data/fate/vsynth_lena-v408.avi
20282052 tests/data/fate/vsynth_lena-v408.avi
dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-v408.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-y41p b/tests/ref/vsynth/vsynth_lena-y41p
index 9cc09573b0..325d752073 100644
--- a/tests/ref/vsynth/vsynth_lena-y41p
+++ b/tests/ref/vsynth/vsynth_lena-y41p
@@ -1,4 +1,4 @@
-3b958734c653d265cd42e31d6a22230f *tests/data/fate/vsynth_lena-y41p.avi
+159548ec0881286674e4a1bd75b89f9e *tests/data/fate/vsynth_lena-y41p.avi
7610052 tests/data/fate/vsynth_lena-y41p.avi
d27a84ccdac09055724d122e03fea82a *tests/data/fate/vsynth_lena-y41p.out.rawvideo
stddev: 1.07 PSNR: 47.54 MAXDIFF: 21 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-yuv b/tests/ref/vsynth/vsynth_lena-yuv
index bc27dcf6ae..645ef8bb8d 100644
--- a/tests/ref/vsynth/vsynth_lena-yuv
+++ b/tests/ref/vsynth/vsynth_lena-yuv
@@ -1,4 +1,4 @@
-0d061b0b7bedcd59e5c90a99f58ceeae *tests/data/fate/vsynth_lena-yuv.avi
+2f4102cd4375383c0a3b6114a502996f *tests/data/fate/vsynth_lena-yuv.avi
7610052 tests/data/fate/vsynth_lena-yuv.avi
dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-yuv.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200