Mercurial > mplayer.hg
annotate xacodec.c @ 7137:9a44c38d388c
Fixed some breakages of single-buffer rendering of tdfx
author | mark |
---|---|
date | Thu, 29 Aug 2002 12:04:21 +0000 |
parents | b1397d95471f |
children |
rev | line source |
---|---|
2372 | 1 /* |
2388 | 2 xacodec.c -- XAnim Video Codec DLL support |
2372 | 3 |
4 (C) 2001 Alex Beregszaszi <alex@naxine.org> | |
2388 | 5 and Arpad Gereoffy <arpi@thot.banki.hu> |
2372 | 6 */ |
7 | |
8 #include <stdio.h> | |
2376 | 9 #include <stdlib.h> |
2659 | 10 #include <string.h> /* strerror */ |
2376 | 11 |
5282
a5e0d4c469e0
dlfcn.h shouldn't be included if XANIM support disabled
arpi
parents:
4699
diff
changeset
|
12 #include "config.h" |
a5e0d4c469e0
dlfcn.h shouldn't be included if XANIM support disabled
arpi
parents:
4699
diff
changeset
|
13 |
a5e0d4c469e0
dlfcn.h shouldn't be included if XANIM support disabled
arpi
parents:
4699
diff
changeset
|
14 #ifdef USE_XANIM |
a5e0d4c469e0
dlfcn.h shouldn't be included if XANIM support disabled
arpi
parents:
4699
diff
changeset
|
15 |
2409 | 16 #ifdef __FreeBSD__ |
17 #include <unistd.h> | |
18 #endif | |
19 | |
2372 | 20 #include <dlfcn.h> /* dlsym, dlopen, dlclose */ |
21 #include <stdarg.h> /* va_alist, va_start, va_end */ | |
22 #include <errno.h> /* strerror, errno */ | |
23 | |
2373 | 24 #include "mp_msg.h" |
2376 | 25 #include "bswap.h" |
2372 | 26 |
27 #include "stream.h" | |
28 #include "demuxer.h" | |
29 #include "codec-cfg.h" | |
30 #include "stheader.h" | |
2376 | 31 |
2372 | 32 #include "libvo/img_format.h" |
2659 | 33 #include "linux/timer.h" |
2372 | 34 #include "xacodec.h" |
35 | |
2793 | 36 #include "fastmemcpy.h" |
37 | |
2659 | 38 #if 0 |
2381 | 39 typedef char xaBYTE; |
40 typedef short xaSHORT; | |
41 typedef int xaLONG; | |
42 | |
43 typedef unsigned char xaUBYTE; | |
44 typedef unsigned short xaUSHORT; | |
45 typedef unsigned int xaULONG; | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
46 #endif |
2381 | 47 |
48 #define xaFALSE 0 | |
49 #define xaTRUE 1 | |
50 | |
2372 | 51 #ifndef RTLD_NOW |
52 #define RLTD_NOW 2 | |
53 #endif | |
54 #ifndef RTLD_LAZY | |
55 #define RLTD_LAZY 1 | |
56 #endif | |
57 #ifndef RTLD_GLOBAL | |
58 #define RLTD_GLOBAL 256 | |
59 #endif | |
60 | |
2382 | 61 #define XA_CLOSE_FUNCS 5 |
62 int xa_close_func = 0; | |
63 | |
2372 | 64 typedef struct xacodec_driver |
65 { | |
66 XA_DEC_INFO *decinfo; | |
67 void *file_handler; | |
68 long (*iq_func)(XA_CODEC_HDR *codec_hdr); | |
69 unsigned int (*dec_func)(unsigned char *image, unsigned char *delta, | |
70 unsigned int dsize, XA_DEC_INFO *dec_info); | |
2382 | 71 void *close_func[XA_CLOSE_FUNCS]; |
2384 | 72 xacodec_image_t image; |
2372 | 73 } xacodec_driver_t; |
74 | |
75 xacodec_driver_t *xacodec_driver = NULL; | |
76 | |
77 /* Needed by XAnim DLLs */ | |
2659 | 78 void XA_Print(char *fmt, ...) |
2372 | 79 { |
80 va_list vallist; | |
81 char buf[1024]; | |
82 | |
83 va_start(vallist, fmt); | |
84 vsnprintf(buf, 1024, fmt, vallist); | |
2787 | 85 mp_msg(MSGT_XACODEC, MSGL_DBG2, "[xacodec] %s\n", buf); |
2372 | 86 va_end(vallist); |
2659 | 87 |
88 return; | |
2372 | 89 } |
90 | |
2382 | 91 /* 0 is no debug (needed by 3ivX) */ |
2388 | 92 long xa_debug = 0; |
2382 | 93 |
2659 | 94 void TheEnd1(char *err_mess) |
2372 | 95 { |
96 XA_Print("error: %s - exiting\n", err_mess); | |
97 xacodec_exit(); | |
2659 | 98 |
99 return; | |
2372 | 100 } |
2382 | 101 |
2659 | 102 void XA_Add_Func_To_Free_Chain(XA_ANIM_HDR *anim_hdr, void (*function)()) |
2382 | 103 { |
2388 | 104 // XA_Print("XA_Add_Func_To_Free_Chain('anim_hdr: %08x', 'function: %08x')", |
105 // anim_hdr, function); | |
2382 | 106 xacodec_driver->close_func[xa_close_func] = function; |
107 if (xa_close_func+1 < XA_CLOSE_FUNCS) | |
108 xa_close_func++; | |
2659 | 109 |
110 return; | |
2382 | 111 } |
2372 | 112 /* end of crap */ |
113 | |
114 /* load, init and query */ | |
115 int xacodec_init(char *filename, xacodec_driver_t *codec_driver) | |
116 { | |
117 void *(*what_the)(); | |
118 char *error; | |
119 XAVID_MOD_HDR *mod_hdr; | |
120 XAVID_FUNC_HDR *func; | |
121 int i; | |
122 | |
123 codec_driver->file_handler = dlopen(filename, RTLD_NOW|RTLD_GLOBAL); | |
124 if (!codec_driver->file_handler) | |
125 { | |
126 error = dlerror(); | |
127 if (error) | |
2659 | 128 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s while %s\n", filename, error); |
2372 | 129 else |
2659 | 130 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s\n", filename); |
2372 | 131 return(0); |
132 } | |
133 | |
134 what_the = dlsym(codec_driver->file_handler, "What_The"); | |
135 if ((error = dlerror()) != NULL) | |
136 { | |
2373 | 137 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to init %s while %s\n", filename, error); |
2372 | 138 dlclose(codec_driver->file_handler); |
139 return(0); | |
140 } | |
141 | |
142 mod_hdr = what_the(); | |
143 if (!mod_hdr) | |
144 { | |
2659 | 145 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: initializer function failed in %s\n", filename); |
2372 | 146 dlclose(codec_driver->file_handler); |
147 return(0); | |
148 } | |
149 | |
2373 | 150 mp_msg(MSGT_DECVIDEO, MSGL_INFO, "=== XAnim Codec ===\n"); |
151 mp_msg(MSGT_DECVIDEO, MSGL_INFO, " Filename: %s (API revision: %x)\n", filename, mod_hdr->api_rev); | |
152 mp_msg(MSGT_DECVIDEO, MSGL_INFO, " Codec: %s. Rev: %s\n", mod_hdr->desc, mod_hdr->rev); | |
2372 | 153 if (mod_hdr->copyright) |
2373 | 154 mp_msg(MSGT_DECVIDEO, MSGL_INFO, " %s\n", mod_hdr->copyright); |
2372 | 155 if (mod_hdr->mod_author) |
2373 | 156 mp_msg(MSGT_DECVIDEO, MSGL_INFO, " Module Author(s): %s\n", mod_hdr->mod_author); |
2372 | 157 if (mod_hdr->authors) |
2373 | 158 mp_msg(MSGT_DECVIDEO, MSGL_INFO, " Codec Author(s): %s\n", mod_hdr->authors); |
2372 | 159 |
160 if (mod_hdr->api_rev > XAVID_API_REV) | |
161 { | |
2414 | 162 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported api revision (%d) in %s\n", |
163 mod_hdr->api_rev, filename); | |
2372 | 164 dlclose(codec_driver->file_handler); |
165 return(0); | |
166 } | |
167 | |
168 func = mod_hdr->funcs; | |
169 if (!func) | |
170 { | |
2373 | 171 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: function table error in %s\n", filename); |
2372 | 172 dlclose(codec_driver->file_handler); |
173 return(0); | |
174 } | |
175 | |
2659 | 176 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: 0x%08x entries: %d]\n", |
177 mod_hdr->funcs, mod_hdr->num_funcs); | |
2372 | 178 for (i = 0; i < mod_hdr->num_funcs; i++) |
179 { | |
2659 | 180 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %d: %d %d [iq:0x%08x d:0x%08x]\n", |
181 i, func[i].what, func[i].id, func[i].iq_func, func[i].dec_func); | |
2372 | 182 if (func[i].what & XAVID_AVI_QUERY) |
183 { | |
2659 | 184 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " 0x%08x: avi init/query func (id: %d)\n", |
2372 | 185 func[i].iq_func, func[i].id); |
2659 | 186 codec_driver->iq_func = (void *)func[i].iq_func; |
2372 | 187 } |
188 if (func[i].what & XAVID_QT_QUERY) | |
189 { | |
2659 | 190 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " 0x%08x: qt init/query func (id: %d)\n", |
2372 | 191 func[i].iq_func, func[i].id); |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
192 codec_driver->iq_func = (void *)func[i].iq_func; |
2372 | 193 } |
194 if (func[i].what & XAVID_DEC_FUNC) | |
195 { | |
2659 | 196 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " 0x%08x: decoder func (init/query: 0x%08x) (id: %d)\n", |
2372 | 197 func[i].dec_func, func[i].iq_func, func[i].id); |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
198 codec_driver->dec_func = (void *)func[i].dec_func; |
2372 | 199 } |
200 } | |
201 return(1); | |
202 } | |
203 | |
204 int xacodec_query(xacodec_driver_t *codec_driver, XA_CODEC_HDR *codec_hdr) | |
205 { | |
206 long codec_ret; | |
207 | |
2682
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
208 #if 0 |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
209 /* the brute one */ |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
210 if (codec_driver->dec_func) |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
211 { |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
212 codec_hdr->decoder = codec_driver->dec_func; |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
213 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "We got decoder's address at init! %p\n", codec_hdr->decoder); |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
214 return(1); |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
215 } |
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
216 #endif |
2372 | 217 codec_ret = codec_driver->iq_func(codec_hdr); |
218 switch(codec_ret) | |
219 { | |
220 case CODEC_SUPPORTED: | |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
221 codec_driver->dec_func = (void *)codec_hdr->decoder; |
2382 | 222 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Codec is supported: found decoder for %s at 0x%08x\n", |
2372 | 223 codec_hdr->description, codec_hdr->decoder); |
224 return(1); | |
225 case CODEC_UNSUPPORTED: | |
2388 | 226 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unsupported by driver\n", |
227 codec_hdr->description); | |
2372 | 228 return(0); |
229 case CODEC_UNKNOWN: | |
230 default: | |
2388 | 231 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unknown by driver\n", |
232 codec_hdr->description); | |
2372 | 233 return(0); |
234 } | |
235 } | |
236 | |
237 char *xacodec_def_path = XACODEC_PATH; | |
238 | |
239 int xacodec_init_video(sh_video_t *vidinfo, int out_format) | |
240 { | |
241 char dll[1024]; | |
242 XA_CODEC_HDR codec_hdr; | |
2382 | 243 int i; |
2372 | 244 |
245 xacodec_driver = realloc(xacodec_driver, sizeof(struct xacodec_driver)); | |
246 if (xacodec_driver == NULL) | |
2414 | 247 { |
248 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: memory allocation error: %s\n", | |
249 strerror(errno)); | |
2372 | 250 return(0); |
2414 | 251 } |
2372 | 252 |
253 xacodec_driver->iq_func = NULL; | |
254 xacodec_driver->dec_func = NULL; | |
2382 | 255 |
256 for (i=0; i < XA_CLOSE_FUNCS; i++) | |
257 xacodec_driver->close_func[i] = NULL; | |
2372 | 258 |
4699
406d7fc6be4e
use the XANIM_MOD_DIR env. var as described in xanim's docs
alex
parents:
3115
diff
changeset
|
259 if (getenv("XANIM_MOD_DIR")) |
406d7fc6be4e
use the XANIM_MOD_DIR env. var as described in xanim's docs
alex
parents:
3115
diff
changeset
|
260 xacodec_def_path = getenv("XANIM_MOD_DIR"); |
406d7fc6be4e
use the XANIM_MOD_DIR env. var as described in xanim's docs
alex
parents:
3115
diff
changeset
|
261 |
2372 | 262 snprintf(dll, 1024, "%s/%s", xacodec_def_path, vidinfo->codec->dll); |
263 if (xacodec_init(dll, xacodec_driver) == 0) | |
264 return(0); | |
265 | |
2787 | 266 codec_hdr.xapi_rev = XAVID_API_REV; |
2372 | 267 codec_hdr.anim_hdr = malloc(4096); |
268 codec_hdr.description = vidinfo->codec->info; | |
2682
77a237be71a6
fixed api revision and input fourcc handling (mappings are working too :)
alex
parents:
2659
diff
changeset
|
269 codec_hdr.compression = bswap_32(vidinfo->bih->biCompression); |
2372 | 270 codec_hdr.decoder = NULL; |
2787 | 271 codec_hdr.x = vidinfo->bih->biWidth; /* ->disp_w */ |
272 codec_hdr.y = vidinfo->bih->biHeight; /* ->disp_h */ | |
273 /* extra fields to store palette */ | |
2372 | 274 codec_hdr.avi_ctab_flag = 0; |
275 codec_hdr.avi_read_ext = NULL; | |
276 codec_hdr.extra = NULL; | |
277 | |
278 switch(out_format) | |
279 { | |
2383 | 280 case IMGFMT_IYUV: |
2382 | 281 case IMGFMT_I420: |
2383 | 282 case IMGFMT_YV12: |
283 codec_hdr.depth = 12; | |
2382 | 284 break; |
6526 | 285 case IMGFMT_YVU9: |
286 if (vidinfo->bih->biCompression == mmioFOURCC('I','V','3','2') || | |
287 vidinfo->bih->biCompression == mmioFOURCC('i','v','3','2') || | |
288 vidinfo->bih->biCompression == mmioFOURCC('I','V','3','1') || | |
289 vidinfo->bih->biCompression == mmioFOURCC('i','v','3','2')) | |
290 { | |
291 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supporting YVU9 output with Indeo3\n"); | |
292 return(0); | |
293 } | |
294 codec_hdr.depth = 9; | |
295 break; | |
2372 | 296 default: |
2659 | 297 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported image out format (%s)\n", |
2372 | 298 vo_format_name(out_format)); |
299 return(0); | |
300 } | |
2659 | 301 mp_msg(MSGT_DECVIDEO, MSGL_INFO, "xacodec: querying for input %dx%d %dbit [fourcc: %4x] (%s)...\n", |
302 codec_hdr.x, codec_hdr.y, codec_hdr.depth, codec_hdr.compression, codec_hdr.description); | |
2372 | 303 |
304 if (xacodec_query(xacodec_driver, &codec_hdr) == 0) | |
305 return(0); | |
306 | |
307 // free(codec_hdr.anim_hdr); | |
308 | |
309 xacodec_driver->decinfo = malloc(sizeof(XA_DEC_INFO)); | |
2414 | 310 if (xacodec_driver->decinfo == NULL) |
311 { | |
312 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: memory allocation error: %s\n", | |
313 strerror(errno)); | |
314 return(0); | |
315 } | |
2372 | 316 xacodec_driver->decinfo->cmd = 0; |
317 xacodec_driver->decinfo->skip_flag = 0; | |
318 xacodec_driver->decinfo->imagex = xacodec_driver->decinfo->xe = codec_hdr.x; | |
319 xacodec_driver->decinfo->imagey = xacodec_driver->decinfo->ye = codec_hdr.y; | |
320 xacodec_driver->decinfo->imaged = codec_hdr.depth; | |
321 xacodec_driver->decinfo->chdr = NULL; | |
322 xacodec_driver->decinfo->map_flag = 0; /* xaFALSE */ | |
323 xacodec_driver->decinfo->map = NULL; | |
324 xacodec_driver->decinfo->xs = xacodec_driver->decinfo->ys = 0; | |
325 xacodec_driver->decinfo->special = 0; | |
326 xacodec_driver->decinfo->extra = codec_hdr.extra; | |
2414 | 327 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "decinfo->extra, filled by codec: 0x%08x [%s]\n", |
328 &xacodec_driver->decinfo->extra, xacodec_driver->decinfo->extra); | |
2372 | 329 |
2377 | 330 // vidinfo->our_out_buffer = malloc(codec_hdr.y * codec_hdr.x * ((codec_hdr.depth+7)/8)); |
2384 | 331 // vidinfo->our_out_buffer = malloc(codec_hdr.y * codec_hdr.x * codec_hdr.depth); |
2414 | 332 xacodec_driver->image.out_fmt = out_format; |
333 xacodec_driver->image.bpp = codec_hdr.depth; | |
334 xacodec_driver->image.width = codec_hdr.x; | |
335 xacodec_driver->image.height = codec_hdr.y; | |
336 xacodec_driver->image.mem = malloc(codec_hdr.y * codec_hdr.x * ((codec_hdr.depth+7)/8)); | |
2372 | 337 |
2388 | 338 if (xacodec_driver->image.mem == NULL) |
2372 | 339 { |
2414 | 340 mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: memory allocation error: %s\n", |
2372 | 341 strerror(errno)); |
342 return(0); | |
343 } | |
344 | |
345 return(1); | |
346 } | |
347 | |
2659 | 348 #define ACT_DLTA_NORM 0x00000000 |
349 #define ACT_DLTA_BODY 0x00000001 | |
350 #define ACT_DLTA_XOR 0x00000002 | |
351 #define ACT_DLTA_NOP 0x00000004 | |
352 #define ACT_DLTA_MAPD 0x00000008 | |
353 #define ACT_DLTA_DROP 0x00000010 | |
354 #define ACT_DLTA_BAD 0x80000000 | |
2372 | 355 |
356 // unsigned int (*dec_func)(unsigned char *image, unsigned char *delta, | |
357 // unsigned int dsize, XA_DEC_INFO *dec_info); | |
358 | |
2384 | 359 xacodec_image_t* xacodec_decode_frame(uint8_t *frame, int frame_size, int skip_flag) |
2372 | 360 { |
361 unsigned int ret; | |
2387 | 362 xacodec_image_t *image=&xacodec_driver->image; |
2384 | 363 |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
364 // ugyis kiirja a vegen h dropped vagy nem.. |
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
365 // if (skip_flag > 0) |
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
366 // mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "frame will be dropped..\n"); |
2372 | 367 |
368 xacodec_driver->decinfo->skip_flag = skip_flag; | |
369 | |
2387 | 370 image->planes[0]=image->mem; |
371 image->stride[0]=image->width; | |
372 switch(image->out_fmt){ | |
373 case IMGFMT_YV12: | |
374 image->planes[2]=image->planes[0]+image->width*image->height; | |
375 image->planes[1]=image->planes[2]+image->width*image->height/4; | |
6526 | 376 image->stride[1]=image->stride[2]=image->width/2; |
2387 | 377 break; |
378 case IMGFMT_I420: | |
379 case IMGFMT_IYUV: | |
380 image->planes[1]=image->planes[0]+image->width*image->height; | |
381 image->planes[2]=image->planes[1]+image->width*image->height/4; | |
6526 | 382 image->stride[1]=image->stride[2]=image->width/2; |
383 break; | |
384 case IMGFMT_YVU9: | |
385 image->planes[2]=image->planes[0]+image->width*image->height; | |
386 image->planes[1]=image->planes[2]+(image->width>>2)*(image->height>>2); | |
387 image->stride[1]=image->stride[2]=image->width/4; | |
2387 | 388 break; |
389 } | |
390 | |
2384 | 391 // printf("frame: %08x (size: %d) - dest: %08x\n", frame, frame_size, dest); |
392 | |
393 ret = xacodec_driver->dec_func((uint8_t*)&xacodec_driver->image, frame, frame_size, xacodec_driver->decinfo); | |
2372 | 394 |
2384 | 395 // printf("ret: %lu : ", ret); |
2372 | 396 |
397 | |
2659 | 398 if (ret == ACT_DLTA_NORM) |
2372 | 399 { |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
400 // mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "norm\n"); |
2384 | 401 return &xacodec_driver->image; |
2372 | 402 } |
403 | |
2659 | 404 if (ret & ACT_DLTA_MAPD) |
405 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "mapd\n"); | |
2372 | 406 /* |
407 if (!(ret & ACT_DLT_MAPD)) | |
408 xacodec_driver->decinfo->map_flag = 0; | |
409 else | |
410 { | |
411 xacodec_driver->decinfo->map_flag = 1; | |
412 xacodec_driver->decinfo->map = ... | |
413 } | |
414 */ | |
415 | |
2659 | 416 if (ret & ACT_DLTA_XOR) |
417 { | |
418 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "xor\n"); | |
419 return &xacodec_driver->image; | |
420 } | |
421 | |
422 /* nothing changed */ | |
423 if (ret & ACT_DLTA_NOP) | |
2372 | 424 { |
2388 | 425 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "nop\n"); |
2659 | 426 return NULL; |
2372 | 427 } |
428 | |
2659 | 429 /* frame dropped (also display latest frame) */ |
430 if (ret & ACT_DLTA_DROP) | |
2372 | 431 { |
2388 | 432 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "drop\n"); |
2384 | 433 return NULL; |
2372 | 434 } |
435 | |
2659 | 436 if (ret & ACT_DLTA_BAD) |
2372 | 437 { |
2388 | 438 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "bad\n"); |
2384 | 439 return NULL; |
2372 | 440 } |
441 | |
2659 | 442 /* used for double buffer */ |
443 if (ret & ACT_DLTA_BODY) | |
2372 | 444 { |
2388 | 445 mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "body\n"); |
2384 | 446 return NULL; |
2372 | 447 } |
448 | |
2384 | 449 return NULL; |
2372 | 450 } |
451 | |
452 int xacodec_exit() | |
453 { | |
2382 | 454 int i; |
455 void (*close_func)(); | |
456 | |
457 for (i=0; i < XA_CLOSE_FUNCS; i++) | |
458 if (xacodec_driver->close_func[i]) | |
459 { | |
460 close_func = xacodec_driver->close_func[i]; | |
461 close_func(); | |
462 } | |
2372 | 463 dlclose(xacodec_driver->file_handler); |
464 if (xacodec_driver->decinfo != NULL) | |
465 free(xacodec_driver->decinfo); | |
2388 | 466 free(xacodec_driver); |
2372 | 467 return(TRUE); |
468 } | |
2373 | 469 |
470 | |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
471 /* *** XANIM Conversions *** */ |
2373 | 472 /* like loader/win32.c - mini XANIM library */ |
473 | |
2382 | 474 unsigned long XA_Time_Read() |
475 { | |
2384 | 476 return GetTimer(); //(GetRelativeTime()); |
2382 | 477 } |
478 | |
479 void XA_dummy() | |
480 { | |
481 XA_Print("dummy() called"); | |
482 } | |
483 | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
484 void XA_Gen_YUV_Tabs(XA_ANIM_HDR *anim_hdr) |
2373 | 485 { |
486 XA_Print("XA_Gen_YUV_Tabs('anim_hdr: %08x')", anim_hdr); | |
487 | |
488 // XA_Print("anim type: %d - img[x: %d, y: %d, c: %d, d: %d]", | |
489 // anim_hdr->anim_type, anim_hdr->imagex, anim_hdr->imagey, | |
490 // anim_hdr->imagec, anim_hdr->imaged); | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
491 return; |
2373 | 492 } |
493 | |
494 void JPG_Setup_Samp_Limit_Table(XA_ANIM_HDR *anim_hdr) | |
495 { | |
496 XA_Print("JPG_Setup_Samp_Limit_Table('anim_hdr: %08x')", anim_hdr); | |
2381 | 497 // xa_byte_limit = jpg_samp_limit + (MAXJSAMPLE + 1); |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
498 return; |
2373 | 499 } |
500 | |
501 void JPG_Alloc_MCU_Bufs(XA_ANIM_HDR *anim_hdr, unsigned int width, | |
502 unsigned int height, unsigned int full_flag) | |
503 { | |
504 XA_Print("JPG_Alloc_MCU_Bufs('anim_hdr: %08x', 'width: %d', 'height: %d', 'full_flag: %d')", | |
505 anim_hdr, width, height, full_flag); | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
506 return; |
2373 | 507 } |
508 | |
2406 | 509 /* --------------- 4x4 pixel YUV block fillers [CVID] ----------------- */ |
2391 | 510 |
511 typedef struct | |
512 { | |
513 unsigned char r0, g0, b0; | |
514 unsigned char r1, g1, b1; | |
515 unsigned char r2, g2, b2; | |
516 unsigned char r3, g3, b3; | |
517 unsigned int clr0_0, clr0_1, clr0_2, clr0_3; | |
518 unsigned int clr1_0, clr1_1, clr1_2, clr1_3; | |
519 unsigned int clr2_0, clr2_1, clr2_2, clr2_3; | |
520 unsigned int clr3_0, clr3_1, clr3_2, clr3_3; | |
521 } XA_2x2_Color; | |
522 | |
523 #define SET_4_YUV_PIXELS(image,x,y,cmap2x2) \ | |
524 image->planes[0][((x)+0)+((y)+0)*image->stride[0]]=cmap2x2->clr0_0;\ | |
525 image->planes[0][((x)+1)+((y)+0)*image->stride[0]]=cmap2x2->clr0_1;\ | |
526 image->planes[0][((x)+0)+((y)+1)*image->stride[0]]=cmap2x2->clr0_2;\ | |
527 image->planes[0][((x)+1)+((y)+1)*image->stride[0]]=cmap2x2->clr0_3;\ | |
528 image->planes[1][((x)>>1)+((y)>>1)*image->stride[1]]=cmap2x2->clr1_0;\ | |
529 image->planes[2][((x)>>1)+((y)>>1)*image->stride[2]]=cmap2x2->clr1_1; | |
530 | |
2406 | 531 void XA_2x2_OUT_1BLK_Convert(unsigned char *image_p, unsigned int x, unsigned int y, |
2391 | 532 unsigned int imagex, XA_2x2_Color *cmap2x2) |
533 { | |
534 xacodec_image_t *image=(xacodec_image_t*)image_p; | |
535 | |
536 #if 0 | |
537 SET_4_YUV_PIXELS(image,x,y,cmap2x2) | |
538 #else | |
539 SET_4_YUV_PIXELS(image,x,y,cmap2x2) | |
540 SET_4_YUV_PIXELS(image,x+2,y,cmap2x2) | |
541 SET_4_YUV_PIXELS(image,x,y+2,cmap2x2) | |
542 SET_4_YUV_PIXELS(image,x+2,y+2,cmap2x2) | |
543 #endif | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
544 return; |
2391 | 545 } |
546 | |
2406 | 547 void XA_2x2_OUT_4BLKS_Convert(unsigned char *image_p, unsigned int x, unsigned int y, |
2391 | 548 unsigned int imagex, XA_2x2_Color *cm0, XA_2x2_Color *cm1, XA_2x2_Color *cm2, |
549 XA_2x2_Color *cm3) | |
550 { | |
551 xacodec_image_t *image=(xacodec_image_t*)image_p; | |
552 | |
553 SET_4_YUV_PIXELS(image,x,y,cm0) | |
554 SET_4_YUV_PIXELS(image,x+2,y,cm1) | |
555 SET_4_YUV_PIXELS(image,x,y+2,cm2) | |
556 SET_4_YUV_PIXELS(image,x+2,y+2,cm3) | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
557 return; |
2391 | 558 } |
559 | |
560 void *YUV2x2_Blk_Func(unsigned int image_type, int blks, unsigned int dith_flag) | |
561 { | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
562 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV2x2_Blk_Func(image_type=%d, blks=%d, dith_flag=%d)\n", |
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
563 image_type, blks, dith_flag); |
2391 | 564 switch(blks){ |
565 case 1: | |
2406 | 566 return (void*) XA_2x2_OUT_1BLK_Convert; |
2391 | 567 case 4: |
2406 | 568 return (void*) XA_2x2_OUT_4BLKS_Convert; |
2391 | 569 } |
570 | |
571 mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Unimplemented: YUV2x2_Blk_Func(image_type=%d blks=%d dith=%d)\n",image_type,blks,dith_flag); | |
572 return (void*) XA_dummy; | |
573 } | |
574 | |
575 // Take Four Y's and UV and put them into a 2x2 Color structure. | |
576 | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
577 void XA_YUV_2x2_clr(XA_2x2_Color *cmap2x2, unsigned int Y0, unsigned int Y1, |
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
578 unsigned int Y2, unsigned int Y3, unsigned int U, unsigned int V, |
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
579 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr) |
2391 | 580 { |
581 | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
582 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV_2x2_clr(%p [%d,%d,%d,%d][%d][%d] %d %p %p)\n", |
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
583 cmap2x2,Y0,Y1,Y2,Y3,U,V,map_flag,map,chdr); |
2391 | 584 |
585 cmap2x2->clr0_0=Y0; | |
586 cmap2x2->clr0_1=Y1; | |
587 cmap2x2->clr0_2=Y2; | |
588 cmap2x2->clr0_3=Y3; | |
589 cmap2x2->clr1_0=U; | |
590 cmap2x2->clr1_1=V; | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
591 return; |
2391 | 592 } |
593 | |
594 void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type) | |
595 { | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
596 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')", |
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
597 image_type, dith_type); |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
598 return((void*)XA_YUV_2x2_clr); |
2391 | 599 } |
600 | |
2406 | 601 /* -------------------- whole YUV frame converters ------------------------- */ |
2391 | 602 |
2373 | 603 typedef struct |
604 { | |
605 unsigned char *Ybuf; | |
606 unsigned char *Ubuf; | |
607 unsigned char *Vbuf; | |
608 unsigned char *the_buf; | |
609 unsigned int the_buf_size; | |
610 unsigned short y_w, y_h; | |
611 unsigned short uv_w, uv_h; | |
612 } YUVBufs; | |
613 | |
614 typedef struct | |
615 { | |
616 unsigned long Uskip_mask; | |
617 long *YUV_Y_tab; | |
618 long *YUV_UB_tab; | |
619 long *YUV_VR_tab; | |
620 long *YUV_UG_tab; | |
621 long *YUV_VG_tab; | |
622 } YUVTabs; | |
623 | |
2406 | 624 YUVBufs jpg_YUVBufs; |
625 YUVTabs def_yuv_tabs; | |
626 | |
6526 | 627 /* -------------- YUV 4x4 1x1 1x1 (4:1:0 aka YVU9) [Indeo 3,4,5] ------------------ */ |
2406 | 628 |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
629 void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey, |
2391 | 630 unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs, |
2373 | 631 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr) |
632 { | |
2391 | 633 xacodec_image_t *image=(xacodec_image_t*)image_p; |
2395 | 634 int y; |
635 int uvstride; | |
2391 | 636 |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
637 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUVTabs: %d %p %p %p %p %p\n",yuv_tabs->Uskip_mask, |
2397 | 638 yuv_tabs->YUV_Y_tab, |
639 yuv_tabs->YUV_UB_tab, | |
640 yuv_tabs->YUV_VR_tab, | |
641 yuv_tabs->YUV_UG_tab, | |
642 yuv_tabs->YUV_VG_tab ); | |
643 | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
644 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV1611_Convert('image: %08x', 'imagex: %d', 'imagey: %d', 'i_x: %d', 'i_y: %d', 'yuv_bufs: %08x', 'yuv_tabs: %08x', 'map_flag: %d', 'map: %08x', 'chdr: %08x')", |
2391 | 645 image, imagex, imagey, i_x, i_y, yuv, yuv_tabs, map_flag, map, chdr); |
2373 | 646 |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
647 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV: %p %p %p %X (%d) %dx%d %dx%d\n", |
2395 | 648 yuv->Ybuf,yuv->Ubuf,yuv->Vbuf,yuv->the_buf,yuv->the_buf_size, |
649 yuv->y_w,yuv->y_h,yuv->uv_w,yuv->uv_h); | |
650 | |
6526 | 651 if(image->out_fmt == IMGFMT_YVU9 && !yuv_tabs->YUV_Y_tab) |
652 { | |
653 if(i_x==image->width && i_y==image->height){ | |
654 image->planes[0]=yuv->Ybuf; | |
655 image->planes[1]=yuv->Ubuf; | |
656 image->planes[2]=yuv->Vbuf; | |
657 image->stride[0]=i_x; // yuv->y_w | |
658 image->stride[1]=image->stride[2]=i_x/4; // yuv->uv_w | |
659 } else { | |
660 int y; | |
661 for(y=0;y<i_y;y++) | |
662 memcpy(image->planes[0]+y*image->stride[0],yuv->Ybuf+y*i_x,i_x); | |
663 i_x>>=2; i_y>>=2; | |
664 for(y=0;y<i_y;y++){ | |
665 memcpy(image->planes[1]+y*image->stride[1],yuv->Ubuf+y*i_x,i_x); | |
666 memcpy(image->planes[2]+y*image->stride[2],yuv->Vbuf+y*i_x,i_x); | |
667 } | |
668 } | |
669 return; | |
670 } | |
671 | |
2395 | 672 // copy Y plane: |
2397 | 673 if(yuv_tabs->YUV_Y_tab){ // dirty hack to detect iv32: |
674 for(y=0;y<imagey*imagex;y++) | |
675 image->planes[0][y]=yuv->Ybuf[y]<<1; | |
676 } else | |
677 memcpy(image->planes[0],yuv->Ybuf,imagex*imagey); | |
2395 | 678 |
679 // scale U,V planes by 2: | |
680 imagex>>=2; | |
681 imagey>>=2; | |
2391 | 682 |
2395 | 683 uvstride=(yuv->uv_w)?yuv->uv_w:imagex; |
684 | |
685 for(y=0;y<imagey;y++){ | |
686 unsigned char *su=yuv->Ubuf+uvstride*y; | |
687 unsigned char *sv=yuv->Vbuf+uvstride*y; | |
688 unsigned int strideu=image->stride[1]; | |
689 unsigned int stridev=image->stride[2]; | |
690 unsigned char *du=image->planes[1]+2*y*strideu; | |
691 unsigned char *dv=image->planes[2]+2*y*stridev; | |
692 int x; | |
2397 | 693 if(yuv_tabs->YUV_Y_tab){ // dirty hack to detect iv32: |
694 for(x=0;x<imagex;x++){ | |
695 du[2*x]=du[2*x+1]=du[2*x+strideu]=du[2*x+strideu+1]=su[x]*2; | |
696 dv[2*x]=dv[2*x+1]=dv[2*x+stridev]=dv[2*x+stridev+1]=sv[x]*2; | |
697 } | |
698 } else { | |
699 for(x=0;x<imagex;x++){ | |
700 du[2*x]=du[2*x+1]=du[2*x+strideu]=du[2*x+strideu+1]=su[x]; | |
701 dv[2*x]=dv[2*x+1]=dv[2*x+stridev]=dv[2*x+stridev+1]=sv[x]; | |
702 } | |
2395 | 703 } |
704 } | |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
705 return; |
2373 | 706 } |
707 | |
708 void *XA_YUV1611_Func(unsigned int image_type) | |
709 { | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
710 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV1611_Func('image_type: %d')", image_type); |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
711 return((void *)XA_YUV1611_Convert); |
2373 | 712 } |
713 | |
6526 | 714 /* -------------- YUV 4x1 1x1 1x1 (4:1:1 but interleaved) [CYUV] ------------------ */ |
2395 | 715 |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
716 void XA_YUV411111_Convert(unsigned char *image, unsigned int imagex, unsigned int imagey, |
2373 | 717 unsigned int i_x, unsigned int i_y, YUVBufs *yuv_bufs, YUVTabs *yuv_tabs, |
718 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr) | |
719 { | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
720 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV411111_Convert('image: %d', 'imagex: %d', 'imagey: %d', 'i_x: %d', 'i_y: %d', 'yuv_bufs: %08x', 'yuv_tabs: %08x', 'map_flag: %d', 'map: %08x', 'chdr: %08x')", |
2373 | 721 image, imagex, imagey, i_x, i_y, yuv_bufs, yuv_tabs, map_flag, map, chdr); |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
722 return; |
2373 | 723 } |
724 | |
725 void *XA_YUV411111_Func(unsigned int image_type) | |
726 { | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
727 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV411111_Func('image_type: %d')", image_type); |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
728 return((void*)XA_YUV411111_Convert); |
2373 | 729 } |
730 | |
2406 | 731 /* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */ |
2391 | 732 |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
733 void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey, |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
734 unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs, unsigned int map_flag, |
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
735 unsigned int *map, XA_CHDR *chdr) |
2383 | 736 { |
2384 | 737 xacodec_image_t *image=(xacodec_image_t*)image_p; |
738 | |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
739 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV221111_Convert(%p %dx%d %d;%d [%dx%d] %p %p %d %p %p)\n", |
2384 | 740 image,imagex,imagey,i_x,i_y, image->width,image->height, |
741 yuv,yuv_tabs,map_flag,map,chdr); | |
2383 | 742 |
2923
7177ca35ad1a
do not fault with vivo2, and also inserted mp_dbg lines
alex
parents:
2897
diff
changeset
|
743 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV: %p %p %p %X (%X) %Xx%X %Xx%X\n", |
2383 | 744 yuv->Ybuf,yuv->Ubuf,yuv->Vbuf,yuv->the_buf,yuv->the_buf_size, |
745 yuv->y_w,yuv->y_h,yuv->uv_w,yuv->uv_h); | |
746 | |
2403 | 747 if(i_x==image->width && i_y==image->height){ |
2384 | 748 // printf("Direct render!!!\n"); |
749 image->planes[0]=yuv->Ybuf; | |
750 if(image->out_fmt==IMGFMT_YV12){ | |
751 image->planes[1]=yuv->Ubuf; | |
752 image->planes[2]=yuv->Vbuf; | |
753 } else { | |
754 image->planes[1]=yuv->Vbuf; | |
755 image->planes[2]=yuv->Ubuf; | |
756 } | |
2403 | 757 image->stride[0]=i_x; // yuv->y_w |
758 image->stride[1]=image->stride[2]=i_x/2; // yuv->uv_w | |
2384 | 759 } else { |
2403 | 760 int y; |
761 for(y=0;y<i_y;y++) | |
762 memcpy(image->planes[0]+y*image->stride[0],yuv->Ybuf+y*i_x,i_x); | |
763 i_x>>=1; i_y>>=1; | |
764 for(y=0;y<i_y;y++){ | |
765 memcpy(image->planes[1]+y*image->stride[1],yuv->Ubuf+y*i_x,i_x); | |
766 memcpy(image->planes[2]+y*image->stride[2],yuv->Vbuf+y*i_x,i_x); | |
767 } | |
2384 | 768 } |
2402
f628c76bbc11
little cleanup to eleminate xanim typedefs and be more mplayer like
alex
parents:
2397
diff
changeset
|
769 return; |
2383 | 770 } |
771 | |
2382 | 772 void *XA_YUV221111_Func(unsigned int image_type) |
773 { | |
3115 | 774 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV221111_Func('image_type: %d')\n",image_type); |
775 return((void *)XA_YUV221111_Convert); | |
2382 | 776 } |
2373 | 777 |
2404
da766ceb7bdd
cleaned up, also removed some useless printf's to be more faster ;)
alex
parents:
2403
diff
changeset
|
778 /* *** EOF XANIM *** */ |
2659 | 779 #endif |