support for VFCAP_ACCEPT_STRIDE in vo drivers

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7688 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-10-09 22:32:04 +00:00
parent a5830dcb16
commit b94ac62f15
2 changed files with 7 additions and 4 deletions

View File

@ -40,6 +40,9 @@ static int config(struct vf_instance_s* vf,
mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment);
}
// save vo's stride capability for the wanted colorspace:
vf->default_caps=query_format(vf,outfmt) & VFCAP_ACCEPT_STRIDE;
if(video_out->config(width,height,d_width,d_height,flags,"MPlayer",outfmt))
return 0;
++vo_config_count;
@ -95,7 +98,8 @@ static int put_image(struct vf_instance_s* vf,
// nope, fallback to old draw_frame/draw_slice:
if(!(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK))){
// blit frame:
if(mpi->flags&MP_IMGFLAG_PLANAR)
// if(mpi->flags&MP_IMGFLAG_PLANAR)
if(vf->default_caps&VFCAP_ACCEPT_STRIDE)
video_out->draw_slice(mpi->planes,mpi->stride,mpi->w,mpi->h,mpi->x,mpi->y);
else
video_out->draw_frame(mpi->planes);

View File

@ -19,10 +19,9 @@
#define VFCAP_TIMER 0x100
// driver _always_ flip image upside-down (for ve_vfw)
#define VFCAP_FLIPPED 0x200
// driver accept stride: (put_image/draw_frame)
// vf filter: accepts stride (put_image)
// vo driver: has draw_slice() support for the given csp
#define VFCAP_ACCEPT_STRIDE 0x400
// filter does postprocessing (so you shouldn't scale/filter image before it)
#define VFCAP_POSTPROC 0x800
// filter has draw_slice() support for this colorspace (assumed for planar YUV)
#define VFCAP_DRAW_SLICE 0x1000