• Alexandre Courbot's avatar
    media/gpu/v4l2(s)vda: also adjust imported output buffer height · eada65d6
    Alexandre Courbot authored
    When importing a buffer, the provided buffer's size may differ from the
    size we requested from ProvidePictureBuffersWithVisibleRect(). We
    already accounted the width difference, but not the height, which
    resulted in green lines being visible when the provided buffer differed
    in height, and was single-planar: the image processor would render using
    the assumed height, while the GPU would render using the real height,
    resulting in the color plane being offset by one or two lines.
    
    Since the VDA and SVDA both need to do this, factorize the actual buffer
    size's computation code into a VDA helper, and call it from both.
    
    BUG=chromium:982172
    BUG=b:141579960
    BUG=b:146599071
    BUG=b:141965953
    TEST=Youtube playing in 240, 360, 480 and 720p on desktop and Android
    with Hana, Krane and Kevin. No artefact or green line visible.
    
    Change-Id: I0e28446805fd382cbe0d3aab30b704c85ca52b72
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2011784
    Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
    Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
    Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#733899}
    eada65d6
v4l2_vda_helpers.cc 5.93 KB