summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/resize_test.cc
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/test/resize_test.cc
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/test/resize_test.cc')
-rw-r--r--third_party/aom/test/resize_test.cc35
1 files changed, 21 insertions, 14 deletions
diff --git a/third_party/aom/test/resize_test.cc b/third_party/aom/test/resize_test.cc
index 802713d32..c4e924de0 100644
--- a/third_party/aom/test/resize_test.cc
+++ b/third_party/aom/test/resize_test.cc
@@ -298,10 +298,10 @@ TEST_P(ResizeTest, TestExternalResizeWorks) {
unsigned int expected_h;
ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight, &expected_w,
&expected_h, 0);
- EXPECT_EQ(expected_w, info->w) << "Frame " << frame
- << " had unexpected width";
- EXPECT_EQ(expected_h, info->h) << "Frame " << frame
- << " had unexpected height";
+ EXPECT_EQ(expected_w, info->w)
+ << "Frame " << frame << " had unexpected width";
+ EXPECT_EQ(expected_h, info->h)
+ << "Frame " << frame << " had unexpected height";
}
}
@@ -351,11 +351,11 @@ class ResizeInternalTest : public ResizeTest {
encoder->Config(&cfg_);
}
} else {
- if (video->frame() == kStepDownFrame) {
+ if (video->frame() >= kStepDownFrame && video->frame() < kStepUpFrame) {
struct aom_scaling_mode mode = { AOME_FOURFIVE, AOME_THREEFIVE };
encoder->Control(AOME_SET_SCALEMODE, &mode);
}
- if (video->frame() == kStepUpFrame) {
+ if (video->frame() >= kStepUpFrame) {
struct aom_scaling_mode mode = { AOME_NORMAL, AOME_NORMAL };
encoder->Control(AOME_SET_SCALEMODE, &mode);
}
@@ -364,7 +364,7 @@ class ResizeInternalTest : public ResizeTest {
virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) {
if (frame0_psnr_ == 0.) frame0_psnr_ = pkt->data.psnr.psnr[0];
- EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
+ EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.5);
}
#if WRITE_COMPRESSED_STREAM
@@ -406,6 +406,9 @@ TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
info != frame_info_list_.end(); ++info) {
+ }
+ for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
+ info != frame_info_list_.end(); ++info) {
const aom_codec_pts_t pts = info->pts;
if (pts >= kStepDownFrame && pts < kStepUpFrame) {
ASSERT_EQ(282U, info->w) << "Frame " << pts << " had unexpected width";
@@ -509,10 +512,10 @@ TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
unsigned int expected_h;
ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight, &expected_w,
&expected_h, 1);
- EXPECT_EQ(expected_w, info->w) << "Frame " << frame
- << " had unexpected width";
- EXPECT_EQ(expected_h, info->h) << "Frame " << frame
- << " had unexpected height";
+ EXPECT_EQ(expected_w, info->w)
+ << "Frame " << frame << " had unexpected width";
+ EXPECT_EQ(expected_h, info->h)
+ << "Frame " << frame << " had unexpected height";
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
}
}
@@ -520,7 +523,7 @@ TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
// Verify the dynamic resizer behavior for real time, 1 pass CBR mode.
// Run at low bitrate, with resize_allowed = 1, and verify that we get
// one resize down event.
-TEST_P(ResizeRealtimeTest, TestInternalResizeDown) {
+TEST_P(ResizeRealtimeTest, DISABLED_TestInternalResizeDown) {
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 299);
DefaultConfig();
@@ -558,7 +561,7 @@ TEST_P(ResizeRealtimeTest, TestInternalResizeDown) {
// Verify the dynamic resizer behavior for real time, 1 pass CBR mode.
// Start at low target bitrate, raise the bitrate in the middle of the clip,
// scaling-up should occur after bitrate changed.
-TEST_P(ResizeRealtimeTest, TestInternalResizeDownUpChangeBitRate) {
+TEST_P(ResizeRealtimeTest, DISABLED_TestInternalResizeDownUpChangeBitRate) {
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 359);
DefaultConfig();
@@ -693,7 +696,11 @@ class ResizingCspVideoSource : public ::libaom_test::DummyVideoSource {
}
};
+#if (defined(DISABLE_TRELLISQ_SEARCH) && DISABLE_TRELLISQ_SEARCH)
+TEST_P(ResizeCspTest, DISABLED_TestResizeCspWorks) {
+#else
TEST_P(ResizeCspTest, TestResizeCspWorks) {
+#endif
ResizingCspVideoSource video;
init_flags_ = AOM_CODEC_USE_PSNR;
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
@@ -704,7 +711,7 @@ TEST_P(ResizeCspTest, TestResizeCspWorks) {
AV1_INSTANTIATE_TEST_CASE(ResizeTest,
::testing::Values(::libaom_test::kRealTime));
AV1_INSTANTIATE_TEST_CASE(ResizeInternalTest,
- ::testing::Values(::libaom_test::kOnePassBest));
+ ::testing::Values(::libaom_test::kOnePassGood));
AV1_INSTANTIATE_TEST_CASE(ResizeRealtimeTest,
::testing::Values(::libaom_test::kRealTime),
::testing::Range(5, 9));