VLC 4.0.0-dev

Ancillary that can be attached to any vlc_frame_t or picture_t. More...

Collaboration diagram for Ancillary:

Files

file  vlc_ancillary.h
 Ancillary definition and functions.
 

Data Structures

struct  vlc_video_dovi_metadata_t
 
struct  vlc_video_dovi_metadata_t::vlc_dovi_reshape_t
 Do not reorder or modify the following structs, they are intentionally specified to be identical to AVDOVIReshapingCurve / AVDOVINLQParams. More...
 
struct  vlc_video_dovi_metadata_t::vlc_dovi_nlq_t
 
struct  vlc_video_hdr_dynamic_metadata_t
 
struct  vlc_icc_profile_t
 

Macros

#define VLC_ANCILLARY_ID(a, b, c, d)   VLC_FOURCC(a,b,c,d)
 
#define VLC_ANCILLARY_ID_DOVI   VLC_FOURCC('D','o','V','i')
 
#define VLC_ANCILLARY_ID_HDR10PLUS   VLC_FOURCC('H','D','R','+')
 HDR10+ Dynamic metadata (based on ATSC A/341 Amendment 2094-40) More...
 
#define VLC_ANCILLARY_ID_ICC   VLC_FOURCC('i','C','C','P')
 Embedded ICC profiles. More...
 

Typedefs

typedef uint32_t vlc_ancillary_id
 ID of an ancillary. More...
 
typedef void(* vlc_ancillary_free_cb) (void *data)
 Callback to free an ancillary data. More...
 
typedef struct vlc_video_dovi_metadata_t vlc_video_dovi_metadata_t
 
typedef struct vlc_video_hdr_dynamic_metadata_t vlc_video_hdr_dynamic_metadata_t
 
typedef struct vlc_icc_profile_t vlc_icc_profile_t
 

Enumerations

enum  vlc_dovi_reshape_method_t { VLC_DOVI_RESHAPE_POLYNOMIAL = 0 , VLC_DOVI_RESHAPE_MMR = 1 }
 Dolby Vision metadata description. More...
 
enum  vlc_dovi_nlq_method_t { VLC_DOVI_NLQ_NONE = -1 , VLC_DOVI_NLQ_LINEAR_DZ = 0 }
 

Functions

struct vlc_ancillaryvlc_ancillary_CreateWithFreeCb (void *data, vlc_ancillary_id id, vlc_ancillary_free_cb free_cb)
 Create an ancillary. More...
 
static struct vlc_ancillaryvlc_ancillary_Create (void *data, vlc_ancillary_id id)
 Helper to create an ancillary holding an allocated data. More...
 
void vlc_ancillary_Release (struct vlc_ancillary *ancillary)
 Release an ancillary. More...
 
struct vlc_ancillaryvlc_ancillary_Hold (struct vlc_ancillary *ancillary)
 Hold an ancillary. More...
 
void * vlc_ancillary_GetData (const struct vlc_ancillary *ancillary)
 

Variables

uint8_t vlc_video_dovi_metadata_t::coef_log2_denom
 
uint8_t vlc_video_dovi_metadata_t::bl_bit_depth
 
uint8_t vlc_video_dovi_metadata_t::el_bit_depth
 
enum vlc_dovi_nlq_method_t vlc_video_dovi_metadata_t::nlq_method_idc
 
float vlc_video_dovi_metadata_t::nonlinear_offset [3]
 
float vlc_video_dovi_metadata_t::nonlinear_matrix [9]
 
float vlc_video_dovi_metadata_t::linear_matrix [9]
 
uint16_t vlc_video_dovi_metadata_t::source_min_pq
 
uint16_t vlc_video_dovi_metadata_t::source_max_pq
 
uint8_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::num_pivots
 
uint16_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::pivots [9]
 
enum vlc_dovi_reshape_method_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mapping_idc [8]
 
uint8_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::poly_order [8]
 
int64_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::poly_coef [8][3]
 
uint8_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mmr_order [8]
 
int64_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mmr_constant [8]
 
int64_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mmr_coef [8][3][7]
 
struct vlc_video_dovi_metadata_t::vlc_dovi_reshape_t vlc_video_dovi_metadata_t::curves [3]
 
uint8_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::offset_depth
 
uint16_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::offset
 
uint64_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::hdr_in_max
 
uint64_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::dz_slope
 
uint64_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::dz_threshold
 
struct vlc_video_dovi_metadata_t::vlc_dovi_nlq_t vlc_video_dovi_metadata_t::nlq [3]
 
uint8_t vlc_video_hdr_dynamic_metadata_t::country_code
 
uint8_t vlc_video_hdr_dynamic_metadata_t::application_version
 
float vlc_video_hdr_dynamic_metadata_t::targeted_luminance
 
float vlc_video_hdr_dynamic_metadata_t::maxscl [3]
 
float vlc_video_hdr_dynamic_metadata_t::average_maxrgb
 
uint8_t vlc_video_hdr_dynamic_metadata_t::num_histogram
 
uint8_t   vlc_video_hdr_dynamic_metadata_t::percentage
 
float   vlc_video_hdr_dynamic_metadata_t::percentile
 
struct {
   uint8_t   vlc_video_hdr_dynamic_metadata_t::percentage
 
   float   vlc_video_hdr_dynamic_metadata_t::percentile
 
vlc_video_hdr_dynamic_metadata_t::histogram [15]
 
float vlc_video_hdr_dynamic_metadata_t::fraction_bright_pixels
 
uint8_t vlc_video_hdr_dynamic_metadata_t::tone_mapping_flag
 
float vlc_video_hdr_dynamic_metadata_t::knee_point_x
 
float vlc_video_hdr_dynamic_metadata_t::knee_point_y
 
uint8_t vlc_video_hdr_dynamic_metadata_t::num_bezier_anchors
 
float vlc_video_hdr_dynamic_metadata_t::bezier_curve_anchors [15]
 
size_t vlc_icc_profile_t::size
 
uint8_t vlc_icc_profile_t::data []
 

Detailed Description

Ancillary that can be attached to any vlc_frame_t or picture_t.

Ancillaries can be created from:

Warning
Ancillaries should not be attached from a non packetized demuxer module since the attachment to the vlc_frame will be lost by the packetizer module that will be automatically inserted.

Ancillaries are automatically forwarded from a vlc_frame_t to an other vlc_frame_t and from a picture_t to an other picture_t. This allow to keep ancillaries untouched when audio filters or video filters are used (these filters don't have to know about the ancillary).

Ancillary readers can be either:

Macro Definition Documentation

◆ VLC_ANCILLARY_ID

#define VLC_ANCILLARY_ID (   a,
  b,
  c,
 
)    VLC_FOURCC(a,b,c,d)

◆ VLC_ANCILLARY_ID_DOVI

#define VLC_ANCILLARY_ID_DOVI   VLC_FOURCC('D','o','V','i')

◆ VLC_ANCILLARY_ID_HDR10PLUS

#define VLC_ANCILLARY_ID_HDR10PLUS   VLC_FOURCC('H','D','R','+')

HDR10+ Dynamic metadata (based on ATSC A/341 Amendment 2094-40)

This is similar to SMPTE ST2094-40:2016, but omits the mastering display and target display actual peak luminance LUTs, the rectangular boundaries and ellipse coefficients, and support for multiple processing windows, as these are intentionally left unused in this version of the specification.

◆ VLC_ANCILLARY_ID_ICC

#define VLC_ANCILLARY_ID_ICC   VLC_FOURCC('i','C','C','P')

Embedded ICC profiles.

Typedef Documentation

◆ vlc_ancillary_free_cb

typedef void(* vlc_ancillary_free_cb) (void *data)

Callback to free an ancillary data.

◆ vlc_ancillary_id

typedef uint32_t vlc_ancillary_id

ID of an ancillary.

Each ancillary user can create its own unique ID via VLC_ANCILLARY_ID.

◆ vlc_icc_profile_t

◆ vlc_video_dovi_metadata_t

◆ vlc_video_hdr_dynamic_metadata_t

Enumeration Type Documentation

◆ vlc_dovi_nlq_method_t

Enumerator
VLC_DOVI_NLQ_NONE 
VLC_DOVI_NLQ_LINEAR_DZ 

◆ vlc_dovi_reshape_method_t

Dolby Vision metadata description.

Enumerator
VLC_DOVI_RESHAPE_POLYNOMIAL 
VLC_DOVI_RESHAPE_MMR 

Function Documentation

◆ vlc_ancillary_Create()

static struct vlc_ancillary * vlc_ancillary_Create ( void *  data,
vlc_ancillary_id  id 
)
inlinestatic

Helper to create an ancillary holding an allocated data.

References vlc_ancillary::data, and vlc_ancillary_CreateWithFreeCb().

Referenced by picture_AttachNewAncillary().

◆ vlc_ancillary_CreateWithFreeCb()

struct vlc_ancillary * vlc_ancillary_CreateWithFreeCb ( void *  data,
vlc_ancillary_id  id,
vlc_ancillary_free_cb  free_cb 
)

Create an ancillary.

Parameters
dataan opaque ancillary, can't be NULL
idid of ancillary
free_cbcallback to release the data, can be NULL
Returns
a valid vlc_ancillary pointer or NULL in case of allocation error

References vlc_ancillary::data, vlc_ancillary::free_cb, vlc_ancillary::id, vlc_ancillary::rc, and vlc_atomic_rc_init().

Referenced by vlc_ancillary_Create().

◆ vlc_ancillary_GetData()

void * vlc_ancillary_GetData ( const struct vlc_ancillary ancillary)

References vlc_ancillary::data.

◆ vlc_ancillary_Hold()

struct vlc_ancillary * vlc_ancillary_Hold ( struct vlc_ancillary ancillary)

Hold an ancillary.

Parameters
ancillaryancillary to hold
Returns
the same ancillary

References vlc_ancillary::rc, and vlc_atomic_rc_inc().

Referenced by vlc_ancillary_array_Dup(), and vlc_ancillary_array_Insert().

◆ vlc_ancillary_Release()

void vlc_ancillary_Release ( struct vlc_ancillary ancillary)

Release an ancillary.

If the refcount reachs 0, the free_cb provided by vlc_ancillary_CreateWithFreeCb() is called.

Parameters
ancillaryancillary to release

References vlc_ancillary::data, vlc_ancillary::free_cb, vlc_ancillary::rc, and vlc_atomic_rc_dec().

Referenced by picture_AttachNewAncillary(), vlc_ancillary_array_Clear(), and vlc_ancillary_array_Insert().

Variable Documentation

◆ application_version

uint8_t vlc_video_hdr_dynamic_metadata_t::application_version

◆ average_maxrgb

float vlc_video_hdr_dynamic_metadata_t::average_maxrgb

◆ bezier_curve_anchors

float vlc_video_hdr_dynamic_metadata_t::bezier_curve_anchors[15]

◆ bl_bit_depth

uint8_t vlc_video_dovi_metadata_t::bl_bit_depth

◆ coef_log2_denom

uint8_t vlc_video_dovi_metadata_t::coef_log2_denom

◆ country_code

uint8_t vlc_video_hdr_dynamic_metadata_t::country_code

◆ curves

struct vlc_video_dovi_metadata_t::vlc_dovi_reshape_t vlc_video_dovi_metadata_t::curves[3]

◆ data

uint8_t vlc_icc_profile_t::data[]

◆ dz_slope

uint64_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::dz_slope

◆ dz_threshold

uint64_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::dz_threshold

◆ el_bit_depth

uint8_t vlc_video_dovi_metadata_t::el_bit_depth

◆ fraction_bright_pixels

float vlc_video_hdr_dynamic_metadata_t::fraction_bright_pixels

◆ hdr_in_max

uint64_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::hdr_in_max

◆ 

struct { ... } vlc_video_hdr_dynamic_metadata_t::histogram[15]

◆ knee_point_x

float vlc_video_hdr_dynamic_metadata_t::knee_point_x

◆ knee_point_y

float vlc_video_hdr_dynamic_metadata_t::knee_point_y

◆ linear_matrix

float vlc_video_dovi_metadata_t::linear_matrix[9]

◆ mapping_idc

enum vlc_dovi_reshape_method_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mapping_idc[8]

◆ maxscl

float vlc_video_hdr_dynamic_metadata_t::maxscl[3]

◆ mmr_coef

int64_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mmr_coef[8][3][7]

◆ mmr_constant

int64_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mmr_constant[8]

◆ mmr_order

uint8_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::mmr_order[8]

◆ nlq

struct vlc_video_dovi_metadata_t::vlc_dovi_nlq_t vlc_video_dovi_metadata_t::nlq[3]

◆ nlq_method_idc

enum vlc_dovi_nlq_method_t vlc_video_dovi_metadata_t::nlq_method_idc

◆ nonlinear_matrix

float vlc_video_dovi_metadata_t::nonlinear_matrix[9]

◆ nonlinear_offset

float vlc_video_dovi_metadata_t::nonlinear_offset[3]

◆ num_bezier_anchors

uint8_t vlc_video_hdr_dynamic_metadata_t::num_bezier_anchors

◆ num_histogram

uint8_t vlc_video_hdr_dynamic_metadata_t::num_histogram

◆ num_pivots

uint8_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::num_pivots

◆ offset

uint16_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::offset

◆ offset_depth

uint8_t vlc_video_dovi_metadata_t::vlc_dovi_nlq_t::offset_depth

◆  [1/2]

uint8_t { ... } ::percentage

◆ percentage [2/2]

uint8_t vlc_video_hdr_dynamic_metadata_t::percentage

◆ percentile [1/2]

float vlc_video_hdr_dynamic_metadata_t::percentile

◆  [2/2]

float { ... } ::percentile

◆ pivots

uint16_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::pivots[9]

◆ poly_coef

int64_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::poly_coef[8][3]

◆ poly_order

uint8_t vlc_video_dovi_metadata_t::vlc_dovi_reshape_t::poly_order[8]

◆ size

size_t vlc_icc_profile_t::size

◆ source_max_pq

uint16_t vlc_video_dovi_metadata_t::source_max_pq

◆ source_min_pq

uint16_t vlc_video_dovi_metadata_t::source_min_pq

◆ targeted_luminance

float vlc_video_hdr_dynamic_metadata_t::targeted_luminance

◆ tone_mapping_flag

uint8_t vlc_video_hdr_dynamic_metadata_t::tone_mapping_flag