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 "media/gpu/vp8_decoder.h" | 5 #include "media/gpu/vp8_decoder.h" |
6 #include "media/base/limits.h" | 6 #include "media/base/limits.h" |
7 | 7 |
8 namespace media { | 8 namespace media { |
9 | 9 |
10 VP8Decoder::VP8Accelerator::VP8Accelerator() {} | 10 VP8Decoder::VP8Accelerator::VP8Accelerator() {} |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 // Need a resume point. | 87 // Need a resume point. |
88 curr_frame_hdr_.reset(); | 88 curr_frame_hdr_.reset(); |
89 return kRanOutOfStreamData; | 89 return kRanOutOfStreamData; |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 curr_pic_ = accelerator_->CreateVP8Picture(); | 93 curr_pic_ = accelerator_->CreateVP8Picture(); |
94 if (!curr_pic_) | 94 if (!curr_pic_) |
95 return kRanOutOfSurfaces; | 95 return kRanOutOfSurfaces; |
96 | 96 |
97 curr_pic_->visible_rect = gfx::Rect(pic_size_); | |
Pawel Osciak
2017/06/19 06:27:40
Since VP8Parser does not seem to be aligning to 16
johnylin1
2017/06/19 07:13:28
We will put to an individual CL as discussed in: h
| |
97 if (!DecodeAndOutputCurrentFrame()) | 98 if (!DecodeAndOutputCurrentFrame()) |
98 return kDecodeError; | 99 return kDecodeError; |
99 | 100 |
100 return kRanOutOfStreamData; | 101 return kRanOutOfStreamData; |
101 } | 102 } |
102 | 103 |
103 void VP8Decoder::RefreshReferenceFrames() { | 104 void VP8Decoder::RefreshReferenceFrames() { |
104 if (curr_frame_hdr_->IsKeyframe()) { | 105 if (curr_frame_hdr_->IsKeyframe()) { |
105 last_frame_ = curr_pic_; | 106 last_frame_ = curr_pic_; |
106 golden_frame_ = curr_pic_; | 107 golden_frame_ = curr_pic_; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 return pic_size_; | 186 return pic_size_; |
186 } | 187 } |
187 | 188 |
188 size_t VP8Decoder::GetRequiredNumOfPictures() const { | 189 size_t VP8Decoder::GetRequiredNumOfPictures() const { |
189 const size_t kVP8NumFramesActive = 4; | 190 const size_t kVP8NumFramesActive = 4; |
190 const size_t kPicsInPipeline = limits::kMaxVideoFrames + 2; | 191 const size_t kPicsInPipeline = limits::kMaxVideoFrames + 2; |
191 return kVP8NumFramesActive + kPicsInPipeline; | 192 return kVP8NumFramesActive + kPicsInPipeline; |
192 } | 193 } |
193 | 194 |
194 } // namespace media | 195 } // namespace media |
OLD | NEW |