FFmpeg
|
#include <float.h>
#include "libavutil/common.h"
#include "libavutil/file_open.h"
#include "libavutil/float_dsp.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "filters.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
struct | PrescreenerCoefficients |
struct | PredictorCoefficients |
struct | NNEDIContext |
Macros | |
#define | OFFSET(x) offsetof(NNEDIContext, x) |
#define | RFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Functions | |
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) |
Variables | |
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 |
#define OFFSET | ( | x | ) | offsetof(NNEDIContext, x) |
Definition at line 117 of file vf_nnedi.c.
Definition at line 118 of file vf_nnedi.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 119 of file vf_nnedi.c.
AVFILTER_DEFINE_CLASS | ( | nnedi | ) |
|
static |
Definition at line 167 of file vf_nnedi.c.
|
static |
Definition at line 211 of file vf_nnedi.c.
Referenced by predictor(), process_new(), and process_old().
Definition at line 223 of file vf_nnedi.c.
Referenced by transform_elliott(), and wae5().
|
static |
Definition at line 228 of file vf_nnedi.c.
Referenced by process_new(), and process_old().
|
static |
Definition at line 234 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 270 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 300 of file vf_nnedi.c.
Referenced by elliott_q1_filter(), elliott_q2_filter(), softmax_q1_filter(), and softmax_q2_filter().
|
static |
Definition at line 305 of file vf_nnedi.c.
Referenced by predictor().
|
static |
Definition at line 311 of file vf_nnedi.c.
Referenced by predictor().
|
static |
Definition at line 317 of file vf_nnedi.c.
Referenced by predictor().
|
static |
Definition at line 323 of file vf_nnedi.c.
Referenced by predictor().
|
static |
Definition at line 329 of file vf_nnedi.c.
Referenced by predictor().
Definition at line 365 of file vf_nnedi.c.
Referenced by transform_softmax_exp().
|
static |
Definition at line 370 of file vf_nnedi.c.
Referenced by predictor().
Definition at line 376 of file vf_nnedi.c.
Referenced by predictor().
|
static |
Definition at line 392 of file vf_nnedi.c.
Referenced by filter_slice().
|
static |
Definition at line 442 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 461 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 484 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 498 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 516 of file vf_nnedi.c.
Referenced by filter_slice().
|
static |
Definition at line 538 of file vf_nnedi.c.
Referenced by get_frame().
|
static |
Definition at line 661 of file vf_nnedi.c.
Referenced by filter_frame(), and vtenc_frame().
|
static |
Definition at line 688 of file vf_nnedi.c.
Referenced by request_frame().
|
static |
Definition at line 721 of file vf_nnedi.c.
Definition at line 751 of file vf_nnedi.c.
Referenced by read_weights().
Definition at line 757 of file vf_nnedi.c.
Referenced by allocate_model().
|
static |
Definition at line 766 of file vf_nnedi.c.
Referenced by read_weights().
|
static |
Definition at line 795 of file vf_nnedi.c.
Referenced by init().
Definition at line 866 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(), floor_offset(), get_intra_count(), get_zeropadded_input(), init_offset(), main(), meanf(), measure_stddev(), mov_read_custom(), reduce_mean(), spectral_crest(), spectral_variance(), std_deviation(), subtract_mean_new(), subtract_mean_old(), subtract_mean_predictor(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), and transform().
Definition at line 876 of file vf_nnedi.c.
Referenced by subtract_mean_new(), and subtract_mean_old().
|
static |
Definition at line 882 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 891 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 900 of file vf_nnedi.c.
Referenced by config_input().
|
static |
Definition at line 960 of file vf_nnedi.c.
|
static |
Definition at line 1030 of file vf_nnedi.c.
|
static |
Definition at line 1112 of file vf_nnedi.c.
|
static |
Definition at line 36 of file vf_nnedi.c.
Referenced by init().
|
static |
Definition at line 37 of file vf_nnedi.c.
Referenced by read_weights().
|
static |
Definition at line 38 of file vf_nnedi.c.
Referenced by read_weights().
|
static |
Definition at line 39 of file vf_nnedi.c.
Referenced by read_weights().
|
static |
Definition at line 121 of file vf_nnedi.c.
|
static |
Definition at line 185 of file vf_nnedi.c.
|
static |
Definition at line 1143 of file vf_nnedi.c.
|
static |
Definition at line 1152 of file vf_nnedi.c.
const AVFilter ff_vf_nnedi |
Definition at line 1161 of file vf_nnedi.c.