avfilter/vf_tonemap_opencl: Make array smaller

Also makes the code more independent of AVCOL_TRC_NB.

Reviewed-by: Niklas Haas <ffmpeg@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-09-22 15:00:32 +02:00
parent f0586ffa95
commit baace56169

View File

@@ -70,12 +70,12 @@ typedef struct TonemapOpenCLContext {
cl_mem util_mem; cl_mem util_mem;
} TonemapOpenCLContext; } TonemapOpenCLContext;
static const char *const linearize_funcs[AVCOL_TRC_NB] = { static const char *const linearize_funcs[] = {
[AVCOL_TRC_SMPTE2084] = "eotf_st2084", [AVCOL_TRC_SMPTE2084] = "eotf_st2084",
[AVCOL_TRC_ARIB_STD_B67] = "inverse_oetf_hlg", [AVCOL_TRC_ARIB_STD_B67] = "inverse_oetf_hlg",
}; };
static const char *const delinearize_funcs[AVCOL_TRC_NB] = { static const char *const delinearize_funcs[] = {
[AVCOL_TRC_BT709] = "inverse_eotf_bt1886", [AVCOL_TRC_BT709] = "inverse_eotf_bt1886",
[AVCOL_TRC_BT2020_10] = "inverse_eotf_bt1886", [AVCOL_TRC_BT2020_10] = "inverse_eotf_bt1886",
}; };