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

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..be23b6cd68de5f5490c0319c805acf4ac7191c34 100644
--- a/media/gpu/h264_decoder.cc
+++ b/media/gpu/h264_decoder.cc
@@ -673,7 +673,7 @@ void H264Decoder::OutputPic(scoped_refptr<H264Picture> pic) {
last_output_poc_ = pic->pic_order_cnt;
DVLOG(4) << "Posting output task for POC: " << pic->pic_order_cnt;
- accelerator_->OutputPicture(pic);
+ accelerator_->OutputPicture(pic, visible_rect_);
}
void H264Decoder::ClearDPB() {
@@ -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());
+ if (visible_rect_ != new_visible_rect) {
+ DVLOG(1) << "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;

Powered by Google App Engine
This is Rietveld 408576698