1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

accept only 4:2:0 planar yuv formats

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5519 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-04-07 17:01:15 +00:00
parent 41d9f1e6de
commit 76756940e4

View File

@ -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 @@ struct vf_priv_s {
//===========================================================================//
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 @@ extern int divx_quality;
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));