annotate xacodec.h @ 5023:f8ab420ce0e3

xvid in mencoder
author gabucino
date Sun, 10 Mar 2002 09:28:02 +0000
parents fc124f9db88e
children ebe660cf5752
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2372
0959af64c098 needs to be hacked
alex
parents:
diff changeset
1 typedef struct
0959af64c098 needs to be hacked
alex
parents:
diff changeset
2 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
3 unsigned int what;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
4 unsigned int id;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
5 int (*iq_func)(); /* init/query function */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
6 unsigned int (*dec_func)(); /* opt decode function */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
7 } XAVID_FUNC_HDR;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
8
0959af64c098 needs to be hacked
alex
parents:
diff changeset
9 #define XAVID_WHAT_NO_MORE 0x0000
0959af64c098 needs to be hacked
alex
parents:
diff changeset
10 #define XAVID_AVI_QUERY 0x0001
0959af64c098 needs to be hacked
alex
parents:
diff changeset
11 #define XAVID_QT_QUERY 0x0002
0959af64c098 needs to be hacked
alex
parents:
diff changeset
12 #define XAVID_DEC_FUNC 0x0100
0959af64c098 needs to be hacked
alex
parents:
diff changeset
13
0959af64c098 needs to be hacked
alex
parents:
diff changeset
14 #define XAVID_API_REV 0x0003
0959af64c098 needs to be hacked
alex
parents:
diff changeset
15
0959af64c098 needs to be hacked
alex
parents:
diff changeset
16 typedef struct
0959af64c098 needs to be hacked
alex
parents:
diff changeset
17 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
18 unsigned int api_rev;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
19 char *desc;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
20 char *rev;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
21 char *copyright;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
22 char *mod_author;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
23 char *authors;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
24 unsigned int num_funcs;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
25 XAVID_FUNC_HDR *funcs;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
26 } XAVID_MOD_HDR;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
27
0959af64c098 needs to be hacked
alex
parents:
diff changeset
28 /* XA CODEC .. */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
29 typedef struct
0959af64c098 needs to be hacked
alex
parents:
diff changeset
30 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
31 void *anim_hdr;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
32 unsigned long compression;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
33 unsigned long x, y;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
34 unsigned long depth;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
35 void *extra;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
36 unsigned long xapi_rev;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
37 unsigned long (*decoder)();
0959af64c098 needs to be hacked
alex
parents:
diff changeset
38 char *description;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
39 unsigned long avi_ctab_flag;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
40 unsigned long (*avi_read_ext)();
0959af64c098 needs to be hacked
alex
parents:
diff changeset
41 } XA_CODEC_HDR;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
42
0959af64c098 needs to be hacked
alex
parents:
diff changeset
43 #define CODEC_SUPPORTED 1
0959af64c098 needs to be hacked
alex
parents:
diff changeset
44 #define CODEC_UNKNOWN 0
0959af64c098 needs to be hacked
alex
parents:
diff changeset
45 #define CODEC_UNSUPPORTED -1
0959af64c098 needs to be hacked
alex
parents:
diff changeset
46
0959af64c098 needs to be hacked
alex
parents:
diff changeset
47 /* fuckin colormap structures for xanim */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
48 typedef struct
0959af64c098 needs to be hacked
alex
parents:
diff changeset
49 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
50 unsigned short red;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
51 unsigned short green;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
52 unsigned short blue;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
53 unsigned short gray;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
54 } ColorReg;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
55
0959af64c098 needs to be hacked
alex
parents:
diff changeset
56 typedef struct XA_ACTION_STRUCT
0959af64c098 needs to be hacked
alex
parents:
diff changeset
57 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
58 int type;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
59 int cmap_rev;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
60 unsigned char *data;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
61 struct XA_ACTION_STRUCT *next;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
62 struct XA_CHDR_STRUCT *chdr;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
63 ColorReg *h_cmap;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
64 unsigned int *map;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
65 struct XA_ACTION_STRUCT *next_same_chdr;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
66 } XA_ACTION;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
67
0959af64c098 needs to be hacked
alex
parents:
diff changeset
68 typedef struct XA_CHDR_STRUCT
0959af64c098 needs to be hacked
alex
parents:
diff changeset
69 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
70 unsigned int rev;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
71 ColorReg *cmap;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
72 unsigned int csize, coff;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
73 unsigned int *map;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
74 unsigned int msize, moff;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
75 struct XA_CHDR_STRUCT *next;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
76 XA_ACTION *acts;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
77 struct XA_CHDR_STRUCT *new_chdr;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
78 } XA_CHDR;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
79
0959af64c098 needs to be hacked
alex
parents:
diff changeset
80 typedef struct
0959af64c098 needs to be hacked
alex
parents:
diff changeset
81 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
82 unsigned int cmd;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
83 unsigned int skip_flag;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
84 unsigned int imagex, imagey; /* image buffer size */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
85 unsigned int imaged; /* image depth */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
86 XA_CHDR *chdr; /* color map header */
0959af64c098 needs to be hacked
alex
parents:
diff changeset
87 unsigned int map_flag;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
88 unsigned int *map;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
89 unsigned int xs, ys;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
90 unsigned int xe, ye;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
91 unsigned int special;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
92 void *extra;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
93 } XA_DEC_INFO;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
94
0959af64c098 needs to be hacked
alex
parents:
diff changeset
95 typedef struct
0959af64c098 needs to be hacked
alex
parents:
diff changeset
96 {
0959af64c098 needs to be hacked
alex
parents:
diff changeset
97 unsigned int file_num;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
98 unsigned int anim_type;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
99 unsigned int imagex;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
100 unsigned int imagey;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
101 unsigned int imagec;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
102 unsigned int imaged;
0959af64c098 needs to be hacked
alex
parents:
diff changeset
103 } XA_ANIM_HDR;
2384
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
104
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
105 // Added by A'rpi
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
106 typedef struct {
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
107 unsigned int out_fmt;
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
108 int bpp;
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
109 int width,height;
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
110 unsigned char* planes[3];
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
111 int stride[3];
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
112 unsigned char *mem;
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
113 } xacodec_image_t;
814166bee8fd 3ivx YV12 direct rendering (one lss memcpy)
arpi
parents: 2372
diff changeset
114
2563
fc124f9db88e more cleanup, warnings fixed
arpi
parents: 2384
diff changeset
115 int xacodec_init_video(sh_video_t *vidinfo, int out_format);
fc124f9db88e more cleanup, warnings fixed
arpi
parents: 2384
diff changeset
116 xacodec_image_t* xacodec_decode_frame(uint8_t *frame, int frame_size, int skip_flag);
fc124f9db88e more cleanup, warnings fixed
arpi
parents: 2384
diff changeset
117 int xacodec_exit();
fc124f9db88e more cleanup, warnings fixed
arpi
parents: 2384
diff changeset
118