Go to the source code of this file.
|
| AVFILTER_DEFINE_CLASS (nlmeans) |
|
static void | compute_unsafe_ssd_integral_image (uint32_t *dst, ptrdiff_t dst_linesize_32, int startx, int starty, const uint8_t *src, ptrdiff_t linesize, int offx, int offy, int r, int sw, int sh, int w, int h) |
| Compute squared difference of an unsafe area (the zone nor s1 nor s2 could be readable). More...
|
|
static void | compute_ssd_integral_image (const NLMeansDSPContext *dsp, uint32_t *ii, ptrdiff_t ii_linesize_32, const uint8_t *src, ptrdiff_t linesize, int offx, int offy, int e, int w, int h) |
|
static int | config_input (AVFilterLink *inlink) |
|
static int | nlmeans_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
|
static void | weight_averages (uint8_t *dst, ptrdiff_t dst_linesize, const uint8_t *src, ptrdiff_t src_linesize, float *total_weight, float *sum, ptrdiff_t linesize, int w, int h) |
|
static int | nlmeans_plane (AVFilterContext *ctx, int w, int h, int p, int r, uint8_t *dst, ptrdiff_t dst_linesize, const uint8_t *src, ptrdiff_t src_linesize) |
|
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
|
static av_cold int | init (AVFilterContext *ctx) |
|
static av_cold void | uninit (AVFilterContext *ctx) |
|
◆ OFFSET
◆ FLAGS
◆ CHECK_ODD_FIELD
Value: do { \
s->field |= 1; \
"setting it to %d\n",
s->field); \
} \
} while (0)
Definition at line 413 of file vf_nlmeans.c.
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
nlmeans |
| ) |
|
◆ compute_unsafe_ssd_integral_image()
static void compute_unsafe_ssd_integral_image |
( |
uint32_t * |
dst, |
|
|
ptrdiff_t |
dst_linesize_32, |
|
|
int |
startx, |
|
|
int |
starty, |
|
|
const uint8_t * |
src, |
|
|
ptrdiff_t |
linesize, |
|
|
int |
offx, |
|
|
int |
offy, |
|
|
int |
r, |
|
|
int |
sw, |
|
|
int |
sh, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
inlinestatic |
Compute squared difference of an unsafe area (the zone nor s1 nor s2 could be readable).
On the other hand, the line above dst and the column to its left are always readable.
There is little point in having this function SIMDified as it is likely too complex and only handle small portions of the image.
- Parameters
-
dst | integral image |
dst_linesize_32 | integral image linesize (in 32-bit integers unit) |
startx | integral starting x position |
starty | integral starting y position |
src | source plane buffer |
linesize | source plane linesize |
offx | source offsetting in x |
offy | source offsetting in y @paran r absolute maximum source offsetting |
sw | source width |
sh | source height |
w | width to compute |
h | height to compute |
Definition at line 112 of file vf_nlmeans.c.
Referenced by compute_ssd_integral_image(), and main().
◆ compute_ssd_integral_image()
static void compute_ssd_integral_image |
( |
const NLMeansDSPContext * |
dsp, |
|
|
uint32_t * |
ii, |
|
|
ptrdiff_t |
ii_linesize_32, |
|
|
const uint8_t * |
src, |
|
|
ptrdiff_t |
linesize, |
|
|
int |
offx, |
|
|
int |
offy, |
|
|
int |
e, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
static |
◆ config_input()
◆ nlmeans_slice()
static int nlmeans_slice |
( |
AVFilterContext * |
ctx, |
|
|
void * |
arg, |
|
|
int |
jobnr, |
|
|
int |
nb_jobs |
|
) |
| |
|
static |
◆ weight_averages()
static void weight_averages |
( |
uint8_t * |
dst, |
|
|
ptrdiff_t |
dst_linesize, |
|
|
const uint8_t * |
src, |
|
|
ptrdiff_t |
src_linesize, |
|
|
float * |
total_weight, |
|
|
float * |
sum, |
|
|
ptrdiff_t |
linesize, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
static |
◆ nlmeans_plane()
static int nlmeans_plane |
( |
AVFilterContext * |
ctx, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
p, |
|
|
int |
r, |
|
|
uint8_t * |
dst, |
|
|
ptrdiff_t |
dst_linesize, |
|
|
const uint8_t * |
src, |
|
|
ptrdiff_t |
src_linesize |
|
) |
| |
|
static |
◆ filter_frame()
◆ init()
◆ uninit()
◆ nlmeans_options
◆ pix_fmts
◆ nlmeans_inputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 466 of file vf_nlmeans.c.
◆ ff_vf_nlmeans
Initial value:= {
.name = "nlmeans",
.priv_class = &nlmeans_class,
}
Definition at line 475 of file vf_nlmeans.c.
#define AV_LOG_WARNING
Something somehow does not look correct.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
static enum AVPixelFormat pix_fmts[]
#define FILTER_PIXFMTS_ARRAY(array)
#define FILTER_INPUTS(array)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
static const AVFilterPad nlmeans_inputs[]
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
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...
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
@ 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...
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
static av_cold void uninit(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int config_input(AVFilterLink *inlink)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
@ 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 av_cold int init(AVFilterContext *ctx)
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ 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)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)