summaryrefslogtreecommitdiff
path: root/test/encode_test_driver.cc
AgeCommit message (Collapse)Author
2018-11-27Replace deprecated scoped_ptr with unique_ptrJingning Han
Change-Id: I2793a1b65164946eb7d67d80ccba9e798db3d9af
2018-06-26vp9 svc: Add tests for sync on 2nd & 3rd spatial layers.Jerome Jiang
Change-Id: I4d8b6d114d9a407f5bb879ab059a66425976f1df
2018-06-21Add capibility to configure decoder in encode tests.Jerome Jiang
This will allow us to test SVC features like Decode up to certain layers. Change-Id: Icfb6f9d107108054cd0917197552e09ae48cbc52
2018-05-11vp9-svc: Fix when whole superframe is dropped.Marco Paniconi
When the whole superframe is dropped (due to rate control), don't increment the temporal layer counter. This is a temporary fix to prevent an issue where temporal prediction pattern is possibly broken. Updated svc_datarate tests to handle this case. Change-Id: Icac44fdc9d0f08a957776c937584db4b2c7927c7
2018-03-15vp9-svc: Frame dropper for SVC.Marco Paniconi
If a given spatial layer decides to drop, due to the buffer/overshoot conditions for that layer, then drop that current spatial layer and all spatial layers above. In the current implementation the svc frame counter (and hence the pattern for the non-flexible SVC case) are updated on frame drops. Also add last spatial layer encoded to the pkt. This is useful for RTC applications that enable frame dropping for SVC. Update to the SVC datarate tests: enabled frame dropper on all SVC datarate tests, and made a fix to properly set the temporal_layer_id, which works now even on frame drops. Change-Id: If828c193f3cb6b1839803fd52fe9fbbda5b5a039
2017-12-19vp9-svc: Add layer bitrate targeting to SVC datarate tests.Marco
Modify and update the SVC datarate unittests to verify the rate targeting for each spatial-temporal layer. The current tests were only verifying the rate targeting of the full SVC stream, not individual layers. Also re-enabled a test that was disabled. This is a stronger verification of the layered rate control for SVC for 1 pass CBR encoding. Added PostEncodeFrameHook, needed to get the layer_id and update the layer buffer level. Change-Id: I9fd54ad474686b20a6de3250d587e2cec194a56f
2017-01-20Add the multi-threaded first pass encoder unit testYunqing Wang
Added the multi-threaded first pass encoder unit test in VP9. The test is to check if the new multi-threaded first pass encoder(namely, new-mt = 1) still generates matching stats. In the unit test, the new-mt mode will be turned on once the multi-threaded first pass implementation is checked in. Change-Id: Ic21bb1a55c454f024cfd2b397a4c148cfe638218
2016-08-08Merge changes from topic 'clang-tidy'James Zern
* changes: *_perf_test.cc: correct DoDecode signature test: apply clang-tidy google-readability-braces-around-statements
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-08-04test/decode_test_driver: rm unused deadline memberJames Zern
has the side-effect of removing some lint and -Wshorten-64-to-32 warnings Change-Id: Ib7cb87fa65cd65534096921f243d15288e97256d
2016-07-27test: apply clang-formatclang-format
Change-Id: I0d9ab85855eb723f653a7bb09b3d0d31dd6cfd2f
2016-07-21Make test encoder test driver less likely to leak on failure.Alex Converse
Individual tests still need to be updated. Change-Id: Ic433d0f742e13560b136f136b72b2a9973970d78
2016-06-17remove vp10James Zern
development has moved to the nextgenv2 branch and a snapshot from here was used to seed aomedia BUG=b/29457125 Change-Id: Iedaca11ec7870fb3a4e50b2c9ea0c2b056a0d3c0
2015-08-27encode_test_driver: test for failure prior to encodeJames Zern
limits the amount of failure messages should e.g., a test file fail to be opened Change-Id: I0b30da0faa78cada23a226b577b3a48c74a896cd
2015-08-22Turn on codec behavior unit tests for vp10Jingning Han
This commit adds codec behavior unit tests for vp10. Change-Id: Ieb49cb66f0b29679ff2a3e2c0804d1ebbf48f986
2015-07-29Cosmetics - Fix header file order in unit testsJingning Han
Change-Id: I9582a8d74990125b71e8fe620f7f3f2585a30798
2015-04-16Fix multithread encode testFrank Galligan
The multithread encode test was never actually setting more than one thread. Change-Id: Ie7a3b7b138e88344c943bffd544cf2b4aab866a9
2015-03-17Add protection for codec interface name change.Frank Galligan
Change-Id: I9101cb1132aa580fc32fd47e8ac9d91d5b09e963
2015-03-13Set default encode test driver to 1 column and 1 thread.Frank Galligan
Change-Id: I70ee538609cefad76b8ce9b225bbf8d8447aff23
2015-01-13Enable decoder to pass through color space infoYaowu Xu
This commit added a field to vpx_image_t for indicating color space, the field is also added to YUV_BUFFER_CONFIG. This allows the color space information pass through the decoder from input stream to the output buffer. The commit also updated compare_img() function with added verification of matching color space to ensure the color space information to be correctly passed from encode to decoder in compressed vp9 streams. Change-Id: I412776ec83defd8a09d76759aeb057b8fa690371
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-12-17Improve the libvpx encoder test driverYunqing Wang
The encoder initialization is called in EncodeFrame(). Therefore, in the unit tests, the set control is done when video->frame() is 1. This didn't cause problem since current tests mainly test lag_frame > 0 case, or no encoding option that needs to allocate memory before 1st frame is used. If use lag_frame = 0 and encoding multiple tiles, the unit tests crash. The issue is fixed by doing the initialization before encoding frames. Change-Id: I43102048f88448bcf27e9c60e0ec06c176b02e5c
2014-12-12Fix a bug that break the vp8 fragment decoder.hkuang
(issue #882). Change-Id: I2ca7f96d390c4eaec0473c50cb01b903d0bd3ee6
2014-12-07Make the decoder Cfg available to encoder tests..Jim Bankoski
Adds decoder config as a changeable parameter to unit tests, and changes end to end test to use commonly used parameters to enable base test of tiles encoding and frame parallel decoding. Change-Id: I5d23a6857303b4d68b92b15c3f2f04a1bcb4c2bb
2014-08-22Merge "tests: use vpx_codec_dec_cfg_t() to initialize vars"James Zern
2014-08-22tests: use vpx_codec_dec_cfg_t() to initialize varsJames Zern
0-initializes [1] and removes a warning for missing initializer fields [1] http://en.cppreference.com/w/cpp/language/value_initialization Change-Id: I364248010c8fa663c71d8f06a9999c730e92db4c
2014-08-22encode_test_driver.cc: remove unused param warningsJames Zern
Change-Id: I1d43acef0983d10bda9fa495d6d723a4f9e2deaf
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-10tests: add API_REGISTER_STATE_CHECKJames Zern
used to wrap API functions to ensure full environment consistency as opposed to the renamed ASM_REGISTER_STATE_CHECK which is used with assembly functions. currently checks the FPU tag word in x86/x86_64 gcc builds to ensure emms has been called. Change-Id: Ie241772dbf903d33d516a1add4c8c6783f2e1490
2013-09-06cleanup cpplint warningsYaowu Xu
Suggested by James Zern to clear out cpplint warnings for all unit test code. Change-Id: I731a3fa4d2a257eb9ef733426ba84286fbd7ea34
2013-08-21Make "good" quality 2-pass vpxenc encoding defaultDeb Mukherjee
Currently, the best quality mode in VP9 is not very well developed, and unnecessarily makes the encode too slow. Hence the command line default is changed to "good" quality. Also, the number of passes default is changed to 2 passes as well, since 1-pass encoding is not very efficient in VP9. Besides, a number of VP9 defaults are set to the currently recommended settings. With these changes, vpxenc run with --codec=vp9 --kf-max-dist=9999 --cpu-used=0 should work about the same as our borg results. Note when the --cpu-used=0 option is dropped there will be a slight difference in the output, because of a difference in the cpu-used value for the first pass. Specifically, the default when unspecified is to use cpu_used=1 for the first pass and cpu_used=0 for the second pass. But when specified, both passes will use the cpu-used value specified. Note that this also changes the default for VP8 as being "good" but other options stay unchanged. Change-Id: Ib23c1a05ae2f36ee076c0e34403efbda518c5066
2013-03-27Merge branch 'master' into experimentalJohn Koleszar
Pick up VP8 encryption, quantization changes, and some fixes to vpxenc Conflicts: test/decode_test_driver.cc test/decode_test_driver.h test/encode_test_driver.cc vp8/vp8cx.mk vpxdec.c vpxenc.c Change-Id: I9fbcc64808ead47e22f1f22501965cc7f0c4791c
2013-03-15Basic encryption feature for libvpx.Dmitry Kovalev
New decoder control paramter VP8_SET_DECRYPT_KEY to set the decryption key. Change-Id: I6fc1f44d41f74f3b3f702778af1a6f8f5cc9439f
2013-03-05Add 'superframe' indexJohn Koleszar
A 'superframe' is a group of frames that share the same PTS, but have a defined decoding order. This commit adds the ability to append an index to such a group of frames, allowing for random access to the constituent frames. This could be useful for frame-level parallelism or partial decoding in a multilayer scenario. Decoding the stream serially without such an index should work as a fallback, and VP9/TestSuperframeIndexIsOptional verifies that. Change-Id: Idff83b7560e1a7077d8fb067bfbc45b567e78b1c
2013-03-01Initialize pass variable in tile test.Ronald S. Bultje
Change-Id: I7977694223521404fc69f29ae2cff03e36e87299
2013-02-08Adds a test for the VP8E_SET_SCALEMODE controlJohn Koleszar
Tests that the external interface to set the internal codec scaling works as expected. Also updates the test to pull the height from the decoded frame size rather than parsing the keyframe header, in anticipation of allowing resolution changes on non-keyframes. Change-Id: I3ed92117d8e5288fbbd1e7b618f2f233d0fe2c17
2013-01-23Adds an error-resilient mode with testDeb Mukherjee
Adds an error-resilient mode where frames can be continued to be decoded even when there are errors (due to network losses) on a prior frame. Specifically, backward updates are turned off and probabilities of various symbols are reset to defaults at the beginning of each frame. Further, the last frame's mvs are not used for the mv reference list, and the sorting of the initial list based on search on previous frames is turned off as well. Also adds a test where an arbitrary set of frames are skipped from decoding to simulate errors. The test verifies (1) that if the error frames are droppable - i.e. frame buffer updates have been turned off - there are no mismatch errors for the remaining frames after the error frames; and (2) if the error-frames are non droppable, there are not only no decoding errors but the mismatch PSNR between the decoder's version of the post-error frames and the encoder's version is at least 20 dB. Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
2013-01-23Support multiple codecs in test infrastructureJohn Koleszar
This commit starts to convert the tests to a system where the codec to be used is provided by a factory object. Currently no tests are instantiated for VP9 since they all fail for various reasons, but it was verified that they're called and the correct codec is instantiated. Change-Id: Ia7506df2ca3a7651218ba3ca560634f08c9fbdeb
2012-11-27tests: add xmm register check for win64 targetsJames Zern
Change-Id: I69d00bfd1b10c03581838b15cd9a6dd66f4fa416
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-10-03Added handler for PSNR packets to EncoderTest classAdrian Grange
Added a virtual function to handle PSNR packets. Change-Id: Id2a6372c691a14f19bbeed217a93a9df03e81e75
2012-10-03Add initialization and per frame flag membersAdrian Grange
Modified EncoderTest class to have separate member variables for initialization time and per-frame. Change-Id: I08a1901f8f3ec16e45f96297e08e7f6df0f4aa0b
2012-10-03Added Reset method to TwopassStatsStoreAdrian Grange
The stats buffer needs to be reset between runs of the encoder. I added a Reset() function to TwopassStatsStore and called it at the beginning of each encode. This enables us to run multiple encodes which was previously not possible since there was no way to reset the stats between runs. Change-Id: Iebb18dab83ba9331f009f764cc858609738a27f9
2012-08-31added encode/decode matching validation to testsYaowu Xu
This commit adds the ability of validating matched encoder and decoder to unit tests. Change-Id: Ie00d69a42477b6a69b324a6bd134939684f7300b
2012-08-08EncoderTest: check that timestamps are monotonicJames Zern
Change-Id: I813fa94c83df6282f382b24bbaccb1fe2fa94276
2012-07-10keyframe_test: use a fixed speed step for realtimeJohn Koleszar
The lower complexity modes may not generate a keyframe automatically. This behavior was found when running under Valgrind, as the slow performance caused the speed selection to pick lower complexities than when running natively. Instead, use a fixed complexity for the realtime auto keyframe test. Affected tests: AllModes/KeyframeTest.TestAutoKeyframe/0 Change-Id: I44e3f44e125ad587c293ab5ece29511d7023be9b
2012-06-23add auto keyframe unit testJim Bankoski
To do so we add a framework for encoding a yv12 file.. Change-Id: I94a061eb916beaf6cde920cf1aaadb6eed10a717
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