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

Side by Side Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 10834290: VDA: Append correct number of bytes per frame for VP8 (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The bulk of this file is support code; sorry about that. Here's an overview 5 // The bulk of this file is support code; sorry about that. Here's an overview
6 // to hopefully help readers of this code: 6 // to hopefully help readers of this code:
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or
8 // Win/EGL. 8 // Win/EGL.
9 // - ClientState is an enum for the state of the decode client used by the test. 9 // - ClientState is an enum for the state of the decode client used by the test.
10 // - ClientStateNotification is a barrier abstraction that allows the test code 10 // - ClientStateNotification is a barrier abstraction that allows the test code
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 std::string GLRenderingVDAClient::GetBytesForNextFrames( 528 std::string GLRenderingVDAClient::GetBytesForNextFrames(
529 size_t start_pos, size_t* end_pos) { 529 size_t start_pos, size_t* end_pos) {
530 // Helpful description: http://wiki.multimedia.cx/index.php?title=IVF 530 // Helpful description: http://wiki.multimedia.cx/index.php?title=IVF
531 std::string bytes; 531 std::string bytes;
532 if (start_pos == 0) 532 if (start_pos == 0)
533 start_pos = 32; // Skip IVF header. 533 start_pos = 32; // Skip IVF header.
534 *end_pos = start_pos; 534 *end_pos = start_pos;
535 for (int i = 0; i < num_fragments_per_decode_; ++i) { 535 for (int i = 0; i < num_fragments_per_decode_; ++i) {
536 uint32 frame_size = *reinterpret_cast<uint32*>(&encoded_data_[*end_pos]); 536 uint32 frame_size = *reinterpret_cast<uint32*>(&encoded_data_[*end_pos]);
537 *end_pos += 12; // Skip frame header. 537 *end_pos += 12; // Skip frame header.
538 bytes.append(encoded_data_.substr(*end_pos, *end_pos + frame_size)); 538 bytes.append(encoded_data_.substr(*end_pos, frame_size));
539 *end_pos += frame_size; 539 *end_pos += frame_size;
540 if (*end_pos + 12 >= encoded_data_.size()) 540 if (*end_pos + 12 >= encoded_data_.size())
541 return bytes; 541 return bytes;
542 } 542 }
543 return bytes; 543 return bytes;
544 } 544 }
545 545
546 void GLRenderingVDAClient::DecodeNextFragments() { 546 void GLRenderingVDAClient::DecodeNextFragments() {
547 if (decoder_deleted()) 547 if (decoder_deleted())
548 return; 548 return;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 #if defined(OS_WIN) 891 #if defined(OS_WIN)
892 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); 892 DXVAVideoDecodeAccelerator::PreSandboxInitialization();
893 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 893 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
894 OmxVideoDecodeAccelerator::PreSandboxInitialization(); 894 OmxVideoDecodeAccelerator::PreSandboxInitialization();
895 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 895 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
896 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); 896 VaapiVideoDecodeAccelerator::PreSandboxInitialization();
897 #endif 897 #endif
898 898
899 return RUN_ALL_TESTS(); 899 return RUN_ALL_TESTS();
900 } 900 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698