Go to the source code of this file.
|
| AVFILTER_DEFINE_CLASS (nnedi) |
|
static int | config_output (AVFilterLink *outlink) |
|
static float | dot_dsp (const NNEDIContext *const s, const float *kernel, const float *input, int n, float scale, float bias) |
|
static float | elliott (float x) |
|
static void | transform_elliott (float *input, int size) |
|
static void | process_old (AVFilterContext *ctx, const void *src, ptrdiff_t src_stride, uint8_t *prescreen, int N, const PrescreenerCoefficients *const m_data) |
|
static void | process_new (AVFilterContext *ctx, const void *src, ptrdiff_t src_stride, uint8_t *prescreen, int N, const PrescreenerCoefficients *const m_data) |
|
static int | filter_offset (int nn, const PredictorCoefficients *const model) |
|
static const float * | softmax_q1_filter (int nn, const PredictorCoefficients *const model) |
|
static const float * | elliott_q1_filter (int nn, const PredictorCoefficients *const model) |
|
static const float * | softmax_q2_filter (int nn, const PredictorCoefficients *const model) |
|
static const float * | elliott_q2_filter (int nn, const PredictorCoefficients *const model) |
|
static void | gather_input (const float *src, ptrdiff_t src_stride, float *buf, float mstd[4], const PredictorCoefficients *const model) |
|
static float | softmax_exp (float x) |
|
static void | transform_softmax_exp (float *input, int size) |
|
static void | wae5 (const float *softmax, const float *el, int n, float mstd[4]) |
|
static void | predictor (AVFilterContext *ctx, const void *src, ptrdiff_t src_stride, void *dst, const uint8_t *prescreen, int N, const PredictorCoefficients *const model, int use_q2) |
|
static void | read_bytes (const uint8_t *src, float *dst, int src_stride, int dst_stride, int width, int height, float scale) |
|
static void | read_words (const uint8_t *srcp, float *dst, int src_stride, int dst_stride, int width, int height, float scale) |
|
static void | write_bytes (const float *src, uint8_t *dst, int src_stride, int dst_stride, int width, int height, int depth, float scale) |
|
static void | write_words (const float *src, uint8_t *dstp, int src_stride, int dst_stride, int width, int height, int depth, float scale) |
|
static void | interpolation (const void *src, ptrdiff_t src_stride, void *dst, const uint8_t *prescreen, int n) |
|
static int | filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
|
static int | get_frame (AVFilterContext *ctx, int is_second) |
|
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
|
static int | request_frame (AVFilterLink *link) |
|
static void | copy_weights (float *dst, int n, const float **data) |
|
static float * | allocate (float **ptr, int size) |
|
static int | allocate_model (PredictorCoefficients *coeffs, int xdim, int ydim, int nns) |
|
static int | read_weights (AVFilterContext *ctx, const float *bdata) |
|
static float | mean (const float *input, int size) |
|
static void | transform (float *input, int size, float mean, float half) |
|
static void | subtract_mean_old (PrescreenerCoefficients *coeffs, float half) |
|
static void | subtract_mean_new (PrescreenerCoefficients *coeffs, float half) |
|
static void | subtract_mean_predictor (PredictorCoefficients *model) |
|
static av_cold int | init (AVFilterContext *ctx) |
|
static int | config_input (AVFilterLink *inlink) |
|
static av_cold void | uninit (AVFilterContext *ctx) |
|
|
static const size_t | NNEDI_WEIGHTS_SIZE = 13574928 |
|
static const uint8_t | NNEDI_XDIM [] = { 8, 16, 32, 48, 8, 16, 32 } |
|
static const uint8_t | NNEDI_YDIM [] = { 6, 6, 6, 6, 4, 4, 4 } |
|
static const uint16_t | NNEDI_NNS [] = { 16, 32, 64, 128, 256 } |
|
static const AVOption | nnedi_options [] |
|
static enum AVPixelFormat | pix_fmts [] |
|
static const AVFilterPad | inputs [] |
|
static const AVFilterPad | outputs [] |
|
const AVFilter | ff_vf_nnedi |
|
◆ OFFSET
◆ RFLAGS
◆ FLAGS
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
nnedi |
| ) |
|
◆ config_output()
◆ dot_dsp()
static float dot_dsp |
( |
const NNEDIContext *const |
s, |
|
|
const float * |
kernel, |
|
|
const float * |
input, |
|
|
int |
n, |
|
|
float |
scale, |
|
|
float |
bias |
|
) |
| |
|
static |
◆ elliott()
static float elliott |
( |
float |
x | ) |
|
|
static |
◆ transform_elliott()
static void transform_elliott |
( |
float * |
input, |
|
|
int |
size |
|
) |
| |
|
static |
◆ process_old()
◆ process_new()
◆ filter_offset()
◆ softmax_q1_filter()
◆ elliott_q1_filter()
◆ softmax_q2_filter()
◆ elliott_q2_filter()
◆ gather_input()
static void gather_input |
( |
const float * |
src, |
|
|
ptrdiff_t |
src_stride, |
|
|
float * |
buf, |
|
|
float |
mstd[4], |
|
|
const PredictorCoefficients *const |
model |
|
) |
| |
|
static |
◆ softmax_exp()
static float softmax_exp |
( |
float |
x | ) |
|
|
static |
◆ transform_softmax_exp()
static void transform_softmax_exp |
( |
float * |
input, |
|
|
int |
size |
|
) |
| |
|
static |
◆ wae5()
static void wae5 |
( |
const float * |
softmax, |
|
|
const float * |
el, |
|
|
int |
n, |
|
|
float |
mstd[4] |
|
) |
| |
|
static |
◆ predictor()
◆ read_bytes()
static void read_bytes |
( |
const uint8_t * |
src, |
|
|
float * |
dst, |
|
|
int |
src_stride, |
|
|
int |
dst_stride, |
|
|
int |
width, |
|
|
int |
height, |
|
|
float |
scale |
|
) |
| |
|
static |
◆ read_words()
static void read_words |
( |
const uint8_t * |
srcp, |
|
|
float * |
dst, |
|
|
int |
src_stride, |
|
|
int |
dst_stride, |
|
|
int |
width, |
|
|
int |
height, |
|
|
float |
scale |
|
) |
| |
|
static |
◆ write_bytes()
static void write_bytes |
( |
const float * |
src, |
|
|
uint8_t * |
dst, |
|
|
int |
src_stride, |
|
|
int |
dst_stride, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
depth, |
|
|
float |
scale |
|
) |
| |
|
static |
◆ write_words()
static void write_words |
( |
const float * |
src, |
|
|
uint8_t * |
dstp, |
|
|
int |
src_stride, |
|
|
int |
dst_stride, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
depth, |
|
|
float |
scale |
|
) |
| |
|
static |
◆ interpolation()
static void interpolation |
( |
const void * |
src, |
|
|
ptrdiff_t |
src_stride, |
|
|
void * |
dst, |
|
|
const uint8_t * |
prescreen, |
|
|
int |
n |
|
) |
| |
|
static |
◆ filter_slice()
◆ get_frame()
◆ filter_frame()
◆ request_frame()
◆ copy_weights()
static void copy_weights |
( |
float * |
dst, |
|
|
int |
n, |
|
|
const float ** |
data |
|
) |
| |
|
static |
◆ allocate()
static float* allocate |
( |
float ** |
ptr, |
|
|
int |
size |
|
) |
| |
|
static |
◆ allocate_model()
◆ read_weights()
◆ mean()
static float mean |
( |
const float * |
input, |
|
|
int |
size |
|
) |
| |
|
static |
Definition at line 855 of file vf_nnedi.c.
Referenced by aptx_quantize_difference(), auto_correlation(), bayes_threshold(), clean_mean(), dnxhd_mb_var_thread(), encode_block(), ff_estimate_p_frame_motion(), get_intra_count(), get_zeropadded_input(), init_offset(), main(), meanf(), measure_stddev(), mov_read_custom(), spectral_crest(), spectral_variance(), subtract_mean_new(), subtract_mean_old(), subtract_mean_predictor(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), and transform().
◆ transform()
static void transform |
( |
float * |
input, |
|
|
int |
size, |
|
|
float |
mean, |
|
|
float |
half |
|
) |
| |
|
static |
◆ subtract_mean_old()
◆ subtract_mean_new()
◆ subtract_mean_predictor()
◆ init()
◆ config_input()
◆ uninit()
◆ NNEDI_WEIGHTS_SIZE
const size_t NNEDI_WEIGHTS_SIZE = 13574928 |
|
static |
◆ NNEDI_XDIM
const uint8_t NNEDI_XDIM[] = { 8, 16, 32, 48, 8, 16, 32 } |
|
static |
◆ NNEDI_YDIM
const uint8_t NNEDI_YDIM[] = { 6, 6, 6, 6, 4, 4, 4 } |
|
static |
◆ NNEDI_NNS
const uint16_t NNEDI_NNS[] = { 16, 32, 64, 128, 256 } |
|
static |
◆ nnedi_options
◆ pix_fmts
◆ inputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 1132 of file vf_nnedi.c.
◆ outputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 1141 of file vf_nnedi.c.
◆ ff_vf_nnedi
Initial value:= {
.name = "nnedi",
.description =
NULL_IF_CONFIG_SMALL(
"Apply neural network edge directed interpolation intra-only deinterlacer."),
.priv_class = &nnedi_class,
}
Definition at line 1150 of file vf_nnedi.c.
#define AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_GBRAP16
#define FILTER_PIXFMTS_ARRAY(array)
#define AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUV420P10
static av_cold void uninit(AVFilterContext *ctx)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_GBRP14
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_YUV444P10
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
static const AVFilterPad inputs[]
#define AV_PIX_FMT_YUV422P16
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP12
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
#define AV_PIX_FMT_YUV444P16
static int request_frame(AVFilterLink *link)
#define AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_GRAY14
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FILTER_INPUTS(array)
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
#define AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GBRP16
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
#define AV_PIX_FMT_YUV440P10
#define AV_PIX_FMT_YUV422P10
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV444P12
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
#define AV_PIX_FMT_YUVA444P10
static const AVFilterPad outputs[]
static av_cold int init(AVFilterContext *ctx)
#define AV_PIX_FMT_GBRP12
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
static enum AVPixelFormat pix_fmts[]
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUVA422P12
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
#define FILTER_OUTPUTS(array)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
static int config_input(AVFilterLink *inlink)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
#define AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_GRAY12
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
#define AV_PIX_FMT_YUV420P14
static int config_output(AVFilterLink *outlink)