Mercurial > mplayer.hg
annotate libmpcodecs/vd_roqvideo.c @ 11007:48b7d7aa444d
configure altivec patch by Magnus Damm <damm@opensource.se>
* CC is not checked for Altivec support (see above).
The patch adds checks for FSF-style flags and Darwin-style flags.
The check is performed regardless of the gcc version.
* Disabling of Altivec.
--disable-altivec is broken today if /proc/cpuinfo shows that your cpu
supports altivec. The patch takes care of that.
* "GCC & CPU optimization abilities" always show that it is optimizing
for the cpu configure is running on, it should show the optimization that
is enabled for gcc instead. Cosmetic change only, but confusing as it is
today IMHO.
* Runtime CPU-detection now enables altivec for powerpc.
Now with the patch it should be possible to use --enable-altivec,
--disable-altivec, --enable-runtime-cpudetection regardless of powerpc cpu type.
The configure script handles altivec support in the following order:
1. Altivec is enabled by default if your cpu supports it.
2. --enable-runtime-cpudetection will enable altivec support.
3. If you have forced altivec on/off with --enable-altivec/--disable-altivec, then
your selection will override the previous altivec configuration.
4. If altivec is enabled but the compiler doesn't support it, altivec gets turned off.
author | attila |
---|---|
date | Sat, 04 Oct 2003 23:06:04 +0000 |
parents | a117511790c0 |
children |
rev | line source |
---|---|
4989 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 | |
4 #include "config.h" | |
5 #include "mp_msg.h" | |
6 | |
7 #include "vd_internal.h" | |
8 | |
9 static vd_info_t info = { | |
10 "Id RoQ File Video decoder", | |
11 "roqvideo", | |
12 "A'rpi", | |
13 "Mike Melanson", | |
14 "native codec" | |
15 }; | |
16 | |
17 LIBVD_EXTERN(roqvideo) | |
18 | |
7470 | 19 // in native/roqav.c: |
20 void *roq_decode_video_init(void); | |
21 void roq_decode_video(void *context, unsigned char *encoded, | |
22 int encoded_size, mp_image_t *mpi); | |
4989 | 23 |
24 // to set/get/query special features/parameters | |
25 static int control(sh_video_t *sh,int cmd,void* arg,...){ | |
26 return CONTROL_UNKNOWN; | |
27 } | |
28 | |
29 // init driver | |
30 static int init(sh_video_t *sh){ | |
31 sh->context = roq_decode_video_init(); | |
5124 | 32 return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12); |
4989 | 33 } |
34 | |
35 // uninit driver | |
36 static void uninit(sh_video_t *sh){ | |
37 } | |
38 | |
39 //mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); | |
40 | |
41 // decode a frame | |
42 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ | |
43 mp_image_t* mpi; | |
44 if(len<=0) return NULL; // skipped frame | |
45 | |
46 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_IP, MP_IMGFLAG_PRESERVE | MP_IMGFLAG_READABLE, | |
47 sh->disp_w, sh->disp_h); | |
48 if(!mpi) return NULL; | |
49 | |
50 roq_decode_video(sh->context, data, len, mpi); | |
51 | |
52 return mpi; | |
53 } |