Return to previous page | Return to menu | Go to next page
-
4.3 Programming notes
The following are notes on playing movies using the - Cinepak library.
- (1) Notes on creating an application
- Specify the WORK_RAM-H area (06000000H ~) for the buffer address (CPK_PARA_WORK_ADDR, CPK_PARA_BUF_ADDR in CpkCreatePara) specified when creating a movie.
If you specify a low-speed RAM area, Cinepak performance will drop.
- Cinepak library uses CPU DMA and timer. Do not use CPU DMA and timer during Cinepak operation.
- If the same sound occurs twice, it is possible that the number of calls to CPK_Task is too small or the image size is too large.
Please call CPK_Task frequently or reduce the image size.
- (2) Relationship with other libraries
- This library uses a file system, stream system, and DMA library. Please link these files.
- (3) How to remove buffer
- The size of the ring buffer has a lot to do with the sound content. If you increase the quality of the sound, you need more buffers. Specifically, please keep the minimum size of movie file header size + sound size for 0.5 seconds + 80KB. The larger the ring buffer, the lighter the Cinepak process.
-
"Example"
- Movie 1 minute, 44fps at 30fps, 16bit, stereo
Ring buffer size ≧ 32KB + 88KB + 80KB = 200KB
- Movie 1 minute, 30fps, 11KHz, 8-bit, monaural
Ring buffer size ≧ 32KB + 5.5KB + 80KB = 117.5KB
- The parameter sound memory buffer size (CPK_PARA_PCM_SIZE in CpkCreatePara) when creating a movie is the PCM quantization number for 1ch.
Specify an integer multiple of 4096. The range is 4096 * 4 to 4096 * 16.
Please specify a PCM quantization number of 1.4 seconds or more for the buffer size.
"Example"
- If the sampling frequency is 44 kHz, set the buffer size to 64K.
- If the sampling frequency is 22kHz, set the buffer size to 32K or more.
- (4) Chroma key processing
- Chrome key processing slightly increases the CPK_Task processing time.
When using - chroma key processing, set the transparent pixel invalid bit of the sprite command to 0.
- To change the range to be transparent with chroma key processing, change the range with the key out (transparent color) range setting function (CPK_SetKeyOutRange).
Return to previous page | Return to menu | Go to next page