summaryrefslogtreecommitdiff
path: root/test/vp9_lossless_test.cc
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2014-01-17 13:52:23 -0800
committerAlex Converse <aconverse@google.com>2014-01-22 11:26:04 -0800
commitf5949fab9dc2f18b948ef41183c255d44cde8f0f (patch)
tree828a30c1443413afee2ee47852fb068886af0661 /test/vp9_lossless_test.cc
parent73b7405a9063e09e76ac17645592e0b7a8292a1e (diff)
downloadlibvpx-f5949fab9dc2f18b948ef41183c255d44cde8f0f.tar
libvpx-f5949fab9dc2f18b948ef41183c255d44cde8f0f.tar.gz
libvpx-f5949fab9dc2f18b948ef41183c255d44cde8f0f.tar.bz2
libvpx-f5949fab9dc2f18b948ef41183c255d44cde8f0f.zip
Expand the lossless and datarate tests to cover 4:4:4.
Change-Id: I2dc7b3265d0a87d7a26c95b48e360c7c68cc7355
Diffstat (limited to 'test/vp9_lossless_test.cc')
-rw-r--r--test/vp9_lossless_test.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/vp9_lossless_test.cc b/test/vp9_lossless_test.cc
index 03b89f8df..2282687dc 100644
--- a/test/vp9_lossless_test.cc
+++ b/test/vp9_lossless_test.cc
@@ -7,12 +7,13 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-
+#include "./vpx_config.h"
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
#include "test/util.h"
+#include "test/y4m_video_source.h"
namespace {
@@ -71,5 +72,25 @@ TEST_P(LossLessTest, TestLossLessEncoding) {
const double psnr_lossless = GetMinPsnr();
EXPECT_GE(psnr_lossless, kMaxPsnr);
}
+
+#if CONFIG_NON420
+TEST_P(LossLessTest, TestLossLessEncoding444) {
+ libvpx_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 10);
+
+ cfg_.g_profile = 1;
+ cfg_.g_timebase = video.timebase();
+ cfg_.rc_target_bitrate = 2000;
+ cfg_.g_lag_in_frames = 25;
+ cfg_.rc_min_quantizer = 0;
+ cfg_.rc_max_quantizer = 0;
+
+ init_flags_ = VPX_CODEC_USE_PSNR;
+
+ ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
+ const double psnr_lossless = GetMinPsnr();
+ EXPECT_GE(psnr_lossless, kMaxPsnr);
+}
+#endif
+
VP9_INSTANTIATE_TEST_CASE(LossLessTest, ALL_TEST_MODES);
} // namespace