comparison libmpcodecs/vd_cyuv.c @ 5351:eea0213d64c8

added YUY2 output to the widely used (heh) CYUV decoder because it seemed like a good idea...isn't YUY2 better supported that UYVY?
author melanson
date Tue, 26 Mar 2002 05:03:10 +0000
parents 3dcbf67c0de0
children 28677d779205
comparison
equal deleted inserted replaced
5350:d59e27f2f5be 5351:eea0213d64c8
37 unsigned char *buf, 37 unsigned char *buf,
38 int size, 38 int size,
39 unsigned char *frame, 39 unsigned char *frame,
40 int width, 40 int width,
41 int height, 41 int height,
42 int bit_per_pixel); 42 int format);
43 43
44 // decode a frame 44 // decode a frame
45 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ 45 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
46 mp_image_t* mpi; 46 mp_image_t* mpi;
47 if(len<=0) return NULL; // skipped frame 47 if(len<=0) return NULL; // skipped frame
48 48
49 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, 49 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0,
50 sh->disp_w, sh->disp_h); 50 sh->disp_w, sh->disp_h);
51 if(!mpi) return NULL; 51 if(!mpi) return NULL;
52 52
53 decode_cyuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h, 0); 53 decode_cyuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h,
54 sh->codec->outfmt[sh->outfmtidx]);
54 55
55 return mpi; 56 return mpi;
56 } 57 }