test/*.cc: prefer 'override' to 'virtual'
created with clang-tidy --fix --checks=-*,modernize-use-override Change-Id: I71e1b4423c143b3e47fe90929ee110b307cdb565
This commit is contained in:
@@ -62,16 +62,16 @@ class ActiveMapRefreshTest
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
protected:
|
||||
ActiveMapRefreshTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~ActiveMapRefreshTest() {}
|
||||
~ActiveMapRefreshTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
cpu_used_ = GET_PARAM(2);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
::libvpx_test::Y4mVideoSource *y4m_video =
|
||||
static_cast<libvpx_test::Y4mVideoSource *>(video);
|
||||
if (video->frame() == 0) {
|
||||
|
||||
@@ -26,16 +26,16 @@ class ActiveMapTest
|
||||
static const int kHeight = 144;
|
||||
|
||||
ActiveMapTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~ActiveMapTest() {}
|
||||
~ActiveMapTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
cpu_used_ = GET_PARAM(2);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, GET_PARAM(3));
|
||||
|
||||
@@ -32,8 +32,8 @@ typedef std::tuple<double, AddNoiseFunc> AddNoiseTestFPParam;
|
||||
class AddNoiseTest : public ::testing::Test,
|
||||
public ::testing::WithParamInterface<AddNoiseTestFPParam> {
|
||||
public:
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
virtual ~AddNoiseTest() {}
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
~AddNoiseTest() override {}
|
||||
};
|
||||
|
||||
double stddev6(char a, char b, char c, char d, char e, char f) {
|
||||
|
||||
@@ -20,9 +20,9 @@ class AltRefAqSegmentTest
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
protected:
|
||||
AltRefAqSegmentTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~AltRefAqSegmentTest() {}
|
||||
~AltRefAqSegmentTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
set_cpu_used_ = GET_PARAM(2);
|
||||
@@ -30,8 +30,8 @@ class AltRefAqSegmentTest
|
||||
alt_ref_aq_mode_ = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||
encoder->Control(VP9E_SET_ALT_REF_AQ, alt_ref_aq_mode_);
|
||||
|
||||
+11
-11
@@ -24,24 +24,24 @@ class AltRefTest : public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<int> {
|
||||
protected:
|
||||
AltRefTest() : EncoderTest(GET_PARAM(0)), altref_count_(0) {}
|
||||
virtual ~AltRefTest() {}
|
||||
~AltRefTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(libvpx_test::kTwoPassGood);
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) { altref_count_ = 0; }
|
||||
void BeginPassHook(unsigned int /*pass*/) override { altref_count_ = 0; }
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||
encoder->Control(VP8E_SET_CPUUSED, 3);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) ++altref_count_;
|
||||
}
|
||||
|
||||
@@ -75,17 +75,17 @@ class AltRefForcedKeyTestLarge
|
||||
AltRefForcedKeyTestLarge()
|
||||
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
|
||||
cpu_used_(GET_PARAM(2)), forced_kf_frame_num_(1), frame_num_(0) {}
|
||||
virtual ~AltRefForcedKeyTestLarge() {}
|
||||
~AltRefForcedKeyTestLarge() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
cfg_.rc_end_usage = VPX_VBR;
|
||||
cfg_.g_threads = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||
@@ -100,7 +100,7 @@ class AltRefForcedKeyTestLarge
|
||||
(video->frame() == forced_kf_frame_num_) ? VPX_EFLAG_FORCE_KF : 0;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (frame_num_ == forced_kf_frame_num_) {
|
||||
ASSERT_TRUE(!!(pkt->data.frame.flags & VPX_FRAME_IS_KEY))
|
||||
<< "Frame #" << frame_num_ << " isn't a keyframe!";
|
||||
|
||||
@@ -20,17 +20,17 @@ class AqSegmentTest
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
protected:
|
||||
AqSegmentTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~AqSegmentTest() {}
|
||||
~AqSegmentTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
set_cpu_used_ = GET_PARAM(2);
|
||||
aq_mode_ = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
|
||||
|
||||
+10
-10
@@ -38,7 +38,7 @@ class AverageTestBase : public ::testing::Test {
|
||||
: width_(width), height_(height), source_data_(nullptr),
|
||||
source_stride_(0), bit_depth_(8) {}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
vpx_free(source_data_);
|
||||
source_data_ = nullptr;
|
||||
libvpx_test::ClearSystemState();
|
||||
@@ -49,7 +49,7 @@ class AverageTestBase : public ::testing::Test {
|
||||
static const int kDataAlignment = 16;
|
||||
static const int kDataBlockSize = 64 * 128;
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
source_data_ = reinterpret_cast<Pixel *>(
|
||||
vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
|
||||
ASSERT_NE(source_data_, nullptr);
|
||||
@@ -169,7 +169,7 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
source_data_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
|
||||
ASSERT_NE(source_data_, nullptr);
|
||||
@@ -180,7 +180,7 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
|
||||
vpx_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16));
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
vpx_free(source_data_);
|
||||
source_data_ = nullptr;
|
||||
vpx_free(hbuf_c_);
|
||||
@@ -238,7 +238,7 @@ typedef std::tuple<int, SatdFunc> SatdTestParam;
|
||||
class SatdTest : public ::testing::Test,
|
||||
public ::testing::WithParamInterface<SatdTestParam> {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
satd_size_ = GET_PARAM(0);
|
||||
satd_func_ = GET_PARAM(1);
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
@@ -247,7 +247,7 @@ class SatdTest : public ::testing::Test,
|
||||
ASSERT_NE(src_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
libvpx_test::ClearSystemState();
|
||||
vpx_free(src_);
|
||||
}
|
||||
@@ -276,7 +276,7 @@ class SatdTest : public ::testing::Test,
|
||||
|
||||
class SatdLowbdTest : public SatdTest {
|
||||
protected:
|
||||
virtual void FillRandom() {
|
||||
void FillRandom() override {
|
||||
for (int i = 0; i < satd_size_; ++i) {
|
||||
const int16_t tmp = rnd_.Rand16Signed();
|
||||
src_[i] = (tran_low_t)tmp;
|
||||
@@ -292,7 +292,7 @@ class BlockErrorTestFP
|
||||
: public ::testing::Test,
|
||||
public ::testing::WithParamInterface<BlockErrorTestFPParam> {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
txfm_size_ = GET_PARAM(0);
|
||||
block_error_func_ = GET_PARAM(1);
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
@@ -304,7 +304,7 @@ class BlockErrorTestFP
|
||||
ASSERT_NE(dqcoeff_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
libvpx_test::ClearSystemState();
|
||||
vpx_free(coeff_);
|
||||
vpx_free(dqcoeff_);
|
||||
@@ -463,7 +463,7 @@ TEST_P(SatdLowbdTest, DISABLED_Speed) {
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
class SatdHighbdTest : public SatdTest {
|
||||
protected:
|
||||
virtual void FillRandom() {
|
||||
void FillRandom() override {
|
||||
for (int i = 0; i < satd_size_; ++i) {
|
||||
src_[i] = rnd_.Rand20Signed();
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@ class BlockinessTestBase : public ::testing::Test {
|
||||
reference_data_ = nullptr;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
// Handle frames up to 640x480
|
||||
static const int kDataAlignment = 16;
|
||||
static const int kDataBufferSize = 640 * 480;
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
source_stride_ = (width_ + 31) & ~31;
|
||||
reference_stride_ = width_ * 2;
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
|
||||
@@ -22,15 +22,15 @@ class BordersTest
|
||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
||||
protected:
|
||||
BordersTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~BordersTest() {}
|
||||
~BordersTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, 1);
|
||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||
@@ -40,7 +40,7 @@ class BordersTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class ByteAlignmentTest
|
||||
ByteAlignmentTest()
|
||||
: video_(nullptr), decoder_(nullptr), md5_file_(nullptr) {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
|
||||
ASSERT_NE(video_, nullptr);
|
||||
video_->Init();
|
||||
@@ -71,7 +71,7 @@ class ByteAlignmentTest
|
||||
OpenMd5File(kVP9Md5File);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
if (md5_file_ != nullptr) fclose(md5_file_);
|
||||
|
||||
delete decoder_;
|
||||
|
||||
@@ -49,7 +49,7 @@ using AvgPredFunc = void (*)(uint8_t *a, const uint8_t *b, int w, int h,
|
||||
template <int bitdepth, typename Pixel>
|
||||
class AvgPredTest : public ::testing::TestWithParam<AvgPredFunc> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
avg_pred_func_ = GetParam();
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
}
|
||||
|
||||
+5
-5
@@ -22,24 +22,24 @@ class ConfigTest
|
||||
ConfigTest()
|
||||
: EncoderTest(GET_PARAM(0)), frame_count_in_(0), frame_count_out_(0),
|
||||
frame_count_max_(0) {}
|
||||
virtual ~ConfigTest() {}
|
||||
~ConfigTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
frame_count_in_ = 0;
|
||||
frame_count_out_ = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource * /*video*/) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource * /*video*/) override {
|
||||
++frame_count_in_;
|
||||
abort_ |= (frame_count_in_ >= frame_count_max_);
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t * /*pkt*/) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t * /*pkt*/) override {
|
||||
++frame_count_out_;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,14 +65,14 @@ class ConsistencyTestBase : public ::testing::Test {
|
||||
delete[] ssim_array_;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
// Handle frames up to 640x480
|
||||
static const int kDataAlignment = 16;
|
||||
static const int kDataBufferSize = 640 * 480;
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
source_stride_ = (width_ + 31) & ~31;
|
||||
reference_stride_ = width_ * 2;
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
|
||||
@@ -361,7 +361,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
static void TearDownTestSuite() {
|
||||
vpx_free(input_ - 1);
|
||||
@@ -403,7 +403,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
|
||||
i % kOuterBlockSize >= (BorderLeft() + Width()));
|
||||
}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
UUT_ = GET_PARAM(2);
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
if (UUT_->use_highbd_ != 0) {
|
||||
|
||||
@@ -26,9 +26,9 @@ class CpuSpeedTest
|
||||
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
|
||||
set_cpu_used_(GET_PARAM(2)), min_psnr_(kMaxPSNR),
|
||||
tune_content_(VP9E_CONTENT_DEFAULT) {}
|
||||
virtual ~CpuSpeedTest() {}
|
||||
~CpuSpeedTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||
@@ -40,10 +40,10 @@ class CpuSpeedTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) { min_psnr_ = kMaxPSNR; }
|
||||
void BeginPassHook(unsigned int /*pass*/) override { min_psnr_ = kMaxPSNR; }
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||
encoder->Control(VP9E_SET_TUNE_CONTENT, tune_content_);
|
||||
@@ -56,7 +56,7 @@ class CpuSpeedTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->data.psnr.psnr[0] < min_psnr_) min_psnr_ = pkt->data.psnr.psnr[0];
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -50,21 +50,21 @@ class CQTest : public ::libvpx_test::EncoderTest,
|
||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||
}
|
||||
|
||||
virtual ~CQTest() {}
|
||||
~CQTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(libvpx_test::kTwoPassGood);
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
file_size_ = 0;
|
||||
psnr_ = 0.0;
|
||||
n_frames_ = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
if (cfg_.rc_end_usage == VPX_CQ) {
|
||||
encoder->Control(VP8E_SET_CQ_LEVEL, cq_level_);
|
||||
@@ -73,12 +73,12 @@ class CQTest : public ::libvpx_test::EncoderTest,
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
psnr_ += pow(10.0, pkt->data.psnr.psnr[0] / 10.0);
|
||||
n_frames_++;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
file_size_ += pkt->data.frame.sz;
|
||||
}
|
||||
|
||||
|
||||
+16
-15
@@ -728,9 +728,9 @@ class Trans16x16TestBase {
|
||||
class Trans16x16DCT : public Trans16x16TestBase,
|
||||
public ::testing::TestWithParam<Dct16x16Param> {
|
||||
public:
|
||||
virtual ~Trans16x16DCT() {}
|
||||
~Trans16x16DCT() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
fwd_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
tx_type_ = GET_PARAM(2);
|
||||
@@ -749,13 +749,13 @@ class Trans16x16DCT : public Trans16x16TestBase,
|
||||
inv_txfm_ref = idct16x16_ref;
|
||||
#endif
|
||||
}
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) override {
|
||||
fwd_txfm_(in, out, stride);
|
||||
}
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) override {
|
||||
inv_txfm_(out, dst, stride);
|
||||
}
|
||||
|
||||
@@ -782,9 +782,9 @@ TEST_P(Trans16x16DCT, DISABLED_Speed) { RunSpeedTest(); }
|
||||
class Trans16x16HT : public Trans16x16TestBase,
|
||||
public ::testing::TestWithParam<Ht16x16Param> {
|
||||
public:
|
||||
virtual ~Trans16x16HT() {}
|
||||
~Trans16x16HT() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
fwd_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
tx_type_ = GET_PARAM(2);
|
||||
@@ -803,13 +803,13 @@ class Trans16x16HT : public Trans16x16TestBase,
|
||||
inv_txfm_ref = iht16x16_ref;
|
||||
#endif
|
||||
}
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) override {
|
||||
fwd_txfm_(in, out, stride, tx_type_);
|
||||
}
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) override {
|
||||
inv_txfm_(out, dst, stride, tx_type_);
|
||||
}
|
||||
|
||||
@@ -832,9 +832,9 @@ TEST_P(Trans16x16HT, QuantCheck) {
|
||||
class InvTrans16x16DCT : public Trans16x16TestBase,
|
||||
public ::testing::TestWithParam<Idct16x16Param> {
|
||||
public:
|
||||
virtual ~InvTrans16x16DCT() {}
|
||||
~InvTrans16x16DCT() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
ref_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
thresh_ = GET_PARAM(2);
|
||||
@@ -842,11 +842,12 @@ class InvTrans16x16DCT : public Trans16x16TestBase,
|
||||
pitch_ = 16;
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunFwdTxfm(int16_t * /*in*/, tran_low_t * /*out*/, int /*stride*/) {}
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
void RunFwdTxfm(int16_t * /*in*/, tran_low_t * /*out*/,
|
||||
int /*stride*/) override {}
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) override {
|
||||
inv_txfm_(out, dst, stride);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
|
||||
class Trans32x32Test : public AbstractBench,
|
||||
public ::testing::TestWithParam<Trans32x32Param> {
|
||||
public:
|
||||
virtual ~Trans32x32Test() {}
|
||||
virtual void SetUp() {
|
||||
~Trans32x32Test() override {}
|
||||
void SetUp() override {
|
||||
fwd_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
version_ = GET_PARAM(2); // 0: high precision forward transform
|
||||
@@ -99,7 +99,7 @@ class Trans32x32Test : public AbstractBench,
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
int version_;
|
||||
@@ -110,7 +110,7 @@ class Trans32x32Test : public AbstractBench,
|
||||
|
||||
int16_t *bench_in_;
|
||||
tran_low_t *bench_out_;
|
||||
virtual void Run();
|
||||
void Run() override;
|
||||
};
|
||||
|
||||
void Trans32x32Test::Run() { fwd_txfm_(bench_in_, bench_out_, 32); }
|
||||
@@ -321,8 +321,8 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
|
||||
|
||||
class InvTrans32x32Test : public ::testing::TestWithParam<InvTrans32x32Param> {
|
||||
public:
|
||||
virtual ~InvTrans32x32Test() {}
|
||||
virtual void SetUp() {
|
||||
~InvTrans32x32Test() override {}
|
||||
void SetUp() override {
|
||||
ref_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
version_ = GET_PARAM(2); // 0: high precision forward transform
|
||||
@@ -334,7 +334,7 @@ class InvTrans32x32Test : public ::testing::TestWithParam<InvTrans32x32Param> {
|
||||
pitch_ = 32;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunRefTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
|
||||
@@ -67,7 +67,7 @@ class PartialFdctTest : public ::testing::TestWithParam<PartialFdctParam> {
|
||||
bit_depth_ = GET_PARAM(2);
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunTest() {
|
||||
|
||||
+2
-2
@@ -134,7 +134,7 @@ void fwht_ref(const Buffer<int16_t> &in, Buffer<tran_low_t> *out, int size,
|
||||
|
||||
class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
const int idx = GET_PARAM(0);
|
||||
const FuncInfo *func_info = &(GET_PARAM(1)[idx]);
|
||||
@@ -166,7 +166,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
ASSERT_NE(dst_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
vpx_free(src_);
|
||||
src_ = nullptr;
|
||||
vpx_free(dst_);
|
||||
|
||||
+11
-11
@@ -28,9 +28,9 @@ class DecodeCorruptedFrameTest
|
||||
DecodeCorruptedFrameTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
|
||||
protected:
|
||||
virtual ~DecodeCorruptedFrameTest() {}
|
||||
~DecodeCorruptedFrameTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
@@ -44,16 +44,16 @@ class DecodeCorruptedFrameTest
|
||||
dec_cfg_.threads = 1;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) encoder->Control(VP8E_SET_CPUUSED, 7);
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) {}
|
||||
void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) override {}
|
||||
|
||||
virtual const vpx_codec_cx_pkt_t *MutateEncoderOutputHook(
|
||||
const vpx_codec_cx_pkt_t *pkt) {
|
||||
const vpx_codec_cx_pkt_t *MutateEncoderOutputHook(
|
||||
const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Don't edit frame packet on key frame.
|
||||
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) return pkt;
|
||||
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return pkt;
|
||||
@@ -66,9 +66,9 @@ class DecodeCorruptedFrameTest
|
||||
return &modified_pkt_;
|
||||
}
|
||||
|
||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
EXPECT_NE(res_dec, VPX_CODEC_MEM_ERROR) << decoder->DecodeError();
|
||||
return VPX_CODEC_MEM_ERROR != res_dec;
|
||||
}
|
||||
|
||||
@@ -118,9 +118,9 @@ class VP9NewEncodeDecodePerfTest
|
||||
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)), speed_(0),
|
||||
outfile_(0), out_frames_(0) {}
|
||||
|
||||
virtual ~VP9NewEncodeDecodePerfTest() {}
|
||||
~VP9NewEncodeDecodePerfTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
|
||||
@@ -137,8 +137,8 @@ class VP9NewEncodeDecodePerfTest
|
||||
cfg_.rc_end_usage = VPX_VBR;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, speed_);
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
@@ -146,14 +146,14 @@ class VP9NewEncodeDecodePerfTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
const std::string data_path = getenv("LIBVPX_TEST_DATA_PATH");
|
||||
const std::string path_to_source = data_path + "/" + kNewEncodeOutputFile;
|
||||
outfile_ = fopen(path_to_source.c_str(), "wb");
|
||||
ASSERT_NE(outfile_, nullptr);
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
if (outfile_ != nullptr) {
|
||||
if (!fseek(outfile_, 0, SEEK_SET)) {
|
||||
ivf_write_file_header(outfile_, &cfg_, VP9_FOURCC, out_frames_);
|
||||
@@ -163,7 +163,7 @@ class VP9NewEncodeDecodePerfTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
++out_frames_;
|
||||
|
||||
// Write initial file header if first frame.
|
||||
@@ -177,7 +177,7 @@ class VP9NewEncodeDecodePerfTest
|
||||
pkt->data.frame.sz);
|
||||
}
|
||||
|
||||
virtual bool DoDecode() const { return false; }
|
||||
bool DoDecode() const override { return false; }
|
||||
|
||||
void set_speed(unsigned int speed) { speed_ = speed; }
|
||||
|
||||
|
||||
@@ -25,17 +25,16 @@ class DecodeSvcTest : public ::libvpx_test::DecoderTest,
|
||||
public ::libvpx_test::CodecTestWithParam<const char *> {
|
||||
protected:
|
||||
DecodeSvcTest() : DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)) {}
|
||||
virtual ~DecodeSvcTest() {}
|
||||
~DecodeSvcTest() override {}
|
||||
|
||||
virtual void PreDecodeFrameHook(
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
void PreDecodeFrameHook(const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
if (video.frame_number() == 0)
|
||||
decoder->Control(VP9_DECODE_SVC_SPATIAL_LAYER, spatial_layer_);
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) {
|
||||
void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) override {
|
||||
ASSERT_EQ(img.d_w, width_);
|
||||
ASSERT_EQ(img.d_h, height_);
|
||||
total_frames_ = frame_number;
|
||||
|
||||
@@ -61,9 +61,9 @@ class VP9EncodePerfTest
|
||||
: EncoderTest(GET_PARAM(0)), min_psnr_(kMaxPsnr), nframes_(0),
|
||||
encoding_mode_(GET_PARAM(1)), speed_(0), threads_(1) {}
|
||||
|
||||
virtual ~VP9EncodePerfTest() {}
|
||||
~VP9EncodePerfTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
|
||||
@@ -82,8 +82,8 @@ class VP9EncodePerfTest
|
||||
cfg_.g_threads = threads_;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
const int log2_tile_columns = 3;
|
||||
encoder->Control(VP8E_SET_CPUUSED, speed_);
|
||||
@@ -93,19 +93,19 @@ class VP9EncodePerfTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
min_psnr_ = kMaxPsnr;
|
||||
nframes_ = 0;
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->data.psnr.psnr[0] < min_psnr_) {
|
||||
min_psnr_ = pkt->data.psnr.psnr[0];
|
||||
}
|
||||
}
|
||||
|
||||
// for performance reasons don't decode
|
||||
virtual bool DoDecode() const { return false; }
|
||||
bool DoDecode() const override { return false; }
|
||||
|
||||
double min_psnr() const { return min_psnr_; }
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class ErrorResilienceTestLarge
|
||||
Reset();
|
||||
}
|
||||
|
||||
virtual ~ErrorResilienceTestLarge() {}
|
||||
~ErrorResilienceTestLarge() override {}
|
||||
|
||||
void Reset() {
|
||||
error_nframes_ = 0;
|
||||
@@ -38,19 +38,19 @@ class ErrorResilienceTestLarge
|
||||
pattern_switch_ = 0;
|
||||
}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
psnr_ = 0.0;
|
||||
nframes_ = 0;
|
||||
mismatch_psnr_ = 0.0;
|
||||
mismatch_nframes_ = 0;
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
psnr_ += pkt->data.psnr.psnr[0];
|
||||
nframes_++;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class ErrorResilienceTestLarge
|
||||
return frame_flags;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video) override {
|
||||
frame_flags_ &=
|
||||
~(VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF);
|
||||
// For temporal layer case.
|
||||
@@ -129,7 +129,7 @@ class ErrorResilienceTestLarge
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
virtual bool DoDecode() const {
|
||||
bool DoDecode() const override {
|
||||
if (error_nframes_ > 0 &&
|
||||
(cfg_.g_pass == VPX_RC_LAST_PASS || cfg_.g_pass == VPX_RC_ONE_PASS)) {
|
||||
for (unsigned int i = 0; i < error_nframes_; ++i) {
|
||||
@@ -143,7 +143,7 @@ class ErrorResilienceTestLarge
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) {
|
||||
void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) override {
|
||||
double mismatch_psnr = compute_psnr(img1, img2);
|
||||
mismatch_psnr_ += mismatch_psnr;
|
||||
++mismatch_nframes_;
|
||||
@@ -381,7 +381,7 @@ class ErrorResilienceTestLargeCodecControls
|
||||
Reset();
|
||||
}
|
||||
|
||||
virtual ~ErrorResilienceTestLargeCodecControls() {}
|
||||
~ErrorResilienceTestLargeCodecControls() override {}
|
||||
|
||||
void Reset() {
|
||||
last_pts_ = 0;
|
||||
@@ -393,7 +393,7 @@ class ErrorResilienceTestLargeCodecControls
|
||||
duration_ = 0.0;
|
||||
}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
}
|
||||
@@ -460,8 +460,8 @@ class ErrorResilienceTestLargeCodecControls
|
||||
return layer_id;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (cfg_.ts_number_layers > 1) {
|
||||
int layer_id = SetLayerId(video->frame(), cfg_.ts_number_layers);
|
||||
int frame_flags = SetFrameFlags(video->frame(), cfg_.ts_number_layers);
|
||||
@@ -476,7 +476,7 @@ class ErrorResilienceTestLargeCodecControls
|
||||
}
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Time since last timestamp = duration.
|
||||
vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
|
||||
if (duration > 1) {
|
||||
@@ -496,7 +496,7 @@ class ErrorResilienceTestLargeCodecControls
|
||||
++tot_frame_number_;
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
duration_ = (last_pts_ + 1) * timebase_;
|
||||
if (cfg_.ts_number_layers > 1) {
|
||||
for (int layer = 0; layer < static_cast<int>(cfg_.ts_number_layers);
|
||||
|
||||
@@ -210,13 +210,12 @@ class ExternalFrameBufferMD5Test
|
||||
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
|
||||
md5_file_(nullptr), num_buffers_(0) {}
|
||||
|
||||
virtual ~ExternalFrameBufferMD5Test() {
|
||||
~ExternalFrameBufferMD5Test() override {
|
||||
if (md5_file_ != nullptr) fclose(md5_file_);
|
||||
}
|
||||
|
||||
virtual void PreDecodeFrameHook(
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
void PreDecodeFrameHook(const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
if (num_buffers_ > 0 && video.frame_number() == 0) {
|
||||
// Have libvpx use frame buffers we create.
|
||||
ASSERT_TRUE(fb_list_.CreateBufferList(num_buffers_));
|
||||
@@ -232,8 +231,8 @@ class ExternalFrameBufferMD5Test
|
||||
<< "Md5 file open failed. Filename: " << md5_file_name_;
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) {
|
||||
void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) override {
|
||||
ASSERT_NE(md5_file_, nullptr);
|
||||
char expected_md5[33];
|
||||
char junk[128];
|
||||
@@ -289,7 +288,7 @@ class ExternalFrameBufferTest : public ::testing::Test {
|
||||
ExternalFrameBufferTest()
|
||||
: video_(nullptr), decoder_(nullptr), num_buffers_(0) {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
|
||||
ASSERT_NE(video_, nullptr);
|
||||
video_->Init();
|
||||
@@ -300,7 +299,7 @@ class ExternalFrameBufferTest : public ::testing::Test {
|
||||
ASSERT_NE(decoder_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
delete decoder_;
|
||||
decoder_ = nullptr;
|
||||
delete video_;
|
||||
@@ -355,7 +354,7 @@ class ExternalFrameBufferTest : public ::testing::Test {
|
||||
|
||||
class ExternalFrameBufferNonRefTest : public ExternalFrameBufferTest {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
video_ = new libvpx_test::WebMVideoSource(kVP9NonRefTestFile);
|
||||
ASSERT_NE(video_, nullptr);
|
||||
video_->Init();
|
||||
|
||||
+16
-15
@@ -539,9 +539,9 @@ class FwdTrans8x8TestBase {
|
||||
class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
|
||||
public ::testing::TestWithParam<Dct8x8Param> {
|
||||
public:
|
||||
virtual ~FwdTrans8x8DCT() {}
|
||||
~FwdTrans8x8DCT() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
fwd_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
tx_type_ = GET_PARAM(2);
|
||||
@@ -551,13 +551,13 @@ class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) override {
|
||||
fwd_txfm_(in, out, stride);
|
||||
}
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) override {
|
||||
inv_txfm_(out, dst, stride);
|
||||
}
|
||||
|
||||
@@ -578,9 +578,9 @@ TEST_P(FwdTrans8x8DCT, InvAccuracyCheck) { RunInvAccuracyCheck(); }
|
||||
class FwdTrans8x8HT : public FwdTrans8x8TestBase,
|
||||
public ::testing::TestWithParam<Ht8x8Param> {
|
||||
public:
|
||||
virtual ~FwdTrans8x8HT() {}
|
||||
~FwdTrans8x8HT() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
fwd_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
tx_type_ = GET_PARAM(2);
|
||||
@@ -590,13 +590,13 @@ class FwdTrans8x8HT : public FwdTrans8x8TestBase,
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {
|
||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) override {
|
||||
fwd_txfm_(in, out, stride, tx_type_);
|
||||
}
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) override {
|
||||
inv_txfm_(out, dst, stride, tx_type_);
|
||||
}
|
||||
|
||||
@@ -614,9 +614,9 @@ TEST_P(FwdTrans8x8HT, ExtremalCheck) { RunExtremalCheck(); }
|
||||
class InvTrans8x8DCT : public FwdTrans8x8TestBase,
|
||||
public ::testing::TestWithParam<Idct8x8Param> {
|
||||
public:
|
||||
virtual ~InvTrans8x8DCT() {}
|
||||
~InvTrans8x8DCT() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
ref_txfm_ = GET_PARAM(0);
|
||||
inv_txfm_ = GET_PARAM(1);
|
||||
thresh_ = GET_PARAM(2);
|
||||
@@ -625,13 +625,14 @@ class InvTrans8x8DCT : public FwdTrans8x8TestBase,
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) override {
|
||||
inv_txfm_(out, dst, stride);
|
||||
}
|
||||
void RunFwdTxfm(int16_t * /*out*/, tran_low_t * /*dst*/, int /*stride*/) {}
|
||||
void RunFwdTxfm(int16_t * /*out*/, tran_low_t * /*dst*/,
|
||||
int /*stride*/) override {}
|
||||
|
||||
IdctFunc ref_txfm_;
|
||||
IdctFunc inv_txfm_;
|
||||
|
||||
@@ -65,7 +65,7 @@ class EncoderWithExpectedError : public ::libvpx_test::Encoder {
|
||||
ASSERT_EQ(expected_err, res) << EncoderError();
|
||||
}
|
||||
|
||||
virtual vpx_codec_iface_t *CodecInterface() const {
|
||||
vpx_codec_iface_t *CodecInterface() const override {
|
||||
#if CONFIG_VP9_ENCODER
|
||||
return &vpx_codec_vp9_cx_algo;
|
||||
#else
|
||||
@@ -79,22 +79,22 @@ class VP9FrameSizeTestsLarge : public ::libvpx_test::EncoderTest,
|
||||
protected:
|
||||
VP9FrameSizeTestsLarge()
|
||||
: EncoderTest(&::libvpx_test::kVP9), expected_res_(VPX_CODEC_OK) {}
|
||||
virtual ~VP9FrameSizeTestsLarge() {}
|
||||
~VP9FrameSizeTestsLarge() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
}
|
||||
|
||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
EXPECT_EQ(expected_res_, res_dec) << decoder->DecodeError();
|
||||
return !::testing::Test::HasFailure();
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, 7);
|
||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||
|
||||
@@ -130,7 +130,7 @@ std::ostream &operator<<(std::ostream &os, const HadamardFuncWithSize &hfs) {
|
||||
|
||||
class HadamardTestBase : public ::testing::TestWithParam<HadamardFuncWithSize> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
h_func_ = GetParam().func;
|
||||
bwh_ = GetParam().block_size;
|
||||
block_size_ = bwh_ * bwh_;
|
||||
@@ -252,7 +252,7 @@ class HadamardTestBase : public ::testing::TestWithParam<HadamardFuncWithSize> {
|
||||
class HadamardLowbdTest : public HadamardTestBase {
|
||||
protected:
|
||||
// Use values between -255 (0xFF01) and 255 (0x00FF)
|
||||
virtual int16_t Rand() {
|
||||
int16_t Rand() override {
|
||||
int16_t src = rnd_.Rand8();
|
||||
int16_t pred = rnd_.Rand8();
|
||||
return src - pred;
|
||||
@@ -335,7 +335,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
class HadamardHighbdTest : public HadamardTestBase {
|
||||
protected:
|
||||
// Use values between -4095 (0xF001) and 4095 (0x0FFF)
|
||||
virtual int16_t Rand() {
|
||||
int16_t Rand() override {
|
||||
int16_t src = rnd_.Rand12();
|
||||
int16_t pred = rnd_.Rand12();
|
||||
return src - pred;
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ using libvpx_test::Buffer;
|
||||
|
||||
class IDCTTest : public ::testing::TestWithParam<IdctFunc> {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
UUT = GetParam();
|
||||
|
||||
input = new Buffer<int16_t>(4, 4, 0);
|
||||
@@ -41,7 +41,7 @@ class IDCTTest : public ::testing::TestWithParam<IdctFunc> {
|
||||
ASSERT_TRUE(output->Init());
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
delete input;
|
||||
delete predict;
|
||||
delete output;
|
||||
|
||||
@@ -40,7 +40,7 @@ class InvalidFileTest : public ::libvpx_test::DecoderTest,
|
||||
protected:
|
||||
InvalidFileTest() : DecoderTest(GET_PARAM(0)), res_file_(nullptr) {}
|
||||
|
||||
virtual ~InvalidFileTest() {
|
||||
~InvalidFileTest() override {
|
||||
if (res_file_ != nullptr) fclose(res_file_);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,9 @@ class InvalidFileTest : public ::libvpx_test::DecoderTest,
|
||||
<< "Result file open failed. Filename: " << res_file_name_;
|
||||
}
|
||||
|
||||
virtual bool HandleDecodeResult(
|
||||
const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
EXPECT_NE(res_file_, nullptr);
|
||||
int expected_res_dec;
|
||||
|
||||
@@ -172,9 +171,9 @@ VP9_INSTANTIATE_TEST_SUITE(InvalidFileTest,
|
||||
class InvalidFileInvalidPeekTest : public InvalidFileTest {
|
||||
protected:
|
||||
InvalidFileInvalidPeekTest() : InvalidFileTest() {}
|
||||
virtual void HandlePeekResult(libvpx_test::Decoder *const /*decoder*/,
|
||||
libvpx_test::CompressedVideoSource * /*video*/,
|
||||
const vpx_codec_err_t /*res_peek*/) {}
|
||||
void HandlePeekResult(libvpx_test::Decoder *const /*decoder*/,
|
||||
libvpx_test::CompressedVideoSource * /*video*/,
|
||||
const vpx_codec_err_t /*res_peek*/) override {}
|
||||
};
|
||||
|
||||
TEST_P(InvalidFileInvalidPeekTest, ReturnCode) { RunTest(); }
|
||||
|
||||
@@ -22,9 +22,9 @@ class KeyframeTest
|
||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
||||
protected:
|
||||
KeyframeTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~KeyframeTest() {}
|
||||
~KeyframeTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
kf_count_ = 0;
|
||||
@@ -33,8 +33,8 @@ class KeyframeTest
|
||||
set_cpu_used_ = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (kf_do_force_kf_) {
|
||||
frame_flags_ = (video->frame() % 3) ? 0 : VPX_EFLAG_FORCE_KF;
|
||||
}
|
||||
@@ -43,7 +43,7 @@ class KeyframeTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
|
||||
kf_pts_list_.push_back(pkt->data.frame.pts);
|
||||
kf_count_++;
|
||||
|
||||
+4
-4
@@ -22,9 +22,9 @@ class LevelTest
|
||||
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
|
||||
cpu_used_(GET_PARAM(2)), min_gf_internal_(24), target_level_(0),
|
||||
level_(0) {}
|
||||
virtual ~LevelTest() {}
|
||||
~LevelTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||
@@ -41,8 +41,8 @@ class LevelTest
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||
encoder->Control(VP9E_SET_TARGET_LEVEL, target_level_);
|
||||
|
||||
+6
-6
@@ -129,15 +129,15 @@ uint8_t GetHevThresh(ACMRandom *rnd) {
|
||||
|
||||
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
||||
public:
|
||||
virtual ~Loop8Test6Param() {}
|
||||
virtual void SetUp() {
|
||||
~Loop8Test6Param() override {}
|
||||
void SetUp() override {
|
||||
loopfilter_op_ = GET_PARAM(0);
|
||||
ref_loopfilter_op_ = GET_PARAM(1);
|
||||
bit_depth_ = GET_PARAM(2);
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
int bit_depth_;
|
||||
@@ -151,15 +151,15 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(Loop8Test6Param);
|
||||
(HAVE_DSPR2 || HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH)
|
||||
class Loop8Test9Param : public ::testing::TestWithParam<dualloop8_param_t> {
|
||||
public:
|
||||
virtual ~Loop8Test9Param() {}
|
||||
virtual void SetUp() {
|
||||
~Loop8Test9Param() override {}
|
||||
void SetUp() override {
|
||||
loopfilter_op_ = GET_PARAM(0);
|
||||
ref_loopfilter_op_ = GET_PARAM(1);
|
||||
bit_depth_ = GET_PARAM(2);
|
||||
mask_ = (1 << bit_depth_) - 1;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
int bit_depth_;
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ typedef void (*MinMaxFunc)(const uint8_t *a, int a_stride, const uint8_t *b,
|
||||
|
||||
class MinMaxTest : public ::testing::TestWithParam<MinMaxFunc> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
mm_func_ = GetParam();
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ const int kCountTestBlock = 1000;
|
||||
|
||||
class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
|
||||
public:
|
||||
virtual ~PartialIDctTest() {}
|
||||
virtual void SetUp() {
|
||||
~PartialIDctTest() override {}
|
||||
void SetUp() override {
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
fwd_txfm_ = GET_PARAM(0);
|
||||
full_inv_txfm_ = GET_PARAM(1);
|
||||
@@ -100,7 +100,7 @@ class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
|
||||
vpx_memalign(16, pixel_size_ * output_block_size_));
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
vpx_free(input_block_);
|
||||
input_block_ = nullptr;
|
||||
vpx_free(output_block_);
|
||||
|
||||
@@ -51,10 +51,10 @@ class VpxPostProcDownAndAcrossMbRowTest
|
||||
public:
|
||||
VpxPostProcDownAndAcrossMbRowTest()
|
||||
: mb_post_proc_down_and_across_(GetParam()) {}
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
void Run() override;
|
||||
|
||||
const VpxPostProcDownAndAcrossMbRowFunc mb_post_proc_down_and_across_;
|
||||
// Size of the underlying data block that will be filtered.
|
||||
@@ -227,10 +227,10 @@ class VpxMbPostProcAcrossIpTest
|
||||
VpxMbPostProcAcrossIpTest()
|
||||
: rows_(16), cols_(16), mb_post_proc_across_ip_(GetParam()),
|
||||
src_(Buffer<uint8_t>(rows_, cols_, 8, 8, 17, 8)) {}
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
void Run() override;
|
||||
|
||||
void SetCols(unsigned char *s, int rows, int cols, int src_width) {
|
||||
for (int r = 0; r < rows; r++) {
|
||||
@@ -356,10 +356,10 @@ class VpxMbPostProcDownTest
|
||||
: rows_(16), cols_(16), mb_post_proc_down_(GetParam()),
|
||||
src_c_(Buffer<uint8_t>(rows_, cols_, 8, 8, 8, 17)) {}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
void Run() override;
|
||||
|
||||
void SetRows(unsigned char *src_c, int rows, int cols, int src_width) {
|
||||
for (int r = 0; r < rows; r++) {
|
||||
|
||||
@@ -43,7 +43,7 @@ class PredictTestBase : public AbstractBench,
|
||||
: width_(GET_PARAM(0)), height_(GET_PARAM(1)), predict_(GET_PARAM(2)),
|
||||
src_(nullptr), padded_dst_(nullptr), dst_(nullptr), dst_c_(nullptr) {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
src_ = new uint8_t[kSrcSize];
|
||||
ASSERT_NE(src_, nullptr);
|
||||
|
||||
@@ -64,7 +64,7 @@ class PredictTestBase : public AbstractBench,
|
||||
memset(dst_c_, 0, 16 * 16);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
delete[] src_;
|
||||
src_ = nullptr;
|
||||
vpx_free(padded_dst_);
|
||||
@@ -209,7 +209,7 @@ class PredictTestBase : public AbstractBench,
|
||||
}
|
||||
}
|
||||
|
||||
void Run() {
|
||||
void Run() override {
|
||||
for (int xoffset = 0; xoffset < 8; ++xoffset) {
|
||||
for (int yoffset = 0; yoffset < 8; ++yoffset) {
|
||||
if (xoffset == 0 && yoffset == 0) {
|
||||
|
||||
@@ -121,13 +121,13 @@ class QuantizeTest : public QuantizeTestBase,
|
||||
public ::testing::TestWithParam<VP8QuantizeParam>,
|
||||
public AbstractBench {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
SetupCompressor();
|
||||
asm_quant_ = GET_PARAM(0);
|
||||
c_quant_ = GET_PARAM(1);
|
||||
}
|
||||
|
||||
virtual void Run() {
|
||||
void Run() override {
|
||||
asm_quant_(&vp8_comp_->mb.block[0], ¯oblockd_dst_->block[0]);
|
||||
}
|
||||
|
||||
|
||||
+29
-29
@@ -247,10 +247,10 @@ class ResizingVideoSource : public ::libvpx_test::DummyVideoSource {
|
||||
}
|
||||
bool flag_codec_;
|
||||
bool smaller_width_larger_size_;
|
||||
virtual ~ResizingVideoSource() {}
|
||||
~ResizingVideoSource() override {}
|
||||
|
||||
protected:
|
||||
virtual void Next() {
|
||||
void Next() override {
|
||||
++frame_;
|
||||
unsigned int width = 0;
|
||||
unsigned int height = 0;
|
||||
@@ -267,14 +267,14 @@ class ResizeTest
|
||||
protected:
|
||||
ResizeTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
|
||||
virtual ~ResizeTest() {}
|
||||
~ResizeTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
ASSERT_NE(static_cast<int>(pkt->data.frame.width[0]), 0);
|
||||
ASSERT_NE(static_cast<int>(pkt->data.frame.height[0]), 0);
|
||||
encode_frame_width_.push_back(pkt->data.frame.width[0]);
|
||||
@@ -289,8 +289,8 @@ class ResizeTest
|
||||
return encode_frame_height_[idx];
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
vpx_codec_pts_t pts) {
|
||||
void DecompressedFrameHook(const vpx_image_t &img,
|
||||
vpx_codec_pts_t pts) override {
|
||||
frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h));
|
||||
}
|
||||
|
||||
@@ -336,15 +336,15 @@ class ResizeInternalTest : public ResizeTest {
|
||||
ResizeInternalTest() : ResizeTest(), frame0_psnr_(0.0) {}
|
||||
#endif
|
||||
|
||||
virtual ~ResizeInternalTest() {}
|
||||
~ResizeInternalTest() override {}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
#if WRITE_COMPRESSED_STREAM
|
||||
outfile_ = fopen("vp90-2-05-resize.ivf", "wb");
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
#if WRITE_COMPRESSED_STREAM
|
||||
if (outfile_) {
|
||||
if (!fseek(outfile_, 0, SEEK_SET))
|
||||
@@ -355,8 +355,8 @@ class ResizeInternalTest : public ResizeTest {
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (change_config_) {
|
||||
int new_q = 60;
|
||||
if (video->frame() == 0) {
|
||||
@@ -381,7 +381,7 @@ class ResizeInternalTest : public ResizeTest {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (frame0_psnr_ == 0.) frame0_psnr_ = pkt->data.psnr.psnr[0];
|
||||
EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
|
||||
}
|
||||
@@ -450,10 +450,10 @@ class ResizeRealtimeTest
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
protected:
|
||||
ResizeRealtimeTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~ResizeRealtimeTest() {}
|
||||
~ResizeRealtimeTest() override {}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_AQ_MODE, 3);
|
||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||
@@ -466,24 +466,24 @@ class ResizeRealtimeTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
set_cpu_used_ = GET_PARAM(2);
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
vpx_codec_pts_t pts) {
|
||||
void DecompressedFrameHook(const vpx_image_t &img,
|
||||
vpx_codec_pts_t pts) override {
|
||||
frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h));
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) {
|
||||
void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) override {
|
||||
double mismatch_psnr = compute_psnr(img1, img2);
|
||||
mismatch_psnr_ += mismatch_psnr;
|
||||
++mismatch_nframes_;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
ASSERT_NE(static_cast<int>(pkt->data.frame.width[0]), 0);
|
||||
ASSERT_NE(static_cast<int>(pkt->data.frame.height[0]), 0);
|
||||
encode_frame_width_.push_back(pkt->data.frame.width[0]);
|
||||
@@ -693,15 +693,15 @@ class ResizeCspTest : public ResizeTest {
|
||||
ResizeCspTest() : ResizeTest(), frame0_psnr_(0.0) {}
|
||||
#endif
|
||||
|
||||
virtual ~ResizeCspTest() {}
|
||||
~ResizeCspTest() override {}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
#if WRITE_COMPRESSED_STREAM
|
||||
outfile_ = fopen("vp91-2-05-cspchape.ivf", "wb");
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
#if WRITE_COMPRESSED_STREAM
|
||||
if (outfile_) {
|
||||
if (!fseek(outfile_, 0, SEEK_SET))
|
||||
@@ -712,8 +712,8 @@ class ResizeCspTest : public ResizeTest {
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (CspForFrameNumber(video->frame()) != VPX_IMG_FMT_I420 &&
|
||||
cfg_.g_profile != 1) {
|
||||
cfg_.g_profile = 1;
|
||||
@@ -726,7 +726,7 @@ class ResizeCspTest : public ResizeTest {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (frame0_psnr_ == 0.) frame0_psnr_ = pkt->data.psnr.psnr[0];
|
||||
EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
|
||||
}
|
||||
@@ -758,10 +758,10 @@ class ResizingCspVideoSource : public ::libvpx_test::DummyVideoSource {
|
||||
limit_ = 30;
|
||||
}
|
||||
|
||||
virtual ~ResizingCspVideoSource() {}
|
||||
~ResizingCspVideoSource() override {}
|
||||
|
||||
protected:
|
||||
virtual void Next() {
|
||||
void Next() override {
|
||||
++frame_;
|
||||
SetImageFormat(CspForFrameNumber(frame_));
|
||||
FillFrame();
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@ class SADTestBase : public ::testing::TestWithParam<ParamType> {
|
||||
public:
|
||||
explicit SADTestBase(const ParamType ¶ms) : params_(params) {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
source_data8_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kDataBlockSize));
|
||||
reference_data8_ = reinterpret_cast<uint8_t *>(
|
||||
@@ -108,7 +108,7 @@ class SADTestBase : public ::testing::TestWithParam<ParamType> {
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
vpx_free(source_data8_);
|
||||
source_data8_ = nullptr;
|
||||
vpx_free(reference_data8_);
|
||||
|
||||
@@ -33,13 +33,13 @@ typedef std::tuple<SSI16Func, SSI16Func> SumSquaresParam;
|
||||
|
||||
class SumSquaresTest : public ::testing::TestWithParam<SumSquaresParam> {
|
||||
public:
|
||||
virtual ~SumSquaresTest() {}
|
||||
virtual void SetUp() {
|
||||
~SumSquaresTest() override {}
|
||||
void SetUp() override {
|
||||
ref_func_ = GET_PARAM(0);
|
||||
tst_func_ = GET_PARAM(1);
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
SSI16Func ref_func_;
|
||||
|
||||
@@ -28,9 +28,9 @@ class SuperframeTest
|
||||
protected:
|
||||
SuperframeTest()
|
||||
: EncoderTest(GET_PARAM(0)), modified_buf_(nullptr), last_sf_pts_(0) {}
|
||||
virtual ~SuperframeTest() {}
|
||||
~SuperframeTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
const SuperframeTestParam input = GET_PARAM(1);
|
||||
const libvpx_test::TestMode mode = std::get<kTestMode>(input);
|
||||
@@ -39,17 +39,17 @@ class SuperframeTest
|
||||
sf_count_max_ = INT_MAX;
|
||||
}
|
||||
|
||||
virtual void TearDown() { delete[] modified_buf_; }
|
||||
void TearDown() override { delete[] modified_buf_; }
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||
}
|
||||
}
|
||||
|
||||
virtual const vpx_codec_cx_pkt_t *MutateEncoderOutputHook(
|
||||
const vpx_codec_cx_pkt_t *pkt) {
|
||||
const vpx_codec_cx_pkt_t *MutateEncoderOutputHook(
|
||||
const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return pkt;
|
||||
|
||||
const uint8_t *buffer = reinterpret_cast<uint8_t *>(pkt->data.frame.buf);
|
||||
|
||||
+22
-22
@@ -43,7 +43,7 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~DatarateOnePassCbrSvc() {}
|
||||
~DatarateOnePassCbrSvc() override {}
|
||||
|
||||
virtual void ResetModel() {
|
||||
last_pts_ = 0;
|
||||
@@ -86,7 +86,7 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
}
|
||||
ksvc_flex_noupd_tlenh_ = false;
|
||||
}
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {}
|
||||
void BeginPassHook(unsigned int /*pass*/) override {}
|
||||
|
||||
// Example pattern for spatial layers and 2 temporal layers used in the
|
||||
// bypass/flexible mode. The pattern corresponds to the pattern
|
||||
@@ -179,8 +179,8 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
PreEncodeFrameHookSetup(video, encoder);
|
||||
|
||||
if (video->frame() == 0) {
|
||||
@@ -468,7 +468,7 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
return VPX_CODEC_OK;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
uint32_t sizes[8] = { 0 };
|
||||
uint32_t sizes_parsed[8] = { 0 };
|
||||
int count = 0;
|
||||
@@ -571,7 +571,7 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
if (change_bitrate_) last_pts_ = last_pts_ - last_pts_ref_;
|
||||
duration_ = (last_pts_ + 1) * timebase_;
|
||||
for (int sl = 0; sl < number_spatial_layers_; ++sl) {
|
||||
@@ -583,7 +583,7 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) {
|
||||
void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) override {
|
||||
// TODO(marpan): Look into why an assert is triggered in compute_psnr
|
||||
// for mismatch frames for the special test case: ksvc_flex_noupd_tlenh.
|
||||
// Has to do with dropped frames in bypass/flexible svc mode.
|
||||
@@ -639,7 +639,7 @@ class DatarateOnePassCbrSvc : public OnePassCbrSvc {
|
||||
bool ksvc_flex_noupd_tlenh_;
|
||||
|
||||
private:
|
||||
virtual void SetConfig(const int num_temporal_layer) {
|
||||
void SetConfig(const int num_temporal_layer) override {
|
||||
cfg_.rc_end_usage = VPX_CBR;
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
cfg_.g_error_resilient = 1;
|
||||
@@ -670,10 +670,10 @@ class DatarateOnePassCbrSvcSingleBR
|
||||
DatarateOnePassCbrSvcSingleBR() : DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcSingleBR() {}
|
||||
~DatarateOnePassCbrSvcSingleBR() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
@@ -1160,10 +1160,10 @@ class DatarateOnePassCbrSvcMultiBR
|
||||
DatarateOnePassCbrSvcMultiBR() : DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcMultiBR() {}
|
||||
~DatarateOnePassCbrSvcMultiBR() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
@@ -1243,10 +1243,10 @@ class DatarateOnePassCbrSvcFrameDropMultiBR
|
||||
: DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcFrameDropMultiBR() {}
|
||||
~DatarateOnePassCbrSvcFrameDropMultiBR() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
@@ -1355,10 +1355,10 @@ class DatarateOnePassCbrSvcInterLayerPredSingleBR
|
||||
: DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcInterLayerPredSingleBR() {}
|
||||
~DatarateOnePassCbrSvcInterLayerPredSingleBR() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
@@ -1441,10 +1441,10 @@ class DatarateOnePassCbrSvcDenoiser
|
||||
DatarateOnePassCbrSvcDenoiser() : DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcDenoiser() {}
|
||||
~DatarateOnePassCbrSvcDenoiser() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
@@ -1499,10 +1499,10 @@ class DatarateOnePassCbrSvcSmallKF
|
||||
DatarateOnePassCbrSvcSmallKF() : DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcSmallKF() {}
|
||||
~DatarateOnePassCbrSvcSmallKF() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
@@ -1702,10 +1702,10 @@ class DatarateOnePassCbrSvcPostencodeDrop
|
||||
DatarateOnePassCbrSvcPostencodeDrop() : DatarateOnePassCbrSvc(GET_PARAM(0)) {
|
||||
memset(&svc_params_, 0, sizeof(svc_params_));
|
||||
}
|
||||
virtual ~DatarateOnePassCbrSvcPostencodeDrop() {}
|
||||
~DatarateOnePassCbrSvcPostencodeDrop() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
speed_setting_ = GET_PARAM(1);
|
||||
|
||||
+27
-27
@@ -45,19 +45,19 @@ class ScalePartitionOnePassCbrSvc
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~ScalePartitionOnePassCbrSvc() {}
|
||||
~ScalePartitionOnePassCbrSvc() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
speed_setting_ = 7;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
PreEncodeFrameHookSetup(video, encoder);
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Keep track of number of non-reference frames, needed for mismatch check.
|
||||
// Non-reference frames are top spatial and temporal layer frames,
|
||||
// for TL > 0.
|
||||
@@ -67,12 +67,12 @@ class ScalePartitionOnePassCbrSvc
|
||||
num_nonref_frames_++;
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) {
|
||||
void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) override {
|
||||
++mismatch_nframes_;
|
||||
}
|
||||
|
||||
virtual void SetConfig(const int /*num_temporal_layer*/) {}
|
||||
void SetConfig(const int /*num_temporal_layer*/) override {}
|
||||
|
||||
unsigned int GetMismatchFrames() const { return mismatch_nframes_; }
|
||||
unsigned int GetNonRefFrames() const { return num_nonref_frames_; }
|
||||
@@ -129,14 +129,14 @@ class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~SyncFrameOnePassCbrSvc() {}
|
||||
~SyncFrameOnePassCbrSvc() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
speed_setting_ = 7;
|
||||
}
|
||||
|
||||
virtual bool DoDecode() const {
|
||||
bool DoDecode() const override {
|
||||
return current_video_frame_ >= frame_to_start_decode_;
|
||||
}
|
||||
|
||||
@@ -225,8 +225,8 @@ class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
current_video_frame_ = video->frame();
|
||||
PreEncodeFrameHookSetup(video, encoder);
|
||||
if (video->frame() == 0) {
|
||||
@@ -265,8 +265,8 @@ class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
|
||||
#if CONFIG_VP9_DECODER
|
||||
virtual void PreDecodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Decoder *decoder) {
|
||||
void PreDecodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Decoder *decoder) override {
|
||||
if (video->frame() < frame_to_sync_) {
|
||||
if (decode_to_layer_before_sync_ >= 0)
|
||||
decoder->Control(VP9_DECODE_SVC_SPATIAL_LAYER,
|
||||
@@ -284,7 +284,7 @@ class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Keep track of number of non-reference frames, needed for mismatch check.
|
||||
// Non-reference frames are top spatial and temporal layer frames,
|
||||
// for TL > 0.
|
||||
@@ -307,8 +307,8 @@ class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) {
|
||||
void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) override {
|
||||
if (current_video_frame_ >= frame_to_sync_) ++mismatch_nframes_;
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ class SyncFrameOnePassCbrSvc : public OnePassCbrSvc,
|
||||
vpx_svc_ref_frame_config_t ref_frame_config_;
|
||||
|
||||
private:
|
||||
virtual void SetConfig(const int num_temporal_layer) {
|
||||
void SetConfig(const int num_temporal_layer) override {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
@@ -657,15 +657,15 @@ class LoopfilterOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~LoopfilterOnePassCbrSvc() {}
|
||||
~LoopfilterOnePassCbrSvc() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
speed_setting_ = 7;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
PreEncodeFrameHookSetup(video, encoder);
|
||||
if (number_temporal_layers_ > 1 || number_spatial_layers_ > 1) {
|
||||
// Consider 3 cases:
|
||||
@@ -694,7 +694,7 @@ class LoopfilterOnePassCbrSvc : public OnePassCbrSvc,
|
||||
}
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Keep track of number of non-reference frames, needed for mismatch check.
|
||||
// Non-reference frames are top spatial and temporal layer frames,
|
||||
// for TL > 0.
|
||||
@@ -704,12 +704,12 @@ class LoopfilterOnePassCbrSvc : public OnePassCbrSvc,
|
||||
num_nonref_frames_++;
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) {
|
||||
void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) override {
|
||||
++mismatch_nframes_;
|
||||
}
|
||||
|
||||
virtual void SetConfig(const int /*num_temporal_layer*/) {}
|
||||
void SetConfig(const int /*num_temporal_layer*/) override {}
|
||||
|
||||
int GetMismatchFrames() const { return mismatch_nframes_; }
|
||||
int GetNonRefFrames() const { return num_nonref_frames_; }
|
||||
|
||||
@@ -48,7 +48,7 @@ class TestVectorTest : public ::libvpx_test::DecoderTest,
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual ~TestVectorTest() {
|
||||
~TestVectorTest() override {
|
||||
if (md5_file_) fclose(md5_file_);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,8 @@ class TestVectorTest : public ::libvpx_test::DecoderTest,
|
||||
}
|
||||
|
||||
#if CONFIG_VP9_DECODER
|
||||
virtual void PreDecodeFrameHook(
|
||||
const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
void PreDecodeFrameHook(const libvpx_test::CompressedVideoSource &video,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
if (video.frame_number() == 0 && mt_mode_ >= 0) {
|
||||
if (mt_mode_ == 1) {
|
||||
decoder->Control(VP9D_SET_LOOP_FILTER_OPT, 1);
|
||||
@@ -77,8 +76,8 @@ class TestVectorTest : public ::libvpx_test::DecoderTest,
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) {
|
||||
void DecompressedFrameHook(const vpx_image_t &img,
|
||||
const unsigned int frame_number) override {
|
||||
ASSERT_NE(md5_file_, nullptr);
|
||||
char expected_md5[33];
|
||||
char junk[128];
|
||||
|
||||
@@ -36,18 +36,18 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
|
||||
inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1);
|
||||
}
|
||||
|
||||
virtual ~TileIndependenceTest() {
|
||||
~TileIndependenceTest() override {
|
||||
delete fw_dec_;
|
||||
delete inv_dec_;
|
||||
}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(libvpx_test::kTwoPassGood);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, n_tiles_);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
|
||||
md5->Add(img);
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
UpdateMD5(fw_dec_, pkt, &md5_fw_order_);
|
||||
UpdateMD5(inv_dec_, pkt, &md5_inv_order_);
|
||||
}
|
||||
|
||||
@@ -42,16 +42,16 @@ class DummyTimebaseVideoSource : public ::libvpx_test::DummyVideoSource {
|
||||
(static_cast<double>(framerate_numerator_) / framerate_denominator_);
|
||||
}
|
||||
|
||||
virtual vpx_codec_pts_t pts() const {
|
||||
vpx_codec_pts_t pts() const override {
|
||||
return static_cast<vpx_codec_pts_t>(frame_ * FrameDuration() +
|
||||
starting_pts_ + 0.5);
|
||||
}
|
||||
|
||||
virtual unsigned long duration() const {
|
||||
unsigned long duration() const override {
|
||||
return static_cast<unsigned long>(FrameDuration() + 0.5);
|
||||
}
|
||||
|
||||
virtual vpx_rational_t timebase() const { return timebase_; }
|
||||
vpx_rational_t timebase() const override { return timebase_; }
|
||||
|
||||
void set_starting_pts(int64_t starting_pts) { starting_pts_ = starting_pts; }
|
||||
|
||||
@@ -67,9 +67,9 @@ class TimestampTest
|
||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
||||
protected:
|
||||
TimestampTest() : EncoderTest(GET_PARAM(0)) {}
|
||||
virtual ~TimestampTest() {}
|
||||
~TimestampTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> {
|
||||
public:
|
||||
SumOfSquaresTest() : func_(GetParam()) {}
|
||||
|
||||
virtual ~SumOfSquaresTest() { libvpx_test::ClearSystemState(); }
|
||||
~SumOfSquaresTest() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
void ConstTest();
|
||||
@@ -289,7 +289,7 @@ template <typename FunctionType>
|
||||
class MainTestClass
|
||||
: public ::testing::TestWithParam<TestParams<FunctionType> > {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
params_ = this->GetParam();
|
||||
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
@@ -308,7 +308,7 @@ class MainTestClass
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
if (use_high_bit_depth()) {
|
||||
// TODO(skal): remove!
|
||||
@@ -568,7 +568,7 @@ template <typename FunctionType>
|
||||
class SubpelVarianceTest
|
||||
: public ::testing::TestWithParam<TestParams<FunctionType> > {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
params_ = this->GetParam();
|
||||
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
@@ -592,7 +592,7 @@ class SubpelVarianceTest
|
||||
ASSERT_NE(ref_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
if (!use_high_bit_depth()) {
|
||||
vpx_free(src_);
|
||||
vpx_free(sec_);
|
||||
|
||||
@@ -24,10 +24,10 @@ class DatarateTestLarge
|
||||
public:
|
||||
DatarateTestLarge() : EncoderTest(GET_PARAM(0)) {}
|
||||
|
||||
virtual ~DatarateTestLarge() {}
|
||||
~DatarateTestLarge() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
set_cpu_used_ = GET_PARAM(2);
|
||||
@@ -47,8 +47,8 @@ class DatarateTestLarge
|
||||
use_roi_ = false;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_NOISE_SENSITIVITY, denoiser_on_);
|
||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||
@@ -74,7 +74,7 @@ class DatarateTestLarge
|
||||
duration_ = 0;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Time since last timestamp = duration.
|
||||
vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
|
||||
|
||||
@@ -121,7 +121,7 @@ class DatarateTestLarge
|
||||
++frame_number_;
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
if (bits_total_) {
|
||||
const double file_size_in_kb = bits_total_ / 1000.; // bits per kilobit
|
||||
|
||||
@@ -301,7 +301,7 @@ TEST_P(DatarateTestLarge, DropFramesMultiThreads) {
|
||||
|
||||
class DatarateTestRealTime : public DatarateTestLarge {
|
||||
public:
|
||||
virtual ~DatarateTestRealTime() {}
|
||||
~DatarateTestRealTime() override {}
|
||||
};
|
||||
|
||||
#if CONFIG_TEMPORAL_DENOISING
|
||||
|
||||
@@ -30,11 +30,11 @@ namespace {
|
||||
const int kNumPixels = 16 * 16;
|
||||
class VP8DenoiserTest : public ::testing::TestWithParam<int> {
|
||||
public:
|
||||
virtual ~VP8DenoiserTest() {}
|
||||
~VP8DenoiserTest() override {}
|
||||
|
||||
virtual void SetUp() { increase_denoising_ = GetParam(); }
|
||||
void SetUp() override { increase_denoising_ = GetParam(); }
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
int increase_denoising_;
|
||||
|
||||
@@ -74,7 +74,7 @@ using libvpx_test::ACMRandom;
|
||||
|
||||
class FdctTest : public ::testing::TestWithParam<FdctFunc> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
fdct_func_ = GetParam();
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ class VP8FragmentsTest : public ::libvpx_test::EncoderTest,
|
||||
public ::testing::Test {
|
||||
protected:
|
||||
VP8FragmentsTest() : EncoderTest(&::libvpx_test::kVP8) {}
|
||||
virtual ~VP8FragmentsTest() {}
|
||||
~VP8FragmentsTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
const unsigned long init_flags = // NOLINT(runtime/int)
|
||||
VPX_CODEC_USE_OUTPUT_PARTITION;
|
||||
InitializeConfig();
|
||||
|
||||
@@ -53,10 +53,10 @@ class Vp8RcInterfaceTest
|
||||
public:
|
||||
Vp8RcInterfaceTest()
|
||||
: EncoderTest(GET_PARAM(0)), key_interval_(3000), encoder_exit_(false) {}
|
||||
virtual ~Vp8RcInterfaceTest() {}
|
||||
~Vp8RcInterfaceTest() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
}
|
||||
@@ -111,8 +111,8 @@ class Vp8RcInterfaceTest
|
||||
return layer_id;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (rc_cfg_.ts_number_layers > 1) {
|
||||
const int layer_id = SetLayerId(video->frame(), cfg_.ts_number_layers);
|
||||
const int frame_flags =
|
||||
@@ -139,7 +139,7 @@ class Vp8RcInterfaceTest
|
||||
encoder_exit_ = video->frame() == test_video_.frames;
|
||||
}
|
||||
|
||||
virtual void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) {
|
||||
void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) override {
|
||||
if (encoder_exit_) {
|
||||
return;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ class Vp8RcInterfaceTest
|
||||
ASSERT_EQ(rc_api_->GetQP(), qp);
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
rc_api_->PostEncodeUpdate(pkt->data.frame.sz);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ class ArfFreqTest
|
||||
: EncoderTest(GET_PARAM(0)), test_video_param_(GET_PARAM(1)),
|
||||
test_encode_param_(GET_PARAM(2)), min_arf_requested_(GET_PARAM(3)) {}
|
||||
|
||||
virtual ~ArfFreqTest() {}
|
||||
~ArfFreqTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(test_encode_param_.mode);
|
||||
if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
|
||||
@@ -104,7 +104,7 @@ class ArfFreqTest
|
||||
dec_cfg_.threads = 4;
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int) {
|
||||
void BeginPassHook(unsigned int) override {
|
||||
min_run_ = ARF_NOT_SEEN;
|
||||
run_of_visible_frames_ = 0;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class ArfFreqTest
|
||||
return frames;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return;
|
||||
const int frames = GetNumFramesInPkt(pkt);
|
||||
if (frames == 1) {
|
||||
@@ -145,8 +145,8 @@ class ArfFreqTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
|
||||
|
||||
@@ -53,14 +53,14 @@ int64_t BlockError8BitWrapper(const tran_low_t *coeff,
|
||||
|
||||
class BlockErrorTest : public ::testing::TestWithParam<BlockErrorParam> {
|
||||
public:
|
||||
virtual ~BlockErrorTest() {}
|
||||
virtual void SetUp() {
|
||||
~BlockErrorTest() override {}
|
||||
void SetUp() override {
|
||||
error_block_op_ = GET_PARAM(0);
|
||||
ref_error_block_op_ = GET_PARAM(1);
|
||||
bit_depth_ = GET_PARAM(2);
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
vpx_bit_depth_t bit_depth_;
|
||||
|
||||
+20
-20
@@ -28,7 +28,7 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest {
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~DatarateTestVP9() {}
|
||||
~DatarateTestVP9() override {}
|
||||
|
||||
virtual void ResetModel() {
|
||||
last_pts_ = 0;
|
||||
@@ -113,8 +113,8 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest {
|
||||
return layer_id;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
|
||||
@@ -164,7 +164,7 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest {
|
||||
duration_ = 0;
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
// Time since last timestamp = duration.
|
||||
vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
|
||||
|
||||
@@ -202,7 +202,7 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest {
|
||||
++tot_frame_number_;
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
for (int layer = 0; layer < static_cast<int>(cfg_.ts_number_layers);
|
||||
++layer) {
|
||||
duration_ = (last_pts_ + 1) * timebase_;
|
||||
@@ -243,7 +243,7 @@ class DatarateTestVP9RealTimeMultiBR
|
||||
DatarateTestVP9RealTimeMultiBR() : DatarateTestVP9(GET_PARAM(0)) {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
set_cpu_used_ = GET_PARAM(1);
|
||||
@@ -259,7 +259,7 @@ class DatarateTestVP9LargeVBR
|
||||
DatarateTestVP9LargeVBR() : DatarateTestVP9(GET_PARAM(0)) {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
set_cpu_used_ = GET_PARAM(1);
|
||||
@@ -579,10 +579,10 @@ class DatarateTestVP9RealTime : public DatarateTestVP9,
|
||||
public ::libvpx_test::CodecTestWithParam<int> {
|
||||
public:
|
||||
DatarateTestVP9RealTime() : DatarateTestVP9(GET_PARAM(0)) {}
|
||||
virtual ~DatarateTestVP9RealTime() {}
|
||||
~DatarateTestVP9RealTime() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
set_cpu_used_ = GET_PARAM(1);
|
||||
@@ -731,10 +731,10 @@ class DatarateTestVP9RealTimeDeltaQUV
|
||||
public ::libvpx_test::CodecTestWith2Params<int, int> {
|
||||
public:
|
||||
DatarateTestVP9RealTimeDeltaQUV() : DatarateTestVP9(GET_PARAM(0)) {}
|
||||
virtual ~DatarateTestVP9RealTimeDeltaQUV() {}
|
||||
~DatarateTestVP9RealTimeDeltaQUV() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
set_cpu_used_ = GET_PARAM(1);
|
||||
@@ -779,7 +779,7 @@ class DatarateTestVP9PostEncodeDrop
|
||||
DatarateTestVP9PostEncodeDrop() : DatarateTestVP9(GET_PARAM(0)) {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
set_cpu_used_ = GET_PARAM(1);
|
||||
@@ -819,17 +819,17 @@ class DatarateTestVP9FrameQp
|
||||
public ::testing::TestWithParam<const libvpx_test::CodecFactory *> {
|
||||
public:
|
||||
DatarateTestVP9FrameQp() : DatarateTestVP9(GetParam()), frame_(0) {}
|
||||
virtual ~DatarateTestVP9FrameQp() {}
|
||||
~DatarateTestVP9FrameQp() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
ResetModel();
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
set_cpu_used_ = 7;
|
||||
DatarateTestVP9::PreEncodeFrameHook(video, encoder);
|
||||
frame_qp_ = static_cast<int>(rnd_.RandRange(64));
|
||||
@@ -837,7 +837,7 @@ class DatarateTestVP9FrameQp
|
||||
frame_++;
|
||||
}
|
||||
|
||||
virtual void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) {
|
||||
void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) override {
|
||||
int qp = 0;
|
||||
vpx_svc_layer_id_t layer_id;
|
||||
if (frame_ >= total_frame_) return;
|
||||
@@ -847,8 +847,8 @@ class DatarateTestVP9FrameQp
|
||||
temporal_layer_id_ = layer_id.temporal_layer_id;
|
||||
}
|
||||
|
||||
virtual void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) {
|
||||
void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) override {
|
||||
if (frame_ >= total_frame_) return;
|
||||
ASSERT_TRUE(cfg_.temporal_layering_mode ==
|
||||
VP9E_TEMPORAL_LAYERING_MODE_0212 &&
|
||||
@@ -945,7 +945,7 @@ TEST_P(DatarateTestVP9FrameQp, VP9SetFrameQp3TemporalLayersFixedMode) {
|
||||
// Params: speed setting.
|
||||
class DatarateTestVP9RealTimeDenoiser : public DatarateTestVP9RealTime {
|
||||
public:
|
||||
virtual ~DatarateTestVP9RealTimeDenoiser() {}
|
||||
~DatarateTestVP9RealTimeDenoiser() override {}
|
||||
};
|
||||
|
||||
// Check basic datarate targeting, for a single bitrate, when denoiser is on.
|
||||
|
||||
@@ -42,11 +42,11 @@ class VP9DenoiserTest
|
||||
: public ::testing::Test,
|
||||
public ::testing::WithParamInterface<VP9DenoiserTestParam> {
|
||||
public:
|
||||
virtual ~VP9DenoiserTest() {}
|
||||
~VP9DenoiserTest() override {}
|
||||
|
||||
virtual void SetUp() { bs_ = GET_PARAM(1); }
|
||||
void SetUp() override { bs_ = GET_PARAM(1); }
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
BLOCK_SIZE bs_;
|
||||
|
||||
@@ -62,9 +62,9 @@ class VpxEncoderParmsGetToDecoder
|
||||
VpxEncoderParmsGetToDecoder()
|
||||
: EncoderTest(GET_PARAM(0)), encode_parms(GET_PARAM(1)) {}
|
||||
|
||||
virtual ~VpxEncoderParmsGetToDecoder() {}
|
||||
~VpxEncoderParmsGetToDecoder() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kTwoPassGood);
|
||||
cfg_.g_lag_in_frames = 25;
|
||||
@@ -74,8 +74,8 @@ class VpxEncoderParmsGetToDecoder
|
||||
cfg_.rc_target_bitrate = test_video_.bitrate;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
||||
encoder->Control(VP9E_SET_COLOR_RANGE, encode_parms.color_range);
|
||||
@@ -95,9 +95,9 @@ class VpxEncoderParmsGetToDecoder
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder *decoder) {
|
||||
bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder *decoder) override {
|
||||
vpx_codec_ctx_t *const vp9_decoder = decoder->GetDecoder();
|
||||
vpx_codec_alg_priv_t *const priv =
|
||||
reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv);
|
||||
|
||||
+16
-16
@@ -89,9 +89,9 @@ class EndToEndTestAdaptiveRDThresh
|
||||
: EncoderTest(GET_PARAM(0)), cpu_used_start_(GET_PARAM(1)),
|
||||
cpu_used_end_(GET_PARAM(2)) {}
|
||||
|
||||
virtual ~EndToEndTestAdaptiveRDThresh() {}
|
||||
~EndToEndTestAdaptiveRDThresh() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
@@ -102,8 +102,8 @@ class EndToEndTestAdaptiveRDThresh
|
||||
dec_cfg_.threads = 4;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, cpu_used_start_);
|
||||
encoder->Control(VP9E_SET_ROW_MT, 1);
|
||||
@@ -131,9 +131,9 @@ class EndToEndTestLarge
|
||||
denoiser_on_ = 0;
|
||||
}
|
||||
|
||||
virtual ~EndToEndTestLarge() {}
|
||||
~EndToEndTestLarge() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||
@@ -149,18 +149,18 @@ class EndToEndTestLarge
|
||||
dec_cfg_.threads = 4;
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int) {
|
||||
void BeginPassHook(unsigned int) override {
|
||||
psnr_ = 0.0;
|
||||
nframes_ = 0;
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
psnr_ += pkt->data.psnr.psnr[0];
|
||||
nframes_++;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
|
||||
@@ -207,9 +207,9 @@ class EndToEndTestLoopFilterThreading
|
||||
EndToEndTestLoopFilterThreading()
|
||||
: EncoderTest(GET_PARAM(0)), use_loop_filter_opt_(GET_PARAM(1)) {}
|
||||
|
||||
virtual ~EndToEndTestLoopFilterThreading() {}
|
||||
~EndToEndTestLoopFilterThreading() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
cfg_.g_threads = 2;
|
||||
@@ -221,16 +221,16 @@ class EndToEndTestLoopFilterThreading
|
||||
dec_cfg_.threads = GET_PARAM(2);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, 8);
|
||||
}
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 4 - video->frame() % 5);
|
||||
}
|
||||
|
||||
virtual void PreDecodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Decoder *decoder) {
|
||||
void PreDecodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Decoder *decoder) override {
|
||||
if (video->frame() == 0) {
|
||||
decoder->Control(VP9D_SET_LOOP_FILTER_OPT, use_loop_filter_opt_ ? 1 : 0);
|
||||
}
|
||||
|
||||
+18
-18
@@ -44,9 +44,9 @@ class VPxFirstPassEncoderThreadTest
|
||||
firstpass_stats_.buf = nullptr;
|
||||
firstpass_stats_.sz = 0;
|
||||
}
|
||||
virtual ~VPxFirstPassEncoderThreadTest() { free(firstpass_stats_.buf); }
|
||||
~VPxFirstPassEncoderThreadTest() override { free(firstpass_stats_.buf); }
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
|
||||
@@ -57,19 +57,19 @@ class VPxFirstPassEncoderThreadTest
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
encoder_initialized_ = false;
|
||||
abort_ = false;
|
||||
}
|
||||
|
||||
virtual void EndPassHook() {
|
||||
void EndPassHook() override {
|
||||
// For first pass stats test, only run first pass encoder.
|
||||
if (first_pass_only_ && cfg_.g_pass == VPX_RC_FIRST_PASS)
|
||||
abort_ |= first_pass_only_;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource * /*video*/,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource * /*video*/,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (!encoder_initialized_) {
|
||||
// Encode in 2-pass mode.
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, tiles_);
|
||||
@@ -87,7 +87,7 @@ class VPxFirstPassEncoderThreadTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void StatsPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void StatsPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
const uint8_t *const pkt_buf =
|
||||
reinterpret_cast<uint8_t *>(pkt->data.twopass_stats.buf);
|
||||
const size_t pkt_size = pkt->data.twopass_stats.sz;
|
||||
@@ -233,9 +233,9 @@ class VPxEncoderThreadTest
|
||||
psnr_ = 0.0;
|
||||
nframes_ = 0;
|
||||
}
|
||||
virtual ~VPxEncoderThreadTest() {}
|
||||
~VPxEncoderThreadTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
|
||||
@@ -252,14 +252,14 @@ class VPxEncoderThreadTest
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
encoder_initialized_ = false;
|
||||
psnr_ = 0.0;
|
||||
nframes_ = 0;
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource * /*video*/,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource * /*video*/,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (!encoder_initialized_) {
|
||||
// Encode 4 column tiles.
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, tiles_);
|
||||
@@ -280,21 +280,21 @@ class VPxEncoderThreadTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
psnr_ += pkt->data.psnr.psnr[0];
|
||||
nframes_++;
|
||||
}
|
||||
|
||||
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||
vpx_codec_pts_t /*pts*/) {
|
||||
void DecompressedFrameHook(const vpx_image_t &img,
|
||||
vpx_codec_pts_t /*pts*/) override {
|
||||
::libvpx_test::MD5 md5_res;
|
||||
md5_res.Add(&img);
|
||||
md5_.push_back(md5_res.Get());
|
||||
}
|
||||
|
||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder * /*decoder*/) {
|
||||
bool HandleDecodeResult(const vpx_codec_err_t res,
|
||||
const libvpx_test::VideoSource & /*video*/,
|
||||
libvpx_test::Decoder * /*decoder*/) override {
|
||||
if (res != VPX_CODEC_OK) {
|
||||
EXPECT_EQ(VPX_CODEC_OK, res);
|
||||
return false;
|
||||
|
||||
@@ -96,7 +96,7 @@ class IntraPredTest : public ::testing::TestWithParam<PredParam> {
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
params_ = this->GetParam();
|
||||
stride_ = params_.block_size * 3;
|
||||
mask_ = (1 << params_.bit_depth) - 1;
|
||||
|
||||
@@ -29,15 +29,15 @@ class LosslessTest
|
||||
: EncoderTest(GET_PARAM(0)), psnr_(kMaxPsnr), nframes_(0),
|
||||
encoding_mode_(GET_PARAM(1)) {}
|
||||
|
||||
virtual ~LosslessTest() {}
|
||||
~LosslessTest() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
// Only call Control if quantizer > 0 to verify that using quantizer
|
||||
// alone will activate lossless
|
||||
@@ -47,12 +47,12 @@ class LosslessTest
|
||||
}
|
||||
}
|
||||
|
||||
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||
void BeginPassHook(unsigned int /*pass*/) override {
|
||||
psnr_ = kMaxPsnr;
|
||||
nframes_ = 0;
|
||||
}
|
||||
|
||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
if (pkt->data.psnr.psnr[0] < psnr_) psnr_ = pkt->data.psnr.psnr[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ class MotionVectorTestLarge
|
||||
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
|
||||
cpu_used_(GET_PARAM(2)), mv_test_mode_(GET_PARAM(3)) {}
|
||||
|
||||
virtual ~MotionVectorTestLarge() {}
|
||||
~MotionVectorTestLarge() override {}
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||
@@ -59,8 +59,8 @@ class MotionVectorTestLarge
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||
encoder->Control(VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST, mv_test_mode_);
|
||||
|
||||
@@ -174,7 +174,7 @@ class VP9QuantizeBase : public AbstractBench {
|
||||
q_ptr_ = (is_fp_) ? quant_fp_ptr_ : quant_ptr_;
|
||||
}
|
||||
|
||||
~VP9QuantizeBase() {
|
||||
~VP9QuantizeBase() override {
|
||||
vpx_free(mb_plane_);
|
||||
vpx_free(zbin_ptr_);
|
||||
vpx_free(round_fp_ptr_);
|
||||
@@ -225,7 +225,7 @@ class VP9QuantizeTest : public VP9QuantizeBase,
|
||||
quantize_op_(GET_PARAM(0)), ref_quantize_op_(GET_PARAM(1)) {}
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
void Run() override;
|
||||
void Speed(bool is_median);
|
||||
const QuantizeFunc quantize_op_;
|
||||
const QuantizeFunc ref_quantize_op_;
|
||||
|
||||
@@ -40,16 +40,16 @@ class RcInterfaceTest
|
||||
: EncoderTest(GET_PARAM(0)), aq_mode_(GET_PARAM(1)), key_interval_(3000),
|
||||
encoder_exit_(false) {}
|
||||
|
||||
virtual ~RcInterfaceTest() {}
|
||||
~RcInterfaceTest() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, 7);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
|
||||
@@ -69,7 +69,7 @@ class RcInterfaceTest
|
||||
encoder_exit_ = video->frame() == kNumFrames;
|
||||
}
|
||||
|
||||
virtual void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) {
|
||||
void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) override {
|
||||
if (encoder_exit_) {
|
||||
return;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ class RcInterfaceTest
|
||||
ASSERT_EQ(rc_api_->GetLoopfilterLevel(), loopfilter_level);
|
||||
}
|
||||
|
||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
|
||||
rc_api_->PostEncodeUpdate(pkt->data.frame.sz, frame_params_);
|
||||
}
|
||||
|
||||
@@ -170,16 +170,16 @@ class RcInterfaceSvcTest
|
||||
: EncoderTest(GET_PARAM(0)), aq_mode_(GET_PARAM(1)), key_interval_(3000),
|
||||
dynamic_spatial_layers_(0), inter_layer_pred_off_(GET_PARAM(2)),
|
||||
parallel_spatial_layers_(false) {}
|
||||
virtual ~RcInterfaceSvcTest() {}
|
||||
~RcInterfaceSvcTest() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, 7);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
|
||||
@@ -256,7 +256,7 @@ class RcInterfaceSvcTest
|
||||
: libvpx::RcFrameType::kInterFrame;
|
||||
}
|
||||
|
||||
virtual void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) {
|
||||
void PostEncodeFrameHook(::libvpx_test::Encoder *encoder) override {
|
||||
::libvpx_test::CxDataIterator iter = encoder->GetCxData();
|
||||
for (int sl = 0; sl < rc_cfg_.ss_number_layers; sl++) sizes_[sl] = 0;
|
||||
std::vector<int> rc_qp;
|
||||
@@ -301,8 +301,8 @@ class RcInterfaceSvcTest
|
||||
// This method needs to be overridden because non-reference frames are
|
||||
// expected to be mismatched frames as the encoder will avoid loopfilter on
|
||||
// these frames.
|
||||
virtual void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) {}
|
||||
void MismatchHook(const vpx_image_t * /*img1*/,
|
||||
const vpx_image_t * /*img2*/) override {}
|
||||
|
||||
void RunSvc() {
|
||||
SetRCConfigSvc(3, 3);
|
||||
|
||||
@@ -84,9 +84,9 @@ class RoiMaskBackgroundSkip : public ::libvpx_test::EncoderTest,
|
||||
public ::testing::Test {
|
||||
protected:
|
||||
RoiMaskBackgroundSkip() : EncoderTest(&::libvpx_test::kVP9) {}
|
||||
virtual ~RoiMaskBackgroundSkip() { free(roi_.roi_map); }
|
||||
~RoiMaskBackgroundSkip() override { free(roi_.roi_map); }
|
||||
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
InitializeConfig();
|
||||
SetMode(::libvpx_test::kRealTime);
|
||||
SetRoi();
|
||||
@@ -114,8 +114,8 @@ class RoiMaskBackgroundSkip : public ::libvpx_test::EncoderTest,
|
||||
}
|
||||
}
|
||||
|
||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||
::libvpx_test::Encoder *encoder) override {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, 7);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, 3);
|
||||
|
||||
@@ -33,10 +33,10 @@ typedef void (*ScaleFrameFunc)(const YV12_BUFFER_CONFIG *src,
|
||||
class ScaleTest : public VpxScaleBase,
|
||||
public ::testing::TestWithParam<ScaleFrameFunc> {
|
||||
public:
|
||||
virtual ~ScaleTest() {}
|
||||
~ScaleTest() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() { scale_fn_ = GetParam(); }
|
||||
void SetUp() override { scale_fn_ = GetParam(); }
|
||||
|
||||
void ReferenceScaleFrame(INTERP_FILTER filter_type, int phase_scaler) {
|
||||
vp9_scale_and_extend_frame_c(&img_, &ref_img_, filter_type, phase_scaler);
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace vp9 {
|
||||
class VP9SubtractBlockTest : public AbstractBench,
|
||||
public ::testing::TestWithParam<SubtractFunc> {
|
||||
public:
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
void TearDown() override { libvpx_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
virtual void Run() {
|
||||
void Run() override {
|
||||
GetParam()(block_height_, block_width_, diff_, block_width_, src_,
|
||||
block_width_, pred_, block_width_);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ using Params = std::tuple<BLOCK_SIZE, int, HBDSubtractFunc, HBDSubtractFunc>;
|
||||
|
||||
class VPXHBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
block_width_ = 4 * num_4x4_blocks_wide_lookup[GET_PARAM(0)];
|
||||
block_height_ = 4 * num_4x4_blocks_high_lookup[GET_PARAM(0)];
|
||||
bit_depth_ = static_cast<vpx_bit_depth_t>(GET_PARAM(1));
|
||||
@@ -198,7 +198,7 @@ class VPXHBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
|
||||
ASSERT_NE(diff_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
void TearDown() override {
|
||||
vpx_free(CONVERT_TO_SHORTPTR(src_));
|
||||
vpx_free(CONVERT_TO_SHORTPTR(pred_));
|
||||
vpx_free(diff_);
|
||||
|
||||
@@ -26,10 +26,10 @@ using std::string;
|
||||
|
||||
class VPxWorkerThreadTest : public ::testing::TestWithParam<bool> {
|
||||
protected:
|
||||
virtual ~VPxWorkerThreadTest() {}
|
||||
virtual void SetUp() { vpx_get_worker_interface()->init(&worker_); }
|
||||
~VPxWorkerThreadTest() override {}
|
||||
void SetUp() override { vpx_get_worker_interface()->init(&worker_); }
|
||||
|
||||
virtual void TearDown() { vpx_get_worker_interface()->end(&worker_); }
|
||||
void TearDown() override { vpx_get_worker_interface()->end(&worker_); }
|
||||
|
||||
void Run(VPxWorker *worker) {
|
||||
const bool synchronous = GetParam();
|
||||
|
||||
@@ -38,10 +38,10 @@ class ExtendBorderTest
|
||||
: public VpxScaleBase,
|
||||
public ::testing::TestWithParam<ExtendFrameBorderFunc> {
|
||||
public:
|
||||
virtual ~ExtendBorderTest() {}
|
||||
~ExtendBorderTest() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() { extend_fn_ = GetParam(); }
|
||||
void SetUp() override { extend_fn_ = GetParam(); }
|
||||
|
||||
void ExtendBorder() { ASM_REGISTER_STATE_CHECK(extend_fn_(&img_)); }
|
||||
|
||||
@@ -68,10 +68,10 @@ INSTANTIATE_TEST_SUITE_P(C, ExtendBorderTest,
|
||||
class CopyFrameTest : public VpxScaleBase,
|
||||
public ::testing::TestWithParam<CopyFrameFunc> {
|
||||
public:
|
||||
virtual ~CopyFrameTest() {}
|
||||
~CopyFrameTest() override {}
|
||||
|
||||
protected:
|
||||
virtual void SetUp() { copy_frame_fn_ = GetParam(); }
|
||||
void SetUp() override { copy_frame_fn_ = GetParam(); }
|
||||
|
||||
void CopyFrame() {
|
||||
ASM_REGISTER_STATE_CHECK(copy_frame_fn_(&img_, &dst_img_));
|
||||
|
||||
+3
-3
@@ -78,7 +78,7 @@ class Y4mVideoSourceTest : public ::testing::TestWithParam<Y4mTestParam>,
|
||||
protected:
|
||||
Y4mVideoSourceTest() : Y4mVideoSource("", 0, 0) {}
|
||||
|
||||
virtual ~Y4mVideoSourceTest() { CloseSource(); }
|
||||
~Y4mVideoSourceTest() override { CloseSource(); }
|
||||
|
||||
virtual void Init(const std::string &file_name, int limit) {
|
||||
file_name_ = file_name;
|
||||
@@ -140,7 +140,7 @@ class Y4mVideoWriteTest : public Y4mVideoSourceTest {
|
||||
protected:
|
||||
Y4mVideoWriteTest() : tmpfile_(nullptr) {}
|
||||
|
||||
virtual ~Y4mVideoWriteTest() {
|
||||
~Y4mVideoWriteTest() override {
|
||||
delete tmpfile_;
|
||||
input_file_ = nullptr;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ class Y4mVideoWriteTest : public Y4mVideoSourceTest {
|
||||
ReplaceInputFile(tmpfile_->file());
|
||||
}
|
||||
|
||||
virtual void Init(const std::string &file_name, int limit) {
|
||||
void Init(const std::string &file_name, int limit) override {
|
||||
Y4mVideoSourceTest::Init(file_name, limit);
|
||||
WriteY4mAndReadBack();
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void ApplyReferenceFilter(
|
||||
class YUVTemporalFilterTest
|
||||
: public ::testing::TestWithParam<TemporalFilterWithBd> {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
void SetUp() override {
|
||||
filter_func_ = GetParam().temporal_filter;
|
||||
bd_ = GetParam().bd;
|
||||
use_highbd_ = (bd_ != 8);
|
||||
|
||||
Reference in New Issue
Block a user