Mercurial > mplayer.hg
comparison libmpcodecs/vf_expand.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 63630c09e237 |
children | d401b1eefcad |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
250 #endif | 250 #endif |
251 if(vf->priv->exp_w==mpi->width || | 251 if(vf->priv->exp_w==mpi->width || |
252 (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) ){ | 252 (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) ){ |
253 // try full DR ! | 253 // try full DR ! |
254 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, | 254 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, |
255 mpi->type, mpi->flags, | 255 mpi->type, mpi->flags, |
256 MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), | 256 MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), |
257 MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); | 257 MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); |
258 #if 1 | 258 #if 1 |
259 if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) && | 259 if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) && |
260 !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){ | 260 !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){ |
261 mp_msg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_FullDRNotPossible); | 261 mp_msg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_FullDRNotPossible); |
293 } | 293 } |
294 // they want slices!!! allocate the buffer. | 294 // they want slices!!! allocate the buffer. |
295 if(!mpi->priv) | 295 if(!mpi->priv) |
296 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, | 296 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, |
297 // MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE, | 297 // MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE, |
298 MP_IMGTYPE_TEMP, mpi->flags, | 298 MP_IMGTYPE_TEMP, mpi->flags, |
299 MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), | 299 MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), |
300 MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); | 300 MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); |
301 if(!(vf->dmpi->flags&MP_IMGFLAG_DRAW_CALLBACK)) | 301 if(!(vf->dmpi->flags&MP_IMGFLAG_DRAW_CALLBACK)) |
302 mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupportSlices); // shouldn't happen. | 302 mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupportSlices); // shouldn't happen. |
303 vf->priv->first_slice = 1; | 303 vf->priv->first_slice = 1; |
304 } | 304 } |
307 unsigned char** src, int* stride, int w,int h, int x, int y){ | 307 unsigned char** src, int* stride, int w,int h, int x, int y){ |
308 if(vf->priv->exp_y>0 && y == 0) { | 308 if(vf->priv->exp_y>0 && y == 0) { |
309 vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, | 309 vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, |
310 vf->dmpi->w,vf->priv->exp_y,0,0); | 310 vf->dmpi->w,vf->priv->exp_y,0,0); |
311 } | 311 } |
312 | 312 |
313 } | 313 } |
314 | 314 |
315 static void draw_bottom_blackbar_slice(struct vf_instance_s* vf, | 315 static void draw_bottom_blackbar_slice(struct vf_instance_s* vf, |
316 unsigned char** src, int* stride, int w,int h, int x, int y){ | 316 unsigned char** src, int* stride, int w,int h, int x, int y){ |
317 if(vf->priv->exp_y+vf->h<vf->dmpi->h && y+h == vf->h) { | 317 if(vf->priv->exp_y+vf->h<vf->dmpi->h && y+h == vf->h) { |
333 } | 333 } |
334 | 334 |
335 static void draw_slice(struct vf_instance_s* vf, | 335 static void draw_slice(struct vf_instance_s* vf, |
336 unsigned char** src, int* stride, int w,int h, int x, int y){ | 336 unsigned char** src, int* stride, int w,int h, int x, int y){ |
337 // printf("draw_slice() called %d at %d\n",h,y); | 337 // printf("draw_slice() called %d at %d\n",h,y); |
338 | 338 |
339 if (y == 0 && y+h == vf->h) { | 339 if (y == 0 && y+h == vf->h) { |
340 // special case - only one slice | 340 // special case - only one slice |
341 draw_top_blackbar_slice(vf, src, stride, w, h, x, y); | 341 draw_top_blackbar_slice(vf, src, stride, w, h, x, y); |
342 vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y); | 342 vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y); |
343 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y); | 343 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y); |
378 | 378 |
379 // hope we'll get DR buffer: | 379 // hope we'll get DR buffer: |
380 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, | 380 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, |
381 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, | 381 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, |
382 vf->priv->exp_w, vf->priv->exp_h); | 382 vf->priv->exp_w, vf->priv->exp_h); |
383 | 383 |
384 // copy mpi->dmpi... | 384 // copy mpi->dmpi... |
385 if(mpi->flags&MP_IMGFLAG_PLANAR){ | 385 if(mpi->flags&MP_IMGFLAG_PLANAR){ |
386 memcpy_pic(vf->dmpi->planes[0]+ | 386 memcpy_pic(vf->dmpi->planes[0]+ |
387 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x, | 387 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x, |
388 mpi->planes[0], mpi->w, mpi->h, | 388 mpi->planes[0], mpi->w, mpi->h, |