summaryrefslogtreecommitdiff
path: root/test/video_source.h
AgeCommit message (Collapse)Author
2023-05-23Add IO for TPL statsJerome Jiang
Overload TempOutFile constructor to allow IO mode. Bug: b/281563704 Change-Id: I1f4f5b29db0e331941b6795e478eeeab51f625ad
2022-05-27test/*: normalize use of nullptrJames Zern
this is preferred over NULL in C++11 Change-Id: Ic48ddcc6dfb8975a57f6713549ad04d93db21415
2022-05-26GetTempOutFile(): use testing::TempDir()James Zern
rather than tmpfile(). this allows for setting the path with TEST_TMPDIR and provides a valid default for android. Change-Id: Iecb26f381b6a6ec97da62cfa0b7200f427440a2f
2021-11-11test/DummyVideoSource::ReallocImage: check img_ allocJames Zern
prevents a crash on the next line accessing img_ members Bug: aomedia:3191 Change-Id: I430fb4ee662b0001629096eb8b554f8a2b30cce0
2021-11-08video_source.h,ReallocImage: quiet implicit conv warningJames Zern
with -fsanitize=undefined test/video_source.h:194:33: runtime error: implicit conversion from type 'int' of value -32 (32-bit, signed) to type 'unsigned int' changed the value to 4294967264 (32-bit, unsigned) Change-Id: I92013086d517fecf01c9e4cdfe6737b8ce733a1f
2018-09-15cosmetics: normalize include guardsJames Zern
use the recommended format [1] of: <PROJECT>_<PATH>_<FILE>_H_ [1] https://google.github.io/styleguide/cppguide.html#The__define_Guard "All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be <PROJECT>_<PATH>_<FILE>_H_." Change-Id: I2e8ab0b32fb23c30fa43cff5fec12d043c0d2037
2016-11-22avoid redefining WIN32_LEAN_AND_MEANJames Zern
fixes redef errors when the macro is supplied elsewhere, e.g., the command line Change-Id: Ic15726817a43e30595d50562ef1f077060c193cf
2016-08-05test: apply clang-tidy google-readability-braces-around-statementsclang-format
applied against a x86_64 configure with and without --enable-vp9-highbitdepth clang-tidy-3.7.1 \ -checks='-*,google-readability-braces-around-statements' \ -header-filter='.*' -fix + clang-format afterward Change-Id: Ia2993ec64cf1eb3505d3bfb39068d9e44cfbce8d
2016-07-27test: apply clang-formatclang-format
Change-Id: I0d9ab85855eb723f653a7bb09b3d0d31dd6cfd2f
2015-10-06test/reg...check,video_source.h: avoid NOMINMAX redefJames Zern
some mingw32 configs define this. force this to be on to ensure the build succeeds Change-Id: I2cc490782b6a0736aa617e6a1457fc2bc984adbb
2015-09-29test/*.h: (windows) fix min/max conflictJames Zern
define NOMINMAX to allow the std:: versions to be used; min/max will be defined transitively via windows.h otherwise Change-Id: I692b03fa3e70b7a53962d3fd209498f70f712fed
2015-09-02test/*.h: use inline rather than INLINEJames Zern
inline is always available in c++ Change-Id: Ie8e4fc4df75309b649d7ef36bb5aadd95554035f
2015-09-01Add INLINE decoration to static test functionsJohann
Fixes "unused function" warnings. Change-Id: Idc0cd06189917c37dead17d923ac7f9ecef18983
2015-01-29Allow larger encoder configurations.Alex Converse
Allow changing colorspace in the encoder and increasing frame size. Change-Id: I8e7c3b891af29ce420a15beb4f6f9c250245b2bb
2014-12-30Properly set size based on actual buffer layoutYaowu Xu
VP9FrameSizeTestsLarge.OneByOneVideo has been causing a failure in jenkins libvpx__unit_tests-valgrind_long for "using of uninitialized memory", the root cause was that the input image for this test was not initialized with proper size, therefore plan U and V were not initialized at all. This commit fixes the size initialization, and resolves the issue. Change-Id: Ic4dd1542b7bb0cb260a1e0aeeb505db21ae5edc8
2014-08-15Removes fileno check to prevent valgrind errorDeb Mukherjee
Explicitly makes the fileptr null when close source is called on a temporary file. This avoids a valgrind error. Change-Id: I9c364290eeb6842fde946dd9bf817814c7178aaa
2014-08-12Rework y4mwrite test to pass google3 testsDeb Mukherjee
Reverts to using tmpfile() for non-Windows platforms. On google3 the test directory does not have write permissions, and hence the Y4mWriteTest fails. This patch fixes the issue. On Windows, a temporary file is created in the temp directory that has write permissions. The tests pass on linux, mingw, and MS visual studio. Change-Id: Ibada1d80e25d8b8e5b6a9d3d597533674bd9024c
2014-07-18Use custom mkstemp() to fix Win issue in y4m_testDeb Mukherjee
Uses mkstmp() with directory being the same as the test data directory to create temporary output file. For Windows GetTempFileNameA() function is used. Change-Id: Ie4681b2b4f44f8c22d3b3faf134c44087b484f94
2014-07-18Fix FrameSizeTestsLarge unit-test on 32-bit arch.Deb Mukherjee
If the img allocation fails the test used to crash before on 32 bit architecture. This patch uses null check on img in FillFrame. Also, if the first frame initialization has not been conducted VPX_CODEC_ERROR is expected to return rather than VPX_CODEC_OK. Change-Id: I5c4e59c156374009012d280d6ff971a89b43c11f
2014-07-17allow config options to limit max size of decodeJim Bankoski
This is a practical concern to allow us to fail in a decoder instance if the size of a file is bigger than we can reasonably handle. Change-Id: I0446b5502b1f8a48408107648ff2a8d187dca393
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-02-19video_source.h: Minor clean up.Tom Finegan
- Use size_t for frame_size() (fixes warnings elsewhere) - Remove unnecessary use of const. Change-Id: Id2cba182ac3fd2f67d25fd1db3a0bc3e1eda040b
2013-11-06Allow test data path to be set by preprocessor symbolJoshua Litt
Change-Id: I19c482c7cba34db574b3f33178ba20aede49779e
2013-05-08Change test image format to VPX_IMG_FMT_I420John Koleszar
Code was previously using VPX_IMG_FMT_VPXI420, which was intended to be the "vpx" non-YUV colorspace variant. Change-Id: Icf8771eeefeb574055ed638a93450c3d0ed5b9f5
2012-10-26Minor tweaks to video source frameworksJim Bankoski
Fix the video source to close if file is open already and add a limit. Change-Id: I36ada4c609d027b6eaa9b447fe9ad4115532edc1
2012-10-22Add unit test for decoder test_vector_testYunqing Wang
Got 61 test vectors from vp8-test-vectors.git (http://git.chromium.org/gitweb/?p=webm/vp8-test-vectors.git) Added decoder test vectors downloading in unit tests. Uploaded the test vectors and their md5 files to WebM website. $ gsutil cp *.* gs://downloads.webmproject.org/test_data/libvpx Added their sha1sum to the test/test-data.sha1 file. In unit tests, download the test vectors to LIBVPX_TEST_DATA_PATH. Test_vector_test goes through the test vectors, decodes them, and compute the md5 checksums. The checksums are compared with the expected md5 checksums to tell if the decoder decodes correctly. Change-Id: Ia1e84f9347ddf1d4a02e056c0fee7d28dccfae15
2012-07-23Allow specifying the seedJohann
Change-Id: Ie933998b08cd2b3f0e379b8fa7d394c95bd08cac
2012-07-23Make random streams consistantJohann
Reset the seed so the second pass stream matches the first Change-Id: Id0c0f73abb835b5ca92d76b14e0b02f6239a6ee3
2012-05-24Add external resize testsJohn Koleszar
Adds a test that ensures the application is able to trigger frame size changes via vpx_codec_enc_config_set() Change-Id: I231c062e533d75c8d63c5f8a5544650117429a63
2012-05-22Add initial keyframe testsJohn Koleszar
Implements a couple simple tests of the encoder API using the gtest framework: TestDisableKeyframes TestForceKeyframe TestKeyframeMaxDistance Change-Id: I38e93fe242fbeb30bb11b23ac12de8ddc291a28d