Go to the source code of this file.
|
enum | FilterModes {
LISTEN = -1,
CUT_BELOW,
CUT_ABOVE,
BOOST_BELOW,
BOOST_ABOVE,
NB_FMODES,
BASIC,
FINAL,
NB_MODES,
BASIC,
FAST,
NB_MODES
} |
|
|
| AVFILTER_DEFINE_CLASS (bm3d) |
|
static int | do_search_boundary (int pos, int plane_boundary, int search_range, int search_step) |
|
static int | search_boundary (int plane_boundary, int search_range, int search_step, int vertical, int y, int x) |
|
static int | cmp_scores (const void *a, const void *b) |
|
static double | do_block_ssd (BM3DContext *s, PosCode *pos, const uint8_t *src, int src_stride, int r_y, int r_x) |
|
static double | do_block_ssd16 (BM3DContext *s, PosCode *pos, const uint8_t *src, int src_stride, int r_y, int r_x) |
|
static void | do_block_matching_multi (BM3DContext *s, const uint8_t *src, int src_stride, int src_range, const PosCode *search_pos, int search_size, float th_mse, int r_y, int r_x, int plane, int jobnr) |
|
static void | block_matching_multi (BM3DContext *s, const uint8_t *ref, int ref_linesize, int y, int x, int exclude_cur_pos, int plane, int jobnr) |
|
static void | block_matching (BM3DContext *s, const uint8_t *ref, int ref_linesize, int j, int i, int plane, int jobnr) |
|
static void | get_block_row (const uint8_t *srcp, int src_linesize, int y, int x, int block_size, float *dst) |
|
static void | get_block_row16 (const uint8_t *srcp, int src_linesize, int y, int x, int block_size, float *dst) |
|
static void | basic_block_filtering (BM3DContext *s, const uint8_t *src, int src_linesize, const uint8_t *ref, int ref_linesize, int y, int x, int plane, int jobnr) |
|
static void | final_block_filtering (BM3DContext *s, const uint8_t *src, int src_linesize, const uint8_t *ref, int ref_linesize, int y, int x, int plane, int jobnr) |
|
static void | do_output (BM3DContext *s, uint8_t *dst, int dst_linesize, int plane, int nb_jobs) |
|
static void | do_output16 (BM3DContext *s, uint8_t *dst, int dst_linesize, int plane, int nb_jobs) |
|
static int | filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
|
static int | filter_frame (AVFilterContext *ctx, AVFrame **out, AVFrame *in, AVFrame *ref) |
|
static int | config_input (AVFilterLink *inlink) |
|
static int | activate (AVFilterContext *ctx) |
|
static int | process_frame (FFFrameSync *fs) |
|
static av_cold int | init (AVFilterContext *ctx) |
|
static int | config_output (AVFilterLink *outlink) |
|
static av_cold void | uninit (AVFilterContext *ctx) |
|
◆ MAX_NB_THREADS
#define MAX_NB_THREADS 32 |
- Todo:
- opponent color space
- temporal support
Definition at line 45 of file vf_bm3d.c.
◆ OFFSET
◆ FLAGS
◆ SQR
#define SQR |
( |
|
x | ) |
((x) * (x)) |
◆ FilterModes
Enumerator |
---|
LISTEN | |
CUT_BELOW | |
CUT_ABOVE | |
BOOST_BELOW | |
BOOST_ABOVE | |
NB_FMODES | |
BASIC | |
FINAL | |
NB_MODES | |
BASIC | |
FAST | |
NB_MODES | |
Definition at line 47 of file vf_bm3d.c.
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
bm3d |
| ) |
|
◆ do_search_boundary()
static int do_search_boundary |
( |
int |
pos, |
|
|
int |
plane_boundary, |
|
|
int |
search_range, |
|
|
int |
search_step |
|
) |
| |
|
static |
◆ search_boundary()
static int search_boundary |
( |
int |
plane_boundary, |
|
|
int |
search_range, |
|
|
int |
search_step, |
|
|
int |
vertical, |
|
|
int |
y, |
|
|
int |
x |
|
) |
| |
|
static |
◆ cmp_scores()
static int cmp_scores |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ do_block_ssd()
◆ do_block_ssd16()
◆ do_block_matching_multi()
static void do_block_matching_multi |
( |
BM3DContext * |
s, |
|
|
const uint8_t * |
src, |
|
|
int |
src_stride, |
|
|
int |
src_range, |
|
|
const PosCode * |
search_pos, |
|
|
int |
search_size, |
|
|
float |
th_mse, |
|
|
int |
r_y, |
|
|
int |
r_x, |
|
|
int |
plane, |
|
|
int |
jobnr |
|
) |
| |
|
static |
◆ block_matching_multi()
static void block_matching_multi |
( |
BM3DContext * |
s, |
|
|
const uint8_t * |
ref, |
|
|
int |
ref_linesize, |
|
|
int |
y, |
|
|
int |
x, |
|
|
int |
exclude_cur_pos, |
|
|
int |
plane, |
|
|
int |
jobnr |
|
) |
| |
|
static |
◆ block_matching()
static void block_matching |
( |
BM3DContext * |
s, |
|
|
const uint8_t * |
ref, |
|
|
int |
ref_linesize, |
|
|
int |
j, |
|
|
int |
i, |
|
|
int |
plane, |
|
|
int |
jobnr |
|
) |
| |
|
static |
◆ get_block_row()
static void get_block_row |
( |
const uint8_t * |
srcp, |
|
|
int |
src_linesize, |
|
|
int |
y, |
|
|
int |
x, |
|
|
int |
block_size, |
|
|
float * |
dst |
|
) |
| |
|
static |
◆ get_block_row16()
static void get_block_row16 |
( |
const uint8_t * |
srcp, |
|
|
int |
src_linesize, |
|
|
int |
y, |
|
|
int |
x, |
|
|
int |
block_size, |
|
|
float * |
dst |
|
) |
| |
|
static |
◆ basic_block_filtering()
static void basic_block_filtering |
( |
BM3DContext * |
s, |
|
|
const uint8_t * |
src, |
|
|
int |
src_linesize, |
|
|
const uint8_t * |
ref, |
|
|
int |
ref_linesize, |
|
|
int |
y, |
|
|
int |
x, |
|
|
int |
plane, |
|
|
int |
jobnr |
|
) |
| |
|
static |
◆ final_block_filtering()
static void final_block_filtering |
( |
BM3DContext * |
s, |
|
|
const uint8_t * |
src, |
|
|
int |
src_linesize, |
|
|
const uint8_t * |
ref, |
|
|
int |
ref_linesize, |
|
|
int |
y, |
|
|
int |
x, |
|
|
int |
plane, |
|
|
int |
jobnr |
|
) |
| |
|
static |
◆ do_output()
static void do_output |
( |
BM3DContext * |
s, |
|
|
uint8_t * |
dst, |
|
|
int |
dst_linesize, |
|
|
int |
plane, |
|
|
int |
nb_jobs |
|
) |
| |
|
static |
◆ do_output16()
static void do_output16 |
( |
BM3DContext * |
s, |
|
|
uint8_t * |
dst, |
|
|
int |
dst_linesize, |
|
|
int |
plane, |
|
|
int |
nb_jobs |
|
) |
| |
|
static |
◆ filter_slice()
static int filter_slice |
( |
AVFilterContext * |
ctx, |
|
|
void * |
arg, |
|
|
int |
jobnr, |
|
|
int |
nb_jobs |
|
) |
| |
|
static |
◆ filter_frame()
◆ config_input()
◆ activate()
◆ process_frame()
◆ init()
◆ config_output()
◆ uninit()
◆ bm3d_options
Initial value:= {
{ "sigma", "set denoising strength",
{ "block", "set size of local patch",
{ "bstep", "set sliding step for processing blocks",
{ "group", "set maximal number of similar blocks",
{ "range", "set block matching range",
{ "mstep", "set step for block matching",
{ "thmse", "set threshold of mean square error for block matching",
{ "hdthr", "set hard threshold for 3D transfer domain",
{ "estim", "set filtering estimation mode",
{ "basic", "basic estimate",
{ "final", "final estimate",
{ "ref", "have reference stream",
{ "planes", "set planes to filter",
}
Definition at line 134 of file vf_bm3d.c.
◆ pix_fmts
◆ bm3d_outputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 1037 of file vf_bm3d.c.
◆ ff_vf_bm3d
Initial value:= {
.name = "bm3d",
.priv_class = &bm3d_class,
}
Definition at line 1045 of file vf_bm3d.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
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define AV_PIX_FMT_YUVA422P10
static const struct @466 planes[]
#define AV_PIX_FMT_YUVA420P9
static enum AVPixelFormat pix_fmts[]
#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 AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
#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 ...
#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
#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_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...
#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
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
@ 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.
#define AV_PIX_FMT_YUV422P12
static const AVFilterPad bm3d_outputs[]
#define AV_PIX_FMT_YUV444P12
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
#define AV_PIX_FMT_YUVA444P10
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
#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
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV422P14
static av_cold int init(AVFilterContext *ctx)
#define AV_PIX_FMT_YUVA422P12
@ AV_OPT_TYPE_INT
Underlying C type is int.
static int config_output(AVFilterLink *outlink)
static int ref[MAX_W *MAX_W]
@ 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)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ 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...
@ 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_OPT_TYPE_CONST
Special option type for declaring named constants.
@ 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 activate(AVFilterContext *ctx)