Packed-Data Processing on the ’C64x
8-11
’C64x Programming Considerations
Figure 8–5. Graphical Representation of 8–bit Packs (_packX4 and _spacku4)
b_3
b_1
a_3
a_1
c
c = _packh4(b, a)
b_3
b_1
b
a
b
a
c
b_2
b_0
a_2
a_0
c = _packl4(b, a)
signed 16–bit
signed 16–bit
c = _spacku4(b, a)
sat(a_hi)
sat(b_lo)
sat(b_hi)
c
sat(a_lo)
Saturation
Unsigned 8-bit
signed 16–bit
signed 16–bit
b
a
b_2
b_0
a_3
a_2
a_1
a_0
b_3
b_2
b_1
b_0
a_3
a_2
a_1
a_0
sat(b_hi)
sat(b_lo)
sat(a_hi)
sat(a_lo)