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

media/gpu/test: Copy coded area of VideoFrame

This fixes a bug that CopyVideoFrame() copies by a visible size
only. The function should copy by coded size, otherwise a real
visible size is not copied when the visible area begins with
non-(0, 0) point.

Bug: None
Test: IPTest on atlas
Change-Id: I2412e6bcc72c7a5668e8dca15f126c2e16979976
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000435Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731793}
parent 770a432f
......@@ -164,8 +164,8 @@ bool CopyVideoFrame(const VideoFrame* src_frame,
false);
for (size_t i = 0; i < num_planes; ++i) {
// |width| in libyuv::CopyPlane() is in bytes, not pixels.
gfx::Size plane_size = VideoFrame::PlaneSize(dst_frame->format(), i,
dst_frame->natural_size());
gfx::Size plane_size =
VideoFrame::PlaneSize(dst_frame->format(), i, dst_frame->coded_size());
libyuv::CopyPlane(
src_frame->data(i), src_frame->layout().planes()[i].stride,
dst_frame->data(i), dst_frame->layout().planes()[i].stride,
......
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