Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Media Common] Add DRM format mappings for JPEG decoder output #1708

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6989,8 +6989,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
{
case VA_FOURCC_NV12:
case VA_FOURCC_I420:
case VA_FOURCC_IMC3:
case VA_FOURCC_YV12:
case VA_FOURCC_YV16:
case VA_FOURCC_422H:
case VA_FOURCC_422V:
case VA_FOURCC_444P:
case VA_FOURCC_Y800:
case VA_FOURCC_RGBP:
case VA_FOURCC_BGRP:
Expand Down Expand Up @@ -7063,8 +7067,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
case VA_FOURCC_NV12:
return DRM_FORMAT_GR88;
case VA_FOURCC_I420:
case VA_FOURCC_IMC3:
case VA_FOURCC_YV12:
case VA_FOURCC_YV16:
case VA_FOURCC_422H:
case VA_FOURCC_422V:
case VA_FOURCC_444P:
case VA_FOURCC_RGBP:
case VA_FOURCC_BGRP:
return DRM_FORMAT_R8;
Expand All @@ -7078,7 +7086,6 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane)
}
return 0;
}

static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc)
{
switch (fourcc)
Expand All @@ -7087,10 +7094,18 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc)
return DRM_FORMAT_NV12;
case VA_FOURCC_I420:
return DRM_FORMAT_YUV420;
case VA_FOURCC_IMC3:
return DRM_FORMAT_YUV420;
case VA_FOURCC_YV12:
return DRM_FORMAT_YVU420;
case VA_FOURCC_YV16:
return DRM_FORMAT_YVU422;
case VA_FOURCC_422H:
return DRM_FORMAT_YUV422;
case VA_FOURCC_422V:
return DRM_FORMAT_YUV422;
case VA_FOURCC_444P:
return DRM_FORMAT_YUV444;
case VA_FOURCC_YUY2:
return DRM_FORMAT_YUYV;
case VA_FOURCC_YVYU:
Expand All @@ -7101,6 +7116,10 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc)
return DRM_FORMAT_UYVY;
case VA_FOURCC_AYUV:
return DRM_FORMAT_AYUV;
#if VA_CHECK_VERSION(1, 13, 0)
case VA_FOURCC_XYUV:
return DRM_FORMAT_XYUV8888;
#endif
case VA_FOURCC_Y210:
return DRM_FORMAT_Y210;
#if VA_CHECK_VERSION(1, 9, 0)
Expand Down
Loading