mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
amd/vpelib: Refactor 3D LUT parameters
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com> Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com> Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com> Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
This commit is contained in:
parent
7d326ab082
commit
596d9ff8cf
6 changed files with 9 additions and 4 deletions
|
|
@ -483,7 +483,6 @@ struct vpe_debug_options {
|
|||
uint32_t mpc_crc_ctrl : 1;
|
||||
uint32_t skip_optimal_tap_check : 1;
|
||||
uint32_t disable_lut_caching : 1; /*< disable config caching for all luts */
|
||||
|
||||
uint32_t bg_bit_depth;
|
||||
|
||||
struct vpe_mem_low_power_enable_options enable_mem_low_power;
|
||||
|
|
@ -750,10 +749,9 @@ struct vpe_tonemap_params {
|
|||
enum vpe_color_primaries lut_out_gamut; /**< Output color primary */
|
||||
uint16_t input_pq_norm_factor; /**< Perceptual Quantizer normalization
|
||||
factor. */
|
||||
uint16_t lut_dim; /**< Size of one dimension of the 3D-LUT */
|
||||
uint16_t lut_dim; /**< Size of one dimension of the 3D-LUT */
|
||||
union {
|
||||
uint16_t *lut_data; /**< Accessible to CPU */
|
||||
void *dma_lut_data; /**< Accessible to GPU. Only for fast load */
|
||||
};
|
||||
bool is_dma_lut;
|
||||
bool enable_3dlut; /**< Enable/Disable 3D-LUT */
|
||||
|
|
|
|||
|
|
@ -621,6 +621,10 @@ enum vpe_status vpe_check_tone_map_support(
|
|||
}
|
||||
}
|
||||
|
||||
if (is_3D_lut_enabled && stream->tm_params.lut_dim != LUT_DIM_9 &&
|
||||
stream->tm_params.lut_dim != LUT_DIM_17) { /* only support 9/17 cube */
|
||||
status = VPE_STATUS_BAD_TONE_MAP_PARAMS;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "vpe_types.h"
|
||||
#include "hw_shared.h"
|
||||
#include "color.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "vpe_types.h"
|
||||
#include "hw_shared.h"
|
||||
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ enum lut_dimension {
|
|||
LUT_DIM_9 = 9,
|
||||
LUT_DIM_17 = 17,
|
||||
};
|
||||
|
||||
struct vpe_rgb {
|
||||
uint32_t red;
|
||||
uint32_t green;
|
||||
|
|
|
|||
|
|
@ -242,7 +242,6 @@ struct vpe *vpe_create(const struct vpe_init_data *params)
|
|||
vpe_priv->scale_yuv_matrix = true;
|
||||
|
||||
vpe_priv->collaborate_sync_index = 0;
|
||||
|
||||
return &vpe_priv->pub;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue