mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
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:
parent
09408539f4
commit
b2538ce578
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user