Overview of Multimedia and Processors
160 likes | 257 Vues
This presentation delves into multimedia operations, CPU challenges, and modern processor features related to multimedia processing. It covers multimedia formats, CPU bottlenecks, common operations, and architecture advancements.
Overview of Multimedia and Processors
E N D
Presentation Transcript
Carnegie Mellon University Computer Science Department Computer Architecture F’01 Multimedia Support v Jernej Barbic Overview of multimedia and processors Luis von Ahn An Example: 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
Multimedia for the PowerPC: AltiVec Branch Unit Integer Unit Floating-Point Unit Vector Unit Memory
Multimedia for the PowerPC: AltiVec • 32 vector registers • 162 new instructions • 128-bit vectors: 16 values 8 values 4 values
AltiVec: Vector Permute 01 04 08 00 1F 15 09 0A 05 1F 02 03 07 0D 0B 0E 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
AltiVec: Other Instructions • Vector Inner Product • Vector Merge • Vector Comparisons • Multiply Accumulate
Does This Really Help? Time (Times are normalized)