| OLD | NEW |
| 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 H264Picture::H264Picture() | 13 H264Picture::H264Picture() |
| 14 : top_field_order_cnt(0), | 14 : pic_order_cnt_type(0), |
| 15 top_field_order_cnt(0), |
| 15 bottom_field_order_cnt(0), | 16 bottom_field_order_cnt(0), |
| 16 pic_order_cnt(0), | 17 pic_order_cnt(0), |
| 17 pic_order_cnt_msb(0), | 18 pic_order_cnt_msb(0), |
| 18 pic_order_cnt_lsb(0), | 19 pic_order_cnt_lsb(0), |
| 20 delta_pic_order_cnt_bottom(0), |
| 21 delta_pic_order_cnt0(0), |
| 22 delta_pic_order_cnt1(0), |
| 19 pic_num(0), | 23 pic_num(0), |
| 20 long_term_pic_num(0), | 24 long_term_pic_num(0), |
| 21 frame_num(0), | 25 frame_num(0), |
| 22 frame_num_offset(0), | 26 frame_num_offset(0), |
| 23 frame_num_wrap(0), | 27 frame_num_wrap(0), |
| 24 long_term_frame_idx(0), | 28 long_term_frame_idx(0), |
| 25 type(media::H264SliceHeader::kPSlice), | 29 type(media::H264SliceHeader::kPSlice), |
| 30 nal_ref_idc(0), |
| 26 idr(false), | 31 idr(false), |
| 32 idr_pic_id(0), |
| 27 ref(false), | 33 ref(false), |
| 28 long_term(false), | 34 long_term(false), |
| 29 outputted(false), | 35 outputted(false), |
| 30 mem_mgmt_5(false), | 36 mem_mgmt_5(false), |
| 37 nonexisting(false), |
| 31 field(FIELD_NONE), | 38 field(FIELD_NONE), |
| 32 long_term_reference_flag(false), | 39 long_term_reference_flag(false), |
| 33 adaptive_ref_pic_marking_mode_flag(false), | 40 adaptive_ref_pic_marking_mode_flag(false), |
| 34 dpb_position(0) { | 41 dpb_position(0) { |
| 35 memset(&ref_pic_marking, 0, sizeof(ref_pic_marking)); | 42 memset(&ref_pic_marking, 0, sizeof(ref_pic_marking)); |
| 36 } | 43 } |
| 37 | 44 |
| 38 H264Picture::~H264Picture() { | 45 H264Picture::~H264Picture() { |
| 39 } | 46 } |
| 40 | 47 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 164 } |
| 158 | 165 |
| 159 void H264DPB::GetLongTermRefPicsAppending(H264Picture::Vector* out) { | 166 void H264DPB::GetLongTermRefPicsAppending(H264Picture::Vector* out) { |
| 160 for (const auto& pic : pics_) { | 167 for (const auto& pic : pics_) { |
| 161 if (pic->ref && pic->long_term) | 168 if (pic->ref && pic->long_term) |
| 162 out->push_back(pic); | 169 out->push_back(pic); |
| 163 } | 170 } |
| 164 } | 171 } |
| 165 | 172 |
| 166 } // namespace content | 173 } // namespace content |
| OLD | NEW |