Difference between revisions of "MVD Services"
Line 1: | Line 1: | ||
− | This is for using the MVD hardware video decoder(unknown whether MVD can do more than decoding) + hardware color-format converter. The [[New_3DS]] [[Internet Browser]] uses mvd:STD for video decoding. | + | This is for using the MVD hardware video decoder(unknown whether MVD can do more than decoding) + hardware color-format converter. The [[New_3DS]] [[Internet Browser]] uses mvd:STD for video decoding + YUV2RGB for decoded MJPEG frames. |
See [[Internet_Browser|here]] for the supported hardware decoder video codecs. | See [[Internet_Browser|here]] for the supported hardware decoder video codecs. |
Revision as of 21:01, 16 November 2014
This is for using the MVD hardware video decoder(unknown whether MVD can do more than decoding) + hardware color-format converter. The New_3DS Internet Browser uses mvd:STD for video decoding + YUV2RGB for decoded MJPEG frames.
See here for the supported hardware decoder video codecs.
A maximum of 4 sessions can be opened at a time, for all of these services combined.
MVD Service "mvd:STD"
Command Header | Available since system version | Description |
---|---|---|
0x00010082 | Initialize | |
0x00020000 | Shutdown | |
0x00030300 | CalculateWorkBufSize | |
0x00050100 | (u8 unk0, u8 unk1, u8 unk2, u8 unk3) SKATER uses value 0 for all of these params. | |
0x00070000 | ||
0x00080142 | DecodeFrame | |
0x00090042 | (u8 unkval, val0, kprocess handle) This writes some state beginning at cmdreply[2]. unkval is normally 0, when preparing to shutdown MVD unkval is 1. | |
0x000A0000 | ||
0x00180000 | ||
0x00190000 | ||
0x001A0000 | Used when doing MJPEG decoding? | |
0x001B0040 | (u8 unknown) SKATER uses value 1 for this. | |
0x001C0000 | ||
0x001D0042 | GetConfig | |
0x001E0044 | SetConfig |
This one uses the I/O mapped @ 0x10207000.
This service is used by the New_3DS Internet Browser.
Note that the hardware doesn't actually handle MJPEG, for that the hardware only does color format conversion. The input color format for that(with SKATER at least) is yuyv422, and the output color format is RGB565(this is probably determined by the configuration).
By default MVD does(?) various post-processing with the output image, this is controlled by the configuration. This post-processing isn't done at all in certain cases. By default MVD will align the output frame width to 512, by writing zero-value pixels.
Initialization procedures:
- MJPEG: Use command MVDSTD:Initialize with bufsize=1, then command 0x00180000.
- H.264: If needed, use MVDSTD:CalculateWorkBufSize. Then use MVDSTD:Initialize. Then use commands 0x00050100, 0x00180000, and 0x001B0040. Then use MVDSTD:DecodeFrame 3 times with unknown input data. Use command 0x000A0000, then use MVDSTD:DecodeFrame with unknown data.
Shutdown procedures:
- MJPEG: just use command 0x00190000, then MVDSTD:Shutdown.
- H.264: Use command 0x00090042 in a loop, waiting for it to return a retval that isn't 0x00017002. Then use commands 0x001C0000, 0x00190000, and 0x00070000. Then use MVDSTD:Shutdown.
MVD Service "l2b:u"
This one uses the I/O mapped @ 0x10130000.
MVD Service "l2b2:u"
This uses the same command-handler as "l2b:u".
MVD Service "y2r2:u"
This one uses the I/O mapped @ 0x10102000.
MVD Result-codes
Result-code | Internal MVD status-code | Description |
---|---|---|
0xD961710F | Invalid configuration, mainly when setting the config. |