Skip to content

Commit

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

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
  • Loading branch information
wangyan42164 authored and intel-mediadev committed Apr 12, 2019
1 parent f1c0fad commit 2a70dd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3936,6 +3936,10 @@ VAStatus DdiMedia_CreateImage(
gmmParams.Flags.Info.TiledY = true;
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 @@ -4045,6 +4049,7 @@ VAStatus DdiMedia_CreateImage(
vaimg->offsets[2] = gmmPitch * gmmHeight * 2;
break;
case VA_FOURCC_Y210:
case VA_FOURCC_AYUV:
vaimg->format.bits_per_pixel = 32;
vaimg->num_planes = 1;
vaimg->pitches[0] = gmmPitch;
Expand Down
2 changes: 1 addition & 1 deletion media_driver/linux/common/ddi/media_libva_caps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const VAImageFormat MediaLibvaCaps::m_supportedImageformats[] =
{VA_FOURCC_P016, VA_LSB_FIRST, 12, 0,0,0,0,0},
{VA_FOURCC_RGB565, VA_LSB_FIRST, 16, 16, 0xf800, 0x07e0, 0x001f, 0},
{VA_FOURCC('P','0','1','0'), VA_LSB_FIRST, 24, 0,0,0,0,0},
{VA_FOURCC_AYUV, VA_LSB_FIRST, 24, 0,0,0,0,0},
{VA_FOURCC_AYUV, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000},
{VA_FOURCC_Y410, VA_LSB_FIRST, 32, 0,0,0,0,0},
{VA_FOURCC_Y210, VA_LSB_FIRST, 32, 0,0,0,0,0}
};
Expand Down

0 comments on commit 2a70dd2

Please sign in to comment.