media/gpu/v4l2: correct sizes in interactions with V4L2 Image Processor
In certain V4L2 cases (Mediatek), the video decoder produces a format that needs to be converted to NV12 using the ImageProcessor. On MT8192 and MT8195 this IP converts formats and also dimensions -- from input of |coded_size| and |visible_rect| to |visible_size| (these are VideoFrame terminology, but coded size represents the natural size enlarged with any macroblock and hardware alignments). On MT8183, this IP seems to not be able to convert those two at once, on those cases it's OK to let it just convert the format and maintain the resolution, because we can specify the |visible_rect| to the Compositor. This CL does precisely that, and also corrects a mistake in the creation of ImageProcessorWithPool, where the |coded_size| was used as |natural_size| for the pool initialization (this wasn't a problem until now because the IP aligned all the values for us, but now we have to be more specific). This was tested via Tast on kukui and asurada, running tast run -waituntilready=false asurada video.DrawOnCanvas.h264_*0p_hw (the video.DrawOnCanvas.h264*exotic* are not fixed by this CL but I left a TODO for a follow up). Bug: b:210895987, b:213396803 Change-Id: I8fe6f0a0aef64e79004a62c4f86ce84db6a634a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373219 Reviewed-by:Jao-ke Chin-Lee <jchinlee@chromium.org> Commit-Queue: Miguel Casas-Sanchez <mcasas@chromium.org> Cr-Commit-Position: refs/heads/main@{#956773}
Loading
Please register or sign in to comment