* ubitux/shorthand-cleanup: lavfi/subtitles: switch to an AVOptions-based system. lavfi/pp: switch to an AVOptions-based system. lavfi/geq: switch to an AVOptions-based system. lavfi/edgedetect: switch to an AVOptions-based system. lavfi/curves: switch to an AVOptions-based system. lavfi/colormatrix: switch to an AVOptions-based system. lavfi/perms: switch to an AVOptions-based system. lavfi/ebur128: switch to an AVOptions-based system. lavfi/showspectrum: switch to an AVOptions-based system. lavfi/silencedetect: switch to an AVOptions-based system. lavfi/thumbnail: switch to an AVOptions-based system.
Unified · Split
| @@ -1117,6 +1117,8 @@ minimum detected noise duration. · 1116 unmodified lines | ||
| 1117 | 1117 | |
| 1118 | 1118 | The printed times and duration are expressed in seconds. |
| 1119 | 1119 | |
| 1120 | +The filter accepts the following options: | |
| 1121 | + | |
| 1120 | 1122 | @table @option |
| 1121 | 1123 | @item duration, d |
| 1122 | 1124 | Set silence duration until notification (default is 2 seconds). |
| @@ -2100,12 +2102,8 @@ boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chrom · 977 unmodified lines | ||
| 2100 | 2102 | |
| 2101 | 2103 | Convert color matrix. |
| 2102 | 2104 | |
| 2103 | −The filter accepts parameters as a list of @var{key}=@var{value} | |
| 2104 | −pairs, separated by ":". If the key of the first options is omitted, | |
| 2105 | −the arguments are interpreted according to the syntax | |
| 2106 | −@var{src}:@var{dst}. | |
| 2105 | +The filter accepts the following options: | |
| 2107 | 2106 | |
| 2108 | −A description of the accepted options follows: | |
| 2109 | 2107 | @table @option |
| 2110 | 2108 | @item src |
| 2111 | 2109 | @item dst |
| @@ -2371,30 +2369,15 @@ If there is no key point defined in @code{x=0}, the filter will automatically · 259 unmodified lines | ||
| 2371 | 2369 | insert a @var{(0;0)} point. In the same way, if there is no key point defined |
| 2372 | 2370 | in @code{x=1}, the filter will automatically insert a @var{(1;1)} point. |
| 2373 | 2371 | |
| 2374 | −The filter accepts parameters as a list of @var{key}=@var{value} | |
| 2375 | −pairs, separated by ":". If the key of the first options is omitted, | |
| 2376 | −the arguments are interpreted according to the syntax | |
| 2377 | −curves[=@var{preset}]. | |
| 2378 | − | |
| 2379 | −A description of the accepted parameters follows. | |
| 2372 | +The filter accepts the following options: | |
| 2380 | 2373 | |
| 2381 | 2374 | @table @option |
| 2382 | −@item red, r | |
| 2383 | −Set the key points for the red component. | |
| 2384 | −@item green, g | |
| 2385 | −Set the key points for the green component. | |
| 2386 | −@item blue, b | |
| 2387 | −Set the key points for the blue component. | |
| 2388 | −@item all | |
| 2389 | −Set the key points for all components. | |
| 2390 | −Can be used in addition to the other key points component | |
| 2391 | −options. In this case, the unset component(s) will fallback on this | |
| 2392 | −@option{all} setting. | |
| 2393 | 2375 | @item preset |
| 2394 | 2376 | Select one of the available color presets. This option can not be used in |
| 2395 | 2377 | addition to the @option{r}, @option{g}, @option{b} parameters. |
| 2396 | 2378 | Available presets are: |
| 2397 | 2379 | @table @samp |
| 2380 | +@item none | |
| 2398 | 2381 | @item color_negative |
| 2399 | 2382 | @item cross_process |
| 2400 | 2383 | @item darker |
| @@ -2406,7 +2389,18 @@ Available presets are: · 5 unmodified lines | ||
| 2406 | 2389 | @item strong_contrast |
| 2407 | 2390 | @item vintage |
| 2408 | 2391 | @end table |
| 2409 | −Default is unset. | |
| 2392 | +Default is @code{none}. | |
| 2393 | +@item red, r | |
| 2394 | +Set the key points for the red component. | |
| 2395 | +@item green, g | |
| 2396 | +Set the key points for the green component. | |
| 2397 | +@item blue, b | |
| 2398 | +Set the key points for the blue component. | |
| 2399 | +@item all | |
| 2400 | +Set the key points for all components. | |
| 2401 | +Can be used in addition to the other key points component | |
| 2402 | +options. In this case, the unset component(s) will fallback on this | |
| 2403 | +@option{all} setting. | |
| 2410 | 2404 | @end table |
| 2411 | 2405 | |
| 2412 | 2406 | To avoid some filtergraph syntax conflicts, each key points list need to be |
| @@ -3014,7 +3008,7 @@ For more information about fontconfig, check: · 601 unmodified lines | ||
| 3014 | 3008 | |
| 3015 | 3009 | Detect and draw edges. The filter uses the Canny Edge Detection algorithm. |
| 3016 | 3010 | |
| 3017 | −This filter accepts the following optional named parameters: | |
| 3011 | +The filter accepts the following options: | |
| 3018 | 3012 | |
| 3019 | 3013 | @table @option |
| 3020 | 3014 | @item low, high |
| @@ -3308,11 +3302,7 @@ For more information see: · 287 unmodified lines | ||
| 3308 | 3302 | |
| 3309 | 3303 | @section geq |
| 3310 | 3304 | |
| 3311 | −The filter takes one, two, three or four equations as parameter, separated by ':'. | |
| 3312 | −The first equation is mandatory and applies to the luma plane. The two | |
| 3313 | −following are respectively for chroma blue and chroma red planes. | |
| 3314 | − | |
| 3315 | −The filter syntax allows named parameters: | |
| 3305 | +The filter accepts the following options: | |
| 3316 | 3306 | |
| 3317 | 3307 | @table @option |
| 3318 | 3308 | @item lum_expr |
| @@ -4615,6 +4605,13 @@ Subfilters must be separated by '/' and can be disabled by prepending a '-'. · 1296 unmodified lines | ||
| 4615 | 4605 | Each subfilter and some options have a short and a long name that can be used |
| 4616 | 4606 | interchangeably, i.e. dr/dering are the same. |
| 4617 | 4607 | |
| 4608 | +The filters accept the following options: | |
| 4609 | + | |
| 4610 | +@table @option | |
| 4611 | +@item subfilters | |
| 4612 | +Set postprocessing subfilters string. | |
| 4613 | +@end table | |
| 4614 | + | |
| 4618 | 4615 | All subfilters share common options to determine their scope: |
| 4619 | 4616 | |
| 4620 | 4617 | @table @option |
| @@ -4631,12 +4628,12 @@ Do luminance filtering only (no chrominance). · 10 unmodified lines | ||
| 4631 | 4628 | Do chrominance filtering only (no luminance). |
| 4632 | 4629 | @end table |
| 4633 | 4630 | |
| 4634 | −These options can be appended after the subfilter name, separated by a ':'. | |
| 4631 | +These options can be appended after the subfilter name, separated by a '|'. | |
| 4635 | 4632 | |
| 4636 | 4633 | Available subfilters are: |
| 4637 | 4634 | |
| 4638 | 4635 | @table @option |
| 4639 | −@item hb/hdeblock[:difference[:flatness]] | |
| 4636 | +@item hb/hdeblock[|difference[|flatness]] | |
| 4640 | 4637 | Horizontal deblocking filter |
| 4641 | 4638 | @table @option |
| 4642 | 4639 | @item difference |
| @@ -4645,7 +4642,7 @@ Difference factor where higher values mean more deblocking (default: @code{32}). · 2 unmodified lines | ||
| 4645 | 4642 | Flatness threshold where lower values mean more deblocking (default: @code{39}). |
| 4646 | 4643 | @end table |
| 4647 | 4644 | |
| 4648 | −@item vb/vdeblock[:difference[:flatness]] | |
| 4645 | +@item vb/vdeblock[|difference[|flatness]] | |
| 4649 | 4646 | Vertical deblocking filter |
| 4650 | 4647 | @table @option |
| 4651 | 4648 | @item difference |
| @@ -4654,7 +4651,7 @@ Difference factor where higher values mean more deblocking (default: @code{32}). · 2 unmodified lines | ||
| 4654 | 4651 | Flatness threshold where lower values mean more deblocking (default: @code{39}). |
| 4655 | 4652 | @end table |
| 4656 | 4653 | |
| 4657 | −@item ha/hadeblock[:difference[:flatness]] | |
| 4654 | +@item ha/hadeblock[|difference[|flatness]] | |
| 4658 | 4655 | Accurate horizontal deblocking filter |
| 4659 | 4656 | @table @option |
| 4660 | 4657 | @item difference |
| @@ -4663,7 +4660,7 @@ Difference factor where higher values mean more deblocking (default: @code{32}). · 2 unmodified lines | ||
| 4663 | 4660 | Flatness threshold where lower values mean more deblocking (default: @code{39}). |
| 4664 | 4661 | @end table |
| 4665 | 4662 | |
| 4666 | −@item va/vadeblock[:difference[:flatness]] | |
| 4663 | +@item va/vadeblock[|difference[|flatness]] | |
| 4667 | 4664 | Accurate vertical deblocking filter |
| 4668 | 4665 | @table @option |
| 4669 | 4666 | @item difference |
| @@ -4687,7 +4684,7 @@ Experimental vertical deblocking filter · 17 unmodified lines | ||
| 4687 | 4684 | @item dr/dering |
| 4688 | 4685 | Deringing filter |
| 4689 | 4686 | |
| 4690 | −@item tn/tmpnoise[:threshold1[:threshold2[:threshold3]]], temporal noise reducer | |
| 4687 | +@item tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise reducer | |
| 4691 | 4688 | @table @option |
| 4692 | 4689 | @item threshold1 |
| 4693 | 4690 | larger -> stronger filtering |
| @@ -4727,7 +4724,7 @@ second line with a @code{(-1 4 2 4 -1)} filter. · 33 unmodified lines | ||
| 4727 | 4724 | Vertically applied FIR lowpass deinterlacing filter that deinterlaces the given |
| 4728 | 4725 | block by filtering all lines with a @code{(-1 2 6 2 -1)} filter. |
| 4729 | 4726 | |
| 4730 | −@item fq/forceQuant[:quantizer] | |
| 4727 | +@item fq/forceQuant[|quantizer] | |
| 4731 | 4728 | Overrides the quantizer table from the input with the constant quantizer you |
| 4732 | 4729 | specify. |
| 4733 | 4730 | @table @option |
| @@ -4736,13 +4733,13 @@ Quantizer to use · 2 unmodified lines | ||
| 4736 | 4733 | @end table |
| 4737 | 4734 | |
| 4738 | 4735 | @item de/default |
| 4739 | −Default pp filter combination (@code{hb:a,vb:a,dr:a}) | |
| 4736 | +Default pp filter combination (@code{hb|a,vb|a,dr|a}) | |
| 4740 | 4737 | |
| 4741 | 4738 | @item fa/fast |
| 4742 | −Fast pp filter combination (@code{h1:a,v1:a,dr:a}) | |
| 4739 | +Fast pp filter combination (@code{h1|a,v1|a,dr|a}) | |
| 4743 | 4740 | |
| 4744 | 4741 | @item ac |
| 4745 | −High quality pp filter combination (@code{ha:a:128:7,va:a,dr:a}) | |
| 4742 | +High quality pp filter combination (@code{ha|a|128|7,va|a,dr|a}) | |
| 4746 | 4743 | @end table |
| 4747 | 4744 | |
| 4748 | 4745 | @subsection Examples |
| @@ -4764,14 +4761,14 @@ pp=de/-al · 15 unmodified lines | ||
| 4764 | 4761 | @item |
| 4765 | 4762 | Apply default filters and temporal denoiser: |
| 4766 | 4763 | @example |
| 4767 | −pp=default/tmpnoise:1:2:3 | |
| 4764 | +pp=default/tmpnoise|1|2|3 | |
| 4768 | 4765 | @end example |
| 4769 | 4766 | |
| 4770 | 4767 | @item |
| 4771 | 4768 | Apply deblocking on luminance only, and switch vertical deblocking on or off |
| 4772 | 4769 | automatically depending on available CPU time: |
| 4773 | 4770 | @example |
| 4774 | −pp=hb:y/vb:a | |
| 4771 | +pp=hb|y/vb|a | |
| 4775 | 4772 | @end example |
| 4776 | 4773 | @end itemize |
| 4777 | 4774 | |
| @@ -5325,8 +5322,7 @@ To enable compilation of this filter you need to configure FFmpeg with · 547 unmodified lines | ||
| 5325 | 5322 | libavformat to convert the passed subtitles file to ASS (Advanced Substation |
| 5326 | 5323 | Alpha) subtitles format. |
| 5327 | 5324 | |
| 5328 | −This filter accepts the following named options, expressed as a | |
| 5329 | −sequence of @var{key}=@var{value} pairs, separated by ":". | |
| 5325 | +The filter accepts the following options: | |
| 5330 | 5326 | |
| 5331 | 5327 | @table @option |
| 5332 | 5328 | @item filename, f |
| @@ -5392,10 +5388,7 @@ Swap U & V plane. · 59 unmodified lines | ||
| 5392 | 5388 | @section thumbnail |
| 5393 | 5389 | Select the most representative frame in a given sequence of consecutive frames. |
| 5394 | 5390 | |
| 5395 | −The filter accepts parameters as a list of @var{key}=@var{value} | |
| 5396 | −pairs, separated by ":". If the key of the first options is omitted, | |
| 5397 | −the arguments are interpreted according to the syntax | |
| 5398 | −thumbnail[=@var{n}]. | |
| 5391 | +The filter accepts the following options: | |
| 5399 | 5392 | |
| 5400 | 5393 | @table @option |
| 5401 | 5394 | @item n |
| @@ -6345,11 +6338,7 @@ Set read/write permissions for the output frames. · 943 unmodified lines | ||
| 6345 | 6338 | These filters are mainly aimed at developers to test direct path in the |
| 6346 | 6339 | following filter in the filtergraph. |
| 6347 | 6340 | |
| 6348 | −The filters accept parameters as a list of @var{key}=@var{value} pairs, | |
| 6349 | −separated by ":". If the key of the first options is omitted, the argument is | |
| 6350 | −assumed to be the @var{mode}. | |
| 6351 | − | |
| 6352 | −A description of the accepted parameters follows. | |
| 6341 | +The filters accept the following options: | |
| 6353 | 6342 | |
| 6354 | 6343 | @table @option |
| 6355 | 6344 | @item mode |
| @@ -6848,7 +6837,7 @@ the momentary loudness (400 milliseconds). · 492 unmodified lines | ||
| 6848 | 6837 | More information about the Loudness Recommendation EBU R128 on |
| 6849 | 6838 | @url{http://tech.ebu.ch/loudness}. |
| 6850 | 6839 | |
| 6851 | −The filter accepts the following named parameters: | |
| 6840 | +The filter accepts the following options: | |
| 6852 | 6841 | |
| 6853 | 6842 | @table @option |
| 6854 | 6843 | |
| @@ -7036,7 +7025,8 @@ do not have exactly the same duration in the first file. · 181 unmodified lines | ||
| 7036 | 7025 | Convert input audio to a video output, representing the audio frequency |
| 7037 | 7026 | spectrum. |
| 7038 | 7027 | |
| 7039 | −The filter accepts the following named parameters: | |
| 7028 | +The filter accepts the following options: | |
| 7029 | + | |
| 7040 | 7030 | @table @option |
| 7041 | 7031 | @item size, s |
| 7042 | 7032 | Specify the video size for the output. Default value is @code{640x512}. |
| @@ -54,22 +54,6 @@ static const AVOption silencedetect_options[] = { · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 55 | AVFILTER_DEFINE_CLASS(silencedetect); |
| 56 | 56 | |
| 57 | −static av_cold int init(AVFilterContext *ctx, const char *args) | |
| 58 | −{ | |
| 59 | − int ret; | |
| 60 | − SilenceDetectContext *silence = ctx->priv; | |
| 61 | − | |
| 62 | − silence->class = &silencedetect_class; | |
| 63 | − av_opt_set_defaults(silence); | |
| 64 | − | |
| 65 | − if ((ret = av_set_options_string(silence, args, "=", ":")) < 0) | |
| 66 | − return ret; | |
| 67 | − | |
| 68 | − av_opt_free(silence); | |
| 69 | − | |
| 70 | − return 0; | |
| 71 | −} | |
| 72 | − | |
| 73 | 57 | static char *get_metadata_val(AVFrame *insamples, const char *key) |
| 74 | 58 | { |
| 75 | 59 | AVDictionaryEntry *e = av_dict_get(insamples->metadata, key, NULL, 0); |
| @@ -176,7 +160,6 @@ AVFilter avfilter_af_silencedetect = { · 100 unmodified lines | ||
| 176 | 160 | .name = "silencedetect", |
| 177 | 161 | .description = NULL_IF_CONFIG_SMALL("Detect silence."), |
| 178 | 162 | .priv_size = sizeof(SilenceDetectContext), |
| 179 | − .init = init, | |
| 180 | 163 | .query_formats = query_formats, |
| 181 | 164 | .inputs = silencedetect_inputs, |
| 182 | 165 | .outputs = silencedetect_outputs, |
| @@ -97,20 +97,6 @@ static const struct { · 96 unmodified lines | ||
| 97 | 97 | { 1, 1, 0, 0 } |
| 98 | 98 | }; |
| 99 | 99 | |
| 100 | −static av_cold int init(AVFilterContext *ctx, const char *args) | |
| 101 | −{ | |
| 102 | − ShowSpectrumContext *showspectrum = ctx->priv; | |
| 103 | − int err; | |
| 104 | − | |
| 105 | − showspectrum->class = &showspectrum_class; | |
| 106 | − av_opt_set_defaults(showspectrum); | |
| 107 | − | |
| 108 | − if ((err = av_set_options_string(showspectrum, args, "=", ":")) < 0) | |
| 109 | − return err; | |
| 110 | − | |
| 111 | − return 0; | |
| 112 | −} | |
| 113 | − | |
| 114 | 100 | static av_cold void uninit(AVFilterContext *ctx) |
| 115 | 101 | { |
| 116 | 102 | ShowSpectrumContext *showspectrum = ctx->priv; |
| @@ -505,7 +491,6 @@ static const AVFilterPad showspectrum_outputs[] = { · 388 unmodified lines | ||
| 505 | 491 | AVFilter avfilter_avf_showspectrum = { |
| 506 | 492 | .name = "showspectrum", |
| 507 | 493 | .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output."), |
| 508 | − .init = init, | |
| 509 | 494 | .uninit = uninit, |
| 510 | 495 | .query_formats = query_formats, |
| 511 | 496 | .priv_size = sizeof(ShowSpectrumContext), |
| @@ -657,18 +657,24 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 656 unmodified lines | ||
| 657 | 657 | int ret=0; |
| 658 | 658 | int anton_options = |
| 659 | 659 | !strcmp(filter->filter->name, "aformat") || |
| 660 | + !strcmp(filter->filter->name, "ass") || | |
| 660 | 661 | !strcmp(filter->filter->name, "blackframe") || |
| 661 | 662 | !strcmp(filter->filter->name, "boxblur" ) || |
| 663 | + !strcmp(filter->filter->name, "colormatrix") || | |
| 662 | 664 | !strcmp(filter->filter->name, "crop" ) || |
| 663 | 665 | !strcmp(filter->filter->name, "cropdetect") || |
| 666 | + !strcmp(filter->filter->name, "curves" ) || | |
| 664 | 667 | !strcmp(filter->filter->name, "delogo" ) || |
| 665 | 668 | !strcmp(filter->filter->name, "drawbox" ) || |
| 666 | 669 | !strcmp(filter->filter->name, "drawtext" ) || |
| 670 | + !strcmp(filter->filter->name, "ebur128" ) || | |
| 671 | + !strcmp(filter->filter->name, "edgedetect") || | |
| 667 | 672 | !strcmp(filter->filter->name, "fade" ) || |
| 668 | 673 | !strcmp(filter->filter->name, "fieldorder") || |
| 669 | 674 | !strcmp(filter->filter->name, "fps" ) || |
| 670 | 675 | !strcmp(filter->filter->name, "frei0r" ) || |
| 671 | 676 | !strcmp(filter->filter->name, "frei0r_src") || |
| 677 | + !strcmp(filter->filter->name, "geq" ) || | |
| 672 | 678 | !strcmp(filter->filter->name, "gradfun" ) || |
| 673 | 679 | !strcmp(filter->filter->name, "hqdn3d" ) || |
| 674 | 680 | !strcmp(filter->filter->name, "ocv" ) || |
| @@ -680,7 +686,14 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 5 unmodified lines | ||
| 680 | 686 | !strcmp(filter->filter->name, "pad" ) || |
| 681 | 687 | !strcmp(filter->filter->name, "format") || |
| 682 | 688 | !strcmp(filter->filter->name, "noformat") || |
| 689 | + !strcmp(filter->filter->name, "perms") || | |
| 690 | + !strcmp(filter->filter->name, "pp" ) || | |
| 691 | + !strcmp(filter->filter->name, "aperms") || | |
| 683 | 692 | !strcmp(filter->filter->name, "resample") || |
| 693 | + !strcmp(filter->filter->name, "showspectrum") || | |
| 694 | + !strcmp(filter->filter->name, "silencedetect") || | |
| 695 | + !strcmp(filter->filter->name, "subtitles") || | |
| 696 | + !strcmp(filter->filter->name, "thumbnail") || | |
| 684 | 697 | // !strcmp(filter->filter->name, "scale" ) || |
| 685 | 698 | !strcmp(filter->filter->name, "select") || |
| 686 | 699 | 0 |
| @@ -405,16 +405,9 @@ static struct hist_entry *get_histogram(void) · 404 unmodified lines | ||
| 405 | 405 | |
| 406 | 406 | static av_cold int init(AVFilterContext *ctx, const char *args) |
| 407 | 407 | { |
| 408 | − int ret; | |
| 409 | 408 | EBUR128Context *ebur128 = ctx->priv; |
| 410 | 409 | AVFilterPad pad; |
| 411 | 410 | |
| 412 | − ebur128->class = &ebur128_class; | |
| 413 | − av_opt_set_defaults(ebur128); | |
| 414 | − | |
| 415 | − if ((ret = av_set_options_string(ebur128, args, "=", ":")) < 0) | |
| 416 | − return ret; | |
| 417 | − | |
| 418 | 411 | if (ebur128->loglevel != AV_LOG_INFO && |
| 419 | 412 | ebur128->loglevel != AV_LOG_VERBOSE) { |
| 420 | 413 | if (ebur128->do_video || ebur128->metadata) |
| @@ -111,8 +111,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 110 unmodified lines | ||
| 111 | 111 | return ret; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | −static const char *const shorthand[] = { "mode", NULL }; | |
| 115 | − | |
| 116 | 114 | #if CONFIG_APERMS_FILTER |
| 117 | 115 | |
| 118 | 116 | #define aperms_options options |
| @@ -143,7 +141,6 @@ AVFilter avfilter_af_aperms = { · 24 unmodified lines | ||
| 143 | 141 | .inputs = aperms_inputs, |
| 144 | 142 | .outputs = aperms_outputs, |
| 145 | 143 | .priv_class = &aperms_class, |
| 146 | − .shorthand = shorthand, | |
| 147 | 144 | }; |
| 148 | 145 | #endif /* CONFIG_APERMS_FILTER */ |
| 149 | 146 | |
| @@ -177,6 +174,5 @@ AVFilter avfilter_vf_perms = { · 27 unmodified lines | ||
| 177 | 174 | .inputs = perms_inputs, |
| 178 | 175 | .outputs = perms_outputs, |
| 179 | 176 | .priv_class = &perms_class, |
| 180 | − .shorthand = shorthand, | |
| 181 | 177 | }; |
| 182 | 178 | #endif /* CONFIG_PERMS_FILTER */ |
| @@ -375,8 +375,6 @@ static const AVFilterPad colormatrix_outputs[] = { · 374 unmodified lines | ||
| 375 | 375 | { NULL } |
| 376 | 376 | }; |
| 377 | 377 | |
| 378 | −static const char *const shorthand[] = { "src", "dst", NULL }; | |
| 379 | − | |
| 380 | 378 | AVFilter avfilter_vf_colormatrix = { |
| 381 | 379 | .name = "colormatrix", |
| 382 | 380 | .description = NULL_IF_CONFIG_SMALL("Convert color matrix."), |
| @@ -387,5 +385,4 @@ AVFilter avfilter_vf_colormatrix = { · 4 unmodified lines | ||
| 387 | 385 | .inputs = colormatrix_inputs, |
| 388 | 386 | .outputs = colormatrix_outputs, |
| 389 | 387 | .priv_class = &colormatrix_class, |
| 390 | − .shorthand = shorthand, | |
| 391 | 388 | }; |
| @@ -59,14 +59,8 @@ typedef struct { · 58 unmodified lines | ||
| 59 | 59 | #define OFFSET(x) offsetof(CurvesContext, x) |
| 60 | 60 | #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
| 61 | 61 | static const AVOption curves_options[] = { |
| 62 | − { "red", "set red points coordinates", OFFSET(comp_points_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 63 | − { "r", "set red points coordinates", OFFSET(comp_points_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 64 | − { "green", "set green points coordinates", OFFSET(comp_points_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 65 | − { "g", "set green points coordinates", OFFSET(comp_points_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 66 | − { "blue", "set blue points coordinates", OFFSET(comp_points_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 67 | − { "b", "set blue points coordinates", OFFSET(comp_points_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 68 | − { "all", "set points coordinates for all components", OFFSET(comp_points_str_all),AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 69 | 62 | { "preset", "select a color curves preset", OFFSET(preset), AV_OPT_TYPE_INT, {.i64=PRESET_NONE}, PRESET_NONE, NB_PRESETS-1, FLAGS, "preset_name" }, |
| 63 | + { "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_NONE}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, | |
| 70 | 64 | { "color_negative", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_COLOR_NEGATIVE}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, |
| 71 | 65 | { "cross_process", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_CROSS_PROCESS}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, |
| 72 | 66 | { "darker", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_DARKER}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, |
| @@ -77,6 +71,13 @@ static const AVOption curves_options[] = { · 4 unmodified lines | ||
| 77 | 71 | { "negative", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_NEGATIVE}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, |
| 78 | 72 | { "strong_contrast", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_STRONG_CONTRAST}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, |
| 79 | 73 | { "vintage", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_VINTAGE}, INT_MIN, INT_MAX, FLAGS, "preset_name" }, |
| 74 | + { "red", "set red points coordinates", OFFSET(comp_points_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 75 | + { "r", "set red points coordinates", OFFSET(comp_points_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 76 | + { "green", "set green points coordinates", OFFSET(comp_points_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 77 | + { "g", "set green points coordinates", OFFSET(comp_points_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 78 | + { "blue", "set blue points coordinates", OFFSET(comp_points_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 79 | + { "b", "set blue points coordinates", OFFSET(comp_points_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 80 | + { "all", "set points coordinates for all components", OFFSET(comp_points_str_all),AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS }, | |
| 80 | 81 | { NULL } |
| 81 | 82 | }; |
| 82 | 83 | |
| @@ -447,8 +448,6 @@ static const AVFilterPad curves_outputs[] = { · 364 unmodified lines | ||
| 447 | 448 | { NULL } |
| 448 | 449 | }; |
| 449 | 450 | |
| 450 | −static const char *const shorthand[] = { "preset", NULL }; | |
| 451 | − | |
| 452 | 451 | AVFilter avfilter_vf_curves = { |
| 453 | 452 | .name = "curves", |
| 454 | 453 | .description = NULL_IF_CONFIG_SMALL("Adjust components curves."), |
| @@ -458,5 +457,4 @@ AVFilter avfilter_vf_curves = { · 3 unmodified lines | ||
| 458 | 457 | .inputs = curves_inputs, |
| 459 | 458 | .outputs = curves_outputs, |
| 460 | 459 | .priv_class = &curves_class, |
| 461 | − .shorthand = shorthand, | |
| 462 | 460 | }; |
| @@ -52,15 +52,8 @@ AVFILTER_DEFINE_CLASS(edgedetect); · 51 unmodified lines | ||
| 52 | 52 | |
| 53 | 53 | static av_cold int init(AVFilterContext *ctx, const char *args) |
| 54 | 54 | { |
| 55 | − int ret; | |
| 56 | 55 | EdgeDetectContext *edgedetect = ctx->priv; |
| 57 | 56 | |
| 58 | − edgedetect->class = &edgedetect_class; | |
| 59 | − av_opt_set_defaults(edgedetect); | |
| 60 | − | |
| 61 | − if ((ret = av_set_options_string(edgedetect, args, "=", ":")) < 0) | |
| 62 | − return ret; | |
| 63 | − | |
| 64 | 57 | edgedetect->low_u8 = edgedetect->low * 255. + .5; |
| 65 | 58 | edgedetect->high_u8 = edgedetect->high * 255. + .5; |
| 66 | 59 | return 0; |
| @@ -228,8 +228,6 @@ static const AVFilterPad geq_outputs[] = { · 227 unmodified lines | ||
| 228 | 228 | { NULL } |
| 229 | 229 | }; |
| 230 | 230 | |
| 231 | −static const char *const shorthand[] = { "lum_expr", "cb_expr", "cr_expr", "alpha_expr", NULL }; | |
| 232 | − | |
| 233 | 231 | AVFilter avfilter_vf_geq = { |
| 234 | 232 | .name = "geq", |
| 235 | 233 | .description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."), |
| @@ -240,5 +238,4 @@ AVFilter avfilter_vf_geq = { · 4 unmodified lines | ||
| 240 | 238 | .inputs = geq_inputs, |
| 241 | 239 | .outputs = geq_outputs, |
| 242 | 240 | .priv_class = &geq_class, |
| 243 | − .shorthand = shorthand, | |
| 244 | 241 | }; |
| @@ -31,21 +31,29 @@ · 30 unmodified lines | ||
| 31 | 31 | #include "libpostproc/postprocess.h" |
| 32 | 32 | |
| 33 | 33 | typedef struct { |
| 34 | + const AVClass *class; | |
| 35 | + char *subfilters; | |
| 34 | 36 | int mode_id; |
| 35 | 37 | pp_mode *modes[PP_QUALITY_MAX + 1]; |
| 36 | 38 | void *pp_ctx; |
| 37 | 39 | } PPFilterContext; |
| 38 | 40 | |
| 41 | +#define OFFSET(x) offsetof(PPFilterContext, x) | |
| 42 | +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM | |
| 43 | +static const AVOption pp_options[] = { | |
| 44 | + { "subfilters", "set postprocess subfilters", OFFSET(subfilters), AV_OPT_TYPE_STRING, {.str="de"}, .flags = FLAGS }, | |
| 45 | + { NULL } | |
| 46 | +}; | |
| 47 | + | |
| 48 | +AVFILTER_DEFINE_CLASS(pp); | |
| 49 | + | |
| 39 | 50 | static av_cold int pp_init(AVFilterContext *ctx, const char *args) |
| 40 | 51 | { |
| 41 | 52 | int i; |
| 42 | 53 | PPFilterContext *pp = ctx->priv; |
| 43 | 54 | |
| 44 | − if (!args || !*args) | |
| 45 | − args = "de"; | |
| 46 | − | |
| 47 | 55 | for (i = 0; i <= PP_QUALITY_MAX; i++) { |
| 48 | − pp->modes[i] = pp_get_mode_by_name_and_quality(args, i); | |
| 56 | + pp->modes[i] = pp_get_mode_by_name_and_quality(pp->subfilters, i); | |
| 49 | 57 | if (!pp->modes[i]) |
| 50 | 58 | return AVERROR_EXTERNAL; |
| 51 | 59 | } |
| @@ -171,4 +179,6 @@ AVFilter avfilter_vf_pp = { · 119 unmodified lines | ||
| 171 | 179 | .inputs = pp_inputs, |
| 172 | 180 | .outputs = pp_outputs, |
| 173 | 181 | .process_command = pp_process_command, |
| 182 | + .priv_class = &pp_class, | |
| 183 | + | |
| 174 | 184 | }; |
| @@ -201,8 +201,6 @@ static const AVFilterPad ass_outputs[] = { · 200 unmodified lines | ||
| 201 | 201 | { NULL } |
| 202 | 202 | }; |
| 203 | 203 | |
| 204 | −static const char *const shorthand[] = { "filename", NULL }; | |
| 205 | − | |
| 206 | 204 | #if CONFIG_ASS_FILTER |
| 207 | 205 | |
| 208 | 206 | static const AVOption ass_options[] = { |
| @@ -240,7 +238,6 @@ AVFilter avfilter_vf_ass = { · 31 unmodified lines | ||
| 240 | 238 | .inputs = ass_inputs, |
| 241 | 239 | .outputs = ass_outputs, |
| 242 | 240 | .priv_class = &ass_class, |
| 243 | − .shorthand = shorthand, | |
| 244 | 241 | }; |
| 245 | 242 | #endif |
| 246 | 243 | |
| @@ -365,6 +362,5 @@ AVFilter avfilter_vf_subtitles = { · 118 unmodified lines | ||
| 365 | 362 | .inputs = ass_inputs, |
| 366 | 363 | .outputs = ass_outputs, |
| 367 | 364 | .priv_class = &subtitles_class, |
| 368 | − .shorthand = shorthand, | |
| 369 | 365 | }; |
| 370 | 366 | #endif |
| @@ -227,8 +227,6 @@ static const AVFilterPad thumbnail_outputs[] = { · 226 unmodified lines | ||
| 227 | 227 | { NULL } |
| 228 | 228 | }; |
| 229 | 229 | |
| 230 | −static const char *const shorthand[] = { "n", NULL }; | |
| 231 | − | |
| 232 | 230 | AVFilter avfilter_vf_thumbnail = { |
| 233 | 231 | .name = "thumbnail", |
| 234 | 232 | .description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), |
| @@ -239,5 +237,4 @@ AVFilter avfilter_vf_thumbnail = { · 4 unmodified lines | ||
| 239 | 237 | .inputs = thumbnail_inputs, |
| 240 | 238 | .outputs = thumbnail_outputs, |
| 241 | 239 | .priv_class = &thumbnail_class, |
| 242 | − .shorthand = shorthand, | |
| 243 | 240 | }; |
| @@ -666,7 +666,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality) · 665 unmodified lines | ||
| 666 | 666 | char temp[GET_MODE_BUFFER_SIZE]; |
| 667 | 667 | char *p= temp; |
| 668 | 668 | static const char filterDelimiters[] = ",/"; |
| 669 | − static const char optionDelimiters[] = ":"; | |
| 669 | + static const char optionDelimiters[] = ":|"; | |
| 670 | 670 | struct PPMode *ppMode; |
| 671 | 671 | char *filterToken; |
| 672 | 672 | |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "libavutil/avutil.h" |
| 30 | 30 | |
| 31 | 31 | #define LIBPOSTPROC_VERSION_MAJOR 52 |
| 32 | −#define LIBPOSTPROC_VERSION_MINOR 2 | |
| 32 | +#define LIBPOSTPROC_VERSION_MINOR 3 | |
| 33 | 33 | #define LIBPOSTPROC_VERSION_MICRO 100 |
| 34 | 34 | |
| 35 | 35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ |
| @@ -52,8 +52,8 @@ do_lavfi "overlay_yuv420" "split[m],scale=88:72,pad=96:80:4:4[o2];[m]fifo[o1 · 51 unmodified lines | ||
| 52 | 52 | do_lavfi "overlay_yuv444" "split[m],scale=88:72,pad=96:80:4:4[o2];[m]fifo[o1],[o1][o2]overlay=240:16:format=yuv444" |
| 53 | 53 | do_lavfi "pad" "pad=iw*1.5:ih*1.5:iw*0.3:ih*0.2" |
| 54 | 54 | do_lavfi "pp" "pp=be/hb/vb/tn/l5/al" |
| 55 | −do_lavfi "pp2" "pp=be/fq:16/h1/v1/lb" | |
| 56 | −do_lavfi "pp3" "pp=be/fq:8/ha:128:7/va/li" | |
| 55 | +do_lavfi "pp2" "pp=be/fq|16/h1/v1/lb" | |
| 56 | +do_lavfi "pp3" "pp=be/fq|8/ha|128|7/va/li" | |
| 57 | 57 | do_lavfi "pp4" "pp=be/ci" |
| 58 | 58 | do_lavfi "pp5" "pp=md" |
| 59 | 59 | do_lavfi "pp6" "pp=be/fd" |