inital commit

This commit is contained in:
2026-07-12 15:06:31 -05:00
commit 75f1616cb3
77 changed files with 75469 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
#ifndef SCE_MPEG_LIBMPEG_H
#define SCE_MPEG_LIBMPEG_H
#include "typedefs.h"
#include "sce/mpeg/defs.h"
#define SCE_MPEG_BUFFER_SIZE(w, h) ((w)*(h)*9/2 + 512 + 24*64 + 8192)
typedef enum {
sceMpegCbError = 0,
sceMpegCbNodata = 1,
sceMpegCbStopDMA = 2,
sceMpegCbRestartDMA = 3,
sceMpegCbBackground = 4,
sceMpegCbTimeStamp = 5,
sceMpegCbStr = 6,
} sceMpegCbType;
typedef enum {
sceMpegStrM2V = 0,
sceMpegStrIPU = 1,
sceMpegStrPCM = 2,
sceMpegStrADPCM = 3,
sceMpegStrDATA = 4,
} sceMpegStrType;
typedef struct {
int width;
int height;
int frameCount;
long int pts;
long int dts;
u_long flags;
long int pts2nd;
long int dts2nd;
u_long flags2nd;
void *sys;
} sceMpeg;
typedef struct {
sceMpegCbType type;
char *errMessage;
} sceMpegCbDataError;
typedef struct {
sceMpegCbType type;
long int pts;
long int dts;
} sceMpegCbDataTimeStamp;
typedef struct {
sceMpegCbType type;
u_char *header;
u_char *data;
u_int len;
long int pts;
long int dts;
} sceMpegCbDataStr;
typedef union {
sceMpegCbType type;
sceMpegCbDataError error;
sceMpegCbDataTimeStamp ts;
sceMpegCbDataStr str;
} sceMpegCbData;
typedef struct {
u_int pix[256];
} sceIpuRGB32;
typedef int (*sceMpegCallback)(sceMpeg *mp, sceMpegCbData *cbData, void *anyData);
int sceMpegReset(sceMpeg *mp);
int sceMpegCreate(sceMpeg *mp, u_char *work_area, int work_area_size);
int sceMpegDelete(sceMpeg *mp);
int sceMpegGetPicture(sceMpeg *mp, sceIpuRGB32 *rgb32, int mbcount);
int sceMpegIsEnd(sceMpeg *mp);
int sceMpegIsRefBuffEmpty(sceMpeg *mp);
void sceMpegSetDecodeMode(sceMpeg *mp, int ni, int np, int nb);
sceMpegCallback sceMpegAddCallback(sceMpeg *mp, sceMpegCbType type, sceMpegCallback callback, void *anyData);
sceMpegCallback sceMpegAddStrCallback(sceMpeg *mp, sceMpegStrType strType, int ch, sceMpegCallback callback, void *anyData);
#endif // SCE_MPEG_LIBMPEG_H