24#ifndef AVCODEC_DOVI_RPU_H
25#define AVCODEC_DOVI_RPU_H
33#define DOVI_MAX_DM_ID 15
49#define FF_DOVI_AUTOMATIC -1
118 int err_recognition);
150 int strict_std_compliance);
Libavcodec external API header.
static int FUNC metadata(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadata *current)
#define flags(name, subs,...)
const AVDOVIColorMetadata ff_dovi_color_default
int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, int err_recognition)
Parse the contents of a Dolby Vision RPU and update the parsed values in the DOVIContext struct.
int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata, int flags, uint8_t **out_rpu, int *out_size)
Synthesize a Dolby Vision RPU reflecting the current state.
void ff_dovi_ctx_replace(DOVIContext *s, const DOVIContext *s0)
@ FF_DOVI_WRAP_NAL
wrap inside NAL RBSP
@ FF_DOVI_WRAP_T35
wrap inside T.35+EMDF
@ FF_DOVI_COMPRESS_RPU
enable compression for this RPU
int ff_dovi_configure_from_codedpar(DOVIContext *s, AVCodecParameters *codecpar, const AVDOVIMetadata *metadata, enum AVDOVICompression compression, int strict_std_compliance)
Configure the encoder for Dolby Vision encoding.
int ff_dovi_guess_profile_hevc(const AVDOVIRpuDataHeader *hdr)
Internal helper function to guess the correct DV profile for HEVC.
static int ff_dovi_rpu_extension_is_static(int level)
void ff_dovi_ctx_flush(DOVIContext *s)
Partially reset the internal state.
int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx)
Variant of ff_dovi_configure_from_codedpar which infers the codec parameters from an AVCodecContext.
int ff_dovi_get_metadata(DOVIContext *s, AVDOVIMetadata **out_metadata)
Get the decoded AVDOVIMetadata.
int ff_dovi_attach_side_data(DOVIContext *s, AVFrame *frame)
Attach the decoded AVDOVIMetadata as side data to an AVFrame.
void ff_dovi_ctx_unref(DOVIContext *s)
Completely reset a DOVIContext, preserving only logctx.
reference-counted frame API
main external API structure.
This struct describes the properties of an encoded stream.
Dolby Vision RPU data mapping parameters.
Dolby Vision metadata extension block.
This structure describes decoded (raw) audio or video data.
AVDOVIDecoderConfigurationRecord cfg
Currently active dolby vision configuration, or {0} for none.
AVDOVIColorMetadata * dm
Private fields internal to dovi_rpu.c.
uint8_t * rpu_buf
temporary buffer
const AVDOVIDataMapping * mapping
Currently active data mappings, or NULL.
const AVDOVIColorMetadata * color
AVDOVIRpuDataHeader header
Currently active RPU data header, updates on every ff_dovi_rpu_parse() or ff_dovi_rpu_generate().
AVDOVIDataMapping * vdr[DOVI_MAX_DM_ID+1]
RefStruct references.
DOVIExt * ext_blocks
Currently active extension blocks, updates on every ff_dovi_rpu_parse() or ff_dovi_rpu_generate().
AVDOVIDmData dm_static[7]
static extension blocks
AVDOVIDmData dm_dynamic[25]
dynamic extension blocks