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

Unified Diff: source/libvpx/test/decode_test_driver.h

Issue 12982023: libvpx: Pull from upstream (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/configure ('k') | source/libvpx/test/decode_test_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/test/decode_test_driver.h
===================================================================
--- source/libvpx/test/decode_test_driver.h (revision 191054)
+++ source/libvpx/test/decode_test_driver.h (working copy)
@@ -44,13 +44,14 @@
Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
: cfg_(cfg), deadline_(deadline) {
memset(&decoder_, 0, sizeof(decoder_));
+ Init();
}
~Decoder() {
vpx_codec_destroy(&decoder_);
}
- void DecodeFrame(const uint8_t *cxdata, int size);
+ vpx_codec_err_t DecodeFrame(const uint8_t *cxdata, int size);
DxDataIterator GetDxData() {
return DxDataIterator(&decoder_);
@@ -65,12 +66,24 @@
ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError();
}
- protected:
+ void Control(int ctrl_id, const void *arg) {
+ const vpx_codec_err_t res = vpx_codec_control_(&decoder_, ctrl_id, arg);
+ ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError();
+ }
+
const char *DecodeError() {
const char *detail = vpx_codec_error_detail(&decoder_);
return detail ? detail : vpx_codec_error(&decoder_);
}
+ protected:
+ void Init() {
+ const vpx_codec_err_t res = vpx_codec_dec_init(&decoder_,
+ &vpx_codec_vp8_dx_algo,
+ &cfg_, 0);
+ ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError();
+ }
+
vpx_codec_ctx_t decoder_;
vpx_codec_dec_cfg_t cfg_;
unsigned int deadline_;
« no previous file with comments | « source/libvpx/configure ('k') | source/libvpx/test/decode_test_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698