10 static u32 mvdstdInitialized = 0;
14 static u32 *mvdstd_workbuf = NULL;
15 static size_t mvdstd_workbufsize = 0;
20 cmdbuf[0] = 0x00010082;
32 static Result mvdstdipc_Shutdown()
35 cmdbuf[0] = 0x00020000;
43 static Result mvdstdipc_cmd18()
46 cmdbuf[0] = 0x00180000;
54 static Result mvdstdipc_cmd19()
57 cmdbuf[0] = 0x00190000;
65 static Result mvdstdipc_cmd1a()
68 cmdbuf[0] = 0x001A0000;
79 cmdbuf[0] = 0x001E0044;
82 cmdbuf[3] = 0xffff8001;
84 cmdbuf[5] = (
u32)config;
119 config->
unk_x6c[(0x84-0x6c)>>2] = 0x12a;
120 config->
unk_x6c[(0x88-0x6c)>>2] = 0x199;
121 config->
unk_x6c[(0x8c-0x6c)>>2] = 0xd0;
122 config->
unk_x6c[(0x90-0x6c)>>2] = 0x64;
123 config->
unk_x6c[(0x94-0x6c)>>2] = 0x204;
124 config->
unk_x6c[(0xa8-0x6c)>>2] = 0x1;
125 config->
unk_x6c[(0x104-0x6c)>>2] = 0x1;
126 config->
unk_x6c[(0x110-0x6c)>>2] = 0x200;
127 config->
unk_x6c[(0x114-0x6c)>>2] = 0x100;
134 if(mvdstdInitialized)
return 0;
136 mvdstd_workbufsize = size;
138 mvdstd_input_type = input_type;
139 mvdstd_output_type = output_type;
147 if(mvdstd_workbuf==NULL)
return -1;
157 ret = mvdstdipc_cmd18();
160 mvdstdipc_Shutdown();
166 mvdstdInitialized = 1;
173 if(!mvdstdInitialized)
return 0;
180 mvdstdipc_Shutdown();
193 if(!mvdstdInitialized)
return 0;
194 if(config==NULL)
return -1;
200 return mvdstdipc_cmd1a();
s32 svcCloseHandle(Handle handle)
Result srvGetServiceHandle(Handle *out, const char *name)
u32 physaddr_outdata1_colorconv
u32 osConvertVirtToPhys(u32 vaddr)
u32 * getThreadCommandBuffer(void)
mvdstdTypeOutput output_type
mvdstdTypeInput input_type
Result mvdstdSetConfig(mvdstdConfig *config)
Result mvdstdProcessFrame(mvdstdConfig *config, u32 *h264_vaddr_inframe, u32 h264_inframesize, u32 h264_frameid)
u32 osConvertOldLINEARMemToNew(u32 addr)
void * linearAlloc(size_t size)
void mvdstdGenerateDefaultConfig(mvdstdConfig *config, u32 input_width, u32 input_height, u32 output_width, u32 output_height, u32 *vaddr_colorconv_indata, u32 *vaddr_outdata0, u32 *vaddr_outdata1_colorconv)
Result mvdstdInit(mvdstdMode mode, mvdstdTypeInput input_type, mvdstdTypeOutput output_type, u32 size)
u32 physaddr_colorconv_indata
s32 svcSendSyncRequest(Handle session)
void linearFree(void *mem)