[FFmpeg-devel] [PATCH] lavfi/showspectrum: default height to 512

Paul B Mahol onemda at gmail.com
Fri Feb 1 17:21:58 CET 2013


On 2/1/13, Rudolf Polzer <divverent at xonotic.org> wrote:
> Only power-of-two FFTs are supported; so to get a full spectrum (that
> is, one up to Nyquist), the height must be a power of two too.
>
> Therefore, change the default height from 480 to 512.
>
> Signed-off-by: Rudolf Polzer <divverent at xonotic.org>
> ---
>  libavfilter/avf_showspectrum.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

LGTM, I plan to add per channel height too which would efectively
overdrive this option.

> diff --git a/libavfilter/avf_showspectrum.c
> b/libavfilter/avf_showspectrum.c
> index 41f7a8e..be4d800 100644
> --- a/libavfilter/avf_showspectrum.c
> +++ b/libavfilter/avf_showspectrum.c
> @@ -57,8 +57,8 @@ typedef struct {
>  #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
>
>  static const AVOption showspectrum_options[] = {
> -    { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str =
> "640x480"}, 0, 0, FLAGS },
> -    { "s",    "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str =
> "640x480"}, 0, 0, FLAGS },
> +    { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str =
> "640x512"}, 0, 0, FLAGS },
> +    { "s",    "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str =
> "640x512"}, 0, 0, FLAGS },
>      { "slide", "set sliding mode", OFFSET(sliding), AV_OPT_TYPE_INT, {.i64
> = 0}, 0, 1, FLAGS },
>      { "combined", "set combined mode", OFFSET(combined), AV_OPT_TYPE_INT,
> {.i64 = 0}, 0, 1, FLAGS },
>      { "intensity", "set intensity based coloring",
> OFFSET(intensity_colors), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS },
> --
> 1.8.1.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list