On Wed, May 14, 2014 at 06:54:45PM -0700, Ricky Huang wrote:
> Hello all,
> 
> I am currently examining avf_showspectrum.c and I have a few questions that I 
> am hoping you guys can clarify for me:
> 
> (This is the command I am running, BTW: ./ffmpeg -i input.mp3 -filter_complex 
> showspectrum=mode=separate:color=intensity:slide=0:scale=cbrt -y output.avi)
> 
> 1)  First it is about the output: I am assuming the plotted image has time 
> horizontally, the frequency range vertically, and the intensity of color as 
> the amplitude.  Is that correct?
> 

Yes

> 2)  In plot_spectrum_column() function, the code copies some amount of the 
> data to the rdft_data:
> >   s->rdft_data[ch][start + n] = p[n] * s->window_func_lut[start + n];
> 
> and then performs a av_rdft_calc() on the data.  But it's never clear the 
> s->rdft_data array, does this mean the plot is cumulative over time?
> 

see s->filled, which represents the amount of data loaded in rdft_data. It
doesn't need to be cleared, the buffer content will be replaced, and when
it's fully replaced a new av_rdft_calc() will occur. Every sample will be
used only once, no accumulation.

> 
> Thanks in advance.

-- 
Clément B.

Attachment: pgpJsghzt4xfn.pgp
Description: PGP signature

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to