FFmpeg
Macros | Enumerations | Functions | Variables
aom_film_grain.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/imgutils.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)
 

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 61 of file aom_film_grain.c.

◆ BIT_DEPTH [2/2]

#define BIT_DEPTH   8

Definition at line 61 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 47 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 66 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 122 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 341 of file aom_film_grain.c.

Referenced by ff_h2645_sei_to_frame().

Variable Documentation

◆ gaussian_sequence

static const int16_t gaussian_sequence
static

Definition at line 55 of file aom_film_grain.c.

Referenced by generate_grain_uv_c(), and generate_grain_y_c().