[vlc-devel] [vlc-commits] format: add missing conversions between U8, S16N, FL32, S32N and FL64

Rémi Denis-Courmont remi at remlab.net
Tue Dec 25 17:56:14 CET 2012

On Tue, 25 Dec 2012 14:38:53 +0100, Rafaël Carré <funman at videolan.org>
> - filters breaking silently (zero output to pinpoint the problem)

Feel free to build a tests suite. I don't have the time nor the

> - 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_length is not specific to linear audio, so it cannot be removed so
easily. And the proper conversion from samples to length date_t or
something similar (yes, I know it is not always used)...

For samples, I don't mind removing it *if* they are only used for decoded
audio. However I doubt that is the case, and a lot of divisions with
variable divisor would be added :-( I won't do it myself. 

In this particular case, I think it would be far simpler to copy the
samples and length in the 9 indirect conversions.

> 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.

Rémi Denis-Courmont
Sent from my collocated server

More information about the vlc-devel mailing list