• Hirokazu Honda's avatar
    media/gpu/test/Video: Fix the plane size computation for decoded frames · 7960f912
    Hirokazu Honda authored
    Video::Decode() decodes compressed videos and fills decoded frames
    to the buffer. Originally, the plane size of filled frames is
    computed by VideoFrame::PlaneSize().GetArea(). However, this
    aligns resolutions by two and thus the computed plane size is not
    the succinct area. For instance, when a resolution is 641x361,
    PlaneSize().GetArea() returns 232404=642x362 for the first plane,
    but the test demands a plane size is 231401=641x361. This CL
    fixes the mismatch.
    This enables video_encode_accelerator_tests to run odd resolution
    videos.
    
    Bug: b:174318867
    Test: video_encode_accelerator_tests crowd-641x361.vp9.webm --codec=vp9 on atlas
    Change-Id: I5d2d9fa31ae838abd501e60e19509d667f70821c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563186
    Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#834128}
    7960f912
video.cc 24 KB