1137
6437E–ATARM–23-Apr-13
SAM9M11
Figure 48-2. Multi-format Decoder and External Memory Data Flow in VLC Mode
48.3.3
Decoder Data Flow, Software Performs Entropy Decoding (RLC Mode)
In this case, the decoder software starts decoding the first picture by parsing the stream headers
(1), and by performing entropy decoding. Software then writes the following items to external
memory:
Run-length-coded (RLC) data (2)
Differential motion vectors (3)
Intra 4x4 prediction modes (in H.264) or separate DC coefficients (in MPEG-4, if the stream
is using data partitioning) (4)
Macroblock control data (5)
Last step for the software is to write the hardware control registers and to enable the hardware
(6).
Hardware decodes the picture by buffering control data for several macroblocks at a time, and
then reads appropriate amount of RLC data, differential motion vectors and intra modes depend-
ing on each macroblock type (7)–(10). Hardware will also read the reference pictures (previously
decoded pictures) as required (11). Hardware writes decoded (in-loop filtered, if H.264) output
picture to memory one macroblock at a time (12). When the picture has been fully decoded,
hardware gives an interrupt and returns to initial state.
If post-processing is enabled, one or two additional image transfer operations will take place. If
the decoded images are in display order (i.e. no picture re-ordering has been made when
encoding the sequence), and rotation is not used, PP will process the pictures in pipeline with
the decoder. Otherwise, it will first have to read the decoded image that is to be displayed next
from the memory (13), and then write back the processed image (14).
H.264 NAL
Unit Stream
ARM Processor Core
Multiformat HW
Decoder Core
Decoded
Picture Buffer
Post-Processed
Picture Buffer
External Memory
AHB Bus
1
3
4
5
(6)
7
2