media/gpu/v4l2(s)vda: also adjust imported output buffer height
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:David Staessens <dstaessens@chromium.org> Reviewed-by:
Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#733899}
Showing
Please register or sign in to comment