<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thank you Clement, your answers helped.<div><br><div><div>On May 15, 2014, at 12:05 AM, Clément Bœsch <<a href="mailto:u@pkh.me">u@pkh.me</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Wed, May 14, 2014 at 06:54:45PM -0700, Ricky Huang wrote:<br><blockquote type="cite">Hello all,<br><br>I am currently examining avf_showspectrum.c and I have a few questions that I am hoping you guys can clarify for me:<br><br>(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)<br><br>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?<br><br></blockquote><br>Yes<br><br><blockquote type="cite">2)  In plot_spectrum_column() function, the code copies some amount of the data to the rdft_data:<br><blockquote type="cite">  s->rdft_data[ch][start + n] = p[n] * s->window_func_lut[start + n];<br></blockquote><br>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?<br><br></blockquote><br>see s->filled, which represents the amount of data loaded in rdft_data. It<br>doesn't need to be cleared, the buffer content will be replaced, and when<br>it's fully replaced a new av_rdft_calc() will occur. Every sample will be<br>used only once, no accumulation.<br><br><blockquote type="cite"><br>Thanks in advance.<br></blockquote><br>-- <br>Clément B.<br>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>http://ffmpeg.org/mailman/listinfo/libav-user<br></blockquote></div><br></div></body></html>