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

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

Issue 2926593002: V4L2SVDA/VAAPIVDA: use visible size from decoder and pass to client (Closed)
Patch Set: V4L2SVDA/VAAPIVDA: use visible size from decoder and pass to client Created 3 years, 6 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 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
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_);
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698