FFmpeg
Data Fields
AVFilmGrainParams Struct Reference

This structure describes how to handle film grain synthesis in video for specific codecs. More...

#include <film_grain_params.h>

Data Fields

enum AVFilmGrainParamsType type
 Specifies the codec for which this structure is valid. More...
 
uint64_t seed
 Seed to use for the synthesis process, if the codec allows for it. More...
 
union {
   AVFilmGrainAOMParams   aom
 
   AVFilmGrainH274Params   h274
 
codec
 Additional fields may be added both here and in any structure included. More...
 
int width
 Intended display resolution. More...
 
int height
 
int subsampling_x
 Intended subsampling ratio, or 0 for luma-only streams. More...
 
int subsampling_y
 
enum AVColorRange color_range
 Intended video signal characteristics. More...
 
enum AVColorPrimaries color_primaries
 
enum AVColorTransferCharacteristic color_trc
 
enum AVColorSpace color_space
 
int bit_depth_luma
 Intended bit depth, or 0 for unknown/unspecified. More...
 
int bit_depth_chroma
 

Detailed Description

This structure describes how to handle film grain synthesis in video for specific codecs.

Must be present on every frame where film grain is meant to be synthesised for correct presentation.

Note
The struct must be allocated with av_film_grain_params_alloc() and its size is not a part of the public ABI.

Definition at line 238 of file film_grain_params.h.

Field Documentation

◆ type

enum AVFilmGrainParamsType AVFilmGrainParams::type

◆ seed

uint64_t AVFilmGrainParams::seed

Seed to use for the synthesis process, if the codec allows for it.

Note
For H.264, this refers to pic_offset as defined in SMPTE RDD 5-2006.

Definition at line 250 of file film_grain_params.h.

Referenced by export_film_grain(), ff_aom_parse_film_grain_sets(), ff_h2645_sei_to_frame(), ff_h274_apply_film_grain(), libdav1d_receive_frame(), and print_film_grain_params().

◆ aom

AVFilmGrainAOMParams AVFilmGrainParams::aom

◆ h274

AVFilmGrainH274Params AVFilmGrainParams::h274

◆ codec

union { ... } AVFilmGrainParams::codec

Additional fields may be added both here and in any structure included.

If a codec's film grain structure differs slightly over another codec's, fields within may change meaning depending on the type.

TODO: Move this to the end of the structure, at the next ABI bump.

Referenced by export_film_grain(), ff_aom_apply_film_grain(), ff_aom_parse_film_grain_sets(), ff_h2645_sei_to_frame(), ff_h274_apply_film_grain(), libdav1d_receive_frame(), and print_film_grain_params().

◆ width

int AVFilmGrainParams::width

Intended display resolution.

May be 0 if the codec does not specify any restrictions.

Definition at line 269 of file film_grain_params.h.

Referenced by av_film_grain_params_select(), export_film_grain(), ff_aom_parse_film_grain_sets(), ff_h2645_sei_to_frame(), libdav1d_receive_frame(), and print_film_grain_params().

◆ height

int AVFilmGrainParams::height

◆ subsampling_x

int AVFilmGrainParams::subsampling_x

Intended subsampling ratio, or 0 for luma-only streams.

Definition at line 274 of file film_grain_params.h.

Referenced by av_film_grain_params_select(), export_film_grain(), ff_aom_parse_film_grain_sets(), ff_h2645_sei_to_frame(), libdav1d_receive_frame(), and print_film_grain_params().

◆ subsampling_y

int AVFilmGrainParams::subsampling_y

◆ color_range

enum AVColorRange AVFilmGrainParams::color_range

◆ color_primaries

enum AVColorPrimaries AVFilmGrainParams::color_primaries

◆ color_trc

enum AVColorTransferCharacteristic AVFilmGrainParams::color_trc

◆ color_space

enum AVColorSpace AVFilmGrainParams::color_space

◆ bit_depth_luma

int AVFilmGrainParams::bit_depth_luma

Intended bit depth, or 0 for unknown/unspecified.

Definition at line 287 of file film_grain_params.h.

Referenced by av_film_grain_params_select(), ff_aom_parse_film_grain_sets(), ff_h2645_sei_to_frame(), and print_film_grain_params().

◆ bit_depth_chroma

int AVFilmGrainParams::bit_depth_chroma

The documentation for this struct was generated from the following file: