diff options
Diffstat (limited to 'media/libaom/src/test/encode_test_driver.h')
-rw-r--r-- | media/libaom/src/test/encode_test_driver.h | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/media/libaom/src/test/encode_test_driver.h b/media/libaom/src/test/encode_test_driver.h index 4f3f855cf9..6319a52202 100644 --- a/media/libaom/src/test/encode_test_driver.h +++ b/media/libaom/src/test/encode_test_driver.h @@ -82,7 +82,7 @@ class TwopassStatsStore { // level of abstraction will be fleshed out as more tests are written. class Encoder { public: - Encoder(aom_codec_enc_cfg_t cfg, const uint32_t init_flags, + Encoder(aom_codec_enc_cfg_t cfg, const aom_codec_flags_t init_flags, TwopassStatsStore *stats) : cfg_(cfg), init_flags_(init_flags), stats_(stats) { memset(&encoder_, 0, sizeof(encoder_)); @@ -105,23 +105,38 @@ class Encoder { void EncodeFrame(VideoSource *video) { EncodeFrame(video, 0); } void Control(int ctrl_id, int arg) { - const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); } void Control(int ctrl_id, int *arg) { - const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); } void Control(int ctrl_id, struct aom_scaling_mode *arg) { - const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); + ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); + } + + void Control(int ctrl_id, struct aom_svc_layer_id *arg) { + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); + ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); + } + + void Control(int ctrl_id, struct aom_svc_ref_frame_config *arg) { + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); + ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); + } + + void Control(int ctrl_id, struct aom_svc_params *arg) { + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); } #if CONFIG_AV1_ENCODER void Control(int ctrl_id, aom_active_map_t *arg) { - const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control(&encoder_, ctrl_id, arg); ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError(); } #endif @@ -149,7 +164,7 @@ class Encoder { aom_codec_ctx_t encoder_; aom_codec_enc_cfg_t cfg_; - unsigned long init_flags_; + aom_codec_flags_t init_flags_; TwopassStatsStore *stats_; }; @@ -164,7 +179,7 @@ class EncoderTest { protected: explicit EncoderTest(const CodecFactory *codec) : codec_(codec), abort_(false), init_flags_(0), frame_flags_(0), - last_pts_(0), mode_(kRealTime) { + last_pts_(0), mode_(kRealTime), number_spatial_layers_(1) { // Default to 1 thread. cfg_.g_threads = 1; } @@ -178,9 +193,7 @@ class EncoderTest { void SetMode(TestMode mode); // Set encoder flag. - void set_init_flags(unsigned long flag) { // NOLINT(runtime/int) - init_flags_ = flag; - } + void set_init_flags(aom_codec_flags_t flag) { init_flags_ = flag; } // Main loop virtual void RunLoop(VideoSource *video); @@ -227,6 +240,8 @@ class EncoderTest { return AOM_CODEC_OK == res_dec; } + virtual int GetNumSpatialLayers() { return 1; } + // Hook that can modify the encoder's output data virtual const aom_codec_cx_pkt_t *MutateEncoderOutputHook( const aom_codec_cx_pkt_t *pkt) { @@ -238,10 +253,11 @@ class EncoderTest { aom_codec_enc_cfg_t cfg_; unsigned int passes_; TwopassStatsStore stats_; - unsigned long init_flags_; + aom_codec_flags_t init_flags_; unsigned long frame_flags_; aom_codec_pts_t last_pts_; TestMode mode_; + int number_spatial_layers_; }; } // namespace libaom_test |