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

Unified Diff: media/gpu/vp9_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 side-by-side diff with in-line comments
Download patch
« media/gpu/vaapi_video_decode_accelerator.cc ('K') | « media/gpu/vp9_decoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vp9_decoder.cc
diff --git a/media/gpu/vp9_decoder.cc b/media/gpu/vp9_decoder.cc
index b24f2466846e28485dd17b23372c2a57e0deb302..c75de0d21a7db4c46deb589fb9c06d163d7892e9 100644
--- a/media/gpu/vp9_decoder.cc
+++ b/media/gpu/vp9_decoder.cc
@@ -110,10 +110,14 @@ VP9Decoder::DecodeResult VP9Decoder::Decode() {
gfx::Size new_pic_size(curr_frame_hdr_->frame_width,
curr_frame_hdr_->frame_height);
+ gfx::Rect new_render_rect(curr_frame_hdr_->render_width,
+ curr_frame_hdr_->render_height);
DCHECK(!new_pic_size.IsEmpty());
+ DCHECK(!new_render_rect.IsEmpty());
- if (new_pic_size != pic_size_) {
- DVLOG(1) << "New resolution: " << new_pic_size.ToString();
+ if (new_pic_size != pic_size_ || new_render_rect != render_rect_) {
Owen Lin 2017/06/07 06:11:00 Same, we don't care about the visible crop here.
johnylin1 2017/06/07 15:38:37 Done.
+ DVLOG(1) << "New resolution: " << new_pic_size.ToString()
+ << ", New render resolution: " << new_render_rect.ToString();
if (!curr_frame_hdr_->IsKeyframe()) {
// TODO(posciak): This is doable, but requires a few modifications to
@@ -131,6 +135,7 @@ VP9Decoder::DecodeResult VP9Decoder::Decode() {
ref_frame = nullptr;
pic_size_ = new_pic_size;
+ render_rect_ = new_render_rect;
return kAllocateNewSurfaces;
}
@@ -204,6 +209,10 @@ gfx::Size VP9Decoder::GetPicSize() const {
return pic_size_;
}
+gfx::Rect VP9Decoder::GetVisibleRect() const {
+ return render_rect_;
+}
+
size_t VP9Decoder::GetRequiredNumOfPictures() const {
// kMaxVideoFrames to keep higher level media pipeline populated, +2 for the
// pictures being parsed and decoded currently.
« media/gpu/vaapi_video_decode_accelerator.cc ('K') | « media/gpu/vp9_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698