Skip to content

Commit

Permalink
lavfi/showspectrum: set default height to 512
Browse files Browse the repository at this point in the history
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.

Therefore, change the default height from 480 to 512.

Signed-off-by: Rudolf Polzer <divverent@xonotic.org>
  • Loading branch information
divVerent authored and richardpl committed Feb 3, 2013
1 parent 4d37d2b commit 773fc6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/filters.texi
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6019,7 +6019,7 @@ spectrum.
The filter accepts the following named parameters: The filter accepts the following named parameters:
@table @option @table @option
@item size, s @item size, s
Specify the video size for the output. Default value is @code{640x480}. Specify the video size for the output. Default value is @code{640x512}.
@item slide @item slide
Specify if the spectrum should slide along the window. Default value is Specify if the spectrum should slide along the window. Default value is
@code{0}. @code{0}.
Expand Down
4 changes: 2 additions & 2 deletions libavfilter/avf_showspectrum.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ typedef struct {
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM


static const AVOption showspectrum_options[] = { static const AVOption showspectrum_options[] = {
{ "size", "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 = "640x480"}, 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 }, { "slide", "set sliding mode", OFFSET(sliding), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS },
{ NULL }, { NULL },
}; };
Expand Down

0 comments on commit 773fc6e

Please sign in to comment.