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

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

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/test/decode_test_driver.h ('k') | source/libvpx/test/encode_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.cc
===================================================================
--- source/libvpx/test/decode_test_driver.cc (revision 191054)
+++ source/libvpx/test/decode_test_driver.cc (working copy)
@@ -14,18 +14,12 @@
namespace libvpx_test {
#if CONFIG_VP8_DECODER
-void Decoder::DecodeFrame(const uint8_t *cxdata, int size) {
- if (!decoder_.priv) {
- const vpx_codec_err_t res_init = vpx_codec_dec_init(&decoder_,
- &vpx_codec_vp8_dx_algo,
- &cfg_, 0);
- ASSERT_EQ(VPX_CODEC_OK, res_init) << DecodeError();
- }
+vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, int size) {
vpx_codec_err_t res_dec;
REGISTER_STATE_CHECK(res_dec = vpx_codec_decode(&decoder_,
cxdata, size, NULL, 0));
- ASSERT_EQ(VPX_CODEC_OK, res_dec) << DecodeError();
+ return res_dec;
}
void DecoderTest::RunLoop(CompressedVideoSource *video) {
@@ -34,7 +28,9 @@
// Decode frames.
for (video->Begin(); video->cxdata(); video->Next()) {
- decoder.DecodeFrame(video->cxdata(), video->frame_size());
+ vpx_codec_err_t res_dec = decoder.DecodeFrame(video->cxdata(),
+ video->frame_size());
+ ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder.DecodeError();
DxDataIterator dec_iter = decoder.GetDxData();
const vpx_image_t *img = NULL;
« no previous file with comments | « source/libvpx/test/decode_test_driver.h ('k') | source/libvpx/test/encode_test_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698