diff options
author | Niklas Haas <git@haasn.xyz> | 2017-06-10 14:01:25 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-06-18 20:48:23 +0200 |
commit | c335e84230916d7d7a38288031516e8b2ec1c36b (patch) | |
tree | 009b92a90285b7fae212d82caec588dd6ef709d8 /video/filter | |
parent | 642e963c86040350ac8f06b9731e6126f4d55316 (diff) |
video: refactor HDR implementation
List of changes:
1. Kill nom_peak, since it's a pointless non-field that stores nothing
of value and is _always_ derived from ref_white anyway.
2. Kill ref_white/--target-brightness, because the only case it really
existed for (PQ) actually doesn't need to be this general: According
to ITU-R BT.2100, PQ *always* assumes a reference monitor with a
white point of 100 cd/m².
3. Improve documentation and comments surrounding this stuff.
4. Clean up some of the code in general. Move stuff where it belongs.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf_format.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c index d406d98d9b..2cb6943879 100644 --- a/video/filter/vf_format.c +++ b/video/filter/vf_format.c @@ -38,7 +38,7 @@ struct vf_priv_s { int colorlevels; int primaries; int gamma; - float peak; + float sig_peak; int chroma_location; int stereo_in; int stereo_out; @@ -95,8 +95,8 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *in, out->color.primaries = p->primaries; if (p->gamma) out->color.gamma = p->gamma; - if (p->peak) - out->color.sig_peak = p->peak; + if (p->sig_peak) + out->color.sig_peak = p->sig_peak; if (p->chroma_location) out->chroma_location = p->chroma_location; if (p->stereo_in) @@ -145,7 +145,7 @@ static const m_option_t vf_opts_fields[] = { OPT_CHOICE_C("colorlevels", colorlevels, 0, mp_csp_levels_names), OPT_CHOICE_C("primaries", primaries, 0, mp_csp_prim_names), OPT_CHOICE_C("gamma", gamma, 0, mp_csp_trc_names), - OPT_FLOAT("peak", peak, 0), + OPT_FLOAT("sig-peak", sig_peak, 0), OPT_CHOICE_C("chroma-location", chroma_location, 0, mp_chroma_names), OPT_CHOICE_C("stereo-in", stereo_in, 0, mp_stereo3d_names), OPT_CHOICE_C("stereo-out", stereo_out, 0, mp_stereo3d_names), @@ -154,6 +154,7 @@ static const m_option_t vf_opts_fields[] = { OPT_INT("dh", dh, 0), OPT_DOUBLE("dar", dar, 0), OPT_REMOVED("outputlevels", "use the --video-output-levels global option"), + OPT_REMOVED("peak", "use sig-peak instead (changed value scale!)"), {0} }; |