Skip to content

Commit

Permalink
tone_mapping: don't pick ST2094 for inverse tone-mapping
Browse files Browse the repository at this point in the history
This has no inverse curve, so don't default `auto` to it.
  • Loading branch information
haasn committed Feb 17, 2023
1 parent 258cf93 commit efcc1e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tone_mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void pl_tone_map_params_infer(struct pl_tone_map_params *par)
float src_max = pl_hdr_rescale(par->input_scaling, PL_HDR_NORM, par->input_max);
float dst_max = pl_hdr_rescale(par->output_scaling, PL_HDR_NORM, par->output_max);
float ratio = src_max / dst_max;
if (par->hdr.ootf.num_anchors || par->hdr.scene_avg) {
if ((par->hdr.ootf.num_anchors || par->hdr.scene_avg) && ratio > 1) {
// HDR10+ metadata available: Pick SMPTE ST2094-40
par->function = &pl_tone_map_st2094_40;
} else if (ratio > 10) {
Expand Down

0 comments on commit efcc1e5

Please sign in to comment.