Go to the source code of this file.
|
static av_always_inline uint32_t | lowpass (int prev, int cur, int16_t *coef, int depth) |
|
static av_always_inline void | denoise_temporal (uint8_t *src, uint8_t *dst, uint16_t *frame_ant, int w, int h, int sstride, int dstride, int16_t *temporal, int depth) |
|
static av_always_inline void | denoise_spatial (HQDN3DContext *s, uint8_t *src, uint8_t *dst, uint16_t *line_ant, uint16_t *frame_ant, int w, int h, int sstride, int dstride, int16_t *spatial, int16_t *temporal, int depth) |
|
static av_always_inline int | denoise_depth (HQDN3DContext *s, uint8_t *src, uint8_t *dst, uint16_t *line_ant, uint16_t **frame_ant_ptr, int w, int h, int sstride, int dstride, int16_t *spatial, int16_t *temporal, int depth) |
|
static void | precalc_coefs (double dist25, int depth, int16_t *ct) |
|
static av_cold int | init (AVFilterContext *ctx) |
|
static av_cold void | uninit (AVFilterContext *ctx) |
|
static void | calc_coefs (AVFilterContext *ctx) |
|
static int | config_input (AVFilterLink *inlink) |
|
static int | do_denoise (AVFilterContext *ctx, void *data, int job_nr, int n_jobs) |
|
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
|
static int | process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags) |
|
| AVFILTER_DEFINE_CLASS (hqdn3d) |
|
high quality 3d video denoiser, ported from MPlayer libmpcodecs/vf_hqdn3d.c.
Definition in file vf_hqdn3d.c.
◆ LUT_BITS
#define LUT_BITS (depth==16 ? 8 : 4) |
◆ LOAD
Value:
+ (((1 << (16 - depth)) - 1) >> 1))
Definition at line 46 of file vf_hqdn3d.c.
◆ STORE
Value: (depth == 8 ?
dst[x] = (
val) >> (16 - depth) : \
AV_WN16A(
dst + (x) * 2, (
val) >> (16 - depth)))
Definition at line 48 of file vf_hqdn3d.c.
◆ denoise
Value: do { \
} \
if (!direct) \
av_frame_free(&in); \
} \
} while (0)
Definition at line 157 of file vf_hqdn3d.c.
◆ PARAM1_DEFAULT
#define PARAM1_DEFAULT 4.0 |
◆ PARAM2_DEFAULT
#define PARAM2_DEFAULT 3.0 |
◆ PARAM3_DEFAULT
#define PARAM3_DEFAULT 6.0 |
◆ OFFSET
◆ FLAGS
◆ lowpass()
static av_always_inline uint32_t lowpass |
( |
int |
prev, |
|
|
int |
cur, |
|
|
int16_t * |
coef, |
|
|
int |
depth |
|
) |
| |
|
static |
◆ denoise_temporal()
static av_always_inline void denoise_temporal |
( |
uint8_t * |
src, |
|
|
uint8_t * |
dst, |
|
|
uint16_t * |
frame_ant, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
sstride, |
|
|
int |
dstride, |
|
|
int16_t * |
temporal, |
|
|
int |
depth |
|
) |
| |
|
static |
◆ denoise_spatial()
static av_always_inline void denoise_spatial |
( |
HQDN3DContext * |
s, |
|
|
uint8_t * |
src, |
|
|
uint8_t * |
dst, |
|
|
uint16_t * |
line_ant, |
|
|
uint16_t * |
frame_ant, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
sstride, |
|
|
int |
dstride, |
|
|
int16_t * |
spatial, |
|
|
int16_t * |
temporal, |
|
|
int |
depth |
|
) |
| |
|
static |
◆ denoise_depth()
static av_always_inline int denoise_depth |
( |
HQDN3DContext * |
s, |
|
|
uint8_t * |
src, |
|
|
uint8_t * |
dst, |
|
|
uint16_t * |
line_ant, |
|
|
uint16_t ** |
frame_ant_ptr, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
sstride, |
|
|
int |
dstride, |
|
|
int16_t * |
spatial, |
|
|
int16_t * |
temporal, |
|
|
int |
depth |
|
) |
| |
|
static |
◆ precalc_coefs()
static void precalc_coefs |
( |
double |
dist25, |
|
|
int |
depth, |
|
|
int16_t * |
ct |
|
) |
| |
|
static |
◆ init()
◆ uninit()
◆ calc_coefs()
◆ config_input()
◆ do_denoise()
static int do_denoise |
( |
AVFilterContext * |
ctx, |
|
|
void * |
data, |
|
|
int |
job_nr, |
|
|
int |
n_jobs |
|
) |
| |
|
static |
◆ filter_frame()
◆ process_command()
static int process_command |
( |
AVFilterContext * |
ctx, |
|
|
const char * |
cmd, |
|
|
const char * |
args, |
|
|
char * |
res, |
|
|
int |
res_len, |
|
|
int |
flags |
|
) |
| |
|
static |
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
hqdn3d |
| ) |
|
◆ pix_fmts
◆ hqdn3d_options
◆ avfilter_vf_hqdn3d_inputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 377 of file vf_hqdn3d.c.
◆ ff_vf_hqdn3d
Initial value:= {
.name = "hqdn3d",
.priv_class = &hqdn3d_class,
}
Definition at line 387 of file vf_hqdn3d.c.
static av_cold int init(AVFilterContext *ctx)
#define FILTER_PIXFMTS_ARRAY(array)
#define FILTER_INPUTS(array)
#define AV_PIX_FMT_YUV420P10
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
static int config_input(AVFilterLink *inlink)
#define AV_PIX_FMT_YUV422P9
static double val(void *priv, double ch)
#define AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV422P16
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
@ 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_YUV444P16
static av_cold void uninit(AVFilterContext *ctx)
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
#define AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P16
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FILTER_OUTPUTS(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...
static const AVFilterPad avfilter_vf_hqdn3d_inputs[]
@ 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
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV444P12
static enum AVPixelFormat pix_fmts[]
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV422P14
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
#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)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static av_always_inline int denoise_depth(HQDN3DContext *s, uint8_t *src, uint8_t *dst, uint16_t *line_ant, uint16_t **frame_ant_ptr, int w, int h, int sstride, int dstride, int16_t *spatial, int16_t *temporal, int depth)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
@ 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
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
#define AV_PIX_FMT_YUV420P14