FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
vf_pp7.c File Reference

Postprocessing filter - 7. More...

#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "internal.h"
#include "vf_pp7.h"

Go to the source code of this file.

Macros

#define OFFSET(x)   offsetof(PP7Context, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define N0   4
 
#define N1   5
 
#define N2   10
 
#define SN0   2
 
#define SN1   2.2360679775
 
#define SN2   3.16227766017
 
#define N   (1 << 16)
 

Enumerations

enum  mode {
  FF_EBUR128_MODE_M = (1 << 0), FF_EBUR128_MODE_S = (1 << 1) | FF_EBUR128_MODE_M, FF_EBUR128_MODE_I = (1 << 2) | FF_EBUR128_MODE_M, FF_EBUR128_MODE_LRA = (1 << 3) | FF_EBUR128_MODE_S,
  FF_EBUR128_MODE_SAMPLE_PEAK = (1 << 4) | FF_EBUR128_MODE_M, MODE_NONE, MODE_RO, MODE_RW,
  MODE_TOGGLE, MODE_RANDOM, NB_MODES, MODE_COVER,
  MODE_BLUR, NB_MODES, MODE_HARD, MODE_SOFT,
  MODE_MEDIUM, MODE_HARD, MODE_SOFT, NB_MODES
}
 

Functions

 AVFILTER_DEFINE_CLASS (pp7)
 
static void init_thres2 (PP7Context *p)
 
static void dctA_c (int16_t *dst, uint8_t *src, int stride)
 
static void dctB_c (int16_t *dst, int16_t *src)
 
static int hardthresh_c (PP7Context *p, int16_t *src, int qp)
 
static int mediumthresh_c (PP7Context *p, int16_t *src, int qp)
 
static int softthresh_c (PP7Context *p, int16_t *src, int qp)
 
static void filter (PP7Context *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, int is_luma)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption pp7_options []
 
static const uint8_t dither [8][8]
 
static const int factor [16]
 
static const AVFilterPad pp7_inputs []
 
static const AVFilterPad pp7_outputs []
 
AVFilter ff_vf_pp7
 

Detailed Description

Postprocessing filter - 7.

Originally written by Michael Niedermayer for the MPlayer project, and ported by Arwa Arif for FFmpeg.

Definition in file vf_pp7.c.

Macro Definition Documentation

#define OFFSET (   x)    offsetof(PP7Context, x)

Definition at line 43 of file vf_pp7.c.

Definition at line 44 of file vf_pp7.c.

#define N0   4
#define N1   5

Definition at line 68 of file vf_pp7.c.

#define N2   10

Definition at line 69 of file vf_pp7.c.

Referenced by celt_compute_qn().

#define SN0   2

Definition at line 70 of file vf_pp7.c.

Referenced by init_thres2().

#define SN1   2.2360679775

Definition at line 71 of file vf_pp7.c.

#define SN2   3.16227766017

Definition at line 72 of file vf_pp7.c.

Referenced by init_thres2().

#define N   (1 << 16)

Enumeration Type Documentation

enum mode
Enumerator
FF_EBUR128_MODE_M 

can call ff_ebur128_loudness_momentary

FF_EBUR128_MODE_S 

can call ff_ebur128_loudness_shortterm

FF_EBUR128_MODE_I 

can call ff_ebur128_loudness_global_* and ff_ebur128_relative_threshold

FF_EBUR128_MODE_LRA 

can call ff_ebur128_loudness_range

FF_EBUR128_MODE_SAMPLE_PEAK 

can call ff_ebur128_sample_peak

MODE_NONE 
MODE_RO 
MODE_RW 
MODE_TOGGLE 
MODE_RANDOM 
NB_MODES 
MODE_COVER 
MODE_BLUR 
NB_MODES 
MODE_HARD 
MODE_SOFT 
MODE_MEDIUM 
MODE_HARD 
MODE_SOFT 
NB_MODES 

Definition at line 37 of file vf_pp7.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( pp7  )
static void init_thres2 ( PP7Context p)
static

Definition at line 82 of file vf_pp7.c.

Referenced by config_input().

static void dctA_c ( int16_t *  dst,
uint8_t src,
int  stride 
)
inlinestatic

Definition at line 94 of file vf_pp7.c.

Referenced by filter().

static void dctB_c ( int16_t *  dst,
int16_t *  src 
)
static

Definition at line 117 of file vf_pp7.c.

Referenced by config_input().

static int hardthresh_c ( PP7Context p,
int16_t *  src,
int  qp 
)
static

Definition at line 140 of file vf_pp7.c.

Referenced by config_input().

static int mediumthresh_c ( PP7Context p,
int16_t *  src,
int  qp 
)
static

Definition at line 156 of file vf_pp7.c.

Referenced by config_input().

static int softthresh_c ( PP7Context p,
int16_t *  src,
int  qp 
)
static

Definition at line 180 of file vf_pp7.c.

Referenced by config_input().

static void filter ( PP7Context p,
uint8_t dst,
uint8_t src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
uint8_t qp_store,
int  qp_stride,
int  is_luma 
)
static

Definition at line 200 of file vf_pp7.c.

Referenced by filter_frame().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 266 of file vf_pp7.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 284 of file vf_pp7.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 317 of file vf_pp7.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 372 of file vf_pp7.c.

Variable Documentation

const AVOption pp7_options[]
static
Initial value:
= {
{ "qp", "force a constant quantizer parameter", OFFSET(qp), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 64, FLAGS },
{ "mode", "set thresholding mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = MODE_MEDIUM}, 0, 2, FLAGS, "mode" },
{ "hard", "hard thresholding", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_HARD}, INT_MIN, INT_MAX, FLAGS, "mode" },
{ "soft", "soft thresholding", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_SOFT}, INT_MIN, INT_MAX, FLAGS, "mode" },
{ "medium", "medium thresholding", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_MEDIUM}, INT_MIN, INT_MAX, FLAGS, "mode" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_pp7.c:43
#define FLAGS
Definition: vf_pp7.c:44
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 45 of file vf_pp7.c.

const uint8_t dither[8][8]
static
Initial value:
= {
{ 0, 48, 12, 60, 3, 51, 15, 63, },
{ 32, 16, 44, 28, 35, 19, 47, 31, },
{ 8, 56, 4, 52, 11, 59, 7, 55, },
{ 40, 24, 36, 20, 43, 27, 39, 23, },
{ 2, 50, 14, 62, 1, 49, 13, 61, },
{ 34, 18, 46, 30, 33, 17, 45, 29, },
{ 10, 58, 6, 54, 9, 57, 5, 53, },
{ 42, 26, 38, 22, 41, 25, 37, 21, },
}

Definition at line 56 of file vf_pp7.c.

Referenced by filter().

const int factor[16]
static
Initial value:
= {
N / (N0 * N0), N / (N0 * N1), N / (N0 * N0), N / (N0 * N2),
N / (N1 * N0), N / (N1 * N1), N / (N1 * N0), N / (N1 * N2),
N / (N0 * N0), N / (N0 * N1), N / (N0 * N0), N / (N0 * N2),
N / (N2 * N0), N / (N2 * N1), N / (N2 * N0), N / (N2 * N2),
}
#define N
Definition: vf_pp7.c:73
#define N2
Definition: vf_pp7.c:69
#define N0
Definition: vf_pp7.c:67
#define N1
Definition: vf_pp7.c:68

Definition at line 75 of file vf_pp7.c.

Referenced by adaptive_quantization(), av_resample_init(), avpriv_solve_lls(), bessel(), build_filter(), config_output(), create_default_qtables(), ff_audio_resample_init(), ff_jpegls_reset_coding_parameters(), ffserver_set_float_param(), ffserver_set_int_param(), filter_frame(), hardthresh_c(), lfe_fir_float_c(), lfe_iir_c(), mediumthresh_c(), resample_init(), softthresh_c(), and try_push_frame().

const AVFilterPad pp7_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_pp7.c:317
static int config_input(AVFilterLink *inlink)
Definition: vf_pp7.c:284

Definition at line 378 of file vf_pp7.c.

const AVFilterPad pp7_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 388 of file vf_pp7.c.

AVFilter ff_vf_pp7
Initial value:
= {
.name = "pp7",
.description = NULL_IF_CONFIG_SMALL("Apply Postprocessing 7 filter."),
.priv_size = sizeof(PP7Context),
.priv_class = &pp7_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: vf_pp7.c:266
static int flags
Definition: log.c:57
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_pp7.c:372
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad pp7_outputs[]
Definition: vf_pp7.c:388
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:133
static const AVFilterPad pp7_inputs[]
Definition: vf_pp7.c:378

Definition at line 396 of file vf_pp7.c.