Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 3DLUT interpolation method. #767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions va/va_vpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,16 @@ typedef struct _VAProcFilterParameterBufferHDRToneMapping {
#define VA_3DLUT_CHANNEL_VUY_RGB 0x00000004
/**@}*/

/** @name 3DLUT Interpolation Method */
/**@{*/
/** \brief 3DLUT Interpolation Method is unknown. */
#define VA_3DLUT_INTERPOLATION_UNKNOWN 0
/** \brief 3DLUT Interpolation Method is Trilinear. */
#define VA_3DLUT_INTERPOLATION_TRILINEAR 1
/** \brief 3DLUT Interpolation Method is Tetrahedral */
#define VA_3DLUT_INTERPOLATION_TETRAHEDRAL 2
/**@}*/

/**
* \brief 3DLUT filter parametrization.
*
Expand Down Expand Up @@ -1426,8 +1436,12 @@ typedef struct _VAProcFilterParameterBuffer3DLUT {
/** \brief channel_mapping defines the mapping of input and output channels, could be one of VA_3DLUT_CHANNEL_XXX*/
uint32_t channel_mapping;

/** \brief interpolation_method defines the 3DLUT interpolation method, could be one of VA_3DLUT_INTERPOLATION_XXX*/
uint32_t interpolation_method : 4;

/** \brief reserved bytes for future use, must be zero */
uint32_t va_reserved[VA_PADDING_HIGH];
uint32_t va_reserved1 : 28;
uint32_t va_reserved[VA_PADDING_HIGH - 1];
} VAProcFilterParameterBuffer3DLUT;

Copy link
Member

@LhGu LhGu Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For HDR10, If app needs to enable 3DLut TETRAHEDRAL interpolation, besides VAProcFilterHighDynamicRangeToneMapping filter type, they also need to add VAProcFilter3DLUT filter type because we only add this parameter in VAProcFilterParameterBuffer3DLUT. right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App either use VAProcFilterHighDynamicRangeToneMapping with HDR10 metadata, or use VAProcFilterParameterBuffer3DLUT by using their own 3DLUT. Those 2 filters are usually not combined to use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App either use VAProcFilterHighDynamicRangeToneMapping with HDR10 metadata, or use VAProcFilterParameterBuffer3DLUT by using their own 3DLUT. Those 2 filters are usually not combined to use.

Thanks for your answer. For VAProcFilterHighDynamicRangeToneMapping with HDR10 METADATA, do we only control 3DLut interpolation method in our internal driver?
NOW, App only could control interpolation mode by VAProcFilterParameterBuffer3DLUT.

/** \brief Capabilities specification for the 3DLUT filter. */
Expand All @@ -1442,9 +1456,12 @@ typedef struct _VAProcFilterCap3DLUT {
uint16_t num_channel;
/** \brief channel_mapping defines the mapping of channels, could be some combination of VA_3DLUT_CHANNEL_XXX*/
uint32_t channel_mapping;
/** \brief interpolation_method defines the 3DLUT interpolation method, could be one of VA_3DLUT_INTERPOLATION_XXX*/
uint32_t interpolation_method : 4;

/** \brief Reserved bytes for future use, must be zero */
uint32_t va_reserved[VA_PADDING_HIGH];
uint32_t va_reserved1 : 28;
uint32_t va_reserved[VA_PADDING_HIGH - 1];
} VAProcFilterCap3DLUT;

/**
Expand Down
Loading