avfilter/vf_morpho: Rename functions to unbreak MSVC

MSVC's headers include function-like macros min and max which
collide with function pointers in vf_morpho.c, leading to
compilation failures. Fix this by renaming said function pointers.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-29 09:17:46 +02:00
parent 09408539f4
commit b2538ce578

View File

@ -49,8 +49,8 @@ typedef struct IPlane {
int depth; int depth;
int type_size; int type_size;
void (*max)(uint8_t *c, const uint8_t *a, const uint8_t *b, int x); void (*max_out_place)(uint8_t *c, const uint8_t *a, const uint8_t *b, int x);
void (*min)(uint8_t *c, const uint8_t *a, const uint8_t *b, int x); void (*min_out_place)(uint8_t *c, const uint8_t *a, const uint8_t *b, int x);
void (*max_in_place)(uint8_t *a, const uint8_t *b, int x); void (*max_in_place)(uint8_t *a, const uint8_t *b, int x);
void (*min_in_place)(uint8_t *a, const uint8_t *b, int x); void (*min_in_place)(uint8_t *a, const uint8_t *b, int x);
} IPlane; } IPlane;
@ -304,7 +304,7 @@ static void compute_min_row(IPlane *f, LUT *Ty, chord_set *SE, int r, int y)
for (int i = 1; i < SE->Lnum; i++) { for (int i = 1; i < SE->Lnum; i++) {
int d = SE->R[i] - SE->R[i - 1]; int d = SE->R[i] - SE->R[i - 1];
f->min(Ty->arr[r][i] - Ty->pre_pad_x * f->type_size, f->min_out_place(Ty->arr[r][i] - Ty->pre_pad_x * f->type_size,
Ty->arr[r][i - 1] - Ty->pre_pad_x * f->type_size, Ty->arr[r][i - 1] - Ty->pre_pad_x * f->type_size,
Ty->arr[r][i - 1] + (d - Ty->pre_pad_x) * f->type_size, Ty->arr[r][i - 1] + (d - Ty->pre_pad_x) * f->type_size,
Ty->X + Ty->pre_pad_x - d); Ty->X + Ty->pre_pad_x - d);
@ -358,7 +358,7 @@ static void compute_max_row(IPlane *f, LUT *Ty, chord_set *SE, int r, int y)
for (int i = 1; i < SE->Lnum; i++) { for (int i = 1; i < SE->Lnum; i++) {
int d = SE->R[i] - SE->R[i - 1]; int d = SE->R[i] - SE->R[i - 1];
f->max(Ty->arr[r][i] - Ty->pre_pad_x * f->type_size, f->max_out_place(Ty->arr[r][i] - Ty->pre_pad_x * f->type_size,
Ty->arr[r][i - 1] - Ty->pre_pad_x * f->type_size, Ty->arr[r][i - 1] - Ty->pre_pad_x * f->type_size,
Ty->arr[r][i - 1] + (d - Ty->pre_pad_x) * f->type_size, Ty->arr[r][i - 1] + (d - Ty->pre_pad_x) * f->type_size,
Ty->X + Ty->pre_pad_x - d); Ty->X + Ty->pre_pad_x - d);
@ -685,8 +685,8 @@ static int read_iplane(IPlane *imp, const uint8_t *dst, int dst_linesize,
imp->range = R; imp->range = R;
imp->depth = depth; imp->depth = depth;
imp->type_size = type_size; imp->type_size = type_size;
imp->max = type_size == 1 ? max_fun : max16_fun; imp->max_out_place = type_size == 1 ? max_fun : max16_fun;
imp->min = type_size == 1 ? min_fun : min16_fun; imp->min_out_place = type_size == 1 ? min_fun : min16_fun;
imp->max_in_place = type_size == 1 ? maxinplace_fun : maxinplace16_fun; imp->max_in_place = type_size == 1 ? maxinplace_fun : maxinplace16_fun;
imp->min_in_place = type_size == 1 ? mininplace_fun : mininplace16_fun; imp->min_in_place = type_size == 1 ? mininplace_fun : mininplace16_fun;