Download presentation

Published byAubrey Stewart Modified over 3 years ago

1
**Jason A. Hockman McGill University 24 January 2008**

McGill University >Schulich School of Music > Music Technology > MUMT 611 FLAC free lossless audio codec Jason A. Hockman McGill University 24 January 2008

2
**Presentation Overview**

What is FLAC? Codec Format Lossless Codec Comparison FLAC free lossless audio codec

3
**Presentation Overview**

What is FLAC? Codec Format Lossless Codec Comparison FLAC free lossless audio codec

4
**Presentation Overview**

What is FLAC? Codec Format Lossless Codec Comparison FLAC free lossless audio codec

5
FLAC IS… the Free Lossless Audio Codec (chief designer: Josh Coalson) free: no cost / format is fully public / no patent lossless: PCM data incurs no distortion (verified per frame) fast: fast decode due to asymmetry seekable: sample-accurate seeking searchable: independent frames contain sync code and CRCs decoders can pick up mid-stream, and errors are limited to local frame cyclic redundance check FLAC free lossless audio codec

6
**FLAC Codec Format WAV or AIFF containers for RAW PCM audio**

FLAC (Apple Lossless) use PCM, but use compression to cut file size % FLAC free lossless audio codec

7
**FLAC Codec Format FLAC format supports: 1 - 8 channels**

bit (currently ) all standard SR <=192 kHz FLAC free lossless audio codec

8
**FLAC Codec Format architecture free lossless audio codec 1 2 3 4**

interchannel decorrelation residual coding blocking LPC Blocking - input is separated into sequential blocks Interchannel Decorrelation - encoder exploits correlation between channels Prediction and Residual Coding fall under the larger header of linear predictive coding(LPC) methods. FLAC free lossless audio codec

9
**FLAC Blocking tradeoff between required data space for**

headers and prediction accuracy Ideally block size will be large enough to not allocate too much data space to headers, but not to the point where data is negatively affected by variation in data stream FLAC free lossless audio codec

10
**FLAC Blocking tradeoff between required data space for**

headers and prediction accuracy 16 samples(min) samples(max) Ideally block size will be large enough to not allocate too much data space to headers, but not to the point where data is negatively affected by variation in data stream FLAC free lossless audio codec

11
**FLAC Blocking tradeoff between required data space for**

headers and prediction accuracy 16 samples(min) samples(max) Ideally block size will be large enough to not allocate too much data space to headers, but not to the point where data is negatively affected by variation in data stream currently block size determined by sample rate FLAC free lossless audio codec

12
**FLAC Blocking for each channel free lossless audio codec block header**

subframe for each channel Before prediction is preformed, each block is prepared one channel at a time, and is coded as a subframe, along with a header providing information about how the audio was coded FLAC free lossless audio codec

13
**Interchannel Decorrelation**

header A C C B A channel 2 header A B B B A on a frame-by-frame basis, channels are coded independently mid-side left-side right-side Here the characters A B and C are simply used to define similarity between channels Each channel is coded separately FLAC free lossless audio codec

14
**Interchannel Decorrelation**

header A C C B A channel 2 header A B B B A on a frame-by-frame basis, channels are coded independently mid-side left-side right-side Here the characters A B and C are simply used to define similarity between channels The average is taken and called the mid, and the residual of each side is coded FLAC free lossless audio codec

15
**Interchannel Decorrelation**

header A C C B A channel 2 header A B B B A on a frame-by-frame basis, channels are coded independently mid-side left-side right-side Here the characters A B and C are simply used to define similarity between channels Left side is coded and the difference given by LEFT MINUS RIGHT is coded as the side FLAC free lossless audio codec

16
**Interchannel Decorrelation**

header A C C B A channel 2 header A B B B A on a frame-by-frame basis, channels are coded independently mid-side left-side right-side Here the characters A B and C are simply used to define similarity between channels Right side is fully coded and the difference given by RIGHT MINUS LEFT FLAC free lossless audio codec

17
Prediction Approximation Residual polynomial fitting LPC difference verbatim constant FLAC approximates signal, then subtracts this approximation from the original signal to create the residual 2 methods of approximation: polynomial fitting - which is much faster but not as accurate LPC Fixed LP FIR LP FLAC free lossless audio codec

18
Prediction Approximation Residual polynomial fitting LPC difference verbatim constant FLAC approximates signal, then subtracts this approximation from the original signal to create the residual 4 modes of modeling available to lpc. Verbatim: residual is = signal, as x-hat is understood to be zero Fixed LP FIR LP FLAC free lossless audio codec

19
Prediction Approximation Residual polynomial fitting LPC difference verbatim constant FLAC approximates signal, then subtracts this approximation from the original signal to create the residual constant Fixed LP FIR LP FLAC free lossless audio codec

20
Prediction Approximation Residual polynomial fitting LPC difference verbatim constant FLAC approximates signal, then subtracts this approximation from the original signal to create the residual 2 methods of approximation: polynomial fitting - which is much faster but not as accurate LPC Fixed LP FIR LP FLAC free lossless audio codec

21
Prediction Approximation Residual polynomial fitting LPC difference verbatim constant FLAC approximates signal, then subtracts this approximation from the original signal to create the residual 2 methods of approximation: polynomial fitting - which is much faster but not as accurate LPC Fixed LP FIR LP FLAC free lossless audio codec

22
**Linear Prediction Coding**

excitation synthesis filter LPC is a source-filter analysis-synthesis method to approximate sound generation by modeling a pulse train or noise signal through an all-pole resonant filter In LPC the input sample x(n) is approximated by a linear combination of past samples of the input signal, where a is the prediction coefficient associated with the particular sample of x, and p is the order number. sound FLAC free lossless audio codec

23
**Linear Prediction Coding**

excitation synthesis filter residual: LPC is a source-filter analysis-synthesis method to approximate soound generation by modeling a pulse train or noise signal through an all-pole resonant filter In LPC the input sample x(n) is approximated by a linear combination of past samples of the input signal, where a is the prediction coefficient associated with the particular sample of x, and p is the order number. A = coefficients P = order number sound FLAC free lossless audio codec

24
**Linear Prediction Coding**

FIR Filter + - + + + FLAC free lossless audio codec

25
**Linear Prediction Coding**

FIR Filter + - + + + A are prediction coefficients Z-transform FLAC free lossless audio codec

26
**Linear Prediction Coding**

FIR Filter + - + + + Z-transform FLAC free lossless audio codec

27
**Linear Prediction Coding**

estimating LPC parameters residual energy, Where alpha-k are values that minimize E FLAC free lossless audio codec

28
**Linear Prediction Coding**

estimating LPC parameters residual energy, E is minimized, for (E)nergy = Sum of squared error across the samples within the frame Solving the partial derivative of energy function E with respect to variable a-i = 0 for i = 1 to model order p. gives us: FLAC free lossless audio codec

29
**Linear Prediction Coding**

estimating LPC parameters residual energy, E is minimized, for Solving the partial derivative of energy function E with respect to variable a-i = 0 for i = 1 to model order p. gives us: Where alpha-k are values that minimize E yielding: FLAC free lossless audio codec

30
**Linear Prediction Coding**

estimating LPC parameters substitution: FEE EVEN FUNCTION! Resolved through the levitson-durbin recursion FLAC free lossless audio codec

31
**Linear Prediction Coding**

estimating LPC parameters substitution: FEE EVEN FUNCTION! Resolved through the levitson-durbin recursion FLAC free lossless audio codec

32
**Linear Prediction Coding**

estimating LPC parameters substitution: ACF: FEE EVEN FUNCTION! Resolved through the levitson-durbin recursion FLAC free lossless audio codec

33
**Linear Prediction Coding**

estimating LPC parameters substitution: ACF: FEE EVEN FUNCTION! Resolved through the levitson-durbin recursion follows: FLAC free lossless audio codec

34
**Linear Prediction Coding**

estimating LPC parameters substitution: ACF: FEE EVEN FUNCTION! Resolved through the levitson-durbin recursion follows: FLAC free lossless audio codec

35
**Linear Prediction Coding**

estimating LPC parameters optimal coefficients minimize residual energy higher order provides closer approximation tradeoff between spectral accuracy and timely output Where alpha-k are values that minimize E (Zolzer et. al 2002) FLAC free lossless audio codec

36
Comparison FLAC and WavPack are only lossless compression codec that are open-source available via no license cost is streamable is seekable Where alpha-k are values that minimize E FLAC free lossless audio codec

37
**FLAC Comparison free lossless audio codec**

compression versus encode speed compression versus decode speed (Coalson, 2007) FLAC free lossless audio codec

38
**FLAC Comparison free lossless audio codec comp versus encode speed**

comp versus decode speed ( 2007) FLAC free lossless audio codec

39
References Ariakis, D. WavPack, 2007, (23 January 2008) Coalson, J. FLAC. Free Lossless Audio Codec, 2007, (22 January 2008). Keiler, F., D. Arfib, and U. Zolzer Efficient linear prediction for digital audio effects. In Proc. DAFX-00 Conference on Digital Audio Effects, Verona. December 2000. Zolzer, U DAFx - Digital audio effects. New York: John Wiley and Sons Where alpha-k are values that minimize E FLAC free lossless audio codec

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google