Mercurial > mplayer.hg
annotate libmpcodecs/vd_cyuv.c @ 5549:7bed3fb6a3be
query_format debug moved 1 verbose level down
author | arpi |
---|---|
date | Wed, 10 Apr 2002 23:23:19 +0000 |
parents | eea0213d64c8 |
children | 28677d779205 |
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 "Creative YUV decoder", | |
11 "cyuv", | |
12 VFM_CYUV, | |
13 "A'rpi", | |
14 "Dr. Tim Ferguson", | |
15 "native codec" | |
16 }; | |
17 | |
18 LIBVD_EXTERN(cyuv) | |
19 | |
20 // to set/get/query special features/parameters | |
21 static int control(sh_video_t *sh,int cmd,void* arg,...){ | |
22 return CONTROL_UNKNOWN; | |
23 } | |
24 | |
25 // init driver | |
26 static int init(sh_video_t *sh){ | |
5124 | 27 return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_UYVY); |
4989 | 28 } |
29 | |
30 // uninit driver | |
31 static void uninit(sh_video_t *sh){ | |
32 } | |
33 | |
34 //mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); | |
35 | |
36 void decode_cyuv( | |
37 unsigned char *buf, | |
38 int size, | |
39 unsigned char *frame, | |
40 int width, | |
41 int height, | |
5351
eea0213d64c8
added YUY2 output to the widely used (heh) CYUV decoder because it seemed
melanson
parents:
5124
diff
changeset
|
42 int format); |
4989 | 43 |
44 // decode a frame | |
45 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ | |
46 mp_image_t* mpi; | |
47 if(len<=0) return NULL; // skipped frame | |
48 | |
49 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, | |
50 sh->disp_w, sh->disp_h); | |
51 if(!mpi) return NULL; | |
52 | |
5351
eea0213d64c8
added YUY2 output to the widely used (heh) CYUV decoder because it seemed
melanson
parents:
5124
diff
changeset
|
53 decode_cyuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h, |
eea0213d64c8
added YUY2 output to the widely used (heh) CYUV decoder because it seemed
melanson
parents:
5124
diff
changeset
|
54 sh->codec->outfmt[sh->outfmtidx]); |
4989 | 55 |
56 return mpi; | |
57 } |