110 likes | 196 Views
Carnegie Mellon University Computer Science Department Computer Architecture F’01. Multimedia Support. v. Jernej Barbic Overview of multimedia and processors Luis von Ahn Altivec. Multimedia means…. Still images, Audio, Video.
E N D
Carnegie Mellon University Computer Science Department Computer Architecture F’01 Multimedia Support v Jernej Barbic Overview of multimedia and processors Luis von Ahn Altivec
Multimedia means… • Still images, • Audio, • Video. Creating, displaying, playing, manipulating, compressing, decompressing Each of these require different type of CPU operations.
Typical multimedia formats • JPEG • MP3 • MPEG • MPEG-4 just released • Decompression significantly slower than compression • DVD
Multimedia 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)
The 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
The majority of CPU multimedia operations are (contd.): • Calculating the sum of absolute differences • MPEG compression: detecting motion • Implemented in hardware only in Alpha’s MVI detecting motion
Multimedia 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
Multimedia 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
Multimedia architectures • Alpha: MVI (motion-video instructions) multimedia extension • Alphas are fast and don’t 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
Multimedia 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
Multimedia architectures (contd.) • HP • Intel • MMX • Sun • VIS (visual instruction set) • AltiVec