Skip to content

Commit

Permalink
[VP] Re-enable 3DLut interpolation mode for VE
Browse files Browse the repository at this point in the history
* [VP] Re-enable 3DLut interpolation mode for VE

Enable 3DLut interpolation mode for new plaform
  • Loading branch information
LhGu authored and intel-mediadev committed Nov 13, 2023
1 parent 777c74e commit 707eae7
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 5 deletions.
22 changes: 17 additions & 5 deletions media_common/agnostic/common/hw/mhw_vebox.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ typedef struct _MHW_VEBOX_3D_LUT
uint32_t Lut3dEnable : 1;
uint32_t Lut3dSize : 2;
uint32_t ChannelMappingSwapForLut3D : 1;
uint32_t : 26; // Reserved
uint32_t InterpolationMethod : 1;
uint32_t : 25; // Reserved
} MHW_VEBOX_3D_LUT, *PMHW_VEBOX_3D_LUT;

//!
Expand Down Expand Up @@ -468,6 +469,16 @@ typedef enum _MHW_WB_MODE
MHW_WB_COUNT
} MHW_WB_MODE;

//!
//! Structure MHW_3DLUT_INTERPOLATION
//! \brief 3DLut interpolation method
//!
typedef enum _MHW_3DLUT_INTERPOLATION
{
MHW_3DLUT_INTERPOLATION_TRILINEAR = 0, //!< 3DLUT Trilinear interpolation method.
MHW_3DLUT_INTERPOLATION_TETRAHEDRAL = 1 //!< 3DLUT Tetrahedral interpolation method.
} MHW_3DLUT_INTERPOLATION;

//!
//! Structure MHW_WHITE_BALANCE_PARAMS
//! \brief White Balance Parameters
Expand Down Expand Up @@ -595,10 +606,11 @@ typedef struct _MHW_CAPPIPE_PARAMS
//!
typedef struct _MHW_3DLUT_PARAMS
{
uint32_t bActive; //!< Active or not
uint32_t LUTSize; //!< Size (one dimensions) of the LUT
uint32_t LUTLength; //!< Length of the LUT, in unit of bit
uint8_t *pLUT; //!< Pointer to the LUT value
uint32_t bActive; //!< Active or not
uint32_t LUTSize; //!< Size (one dimensions) of the LUT
uint32_t LUTLength; //!< Length of the LUT, in unit of bit
uint8_t *pLUT; //!< Pointer to the LUT value
MHW_3DLUT_INTERPOLATION InterpolationMethod; //!< Vebox 3DLut interpolation method
} MHW_3DLUT_PARAMS, *PMHW_3DLUT_PARAMS;

//!
Expand Down
12 changes: 12 additions & 0 deletions media_common/agnostic/common/vp/hal/vp_common_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,16 @@ typedef enum _VPHAL_COLORPACK
} VPHAL_COLORPACK,
*PVPHAL_COLORPACK;

//!
//! \brief VEBOX 3DLut interpolation mode
//!
typedef enum _VPHAL_3DLUT_INTERPOLATION
{
VPHAL_3DLUT_INTERPOLATION_DEFAULT = 0, //!< Default 3DLUT interpolation method.
VPHAL_3DLUT_INTERPOLATION_TRILINEAR = 1, //!< 3DLUT trilinear interpolation method.
VPHAL_3DLUT_INTERPOLATION_TETRAHEDRAL = 2 //!< 3DLUT tetrahedral interpolation method.
} VPHAL_3DLUT_INTERPOLATION;

//!
//! \brief Output Pipe Mode enum
//! \details The output pipe that writes the RenderTarget surface
Expand Down Expand Up @@ -890,6 +900,8 @@ typedef struct _VPHAL_3DLUT_PARAMS
uint32_t ChannelMapping = 0; // Channel Mapping for the 3DLUT input to 3DLUT output.
uint16_t BitDepthPerChannel = 0; // Bit Depth Per Channel(4 channels for 3DLUT).
uint16_t ByteCountPerEntry = 0; // Byte Count Per Entry including reserved bytes.

VPHAL_3DLUT_INTERPOLATION InterpolationMethod = VPHAL_3DLUT_INTERPOLATION_DEFAULT; // VEBox 3DLut interpolation mode
} VPHAL_3DLUT_PARAMS, *PVPHAL_3DLUT_PARAMS;

//!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ MOS_STATUS VpUserSetting::InitVpUserSetting(MediaUserSettingSharedPtr userSettin
0,
true);

DeclareUserSettingKeyForDebug(
userSettingPtr,
__VPHAL_FORCE_3DLUT_INTERPOLATION,
MediaUserSetting::Group::Sequence,
0,
true);

DeclareUserSettingKeyForDebug( //Enable 1K 1DLUT
userSettingPtr,
__VPHAL_ENABLE_1K_1DLUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,22 @@ MOS_STATUS VpUserFeatureControl::CreateUserSettingForDebug()
#endif

#if (_DEBUG || _RELEASE_INTERNAL)
uint32_t force3DLutInterpolation = 0;
eRegKeyReadStatus = ReadUserSettingForDebug(
m_userSettingPtr,
force3DLutInterpolation,
__VPHAL_FORCE_3DLUT_INTERPOLATION,
MediaUserSetting::Group::Sequence);
if (MOS_SUCCEEDED(eRegKeyReadStatus))
{
m_ctrlValDefault.force3DLutInterpolation = force3DLutInterpolation;
}
else
{
// Default value
m_ctrlValDefault.force3DLutInterpolation = 0;
}

//SFC NV12/P010 Linear Output.
uint32_t enabledSFCNv12P010LinearOutput = 0;
eRegKeyReadStatus = ReadUserSettingForDebug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class VpUserFeatureControl

#if (_DEBUG || _RELEASE_INTERNAL)
bool forceDecompressedOutput = false;
uint32_t force3DLutInterpolation = 0;
uint32_t enabledSFCNv12P010LinearOutput = 0;
uint32_t enabledSFCRGBPRGB24Output = 0;
bool enableIFNCC = false;
Expand All @@ -76,6 +77,11 @@ class VpUserFeatureControl
return m_ctrlVal.forceDecompressedOutput;
}

uint32_t Force3DLutInterpolation()
{
return m_ctrlVal.force3DLutInterpolation;
}

uint32_t EnabledSFCNv12P010LinearOutput()
{
return m_ctrlVal.enabledSFCNv12P010LinearOutput;
Expand Down
1 change: 1 addition & 0 deletions media_softlet/agnostic/common/vp/hal/utils/vp_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ class Trace
#define __VPHAL_RNDR_SCOREBOARD_CONTROL "SCOREBOARD Control"
#define __VPHAL_RNDR_CMFC_CONTROL "CMFC Control"
#define __VPHAL_ENABLE_1K_1DLUT "Enable 1K 1DLUT"
#define __VPHAL_FORCE_3DLUT_INTERPOLATION "VPHAL Force 3DLUT Interpolation"
#define __VPHAL_VEBOX_HDR_MODE "VeboxHDRMode"
#define __VPHAL_HDR_ENABLE_QUALITY_TUNING "VPHAL HDR Enable Quality Tuning"
#define __VPHAL_HDR_ENABLE_KERNEL_DUMP "VPHAL HDR Enable Kernel Dump"
Expand Down

0 comments on commit 707eae7

Please sign in to comment.