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

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

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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
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
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 H264Picture* H264DPB::GetShortRefPicByPicNum(int pic_num) { 67 H264Picture* H264DPB::GetShortRefPicByPicNum(int pic_num) {
68 for (size_t i = 0; i < pics_.size(); ++i) { 68 for (size_t i = 0; i < pics_.size(); ++i) {
69 H264Picture* pic = pics_[i]; 69 H264Picture* pic = pics_[i];
70 if (pic->ref && !pic->long_term && pic->pic_num == pic_num) 70 if (pic->ref && !pic->long_term && pic->pic_num == pic_num)
71 return pic; 71 return pic;
72 } 72 }
73 73
74 DVLOG(1) << "Missing short ref pic num: " << pic_num; 74 DVLOG(1) << "Missing short ref pic num: " << pic_num;
75 return NULL; 75 return nullptr;
76 } 76 }
77 77
78 H264Picture* H264DPB::GetLongRefPicByLongTermPicNum(int pic_num) { 78 H264Picture* H264DPB::GetLongRefPicByLongTermPicNum(int pic_num) {
79 for (size_t i = 0; i < pics_.size(); ++i) { 79 for (size_t i = 0; i < pics_.size(); ++i) {
80 H264Picture* pic = pics_[i]; 80 H264Picture* pic = pics_[i];
81 if (pic->ref && pic->long_term && pic->long_term_pic_num == pic_num) 81 if (pic->ref && pic->long_term && pic->long_term_pic_num == pic_num)
82 return pic; 82 return pic;
83 } 83 }
84 84
85 DVLOG(1) << "Missing long term pic num: " << pic_num; 85 DVLOG(1) << "Missing long term pic num: " << pic_num;
86 return NULL; 86 return nullptr;
87 } 87 }
88 88
89 H264Picture* H264DPB::GetLowestFrameNumWrapShortRefPic() { 89 H264Picture* H264DPB::GetLowestFrameNumWrapShortRefPic() {
90 H264Picture* ret = NULL; 90 H264Picture* ret = nullptr;
91 for (size_t i = 0; i < pics_.size(); ++i) { 91 for (size_t i = 0; i < pics_.size(); ++i) {
92 H264Picture* pic = pics_[i]; 92 H264Picture* pic = pics_[i];
93 if (pic->ref && !pic->long_term && 93 if (pic->ref && !pic->long_term &&
94 (!ret || pic->frame_num_wrap < ret->frame_num_wrap)) 94 (!ret || pic->frame_num_wrap < ret->frame_num_wrap))
95 ret = pic; 95 ret = pic;
96 } 96 }
97 return ret; 97 return ret;
98 } 98 }
99 99
100 void H264DPB::GetNotOutputtedPicsAppending(H264Picture::PtrVector& out) { 100 void H264DPB::GetNotOutputtedPicsAppending(H264Picture::PtrVector& out) {
(...skipping 14 matching lines...) Expand all
115 115
116 void H264DPB::GetLongTermRefPicsAppending(H264Picture::PtrVector& out) { 116 void H264DPB::GetLongTermRefPicsAppending(H264Picture::PtrVector& out) {
117 for (size_t i = 0; i < pics_.size(); ++i) { 117 for (size_t i = 0; i < pics_.size(); ++i) {
118 H264Picture* pic = pics_[i]; 118 H264Picture* pic = pics_[i];
119 if (pic->ref && pic->long_term) 119 if (pic->ref && pic->long_term)
120 out.push_back(pic); 120 out.push_back(pic);
121 } 121 }
122 } 122 }
123 123
124 } // namespace content 124 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698