[FFmpeg-devel] [PATCH] lavfi/avf_showspectrum: use automatic framing.
Clément Bœsch
u at pkh.me
Wed Aug 6 11:17:39 CEST 2014
On Sun, Aug 03, 2014 at 07:51:00PM +0200, Nicolas George wrote:
> The framework can ensure that each input frame has exactly
> the correct number of samples, except the last one.
>
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
> libavfilter/avf_showspectrum.c | 48 +++++++++++++++---------------------------
> 1 file changed, 17 insertions(+), 31 deletions(-)
>
>
> Forgot to remove a variable that is no longer useful.
>
>
> diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
> index e925556..c59a4f6 100644
> --- a/libavfilter/avf_showspectrum.c
> +++ b/libavfilter/avf_showspectrum.c
[...]
> @@ -284,7 +283,7 @@ static int request_frame(AVFilterLink *outlink)
> return ret;
> }
>
> -static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples, int nb_samples)
> +static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
> {
> int ret;
> AVFilterContext *ctx = inlink->dst;
> @@ -297,26 +296,21 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples, int nb
> const int nb_freq = 1 << (s->rdft_bits - 1);
> const int win_size = nb_freq << 1;
> const double w = 1. / (sqrt(nb_freq) * 32768.);
> + int h = s->channel_height; /* channel height */
I think we can guess that's the channel height without that comment
[...]
LGTM otherwise
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140806/ba2bdc03/attachment.asc>
More information about the ffmpeg-devel
mailing list