summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vf_vo.c6
-rw-r--r--libmpcodecs/vfcap.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index 55df6c73b2..62e6d8bf6e 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -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);
diff --git a/libmpcodecs/vfcap.h b/libmpcodecs/vfcap.h
index 2dc9524bf6..2a0d12d4ff 100644
--- a/libmpcodecs/vfcap.h
+++ b/libmpcodecs/vfcap.h
@@ -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