vidify / old-audiosync

First implementation of the audio synchronization feature for Vidify, now obsolete
GNU Lesser General Public License v3.0
17 stars 3 forks source link

Only the sample array needs to be zero-padded #19

Closed marioortizmanero closed 4 years ago

marioortizmanero commented 4 years ago

Per definition, only one of the arrays from which the cross-correlation is calculated needs to be zero-padded. The other array can be zero padded too, but it's not necessary.

Currently, the cross_correlation function zero-pads both arrays. Knowing that downloading the YouTube audio is usually faster than recording the desktop, this function could zero-pad only sample (the recorded audio), and use a full-length source.

With this change, the algorithm could theoretically be twice as fast, since it would be working with twice the size of source data.