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

Side by Side Diff: media/gpu/h264_dpb.cc

Issue 2534313004: Add prototype D3D11VideoDecodeAccelerator. (Closed)
Patch Set: rename d3d11_video_decoder.cc and other changes Created 4 years 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 | « media/gpu/gpu_video_decode_accelerator_factory.cc ('k') | 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 #include <string.h> 5 #include <string.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 H264DPB::H264DPB() : max_num_pics_(0) {} 57 H264DPB::H264DPB() : max_num_pics_(0) {}
58 H264DPB::~H264DPB() {} 58 H264DPB::~H264DPB() {}
59 59
60 void H264DPB::Clear() { 60 void H264DPB::Clear() {
61 pics_.clear(); 61 pics_.clear();
62 } 62 }
63 63
64 void H264DPB::set_max_num_pics(size_t max_num_pics) { 64 void H264DPB::set_max_num_pics(size_t max_num_pics) {
65 DCHECK_LE(max_num_pics, kDPBMaxSize); 65 DCHECK_LE(max_num_pics, static_cast<size_t>(kDPBMaxSize));
66 max_num_pics_ = max_num_pics; 66 max_num_pics_ = max_num_pics;
67 if (pics_.size() > max_num_pics_) 67 if (pics_.size() > max_num_pics_)
68 pics_.resize(max_num_pics_); 68 pics_.resize(max_num_pics_);
69 } 69 }
70 70
71 void H264DPB::UpdatePicPositions() { 71 void H264DPB::UpdatePicPositions() {
72 size_t i = 0; 72 size_t i = 0;
73 for (auto& pic : pics_) { 73 for (auto& pic : pics_) {
74 pic->dpb_position = i; 74 pic->dpb_position = i;
75 ++i; 75 ++i;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 void H264DPB::GetLongTermRefPicsAppending(H264Picture::Vector* out) { 167 void H264DPB::GetLongTermRefPicsAppending(H264Picture::Vector* out) {
168 for (const auto& pic : pics_) { 168 for (const auto& pic : pics_) {
169 if (pic->ref && pic->long_term) 169 if (pic->ref && pic->long_term)
170 out->push_back(pic); 170 out->push_back(pic);
171 } 171 }
172 } 172 }
173 173
174 } // namespace media 174 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/gpu_video_decode_accelerator_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698