| @@ -45,6 +45,7 @@ enum FilterType { · 44 unmodified lines |
| 45 | 45 | COLOR, |
| 46 | 46 | ACOLOR, |
| 47 | 47 | XFLAT, |
| 48 | + YFLAT, |
| 48 | 49 | NB_FILTERS |
| 49 | 50 | }; |
| 50 | 51 | |
| @@ -158,6 +159,7 @@ static const AVOption waveform_options[] = { · 107 unmodified lines |
| 158 | 159 | { "color", NULL, 0, AV_OPT_TYPE_CONST, {.i64=COLOR}, 0, 0, FLAGS, "filter" }, |
| 159 | 160 | { "acolor", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ACOLOR}, 0, 0, FLAGS, "filter" }, |
| 160 | 161 | { "xflat", NULL, 0, AV_OPT_TYPE_CONST, {.i64=XFLAT}, 0, 0, FLAGS, "filter" }, |
| 162 | + { "yflat", NULL, 0, AV_OPT_TYPE_CONST, {.i64=YFLAT}, 0, 0, FLAGS, "filter" }, |
| 161 | 163 | { "graticule", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_GRATICULES-1, FLAGS, "graticule" }, |
| 162 | 164 | { "g", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_GRATICULES-1, FLAGS, "graticule" }, |
| 163 | 165 | { "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64=GRAT_NONE}, 0, 0, FLAGS, "graticule" }, |
| @@ -317,6 +319,7 @@ static int query_formats(AVFilterContext *ctx) · 153 unmodified lines |
| 317 | 319 | case LOWPASS: in_pix_fmts = in_lowpass_pix_fmts; break; |
| 318 | 320 | case CHROMA: |
| 319 | 321 | case XFLAT: |
| 322 | + case YFLAT: |
| 320 | 323 | case AFLAT: |
| 321 | 324 | case FLAT: in_pix_fmts = in_flat_pix_fmts; break; |
| 322 | 325 | case ACOLOR: |
| @@ -1412,6 +1415,10 @@ AFLAT16(xflat16_row, update16, update16_cr, 0, 0) · 1089 unmodified lines |
| 1412 | 1415 | AFLAT16(xflat16_row_mirror, update16, update16_cr, 0, 1) |
| 1413 | 1416 | AFLAT16(xflat16_column, update16, update16_cr, 1, 0) |
| 1414 | 1417 | AFLAT16(xflat16_column_mirror, update16, update16_cr, 1, 1) |
| 1418 | +AFLAT16(yflat16_row, update16_cr, update16_cr, 0, 0) |
| 1419 | +AFLAT16(yflat16_row_mirror, update16_cr, update16_cr, 0, 1) |
| 1420 | +AFLAT16(yflat16_column, update16_cr, update16_cr, 1, 0) |
| 1421 | +AFLAT16(yflat16_column_mirror, update16_cr, update16_cr, 1, 1) |
| 1415 | 1422 | |
| 1416 | 1423 | AFLAT(aflat_row, update, update, 0, 0) |
| 1417 | 1424 | AFLAT(aflat_row_mirror, update, update, 0, 1) |
| @@ -1421,6 +1428,10 @@ AFLAT(xflat_row, update, update_cr, 0, 0) · 3 unmodified lines |
| 1421 | 1428 | AFLAT(xflat_row_mirror, update, update_cr, 0, 1) |
| 1422 | 1429 | AFLAT(xflat_column, update, update_cr, 1, 0) |
| 1423 | 1430 | AFLAT(xflat_column_mirror, update, update_cr, 1, 1) |
| 1431 | +AFLAT(yflat_row, update_cr, update_cr, 0, 0) |
| 1432 | +AFLAT(yflat_row_mirror, update_cr, update_cr, 0, 1) |
| 1433 | +AFLAT(yflat_column, update_cr, update_cr, 1, 0) |
| 1434 | +AFLAT(yflat_column_mirror, update_cr, update_cr, 1, 1) |
| 1424 | 1435 | |
| 1425 | 1436 | static av_always_inline void chroma16(WaveformContext *s, |
| 1426 | 1437 | AVFrame *in, AVFrame *out, |
| @@ -2957,6 +2968,7 @@ static int config_input(AVFilterLink *inlink) · 1530 unmodified lines |
| 2957 | 2968 | |
| 2958 | 2969 | switch (s->filter) { |
| 2959 | 2970 | case XFLAT: |
| 2971 | + case YFLAT: |
| 2960 | 2972 | case AFLAT: s->size = 256 * 2; break; |
| 2961 | 2973 | case FLAT: s->size = 256 * 3; break; |
| 2962 | 2974 | default: s->size = 256; break; |
| @@ -3020,6 +3032,14 @@ static int config_input(AVFilterLink *inlink) · 57 unmodified lines |
| 3020 | 3032 | case 0x1016: s->waveform_slice = xflat16_row_mirror; break; |
| 3021 | 3033 | case 0x0116: s->waveform_slice = xflat16_column; break; |
| 3022 | 3034 | case 0x0016: s->waveform_slice = xflat16_row; break; |
| 3035 | + case 0x1107: s->waveform_slice = yflat_column_mirror; break; |
| 3036 | + case 0x1007: s->waveform_slice = yflat_row_mirror; break; |
| 3037 | + case 0x0107: s->waveform_slice = yflat_column; break; |
| 3038 | + case 0x0007: s->waveform_slice = yflat_row; break; |
| 3039 | + case 0x1117: s->waveform_slice = yflat16_column_mirror; break; |
| 3040 | + case 0x1017: s->waveform_slice = yflat16_row_mirror; break; |
| 3041 | + case 0x0117: s->waveform_slice = yflat16_column; break; |
| 3042 | + case 0x0017: s->waveform_slice = yflat16_row; break; |
| 3023 | 3043 | } |
| 3024 | 3044 | |
| 3025 | 3045 | s->grat_yuva_color[0] = 255; |
| @@ -3048,6 +3068,7 @@ static int config_input(AVFilterLink *inlink) · 22 unmodified lines |
| 3048 | 3068 | case CHROMA: |
| 3049 | 3069 | case AFLAT: |
| 3050 | 3070 | case XFLAT: |
| 3071 | + case YFLAT: |
| 3051 | 3072 | case FLAT: |
| 3052 | 3073 | if (s->graticule > GRAT_NONE && s->mode == 1) |
| 3053 | 3074 | s->graticulef = s->bits > 8 ? graticule16_column : graticule_column; |
| @@ -3116,6 +3137,7 @@ static int config_input(AVFilterLink *inlink) · 62 unmodified lines |
| 3116 | 3137 | } |
| 3117 | 3138 | break; |
| 3118 | 3139 | case XFLAT: |
| 3140 | + case YFLAT: |
| 3119 | 3141 | case AFLAT: |
| 3120 | 3142 | switch (s->scale) { |
| 3121 | 3143 | case DIGITAL: |
| @@ -3332,6 +3354,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 210 unmodified lines |
| 3332 | 3354 | break; |
| 3333 | 3355 | case AFLAT: |
| 3334 | 3356 | case XFLAT: |
| 3357 | + case YFLAT: |
| 3335 | 3358 | if (s->bits <= 8) { |
| 3336 | 3359 | envelope(s, out, plane, (plane + 0) % s->ncomp, s->mode ? offset_x : offset_y); |
| 3337 | 3360 | envelope(s, out, plane, (plane + 1) % s->ncomp, s->mode ? offset_x : offset_y); |