# HG changeset patch # User arpi # Date 1034202724 0 # Node ID a9a19a991a70ad520b06096583b7a86ecc6a870a # Parent 4fa4e58587c2e0e7853ca66b50531a5781277070 support for VFCAP_ACCEPT_STRIDE in vo drivers diff -r 4fa4e58587c2 -r a9a19a991a70 libmpcodecs/vf_vo.c --- a/libmpcodecs/vf_vo.c Wed Oct 09 22:07:48 2002 +0000 +++ b/libmpcodecs/vf_vo.c Wed Oct 09 22:32:04 2002 +0000 @@ -40,6 +40,9 @@ 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 @@ // 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); diff -r 4fa4e58587c2 -r a9a19a991a70 libmpcodecs/vfcap.h --- a/libmpcodecs/vfcap.h Wed Oct 09 22:07:48 2002 +0000 +++ b/libmpcodecs/vfcap.h Wed Oct 09 22:32:04 2002 +0000 @@ -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