Skip to content

gallium: Adding support for yuyv to yuv conversion

Suresh Guttula requested to merge SureshG/mesa:main into main

This patch will use under-line logic of gfx shaders to do yuyv to yuv conversion. Which is helping some of the use-cases like recodring the video from camera/multi-participant video call.

For example: Multi-participant video call: MJPEG HW decoded output is YUYV(camera captured) and it is fed to next module(like h264 encoder) in the form of NV12 to compress the video to pass on to other particpants in the call. Here we are doing conversion from 422 to 420, currently it is handled by SW conversion.

So application uses vaGetImage() to copy GPU buffer data to CPU buffer and we see lot of execution time for this transfer.

Solution to this is use HW conversion/shader logic to move this calculation to GPU. This Patch handles the same and using shader logic to do conversion.

Signed-off-by: Suresh Guttula suresh.guttula@amd.corp-partner.google.com

Merge request reports