FFmpeg
Macros | Enumerations | Functions | Variables
aom_film_grain.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "aom_film_grain.h"
#include "get_bits.h"
#include "aom_film_grain_template.c"

Go to the source code of this file.

Macros

#define BIT_DEPTH   16
 
#define BIT_DEPTH   8
 

Enumerations

enum  {
  GRAIN_WIDTH = 82, GRAIN_HEIGHT = 73, SUB_GRAIN_WIDTH = 44, SUB_GRAIN_HEIGHT = 38,
  FG_BLOCK_SIZE = 32
}
 

Functions

static int get_random_number (const int bits, unsigned *const state)
 
static int round2 (const int x, const uint64_t shift)
 
int ff_aom_apply_film_grain (AVFrame *out, const AVFrame *in, const AVFilmGrainParams *params)
 
int ff_aom_parse_film_grain_sets (AVFilmGrainAFGS1Params *s, const uint8_t *payload, int payload_size)
 
int ff_aom_attach_film_grain_sets (const AVFilmGrainAFGS1Params *s, AVFrame *frame)
 
void ff_aom_uninit_film_grain_params (AVFilmGrainAFGS1Params *s)
 

Variables

static const int16_t gaussian_sequence [2048]
 

Detailed Description

AOM film grain synthesis.

Author
Niklas Haas ffmpe.nosp@m.g@ha.nosp@m.asn.x.nosp@m.yz

Definition in file aom_film_grain.c.

Macro Definition Documentation

◆ BIT_DEPTH [1/2]

#define BIT_DEPTH   16

Definition at line 63 of file aom_film_grain.c.

◆ BIT_DEPTH [2/2]

#define BIT_DEPTH   8

Definition at line 63 of file aom_film_grain.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GRAIN_WIDTH 
GRAIN_HEIGHT 
SUB_GRAIN_WIDTH 
SUB_GRAIN_HEIGHT 
FG_BLOCK_SIZE 

Definition at line 49 of file aom_film_grain.c.

Function Documentation

◆ get_random_number()

static int get_random_number ( const int  bits,
unsigned *const  state 
)
inlinestatic

◆ round2()

static int round2 ( const int  x,
const uint64_t  shift 
)
inlinestatic

◆ ff_aom_apply_film_grain()

int ff_aom_apply_film_grain ( AVFrame out,
const AVFrame in,
const AVFilmGrainParams params 
)

Definition at line 68 of file aom_film_grain.c.

Referenced by hevc_frame_end().

◆ ff_aom_parse_film_grain_sets()

int ff_aom_parse_film_grain_sets ( AVFilmGrainAFGS1Params s,
const uint8_t *  payload,
int  payload_size 
)

Definition at line 124 of file aom_film_grain.c.

Referenced by decode_registered_user_data().

◆ ff_aom_attach_film_grain_sets()

int ff_aom_attach_film_grain_sets ( const AVFilmGrainAFGS1Params s,
AVFrame frame 
)

Definition at line 359 of file aom_film_grain.c.

Referenced by ff_h2645_sei_to_frame().

◆ ff_aom_uninit_film_grain_params()

void ff_aom_uninit_film_grain_params ( AVFilmGrainAFGS1Params s)

Definition at line 381 of file aom_film_grain.c.

Referenced by ff_aom_parse_film_grain_sets(), and ff_h2645_sei_reset().

Variable Documentation

◆ gaussian_sequence

static const int16_t gaussian_sequence
static

Definition at line 57 of file aom_film_grain.c.

Referenced by generate_grain_uv_c(), and generate_grain_y_c().