Replies: 1 comment
-
(Closed, as i think the topic belongs to libplacebo: haasn/libplacebo#301) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello dear coders,
Maybe someone can help me:
On a home theater with a projector setup, there are some kind of 2 different contrasts which decide about the image quality:
This results in a visibly degradation of details on my JVC beamer in bright scenes: In dark areas, loads of details are flattened out.
Setting the "target-contrast" option to 1'000 or lower values helps this out.
On the other hand setting this value also results in a horrible black level in dark scenes, horror movies, and so on. For those, i'd rather chose a value in between of 20'000 to 50'000.
What i now want to code is some kind of an option like a dynamic display-blacklevel that depends on the max-luma.
Something like:
dst.min_luma = src.max_luma / 1000
I have found out so far, that the gpu-next mappings are all sourced in the libplacebo package.
What i tried out was:
libplacebo / src / tone_mapping.c : L558 in the function static void spline(float *lut, const struct pl_tone_map_params *params)
new_output_min = params->input_max / 1000;
and for the rest of the function changing all
params->output_min
tonew_output_min
This resulted in loads of compiling errors and i recognized that i didnt even understand the complexity of the code. (Which values are contained by these variables? values from 0 to 1.0 as floats? or values from -0.5f to 0.5f with an offset?
The next thing i tried out was playing around with the
apply_target_contrast
function inmpv / src / video / out / vo_gpu_next.c : L813 in the function static void apply_target_contrast(struct priv *p, struct pl_color_space *color)
from
color->hdr.min_luma = color->hdr.max_luma / opts->target_contrast;
to
color->hdr.min_luma = p->icc_params.max_luma / opts->target_contrast;
which clearly didnt help out, because i think i didnt fully understand how this function works.
Is anyone here with a bigger insight of the source code, who can help me out?
I think it SHOULD be a simple job when knowing where to put this "feature".
But i do not have any clue where....
Very much greetings,
Lukas
Beta Was this translation helpful? Give feedback.
All reactions