1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avfilter/vf_colorlevels: typedef ThreadData struct

This commit is contained in:
Paul B Mahol
2021-02-02 16:08:18 +01:00
parent 85bdf18917
commit a7e826b9e1

View File

@@ -105,7 +105,7 @@ static int config_input(AVFilterLink *inlink)
return 0; return 0;
} }
struct thread_data { typedef struct ThreadData {
const uint8_t *srcrow; const uint8_t *srcrow;
uint8_t *dstrow; uint8_t *dstrow;
int dst_linesize; int dst_linesize;
@@ -118,11 +118,11 @@ struct thread_data {
int imin; int imin;
int omin; int omin;
}; } ThreadData;
#define LOAD_COMMON\ #define LOAD_COMMON\
ColorLevelsContext *s = ctx->priv;\ ColorLevelsContext *s = ctx->priv;\
const struct thread_data *td = arg;\ const ThreadData *td = arg;\
\ \
int process_h = td->h;\ int process_h = td->h;\
const int slice_start = (process_h * jobnr ) / nb_jobs;\ const int slice_start = (process_h * jobnr ) / nb_jobs;\
@@ -199,7 +199,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int omin = lrint(r->out_min * UINT8_MAX); int omin = lrint(r->out_min * UINT8_MAX);
int omax = lrint(r->out_max * UINT8_MAX); int omax = lrint(r->out_max * UINT8_MAX);
double coeff; double coeff;
struct thread_data td; ThreadData td;
if (imin < 0) { if (imin < 0) {
imin = UINT8_MAX; imin = UINT8_MAX;
@@ -251,7 +251,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int omin = lrint(r->out_min * UINT16_MAX); int omin = lrint(r->out_min * UINT16_MAX);
int omax = lrint(r->out_max * UINT16_MAX); int omax = lrint(r->out_max * UINT16_MAX);
double coeff; double coeff;
struct thread_data td; ThreadData td;
if (imin < 0) { if (imin < 0) {
imin = UINT16_MAX; imin = UINT16_MAX;