diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/borders_test.cc | 2 | ||||
-rw-r--r-- | test/codec_factory.h | 2 | ||||
-rw-r--r-- | test/datarate_test.cc | 6 | ||||
-rw-r--r-- | test/decode_test_driver.cc | 1 | ||||
-rw-r--r-- | test/decode_test_driver.h | 14 | ||||
-rw-r--r-- | test/error_resilience_test.cc | 16 | ||||
-rw-r--r-- | test/external_frame_buffer_test.cc | 309 | ||||
-rw-r--r-- | test/lru_frame_buffer_test.cc | 207 | ||||
-rw-r--r-- | test/sixtap_predict_test.cc | 16 | ||||
-rw-r--r-- | test/test-data.sha1 | 2 | ||||
-rw-r--r-- | test/test.mk | 4 | ||||
-rw-r--r-- | test/test_vector_test.cc | 174 | ||||
-rw-r--r-- | test/test_vectors.cc | 167 | ||||
-rw-r--r-- | test/test_vectors.h | 35 | ||||
-rw-r--r-- | test/tile_independence_test.cc | 14 | ||||
-rw-r--r-- | test/vp8_fdct4x4_test.cc | 19 | ||||
-rw-r--r-- | test/vp9_lossless_test.cc | 16 | ||||
-rw-r--r-- | test/webm_video_source.h | 10 |
18 files changed, 805 insertions, 209 deletions
diff --git a/test/borders_test.cc b/test/borders_test.cc index dcdedcfab..5071541ab 100644 --- a/test/borders_test.cc +++ b/test/borders_test.cc @@ -67,7 +67,7 @@ TEST_P(BordersTest, TestLowBitrate) { cfg_.g_lag_in_frames = 25; cfg_.rc_2pass_vbr_minsection_pct = 5; - cfg_.rc_2pass_vbr_minsection_pct = 2000; + cfg_.rc_2pass_vbr_maxsection_pct = 2000; cfg_.rc_target_bitrate = 200; cfg_.rc_min_quantizer = 40; diff --git a/test/codec_factory.h b/test/codec_factory.h index cc7b53f06..2ca6ff086 100644 --- a/test/codec_factory.h +++ b/test/codec_factory.h @@ -26,6 +26,8 @@ extern "C" { #include "test/encode_test_driver.h" namespace libvpx_test { +const int kCodecFactoryParam = 0; + class CodecFactory { public: CodecFactory() {} diff --git a/test/datarate_test.cc b/test/datarate_test.cc index 5785a0aac..2d4652271 100644 --- a/test/datarate_test.cc +++ b/test/datarate_test.cc @@ -248,9 +248,11 @@ TEST_P(DatarateTestVP9, BasicRateTargeting) { cfg_.rc_target_bitrate = i; ResetModel(); ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); - ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.9) + ASSERT_GE(static_cast<double>(cfg_.rc_target_bitrate), + effective_datarate_ * 0.85) << " The datarate for the file exceeds the target by too much!"; - ASSERT_LE(cfg_.rc_target_bitrate, effective_datarate_ * 1.1) + ASSERT_LE(static_cast<double>(cfg_.rc_target_bitrate), + effective_datarate_ * 1.15) << " The datarate for the file missed the target!"; } } diff --git a/test/decode_test_driver.cc b/test/decode_test_driver.cc index 1f6d54064..7a93e50c2 100644 --- a/test/decode_test_driver.cc +++ b/test/decode_test_driver.cc @@ -30,6 +30,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video) { // Decode frames. for (video->Begin(); video->cxdata(); video->Next()) { + PreDecodeFrameHook(*video, decoder); vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(), video->frame_size()); ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h index 055c45e06..79db6e1bc 100644 --- a/test/decode_test_driver.h +++ b/test/decode_test_driver.h @@ -76,6 +76,16 @@ class Decoder { return detail ? detail : vpx_codec_error(&decoder_); } + // Passes the external frame buffer information to libvpx. + vpx_codec_err_t SetExternalFrameBuffers( + vpx_codec_frame_buffer_t *fb_list, int fb_count, + vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv) { + InitOnce(); + return vpx_codec_set_frame_buffers(&decoder_, + fb_list, fb_count, + cb, user_priv); + } + protected: virtual const vpx_codec_iface_t* CodecInterface() const = 0; @@ -101,6 +111,10 @@ class DecoderTest { // Main decoding loop virtual void RunLoop(CompressedVideoSource *video); + // Hook to be called before decompressing every frame. + virtual void PreDecodeFrameHook(const CompressedVideoSource& video, + Decoder *decoder) {} + // Hook to be called on every decompressed frame. virtual void DecompressedFrameHook(const vpx_image_t& img, const unsigned int frame_number) {} diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index 16d250c76..30c20e91f 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc @@ -1,12 +1,12 @@ /* - Copyright (c) 2012 The WebM project authors. All Rights Reserved. - - Use of this source code is governed by a BSD-style license - that can be found in the LICENSE file in the root of the source - tree. An additional intellectual property rights grant can be found - in the file PATENTS. All contributing project authors may - be found in the AUTHORS file in the root of the source tree. -*/ + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" diff --git a/test/external_frame_buffer_test.cc b/test/external_frame_buffer_test.cc new file mode 100644 index 000000000..874d1997c --- /dev/null +++ b/test/external_frame_buffer_test.cc @@ -0,0 +1,309 @@ +/* + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include <string> + +#include "test/codec_factory.h" +#include "test/decode_test_driver.h" +#include "test/ivf_video_source.h" +#include "test/md5_helper.h" +#include "test/test_vectors.h" +#include "test/util.h" +#include "test/webm_video_source.h" + +namespace { + +const int kVideoNameParam = 1; +const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm"; + +// Callback used by libvpx to request the application to allocate a frame +// buffer of at least |new_size| in bytes. +int realloc_vp9_frame_buffer(void *user_priv, size_t new_size, + vpx_codec_frame_buffer_t *fb) { + (void)user_priv; + if (fb == NULL) + return -1; + + delete [] fb->data; + fb->data = new uint8_t[new_size]; + fb->size = new_size; + return 0; +} + +// Callback will not allocate data for frame buffer. +int zero_realloc_vp9_frame_buffer(void *user_priv, size_t new_size, + vpx_codec_frame_buffer_t *fb) { + (void)user_priv; + if (fb == NULL) + return -1; + + delete [] fb->data; + fb->data = NULL; + fb->size = new_size; + return 0; +} + +// Callback will allocate one less byte. +int one_less_byte_realloc_vp9_frame_buffer(void *user_priv, size_t new_size, + vpx_codec_frame_buffer_t *fb) { + (void)user_priv; + if (fb == NULL) + return -1; + + delete [] fb->data; + + const size_t error_size = new_size - 1; + fb->data = new uint8_t[error_size]; + fb->size = error_size; + return 0; +} + +// Class for testing passing in external frame buffers to libvpx. +class ExternalFrameBufferMD5Test + : public ::libvpx_test::DecoderTest, + public ::libvpx_test::CodecTestWithParam<const char*> { + protected: + ExternalFrameBufferMD5Test() + : DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)), + md5_file_(NULL), + num_buffers_(0), + frame_buffers_(NULL) {} + + virtual ~ExternalFrameBufferMD5Test() { + for (int i = 0; i < num_buffers_; ++i) { + delete [] frame_buffers_[i].data; + } + delete [] frame_buffers_; + + if (md5_file_ != NULL) + fclose(md5_file_); + } + + virtual void PreDecodeFrameHook( + const libvpx_test::CompressedVideoSource &video, + libvpx_test::Decoder *decoder) { + if (num_buffers_ > 0 && video.frame_number() == 0) { + // Have libvpx use frame buffers we create. + frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_]; + memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_); + + ASSERT_EQ(VPX_CODEC_OK, + decoder->SetExternalFrameBuffers( + frame_buffers_, num_buffers_, + realloc_vp9_frame_buffer, NULL)); + } + } + + void OpenMD5File(const std::string &md5_file_name_) { + md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); + ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: " + << md5_file_name_; + } + + virtual void DecompressedFrameHook(const vpx_image_t &img, + const unsigned int frame_number) { + ASSERT_TRUE(md5_file_ != NULL); + char expected_md5[33]; + char junk[128]; + + // Read correct md5 checksums. + const int res = fscanf(md5_file_, "%s %s", expected_md5, junk); + ASSERT_NE(EOF, res) << "Read md5 data failed"; + expected_md5[32] = '\0'; + + ::libvpx_test::MD5 md5_res; + md5_res.Add(&img); + const char *const actual_md5 = md5_res.Get(); + + // Check md5 match. + ASSERT_STREQ(expected_md5, actual_md5) + << "Md5 checksums don't match: frame number = " << frame_number; + } + + void set_num_buffers(int num_buffers) { num_buffers_ = num_buffers; } + int num_buffers() const { return num_buffers_; } + + private: + FILE *md5_file_; + int num_buffers_; + vpx_codec_frame_buffer_t *frame_buffers_; +}; + +class ExternalFrameBufferTest : public ::testing::Test { + protected: + ExternalFrameBufferTest() + : video_(NULL), + decoder_(NULL), + num_buffers_(0), + frame_buffers_(NULL) {} + + virtual void SetUp() { + video_ = new libvpx_test::WebMVideoSource(kVP9TestFile); + video_->Init(); + video_->Begin(); + + vpx_codec_dec_cfg_t cfg = {0}; + decoder_ = new libvpx_test::VP9Decoder(cfg, 0); + } + + virtual void TearDown() { + for (int i = 0; i < num_buffers_; ++i) { + delete [] frame_buffers_[i].data; + } + delete [] frame_buffers_; + delete decoder_; + delete video_; + } + + // Passes the external frame buffer information to libvpx. + vpx_codec_err_t SetExternalFrameBuffers( + int num_buffers, + vpx_realloc_frame_buffer_cb_fn_t cb) { + if (num_buffers > 0) { + num_buffers_ = num_buffers; + + // Have libvpx use frame buffers we create. + frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_]; + memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_); + } + + return decoder_->SetExternalFrameBuffers(frame_buffers_, num_buffers_, + cb, NULL); + } + + // Pass Null frame buffer list to libvpx. + vpx_codec_err_t SetNullFrameBuffers( + int num_buffers, + vpx_realloc_frame_buffer_cb_fn_t cb) { + return decoder_->SetExternalFrameBuffers(NULL, num_buffers, + cb, NULL); + } + + vpx_codec_err_t DecodeOneFrame() { + const vpx_codec_err_t res = + decoder_->DecodeFrame(video_->cxdata(), video_->frame_size()); + if (res == VPX_CODEC_OK) + video_->Next(); + return res; + } + + vpx_codec_err_t DecodeRemainingFrames() { + for (; video_->cxdata(); video_->Next()) { + const vpx_codec_err_t res = + decoder_->DecodeFrame(video_->cxdata(), video_->frame_size()); + if (res != VPX_CODEC_OK) + return res; + + libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData(); + const vpx_image_t *img = NULL; + + // Get decompressed data + while ((img = dec_iter.Next())) { + } + } + return VPX_CODEC_OK; + } + + libvpx_test::WebMVideoSource *video_; + libvpx_test::VP9Decoder *decoder_; + int num_buffers_; + vpx_codec_frame_buffer_t *frame_buffers_; +}; + + +// This test runs through the set of test vectors, and decodes them. +// Libvpx will call into the application to allocate a frame buffer when +// needed. The md5 checksums are computed for each frame in the video file. +// If md5 checksums match the correct md5 data, then the test is passed. +// Otherwise, the test failed. +TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) { + const std::string filename = GET_PARAM(kVideoNameParam); + libvpx_test::CompressedVideoSource *video = NULL; + + // Number of buffers equals number of possible reference buffers(8), plus + // one working buffer, plus four jitter buffers. + const int num_buffers = 13; + set_num_buffers(num_buffers); + + // Tell compiler we are not using kVP8TestVectors. + (void)libvpx_test::kVP8TestVectors; + + // Open compressed video file. + if (filename.substr(filename.length() - 3, 3) == "ivf") { + video = new libvpx_test::IVFVideoSource(filename); + } else if (filename.substr(filename.length() - 4, 4) == "webm") { + video = new libvpx_test::WebMVideoSource(filename); + } + video->Init(); + + // Construct md5 file name. + const std::string md5_filename = filename + ".md5"; + OpenMD5File(md5_filename); + + // Decode frame, and check the md5 matching. + ASSERT_NO_FATAL_FAILURE(RunLoop(video)); + delete video; +} + +TEST_F(ExternalFrameBufferTest, EightFrameBuffers) { + // Minimum number of reference buffers for VP9 is 8. + const int num_buffers = 8; + ASSERT_EQ(VPX_CODEC_OK, + SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer)); + ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames()); +} + +TEST_F(ExternalFrameBufferTest, EightJitterBuffers) { + // Number of buffers equals number of possible reference buffers(8), plus + // one working buffer, plus eight jitter buffers. + const int num_buffers = 17; + ASSERT_EQ(VPX_CODEC_OK, + SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer)); + ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames()); +} + +TEST_F(ExternalFrameBufferTest, NotEnoughBuffers) { + // Minimum number of reference buffers for VP9 is 8. + const int num_buffers = 7; + ASSERT_EQ(VPX_CODEC_INVALID_PARAM, + SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer)); +} + +TEST_F(ExternalFrameBufferTest, NullFrameBufferList) { + // Number of buffers equals number of possible reference buffers(8), plus + // one working buffer, plus four jitter buffers. + const int num_buffers = 13; + ASSERT_EQ(VPX_CODEC_INVALID_PARAM, + SetNullFrameBuffers(num_buffers, realloc_vp9_frame_buffer)); +} + +TEST_F(ExternalFrameBufferTest, NullRealloc) { + // Number of buffers equals number of possible reference buffers(8), plus + // one working buffer, plus four jitter buffers. + const int num_buffers = 13; + ASSERT_EQ(VPX_CODEC_OK, + SetExternalFrameBuffers(num_buffers, + zero_realloc_vp9_frame_buffer)); + ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame()); +} + +TEST_F(ExternalFrameBufferTest, ReallocOneLessByte) { + // Number of buffers equals number of possible reference buffers(8), plus + // one working buffer, plus four jitter buffers. + const int num_buffers = 13; + ASSERT_EQ(VPX_CODEC_OK, + SetExternalFrameBuffers(num_buffers, + one_less_byte_realloc_vp9_frame_buffer)); + ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame()); +} + +VP9_INSTANTIATE_TEST_CASE(ExternalFrameBufferMD5Test, + ::testing::ValuesIn(libvpx_test::kVP9TestVectors)); +} // namespace diff --git a/test/lru_frame_buffer_test.cc b/test/lru_frame_buffer_test.cc new file mode 100644 index 000000000..cd6b432d8 --- /dev/null +++ b/test/lru_frame_buffer_test.cc @@ -0,0 +1,207 @@ +/* + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include <queue> +#include <string> + +#include "test/codec_factory.h" +#include "test/decode_test_driver.h" +#include "test/ivf_video_source.h" +#include "test/md5_helper.h" +#include "test/util.h" +#include "test/webm_video_source.h" + +namespace { + +const int kVideoNameParam = 1; + +const char *kLRUTestVectors[] = { + "vp90-2-02-size-lf-1920x1080.webm", + "vp90-2-05-resize.ivf", +}; + +// Callback used by libvpx to request the application to allocate a frame +// buffer of at least |new_size| in bytes. +int realloc_vp9_frame_buffer(void *user_priv, size_t new_size, + vpx_codec_frame_buffer_t *fb) { + (void)user_priv; + if (fb == NULL) + return -1; + + delete [] fb->data; + fb->data = new uint8_t[new_size]; + fb->size = new_size; + + return 0; +} + +// Class for testing libvpx is using the least recently +// used frame buffer when a new buffer is requested. +class LRUFrameBufferTest + : public ::libvpx_test::DecoderTest, + public ::libvpx_test::CodecTestWithParam<const char*> { + protected: + struct FrameBufferMD5Sum { + int frame_buffer_index; + vpx_image_t img; + std::string md5; + }; + + LRUFrameBufferTest() + : DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)), + num_buffers_(0), + num_jitter_buffers_(0), + frame_buffers_(NULL) {} + + virtual ~LRUFrameBufferTest() { + for (int i = 0; i < num_buffers_; ++i) { + delete [] frame_buffers_[i].data; + } + delete [] frame_buffers_; + } + + virtual void PreDecodeFrameHook( + const libvpx_test::CompressedVideoSource &video, + libvpx_test::Decoder *decoder) { + // Use external buffers for testing jitter buffers. + if (num_jitter_buffers_ > 0 && video.frame_number() == 0) { + const int max_reference_buffers = 8; + + // Add 1 for a work buffer. + num_buffers_ = max_reference_buffers + 1 + num_jitter_buffers_; + + // Have libvpx use frame buffers we create. + frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_]; + memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_); + + decoder->SetExternalFrameBuffers(frame_buffers_, num_buffers_, + realloc_vp9_frame_buffer, NULL); + } + + // Turn on frame buffer LRU cache. + decoder->Control(VP9D_SET_FRAME_BUFFER_LRU_CACHE, 1); + } + + virtual void DecompressedFrameHook(const vpx_image_t &img, + const unsigned int frame_number) { + const uint32_t ximg_y_plane = 0; + const uint8_t *const y_buffer = img.planes[ximg_y_plane]; + + // Find which external buffer contains the y_buffer. + int i = 0; + for (i = 0; i < num_buffers_; ++i) { + if (y_buffer >= frame_buffers_[i].data && + y_buffer < (frame_buffers_[i].data + frame_buffers_[i].size)) { + break; + } + } + + FrameBufferMD5Sum fb_md5; + fb_md5.frame_buffer_index = i; + fb_md5.img = img; + + libvpx_test::MD5 md5; + md5.Add(&img); + fb_md5.md5 = md5.Get(); + jitter_buffer_md5_sums_.push(fb_md5); + + // Check to see if any of the reconstructed image changed. + if (jitter_buffer_md5_sums_.size() > + static_cast<size_t>(num_jitter_buffers_)) { + fb_md5 = jitter_buffer_md5_sums_.front(); + + libvpx_test::MD5 md5; + md5.Add(&fb_md5.img); + const std::string check_str = md5.Get(); + + ASSERT_EQ(fb_md5.md5, check_str); + jitter_buffer_md5_sums_.pop(); + } + } + + libvpx_test::CompressedVideoSource *OpenCompressedFile( + const std::string &filename) { + if (filename.substr(filename.length() - 3, 3) == "ivf") { + return new libvpx_test::IVFVideoSource(filename); + } else if (filename.substr(filename.length() - 4, 4) == "webm") { + return new libvpx_test::WebMVideoSource(filename); + } + return NULL; + } + + void set_num_jitter_buffers(int num_buffers) { + num_jitter_buffers_ = num_buffers; + } + + private: + // Total number of external frame buffers. + int num_buffers_; + int num_jitter_buffers_; + + // External frame buffers used by libvpx. + vpx_codec_frame_buffer_t *frame_buffers_; + + // Save the md5 checksums for later comparison. + std::queue<FrameBufferMD5Sum> jitter_buffer_md5_sums_; +}; + +// This test runs through a set of test vectors, and decodes them. +// Libvpx will call into the application to allocate a frame buffer when +// needed. The md5 checksums are computed for each frame after it is +// decoded and stored to be checked later. After a jitter frame buffer +// has expired, the md5 checksum is computed again for the expired jitter +// buffer frame and checked against the md5 checksum after the frame was +// decoded. If md5 checksums match, then the test is passed. Otherwise, +// the test failed. +TEST_P(LRUFrameBufferTest, CheckLRUOneJitterBuffer) { + const std::string filename = GET_PARAM(kVideoNameParam); + + set_num_jitter_buffers(1); + + libvpx_test::CompressedVideoSource *const video = + OpenCompressedFile(filename); + video->Init(); + + // Decode frame, and check the md5 matching. + ASSERT_NO_FATAL_FAILURE(RunLoop(video)); + delete video; +} + +TEST_P(LRUFrameBufferTest, CheckLRUFourJitterBuffers) { + const std::string filename = GET_PARAM(kVideoNameParam); + + set_num_jitter_buffers(4); + + libvpx_test::CompressedVideoSource *const video = + OpenCompressedFile(filename); + video->Init(); + + // Decode frame, and check the md5 matching. + ASSERT_NO_FATAL_FAILURE(RunLoop(video)); + delete video; +} + +TEST_P(LRUFrameBufferTest, CheckLRUEightJitterBuffers) { + const std::string filename = GET_PARAM(kVideoNameParam); + + set_num_jitter_buffers(8); + + libvpx_test::CompressedVideoSource *const video = + OpenCompressedFile(filename); + video->Init(); + + // Decode frame, and check the md5 matching. + ASSERT_NO_FATAL_FAILURE(RunLoop(video)); + delete video; +} + +VP9_INSTANTIATE_TEST_CASE(LRUFrameBufferTest, + ::testing::ValuesIn(kLRUTestVectors)); +} // namespace diff --git a/test/sixtap_predict_test.cc b/test/sixtap_predict_test.cc index 655146dbf..0f5c0a5e8 100644 --- a/test/sixtap_predict_test.cc +++ b/test/sixtap_predict_test.cc @@ -1,12 +1,12 @@ /* -* Copyright (c) 2012 The WebM project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ #include <math.h> #include <stdlib.h> diff --git a/test/test-data.sha1 b/test/test-data.sha1 index 445147986..442bfd23f 100644 --- a/test/test-data.sha1 +++ b/test/test-data.sha1 @@ -567,3 +567,5 @@ c64b03b5c090e6888cb39685c31f00a6b79fa45c vp90-2-tos_854x356_tile_1x2_656kbps.we c9b6850af28579b031791066457f4cb40df6e1c7 vp90-2-08-tile_1x8_frame_parallel.webm.md5 e448b6e83490bca0f8d58b4f4b1126a17baf4b0c vp90-2-08-tile_1x8.webm 5e524165f0397e6141d914f4f0a66267d7658376 vp90-2-08-tile_1x8.webm.md5 +a34e14923d6d17b1144254d8187d7f85b700a63c vp90-2-02-size-lf-1920x1080.webm +e3b28ddcfaeb37fb4d132b93f92642a9ad17c22d vp90-2-02-size-lf-1920x1080.webm.md5 diff --git a/test/test.mk b/test/test.mk index 98e5c7b72..361a34fa4 100644 --- a/test/test.mk +++ b/test/test.mk @@ -7,6 +7,8 @@ LIBVPX_TEST_SRCS-yes += codec_factory.h LIBVPX_TEST_SRCS-yes += test_libvpx.cc LIBVPX_TEST_SRCS-yes += util.h LIBVPX_TEST_SRCS-yes += video_source.h +LIBVPX_TEST_SRCS-yes += test_vectors.h +LIBVPX_TEST_SRCS-yes += test_vectors.cc ## ## BLACK BOX TESTS @@ -32,6 +34,8 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../md5_utils.h ../md5_utils.c LIBVPX_TEST_SRCS-yes += decode_test_driver.cc LIBVPX_TEST_SRCS-yes += decode_test_driver.h LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ivf_video_source.h +LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc +LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += lru_frame_buffer_test.cc ## WebM Parsing NESTEGG_SRCS += ../nestegg/halloc/halloc.h diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc index ee610fa90..6d93bb88f 100644 --- a/test/test_vector_test.cc +++ b/test/test_vector_test.cc @@ -1,11 +1,11 @@ /* - Copyright (c) 2012 The WebM project authors. All Rights Reserved. - - Use of this source code is governed by a BSD-style license - that can be found in the LICENSE file in the root of the source - tree. An additional intellectual property rights grant can be found - in the file PATENTS. All contributing project authors may - be found in the AUTHORS file in the root of the source tree. + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. */ #include <cstdio> @@ -15,165 +15,15 @@ #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/ivf_video_source.h" -#include "test/webm_video_source.h" -#include "test/util.h" #include "test/md5_helper.h" +#include "test/test_vectors.h" +#include "test/util.h" +#include "test/webm_video_source.h" extern "C" { #include "vpx_mem/vpx_mem.h" } namespace { -#if CONFIG_VP8_DECODER -const char *kVP8TestVectors[] = { - "vp80-00-comprehensive-001.ivf", - "vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf", - "vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf", - "vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf", - "vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf", - "vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf", - "vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf", - "vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf", - "vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf", - "vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf", - "vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf", - "vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf", - "vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf", - "vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf", - "vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf", - "vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf", - "vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf", - "vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf", - "vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf", - "vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf", - "vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf", - "vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf", - "vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf", - "vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf", - "vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf", - "vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf", - "vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf", - "vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf", - "vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf", - "vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf", - "vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf", - "vp80-06-smallsize.ivf" -}; -#endif -#if CONFIG_VP9_DECODER -const char *kVP9TestVectors[] = { - "vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm", - "vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm", - "vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm", - "vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm", - "vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm", - "vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm", - "vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm", - "vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm", - "vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm", - "vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm", - "vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm", - "vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm", - "vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm", - "vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm", - "vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm", - "vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm", - "vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm", - "vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm", - "vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm", - "vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm", - "vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm", - "vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm", - "vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm", - "vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm", - "vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm", - "vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm", - "vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm", - "vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm", - "vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm", - "vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm", - "vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm", - "vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm", - "vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm", - "vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm", - "vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm", - "vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm", - "vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm", - "vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm", - "vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm", - "vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm", - "vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm", - "vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm", - "vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm", - "vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm", - "vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm", - "vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm", - "vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm", - "vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm", - "vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm", - "vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm", - "vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm", - "vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm", - "vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm", - "vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm", - "vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm", - "vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm", - "vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm", - "vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm", - "vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm", - "vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm", - "vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm", - "vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm", - "vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm", - "vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm", - "vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm", - "vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm", - "vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm", - "vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm", - "vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm", - "vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm", - "vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm", - "vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm", - "vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm", - "vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm", - "vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm", - "vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm", - "vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm", - "vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm", - "vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm", - "vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm", - "vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm", - "vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm", - "vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm", - "vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm", - "vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm", - "vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm", - "vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm", - "vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm", - "vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm", - "vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm", - "vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm", - "vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm", - "vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm", - "vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm", - "vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm", - "vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm", - "vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm", - "vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm", - "vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm", - "vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm", - "vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm", - "vp90-2-07-frame_parallel.webm", - "vp90-2-08-tile_1x2_frame_parallel.webm", "vp90-2-08-tile_1x2.webm", - "vp90-2-08-tile_1x4_frame_parallel.webm", "vp90-2-08-tile_1x4.webm", - "vp90-2-08-tile_1x8_frame_parallel.webm", "vp90-2-08-tile_1x8.webm", - "vp90-2-08-tile-4x4.webm", "vp90-2-08-tile-4x1.webm", - "vp90-2-09-subpixel-00.ivf", - "vp90-2-02-size-lf-1920x1080.webm", -#if CONFIG_NON420 - "vp91-2-04-yv444.webm" -#endif -}; -#endif class TestVectorTest : public ::libvpx_test::DecoderTest, public ::libvpx_test::CodecTestWithParam<const char*> { @@ -241,8 +91,8 @@ TEST_P(TestVectorTest, MD5Match) { } VP8_INSTANTIATE_TEST_CASE(TestVectorTest, - ::testing::ValuesIn(kVP8TestVectors)); + ::testing::ValuesIn(libvpx_test::kVP8TestVectors)); VP9_INSTANTIATE_TEST_CASE(TestVectorTest, - ::testing::ValuesIn(kVP9TestVectors)); + ::testing::ValuesIn(libvpx_test::kVP9TestVectors)); } // namespace diff --git a/test/test_vectors.cc b/test/test_vectors.cc new file mode 100644 index 000000000..7ffecf087 --- /dev/null +++ b/test/test_vectors.cc @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include "test/test_vectors.h" + +namespace libvpx_test { + +#if CONFIG_VP8_DECODER +const char *kVP8TestVectors[kNumVp8TestVectors] = { + "vp80-00-comprehensive-001.ivf", + "vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf", + "vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf", + "vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf", + "vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf", + "vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf", + "vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf", + "vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf", + "vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf", + "vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf", + "vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf", + "vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf", + "vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf", + "vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf", + "vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf", + "vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf", + "vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf", + "vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf", + "vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf", + "vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf", + "vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf", + "vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf", + "vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf", + "vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf", + "vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf", + "vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf", + "vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf", + "vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf", + "vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf", + "vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf", + "vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf", + "vp80-06-smallsize.ivf" +}; +#endif // CONFIG_VP8_DECODER +#if CONFIG_VP9_DECODER +const char *kVP9TestVectors[kNumVp9TestVectors] = { + "vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm", + "vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm", + "vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm", + "vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm", + "vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm", + "vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm", + "vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm", + "vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm", + "vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm", + "vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm", + "vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm", + "vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm", + "vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm", + "vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm", + "vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm", + "vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm", + "vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm", + "vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm", + "vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm", + "vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm", + "vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm", + "vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm", + "vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm", + "vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm", + "vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm", + "vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm", + "vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm", + "vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm", + "vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm", + "vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm", + "vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm", + "vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm", + "vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm", + "vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm", + "vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm", + "vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm", + "vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm", + "vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm", + "vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm", + "vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm", + "vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm", + "vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm", + "vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm", + "vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm", + "vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm", + "vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm", + "vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm", + "vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm", + "vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm", + "vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm", + "vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm", + "vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm", + "vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm", + "vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm", + "vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm", + "vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm", + "vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm", + "vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm", + "vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm", + "vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm", + "vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm", + "vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm", + "vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm", + "vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm", + "vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm", + "vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm", + "vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm", + "vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm", + "vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm", + "vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm", + "vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm", + "vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm", + "vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm", + "vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm", + "vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm", + "vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm", + "vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm", + "vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm", + "vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm", + "vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm", + "vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm", + "vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm", + "vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm", + "vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm", + "vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm", + "vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm", + "vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm", + "vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm", + "vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm", + "vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm", + "vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm", + "vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm", + "vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm", + "vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm", + "vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm", + "vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm", + "vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm", + "vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm", + "vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm", + "vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm", + "vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm", + "vp90-2-07-frame_parallel.webm", + "vp90-2-08-tile_1x2_frame_parallel.webm", "vp90-2-08-tile_1x2.webm", + "vp90-2-08-tile_1x4_frame_parallel.webm", "vp90-2-08-tile_1x4.webm", + "vp90-2-08-tile_1x8_frame_parallel.webm", "vp90-2-08-tile_1x8.webm", + "vp90-2-08-tile-4x4.webm", "vp90-2-08-tile-4x1.webm", + "vp90-2-09-subpixel-00.ivf", + "vp90-2-02-size-lf-1920x1080.webm", +#if CONFIG_NON420 + "vp91-2-04-yv444.webm" +#endif +}; +#endif // CONFIG_VP9_DECODER + +} // namespace libvpx_test diff --git a/test/test_vectors.h b/test/test_vectors.h new file mode 100644 index 000000000..942175aa2 --- /dev/null +++ b/test/test_vectors.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef TEST_TEST_VECTORS_H_ +#define TEST_TEST_VECTORS_H_ + +#include "./vpx_config.h" + +namespace libvpx_test { + +#if CONFIG_VP8_DECODER +const int kNumVp8TestVectors = 62; +extern const char *kVP8TestVectors[kNumVp8TestVectors]; +#endif + +#if CONFIG_VP9_DECODER +#if CONFIG_NON420 +const int kNumVp9TestVectors = 214; +#else +const int kNumVp9TestVectors = 213; +#endif + +extern const char *kVP9TestVectors[kNumVp9TestVectors]; +#endif // CONFIG_VP9_DECODER + +} // namespace libvpx_test + +#endif // TEST_TEST_VECTORS_H_ diff --git a/test/tile_independence_test.cc b/test/tile_independence_test.cc index 403dbb6c0..863a3669a 100644 --- a/test/tile_independence_test.cc +++ b/test/tile_independence_test.cc @@ -1,11 +1,11 @@ /* - Copyright (c) 2012 The WebM project authors. All Rights Reserved. - - Use of this source code is governed by a BSD-style license - that can be found in the LICENSE file in the root of the source - tree. An additional intellectual property rights grant can be found - in the file PATENTS. All contributing project authors may - be found in the AUTHORS file in the root of the source tree. + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. */ #include <cstdio> diff --git a/test/vp8_fdct4x4_test.cc b/test/vp8_fdct4x4_test.cc index c82343668..25465c53c 100644 --- a/test/vp8_fdct4x4_test.cc +++ b/test/vp8_fdct4x4_test.cc @@ -1,13 +1,12 @@ /* -* Copyright (c) 2012 The WebM project authors. All Rights Reserved. -* -* Use of this source code is governed by a BSD-style license -* that can be found in the LICENSE file in the root of the source -* tree. An additional intellectual property rights grant can be found -* in the file PATENTS. All contributing project authors may -* be found in the AUTHORS file in the root of the source tree. -*/ - + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ #include <math.h> #include <stddef.h> @@ -16,7 +15,6 @@ #include <string.h> #include <sys/types.h> - extern "C" { #include "./vp8_rtcd.h" } @@ -25,7 +23,6 @@ extern "C" { #include "third_party/googletest/src/include/gtest/gtest.h" #include "vpx/vpx_integer.h" - namespace { const int cospi8sqrt2minus1 = 20091; diff --git a/test/vp9_lossless_test.cc b/test/vp9_lossless_test.cc index e8c32b41c..03b89f8df 100644 --- a/test/vp9_lossless_test.cc +++ b/test/vp9_lossless_test.cc @@ -1,12 +1,12 @@ /* - Copyright (c) 2012 The WebM project authors. All Rights Reserved. - - Use of this source code is governed by a BSD-style license - that can be found in the LICENSE file in the root of the source - tree. An additional intellectual property rights grant can be found - in the file PATENTS. All contributing project authors may - be found in the AUTHORS file in the root of the source tree. -*/ + * Copyright (c) 2013 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" diff --git a/test/webm_video_source.h b/test/webm_video_source.h index 9fc854593..53b0ba2b4 100644 --- a/test/webm_video_source.h +++ b/test/webm_video_source.h @@ -90,8 +90,12 @@ class WebMVideoSource : public CompressedVideoSource { virtual ~WebMVideoSource() { if (input_file_) fclose(input_file_); - if (nestegg_ctx_) + if (nestegg_ctx_ != NULL) { + if (pkt_ != NULL) { + nestegg_free_packet(pkt_); + } nestegg_destroy(nestegg_ctx_); + } } virtual void Init() { @@ -136,8 +140,10 @@ class WebMVideoSource : public CompressedVideoSource { do { /* End of this packet, get another. */ - if (pkt_) + if (pkt_ != NULL) { nestegg_free_packet(pkt_); + pkt_ = NULL; + } int again = nestegg_read_packet(nestegg_ctx_, &pkt_); ASSERT_GE(again, 0) << "nestegg_read_packet failed"; |