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

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

Issue 1040513003: VAVDA: Use the new, generic video decoder and accelerator infrastructure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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 | « content/common/gpu/media/h264_dpb.h ('k') | content/common/gpu/media/vaapi_h264_decoder.h » ('j') | 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "content/common/gpu/media/h264_dpb.h" 9 #include "content/common/gpu/media/h264_dpb.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 H264PictureBase::H264PictureBase() { 13 H264Picture::H264Picture()
14 memset(this, 0, sizeof(*this)); 14 : top_field_order_cnt(0),
15 } 15 bottom_field_order_cnt(0),
16 16 pic_order_cnt(0),
17 H264Picture::H264Picture() { 17 pic_order_cnt_msb(0),
18 pic_order_cnt_lsb(0),
19 pic_num(0),
20 long_term_pic_num(0),
21 frame_num(0),
22 frame_num_offset(0),
23 frame_num_wrap(0),
24 long_term_frame_idx(0),
25 type(media::H264SliceHeader::kPSlice),
26 idr(false),
27 ref(false),
28 long_term(false),
29 outputted(false),
30 mem_mgmt_5(false),
31 field(FIELD_NONE),
32 long_term_reference_flag(false),
33 adaptive_ref_pic_marking_mode_flag(false),
34 dpb_position(0) {
35 memset(&ref_pic_marking, 0, sizeof(ref_pic_marking));
18 } 36 }
19 37
20 H264Picture::~H264Picture() { 38 H264Picture::~H264Picture() {
21 } 39 }
22 40
23 V4L2H264Picture* H264Picture::AsV4L2H264Picture() { 41 V4L2H264Picture* H264Picture::AsV4L2H264Picture() {
24 return nullptr; 42 return nullptr;
25 } 43 }
26 44
45 VaapiH264Picture* H264Picture::AsVaapiH264Picture() {
46 return nullptr;
47 }
48
27 H264DPB::H264DPB() : max_num_pics_(0) {} 49 H264DPB::H264DPB() : max_num_pics_(0) {}
28 H264DPB::~H264DPB() {} 50 H264DPB::~H264DPB() {}
29 51
30 void H264DPB::Clear() { 52 void H264DPB::Clear() {
31 pics_.clear(); 53 pics_.clear();
32 } 54 }
33 55
34 void H264DPB::set_max_num_pics(size_t max_num_pics) { 56 void H264DPB::set_max_num_pics(size_t max_num_pics) {
35 DCHECK_LE(max_num_pics, kDPBMaxSize); 57 DCHECK_LE(max_num_pics, kDPBMaxSize);
36 max_num_pics_ = max_num_pics; 58 max_num_pics_ = max_num_pics;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 157 }
136 158
137 void H264DPB::GetLongTermRefPicsAppending(H264Picture::Vector* out) { 159 void H264DPB::GetLongTermRefPicsAppending(H264Picture::Vector* out) {
138 for (const auto& pic : pics_) { 160 for (const auto& pic : pics_) {
139 if (pic->ref && pic->long_term) 161 if (pic->ref && pic->long_term)
140 out->push_back(pic); 162 out->push_back(pic);
141 } 163 }
142 } 164 }
143 165
144 } // namespace content 166 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/h264_dpb.h ('k') | content/common/gpu/media/vaapi_h264_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698