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

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

Issue 963053002: VP8Decoder: Honor show_frame stream element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/common/gpu/media/vp8_decoder.h" 5 #include "content/common/gpu/media/vp8_decoder.h"
6 #include "media/base/limits.h" 6 #include "media/base/limits.h"
7 7
8 namespace content { 8 namespace content {
9 9
10 VP8Decoder::VP8Accelerator::VP8Accelerator() { 10 VP8Decoder::VP8Accelerator::VP8Accelerator() {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 curr_frame_hdr_->width = pic_size_.width(); 164 curr_frame_hdr_->width = pic_size_.width();
165 curr_frame_hdr_->height = pic_size_.height(); 165 curr_frame_hdr_->height = pic_size_.height();
166 curr_frame_hdr_->horizontal_scale = horizontal_scale_; 166 curr_frame_hdr_->horizontal_scale = horizontal_scale_;
167 curr_frame_hdr_->vertical_scale = vertical_scale_; 167 curr_frame_hdr_->vertical_scale = vertical_scale_;
168 } 168 }
169 169
170 if (!accelerator_->SubmitDecode(curr_pic_, curr_frame_hdr_.get(), last_frame_, 170 if (!accelerator_->SubmitDecode(curr_pic_, curr_frame_hdr_.get(), last_frame_,
171 golden_frame_, alt_frame_)) 171 golden_frame_, alt_frame_))
172 return false; 172 return false;
173 173
174 if (!accelerator_->OutputPicture(curr_pic_)) 174 if (curr_frame_hdr_->show_frame)
175 return false; 175 if (!accelerator_->OutputPicture(curr_pic_))
176 return false;
176 177
177 RefreshReferenceFrames(); 178 RefreshReferenceFrames();
178 179
179 curr_pic_ = nullptr; 180 curr_pic_ = nullptr;
180 curr_frame_hdr_ = nullptr; 181 curr_frame_hdr_ = nullptr;
181 curr_frame_start_ = nullptr; 182 curr_frame_start_ = nullptr;
182 frame_size_ = 0; 183 frame_size_ = 0;
183 return true; 184 return true;
184 } 185 }
185 186
186 size_t VP8Decoder::GetRequiredNumOfPictures() const { 187 size_t VP8Decoder::GetRequiredNumOfPictures() const {
187 const size_t kVP8NumFramesActive = 4; 188 const size_t kVP8NumFramesActive = 4;
188 const size_t kPicsInPipeline = media::limits::kMaxVideoFrames + 2; 189 const size_t kPicsInPipeline = media::limits::kMaxVideoFrames + 2;
189 return kVP8NumFramesActive + kPicsInPipeline; 190 return kVP8NumFramesActive + kPicsInPipeline;
190 } 191 }
191 192
192 } // namespace content 193 } // namespace content
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