Skip to content

LibPlacebo Tonemapping issues #629

Closed
@Dendraspis

Description

Hello rigaya,

while implementing the new parameter I have some little issues and I hope it's okay to make just this one issue for all of those:

  1. The Options List mentions src_csp=<string> and dst_csp=<string> whereas the CLI help says src_csp=<int> and dst_csp=<int>. In case both are accepted, maybe something like src_csp=<string/int> would be useful, but it would be great if both could give the same information. 😅

  2. The param metadata is defined as:
    metadata=<int>
    Data source to use for tone mapping.
    But there is also a list with defined values given: any, none, hdr10, hdr10plus, cie_y
    So I assume it should be metadata=<string> instead? Code-wise it should be the same as the other options, but difficult when using Code Preview on GitHub.

  3. While testing (2) I tried --vpp-libplacebo-tonemapping metadata=hdr10plus as well as --vpp-libplacebo-tonemapping metadata=3, but I always get:

Error: Unknown param "metadata" for option "--vpp-libplacebo-tonemapping"
Did you mean param(s) below?
  dst_max

Using for example --vpp-libplacebo-tonemapping src_csp=hdr10,dst_csp=sdr works without issues.

  1. The Options List doesn't mention it, but the CLI help mentions also:
lut_type=<string>         LUT interpretation method
                            (default:(null))
                            native, normalized, conversion

Beside the fact that it is missing: Is it only used with the LUT file or is this parameter used independently?

  1. The CLI help loos like this and it would be awesome to fix the "NewLine-issues":
 --vpp-libplacebo-tonemapping [<param1>=<value>][,<param2>=<value>][...]
     Converts colorspace of the video.
    params
      src_csp=<int>            input colorspace (default: hdr10)
      dst_csp=<int>            output colorspace (default: sdr)
                                auto, sdr, hdr10, hlg, dovi, rgb
      src_max=<float>          input max (nits) (default: 0(HDR)/0(SDR))
      src_min=<float>          input min (nits) (default: 0.0050(HDR)/0.2023(SDR))
      dst_max=<float>          output max (nits) (default: 0(HDR)/0(SDR))
      dst_min=<float>          output min (nits) (default: 0.0050(HDR)/0.2023(SDR))
      dynamic_peak_detection=<bool>  Enable dynamic peak detection (default:true)
      smooth_period=<float>          Smoothing coefficient for detected values (default:20.0)
      scene_threshold_low=<float>    Lower threshold for scene change detection (dB) (default:1.0)
      scene_threshold_high=<float>   Upper threshold for scene change detection (dB) (default:3.0)
      percentile=<float>             Percentile to consider for luminance histogram (default:99.995)
      black_cutoff=<float>           Black level cutoff intensity (PQ) (default:1.0)
      gamut_mapping=<string>          Gamut mapping mode
                                (default:perceptual)
                                clip, perceptual, softclip, relative
                                saturation, absolute, desaturate, darken
                                highlight, linear      tonemapping_function=<string>   Tone mapping function
                                (default:bt2390)
                                clip, st2094_40, st2094_10, bt2390, bt2446a
                                spline, reinhard, mobius, hable, gamma
                                linear, linearlight      tone_constants=<string>  Tone mapping constants (e.g. "exposure=0.25")
      metadata=<int>           Metadata source to use
                                (default:any)
                                any, none, hdr10, hdr10plus, cie_y      contrast_recovery=<float> Contrast recovery strength (default:0.3)
      contrast_smoothness=<float> Contrast recovery lowpass kernel size (default:3.5)
      visualize_lut=<bool>     Visualize tone mapping curve (default:false)
      show_clipping=<bool>     Highlight clipped pixels (default:false)
      use_dovi=<bool>          Use Dolby Vision RPU (default:auto)
      lut_type=<string>         LUT interpretation method
                                (default:(null))
                                native, normalized, conversion      dst_pl_transfer=<string>     Output transfer function (must be used with dst_colorprim)
                                (default:unknown)
                                unknown, srgb, bt1886, linear, gamma18
                                gamma20, gamma22, gamma24, gamma26, gamma28
                                prophoto, st428, pq, hlg, vlog, slog1, slog2      dst_pl_colorprim=<string>    Output primaries (must be used with dst_transfer)
                                (default:unknown)
                                unknown, bt601_525, bt601_625, bt709, bt470m
                                ebu_3213, bt2020, apple, adobe, prophoto
                                cie_1931, dci_p3, display_p3, v_gamut
                                s_gamut, film_c, aces_ap0, aces_ap1      knee_adaptation=<float>    Knee adaptation speed (default:0.40)
      knee_min=<float>           Minimum knee point (default:0.10)
      knee_max=<float>           Maximum knee point (default:0.80)
      knee_default=<float>       Default knee point (default:0.40)
      knee_offset=<float>        Knee offset (default:1.00)
      slope_tuning=<float>       Slope tuning (default:1.50)
      slope_offset=<float>       Slope offset (default:0.20)
      spline_contrast=<float>    Spline contrast (default:0.50)
      reinhard_contrast=<float>  Reinhard contrast (default:0.50)
      linear_knee=<float>        Linear knee point (default:0.30)
      exposure=<float>           Exposure adjustment (default:1.00)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions