DSP software transplant
1. Compilation platform difference
X86 & VC: long 32 bits; CCS & DM642: long 40, the occupied storage is calculated according to 64 bits;
The BOOL data type is defined in VC & x86, occupying 8 bits; CCS7 & DM642 is not, it should be defined in advance;
Data type predefined data types for different applications are also defined in the CCS & DSP / BOIS system, defined in std.h and csl-stdinc.h.
2. Endian problem
DM642: Pin Tout1 / Lendian decision (1-littleEndian), set in CCS
X86 defaults to BiGendian, the default output of the VC compiler is BigenDian
3. Binary library call processing (.lib / .dll)
If the RTS.lib contains the function you want to call, do not have to be modified, otherwise delete or define your own
4. Stack processing
1) System stack: the establishment of the use of language C, the initialization of the system, interrupt service procedures;
2) Task Stack: Save / temporary variables for the environment for the task switching.
3) System of the system: for the dynamic allocation of memory
1,2 The stability test of the system is more important, 3 is very important during the algorithm transplantation, more hidden
5. Architecture of CPU
DM642: Multi-streamline architecture - ultra-standard architecture (8)
P4: Single flow waterline architecture
N = fdm642 * 8 * p / fp, P is the value between 0 to 1, indicating the utilization of the pipeline.
6. Instruction set
DM642: SIMD instruction, special instruction
P4: MMX, SSE, SSE2
7. Floating point operation
DM642 is a fixed-point DSP, floating point operations to call library functions, very consuming
P4: Internal integration of floating point copies, as long as it is simple to set up
8. TMS 320 DSP Algorithm Standard (XDAIS-Algorithm Standard)
The XDAIS-Algorithm Standard is a series of rules and principles that are developed by TI, and to implement the algorithm to provide the same number of rules and principles. The algorithms implemented by xdais are clearly defined by the following: 1) Program structure clear-resource and implementation 2) Easy to share system-level oil paintings and algorithm resources; 3) Easy to integrate the cooperation and system of TI third parties; etc.
9. Image / Video Processing Library (IMGLIB)
Imglib is an in-depth optimization (manual) image video processing function library, including a total of 32 functions of the following four categories, which is very valuable to developers who make image compression algorithms (can be used directly or based on applications And they all provide detailed implementation source.
IMG64X.lib: binary code for all functions;
IMG64X.src: Handmade parallel assembly of all functions Implementation source code;
IMG64X_SA.SRC: Linear compilation of all functions implement code;
IMAG64X-C.SRC: All functions of the C implement code;
Design of a TMS320DM642 chip H.264 encoder
1. DM642 The size of the second level cache can be configured, and the chip automatically completes the maintenance of data consistency between the two levels.
2. Lagrangian technology: Formula: D lamda * r
Lamda = 0.85 * 2 ^ (QP-12) / 3