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.

Change-Id: Ie2794daf6dbafd2f128464f9b9da520fc54c0dd6
This commit is contained in:
Deb Mukherjee
2014-06-12 16:53:13 -07:00
parent 08cb2b0211
commit 82dc1332af
17 changed files with 441 additions and 37 deletions

View File

@@ -50,6 +50,15 @@ static FILE *OpenTestDataFile(const std::string& file_name) {
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 {