Mercurial > mplayer.hg
annotate libmpcodecs/vf_dvbscale.c @ 34395:c79b0b167c79
Synced with help_mp-en.h rev. 34475
author | jrash |
---|---|
date | Mon, 02 Jan 2012 03:34:19 +0000 |
parents | a972c1a4a012 |
children |
rev | line source |
---|---|
30421
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
1 /* |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
2 * This file is part of MPlayer. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
3 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
7 * (at your option) any later version. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
8 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
12 * GNU General Public License for more details. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
13 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
17 */ |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
29263
diff
changeset
|
18 |
6002 | 19 #include <stdio.h> |
20 #include <stdlib.h> | |
21 #include <string.h> | |
22 #include <inttypes.h> | |
23 | |
17012 | 24 #include "config.h" |
25 #include "mp_msg.h" | |
6002 | 26 |
27 #include "img_format.h" | |
28 #include "mp_image.h" | |
29 #include "vf.h" | |
30 | |
31 struct vf_priv_s { | |
32 int aspect; | |
33 }; | |
34 | |
35 //===========================================================================// | |
36 | |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
37 static int config(struct vf_instance *vf, |
6002 | 38 int width, int height, int d_width, int d_height, |
39 unsigned int flags, unsigned int outfmt){ | |
40 | |
41 int scaled_y=vf->priv->aspect*d_height/d_width; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
25221
diff
changeset
|
42 |
6002 | 43 d_width=width; // do X-scaling by hardware |
44 d_height=scaled_y; | |
45 | |
46 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); | |
47 } | |
48 | |
30638
a7b908875c14
Rename open() vf initialization function to vf_open().
diego
parents:
30421
diff
changeset
|
49 static int vf_open(vf_instance_t *vf, char *args){ |
6002 | 50 vf->config=config; |
51 vf->default_caps=0; | |
52 vf->priv=malloc(sizeof(struct vf_priv_s)); | |
53 vf->priv->aspect=768; | |
54 if(args) vf->priv->aspect=atoi(args); | |
55 return 1; | |
56 } | |
57 | |
25221 | 58 const vf_info_t vf_info_dvbscale = { |
6002 | 59 "calc Y scaling for DVB card", |
60 "dvbscale", | |
61 "A'rpi", | |
62 "", | |
30638
a7b908875c14
Rename open() vf initialization function to vf_open().
diego
parents:
30421
diff
changeset
|
63 vf_open, |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
6002
diff
changeset
|
64 NULL |
6002 | 65 }; |
66 | |
67 //===========================================================================// |