[vlc-devel] [vlc-commits] format: add missing conversions between U8, S16N, FL32, S32N and FL64
Rafaël Carré
funman at videolan.org
Tue Dec 25 14:38:53 CET 2012
Le 21/12/2012 19:35, Rémi Denis-Courmont a écrit :
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 21 20:33:45 2012 +0200| [2c22b194c8c6c7c134db7eb35c9feef81f5fec4b] | committer: Rémi Denis-Courmont
>
> format: add missing conversions between U8, S16N, FL32, S32N and FL64
>
> And simplify accordingly.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c22b194c8c6c7c134db7eb35c9feef81f5fec4b
> ---
>
> modules/audio_filter/Modules.am | 4 +-
> modules/audio_filter/converter/format.c | 485 ++++++++++++++++++++-----------
> 2 files changed, 312 insertions(+), 177 deletions(-)
>
> Diff: http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=2c22b194c8c6c7c134db7eb35c9feef81f5fec4b
- out->i_nb_samples = block->i_nb_samples;
This removal silently breaks simple channel downmixer and probably a
number of audio filters, so this raises several problems:
- filters breaking silently (zero output to pinpoint the problem)
- the presence of 3 distinct measures of the same thing in block_t:
- i_length (in microseconds)
- i_nb_samples (in samples)
- i_buffer (in bytes)
Both length and samples can be derivated from byte size, using the PCM
codec size per sample, the number of channels, and the sampling rate.
I argue we should remove them from block.h and use a helper to calculate
them when needed, but we obviously need to know the codec format to make
the operation.
Opinons?
More information about the vlc-devel
mailing list