diff --git a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.cpp b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.cpp index cf9640f62d..4535d6f127 100644 --- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.cpp +++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.cpp @@ -1537,6 +1537,7 @@ CODECHAL_MODE DdiEncodeHevc::GetEncodeCodecMode( { case VAProfileHEVCMain: case VAProfileHEVCMain10: + case VAProfileHEVCMain422_10: case VAProfileHEVCMain444: case VAProfileHEVCMain444_10: case VAProfileHEVCSccMain: diff --git a/media_softlet/linux/common/ddi/ddi_register_components_specific.h b/media_softlet/linux/common/ddi/ddi_register_components_specific.h index 5d153db823..b6c1246750 100644 --- a/media_softlet/linux/common/ddi/ddi_register_components_specific.h +++ b/media_softlet/linux/common/ddi/ddi_register_components_specific.h @@ -45,6 +45,9 @@ static bool RegisteredHevcMain = static bool RegisteredHevcMain10 = DdiEncodeFactory:: Register(ComponentInfo{VAProfileHEVCMain10, VAEntrypointEncSlice}); +static bool RegisteredHevcMain422_10 = + DdiEncodeFactory:: + Register(ComponentInfo{VAProfileHEVCMain422_10, VAEntrypointEncSlice}); static bool RegisteredHevcMain444 = DdiEncodeFactory:: Register(ComponentInfo{VAProfileHEVCMain444, VAEntrypointEncSlice}); diff --git a/media_softlet/linux/xe2_lpm_r0/ddi/capstable_data_xe2_lpm_r0_specific.h b/media_softlet/linux/xe2_lpm_r0/ddi/capstable_data_xe2_lpm_r0_specific.h index a91ea582d8..4fa4529bb6 100644 --- a/media_softlet/linux/xe2_lpm_r0/ddi/capstable_data_xe2_lpm_r0_specific.h +++ b/media_softlet/linux/xe2_lpm_r0/ddi/capstable_data_xe2_lpm_r0_specific.h @@ -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 @@ -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 diff --git a/media_softlet/linux/xe2_lpm_r0/encode/hevc/ddi/capstable_data_hevc_encode_xe2_lpm_r0_specific.h b/media_softlet/linux/xe2_lpm_r0/encode/hevc/ddi/capstable_data_hevc_encode_xe2_lpm_r0_specific.h index ad4ef39b8f..f58394b8e4 100644 --- a/media_softlet/linux/xe2_lpm_r0/encode/hevc/ddi/capstable_data_hevc_encode_xe2_lpm_r0_specific.h +++ b/media_softlet/linux/xe2_lpm_r0/encode/hevc/ddi/capstable_data_hevc_encode_xe2_lpm_r0_specific.h @@ -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}, @@ -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}, @@ -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}}}, @@ -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,