History

avfilter/vf_waveform: allow different cb for new modes

Paul B Mahol committed 7 years ago

Commit 33fd82a1 parent 42974eb1 file · +25 −25Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_waveform.c+25−25
@@ -1138,7 +1138,7 @@ FLAT_FUNC(column, 1, 0) · 1137 unmodified lines
11381138 FLAT_FUNC(row_mirror, 0, 1)
11391139 FLAT_FUNC(row, 0, 0)
11401140
1141−#define AFLAT16(name, update_cr, column, mirror) \
1141+#define AFLAT16(name, update_cb, update_cr, column, mirror) \
11421142 static int name(AVFilterContext *ctx, \
11431143 void *arg, int jobnr, \
11441144 int nb_jobs) \
@@ -1204,7 +1204,7 @@ static int name(AVFilterContext *ctx, · 59 unmodified lines
12041204 update16(target, max, intensity, limit); \
12051205 \
12061206 target = d1 + x + d1_signed_linesize * (c0 + c1); \
1207− update16(target, max, intensity, limit); \
1207+ update_cb(target, max, intensity, limit); \
12081208 \
12091209 target = d2 + x + d2_signed_linesize * (c0 + c2); \
12101210 update_cr(target, max, intensity, limit); \
@@ -1245,14 +1245,14 @@ static int name(AVFilterContext *ctx, · 34 unmodified lines
12451245 target = d0_data - c0; \
12461246 update16(target, max, intensity, limit); \
12471247 target = d1_data - (c0 + c1); \
1248− update16(target, max, intensity, limit); \
1248+ update_cb(target, max, intensity, limit); \
12491249 target = d2_data - (c0 + c2); \
12501250 update_cr(target, max, intensity, limit); \
12511251 } else { \
12521252 target = d0_data + c0; \
12531253 update16(target, max, intensity, limit); \
12541254 target = d1_data + (c0 + c1); \
1255− update16(target, max, intensity, limit); \
1255+ update_cb(target, max, intensity, limit); \
12561256 target = d2_data + (c0 + c2); \
12571257 update_cr(target, max, intensity, limit); \
12581258 } \
@@ -1272,7 +1272,7 @@ static int name(AVFilterContext *ctx, · 13 unmodified lines
12721272 return 0; \
12731273 }
12741274
1275−#define AFLAT(name, update_cr, column, mirror) \
1275+#define AFLAT(name, update_cb, update_cr, column, mirror) \
12761276 static int name(AVFilterContext *ctx, \
12771277 void *arg, int jobnr, \
12781278 int nb_jobs) \
@@ -1336,7 +1336,7 @@ static int name(AVFilterContext *ctx, · 57 unmodified lines
13361336 update(target, max, intensity); \
13371337 \
13381338 target = d1 + x + d1_signed_linesize * (c0 + c1); \
1339− update(target, max, intensity); \
1339+ update_cb(target, max, intensity); \
13401340 \
13411341 target = d2 + x + d2_signed_linesize * (c0 + c2); \
13421342 update_cr(target, max, intensity); \
@@ -1377,14 +1377,14 @@ static int name(AVFilterContext *ctx, · 34 unmodified lines
13771377 target = d0_data - c0; \
13781378 update(target, max, intensity); \
13791379 target = d1_data - (c0 + c1); \
1380− update(target, max, intensity); \
1380+ update_cb(target, max, intensity); \
13811381 target = d2_data - (c0 + c2); \
13821382 update_cr(target, max, intensity); \
13831383 } else { \
13841384 target = d0_data + c0; \
13851385 update(target, max, intensity); \
13861386 target = d1_data + (c0 + c1); \
1387− update(target, max, intensity); \
1387+ update_cb(target, max, intensity); \
13881388 target = d2_data + (c0 + c2); \
13891389 update_cr(target, max, intensity); \
13901390 } \
@@ -1404,23 +1404,23 @@ static int name(AVFilterContext *ctx, · 13 unmodified lines
14041404 return 0; \
14051405 }
14061406
1407−AFLAT16(aflat16_row, update16, 0, 0)
1408−AFLAT16(aflat16_row_mirror, update16, 0, 1)
1409−AFLAT16(aflat16_column, update16, 1, 0)
1410−AFLAT16(aflat16_column_mirror, update16, 1, 1)
1411−AFLAT16(xflat16_row, update16_cr, 0, 0)
1412−AFLAT16(xflat16_row_mirror, update16_cr, 0, 1)
1413−AFLAT16(xflat16_column, update16_cr, 1, 0)
1414−AFLAT16(xflat16_column_mirror, update16_cr, 1, 1)
1415−
1416−AFLAT(aflat_row, update, 0, 0)
1417−AFLAT(aflat_row_mirror, update, 0, 1)
1418−AFLAT(aflat_column, update, 1, 0)
1419−AFLAT(aflat_column_mirror, update, 1, 1)
1420−AFLAT(xflat_row, update_cr, 0, 0)
1421−AFLAT(xflat_row_mirror, update_cr, 0, 1)
1422−AFLAT(xflat_column, update_cr, 1, 0)
1423−AFLAT(xflat_column_mirror, update_cr, 1, 1)
1407+AFLAT16(aflat16_row, update16, update16, 0, 0)
1408+AFLAT16(aflat16_row_mirror, update16, update16, 0, 1)
1409+AFLAT16(aflat16_column, update16, update16, 1, 0)
1410+AFLAT16(aflat16_column_mirror, update16, update16, 1, 1)
1411+AFLAT16(xflat16_row, update16, update16_cr, 0, 0)
1412+AFLAT16(xflat16_row_mirror, update16, update16_cr, 0, 1)
1413+AFLAT16(xflat16_column, update16, update16_cr, 1, 0)
1414+AFLAT16(xflat16_column_mirror, update16, update16_cr, 1, 1)
1415+
1416+AFLAT(aflat_row, update, update, 0, 0)
1417+AFLAT(aflat_row_mirror, update, update, 0, 1)
1418+AFLAT(aflat_column, update, update, 1, 0)
1419+AFLAT(aflat_column_mirror, update, update, 1, 1)
1420+AFLAT(xflat_row, update, update_cr, 0, 0)
1421+AFLAT(xflat_row_mirror, update, update_cr, 0, 1)
1422+AFLAT(xflat_column, update, update_cr, 1, 0)
1423+AFLAT(xflat_column_mirror, update, update_cr, 1, 1)
14241424
14251425 static av_always_inline void chroma16(WaveformContext *s,
14261426 AVFrame *in, AVFrame *out,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t