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

Unified Diff: media/gpu/h264_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
Index: media/gpu/h264_decoder.cc
diff --git a/media/gpu/h264_decoder.cc b/media/gpu/h264_decoder.cc
index aed9658374805c9854aaf4c0fa76dc34e67a5412..fe1bf5e73273a5880be48bf0fc47d3d338abd658 100644
--- a/media/gpu/h264_decoder.cc
+++ b/media/gpu/h264_decoder.cc
@@ -1093,6 +1093,12 @@ bool H264Decoder::ProcessSPS(int sps_id, bool* need_new_buffers) {
return false;
}
+ gfx::Rect new_visible_rect = sps->GetVisibleRect().value_or(gfx::Rect());
Pawel Osciak 2017/06/16 07:14:00 Would it make sense to move this to l.1133 and als
johnylin1 2017/06/16 08:15:10 Moved to l.1133. sps->GetVisibleRect() already che
+ if (visible_rect_ != new_visible_rect) {
+ DVLOG(2) << "New visible rect: " << new_visible_rect.ToString();
+ visible_rect_ = new_visible_rect;
+ }
+
int width_mb = new_pic_size.width() / 16;
int height_mb = new_pic_size.height() / 16;
@@ -1351,6 +1357,7 @@ H264Decoder::DecodeResult H264Decoder::Decode() {
if (!curr_pic_)
return kRanOutOfSurfaces;
+ curr_pic_->visible_rect = visible_rect_;
Pawel Osciak 2017/06/16 07:14:00 Could we perhaps move this to InitCurrPicture()?
if (!StartNewFrame(curr_slice_hdr_.get()))
SET_ERROR_AND_RETURN();
}

Powered by Google App Engine
This is Rietveld 408576698