Mercurial > mplayer.hg
annotate libmpcodecs/vf_down3dright.c @ 33259:04dc3e55cd90
Increase the maximum value of the DVB timeout to 240 seconds.
Some devices may need more time for the initial tune (e.g. firmware loading).
Let the user specify higher timeout value if there is need to.
The default remains 30 seconds.
author | iive |
---|---|
date | Sun, 01 May 2011 18:07:59 +0000 |
parents | 7af3e6f901fd |
children | 0a51b5a1478c |
rev | line source |
---|---|
30421
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
1 /* |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
2 * This file is part of MPlayer. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
3 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
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:
25221
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:
25221
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:
25221
diff
changeset
|
7 * (at your option) any later version. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
8 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
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:
25221
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:
25221
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:
25221
diff
changeset
|
12 * GNU General Public License for more details. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
13 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
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:
25221
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:
25221
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:
25221
diff
changeset
|
17 */ |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
18 |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
19 #include <stdio.h> |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
20 #include <stdlib.h> |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
21 #include <string.h> |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
22 #include <inttypes.h> |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
23 |
17012 | 24 #include "config.h" |
25 #include "mp_msg.h" | |
26 #include "cpudetect.h" | |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
27 |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
28 #include "img_format.h" |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
29 #include "mp_image.h" |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
30 #include "vf.h" |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
31 |
17012 | 32 #include "libvo/fastmemcpy.h" |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
33 |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
34 struct vf_priv_s { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
35 int skipline; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
36 int scalew; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
37 int scaleh; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
38 }; |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
39 |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
40 static void toright(unsigned char *dst[3], unsigned char *src[3], |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
41 int dststride[3], int srcstride[3], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
42 int w, int h, struct vf_priv_s* p) |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
43 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
44 int k; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
45 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
46 for (k = 0; k < 3; k++) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
47 unsigned char* fromL = src[k]; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
48 unsigned char* fromR = src[k]; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
49 unsigned char* to = dst[k]; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
50 int src = srcstride[k]; |
14793 | 51 int dst = dststride[k]; |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
52 int ss; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
53 unsigned int dd; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
54 int i; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
55 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
56 if (k > 0) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
57 i = h / 4 - p->skipline / 2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
58 ss = src * (h / 4 + p->skipline / 2); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
59 dd = w / 4; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
60 } else { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
61 i = h / 2 - p->skipline; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
62 ss = src * (h / 2 + p->skipline); |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
63 dd = w / 2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
64 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
65 fromR += ss; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
66 for ( ; i > 0; i--) { |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
67 int j; |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
68 unsigned char* t = to; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
69 unsigned char* sL = fromL; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
70 unsigned char* sR = fromR; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
71 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
72 if (p->scalew == 1) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
73 for (j = dd; j > 0; j--) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
74 *t++ = (sL[0] + sL[1]) / 2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
75 sL+=2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
76 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
77 for (j = dd ; j > 0; j--) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
78 *t++ = (sR[0] + sR[1]) / 2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
79 sR+=2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
80 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
81 } else { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
82 for (j = dd * 2 ; j > 0; j--) |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
83 *t++ = *sL++; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
84 for (j = dd * 2 ; j > 0; j--) |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
85 *t++ = *sR++; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
86 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
87 if (p->scaleh == 1) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
88 fast_memcpy(to + dst, to, dst); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
89 to += dst; |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
90 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
91 to += dst; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
92 fromL += src; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
93 fromR += src; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
94 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
95 //printf("K %d %d %d %d %d \n", k, w, h, src, dst); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
96 } |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
97 } |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
98 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
99 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
100 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
101 mp_image_t *dmpi; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
102 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
103 // hope we'll get DR buffer: |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
104 dmpi=vf_get_image(vf->next, IMGFMT_YV12, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
105 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
106 (vf->priv->scaleh == 1) ? MP_IMGFLAG_READABLE : 0, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
107 mpi->w * vf->priv->scalew, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
108 mpi->h / vf->priv->scaleh - vf->priv->skipline); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
109 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
110 toright(dmpi->planes, mpi->planes, dmpi->stride, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
111 mpi->stride, mpi->w, mpi->h, vf->priv); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
112 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
113 return vf_next_put_image(vf,dmpi, pts); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
114 } |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
115 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
116 static int config(struct vf_instance *vf, |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
117 int width, int height, int d_width, int d_height, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
118 unsigned int flags, unsigned int outfmt) |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
119 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
120 /* FIXME - also support UYVY output? */ |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
121 return vf_next_config(vf, width * vf->priv->scalew, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
122 height / vf->priv->scaleh - vf->priv->skipline, d_width, d_height, flags, IMGFMT_YV12); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
123 } |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
124 |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
125 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
126 static int query_format(struct vf_instance *vf, unsigned int fmt) |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
127 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
128 /* FIXME - really any YUV 4:2:0 input format should work */ |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
129 switch (fmt) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
130 case IMGFMT_YV12: |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
131 case IMGFMT_IYUV: |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
132 case IMGFMT_I420: |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
133 return vf_next_query_format(vf, IMGFMT_YV12); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
134 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
135 return 0; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
136 } |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
137 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
138 static void uninit(struct vf_instance *vf) |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
139 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
140 free(vf->priv); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
141 } |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
142 |
30638
a7b908875c14
Rename open() vf initialization function to vf_open().
diego
parents:
30633
diff
changeset
|
143 static int vf_open(vf_instance_t *vf, char *args) |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
144 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
145 vf->config=config; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
146 vf->query_format=query_format; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
147 vf->put_image=put_image; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
148 vf->uninit=uninit; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
149 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
150 vf->priv = calloc(1, sizeof (struct vf_priv_s)); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
151 vf->priv->skipline = 0; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
152 vf->priv->scalew = 1; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
153 vf->priv->scaleh = 2; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
154 if (args) sscanf(args, "%d:%d:%d", &vf->priv->skipline, &vf->priv->scalew, &vf->priv->scaleh); |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
155 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
156 return 1; |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
157 } |
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
158 |
25221 | 159 const vf_info_t vf_info_down3dright = { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
160 "convert stereo movie from top-bottom to left-right field", |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
161 "down3dright", |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
162 "Zdenek Kabelac", |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
163 "", |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
164 vf_open, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
165 NULL |
9404
7a43a52b9f60
down3dright filter by kabi (converts between 2 common stereoscopic systems)
michael
parents:
diff
changeset
|
166 }; |