webrtc_m130/modules/video_coding/codecs/test/videocodec_test_libaom.cc
Fyodor Kyslov f8776cba62 Revert "AV1: Use Default TX type for encoding"
This reverts commit b0dc518f82b2a50c1b3e3062d3b58ee221d2e028.

Reason for revert: corresponding change  https://chromium-review.googlesource.com/c/chromium/src/+/2765225 from chromium has not been backported to webrtc yet.


Original change's description:
> AV1: Use Default TX type for encoding
>
> This will further speed up intra frame encoding
>
> Bug: None
> Change-Id: I1a105c6d2cdd9dc82f84d0039dbea3f0d090ab93
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212320
> Reviewed-by: Marco Paniconi <marpan@webrtc.org>
> Commit-Queue: Fyodor Kyslov <kyslov@google.com>
> Cr-Commit-Position: refs/heads/master@{#33492}

TBR=jianj@google.com,marpan@webrtc.org,kyslov@google.com

Change-Id: I7ff93537942ab34706db0b71c6b5f8535209619d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212340
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33494}
2021-03-17 19:16:50 +00:00

101 lines
3.4 KiB
C++

/*
* Copyright (c) 2020 The WebRTC 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 <memory>
#include <vector>
#include "api/test/create_videocodec_test_fixture.h"
#include "api/test/video/function_video_encoder_factory.h"
#include "api/video_codecs/sdp_video_format.h"
#include "media/base/media_constants.h"
#include "media/engine/internal_decoder_factory.h"
#include "media/engine/internal_encoder_factory.h"
#include "media/engine/simulcast_encoder_adapter.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
namespace webrtc {
namespace test {
namespace {
// Test clips settings.
constexpr int kCifWidth = 352;
constexpr int kCifHeight = 288;
constexpr int kNumFramesLong = 300;
VideoCodecTestFixture::Config CreateConfig(std::string filename) {
VideoCodecTestFixture::Config config;
config.filename = filename;
config.filepath = ResourcePath(config.filename, "yuv");
config.num_frames = kNumFramesLong;
config.use_single_core = true;
return config;
}
TEST(VideoCodecTestLibaom, HighBitrateAV1) {
auto config = CreateConfig("foreman_cif");
config.SetCodecSettings(cricket::kAv1CodecName, 1, 1, 1, false, true, true,
kCifWidth, kCifHeight);
config.codec_settings.SetScalabilityMode("NONE");
config.num_frames = kNumFramesLong;
auto fixture = CreateVideoCodecTestFixture(config);
std::vector<RateProfile> rate_profiles = {{500, 30, 0}};
std::vector<RateControlThresholds> rc_thresholds = {
{12, 1, 0, 1, 0.3, 0.1, 0, 1}};
std::vector<QualityThresholds> quality_thresholds = {{37, 34, 0.94, 0.915}};
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);
}
TEST(VideoCodecTestLibaom, VeryLowBitrateAV1) {
auto config = CreateConfig("foreman_cif");
config.SetCodecSettings(cricket::kAv1CodecName, 1, 1, 1, false, true, true,
kCifWidth, kCifHeight);
config.codec_settings.SetScalabilityMode("NONE");
auto fixture = CreateVideoCodecTestFixture(config);
std::vector<RateProfile> rate_profiles = {{50, 30, 0}};
std::vector<RateControlThresholds> rc_thresholds = {
{15, 8, 75, 2, 2, 2, 2, 1}};
std::vector<QualityThresholds> quality_thresholds = {{28, 25, 0.70, 0.60}};
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);
}
#if !defined(WEBRTC_ANDROID)
constexpr int kHdWidth = 1280;
constexpr int kHdHeight = 720;
TEST(VideoCodecTestLibaom, HdAV1) {
auto config = CreateConfig("ConferenceMotion_1280_720_50");
config.SetCodecSettings(cricket::kAv1CodecName, 1, 1, 1, false, true, true,
kHdWidth, kHdHeight);
config.codec_settings.SetScalabilityMode("NONE");
config.num_frames = kNumFramesLong;
auto fixture = CreateVideoCodecTestFixture(config);
std::vector<RateProfile> rate_profiles = {{1000, 50, 0}};
std::vector<RateControlThresholds> rc_thresholds = {
{13, 3, 0, 1, 0.3, 0.1, 0, 1}};
std::vector<QualityThresholds> quality_thresholds = {{36, 31.9, 0.93, 0.87}};
fixture->RunTest(rate_profiles, &rc_thresholds, &quality_thresholds, nullptr);
}
#endif
} // namespace
} // namespace test
} // namespace webrtc