#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
struct | EdgeDetectContext |
Defines | |
#define | OFFSET(x) offsetof(EdgeDetectContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#define | COPY_MAXIMA(ay, ax, by, bx) |
Enumerations | |
enum | { DIRECTION_45UP, DIRECTION_45DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL } |
Functions | |
AVFILTER_DEFINE_CLASS (edgedetect) | |
static av_cold int | init (AVFilterContext *ctx, const char *args) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_props (AVFilterLink *inlink) |
static void | gaussian_blur (AVFilterContext *ctx, int w, int h, uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize) |
static int | get_rounded_direction (int gx, int gy) |
static void | sobel (AVFilterContext *ctx, int w, int h, uint16_t *dst, int dst_linesize, const uint8_t *src, int src_linesize) |
static void | non_maximum_suppression (AVFilterContext *ctx, int w, int h, uint8_t *dst, int dst_linesize, const uint16_t *src, int src_linesize) |
static void | double_threshold (AVFilterContext *ctx, int w, int h, uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize) |
static int | end_frame (AVFilterLink *inlink) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | null_draw_slice (AVFilterLink *inlink, int y, int h, int slice_dir) |
Variables | |
static const AVOption | edgedetect_options [] |
AVFilter | avfilter_vf_edgedetect |
Definition in file vf_edgedetect.c.
#define COPY_MAXIMA | ( | ay, | |||
ax, | |||||
by, | |||||
bx | ) |
Value:
do { \ if (src[i] > src[(ay)*src_linesize + i+(ax)] && \ src[i] > src[(by)*src_linesize + i+(bx)]) \ dst[i] = av_clip_uint8(src[i]); \ } while (0)
Referenced by non_maximum_suppression().
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 44 of file vf_edgedetect.c.
#define OFFSET | ( | x | ) | offsetof(EdgeDetectContext, x) |
Definition at line 43 of file vf_edgedetect.c.
anonymous enum |
Definition at line 130 of file vf_edgedetect.c.
AVFILTER_DEFINE_CLASS | ( | edgedetect | ) |
static int config_props | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 76 of file vf_edgedetect.c.
static int end_frame | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 252 of file vf_edgedetect.c.
static av_cold int init | ( | AVFilterContext * | ctx, | |
const char * | args | |||
) | [static] |
Definition at line 53 of file vf_edgedetect.c.
static int null_draw_slice | ( | AVFilterLink * | inlink, | |
int | y, | |||
int | h, | |||
int | slice_dir | |||
) | [static] |
Definition at line 296 of file vf_edgedetect.c.
static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 69 of file vf_edgedetect.c.
static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 288 of file vf_edgedetect.c.
Initial value:
{ .name = "edgedetect", .description = NULL_IF_CONFIG_SMALL("Detect and draw edge."), .priv_size = sizeof(EdgeDetectContext), .init = init, .uninit = uninit, .query_formats = query_formats, .inputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, .draw_slice = null_draw_slice, .config_props = config_props, .end_frame = end_frame, .min_perms = AV_PERM_READ }, { .name = NULL } }, .outputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, { .name = NULL } }, }
Definition at line 298 of file vf_edgedetect.c.
const AVOption edgedetect_options[] [static] |
Initial value:
{ { "high", "set high threshold", OFFSET(high), AV_OPT_TYPE_DOUBLE, {.dbl=50/255.}, 0, 1, FLAGS }, { "low", "set low threshold", OFFSET(low), AV_OPT_TYPE_DOUBLE, {.dbl=20/255.}, 0, 1, FLAGS }, { NULL }, }
Definition at line 45 of file vf_edgedetect.c.