Go to the documentation of this file.
97 #define MAX_THREADS 64
127 #define OFFSET(x) offsetof(MorphoContext, x)
128 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
141 {
"first",
"process only first structure, ignore rest", 0,
AV_OPT_TYPE_CONST, {.i64=0}, 0, 0,
FLAGS,
"str" },
170 static void min_fun(uint8_t *
c,
const uint8_t *
a,
const uint8_t *
b,
int x)
172 for (
int i = 0;
i < x;
i++)
178 for (
int i = 0;
i < x;
i++)
182 static void max_fun(uint8_t *
c,
const uint8_t *
a,
const uint8_t *
b,
int x)
184 for (
int i = 0;
i < x;
i++)
190 for (
int i = 0;
i < x;
i++)
196 for (
int i = 0;
i < x;
i++)
202 for (
int i = 0;
i < x;
i++)
206 static void min16_fun(uint8_t *cc,
const uint8_t *aa,
const uint8_t *bb,
int x)
208 const uint16_t *
a = (
const uint16_t *)aa;
209 const uint16_t *
b = (
const uint16_t *)bb;
210 uint16_t *
c = (uint16_t *)cc;
212 for (
int i = 0;
i < x;
i++)
218 uint16_t *
a = (uint16_t *)aa;
219 const uint16_t *
b = (
const uint16_t *)bb;
221 for (
int i = 0;
i < x;
i++)
225 static void diff16_fun(uint8_t *aa,
const uint8_t *bb,
int x)
227 const uint16_t *
b = (
const uint16_t *)bb;
228 uint16_t *
a = (uint16_t *)aa;
230 for (
int i = 0;
i < x;
i++)
236 uint16_t *
a = (uint16_t *)aa;
237 const uint16_t *
b = (
const uint16_t *)bb;
239 for (
int i = 0;
i < x;
i++)
243 static void max16_fun(uint8_t *cc,
const uint8_t *aa,
const uint8_t *bb,
int x)
245 const uint16_t *
a = (
const uint16_t *)aa;
246 const uint16_t *
b = (
const uint16_t *)bb;
247 uint16_t *
c = (uint16_t *)cc;
249 for (
int i = 0;
i < x;
i++)
255 uint16_t *
a = (uint16_t *)aa;
256 const uint16_t *
b = (
const uint16_t *)bb;
258 for (
int i = 0;
i < x;
i++)
269 pre_pad_x = 0 -
SE->minX;
280 for (
int i = 0;
i < Ty->
I;
i++) {
285 memset(arr[
i], UINT8_MAX, pre_pad_x * type_size);
289 arr[
i] = &(arr[
i][pre_pad_x * type_size]);
303 if (!
table->base_arr)
309 for (
int i = 0;
i <
table->I;
i++) {
324 if (!Ty->
arr || Ty->
I !=
SE->Lnum ||
328 Ty->
max_r !=
SE->maxY + num - 1) {
336 Ty->
max_r =
SE->maxY + num - 1;
353 for (
int r = Ty->
min_r; r < Ty->max_r;
r++)
362 if (y +
r >= 0 && y + r < f->
h) {
368 for (
int i = 1;
i <
SE->Lnum;
i++) {
369 int d =
SE->R[
i] -
SE->R[
i - 1];
375 memcpy(Ty->
arr[
r][
i] + (Ty->
X -
d) *
f->type_size,
376 Ty->
arr[
r][
i - 1] + (Ty->
X -
d) *
f->type_size,
383 for (
int i = 0;
i < num;
i++)
395 for (
int r = Ty->
min_r; r <= Ty->max_r;
r++)
403 if (y +
r >= 0 && y + r < f->
h) {
409 for (
int i = 1;
i <
SE->Lnum;
i++) {
410 int d =
SE->R[
i] -
SE->R[
i - 1];
416 memcpy(Ty->
arr[
r][
i] + (Ty->
X -
d) *
f->type_size,
417 Ty->
arr[
r][
i - 1] + (Ty->
X -
d) *
f->type_size,
424 for (
int i = 0;
i < num;
i++)
436 for (
int r = Ty->
min_r; r <= Ty->max_r;
r++)
444 memset(
g->img[y], 0,
g->w *
g->type_size);
446 for (
int c = 0;
c <
SE->size;
c++) {
447 g->max_in_place(
g->img[y],
455 memset(
g->img[y], UINT8_MAX,
g->w *
g->type_size);
457 for (
int c = 0;
c <
SE->size;
c++) {
458 g->min_in_place(
g->img[y],
471 for (
int y = y0 + 1; y < y1; y++) {
486 for (
int y = y0 + 1; y < y1; y++) {
496 for (
int y = y0; y < y1; y++)
497 f->diff_in_place(
g->img[y],
f->img[y],
f->w);
502 for (
int y = y0; y < y1; y++)
503 f->diff_rin_place(
g->img[y],
f->img[y],
f->w);
509 if (chords->
size == chords->
cap) {
517 chords->
C[chords->
size].
x =
c.x;
518 chords->
C[chords->
size].
y =
c.y;
519 chords->
C[chords->
size++].
l =
c.l;
550 chords->
minX = INT16_MAX;
551 chords->
maxX = INT16_MIN;
552 chords->
minY = INT16_MAX;
553 chords->
maxY = INT16_MIN;
564 return (
a.l >
b.l) - (
a.l <
b.l);
573 return (
a.y >
b.y) - (
a.y <
b.y);
578 const int mid = 1 << (
SE->depth - 1);
579 int chord_length_index;
580 int chord_start,
val,
ret;
581 int centerX, centerY;
592 centerX = (
SE->w - 1) / 2;
593 centerY = (
SE->h - 1) / 2;
598 for (
int y = 0; y <
SE->h; y++) {
602 for (x = 0; x <
SE->w; x++) {
603 if (
SE->type_size == 1) {
606 if (
SE->img[y][x] >= mid && chord_start == -1) {
609 }
else if (
SE->img[y][x] < mid && chord_start != -1) {
611 c.x = chord_start - centerX;
613 c.l = x - chord_start;
622 if (
AV_RN16(&
SE->img[y][x * 2]) >= mid && chord_start == -1) {
625 }
else if (
AV_RN16(&
SE->img[y][x * 2]) < mid && chord_start != -1) {
627 c.x = chord_start - centerX;
629 c.l = x - chord_start;
637 if (chord_start != -1) {
639 c.x = chord_start - centerX;
641 c.l = x - chord_start;
661 if (chords->
size > 0) {
663 if (chords->
Lnum >= r_cap) {
669 chords->
R[chords->
Lnum++] = 1;
673 for (
int i = 0;
i < chords->
size;
i++) {
674 if (
val != chords->
C[
i].
l) {
675 while (2 * val < chords->
C[
i].l &&
val != 0) {
676 if (chords->
Lnum >= r_cap) {
683 chords->
R[chords->
Lnum++] = 2 *
val;
688 if (chords->
Lnum >= r_cap) {
703 chord_length_index = 0;
704 for (
int i = 0;
i < chords->
size;
i++) {
705 while (chords->
R[chord_length_index] < chords->
C[
i].
l)
706 chord_length_index++;
707 chords->
C[
i].
i = chord_length_index;
726 int w,
int h,
int R,
int type_size,
int depth)
745 for (
int y = 0; y <
h; y++)
746 imp->
img[y] = (uint8_t *)dst + y * dst_linesize;
756 s->depth =
desc->comp[0].depth;
757 s->type_size = (
s->depth + 7) / 8;
758 s->nb_planes =
desc->nb_components;
760 s->planewidth[0] =
s->planewidth[3] =
inlink->w;
762 s->planeheight[0] =
s->planeheight[3] =
inlink->h;
776 s->splanewidth[0] =
s->splanewidth[3] =
inlink->w;
778 s->splaneheight[0] =
s->splaneheight[3] =
inlink->h;
801 for (
int p = 0; p <
s->nb_planes; p++) {
802 const int width =
s->planewidth[p];
803 const int height =
s->planeheight[p];
804 const int y0 = (
height * jobnr ) / nb_jobs;
805 const int y1 = (
height * (jobnr+1)) / nb_jobs;
806 const int depth =
s->depth;
808 if (
ctx->is_disabled || !(
s->planes & (1 << p))) {
814 width * ((depth + 7) / 8),
819 if (
s->SE[p].minX == INT16_MAX ||
820 s->SE[p].minY == INT16_MAX ||
821 s->SE[p].maxX == INT16_MIN ||
822 s->SE[p].maxY == INT16_MIN)
827 ret =
erode(&
s->g[p], &
s->f[p], &
s->SE[p], &
s->Ty[jobnr][0][p], y0, y1);
831 ret =
dilate(&
s->g[p], &
s->f[p], &
s->SE[p], &
s->Ty[jobnr][0][p], y0, y1);
835 ret =
erode(&
s->h[p], &
s->f[p], &
s->SE[p], &
s->Ty[jobnr][0][p], y0, y1);
839 ret =
dilate(&
s->h[p], &
s->f[p], &
s->SE[p], &
s->Ty[jobnr][0][p], y0, y1);
857 for (
int p = 0; p <
s->nb_planes; p++) {
858 const int height =
s->planeheight[p];
859 const int y0 = (
height * jobnr ) / nb_jobs;
860 const int y1 = (
height * (jobnr+1)) / nb_jobs;
862 if (
ctx->is_disabled || !(
s->planes & (1 << p))) {
867 if (
s->SE[p].minX == INT16_MAX ||
868 s->SE[p].minY == INT16_MAX ||
869 s->SE[p].maxX == INT16_MIN ||
870 s->SE[p].maxY == INT16_MIN)
875 ret =
dilate(&
s->g[p], &
s->h[p], &
s->SE[p], &
s->Ty[jobnr][1][p], y0, y1);
878 ret =
erode(&
s->g[p], &
s->h[p], &
s->SE[p], &
s->Ty[jobnr][1][p], y0, y1);
881 ret =
erode(&
s->h[p], &
s->f[p], &
s->SE[p], &
s->Ty[jobnr][1][p], y0, y1);
887 ret =
dilate(&
s->g[p], &
s->h[p], &
s->SE[p], &
s->Ty[jobnr][1][p], y0, y1);
893 ret =
erode(&
s->g[p], &
s->h[p], &
s->SE[p], &
s->Ty[jobnr][1][p], y0, y1);
932 for (
int p = 0; p <
s->nb_planes; p++) {
933 const uint8_t *ssrc = structurepic->data[p];
934 const int ssrc_linesize = structurepic->linesize[p];
935 const int swidth =
s->splanewidth[p];
936 const int sheight =
s->splaneheight[p];
937 const uint8_t *
src = in->
data[p];
939 uint8_t *dst =
out->data[p];
940 int dst_linesize =
out->linesize[p];
941 const int width =
s->planewidth[p];
942 const int height =
s->planeheight[p];
943 const int depth =
s->depth;
944 int type_size =
s->type_size;
946 if (!
s->got_structure[p] ||
s->structures) {
949 ret =
read_iplane(&
s->SEimg[p], ssrc, ssrc_linesize, swidth, sheight, 1, type_size, depth);
955 s->got_structure[p] = 1;
962 ret =
read_iplane(&
s->g[p], dst, dst_linesize,
s->f[p].w,
s->f[p].h,
s->f[p].range, type_size, depth);
982 FFMIN3(
s->planeheight[1],
s->planeheight[2],
986 FFMIN3(
s->planeheight[1],
s->planeheight[2],
1010 outlink->
w = mainlink->
w;
1011 outlink->
h = mainlink->
h;
1024 s->plane_f =
av_calloc(outlink->
w * outlink->
h,
sizeof(*
s->plane_f));
1025 s->plane_g =
av_calloc(outlink->
w * outlink->
h,
sizeof(*
s->plane_g));
1026 if (!
s->plane_f || !
s->plane_g)
1036 for (
int p = 0; p < 4; p++) {
1062 .name =
"structure",
1079 .preinit = morpho_framesync_preinit,
1081 .priv_class = &morpho_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
#define AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_GBRAP16
int ff_framesync_configure(FFFrameSync *fs)
Configure a frame sync structure.
LUT Ty[MAX_THREADS][2][4]
AVPixelFormat
Pixel format.
static void line_erode(IPlane *g, LUT *Ty, chord_set *SE, int y, int tid)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
static int alloc_lut_if_necessary(LUT *Ty, IPlane *f, chord_set *SE, int num, enum MorphModes mode)
void ff_framesync_uninit(FFFrameSync *fs)
Free all memory currently allocated.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static void free_chord_set(chord_set *SE)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
static void mininplace_fun(uint8_t *a, const uint8_t *b, int x)
void(* min_in_place)(uint8_t *a, const uint8_t *b, int x)
#define FILTER_PIXFMTS_ARRAY(array)
static void diffinplace_fun(uint8_t *a, const uint8_t *b, int x)
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
static int activate(AVFilterContext *ctx)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define AV_PIX_FMT_YUVA422P9
This structure describes decoded (raw) audio or video data.
#define AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P10
static const uint16_t table[]
#define AV_PIX_FMT_YUV420P10
const AVFilter ff_vf_morpho
FRAMESYNC_DEFINE_CLASS(morpho, MorphoContext, fs)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
const char * name
Filter name.
A link between two filters.
#define AV_PIX_FMT_YUVA422P10
void(* min_out_place)(uint8_t *c, const uint8_t *a, const uint8_t *b, int x)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
#define AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_GBRP14
static int alloc_lut(LUT *Ty, chord_set *SE, int type_size, int mode)
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
static int morpho_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUVA444P16
static void min16_fun(uint8_t *cc, const uint8_t *aa, const uint8_t *bb, int x)
#define AV_PIX_FMT_YUV422P9
static double val(void *priv, double ch)
#define AV_PIX_FMT_GRAY16
static enum AVPixelFormat pix_fmts[]
A filter pad used for either input or output.
#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 ...
static av_cold void uninit(AVFilterContext *ctx)
s EdgeDetect Foobar g libavfilter vf_edgedetect c libavfilter vf_foobar c edit libavfilter and add an entry for foobar following the pattern of the other filters edit libavfilter allfilters and add an entry for foobar following the pattern of the other filters configure make j< whatever > ffmpeg ffmpeg i you should get a foobar png with Lena edge detected That s your new playground is ready Some little details about what s going which in turn will define variables for the build system and the C
static int erode(IPlane *g, IPlane *f, chord_set *SE, LUT *Ty, int y0, int y1)
#define AV_PIX_FMT_YUV422P16
static int do_morpho(FFFrameSync *fs)
@ 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
static void maxinplace16_fun(uint8_t *aa, const uint8_t *bb, int x)
#define AV_PIX_FMT_GBRAP12
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
static void mininplace16_fun(uint8_t *aa, const uint8_t *bb, int x)
#define AV_PIX_FMT_YUV444P16
#define AV_CEIL_RSHIFT(a, b)
static const AVFilterPad morpho_inputs[]
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
#define av_assert0(cond)
assert() equivalent, that is always enabled.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable; if left to 0/0,...
#define AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P16
static int insert_chord_set(chord_set *chords, chord c)
#define AV_PIX_FMT_GRAY14
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FILTER_INPUTS(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
static void compute_max_row(IPlane *f, LUT *Ty, chord_set *SE, int r, int y)
#define av_realloc_f(p, o, n)
#define AV_PIX_FMT_GBRP16
Describe the class of an AVClass context structure.
void(* diff_in_place)(uint8_t *a, const uint8_t *b, int x)
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
#define fs(width, name, subs,...)
static int config_input_structure(AVFilterLink *inlink)
static void maxinplace_fun(uint8_t *a, const uint8_t *b, int x)
static void diff16_fun(uint8_t *aa, const uint8_t *bb, int x)
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
static const AVFilterPad morpho_outputs[]
static void difference(IPlane *g, IPlane *f, int y0, int y1)
#define AV_PIX_FMT_YUV422P10
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static int init_chordset(chord_set *chords)
static void free_lut(LUT *table)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int ff_framesync_init_dualinput(FFFrameSync *fs, AVFilterContext *parent)
Initialize a frame sync structure for dualinput.
static void copy(const float *p1, float *p2, const int length)
#define AV_PIX_FMT_YUV422P12
static void free_iplane(IPlane *imp)
static int read_iplane(IPlane *imp, const uint8_t *dst, int dst_linesize, int w, int h, int R, int type_size, int depth)
#define AV_PIX_FMT_YUV444P12
static void line_dilate(IPlane *g, LUT *Ty, chord_set *SE, int y, int tid)
AVFilterContext * src
source filter
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
#define AV_PIX_FMT_YUVA444P10
static int build_chord_set(IPlane *SE, chord_set *chords)
static void max_fun(uint8_t *c, const uint8_t *a, const uint8_t *b, int x)
#define i(width, name, range_min, range_max)
int w
agreed upon image width
static int config_output(AVFilterLink *outlink)
#define AV_PIX_FMT_GBRP12
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Used for passing data between threads.
static void diffinplace16_fun(uint8_t *aa, const uint8_t *bb, int x)
static const struct @363 planes[]
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
const char * name
Pad name.
void * av_calloc(size_t nmemb, size_t size)
#define AV_PIX_FMT_YUV444P9
static void max16_fun(uint8_t *cc, const uint8_t *aa, const uint8_t *bb, int x)
#define AV_PIX_FMT_YUVA444P9
static int morpho_sliceX(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static void update_max_lut(IPlane *f, LUT *Ty, chord_set *SE, int y, int tid, int num)
#define AV_PIX_FMT_YUV420P12
static void circular_swap(LUT *Ty)
#define AV_PIX_FMT_YUV422P14
int h
agreed upon image height
static void diff_fun(uint8_t *a, const uint8_t *b, int x)
#define AV_PIX_FMT_YUVA422P12
static int config_input(AVFilterLink *inlink)
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
@ 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...
static int comp_chord(const void *p, const void *q)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
static void min_fun(uint8_t *c, const uint8_t *a, const uint8_t *b, int x)
static int compute_max_lut(LUT *Ty, IPlane *f, chord_set *SE, int y, int num)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define FILTER_OUTPUTS(array)
static int comp_chord_length(const void *p, const void *q)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
static void difference2(IPlane *g, IPlane *f, int y0, int y1)
static void update_min_lut(IPlane *f, LUT *Ty, chord_set *SE, int y, int tid, int num)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
void(* max_out_place)(uint8_t *c, const uint8_t *a, const uint8_t *b, int x)
#define AV_PIX_FMT_YUV440P12
static int dilate(IPlane *g, IPlane *f, chord_set *SE, LUT *Ty, int y0, int y1)
#define AV_PIX_FMT_YUV444P14
void(* max_in_place)(uint8_t *a, const uint8_t *b, int x)
int ff_framesync_activate(FFFrameSync *fs)
Examine the frames in the filter's input and try to produce output.
int ff_framesync_dualinput_get(FFFrameSync *fs, AVFrame **f0, AVFrame **f1)
#define AV_PIX_FMT_GRAY12
static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
static int compute_min_lut(LUT *Ty, IPlane *f, chord_set *SE, int y, int num)
static const AVOption morpho_options[]
@ 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 void compute_min_row(IPlane *f, LUT *Ty, chord_set *SE, int r, int y)
void(* diff_rin_place)(uint8_t *a, const uint8_t *b, int x)