comparison libmpcodecs/vf_pp.c @ 5518:04a40454bdbb

accept only 4:2:0 planar yuv formats
author arpi
date Sun, 07 Apr 2002 17:01:15 +0000
parents 127f2a84e933
children 868c13f78f08
comparison
equal deleted inserted replaced
5517:a3337d7b853f 5518:04a40454bdbb
3 #include <string.h> 3 #include <string.h>
4 4
5 #include "../config.h" 5 #include "../config.h"
6 #include "../mp_msg.h" 6 #include "../mp_msg.h"
7 7
8 #include "../libvo/img_format.h"
8 #include "../mp_image.h" 9 #include "../mp_image.h"
9 #include "vf.h" 10 #include "vf.h"
10 11
11 #include "../postproc/postprocess.h" 12 #include "../postproc/postprocess.h"
12 13
14 unsigned int pp; 15 unsigned int pp;
15 mp_image_t *dmpi; 16 mp_image_t *dmpi;
16 }; 17 };
17 18
18 //===========================================================================// 19 //===========================================================================//
20
21 static int query_format(struct vf_instance_s* vf, unsigned int fmt){
22 switch(fmt){
23 case IMGFMT_YV12:
24 case IMGFMT_I420:
25 case IMGFMT_IYUV:
26 return vf_next_query_format(vf,fmt);
27 }
28 return 0;
29 }
19 30
20 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ 31 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
21 if(vf->priv->pp&0xFFFF) return; // non-local filters enabled 32 if(vf->priv->pp&0xFFFF) return; // non-local filters enabled
22 if((mpi->type==MP_IMGTYPE_IPB || vf->priv->pp) && 33 if((mpi->type==MP_IMGTYPE_IPB || vf->priv->pp) &&
23 mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change 34 mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
60 71
61 extern int divx_quality; 72 extern int divx_quality;
62 73
63 static int open(vf_instance_t *vf, char* args){ 74 static int open(vf_instance_t *vf, char* args){
64 char *endptr; 75 char *endptr;
76 vf->query_format=query_format;
65 vf->get_image=get_image; 77 vf->get_image=get_image;
66 vf->put_image=put_image; 78 vf->put_image=put_image;
67 vf->priv=malloc(sizeof(struct vf_priv_s)); 79 vf->priv=malloc(sizeof(struct vf_priv_s));
68 if(args){ 80 if(args){
69 vf->priv->pp=strtol(args, &endptr, 0); 81 vf->priv->pp=strtol(args, &endptr, 0);