| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |