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/test/video_source.h b/test/video_source.h
index 6d1855a..4250cb7 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -50,6 +50,15 @@
return fopen(path_to_source.c_str(), "rb");
}
+static FILE *OpenTestOutFile(const std::string& file_name) {
+ const std::string path_to_source = GetDataPath() + "/" + file_name;
+ return fopen(path_to_source.c_str(), "wb");
+}
+
+static FILE *OpenTempOutFile() {
+ return tmpfile();
+}
+
// Abstract base class for test video sources, which provide a stream of
// vpx_image_t images with associated timestamps and duration.
class VideoSource {