| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #ifndef TEST_ENCODE_TEST_DRIVER_H_ | 10 #ifndef TEST_ENCODE_TEST_DRIVER_H_ |
| 11 #define TEST_ENCODE_TEST_DRIVER_H_ | 11 #define TEST_ENCODE_TEST_DRIVER_H_ |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "third_party/googletest/src/include/gtest/gtest.h" | 16 #include "third_party/googletest/src/include/gtest/gtest.h" |
| 17 | 17 |
| 18 #include "./vpx_config.h" | 18 #include "./vpx_config.h" |
| 19 #if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER | 19 #if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER |
| 20 #include "vpx/vp8cx.h" | 20 #include "vpx/vp8cx.h" |
| 21 #endif | 21 #endif |
| 22 #include "vpx/vpx_encoder.h" | 22 #include "vpx/vpx_encoder.h" |
| 23 | 23 |
| 24 namespace libvpx_test { | 24 namespace libvpx_test { |
| 25 | 25 |
| 26 class CodecFactory; | 26 class CodecFactory; |
| 27 class VideoSource; | 27 class VideoSource; |
| 28 | 28 |
| 29 enum TestMode { | 29 enum TestMode { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 void Control(int ctrl_id, struct vpx_svc_layer_id *arg) { | 132 void Control(int ctrl_id, struct vpx_svc_layer_id *arg) { |
| 133 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); | 133 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); |
| 134 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); | 134 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void Control(int ctrl_id, struct vpx_svc_parameters *arg) { | 137 void Control(int ctrl_id, struct vpx_svc_parameters *arg) { |
| 138 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); | 138 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); |
| 139 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); | 139 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); |
| 140 } | 140 } |
| 141 #if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER | 141 #if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER |
| 142 void Control(int ctrl_id, vpx_active_map_t *arg) { | 142 void Control(int ctrl_id, vpx_active_map_t *arg) { |
| 143 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); | 143 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); |
| 144 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); | 144 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); |
| 145 } | 145 } |
| 146 #endif | 146 #endif |
| 147 | 147 |
| 148 void Config(const vpx_codec_enc_cfg_t *cfg) { | 148 void Config(const vpx_codec_enc_cfg_t *cfg) { |
| 149 const vpx_codec_err_t res = vpx_codec_enc_config_set(&encoder_, cfg); | 149 const vpx_codec_err_t res = vpx_codec_enc_config_set(&encoder_, cfg); |
| 150 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); | 150 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); |
| 151 cfg_ = *cfg; | 151 cfg_ = *cfg; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 unsigned long deadline_; | 264 unsigned long deadline_; |
| 265 TwopassStatsStore stats_; | 265 TwopassStatsStore stats_; |
| 266 unsigned long init_flags_; | 266 unsigned long init_flags_; |
| 267 unsigned long frame_flags_; | 267 unsigned long frame_flags_; |
| 268 vpx_codec_pts_t last_pts_; | 268 vpx_codec_pts_t last_pts_; |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 } // namespace libvpx_test | 271 } // namespace libvpx_test |
| 272 | 272 |
| 273 #endif // TEST_ENCODE_TEST_DRIVER_H_ | 273 #endif // TEST_ENCODE_TEST_DRIVER_H_ |
| OLD | NEW |