Adds support for reading and writing 10/12-bit y4m
The y4m extension used is the same as the one used in ffmpeg/x264.
The patch is adapted from the highbitdepth branch.
Also adds unit tests for y4m header parsing and md5 check
of the raw frame data, as well as y4m writing.
[build fix for Mac/VS by not using tuples with strings]
Change-Id: I40897ee37d289e4b6cea6fedc67047d692b8cb46
diff --git a/vpxenc.c b/vpxenc.c
index d46a83e..fce6807 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -756,6 +756,7 @@
input->framerate.numerator = input->y4m.fps_n;
input->framerate.denominator = input->y4m.fps_d;
input->fmt = input->y4m.vpx_fmt;
+ input->bit_depth = input->y4m.bit_depth;
} else
fatal("Unsupported Y4M stream.");
} else if (input->detect.buf_read == 4 && fourcc_is_ivf(input->detect.buf)) {
@@ -1533,6 +1534,7 @@
input.framerate.numerator = 30;
input.framerate.denominator = 1;
input.only_i420 = 1;
+ input.bit_depth = 0;
/* First parse the global configuration values, because we want to apply
* other parameters on top of the default configuration provided by the