[FFmpeg-devel] Matroska and PCM variants, error in encoding?

Ronald S. Bultje rsbultje at gmail.com
Mon Aug 3 13:50:06 CEST 2015


Hi,

On Mon, Aug 3, 2015 at 7:27 AM, Romeyke, Andreas <
Andreas.Romeyke at slub-dresden.de> wrote:

> And secondly, could you explain the difference between the various
> PCM-encodings? My assumpation was, that
> *  the unsigned variant are "linear PCM", because there are only positive
> quantization levels
> * the signed variant are "linear differential PCM"
> * and the float variants are A/ยต - weighted PCM?
>
> Or  I am totally wrong with this interpretation? Please, could you link me
> to an explanation?


Just different offsets and ranges. Unsigned, n bits (e.g. u8) is in the
range [0,2^^n> (e.g. for u8, the range is [0,255] or [0,256>), where
silence is 2^^n-1, e.g. 0x80 (128) for u8. Signed is in the range
[-2^^n-1,2^^n-1> (e.g. s16, the most typical variant, is [-32768,32767].
Float is in the range [-1.0, 1.0]. In both cases, 0, is silence.

We have various formats so we can represent exactly what's in a file or
output by any one particular decoder without having to convert the internal
representation into some intermediate format.

Ronald


More information about the ffmpeg-devel mailing list