13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Audio Priming - Handling Encoder Delay in AACThe Timing and Synchronization ProblemFigure G-1 (page 422) gives an example of a typical encoded AAC audio bitstream. The upper portion of theillustration represents the AAC encoded domain with equal-sized AAC packets, the lower portion representsthe PCM sample domain:Figure G-1AAC encoded audioAccess Unit1024 SamplesPrimingSource AudioRemainderThe source audio to be encoded, shown as the red waveform, is 5389 samples long. You can see how it isrepresented with the blue priming and remainder samples against the fixed size access units–AAC packets–drawnabove it.This data will be represented in 8 AAC packets, where each packet represents 1024 audio samples. The totalduration represented by these 8 AAC packets is 8192 audio samples (note that this is longer than the durationof the source audio).The result breaks down into the following values:2112 priming samples at the start—Required to correctly encode the start of the audio.5389 samples of actual audio.691 remainder samples—Required to pad out to the AAC packet size.Therefore, to correctly extract the original 5389 samples of source audio, the first 2112 samples of priming andthe last 691 samples of the remainder must be removed.8192 - 2112 - 691 = 5389 original source samples.The Timing and Synchronization ProblemIf an audio playback system attempting to synchronize AAC encoded audio and video does not compensatefor encoder delay (that is, does not discard the silent priming samples), the audio and video will be out ofsynchronization. In the example above, it will be off by 2112 samples—The audio will be 2112 samples behindthe video because the first real audio sample is actually the 2113th sample after the beginning of the decodedPCM data.<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.422

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!