Showing the changes to libavfilter (1 of 2 files). Show all
Unified · Split
| @@ -45,6 +45,7 @@ enum FilterType { · 44 unmodified lines | |||
| 45 | COLOR, | 45 | COLOR, |
| 46 | ACOLOR, | 46 | ACOLOR, |
| 47 | XFLAT, | 47 | XFLAT, |
| 48 | YFLAT, | ||
| 48 | NB_FILTERS | 49 | NB_FILTERS |
| 49 | }; | 50 | }; |
| 50 | 51 | ||
| @@ -158,6 +159,7 @@ static const AVOption waveform_options[] = { · 107 unmodified lines | |||
| 158 | { "color", NULL, 0, AV_OPT_TYPE_CONST, {.i64=COLOR}, 0, 0, FLAGS, "filter" }, | 159 | { "color", NULL, 0, AV_OPT_TYPE_CONST, {.i64=COLOR}, 0, 0, FLAGS, "filter" }, |
| 159 | { "acolor", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ACOLOR}, 0, 0, FLAGS, "filter" }, | 160 | { "acolor", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ACOLOR}, 0, 0, FLAGS, "filter" }, |
| 160 | { "xflat", NULL, 0, AV_OPT_TYPE_CONST, {.i64=XFLAT}, 0, 0, FLAGS, "filter" }, | 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 | { "graticule", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_GRATICULES-1, FLAGS, "graticule" }, | 163 | { "graticule", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_GRATICULES-1, FLAGS, "graticule" }, |
| 162 | { "g", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_GRATICULES-1, FLAGS, "graticule" }, | 164 | { "g", "set graticule", OFFSET(graticule), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_GRATICULES-1, FLAGS, "graticule" }, |
| 163 | { "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64=GRAT_NONE}, 0, 0, FLAGS, "graticule" }, | 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 | case LOWPASS: in_pix_fmts = in_lowpass_pix_fmts; break; | 319 | case LOWPASS: in_pix_fmts = in_lowpass_pix_fmts; break; |
| 318 | case CHROMA: | 320 | case CHROMA: |
| 319 | case XFLAT: | 321 | case XFLAT: |
| 322 | case YFLAT: | ||
| 320 | case AFLAT: | 323 | case AFLAT: |
| 321 | case FLAT: in_pix_fmts = in_flat_pix_fmts; break; | 324 | case FLAT: in_pix_fmts = in_flat_pix_fmts; break; |
| 322 | case ACOLOR: | 325 | case ACOLOR: |
| @@ -1412,6 +1415,10 @@ AFLAT16(xflat16_row, update16, update16_cr, 0, 0) · 1089 unmodified lines | |||
| 1412 | AFLAT16(xflat16_row_mirror, update16, update16_cr, 0, 1) | 1415 | AFLAT16(xflat16_row_mirror, update16, update16_cr, 0, 1) |
| 1413 | AFLAT16(xflat16_column, update16, update16_cr, 1, 0) | 1416 | AFLAT16(xflat16_column, update16, update16_cr, 1, 0) |
| 1414 | AFLAT16(xflat16_column_mirror, update16, update16_cr, 1, 1) | 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 | AFLAT(aflat_row, update, update, 0, 0) | 1423 | AFLAT(aflat_row, update, update, 0, 0) |
| 1417 | AFLAT(aflat_row_mirror, update, update, 0, 1) | 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 | AFLAT(xflat_row_mirror, update, update_cr, 0, 1) | 1428 | AFLAT(xflat_row_mirror, update, update_cr, 0, 1) |
| 1422 | AFLAT(xflat_column, update, update_cr, 1, 0) | 1429 | AFLAT(xflat_column, update, update_cr, 1, 0) |
| 1423 | AFLAT(xflat_column_mirror, update, update_cr, 1, 1) | 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 | static av_always_inline void chroma16(WaveformContext *s, | 1436 | static av_always_inline void chroma16(WaveformContext *s, |
| 1426 | AVFrame *in, AVFrame *out, | 1437 | AVFrame *in, AVFrame *out, |
| @@ -2957,6 +2968,7 @@ static int config_input(AVFilterLink *inlink) · 1530 unmodified lines | |||
| 2957 | 2968 | ||
| 2958 | switch (s->filter) { | 2969 | switch (s->filter) { |
| 2959 | case XFLAT: | 2970 | case XFLAT: |
| 2971 | case YFLAT: | ||
| 2960 | case AFLAT: s->size = 256 * 2; break; | 2972 | case AFLAT: s->size = 256 * 2; break; |
| 2961 | case FLAT: s->size = 256 * 3; break; | 2973 | case FLAT: s->size = 256 * 3; break; |
| 2962 | default: s->size = 256; break; | 2974 | default: s->size = 256; break; |
| @@ -3020,6 +3032,14 @@ static int config_input(AVFilterLink *inlink) · 57 unmodified lines | |||
| 3020 | case 0x1016: s->waveform_slice = xflat16_row_mirror; break; | 3032 | case 0x1016: s->waveform_slice = xflat16_row_mirror; break; |
| 3021 | case 0x0116: s->waveform_slice = xflat16_column; break; | 3033 | case 0x0116: s->waveform_slice = xflat16_column; break; |
| 3022 | case 0x0016: s->waveform_slice = xflat16_row; break; | 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 | s->grat_yuva_color[0] = 255; | 3045 | s->grat_yuva_color[0] = 255; |
| @@ -3048,6 +3068,7 @@ static int config_input(AVFilterLink *inlink) · 22 unmodified lines | |||
| 3048 | case CHROMA: | 3068 | case CHROMA: |
| 3049 | case AFLAT: | 3069 | case AFLAT: |
| 3050 | case XFLAT: | 3070 | case XFLAT: |
| 3071 | case YFLAT: | ||
| 3051 | case FLAT: | 3072 | case FLAT: |
| 3052 | if (s->graticule > GRAT_NONE && s->mode == 1) | 3073 | if (s->graticule > GRAT_NONE && s->mode == 1) |
| 3053 | s->graticulef = s->bits > 8 ? graticule16_column : graticule_column; | 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 | break; | 3138 | break; |
| 3118 | case XFLAT: | 3139 | case XFLAT: |
| 3140 | case YFLAT: | ||
| 3119 | case AFLAT: | 3141 | case AFLAT: |
| 3120 | switch (s->scale) { | 3142 | switch (s->scale) { |
| 3121 | case DIGITAL: | 3143 | case DIGITAL: |
| @@ -3332,6 +3354,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 210 unmodified lines | |||
| 3332 | break; | 3354 | break; |
| 3333 | case AFLAT: | 3355 | case AFLAT: |
| 3334 | case XFLAT: | 3356 | case XFLAT: |
| 3357 | case YFLAT: | ||
| 3335 | if (s->bits <= 8) { | 3358 | if (s->bits <= 8) { |
| 3336 | envelope(s, out, plane, (plane + 0) % s->ncomp, s->mode ? offset_x : offset_y); | 3359 | envelope(s, out, plane, (plane + 0) % s->ncomp, s->mode ? offset_x : offset_y); |
| 3337 | envelope(s, out, plane, (plane + 1) % s->ncomp, s->mode ? offset_x : offset_y); | 3360 | envelope(s, out, plane, (plane + 1) % s->ncomp, s->mode ? offset_x : offset_y); |