Describe the function specifications of the MPEG communication interface.
[SR]: Update status and MPEG report ┐ [S-]: Update only the status ├────┐ [--]: Do not update (do not issue command)┘ │ │ 《Example of function title》 ↓ ┌──────────────┬─────────────────┬──────────────────┬────┐ │Title │Function │Function Name [SR]│No │ │Function │MPEG playback │CDC_MpPlay │20.7│ │specifications│ │ │ │ └──────────────┴─────────────────┴──────────────────┴────┘
[L]: LONG WAIT may occur ┐ [S]: SHORT WAIT may occur ├──┐ [LS] :LONG, SHORT WAIT may occur┘ │ │ 《Example of function list》 ↓ ┌────────────────────┬─────────────────┬────┐ │Decoding method │CDC_MpSetDec [LS]│20.8│ │setting │ │ │ └────────────────────┴─────────────────┴────┘
function | function name | number | |
---|---|---|---|
MPEG decoder | 20.0 | ||
Get current MPEG status information | CDC_MpGetCurStat | 20.1 | |
Obtaining the previous MPEG status information | CDC_MpGetLastStat | 20.2 | |
Obtaining MPEG interrupt factor | CDC_MpGetInt | 20.3 | |
Setting MPEG interrupt mask | CDC_MpSetIntMsk | 20.4 | |
Initializing MPEG decoder | CDC_MpInit | 20.5 | |
Setting MPEG operation mode | CDC_MpSetMode [S] | 20.6 | |
MPEG playback | CDC_MpPlay [S] | 20.7 | |
Setting the decoding method | CDC_MpSetDec [LS] | 20.8 | |
Sending decode synchronization signal | CDC_MpOutDsync [LS] | 20.9 | |
Get video timecode | CDC_MpGetTc [S] | 20.10 | |
Get audio timestamp | CDC_MpGetPts | 20.11 | |
MPEG stream | 21.0 | ||
Setting the MPEG decoder connection destination | CDC_MpSetCon [LS] | 21.1 | |
Obtaining the MPEG decoder connection destination | CDC_MpGetCon | 21.2 | |
Switching the MPEG decoder connection destination | CDC_MpChgCon [LS] | 21.3 | |
MPEG stream settings | CDC_MpSetStm [LS] | 21.4 | |
Obtain MPEG stream | CDC_MpGetStm | 21.5 | |
Get stream image size | CDC_MpGetPictSiz [S] | 21.6 | |
MPEG display screen | 22.0 | ||
Displaying images | CDC_MpDisp [S] | 22.1 | |
Setting the frame buffer window position | CDC_MpSetWinFpos | 22.2 | |
Setting the frame buffer window magnification | CDC_MpSetWinFrat | 22.3 | |
Setting the display window position | CDC_MpSetWinDpos | 22.4 | |
Setting display window size | CDC_MpSetWinDsiz | 22.5 | |
Setting the display window offset | CDC_MpSetWinDofs | 22.6 | |
Border color settings | CDC_MpSetBcolor | 22.7 | |
Setting the fade | CDC_MpSetFade [S] | 22.8 | |
Screen special effect settings | CDC_MpSetVeff [S] | 22.9 | |
MPEG frame buffer | 23.0 | ||
Extracting image data | CDC_MpGetImg [L] | 23.1 | |
Setting the image data window position | CDC_MpSetImgPos | 23.2 | |
Setting the image data window size | CDC_MpSetImgSiz | 23.3 | |
Loading from image data window | CDC_MpReadImg | 23.4 | |
Export to image data window | CDC_MpWriteImg | 23.5 | |
MPEG sector buffer | 24.0 | ||
Reading sectors from MPEG sector buffer | CDC_MpReadSct | 24.1 | |
Writing sectors to MPEG sector buffer | CDC_MpWriteSct | 24.2 |
one View table | Title | Function | Function Name [SR] | No |
one View table | Title | Function | Function Name [--] | No |
one View table | Title | Function | Function Name [S-] | No |
one View table | Title | Function | Function Name [SR] | No |
one View table | Title | Function | Function Name [SR] | No |
constant name | explanation |
---|---|
OFF | Stop...Initial value |
ON | boot |
This function waits about 3ms internally and then issues the command, ignoring the MPED and MPCM flags.
To determine whether initialization is complete, wait until 2 VSYNC or more have passed after executing this function and the MPED flag becomes 1.
one View table | Title | Function | Function Name [SR] | No |
constant name | explanation |
---|---|
CDC_MPACT_NMOV | Video playback mode...Initial value |
CDC_MPACT_NSTL | Still image playback mode |
CDC_MPACT_HMOV | High-definition video playback mode (not supported) |
CDC_MPACT_HSTL | High-definition still image playback mode |
CDC_MPACT_SBUF | MPEG sector buffer mode |
CDC_PARA_NOCHG | Do not change settings |
constant name | explanation |
---|---|
CDC_MPDEC_VSYNC | Decoding by VSYNC synchronization...Initial value |
CDC_MPDEC_HOST | Decoding with host synchronization (Sends DSYNC according to instructions from host) |
CDC_PARA_NOCHG | Do not change settings |
constant name | explanation |
---|---|
CDC_MPOUT_VDP2 | Output to VDP2...Initial value |
CDC_MPOUT_HOST | Output to host (extract from MPEG register) |
CDC_PARA_NOCHG | Do not change settings |
bit 7 6 5 4 3 2 1 0 ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │−│−│−│−│−│ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG └┬┴─┴─┴─┴─┴─┴┬┴┬┘ │ │ └─1: Non-interlace 0: Interlace │ └───1: PAL 0: NTSC └───────────────1: Do not change the settings 0: Change the settings
Frame rate is automatically set.
Execute this function when the MPEG/Video operating state is stopped.
one View table | Title | Function | Function Name [SR] | No |
plymod | :MPEG playback mode |
tmod_a | :MPEG/Audio transfer mode |
tmod_v | :MPEG/Video transfer mode |
dec_v | :MPEG/Video decoding switch |
constant name | explanation |
---|---|
CDC_MPPLY_SYNC | Synchronous playback mode...Initial value |
CDC_MPPLY_INDP | Independent playback mode |
CDC_PARA_NOCHG | Do not change settings |
constant name | explanation |
---|---|
CDC_MPTRN_AUTO | Automatic transfer mode...Initial value |
CDC_MPTRN_FORCE | Forced transfer mode |
CDC_PARA_NOCHG | Do not change settings |
Transfer mode | explanation |
---|---|
automatic transfer | When data of STD buffer size + 16KB is stored in the CD buffer, Begins transfer to VBV buffer and decoding. |
forced transfer | Transfer/decode is started regardless of the state of the CD buffer. |
Transfer mode | explanation |
---|---|
automatic transfer | When two sectors worth of data are stored in the CD buffer, transfer/decoding is started. When playing synchronously, decoding starts when the first picture of the video is displayed. |
forced transfer | Regardless of the CD buffer status or video status, Start transfer/decoding. |
constant name | explanation |
---|---|
OFF | Stop decoding |
ON | Start decoding...Initial value |
CDC_PARA_NOCHG | Do not change settings...normally specified values |
Note | The MPEG decoder begins decoding by connecting to a buffer partition. The start and end of decoding must not be controlled by executing this function. When a connection is made using the CDC_MpSetCon function or a forced switch is performed using the CDC_MpChgCon function, decoding starts regardless of this switch. (Even if decoding is stopped.) To forcefully terminate decoding, use the CDC_MpChgCon function. |
---|
one View table | Title | Function | Function Name [SR] | No |
mute | : MPEG/Audio mute (lower 8 bits are valid) |
pautim | : MPEG/Video pause timing (lower 16 bits are valid) |
frztim | : MPEG/Video freeze timing (lower 16 bits are valid) |
bit 7 6 5 4 3 2 1 0 ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │−│−│−│−│ │ │ │ Initial value: 00H Unchanged: CDC_PARA_NOCHG └┬┴─┴─┴─┴─┴┬┴┬┴┬┘ │ │ │ └─CDC_MPMUT_R 1: Mute the right channel │ │ └───CDC_MPMUT_L 1: Mute the left channel │ └─────CDC_MPMUT_DFL 1: Fixed value (must be specified) └──────────────────1: Do not change the settings 0: Change the settings
constant name | explanation |
---|---|
0000H | Pause (re-pause during pause: frame-by-frame advance)...Initial value |
0001H | Unpause |
0002H~FFFEH | Frame interval until re-pause (slow playback interval) |
FFFFH | Do not change settings (CDC_PARA_NOCHG) |
constant name | explanation |
---|---|
0000H | Freeze (refreeze while frozen)...Initial value |
0001H | Unfreeze |
0002H~FFFEH | Frame interval until refreeze (strobe playback interval) |
FFFFH | Do not change settings (CDC_PARA_NOCHG) |
Pause/Freeze is disabled in still image playback mode. (Effective in video playback mode)
If you set pause/freeze while the video is in the recovery process, it becomes WAIT.
one View table | Title | Function | Function Name [SR] | No |
Note | Specification limitations regarding picture start code (PSC) detection For video streams with picture period M≦3, PSC detection and DSYNC transmission can be synchronized except for the last 3 frames of the stream. In other words, PSC detection can be used as the DSYNC transmission timing. (PSC detection is notified by video interrupt bit8 of the MPEG interrupt factor flag.) However, in the case of the last three frames of the stream and M≧4, there is no one-to-one correspondence between PSC detection and DSYNC transmission. In this case, PSC detection cannot be used and it is necessary to obtain synchronization timing using the method (2) above. |
---|
In video playback mode, the decoding timing of the CDC_MpSetMode function must be set to host synchronization. WAIT when set to VSYNC synchronization.
When this function is executed in host synchronized video playback mode or still image playback mode, the MPCM flag becomes 1.
For details, refer to " Figure 3.1 Determination of unstable operation section ".
one View table | Title | Function | Function Name [S-] | No |
bnk | :Currently displayed frame bank number (0 to 3) |
pictyp | :Picture type |
tr | : Temporal reference (lower 8 bits are valid) |
mptc | : Time code |
constant name | explanation |
---|---|
CDC_MPPICT_I | I picture |
CDC_MPPICT_P | P picture |
CDC_MPPICT_B | B picture |
CDC_MPPICT_D | D picture |
one View table | Title | Function | Function Name [S-] | No |
one View table | Title | Function | Function Name [SR] | No |
next | :Next stream flag |
mpcon_a | : MPEG/Audio connection destination parameter |
mpcon_v | :MPEG/Video connection destination parameter |
constant name | explanation |
---|---|
CDC_MPSTF_CUR | Setting the current connection destination (first stream) |
CDC_MPSTF_NEXT | Registering the next connection destination (next stream) |
one View table | Title | Function | Function Name [S-] | No |
mpcon_a | : MPEG/Audio connection destination parameter |
mpcon_v | :MPEG/Video connection destination parameter |
constant name | explanation |
---|---|
CDC_MPSTF_CUR | Obtaining the current connection destination (first stream) |
CDC_MPSTF_NEXT | Obtaining the next connection destination (next stream) |
one View table | Title | Function | Function Name [SR] | No |
chg_a | : MPEG/Audio connection switching flag |
chg_v | :MPEG/Video connection switching flag |
clr_a | :MPEG/Audio clearing method |
clr_v | :MPEG/Video clearing method |
constant name | explanation |
---|---|
CDC_MPCOF_ABT | Disconnect (forced termination) |
CDC_MPCOF_CHG | Forced switch |
CDC_PARA_NOCHG | Do not change settings |
constant name | explanation |
---|---|
CDC_MPCLA_OFF | Do not clear (1 sector worth of data is transferred) |
CDC_MPCLA_ON | Clear one sector buffer immediately |
constant name | explanation |
---|---|
CDC_MPCLV_FRM | Instantly clear VBV and WBC (display waiting MPEG frame buffer) |
CDC_MPCLV_VBV | Clear VBV at next I or P picture start |
one View table | Title | Function | Function Name [SR] | No |
next | :Next stream flag |
mpstm_a | :MPEG/Audio stream parameters |
mpstm_v | :MPEG/Video stream parameters |
constant name | explanation |
---|---|
CDC_MPSTF_CUR | Setting the current stream (first stream) |
CDC_MPSTF_NEXT | Registering the next stream (next stream) |
one View table | Title | Function | Function Name [S-] | No |
mpstm_a | :MPEG/Audio stream parameters |
mpstm_v | :MPEG/Video stream parameters |
constant name | explanation |
---|---|
CDC_MPSTF_CUR | Get current stream (first stream) |
CDC_MPSTF_NEXT | Obtaining the next stream (next stream) |
one View table | Title | Function | Function Name [S-] | No |
siz_h | :Horizontal image size (in pixels) |
siz_v | :Vertical image size (in pixels) |
one View table | Title | Function | Function Name [SR] | No |
dspsw | :Display switch (display ON/OFF to VDP2) |
fbn | :Frame bank number (0 to 3)...Valid in still image playback mode |
constant name | explanation |
---|---|
OFF | Do not display on VDP2...Initial value |
ON | Display on VDP2 |
one View table | Title | Function | Function Name [SR] | No |
chgflg | : Setting change flag (OFF: Register the setting value, ON: Change the setting to the registered value) |
fpx | : Upper left X coordinate of frame buffer window |
fpy | : Upper left Y coordinate of the frame buffer window |
Coordinate | Normal output mode | High definition output mode | |
---|---|---|---|
NTSC | fpx | 0-351 (CDC_MPNT_NPX) | 0-703 (CDC_MPNT_HPX) |
fpy | 0-239 (CDC_MPNT_NPY) | 0-479 (CDC_MPNT_HPY) | |
PAL | fpx | 0 to 351 (CDC_MPPL_NPX) | 0-703 (CDC_MPPL_HPX) |
fpy | 0 to 287 (CDC_MPPL_NPY) | 0 to 575 (CDC_MPPL_HPY) |
one View table | Title | Function | Function Name [SR] | No |
chgflg | : Setting change flag (OFF: Register the setting value, ON: Change the setting to the registered value) |
frx | : X-direction expansion rate of frame buffer window (lower 16 bits are valid) |
fry | : Y-direction expansion rate of frame buffer window (lower 16 bits are valid) |
bit 15 13 11 9 7 5 3 1 14 12 10 8 6 4 2 0 ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │C│ │←────────A────────→│D│←─B─→│ └┬┴┬┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴┬┴─┴─┴─┘ │ │ ↑ │ ↑ │ │ Enlargement ratio │ Correction factor │ │ │ │ │ └─Correction coefficient polarity │ │ │ └────────────Keep previous value 1: Do not change settings 0: Change └──────────────Reduction flag 1: Reduce 0: Enlarge
C | D | Expansion rate | |
---|---|---|---|
Expansion Big | 0 | 0 | A+2-1/B |
0 | 1 | A+1+1/B | |
shrinkage small | 1 | 0 | 1/(A+1-1/B) |
1 | 1 | 1/(A+1/B) |
one View table | Title | Function | Function Name [SR] | No |
chgflg | : Setting change flag (OFF: Register the setting value, ON: Change the setting to the registered value) |
dpx | : Upper left X coordinate of display window |
dpy | : Upper left Y coordinate of display window |
Coordinate | Normal output mode | High definition output mode | |
---|---|---|---|
NTSC | dpx | 0-351 (CDC_MPNT_NPX) | 0-703 (CDC_MPNT_HPX) |
dpy | 0-239 (CDC_MPNT_NPY) | 0-479 (CDC_MPNT_HPY) | |
PAL | dpx | 0 to 351 (CDC_MPPL_NPX) | 0-703 (CDC_MPPL_HPX) |
dpy | 0 to 287 (CDC_MPPL_NPY) | 0-575 (CDC_MPPL_HPY) |
one View table | Title | Function | Function Name [SR] | No |
chgflg | : Setting change flag (OFF: Register the setting value, ON: Change the setting to the registered value) |
dsx | : Display window size in X direction |
dsy | : Display window size in Y direction |
Coordinate | Normal output mode | High definition output mode | |
---|---|---|---|
NTSC | dsx | 0-352 (CDC_MPNT_NSX) | 0 to 704 (CDC_MPNT_HSX) |
dsy | 0-240 (CDC_MPNT_NSY) | 0~480 (CDC_MPNT_HSY) | |
PAL | dsx | 0-352 (CDC_MPPL_NSX) | 0 to 704 (CDC_MPPL_HSX) |
dsy | 0-288 (CDC_MPPL_NSY) | 0 to 576 (CDC_MPPL_HSY) |
one View table | Title | Function | Function Name [SR] | No |
chgflg | : Setting change flag (OFF: Register the setting value, ON: Change the setting to the registered value) |
dox | : Display window X direction offset |
doy | : Display window Y-direction offset |
offset | initial value | Setting range | remarks |
---|---|---|---|
dox | 150 | 18~704 | When dox≦17, border color is displayed on the entire surface. |
doy | 38 | 8~480 | When do≦7, border color is displayed on the entire surface. |
one View table | Title | Function | Function Name [SR] | No |
Initial value: 8000H (border color output) bit 15 13 11 9 7 5 3 1 14 12 10 8 6 4 2 0 ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │ │←─B Data→│←─G Data→│←─R Data→│ └┬┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │ └──Transparent bit 1: Output border color 0: Do not output (transparent state)
one View table | Title | Function | Function Name [SR] | No |
gain_y | : Luminance signal gain (-8 to 7, initial value: 0) |
gain_c | : Color difference signal gain (-8 to 7, initial value: 0) |
Gain setting value | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Magnification | 0 | 1/8 | 2/8 | 3/8 | 4/8 | 5/8 | 6/8 | 7/8 | 1 | 9/8 | 10/8 | 10/8 | 12/8 | 12/8 | 2 | 2 |
one View table | Title | Function | Function Name [SR] | No |
one View table | Title | Function | Function Name [S-] | No |
After executing the function, we need to transfer and retrieve the data from the MPEG register.
The horizontal size dsx usually needs to be set to 5 or more (10 or more for high definition).
In high-definition still image mode, the sizes dsx and dsy must be set to integral multiples of 2.
Before executing, turn on the display switch of CDC_MpDisp function.
Please execute after the MPEG report output ready flag becomes 1.
During image data transfer, it is desirable to freeze the display window or otherwise fix it.
one View table | Title | Function | Function Name [SR] | No |
fbn | :Frame bank number (0 to 3) |
ipx | : Upper left X coordinate of image data window |
ipy | : Upper left Y coordinate of the image data window |
Coordinate | Normal output mode | High definition output mode | |
---|---|---|---|
NTSC | ipx | 0-351 (CDC_MPNT_NPX) | 0-703 (CDC_MPNT_HPX) |
ipy | 0-239 (CDC_MPNT_NPY) | 0-479 (CDC_MPNT_HPY) | |
PAL | ipx | 0-351 (CDC_MPPL_NPX) | 0-703 (CDC_MPPL_HPX) |
ipy | 0-287 (CDC_MPPL_NPY) | 0-575 (CDC_MPPL_HPY) |
one View table | Title | Function | Function Name [SR] | No |
fbn | :Frame bank number (0 to 3) |
isx | : Image data window size in X direction |
isy | : Y-direction size of image data window |
Coordinate | Normal output mode | High definition output mode | |
---|---|---|---|
NTSC | isx | 0-352 (CDC_MPNT_NSX) | 0 to 704 (CDC_MPNT_HSX) |
isy | 0-240 (CDC_MPNT_NSY) | 0~480 (CDC_MPNT_HSY) | |
PAL | isx | 0-352 (CDC_MPPL_NSX) | 0 to 704 (CDC_MPPL_HSX) |
isy | 0-288 (CDC_MPPL_NSY) | 0 to 576 (CDC_MPPL_HSY) |
one View table | Title | Function | Function Name [SR] | No |
srcfbn | : Reading source frame bank number (0 to 3) |
fln_y | : Aperture number for brightness data (Y) |
fln_cr | : Aperture number for color difference data (Cr) |
fln_cb | : Aperture number for color difference data (Cb) |
This function is valid only in still image playback mode.
Depending on the screen size, the amount of data may exceed the CD buffer capacity.
In such a case, process the data while retrieving it to the host side.
This function does not terminate even if the CD buffer becomes full. (MPED does not become 1.)
To cancel processing midway, execute the CDC_MpInit function (or soft reset using the CDC_CdInit function).
one View table | Title | Function | Function Name [SR] | No |
bn_y | : Buffer section number for brightness data (Y) |
bn_cr | :Buffer section number for color difference data (Cr) |
bn_cb | :Buffer section number for color difference data (Cb) |
dstfbn | : Destination frame bank number (0 to 3) |
clrmod | : Erase mode of sectors in buffer partition |
constant name | explanation |
---|---|
OFF | Keep (do not erase) sectors in the buffer partition |
ON | Erase sectors within the buffer partition |
This function is valid only in still image playback mode.
This function does not terminate even if the data in the buffer section becomes empty. (MPED does not become 1.) To cancel processing midway, execute the CDC_MpInit function (or soft reset using the CDC_CdInit function).
one View table | Title | Function | Function Name [SR] | No |
srcmsp | : Source MPEG sector position |
snum | : Number of sectors |
dstfln | : Aperture number |
Depending on the number of designated sectors, the amount of data may exceed the CD buffer capacity.
In such a case, process the data while retrieving it to the host side.
This function does not terminate even if the CD buffer becomes full. (MPED does not become 1.)
To cancel processing midway, execute the CDC_MpInit function (or soft reset using the CDC_CdInit function).
one View table | Title | Function | Function Name [SR] | No |
srcbn | :Buffer section number |
sp | : Sector position (CDC_SPOS_END: indicates the last sector of the partition) |
snum | : Number of sectors (CDC_SNUM_END: Indicates the number of sectors from sp to the end of the partition) |
dstmsp | : Destination MPEG sector position |
On writing, sectors of the buffer partition are erased.
This function does not terminate even if the data in the buffer section becomes empty. (MPED does not become 1.)
To cancel processing midway, execute the CDC_MpInit function (or soft reset using the CDC_CdInit function).