Add missing multiple inclusion guards.
[mplayer/glamo.git] / libmpcodecs / vf_dvbscale.c
blobfedf07046cdac4da79a4cad1608ba43044ce80d3
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <inttypes.h>
6 #include "config.h"
7 #include "mp_msg.h"
9 #include "img_format.h"
10 #include "mp_image.h"
11 #include "vf.h"
13 struct vf_priv_s {
14 int aspect;
17 //===========================================================================//
19 static int config(struct vf_instance_s* vf,
20 int width, int height, int d_width, int d_height,
21 unsigned int flags, unsigned int outfmt){
23 int scaled_y=vf->priv->aspect*d_height/d_width;
25 d_width=width; // do X-scaling by hardware
26 d_height=scaled_y;
28 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
31 static int open(vf_instance_t *vf, char* args){
32 vf->config=config;
33 vf->default_caps=0;
34 vf->priv=malloc(sizeof(struct vf_priv_s));
35 vf->priv->aspect=768;
36 if(args) vf->priv->aspect=atoi(args);
37 return 1;
40 const vf_info_t vf_info_dvbscale = {
41 "calc Y scaling for DVB card",
42 "dvbscale",
43 "A'rpi",
44 "",
45 open,
46 NULL
49 //===========================================================================//