Unified · Split
| @@ -1138,7 +1138,7 @@ FLAT_FUNC(column, 1, 0) · 1137 unmodified lines | |||
| 1138 | FLAT_FUNC(row_mirror, 0, 1) | 1138 | FLAT_FUNC(row_mirror, 0, 1) |
| 1139 | FLAT_FUNC(row, 0, 0) | 1139 | FLAT_FUNC(row, 0, 0) |
| 1140 | 1140 | ||
| 1141 | #define AFLAT16(name, update_cr, column, mirror) \ | 1141 | #define AFLAT16(name, update_cb, update_cr, column, mirror) \ |
| 1142 | static int name(AVFilterContext *ctx, \ | 1142 | static int name(AVFilterContext *ctx, \ |
| 1143 | void *arg, int jobnr, \ | 1143 | void *arg, int jobnr, \ |
| 1144 | int nb_jobs) \ | 1144 | int nb_jobs) \ |
| @@ -1204,7 +1204,7 @@ static int name(AVFilterContext *ctx, · 59 unmodified lines | |||
| 1204 | update16(target, max, intensity, limit); \ | 1204 | update16(target, max, intensity, limit); \ |
| 1205 | \ | 1205 | \ |
| 1206 | target = d1 + x + d1_signed_linesize * (c0 + c1); \ | 1206 | target = d1 + x + d1_signed_linesize * (c0 + c1); \ |
| 1207 | update16(target, max, intensity, limit); \ | 1207 | update_cb(target, max, intensity, limit); \ |
| 1208 | \ | 1208 | \ |
| 1209 | target = d2 + x + d2_signed_linesize * (c0 + c2); \ | 1209 | target = d2 + x + d2_signed_linesize * (c0 + c2); \ |
| 1210 | update_cr(target, max, intensity, limit); \ | 1210 | update_cr(target, max, intensity, limit); \ |
| @@ -1245,14 +1245,14 @@ static int name(AVFilterContext *ctx, · 34 unmodified lines | |||
| 1245 | target = d0_data - c0; \ | 1245 | target = d0_data - c0; \ |
| 1246 | update16(target, max, intensity, limit); \ | 1246 | update16(target, max, intensity, limit); \ |
| 1247 | target = d1_data - (c0 + c1); \ | 1247 | target = d1_data - (c0 + c1); \ |
| 1248 | update16(target, max, intensity, limit); \ | 1248 | update_cb(target, max, intensity, limit); \ |
| 1249 | target = d2_data - (c0 + c2); \ | 1249 | target = d2_data - (c0 + c2); \ |
| 1250 | update_cr(target, max, intensity, limit); \ | 1250 | update_cr(target, max, intensity, limit); \ |
| 1251 | } else { \ | 1251 | } else { \ |
| 1252 | target = d0_data + c0; \ | 1252 | target = d0_data + c0; \ |
| 1253 | update16(target, max, intensity, limit); \ | 1253 | update16(target, max, intensity, limit); \ |
| 1254 | target = d1_data + (c0 + c1); \ | 1254 | target = d1_data + (c0 + c1); \ |
| 1255 | update16(target, max, intensity, limit); \ | 1255 | update_cb(target, max, intensity, limit); \ |
| 1256 | target = d2_data + (c0 + c2); \ | 1256 | target = d2_data + (c0 + c2); \ |
| 1257 | update_cr(target, max, intensity, limit); \ | 1257 | update_cr(target, max, intensity, limit); \ |
| 1258 | } \ | 1258 | } \ |
| @@ -1272,7 +1272,7 @@ static int name(AVFilterContext *ctx, · 13 unmodified lines | |||
| 1272 | return 0; \ | 1272 | return 0; \ |
| 1273 | } | 1273 | } |
| 1274 | 1274 | ||
| 1275 | #define AFLAT(name, update_cr, column, mirror) \ | 1275 | #define AFLAT(name, update_cb, update_cr, column, mirror) \ |
| 1276 | static int name(AVFilterContext *ctx, \ | 1276 | static int name(AVFilterContext *ctx, \ |
| 1277 | void *arg, int jobnr, \ | 1277 | void *arg, int jobnr, \ |
| 1278 | int nb_jobs) \ | 1278 | int nb_jobs) \ |
| @@ -1336,7 +1336,7 @@ static int name(AVFilterContext *ctx, · 57 unmodified lines | |||
| 1336 | update(target, max, intensity); \ | 1336 | update(target, max, intensity); \ |
| 1337 | \ | 1337 | \ |
| 1338 | target = d1 + x + d1_signed_linesize * (c0 + c1); \ | 1338 | target = d1 + x + d1_signed_linesize * (c0 + c1); \ |
| 1339 | update(target, max, intensity); \ | 1339 | update_cb(target, max, intensity); \ |
| 1340 | \ | 1340 | \ |
| 1341 | target = d2 + x + d2_signed_linesize * (c0 + c2); \ | 1341 | target = d2 + x + d2_signed_linesize * (c0 + c2); \ |
| 1342 | update_cr(target, max, intensity); \ | 1342 | update_cr(target, max, intensity); \ |
| @@ -1377,14 +1377,14 @@ static int name(AVFilterContext *ctx, · 34 unmodified lines | |||
| 1377 | target = d0_data - c0; \ | 1377 | target = d0_data - c0; \ |
| 1378 | update(target, max, intensity); \ | 1378 | update(target, max, intensity); \ |
| 1379 | target = d1_data - (c0 + c1); \ | 1379 | target = d1_data - (c0 + c1); \ |
| 1380 | update(target, max, intensity); \ | 1380 | update_cb(target, max, intensity); \ |
| 1381 | target = d2_data - (c0 + c2); \ | 1381 | target = d2_data - (c0 + c2); \ |
| 1382 | update_cr(target, max, intensity); \ | 1382 | update_cr(target, max, intensity); \ |
| 1383 | } else { \ | 1383 | } else { \ |
| 1384 | target = d0_data + c0; \ | 1384 | target = d0_data + c0; \ |
| 1385 | update(target, max, intensity); \ | 1385 | update(target, max, intensity); \ |
| 1386 | target = d1_data + (c0 + c1); \ | 1386 | target = d1_data + (c0 + c1); \ |
| 1387 | update(target, max, intensity); \ | 1387 | update_cb(target, max, intensity); \ |
| 1388 | target = d2_data + (c0 + c2); \ | 1388 | target = d2_data + (c0 + c2); \ |
| 1389 | update_cr(target, max, intensity); \ | 1389 | update_cr(target, max, intensity); \ |
| 1390 | } \ | 1390 | } \ |
| @@ -1404,23 +1404,23 @@ static int name(AVFilterContext *ctx, · 13 unmodified lines | |||
| 1404 | return 0; \ | 1404 | return 0; \ |
| 1405 | } | 1405 | } |
| 1406 | 1406 | ||
| 1407 | AFLAT16(aflat16_row, update16, 0, 0) | 1407 | AFLAT16(aflat16_row, update16, update16, 0, 0) |
| 1408 | AFLAT16(aflat16_row_mirror, update16, 0, 1) | 1408 | AFLAT16(aflat16_row_mirror, update16, update16, 0, 1) |
| 1409 | AFLAT16(aflat16_column, update16, 1, 0) | 1409 | AFLAT16(aflat16_column, update16, update16, 1, 0) |
| 1410 | AFLAT16(aflat16_column_mirror, update16, 1, 1) | 1410 | AFLAT16(aflat16_column_mirror, update16, update16, 1, 1) |
| 1411 | AFLAT16(xflat16_row, update16_cr, 0, 0) | 1411 | AFLAT16(xflat16_row, update16, update16_cr, 0, 0) |
| 1412 | AFLAT16(xflat16_row_mirror, update16_cr, 0, 1) | 1412 | AFLAT16(xflat16_row_mirror, update16, update16_cr, 0, 1) |
| 1413 | AFLAT16(xflat16_column, update16_cr, 1, 0) | 1413 | AFLAT16(xflat16_column, update16, update16_cr, 1, 0) |
| 1414 | AFLAT16(xflat16_column_mirror, update16_cr, 1, 1) | 1414 | AFLAT16(xflat16_column_mirror, update16, update16_cr, 1, 1) |
| 1415 | 1415 | ||
| 1416 | AFLAT(aflat_row, update, 0, 0) | 1416 | AFLAT(aflat_row, update, update, 0, 0) |
| 1417 | AFLAT(aflat_row_mirror, update, 0, 1) | 1417 | AFLAT(aflat_row_mirror, update, update, 0, 1) |
| 1418 | AFLAT(aflat_column, update, 1, 0) | 1418 | AFLAT(aflat_column, update, update, 1, 0) |
| 1419 | AFLAT(aflat_column_mirror, update, 1, 1) | 1419 | AFLAT(aflat_column_mirror, update, update, 1, 1) |
| 1420 | AFLAT(xflat_row, update_cr, 0, 0) | 1420 | AFLAT(xflat_row, update, update_cr, 0, 0) |
| 1421 | AFLAT(xflat_row_mirror, update_cr, 0, 1) | 1421 | AFLAT(xflat_row_mirror, update, update_cr, 0, 1) |
| 1422 | AFLAT(xflat_column, update_cr, 1, 0) | 1422 | AFLAT(xflat_column, update, update_cr, 1, 0) |
| 1423 | AFLAT(xflat_column_mirror, update_cr, 1, 1) | 1423 | AFLAT(xflat_column_mirror, update, update_cr, 1, 1) |
| 1424 | 1424 | ||
| 1425 | static av_always_inline void chroma16(WaveformContext *s, | 1425 | static av_always_inline void chroma16(WaveformContext *s, |
| 1426 | AVFrame *in, AVFrame *out, | 1426 | AVFrame *in, AVFrame *out, |