Skip to content

Commit

Permalink
[Encode] [HEVCe] add VAProfileHEVCMain422_10 profile check
Browse files Browse the repository at this point in the history
add VAProfileHEVCMain422_10 profile check
  • Loading branch information
zhugaofeng711 authored and intel-mediadev committed Jul 31, 2024
1 parent 8017d9c commit 7300aa7
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,7 @@ CODECHAL_MODE DdiEncodeHevc::GetEncodeCodecMode(
{
case VAProfileHEVCMain:
case VAProfileHEVCMain10:
case VAProfileHEVCMain422_10:
case VAProfileHEVCMain444:
case VAProfileHEVCMain444_10:
case VAProfileHEVCSccMain:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ static bool RegisteredHevcMain =
static bool RegisteredHevcMain10 =
DdiEncodeFactory::
Register<encode::DdiEncodeHevc>(ComponentInfo{VAProfileHEVCMain10, VAEntrypointEncSlice});
static bool RegisteredHevcMain422_10 =
DdiEncodeFactory::
Register<encode::DdiEncodeHevc>(ComponentInfo{VAProfileHEVCMain422_10, VAEntrypointEncSlice});
static bool RegisteredHevcMain444 =
DdiEncodeFactory::
Register<encode::DdiEncodeHevc>(ComponentInfo{VAProfileHEVCMain444, VAEntrypointEncSlice});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ static const EntrypointMap entrypointMap_VAProfileHEVCMain12_Xe2_Lpm_r0

static const EntrypointMap entrypointMap_VAProfileHEVCMain422_10_Xe2_Lpm_r0
{
#if defined(_HEVC_ENCODE_VDENC_SUPPORTED)
{VAEntrypointEncSlice, &entrypointMap_VAProfileHEVCMain422_10_Data_Xe2_Lpm_r0},
#endif

#if defined(_HEVC_DECODE_SUPPORTED)
{VAEntrypointVLD, &entrypointMap_VAProfileHEVCMain422_10Dec_Data_Xe2_Lpm_r0},
#endif
Expand Down Expand Up @@ -383,13 +387,13 @@ static const ProfileMap profileMap_Xe2_Lpm_r0
{VAProfileHEVCSccMain, &entrypointMap_VAProfileHEVCSccMain_Xe2_Lpm_r0},
{VAProfileHEVCMain444_10, &entrypointMap_VAProfileHEVCMain444_10_Xe2_Lpm_r0},
{VAProfileHEVCMain444, &entrypointMap_VAProfileHEVCMain444_Xe2_Lpm_r0},
{VAProfileHEVCMain422_10, &entrypointMap_VAProfileHEVCMain422_10_Xe2_Lpm_r0},
{VAProfileHEVCMain10, &entrypointMap_VAProfileHEVCMain10_Xe2_Lpm_r0},
{VAProfileHEVCMain, &entrypointMap_VAProfileHEVCMain_Xe2_Lpm_r0},
#endif

#if defined(_HEVC_DECODE_SUPPORTED)
{VAProfileHEVCMain12, &entrypointMap_VAProfileHEVCMain12_Xe2_Lpm_r0},
{VAProfileHEVCMain422_10, &entrypointMap_VAProfileHEVCMain422_10_Xe2_Lpm_r0},
{VAProfileHEVCMain422_12, &entrypointMap_VAProfileHEVCMain422_12_Xe2_Lpm_r0},
{VAProfileHEVCMain444_12, &entrypointMap_VAProfileHEVCMain444_12_Xe2_Lpm_r0},
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,31 @@ static const ConfigDataList configDataList_VAProfileHEVCMain10_VAEntrypointEncSl
{VA_RC_VBR | VA_RC_MB, 0}
};

static const ConfigDataList configDataList_VAProfileHEVCMain422_10_VAEntrypointEncSlice_Xe2_Lpm_r0 =
{
{VA_RC_CQP, 0},
{VA_RC_CBR, 0},
{VA_RC_VBR, 0},
{VA_RC_CBR | VA_RC_MB, 0},
{VA_RC_VBR | VA_RC_MB, 0},
{VA_RC_ICQ, 0},
{VA_RC_VCM, 0},
{VA_RC_QVBR, 0},
{VA_RC_AVBR, 0},
#if VA_CHECK_VERSION(1, 10, 0)
{VA_RC_TCBRC, 0},
#endif
{VA_RC_CBR | VA_RC_PARALLEL | VA_RC_MB, 0},
{VA_RC_VBR | VA_RC_PARALLEL | VA_RC_MB, 0},
{VA_RC_ICQ | VA_RC_PARALLEL, 0},
{VA_RC_VCM | VA_RC_PARALLEL, 0},
{VA_RC_QVBR | VA_RC_PARALLEL, 0},
{VA_RC_AVBR | VA_RC_PARALLEL, 0},
#if VA_CHECK_VERSION(1, 10, 0)
{VA_RC_TCBRC | VA_RC_PARALLEL, 0},
#endif
};

static const ConfigDataList configDataList_VAProfileHEVCMain444_VAEntrypointEncSlice_Xe2_Lpm_r0 =
{
{VA_RC_CQP, 0},
Expand Down Expand Up @@ -255,6 +280,32 @@ static const AttribList attribList_VAProfileHEVCMain10_VAEntrypointEncSlice_Xe2_
#endif
};

static const AttribList attribList_VAProfileHEVCMain422_10_VAEntrypointEncSlice_Xe2_Lpm_r0
{
{VAConfigAttribRTFormat, VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV420_10BPP | VA_RT_FORMAT_YUV422 | VA_RT_FORMAT_YUV422_10},
{VAConfigAttribRateControl, VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_QVBR | VA_RC_MB | VA_RC_VCM | VA_RC_TCBRC | VA_RC_ICQ},
{VAConfigAttribEncParallelRateControl, 0},
{VAConfigAttribEncPackedHeaders, VA_ENC_PACKED_HEADER_PICTURE | VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_SLICE | VA_ENC_PACKED_HEADER_RAW_DATA | VA_ENC_PACKED_HEADER_MISC},
{VAConfigAttribEncInterlaced, 0},
{VAConfigAttribEncMaxRefFrames, DDI_CODEC_VDENC_MAX_L0_REF_FRAMES_LDB |(DDI_CODEC_VDENC_MAX_L1_REF_FRAMES_LDB << DDI_CODEC_LEFT_SHIFT_FOR_REFLIST1)},
{VAConfigAttribEncMaxSlices, ENCODE_HEVC_VDENC_NUM_MAX_SLICES},
{VAConfigAttribEncSliceStructure, VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS | VA_ENC_SLICE_STRUCTURE_MAX_SLICE_SIZE},
{VAConfigAttribMaxPictureWidth, CODEC_16K_MAX_PIC_WIDTH},
{VAConfigAttribMaxPictureHeight, CODEC_12K_MAX_PIC_HEIGHT},
{VAConfigAttribEncQualityRange, NUM_TARGET_USAGE_MODES - 1},
{VAConfigAttribEncIntraRefresh, VA_ENC_INTRA_REFRESH_ROLLING_COLUMN | VA_ENC_INTRA_REFRESH_ROLLING_ROW},
{VAConfigAttribEncROI, HEVCCommon_VAEntrypointEncSlice_encROI_Xe2_Lpm_r0.value},
{VAConfigAttribProcessingRate, VA_PROCESSING_RATE_ENCODE},
{VAConfigAttribEncDirtyRect, 16},
{VAConfigAttribEncTileSupport, 1},
{VAConfigAttribPredictionDirection, VA_PREDICTION_DIRECTION_PREVIOUS | VA_PREDICTION_DIRECTION_FUTURE},
{VAConfigAttribContextPriority, 1024},
#if VA_CHECK_VERSION(1, 12, 0)
{VAConfigAttribEncHEVCFeatures, vaConfigAttribValEncHEVCFeatures.value},
{VAConfigAttribEncHEVCBlockSizes, vaConfigAttribValEncHEVCBlockSizes.value},
#endif
};

static const AttribList attribList_VAProfileHEVCMain444_VAEntrypointEncSlice_Xe2_Lpm_r0
{
{VAConfigAttribRTFormat, VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV420_10BPP | VA_RT_FORMAT_YUV444 | VA_RT_FORMAT_YUV444_10 | VA_RT_FORMAT_RGB32 | VA_RT_FORMAT_RGB32_10BPP},
Expand Down Expand Up @@ -432,6 +483,16 @@ static const ProfileSurfaceAttribInfo surfaceAttribInfo_VAProfileHEVCMain10_VAEn
{VASurfaceAttribMemoryType, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_SURFACE_ATTRIB_MEM_TYPE_VA | VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2}}},
};

static const ProfileSurfaceAttribInfo surfaceAttribInfo_VAProfileHEVCMain422_10_VAEntrypointEncSlice_Xe2_Lpm_r0 =
{
{VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC_YUY2}}},
{VASurfaceAttribMaxWidth, VA_SURFACE_ATTRIB_GETTABLE, {VAGenericValueTypeInteger, {CODEC_16K_MAX_PIC_WIDTH}}},
{VASurfaceAttribMaxHeight, VA_SURFACE_ATTRIB_GETTABLE, {VAGenericValueTypeInteger, {CODEC_12K_MAX_PIC_HEIGHT}}},
{VASurfaceAttribMinWidth, VA_SURFACE_ATTRIB_GETTABLE, {VAGenericValueTypeInteger, {CODEC_128_MIN_PIC_WIDTH}}},
{VASurfaceAttribMinHeight, VA_SURFACE_ATTRIB_GETTABLE, {VAGenericValueTypeInteger, {CODEC_128_MIN_PIC_HEIGHT}}},
{VASurfaceAttribMemoryType, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_SURFACE_ATTRIB_MEM_TYPE_VA | VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2}}},
};

static const ProfileSurfaceAttribInfo surfaceAttribInfo_VAProfileHEVCMain444_VAEntrypointEncSlice_Xe2_Lpm_r0 =
{
{VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC_AYUV}}},
Expand Down Expand Up @@ -515,6 +576,13 @@ static const EntrypointData entrypointMap_VAProfileHEVCMain10_Data_Xe2_Lpm_r0
&surfaceAttribInfo_VAProfileHEVCMain10_VAEntrypointEncSlice_Xe2_Lpm_r0,
};

static const EntrypointData entrypointMap_VAProfileHEVCMain422_10_Data_Xe2_Lpm_r0
{
&attribList_VAProfileHEVCMain422_10_VAEntrypointEncSlice_Xe2_Lpm_r0,
&configDataList_VAProfileHEVCMain422_10_VAEntrypointEncSlice_Xe2_Lpm_r0,
&surfaceAttribInfo_VAProfileHEVCMain422_10_VAEntrypointEncSlice_Xe2_Lpm_r0,
};

static const EntrypointData entrypointMap_VAProfileHEVCMain444_Data_Xe2_Lpm_r0
{
&attribList_VAProfileHEVCMain444_VAEntrypointEncSlice_Xe2_Lpm_r0,
Expand Down

0 comments on commit 7300aa7

Please sign in to comment.