]> Chaos Git - corbenik/ctrulib.git/commitdiff
Updated the MVDSTD_Config struct. Removed config setup in mvdstdGenerateDefaultConfig...
authoryellows8 <yellows8@users.noreply.github.com>
Fri, 22 Apr 2016 16:38:44 +0000 (12:38 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Fri, 22 Apr 2016 16:38:44 +0000 (12:38 -0400)
libctru/include/3ds/services/mvd.h
libctru/source/services/mvd.c

index 54bb1c8593857a872adb3c8603eb81ba0d0e4ef8..03da64e3b5d95247e3db25bf647ca82dcb043011 100644 (file)
@@ -41,18 +41,21 @@ typedef struct {
        u32 physaddr_colorconv_unk2;     ///< Physical address used with color conversion.
        u32 physaddr_colorconv_unk3;     ///< Physical address used with color conversion.
        u32 unk_x28[0x18>>2];            ///< Unknown.
-       u32 flag_x40;                    ///< Unknown. 0x0 for colorconv, 0x1 for H.264
-       u32 unk_x44;                     ///< Unknown.
-       u32 unk_x48;                     ///< Unknown.
-       u32 outheight0;                  ///< First output width. Only set for H.264.
-       u32 outwidth0;                   ///< First output height. Only set for H.264.
+       u32 enable_cropping;             ///< Enables cropping with the input image when non-zero via the following 4 words.
+       u32 input_crop_x_pos;
+       u32 input_crop_y_pos;
+       u32 input_crop_height;
+       u32 input_crop_width;
        u32 unk_x54;                     ///< Unknown.
        MVDSTD_OutputFormat output_type;    ///< Output type.
-       u32 outwidth1;                   ///< Second output width.
-       u32 outheight1;                  ///< Second output height.
+       u32 outwidth;                   ///< Output width.
+       u32 outheight;                  ///< Output height.
        u32 physaddr_outdata0;           ///< Physical address of output data.
        u32 physaddr_outdata1_colorconv; ///< Physical address of color conversion output data.
-       u32 unk_x6c[0xa4>>2];            ///< Unknown.
+       u32 unk_x6c[0x98>>2];            ///< Unknown.
+       u32 flag_x104;                   ///< This enables using the following 4 words when non-zero.
+       u32 output_x_pos;                ///< Output X position in the output buffer.
+       u32 output_y_pos;                ///< Same as above except for the Y pos.
        u32 output_width_override;       ///< Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width.
        u32 output_height_override;      ///< Same as output_width_override except for the output height.
        u32 unk_x118;
index f25c482df3862f257d8e3e612e668276e85b40f1..b3cda18f28255b89118ed47084631b28abc5d147 100644 (file)
@@ -278,17 +278,10 @@ void mvdstdGenerateDefaultConfig(MVDSTD_Config*config, u32 input_width, u32 inpu
 
        if(mvdstd_mode==MVDMODE_COLORFORMATCONV)config->physaddr_colorconv_indata = osConvertVirtToPhys(vaddr_colorconv_indata);
 
-       if(mvdstd_mode==MVDMODE_VIDEOPROCESSING)
-       {
-               config->flag_x40 = 1;
-               config->outheight0 = output_height;
-               config->outwidth0 = output_width;
-       }
-
        config->output_type = mvdstd_output_type;
 
-       config->outwidth1 = output_width;
-       config->outheight1 = output_height;
+       config->outwidth = output_width;
+       config->outheight = output_height;
 
        config->physaddr_outdata0 = osConvertVirtToPhys(vaddr_outdata0);
        if(mvdstd_mode==MVDMODE_COLORFORMATCONV)config->physaddr_outdata1_colorconv = osConvertVirtToPhys(vaddr_outdata1_colorconv);
@@ -300,9 +293,6 @@ void mvdstdGenerateDefaultConfig(MVDSTD_Config*config, u32 input_width, u32 inpu
        config->unk_x6c[(0x90-0x6c)>>2] = 0x64;
        config->unk_x6c[(0x94-0x6c)>>2] = 0x204;
        config->unk_x6c[(0xa8-0x6c)>>2] = 0x1;
-       config->unk_x6c[(0x104-0x6c)>>2] = 0x1;
-       config->output_width_override = 0x200;
-       config->output_height_override = 0x100;
 }
 
 Result mvdstdConvertImage(MVDSTD_Config* config)