comparison libmpcodecs/vd_cinepak.c @ 4954:43fc27b873ca

order of #includes changed - shouldn't include local things before config.h
author arpi
date Wed, 06 Mar 2002 20:56:06 +0000
parents a55d56509a2c
children c05bf13e857d
comparison
equal deleted inserted replaced
4953:45c51c7f7870 4954:43fc27b873ca
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <stdlib.h> 2 #include <stdlib.h>
3
4 #include "codec-cfg.h"
5 3
6 #include "config.h" 4 #include "config.h"
7 #include "mp_msg.h" 5 #include "mp_msg.h"
8 6
7 #include "codec-cfg.h"
9 #include "../libvo/img_format.h" 8 #include "../libvo/img_format.h"
10 9
11 #include "stream.h" 10 #include "stream.h"
12 #include "demuxer.h" 11 #include "demuxer.h"
13 #include "stheader.h" 12 #include "stheader.h"
53 // decode a frame 52 // decode a frame
54 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ 53 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
55 mp_image_t* mpi; 54 mp_image_t* mpi;
56 if(len<=0) return NULL; // skipped frame 55 if(len<=0) return NULL; // skipped frame
57 56
58 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_STATIC, MP_IMGFLAG_PRESERVE | MP_IMGFLAG_ACCEPT_STRIDE, sh->disp_w, sh->disp_h); 57 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_STATIC, MP_IMGFLAG_PRESERVE | MP_IMGFLAG_ACCEPT_STRIDE,
58 (sh->disp_w+3)&(~3),
59 (sh->disp_h+3)&(~3));
59 60
60 if(!mpi){ // temporary! 61 if(!mpi){ // temporary!
61 printf("couldn't allocate image for cinepak codec\n"); 62 printf("couldn't allocate image for cinepak codec\n");
62 return NULL; 63 return NULL;
63 } 64 }
65
66 printf("mpi: %p/%d %p/%d %p/%d (%d) (%d) \n",
67 mpi->planes[0], mpi->stride[0],
68 mpi->planes[1], mpi->stride[1],
69 mpi->planes[2], mpi->stride[2],
70 mpi->planes[1]-mpi->planes[0],
71 mpi->planes[2]-mpi->planes[1]);
64 72
65 // decode_cinepak(sh->context, data, len, mpi->planes[0], sh->disp_w, sh->disp_h, 73 // decode_cinepak(sh->context, data, len, mpi->planes[0], sh->disp_w, sh->disp_h,
66 // (mpi->flags&MP_IMGFLAG_YUV)?16:(mpi->imgfmt&255), mpi->stride[0]); 74 // (mpi->flags&MP_IMGFLAG_YUV)?16:(mpi->imgfmt&255), mpi->stride[0]);
67 75
68 decode_cinepak(sh->context, data, len, mpi); 76 decode_cinepak(sh->context, data, len, mpi);