Skip to content

Commit

Permalink
Add YUY2 and UYVY surface format for VAProfileHEVCMain on ICL platform.
Browse files Browse the repository at this point in the history
Fixes intel#322.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
  • Loading branch information
wangyan42164 committed Oct 12, 2018
1 parent 60b1e83 commit a65076b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
#include "media_ddi_decode_const_g11.h"
#include "media_libva_vp.h"

const uint32_t MediaLibvaCapsG11::m_hevcMainEncSurfaceAttr[m_numHevcMainEncSurfaceAttr] =
{
VA_FOURCC_NV12,
VA_FOURCC_YUY2,
VA_FOURCC_UYVY
};

CODECHAL_MODE MediaLibvaCapsG11::GetEncodeCodecMode(VAProfile profile, VAEntrypoint entrypoint)
{
if (entrypoint == VAEntrypointStats)
Expand Down Expand Up @@ -917,6 +924,17 @@ VAStatus MediaLibvaCapsG11::QuerySurfaceAttributes(
i++;
}
}
else if (profile == VAProfileHEVCMain)
{
for (int32_t j = 0; j < m_numHevcMainEncSurfaceAttr; j++)
{
attribs[i].type = VASurfaceAttribPixelFormat;
attribs[i].value.type = VAGenericValueTypeInteger;
attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
attribs[i].value.value.i = m_hevcMainEncSurfaceAttr[j];
i++;
}
}
else
{
attribs[i].type = VASurfaceAttribPixelFormat;
Expand Down
2 changes: 2 additions & 0 deletions media_driver/linux/gen11/ddi/media_libva_caps_g11.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ class MediaLibvaCapsG11 : public MediaLibvaCaps
CODEC_8K_MAX_PIC_WIDTH; //!< maxinum width for VP9 encode
static const uint32_t m_maxVp9EncHeight =
CODEC_8K_MAX_PIC_HEIGHT; //!< maxinum height for VP9 encode
static const uint32_t m_numHevcMainEncSurfaceAttr = 3; //!< Number of HEVC Main encode surface attributes
static const uint32_t m_hevcMainEncSurfaceAttr[m_numHevcMainEncSurfaceAttr]; //!< Store the HEVC Main encode surface attributes

virtual VAStatus GetPlatformSpecificAttrib(VAProfile profile,
VAEntrypoint entrypoint,
Expand Down

0 comments on commit a65076b

Please sign in to comment.