Skip to content
Snippets Groups Projects
  1. Feb 13, 2023
    • quietvoid's avatar
      utils/libav: derive scene brightness info from DOVI RPU · 384fcf88
      quietvoid authored
      Using `libdovi` to parse the RPU, as `AVDOVIMetadata`
      does not yet parse the extension metadata blocks.
      384fcf88
    • Niklas Haas's avatar
      tone_mapping: default to ST2094 when metadata present · 1f1d708e
      Niklas Haas authored
      This generally produces good results in such a case. ST2094-40 is better
      than ST2094-10 even in the absence of metadata, because the relevant
      parts of ST2094-10 (the average->average mapping) are also implemented
      in the ST2094-40 fallback path, and more importantly, the latter also
      implements proper black point adaptation (to avoid black crush).
      
      In the future, ST2094-40 (possibly with some tweaks) might become the
      one-size-fits-all default tone-mapping method for all scenarios.
      1f1d708e
    • Niklas Haas's avatar
      tone_mapping: add SMPTE ST2094-10 and ST2094-40 Annex B · f8a5332c
      Niklas Haas authored
      The implementation for ST2094-10 is straightforward by just copying
      equations from the corresponding SMPTE document. While this relies on
      metadata for the best results, we can get good enough results by just
      taking the avg to be 10.
      
      For ST2094-40, includes modifications from the ATSC A/341 amendment. I
      had to omit the section about fixing the first bezier point (P[1]),
      because it resulted in a completely broken output for some samples (due
      to extreme slopes in the knee function). Also includes black point
      adaptation, based on specification BT.1886 - something that was notably
      missing in the original SMPTE spec.
      
      Omits the parts of the spec we can't faithfully implement, such as the
      detail processing BS, support for overlapping elliptical windows, and
      the ST2094-10 subjective gain/offset controls missing in HDR10+
      metadata.
      
      Closes: videolan/libplacebo#244
      Closes: videolan/libplacebo#245
      f8a5332c
    • Niklas Haas's avatar
      shaders/colorspace: implement ST2094-40 MaxSCL gain · 94d82931
      Niklas Haas authored
      In SMPTE ST2094-40, it recommends applying an extra gain parameter to
      raise the brightness of very monochromatic scenes when using
      PL_TONE_MAP_MAX. Implement this spec using the hard-coded reference
      values.
      94d82931
    • Niklas Haas's avatar
      shaders/colorspace: mark tone-mapping LUT as dynamic · 434bdddb
      Niklas Haas authored
      When HDR metadata is present, because this is expected to change
      semi-frequently.
      434bdddb
    • Niklas Haas's avatar
      tone_mapping: make HDR metadata available to tone-mappers · 812586a5
      Niklas Haas authored
      By just sticking it inside `pl_hdr_metadata`, happen what may.
      
      We don't need access to the output metadata, so omit it. (This will
      probably never change, because this HDR metadata contains scene-derived
      values)
      812586a5
    • Niklas Haas's avatar
      85847a8a
    • Niklas Haas's avatar
      utils/libav: add `pl_map_hdr_metadata` · c8f52115
      Niklas Haas authored
      This not only exposes the previous logic to users, but also adds support
      for AVDynamicHDRPlus. Use this function internally in place of the
      previous duplicated code, and also get rid of some sanity masking logic
      that was of dubious importance (especially now that `nominal_min/max`
      are decoupled from the HDR metadata).
      
      For HDR10, we only map the fields relevant/interesting for us, ignore
      the rest. (Which is also unused in practice)
      c8f52115
    • Niklas Haas's avatar
      utils/libav: fix deprecated struct name · ae1e2398
      Niklas Haas authored
      ae1e2398
    • Niklas Haas's avatar
      utils/libav: don't pollute namespace · 2b0931b7
      Niklas Haas authored
      Prefix this #define
      2b0931b7
    • Niklas Haas's avatar
      renderer: disable peak detection with per-scene metadata · 462ec51e
      Niklas Haas authored
      Redundant in this case, since the per-scene values are both
      authoritative and significantly more accurate.
      462ec51e
    • Niklas Haas's avatar
      colorspace: refactor HDR levels fields · edad2c41
      Niklas Haas authored
      So, I was growing increasingly dissatisfied with the need to override
      the HDR mastering display metadata for PQ inputs, and wanted to cleanly
      separate concerns here.
      
      After this refactor, the *mastering metadata* remains purely
      informative, and all of the relevant defaulting logic goes on inside
      `pl_color_space`. This field will also be consulted for any operations
      relevant to tone-mapping, and can take into account both per-scene
      metadata as well as static metadata.
      
      As an aside, I decided to just completely drop back-compatibility with
      the deprecated `sig_*` fields, because it's been years.
      edad2c41
    • Niklas Haas's avatar
      colorspace: add HDR10+ metadata to `pl_hdr_metadata` · 0994b6e4
      Niklas Haas authored
      Based on SMPTE ST2094, and in particular A/341 ATSC 2094-40. We should
      keep track of this so we can add it to the metadata and use it for
      things like ST2094-10 and ST2094-40.
      
      We don't default these value if missing, because their presence should
      indicate the availability of frame-specific metadata.
      0994b6e4
    • Niklas Haas's avatar
      common: add PL_MAX3 · a8135f47
      Niklas Haas authored
      Based on FFMAX3
      a8135f47
  2. Feb 12, 2023
  3. Feb 11, 2023
  4. Feb 08, 2023
  5. Feb 07, 2023
  6. Feb 05, 2023
  7. Feb 04, 2023
  8. Feb 03, 2023
  9. Feb 02, 2023
    • Niklas Haas's avatar
      tests/vulkan: fix bug when VK_KHR_surface is missing · da0c8b2b
      Niklas Haas authored
      We call vkDestroySurfaceKHR indiscriminately, even if VK_KHR_surface was
      not even enabled. (Since it's listed under `opt_extensions`, this is a
      valid case)
      
      Easiest way to work around this special case is to just avoid calling
      vkDestroySurfaceKHR if we never created a surface, since in that case
      `surf` will still be NULL.
      da0c8b2b
  10. Feb 01, 2023
  11. Jan 31, 2023
Loading