summaryrefslogtreecommitdiff
path: root/y4minput.c
AgeCommit message (Collapse)Author
2023-02-03Set _img->bit_depth in y4m_input_fetch_frame()Wan-Teh Chang
This is a port of https://aomedia-review.googlesource.com/c/aom/+/169961. Change-Id: I2aa0d12cafde0c73448bf8c57eab0cd92e846468
2022-07-27y4m_input_fetch_frame: fix ubsan null/zero offset warningJames Zern
reported under clang-13; use a while loop in file_read() to force a size check before attempting to read. buf (aux_buf) may be may be null when no conversion is necessary. y4minput.c:29:43: runtime error: applying zero offset to null pointer Bug: b/229626362 Change-Id: Ia3250d6ff9c325faf48eaa31f4399e20837f8f7b
2022-04-27y4m_input_open: check allocsJames Zern
Change-Id: I99ee0ef3ab28a22923cb413ccf5935fdc38862be
2021-07-15Avoid chroma resampling for 420mpeg2 inputBohan Li
BUG=aomedia:3080 Change-Id: I4ed81abf4b799224085485560f675c10c318cde6
2021-01-29Relax constraints on Y4M header parsingElliott Karpilovsky
Previous parser assumed that the header would not exceed 80 characters. However, with latest FFMPEG changes, the header of Y4M files can exceed this limit. New parser can parse an arbitrarily long header, as long each tag is 255 or less characters. BUG=aomedia:2876 Change-Id: I9e6e42c50f4e49251dd697eef8036485ad5a1228
2021-01-28Relax constraints on Y4M header parsingElliott Karpilovsky
Previous parser assumed that the header would not exceed 80 characters. However, with latest FFMPEG changes, the header of Y4M files can exceed this limit. New parser can parse up to ~200 characters. Arbitrary parsing in future commit. BUG=aomedia:2876 Change-Id: I2ab8a7930cb5b76004e6731321d0ea20ddf333c1
2021-01-14Relax constraints on Y4M header parsingElliott Karpilovsky
Some refactoring and cleanup -- do not count the first 9 bytes against the header limit. Add a unit test. BUG=aomedia:2876 Change-Id: Id897d565e2917b48460cc77cd082cec4c98b42cb
2018-04-09vpx_image: remove unused image formatsJames Zern
libvpx only emits: VPX_IMG_FMT_{I420,I422,I440,I444,I42016,I42216,I44016,I44416} and additionally supports YV12 as input. interleaved yuv, rgb and alpha formats are unused. Change-Id: Ie2ab1099e950c6e696f475d46882f5c47a174042
2018-04-02remove support for yuv 411Johann
Previously we attempted to convert 411 input. Remove support because malformed 411 input can cause the conversion to crash. BUG=webm:1386 Change-Id: I3d41465a94867ee7f8eaa43fb76beb41f8fa644b
2018-01-12clang-format v5.0.0 y4minput.cJohann
Remove trailing empty line to keep the comment from being indented. https://bugs.llvm.org/show_bug.cgi?id=35930 Change-Id: If0f0862623b3fa3ae49e850edbbed52c2b4c6672
2018-01-11adopt some clang 5.0.0 formattingJohann
At least the changes that don't conflict with 4.0.1 Change-Id: I9b6a7c14dadc0738cd0f628a10ece90fc7ee89fd
2017-09-01apply clang-formatclang-format
Change-Id: If4c3e8a396d0fcb304f407b44e28cac3219f038c
2016-07-19vp8/{bitstream,rdopt},y4minput: correct break placementJames Zern
these should be placed within {}s when present Change-Id: If00e9766fa8cb039cc070467f353a468f99460fb
2016-07-19y4minput.c: correct empty loop formattingJames Zern
prefer {}s over ';' Change-Id: I563fc82717e1deb4f42a40e03dca318c6adaa0c1
2016-07-19top-level: apply clang-formatclang-format
Change-Id: Ibd5395bf8956a80f7c0df4d539c7a42c927a1fc7
2014-10-08Revert "Change the y4m buffer allocation size"Yaowu Xu
This reverts commit 72ef1949388c4c0d82769ef06c6db0195b124b13. Change-Id: Ic1906bcc6da05d2e6529152b92df809c8e5a2406
2014-10-03Change the y4m buffer allocation sizeYaowu Xu
This attempts to fix issue #847 Change-Id: Ifa2f96b6b33624004272d83363e089b5b4dc5626
2014-09-02Removing legacy compatibility layer.Dmitry Kovalev
Change-Id: I6fdcea0e0faf42386dd2b8f972a3b3fb2c21b2c7
2014-08-21y4minput.c : removed malloc of 0 bytes to resolve warningJim Bankoski
Change-Id: Ic143455b0880e639959732e178cd62140a510b79
2014-08-21y4minput.c : uninitalized buffer caused garbage value warningJim Bankoski
Change-Id: I613f521680b235726b2e0f78c068c0e5d7799f76
2014-07-11Silent -wextra warningsYaowu Xu
1. vpxenc.c 2. y4minput.c Change-Id: I1cfe1ef84a3eec11376976c09947fe6178ee039f
2014-07-05Adds support for reading and writing 10/12-bit y4mDeb Mukherjee
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
2014-07-02Reverting "Adds support for reading and writing 10/12-bit y4m" for now ↵Dmitry Kovalev
because of Mac Build Failure. This reverts commit 82dc1332af4b16d3e4ad3c4358498820637b7add Change-Id: I824bf42bf47c7df6985c79e451d6af913030d374
2014-07-02Adds support for reading and writing 10/12-bit y4mDeb Mukherjee
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
2014-03-18y4minput: add more error reporting on read failureJames Zern
Change-Id: Iedb136e4019ec3eb3005ea567efb33902dccfb8d
2014-03-11y4minput: add some tolerance for read short countsJames Zern
Change-Id: Id5d3c536b7494eb3292f33f35c700b5de7034595
2013-05-06Y4M input support for 4:2:2, 4:4:4, 4:4:4:4John Koleszar
Adds a new experiment CONFIG_NON420 that allows other chroma subsamplings to be passed to the codec. This commit allows the data to be passed from a y4m input file through vpxenc to the codec, where they're currently rejected. Later commits will finish support for this inside the codec. Change-Id: Ib3aac604d8cad9e24cef395fa1067f16ba7e8e43
2012-11-06Merge other top-level C codeJohn Koleszar
Change-Id: I0ff77f51595599cc3de5183c6c655fd261e3d925
2012-07-17Restyle codeJohn Koleszar
Approximate the Google style guide[1] so that that there's a written document to follow and tools to check compliance[2]. [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml [2]: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py Change-Id: Idf40e3d8dddcc72150f6af127b13e5dab838685f
2011-05-09clean up unused variable warningsJohann
Change-Id: I9467d7a50eac32d8e8f3a2f26db818e47c93c94b
2010-10-27Eliminate more warnings.Timothy B. Terriberry
This eliminates a large set of warnings exposed by the Mozilla build system (Use of C++ comments in ISO C90 source, commas at the end of enum lists, a couple incomplete initializers, and signed/unsigned comparisons). It also eliminates many (but not all) of the warnings expose by newer GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite without checking the return values). There are a few spurious warnings left on my system: ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used uninitialized in this function gcc seems to be unable to figure out that the value shortcut doesn't change between the two if blocks that test it here. ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned expression >= 0 is always true ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned expression >= 0 is always true This is true, so far as it goes, but it's comparing against an enum, and the C standard does not mandate that enums be unsigned, so the checks can't be removed. Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
2010-09-09Use WebM in copyright notice for consistencyJohn Koleszar
Changes 'The VP8 project' to 'The WebM project', for consistency with other webmproject.org repositories. Fixes issue #97. Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-06-18cosmetics: trim trailing whitespaceJohn Koleszar
When the license headers were updated, they accidentally contained trailing whitespace, so unfortunately we have to touch all the files again. Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-06-02Add support for reading YUV4MPEG2 files to ivfenc.Timothy B. Terriberry
A large collection of example files may be found at http://media.xiph.org/video/derf/ This also fixes a bug in ivfenc for uncompressed IVF input, which previously appeared not to skip past the file header the second time it opened the file. I don't actually have an IVF file with which to test this fix, however. Change-Id: Id69a1e11a3fa16c4a4fa8944e880bcea090cd52b