FFmpeg
Macros | Functions
film_grain_params.c File Reference
#include "film_grain_params.h"
#include "mem.h"
#include "pixdesc.h"

Go to the source code of this file.

Macros

#define CHECK(a, b, unspec)
 

Functions

AVFilmGrainParamsav_film_grain_params_alloc (size_t *size)
 This file is part of FFmpeg. More...
 
AVFilmGrainParamsav_film_grain_params_create_side_data (AVFrame *frame)
 Allocate a complete AVFilmGrainParams and add it to the frame. More...
 
const AVFilmGrainParamsav_film_grain_params_select (const AVFrame *frame)
 Select the most appropriate film grain parameters set for the frame, taking into account the frame's format, resolution and video signal characteristics. More...
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   a,
  b,
  unspec 
)
Value:
if ((a) != (unspec) && (b) != (unspec) && (a) != (b)) \
continue

Function Documentation

◆ av_film_grain_params_alloc()

AVFilmGrainParams* av_film_grain_params_alloc ( size_t *  size)

This file is part of FFmpeg.

Allocate an AVFilmGrainParams structure and set its fields to default values.

FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Definition at line 23 of file film_grain_params.c.

◆ av_film_grain_params_create_side_data()

AVFilmGrainParams* av_film_grain_params_create_side_data ( AVFrame frame)

Allocate a complete AVFilmGrainParams and add it to the frame.

Parameters
frameThe frame which side data is added to.
Returns
The AVFilmGrainParams structure to be filled by caller.

Definition at line 33 of file film_grain_params.c.

Referenced by export_film_grain(), ff_aom_attach_film_grain_sets(), ff_h2645_sei_to_frame(), and libdav1d_receive_frame().

◆ av_film_grain_params_select()

const AVFilmGrainParams* av_film_grain_params_select ( const AVFrame frame)

Select the most appropriate film grain parameters set for the frame, taking into account the frame's format, resolution and video signal characteristics.

Note
, for H.274, this may select a film grain parameter set with greater chroma resolution than the frame. Users should take care to correctly adjust the chroma grain frequency to the frame.

Definition at line 53 of file film_grain_params.c.

Referenced by hevc_frame_end(), and hevc_frame_start().

b
#define b
Definition: input.c:41
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41