Title: Multimedia Support
1Multimedia Support
Carnegie Mellon University Computer Science
Department Computer Architecture F01
v
- Jernej Barbic
- Overview of multimedia and processors
- Luis von Ahn
- An Example AltiVec.
2Multimedia means
Creating, displaying, playing, manipulating,
compressing, decompressing
- Still images,
- Audio,
- Video.
Each of these require different type of CPU
operations.
3Typical multimedia formats
- JPEG
- MP3
- MPEG
- MPEG-4 just released
- Decompression significantly slower than
compression - DVD
4Multimedia operations are a bottleneck
In this presentation, we focus on this
- CPUs cannot compute fast enough
- Memory/disk latencies too large
- Network bandwidth too low
- Playing 352 x 242 x 24 bit MPEG video requires a
T1 line (1.5 Mbps)
5The majority of CPU multimedia operations are
- Matrix multiplications, inner products of vectors
- FFT, DCT (discrete cosine transformation)
- JPEG, MPEG, MP3
- Multiply-accumulate instructions
- Calculating the sum of several products (e.g. in
an inner product) - Overflow problems
- Product of two 8-bit numbers is a 16-bit number
- Some multimedia architectures incorporate special
hardware to deal with overflows (saturated
arithmetics) - Single precision floating point operations
- Single precision 32-bit
- geometry 3D processing
6The majority of CPU multimedia operations are
(contd.)
- Calculating the sum of absolute differences
- MPEG compression detecting motion
- Implemented in hardware only in Alphas MVI
detecting motion
7Multimedia features of modern processors
- PS (paired single) floating point (fp) format
- Problem typical fp registers are 64-bit, but a
lot of data is 32-bit - Solution
- pack two 32-bit single precision fp numbers into
a 64-bit register - provide hardware to operate on both 32-bit
components in parallel - Many geometric operations require only single fp
precision - Useful also for non-multimedia tasks (scientific
computing) - Using PS increases performance by a factor of two
8Multimedia features of modern processors (contd.)
- SIMD (single instruction, multiple data)
- SIMD is the integer version of PS
- Divide 64-bit integer registers into eight bytes
(8 bit) or four half-words (16 bit) - Operate on this data in parallel
- Parallel arithmetic instructions
- Instructions to store, load, rearrange individual
bytes
9Multimedia architectures
- Alpha MVI (motion-video instructions)
multimedia extension - Alphas are fast and dont need extensive
multimedia additions - Fast video (MPEG) compression enabled in MVI
- Limited SIMD support, little parallel arithmetic
instructions, - but already fast without them.
- Special motion detecting instruction
- PERR Ra, Rb, Rc
- Calculates
10Multimedia architectures (contd.)
- MIPS V
- Fully support SIMD and PS
- Instructions add little to the complexity of
circuitry - MIPS MDMX
- More extensive than MIPS V
- Supports 32 media registers
- Media registers mapped to 64-bit floating point
registers - SIMD formats oct-byte (8x 8-bit), quad-half (4x
16-bit) - Saturated arithmetics avoids underflows and
overflows - Wide 192-bit accumulator to support extensive
multiply-accumulate instructions
11Multimedia architectures (contd.)
- HP
- Intel
- MMX
- Sun
- VIS (visual instruction set)
- AltiVec
12Multimedia for the PowerPC AltiVec
Branch Unit
Integer Unit
Floating-Point Unit
Vector Unit
Memory
13Multimedia for the PowerPC AltiVec
- 32 vector registers
- 162 new instructions
- 128-bit vectors
16 values
8 values
4 values
14AltiVec Vector Permute
04
08
00
1F
15
09
0A
05
1F
02
03
07
0D
0B
0E
01
VC
VB
1
0
VA
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
VT
vperm VT, VA, VB, VC
15AltiVec Other Instructions
- Vector Inner Product
- Vector Merge
- Vector Comparisons
- Multiply Accumulate
16Does This Really Help?
Time
(Times are normalized)