changeset 5518:04a40454bdbb

accept only 4:2:0 planar yuv formats
author arpi
date Sun, 07 Apr 2002 17:01:15 +0000
parents a3337d7b853f
children 868c13f78f08
files libmpcodecs/vf_pp.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_pp.c	Sun Apr 07 16:40:54 2002 +0000
+++ b/libmpcodecs/vf_pp.c	Sun Apr 07 17:01:15 2002 +0000
@@ -5,6 +5,7 @@
 #include "../config.h"
 #include "../mp_msg.h"
 
+#include "../libvo/img_format.h"
 #include "../mp_image.h"
 #include "vf.h"
 
@@ -17,6 +18,16 @@
 
 //===========================================================================//
 
+static int query_format(struct vf_instance_s* vf, unsigned int fmt){
+    switch(fmt){
+    case IMGFMT_YV12:
+    case IMGFMT_I420:
+    case IMGFMT_IYUV:
+	return vf_next_query_format(vf,fmt);
+    }
+    return 0;
+}
+
 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
     if(vf->priv->pp&0xFFFF) return; // non-local filters enabled
     if((mpi->type==MP_IMGTYPE_IPB || vf->priv->pp) && 
@@ -62,6 +73,7 @@
 
 static int open(vf_instance_t *vf, char* args){
     char *endptr;
+    vf->query_format=query_format;
     vf->get_image=get_image;
     vf->put_image=put_image;
     vf->priv=malloc(sizeof(struct vf_priv_s));