Commit cffd0efe authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/VP9Decoder: Set frame size to visible size if it is larger than frame size

VP9Decoder sets visible rectangle to empty if the visible
rectangle obtained from vp9 stream is larger than the frame size.
This causes a regression since M81 because we begin to set
GLImage's dimension to visible size, crrev.com/c/2011583.

This fixes the regression by setting visible rectangle to frame
size in the case.

Bug: b:149727823
Test: HW decoder is used on atlas for VP9 SVC in Meet
Change-Id: Icb47fc99899be3ebde349d6e6005bc8e5a6328a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076224Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745346}
parent 8addd09e
...@@ -188,12 +188,12 @@ VP9Decoder::DecodeResult VP9Decoder::Decode() { ...@@ -188,12 +188,12 @@ VP9Decoder::DecodeResult VP9Decoder::Decode() {
gfx::Size new_pic_size = curr_frame_size_; gfx::Size new_pic_size = curr_frame_size_;
gfx::Rect new_render_rect(curr_frame_hdr_->render_width, gfx::Rect new_render_rect(curr_frame_hdr_->render_width,
curr_frame_hdr_->render_height); curr_frame_hdr_->render_height);
// For safety, check the validity of render size or leave it as (0, 0). // For safety, check the validity of render size or leave it as pic size.
if (!gfx::Rect(new_pic_size).Contains(new_render_rect)) { if (!gfx::Rect(new_pic_size).Contains(new_render_rect)) {
DVLOG(1) << "Render size exceeds picture size. render size: " DVLOG(1) << "Render size exceeds picture size. render size: "
<< new_render_rect.ToString() << new_render_rect.ToString()
<< ", picture size: " << new_pic_size.ToString(); << ", picture size: " << new_pic_size.ToString();
new_render_rect = gfx::Rect(); new_render_rect = gfx::Rect(new_pic_size);
} }
VideoCodecProfile new_profile = VideoCodecProfile new_profile =
VP9ProfileToVideoCodecProfile(curr_frame_hdr_->profile); VP9ProfileToVideoCodecProfile(curr_frame_hdr_->profile);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment