Mercurial > mplayer.hg
comparison libmpcodecs/vd_cinepak.c @ 4946:a55d56509a2c
using new cinepak codec api
author | arpi |
---|---|
date | Wed, 06 Mar 2002 14:29:27 +0000 |
parents | 260edd600949 |
children | 43fc27b873ca |
comparison
equal
deleted
inserted
replaced
4945:b0e1dc1bba4b | 4946:a55d56509a2c |
---|---|
45 static void uninit(sh_video_t *sh){ | 45 static void uninit(sh_video_t *sh){ |
46 } | 46 } |
47 | 47 |
48 //mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); | 48 //mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); |
49 | 49 |
50 void decode_cinepak(void *context, unsigned char *buf, int size, unsigned char *frame, int width, int height, int bit_per_pixel, int stride_); | 50 //void decode_cinepak(void *context, unsigned char *buf, int size, unsigned char *frame, int width, int height, int bit_per_pixel, int stride_); |
51 void decode_cinepak(void *context, unsigned char *buf, int size, mp_image_t* mpi); | |
51 | 52 |
52 // decode a frame | 53 // decode a frame |
53 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ | 54 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ |
54 mp_image_t* mpi; | 55 mp_image_t* mpi; |
55 if(len<=0) return NULL; // skipped frame | 56 if(len<=0) return NULL; // skipped frame |
59 if(!mpi){ // temporary! | 60 if(!mpi){ // temporary! |
60 printf("couldn't allocate image for cinepak codec\n"); | 61 printf("couldn't allocate image for cinepak codec\n"); |
61 return NULL; | 62 return NULL; |
62 } | 63 } |
63 | 64 |
64 decode_cinepak(sh->context, data, len, mpi->planes[0], sh->disp_w, sh->disp_h, | 65 // decode_cinepak(sh->context, data, len, mpi->planes[0], sh->disp_w, sh->disp_h, |
65 (mpi->flags&MP_IMGFLAG_YUV)?16:(mpi->imgfmt&255), mpi->stride[0]); | 66 // (mpi->flags&MP_IMGFLAG_YUV)?16:(mpi->imgfmt&255), mpi->stride[0]); |
67 | |
68 decode_cinepak(sh->context, data, len, mpi); | |
66 | 69 |
67 return mpi; | 70 return mpi; |
68 } | 71 } |
69 | 72 |