MVD service.
More...
Go to the source code of this file.
|
#define | MVD_STATUS_OK 0x17000 |
| These values are the data returned as "result-codes" by MVDSTD.
|
|
#define | MVD_STATUS_PARAMSET 0x17001 |
|
#define | MVD_STATUS_BUSY 0x17002 |
|
#define | MVD_STATUS_FRAMEREADY 0x17003 |
|
#define | MVD_STATUS_INCOMPLETEPROCESSING 0x17004 |
|
#define | MVD_STATUS_NALUPROCFLAG 0x17007 |
|
#define | MVD_CHECKNALUPROC_SUCCESS(x) (x==MVD_STATUS_OK || x==MVD_STATUS_PARAMSET || x==MVD_STATUS_FRAMEREADY || x==MVD_STATUS_INCOMPLETEPROCESSING || x==MVD_STATUS_NALUPROCFLAG) |
| This can be used to check whether mvdstdProcessVideoFrame() was successful.
|
|
#define | MVD_DEFAULT_WORKBUF_SIZE 0x9006C8 |
| Default input size for mvdstdInit(). This is what the New3DS Internet Browser uses, from the MVDSTD:CalculateWorkBufSize output.
|
|
#define | MVD_CALC_WITH_LEVEL_FLAG_NONE 0x00 |
|
#define | MVD_CALC_WITH_LEVEL_FLAG_ENABLE_CALC 0x01 |
|
#define | MVD_CALC_WITH_LEVEL_FLAG_ENABLE_EXTRA_OP 0x02 |
|
#define | MVD_CALC_WITH_LEVEL_FLAG_UNK 0x04 |
|
#define | MVD_H264_LEVEL_1_0 0x00 |
|
#define | MVD_H264_LEVEL_1_0B 0x01 |
|
#define | MVD_H264_LEVEL_1_1 0x02 |
|
#define | MVD_H264_LEVEL_1_2 0x03 |
|
#define | MVD_H264_LEVEL_1_3 0x04 |
|
#define | MVD_H264_LEVEL_2_0 0x05 |
|
#define | MVD_H264_LEVEL_2_1 0x06 |
|
#define | MVD_H264_LEVEL_2_2 0x07 |
|
#define | MVD_H264_LEVEL_3_0 0x08 |
|
#define | MVD_H264_LEVEL_3_1 0x09 |
|
#define | MVD_H264_LEVEL_3_2 0x0A |
|
#define | MVD_H264_LEVEL_4_0 0x0B |
|
#define | MVD_H264_LEVEL_4_1 0x0C |
|
#define | MVD_H264_LEVEL_4_2 0x0D |
|
#define | MVD_H264_LEVEL_5_0 0x0E |
|
#define | MVD_H264_LEVEL_5_1 0x0F |
|
#define | MVD_H264_LEVEL_5_2 0x10 |
|
|
Result | mvdstdInit (MVDSTD_Mode mode, MVDSTD_InputFormat input_type, MVDSTD_OutputFormat output_type, u32 size, MVDSTD_InitStruct *initstruct) |
| Initializes MVDSTD.
|
|
void | mvdstdExit (void) |
| Shuts down MVDSTD.
|
|
Result | mvdstdCalculateBufferSize (const MVDSTD_CalculateWorkBufSizeConfig *config, u32 *size_out) |
| Calculate working buffer size for H.264 decoding.
|
|
void | mvdstdGenerateDefaultConfig (MVDSTD_Config *config, u32 input_width, u32 input_height, u32 output_width, u32 output_height, u32 *vaddr_colorconv_indata, u32 *vaddr_outdata0, u32 *vaddr_outdata1) |
| Generates a default MVDSTD configuration.
|
|
Result | mvdstdConvertImage (MVDSTD_Config *config) |
| Run color-format-conversion.
|
|
Result | mvdstdProcessVideoFrame (void *inbuf_vaddr, size_t size, u32 flag, MVDSTD_ProcessNALUnitOut *out) |
| Processes a video frame(specifically a NAL-unit).
|
|
Result | mvdstdRenderVideoFrame (MVDSTD_Config *config, bool wait) |
| Renders the video frame.
|
|
Result | MVDSTD_SetConfig (MVDSTD_Config *config) |
| Sets the current configuration of MVDSTD.
|
|
Result | mvdstdSetupOutputBuffers (MVDSTD_OutputBuffersEntryList *entrylist, u32 bufsize) |
| New3DS Internet Browser doesn't use this.
|
|
Result | mvdstdOverrideOutputBuffers (void *cur_outdata0, void *cur_outdata1, void *new_outdata0, void *new_outdata1) |
| New3DS Internet Browser doesn't use this.
|
|
◆ MVDSTD_InputFormat
Input format.
Enumerator |
---|
MVD_INPUT_YUYV422 | YUYV422.
|
MVD_INPUT_H264 | H264.
|
◆ MVDSTD_Mode
Processing mode.
Enumerator |
---|
MVDMODE_COLORFORMATCONV | Converting color formats.
|
MVDMODE_VIDEOPROCESSING | Processing video.
|
◆ MVDSTD_OutputFormat
Output format.
Enumerator |
---|
MVD_OUTPUT_YUYV422 | YUYV422.
|
MVD_OUTPUT_BGR565 | BGR565.
|
MVD_OUTPUT_RGB565 | RGB565.
|
◆ MVDSTD_SetConfig()
Sets the current configuration of MVDSTD.
- Parameters
-
config | Pointer to the configuration to set. |
◆ mvdstdCalculateBufferSize()
Calculate working buffer size for H.264 decoding.
- Parameters
-
◆ mvdstdConvertImage()
Run color-format-conversion.
- Parameters
-
config | Pointer to the configuration to use. |
- Examples
- mvd/source/main.c.
◆ mvdstdGenerateDefaultConfig()
void mvdstdGenerateDefaultConfig |
( |
MVDSTD_Config * |
config, |
|
|
u32 |
input_width, |
|
|
u32 |
input_height, |
|
|
u32 |
output_width, |
|
|
u32 |
output_height, |
|
|
u32 * |
vaddr_colorconv_indata, |
|
|
u32 * |
vaddr_outdata0, |
|
|
u32 * |
vaddr_outdata1 |
|
) |
| |
Generates a default MVDSTD configuration.
- Parameters
-
config | Pointer to output the generated config to. |
input_width | Input width. |
input_height | Input height. |
output_width | Output width. |
output_height | Output height. |
vaddr_colorconv_indata | Virtual address of the color conversion input data. |
vaddr_outdata0 | Virtual address of the output data. |
vaddr_outdata1 | Additional virtual address for output data, only used when the output format type is value 0x00020001. |
- Examples
- mvd/source/main.c.
◆ mvdstdInit()
Initializes MVDSTD.
- Parameters
-
mode | Mode to initialize MVDSTD to. |
input_type | Type of input to process. |
output_type | Type of output to produce. |
size | Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING. |
initstruct | Optional MVDSTD_InitStruct, this should be NULL normally. |
- Examples
- mvd/source/main.c.
◆ mvdstdOverrideOutputBuffers()
Result mvdstdOverrideOutputBuffers |
( |
void * |
cur_outdata0, |
|
|
void * |
cur_outdata1, |
|
|
void * |
new_outdata0, |
|
|
void * |
new_outdata1 |
|
) |
| |
New3DS Internet Browser doesn't use this.
This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: https://www.3dbrew.org/wiki/MVDSTD:OverrideOutputBuffers
- Parameters
-
cur_outdata0 | Linearmem vaddr. The current outdata0 for this entry must match this value. |
cur_outdata1 | Linearmem vaddr. The current outdata1 for this entry must match this value. |
new_outdata0 | Linearmem vaddr. This is the new address to use for outaddr0. |
new_outdata1 | Linearmem vaddr. This is the new address to use for outaddr1. |
◆ mvdstdProcessVideoFrame()
Processes a video frame(specifically a NAL-unit).
- Parameters
-
- Examples
- mvd/source/main.c.
◆ mvdstdRenderVideoFrame()
Renders the video frame.
- Parameters
-
config | Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video. |
wait | When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY. |
- Examples
- mvd/source/main.c.
◆ mvdstdSetupOutputBuffers()
New3DS Internet Browser doesn't use this.
Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: https://www.3dbrew.org/wiki/MVDSTD:SetupOutputBuffers
- Parameters
-
entrylist | Input entrylist. |
bufsize | Size of each buffer from the entrylist. |