Companding (Compressing and Expanding) Data
McBSP Operation
2-4
SPRU592E
2.2 Companding (Compressing and Expanding) Data
Companding (COMpressing and exPANDing) hardware allows compression
and expansion of data in either
µ
-law or A-law format. The companding
standard employed in the United States and Japan is
µ
-law. The European
companding standard is referred to as A-law. The specifications for
µ
-law and
A-law log PCM are part of the CCITT G.711 recommendation.
A-law and
µ
-law allow 13 bits and 14 bits of dynamic range, respectively. Any
values outside this range are set to the most positive or most negative value.
Thus, for companding to work best, the data transferred to and from the
McBSP via the CPU or the DMA controller must be at least 16 bits wide.
The
µ
-law and A-law formats both encode data into 8-bit code words.
Companded data is always 8 bits wide; the appropriate word length bits
(RWDLEN1, RWDLEN2, XWDLEN1, XWDLEN2) must therefore be set to
8-bit mode. If companding is enabled and either of the frame phases does not
have an 8-bit word length, companding continues as if the word length is 8 bits.
2 illustrates the companding processes. When companding is
chosen for the transmitter, compression occurs during the process of copying
data from DXR1 to XSR1. The transmit data is encoded according to the
specified companding law (A-law or
µ
-law). When companding is chosen for
the receiver, expansion occurs during the process of copying data from RBR1
to DRR1. The receive data is decoded to 2s-complement format.
Figure 2
−
2. Companding Processes
From CPU or DMA controller
DXR1
To CPU or DMA controller
DRR1
16
16
DX
8
8
XSR1
Compress
Expand
DR
RBR1
RSR1
2.2.1 Companding Formats
For reception, the 8-bit compressed data in RBR1 is expanded to left-justified
16-bit data in DRR1. The receive sign-extension and justification mode
specified in RJUST is ignored when companding is used.
For transmission using
µ
-law compression, make sure the 14 data bits are
left-justified in DXR1, with the remaining two low-order bits filled with 0s as
shown in Figure 2
Содержание TMS320VC5509
Страница 5: ...vi This page is intentionally left blank ...
Страница 43: ...McBSP Operation 2 20 SPRU592E This page is intentionally left blank ...
Страница 105: ...SPI Operation Using the Clock Stop Mode 6 16 SPRU592E This page is intentionally left blank ...
Страница 187: ...Transmitter Configuration 8 40 SPRU592E This page is intentionally left blank ...
Страница 191: ...General Purpose I O on the McBSP Pins 9 4 SPRU592E This page is intentionally left blank ...
Страница 201: ...Emulation Power and Reset Considerations 10 10 SPRU592E ...
Страница 207: ...Data Packing Examples 11 6 SPRU592E This page is intentionally left blank ...
Страница 273: ...McBSP Register Worksheet 13 14 SPRU592E This page is intentionally left blank ...