encode.TypeAlias.GainmapEncodingParameters - MONOGRID/gainmap-js GitHub Wiki

@monogrid/gainmap-js / encode / GainmapEncodingParameters

Type Alias: GainmapEncodingParameters

GainmapEncodingParameters: object

Parameters used by content Creators in order to create a GainMap

Type declaration

gamma?

optional gamma: [number, number, number]

This is the gamma to apply to the stored map values.

Default Value

[1, 1, 1]

Remarks

  • Typically you can use a gamma of 1.0.
  • You can use a different value if your gain map has a very uneven distribution of log_recovery(x, y) values. For example, this might apply if a gain map has a lot of detail just above SDR range (represented as small log_recovery(x, y) values), and a very large map_max_log2 for the top end of the HDR rendition's desired brightness (represented by large log_recovery(x, y) values). In this case, you can use a map_gamma higher than 1.0 so that recovery(x, y) can precisely encode the detail in both the low end and high end of log_recovery(x, y).

maxContentBoost

maxContentBoost: number

This value lets the content creator constrain how much brighter an image can get, when shown on an HDR display, relative to the SDR rendition.

Remarks

  • This value is a constant for a particular image. For example, if the value is four, then for any given pixel, the linear luminance of the displayed HDR rendition must be, at the most, 4x the linear luminance of the SDR rendition. In practice, this means that the brighter parts of the scene can be shown up to 4x brighter.
  • In practice, this value is typically greater than 1.0.
  • Always greater than or equal to Min content boost.

Non Logarithmic space

minContentBoost?

optional minContentBoost: number

This value lets the content creator constrain how much darker an image can get, when shown on an HDR display, relative to the SDR rendition. This value is a constant for a particular image.

Default Value

1

Remarks

  • If, for example, the value is 0.5, then for any given pixel, the linear luminance of the displayed HDR rendition must be (at the least) 0.5x the linear luminance of the SDR rendition.
  • In practice, this value is typically equal to or just less than 1.0.
  • Always less than or equal to Max content boost.

Non Logarithmic space

offsetHdr?

optional offsetHdr: [number, number, number]

This is the offset to apply to the HDR pixel values during gain map generation and application.

Default Value

[1/64, 1/64, 1/64]

offsetSdr?

optional offsetSdr: [number, number, number]

This is the offset to apply to the SDR pixel values during gain map generation and application

Default Value

[1/64, 1/64, 1/64]

Defined in

src/encode/types.ts:14