comparison libmpcodecs/ve_nuv.c @ 30642:a972c1a4a012

cosmetics: Rename struct vf_instance_s --> vf_instance.
author diego
date Sun, 21 Feb 2010 15:48:03 +0000
parents bbb6ebec87a0
children 4e59a7aebadb
comparison
equal deleted inserted replaced
30641:b14b32c20935 30642:a972c1a4a012
86 86
87 87
88 #define COMPDATASIZE (128*4) 88 #define COMPDATASIZE (128*4)
89 #define FRAMEHEADERSIZE 12 89 #define FRAMEHEADERSIZE 12
90 90
91 static int config(struct vf_instance_s* vf, 91 static int config(struct vf_instance *vf,
92 int width, int height, int d_width, int d_height, 92 int width, int height, int d_width, int d_height,
93 unsigned int flags, unsigned int outfmt){ 93 unsigned int flags, unsigned int outfmt){
94 94
95 // We need a buffer wich can holda header and a whole YV12 picture 95 // We need a buffer wich can holda header and a whole YV12 picture
96 // or a RTJpeg table 96 // or a RTJpeg table
108 vf->priv->tbl_wrote = 0; 108 vf->priv->tbl_wrote = 0;
109 109
110 return 1; 110 return 1;
111 } 111 }
112 112
113 static int control(struct vf_instance_s* vf, int request, void* data){ 113 static int control(struct vf_instance *vf, int request, void* data){
114 114
115 return CONTROL_UNKNOWN; 115 return CONTROL_UNKNOWN;
116 } 116 }
117 117
118 static int query_format(struct vf_instance_s* vf, unsigned int fmt){ 118 static int query_format(struct vf_instance *vf, unsigned int fmt){
119 if(fmt==IMGFMT_I420) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; 119 if(fmt==IMGFMT_I420) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
120 return 0; 120 return 0;
121 } 121 }
122 122
123 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ 123 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
124 uint8_t *header = vf->priv->buffer; 124 uint8_t *header = vf->priv->buffer;
125 uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE; 125 uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE;
126 uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE; 126 uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE;
127 int len = 0, r; 127 int len = 0, r;
128 size_t zlen = 0; 128 size_t zlen = 0;
199 mux_v->buffer = header; 199 mux_v->buffer = header;
200 muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts); 200 muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts);
201 return 1; 201 return 1;
202 } 202 }
203 203
204 static void uninit(struct vf_instance_s* vf) { 204 static void uninit(struct vf_instance *vf) {
205 205
206 if(vf->priv->buffer) 206 if(vf->priv->buffer)
207 free(vf->priv->buffer); 207 free(vf->priv->buffer);
208 if(vf->priv->zbuffer) 208 if(vf->priv->zbuffer)
209 free(vf->priv->zbuffer); 209 free(vf->priv->zbuffer);