Re: [FFmpeg-devel] [PATCH 1/6] avcodec/vorbisenc: Add pre-echo detection

2017-08-23 Thread Tyler Jones
On Wed, Aug 23, 2017 at 10:11:50AM +0200, Tomas Härdin wrote: > On 2017-08-22 03:23, Tyler Jones wrote: > > + > > +/** > > + * Calculate the variance of a block of samples > > + * > > + * @param in Array of input samples > > + * @param length Number of input samples being analyzed > > + * @retu

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/vorbisenc: Add pre-echo detection

2017-08-23 Thread Tomas Härdin
On 2017-08-22 03:23, Tyler Jones wrote: + +/** + * Calculate the variance of a block of samples + * + * @param in Array of input samples + * @param length Number of input samples being analyzed + * @return The variance for the current block + */ +static float variance(const float *in, i

[FFmpeg-devel] [PATCH 1/6] avcodec/vorbisenc: Add pre-echo detection

2017-08-21 Thread Tyler Jones
The encoder will attempt to determine the existence of transient signals by applying a 4th order highpass filter to remove dominant low frequency waveforms. Frames are then split up into blocks where the variance is calculated and compared with blocks from the previous frame. A preecho is only like