Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: source/libvpx/test/codec_factory.h

Issue 812033011: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/byte_alignment_test.cc ('k') | source/libvpx/test/convolve_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 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_CODEC_FACTORY_H_ 10 #ifndef TEST_CODEC_FACTORY_H_
(...skipping 17 matching lines...) Expand all
28 28
29 class CodecFactory { 29 class CodecFactory {
30 public: 30 public:
31 CodecFactory() {} 31 CodecFactory() {}
32 32
33 virtual ~CodecFactory() {} 33 virtual ~CodecFactory() {}
34 34
35 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, 35 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
36 unsigned long deadline) const = 0; 36 unsigned long deadline) const = 0;
37 37
38 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
39 const vpx_codec_flags_t flags,
40 unsigned long deadline) // NOLINT(runtime/int)
41 const = 0;
42
38 virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg, 43 virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
39 unsigned long deadline, 44 unsigned long deadline,
40 const unsigned long init_flags, 45 const unsigned long init_flags,
41 TwopassStatsStore *stats) const = 0; 46 TwopassStatsStore *stats) const = 0;
42 47
43 virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg, 48 virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
44 int usage) const = 0; 49 int usage) const = 0;
45 }; 50 };
46 51
47 /* Provide CodecTestWith<n>Params classes for a variable number of parameters 52 /* Provide CodecTestWith<n>Params classes for a variable number of parameters
(...skipping 17 matching lines...) Expand all
65 70
66 /* 71 /*
67 * VP8 Codec Definitions 72 * VP8 Codec Definitions
68 */ 73 */
69 #if CONFIG_VP8 74 #if CONFIG_VP8
70 class VP8Decoder : public Decoder { 75 class VP8Decoder : public Decoder {
71 public: 76 public:
72 VP8Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline) 77 VP8Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
73 : Decoder(cfg, deadline) {} 78 : Decoder(cfg, deadline) {}
74 79
80 VP8Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
81 unsigned long deadline) // NOLINT
82 : Decoder(cfg, flag, deadline) {}
83
75 protected: 84 protected:
76 virtual vpx_codec_iface_t* CodecInterface() const { 85 virtual vpx_codec_iface_t* CodecInterface() const {
77 #if CONFIG_VP8_DECODER 86 #if CONFIG_VP8_DECODER
78 return &vpx_codec_vp8_dx_algo; 87 return &vpx_codec_vp8_dx_algo;
79 #else 88 #else
80 return NULL; 89 return NULL;
81 #endif 90 #endif
82 } 91 }
83 }; 92 };
84 93
(...skipping 12 matching lines...) Expand all
97 #endif 106 #endif
98 } 107 }
99 }; 108 };
100 109
101 class VP8CodecFactory : public CodecFactory { 110 class VP8CodecFactory : public CodecFactory {
102 public: 111 public:
103 VP8CodecFactory() : CodecFactory() {} 112 VP8CodecFactory() : CodecFactory() {}
104 113
105 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, 114 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
106 unsigned long deadline) const { 115 unsigned long deadline) const {
116 return CreateDecoder(cfg, 0, deadline);
117 }
118
119 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
120 const vpx_codec_flags_t flags,
121 unsigned long deadline) const { // NOLINT
107 #if CONFIG_VP8_DECODER 122 #if CONFIG_VP8_DECODER
108 return new VP8Decoder(cfg, deadline); 123 return new VP8Decoder(cfg, flags, deadline);
109 #else 124 #else
110 return NULL; 125 return NULL;
111 #endif 126 #endif
112 } 127 }
113 128
114 virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg, 129 virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
115 unsigned long deadline, 130 unsigned long deadline,
116 const unsigned long init_flags, 131 const unsigned long init_flags,
117 TwopassStatsStore *stats) const { 132 TwopassStatsStore *stats) const {
118 #if CONFIG_VP8_ENCODER 133 #if CONFIG_VP8_ENCODER
(...skipping 28 matching lines...) Expand all
147 162
148 /* 163 /*
149 * VP9 Codec Definitions 164 * VP9 Codec Definitions
150 */ 165 */
151 #if CONFIG_VP9 166 #if CONFIG_VP9
152 class VP9Decoder : public Decoder { 167 class VP9Decoder : public Decoder {
153 public: 168 public:
154 VP9Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline) 169 VP9Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
155 : Decoder(cfg, deadline) {} 170 : Decoder(cfg, deadline) {}
156 171
172 VP9Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
173 unsigned long deadline) // NOLINT
174 : Decoder(cfg, flag, deadline) {}
175
157 protected: 176 protected:
158 virtual vpx_codec_iface_t* CodecInterface() const { 177 virtual vpx_codec_iface_t* CodecInterface() const {
159 #if CONFIG_VP9_DECODER 178 #if CONFIG_VP9_DECODER
160 return &vpx_codec_vp9_dx_algo; 179 return &vpx_codec_vp9_dx_algo;
161 #else 180 #else
162 return NULL; 181 return NULL;
163 #endif 182 #endif
164 } 183 }
165 }; 184 };
166 185
(...skipping 12 matching lines...) Expand all
179 #endif 198 #endif
180 } 199 }
181 }; 200 };
182 201
183 class VP9CodecFactory : public CodecFactory { 202 class VP9CodecFactory : public CodecFactory {
184 public: 203 public:
185 VP9CodecFactory() : CodecFactory() {} 204 VP9CodecFactory() : CodecFactory() {}
186 205
187 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, 206 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
188 unsigned long deadline) const { 207 unsigned long deadline) const {
208 return CreateDecoder(cfg, 0, deadline);
209 }
210
211 virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
212 const vpx_codec_flags_t flags,
213 unsigned long deadline) const { // NOLINT
189 #if CONFIG_VP9_DECODER 214 #if CONFIG_VP9_DECODER
190 return new VP9Decoder(cfg, deadline); 215 return new VP9Decoder(cfg, flags, deadline);
191 #else 216 #else
192 return NULL; 217 return NULL;
193 #endif 218 #endif
194 } 219 }
195 220
196 virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg, 221 virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
197 unsigned long deadline, 222 unsigned long deadline,
198 const unsigned long init_flags, 223 const unsigned long init_flags,
199 TwopassStatsStore *stats) const { 224 TwopassStatsStore *stats) const {
200 #if CONFIG_VP9_ENCODER 225 #if CONFIG_VP9_ENCODER
(...skipping 22 matching lines...) Expand all
223 &libvpx_test::kVP9)), \ 248 &libvpx_test::kVP9)), \
224 __VA_ARGS__)) 249 __VA_ARGS__))
225 #else 250 #else
226 #define VP9_INSTANTIATE_TEST_CASE(test, ...) 251 #define VP9_INSTANTIATE_TEST_CASE(test, ...)
227 #endif // CONFIG_VP9 252 #endif // CONFIG_VP9
228 253
229 254
230 } // namespace libvpx_test 255 } // namespace libvpx_test
231 256
232 #endif // TEST_CODEC_FACTORY_H_ 257 #endif // TEST_CODEC_FACTORY_H_
OLDNEW
« no previous file with comments | « source/libvpx/test/byte_alignment_test.cc ('k') | source/libvpx/test/convolve_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698