Skip to content

Commit

Permalink
Add AYUV image format.
Browse files Browse the repository at this point in the history
Fixes intel#375.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
  • Loading branch information
wangyan42164 committed Dec 11, 2018
1 parent 9b84413 commit 4880825
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3906,6 +3906,10 @@ VAStatus DdiMedia_CreateImage(
gmmParams.Format = GMM_FORMAT_MFX_JPEG_YUV422V_TYPE;
gmmParams.BaseHeight = MOS_ALIGN_CEIL(height, 32);
break;
case VA_FOURCC_AYUV:
gmmParams.Format = GMM_FORMAT_AYUV_TYPE;
gmmParams.BaseHeight = MOS_ALIGN_CEIL(height, 32);
break;

default:
MOS_FreeMemory(vaimg);
Expand Down Expand Up @@ -4005,6 +4009,12 @@ VAStatus DdiMedia_CreateImage(
vaimg->offsets[1] = gmmPitch * gmmHeight;
vaimg->offsets[2] = gmmPitch * gmmHeight * 2;
break;
case VA_FOURCC_AYUV:
vaimg->format.bits_per_pixel = 32;
vaimg->num_planes = 1;
vaimg->pitches[0] = gmmPitch;
vaimg->offsets[0] = 0;
break;
}

mediaCtx->pGmmClientContext->DestroyResInfoObject(gmmResourceInfo);
Expand Down
1 change: 1 addition & 0 deletions media_driver/linux/common/ddi/media_libva_caps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const VAImageFormat MediaLibvaCaps::m_supportedImageformats[] =
{VA_FOURCC_P208, VA_LSB_FIRST, 8, 0,0,0,0,0},
{VA_FOURCC_P016, VA_LSB_FIRST, 12, 0,0,0,0,0},
{VA_FOURCC('P','0','1','0'), VA_LSB_FIRST, 24, 0,0,0,0,0},
{VA_FOURCC_AYUV, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000},
};

MediaLibvaCaps::MediaLibvaCaps(DDI_MEDIA_CONTEXT *mediaCtx)
Expand Down

0 comments on commit 4880825

Please sign in to comment.