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

Side by Side Diff: source/libvpx/test/decode_test_driver.cc

Issue 341353002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 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/decode_test_driver.h ('k') | source/libvpx/test/invalid_file_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) 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 #include "test/codec_factory.h" 10 #include "test/codec_factory.h"
(...skipping 17 matching lines...) Expand all
28 void DecoderTest::RunLoop(CompressedVideoSource *video) { 28 void DecoderTest::RunLoop(CompressedVideoSource *video) {
29 vpx_codec_dec_cfg_t dec_cfg = {0}; 29 vpx_codec_dec_cfg_t dec_cfg = {0};
30 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); 30 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0);
31 ASSERT_TRUE(decoder != NULL); 31 ASSERT_TRUE(decoder != NULL);
32 32
33 // Decode frames. 33 // Decode frames.
34 for (video->Begin(); video->cxdata(); video->Next()) { 34 for (video->Begin(); video->cxdata(); video->Next()) {
35 PreDecodeFrameHook(*video, decoder); 35 PreDecodeFrameHook(*video, decoder);
36 vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(), 36 vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(),
37 video->frame_size()); 37 video->frame_size());
38 ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); 38 if (!HandleDecodeResult(res_dec, *video, decoder))
39 break;
39 40
40 DxDataIterator dec_iter = decoder->GetDxData(); 41 DxDataIterator dec_iter = decoder->GetDxData();
41 const vpx_image_t *img = NULL; 42 const vpx_image_t *img = NULL;
42 43
43 // Get decompressed data 44 // Get decompressed data
44 while ((img = dec_iter.Next())) 45 while ((img = dec_iter.Next()))
45 DecompressedFrameHook(*img, video->frame_number()); 46 DecompressedFrameHook(*img, video->frame_number());
46 } 47 }
47 48
48 delete decoder; 49 delete decoder;
49 } 50 }
50 } // namespace libvpx_test 51 } // namespace libvpx_test
OLDNEW
« no previous file with comments | « source/libvpx/test/decode_test_driver.h ('k') | source/libvpx/test/invalid_file_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698