]> git.sesse.net Git - ffmpeg/blob - libavfilter/libmpcodecs/vf_stereo3d.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavfilter / libmpcodecs / vf_stereo3d.c
1 /*
2  * Copyright (C) 2010 Gordon Schmidt <gordon.schmidt <at> s2000.tu-chemnitz.de>
3  *
4  * This file is part of MPlayer.
5  *
6  * MPlayer is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * MPlayer is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with MPlayer; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 //==includes==//
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <string.h>
25
26 #include "config.h"
27 #include "mp_msg.h"
28 #include "help_mp.h"
29
30 #include "img_format.h"
31 #include "mp_image.h"
32 #include "vf.h"
33
34 #include "libavutil/common.h"
35 #include "libvo/fastmemcpy.h"
36
37 //==types==//
38 typedef enum stereo_code {
39     ANAGLYPH_RC_GRAY,   //anaglyph red/cyan gray
40     ANAGLYPH_RC_HALF,   //anaglyph red/cyan half colored
41     ANAGLYPH_RC_COLOR,  //anaglyph red/cyan colored
42     ANAGLYPH_RC_DUBOIS, //anaglyph red/cyan dubois
43     ANAGLYPH_GM_GRAY,   //anaglyph green/magenta gray
44     ANAGLYPH_GM_HALF,   //anaglyph green/magenta half colored
45     ANAGLYPH_GM_COLOR,  //anaglyph green/magenta colored
46     ANAGLYPH_GM_DUBOIS, //anaglyph green/magenta dubois
47     ANAGLYPH_YB_GRAY,   //anaglyph yellow/blue gray
48     ANAGLYPH_YB_HALF,   //anaglyph yellow/blue half colored
49     ANAGLYPH_YB_COLOR,  //anaglyph yellow/blue colored
50     ANAGLYPH_YB_DUBOIS, //anaglyph yellow/blue dubois
51     MONO_L,             //mono output for debugging (left eye only)
52     MONO_R,             //mono output for debugging (right eye only)
53     SIDE_BY_SIDE_LR,    //side by side parallel (left eye left, right eye right)
54     SIDE_BY_SIDE_RL,    //side by side crosseye (right eye left, left eye right)
55     SIDE_BY_SIDE_2_LR,  //side by side parallel with half width resolution
56     SIDE_BY_SIDE_2_RL,  //side by side crosseye with half width resolution
57     ABOVE_BELOW_LR,     //above-below (left eye above, right eye below)
58     ABOVE_BELOW_RL,     //above-below (right eye above, left eye below)
59     ABOVE_BELOW_2_LR,   //above-below with half height resolution
60     ABOVE_BELOW_2_RL,   //above-below with half height resolution
61     INTERLEAVE_ROWS_LR, //row-interleave (left eye has top row)
62     INTERLEAVE_ROWS_RL, //row-interleave (right eye has top row)
63     STEREO_CODE_COUNT   //no value set - TODO: needs autodetection
64 } stereo_code;
65
66 typedef struct component {
67     stereo_code  fmt;
68     unsigned int width;
69     unsigned int height;
70     unsigned int off_left;
71     unsigned int off_right;
72     unsigned int row_left;
73     unsigned int row_right;
74 } component;
75
76 //==global variables==//
77 static const int ana_coeff[][3][6] = {
78   [ANAGLYPH_RC_GRAY]   =
79     {{19595, 38470,  7471,     0,     0,     0},
80      {    0,     0,     0, 19595, 38470,  7471},
81      {    0,     0,     0, 19595, 38470,  7471}},
82   [ANAGLYPH_RC_HALF]   =
83     {{19595, 38470,  7471,     0,     0,     0},
84      {    0,     0,     0,     0, 65536,     0},
85      {    0,     0,     0,     0,     0, 65536}},
86   [ANAGLYPH_RC_COLOR]  =
87     {{65536,     0,     0,     0,     0,     0},
88      {    0,     0,     0,     0, 65536,     0},
89      {    0,     0,     0,     0,     0, 65536}},
90   [ANAGLYPH_RC_DUBOIS] =
91     {{29891, 32800, 11559, -2849, -5763,  -102},
92      {-2627, -2479, -1033, 24804, 48080, -1209},
93      { -997, -1350,  -358, -4729, -7403, 80373}},
94   [ANAGLYPH_GM_GRAY]   =
95     {{    0,     0,     0, 19595, 38470,  7471},
96      {19595, 38470,  7471,     0,     0,     0},
97      {    0,     0,     0, 19595, 38470,  7471}},
98   [ANAGLYPH_GM_HALF]   =
99     {{    0,     0,     0, 65536,     0,     0},
100      {19595, 38470,  7471,     0,     0,     0},
101      {    0,     0,     0,     0,     0, 65536}},
102   [ANAGLYPH_GM_COLOR]  =
103     {{    0,     0,     0, 65536,     0,     0},
104      {    0, 65536,     0,     0,     0,     0},
105      {    0,     0,     0,     0,     0, 65536}},
106   [ANAGLYPH_GM_DUBOIS]  =
107     {{-4063,-10354, -2556, 34669, 46203,  1573},
108      {18612, 43778,  9372, -1049,  -983, -4260},
109      { -983, -1769,  1376,   590,  4915, 61407}},
110   [ANAGLYPH_YB_GRAY]   =
111     {{    0,     0,     0, 19595, 38470,  7471},
112      {    0,     0,     0, 19595, 38470,  7471},
113      {19595, 38470,  7471,     0,     0,     0}},
114   [ANAGLYPH_YB_HALF]   =
115     {{    0,     0,     0, 65536,     0,     0},
116      {    0,     0,     0,     0, 65536,     0},
117      {19595, 38470,  7471,     0,     0,     0}},
118   [ANAGLYPH_YB_COLOR]  =
119     {{    0,     0,     0, 65536,     0,     0},
120      {    0,     0,     0,     0, 65536,     0},
121      {    0,     0, 65536,     0,     0,     0}},
122   [ANAGLYPH_YB_DUBOIS] =
123     {{65535,-12650,18451,   -987, -7590, -1049},
124      {-1604, 56032, 4196,    370,  3826, -1049},
125      {-2345,-10676, 1358,   5801, 11416, 56217}},
126 };
127
128 struct vf_priv_s {
129     component in;
130     component out;
131     int ana_matrix[3][6];
132     unsigned int width;
133     unsigned int height;
134     unsigned int row_step;
135 } const ff_vf_priv_default = {
136   {SIDE_BY_SIDE_LR},
137   {ANAGLYPH_RC_DUBOIS}
138 };
139
140 //==functions==//
141 static inline uint8_t ana_convert(int coeff[6], uint8_t left[3], uint8_t right[3])
142 {
143     int sum;
144
145     sum  = coeff[0] * left[0] + coeff[3] * right[0]; //red in
146     sum += coeff[1] * left[1] + coeff[4] * right[1]; //green in
147     sum += coeff[2] * left[2] + coeff[5] * right[2]; //blue in
148     return av_clip_uint8(sum >> 16);
149 }
150
151 static int config(struct vf_instance *vf, int width, int height, int d_width,
152                   int d_height, unsigned int flags, unsigned int outfmt)
153 {
154     if ((width & 1) || (height & 1)) {
155         ff_mp_msg(MSGT_VFILTER, MSGL_WARN, "[stereo3d] invalid height or width\n");
156         return 0;
157     }
158     //default input values
159     vf->priv->width             = width;
160     vf->priv->height            = height;
161     vf->priv->row_step          = 1;
162     vf->priv->in.width          = width;
163     vf->priv->in.height         = height;
164     vf->priv->in.off_left       = 0;
165     vf->priv->in.off_right      = 0;
166     vf->priv->in.row_left       = 0;
167     vf->priv->in.row_right      = 0;
168
169     //check input format
170     switch (vf->priv->in.fmt) {
171     case SIDE_BY_SIDE_2_LR:
172         d_width                *= 2;
173     case SIDE_BY_SIDE_LR:
174         vf->priv->width         = width / 2;
175         vf->priv->in.off_right  = vf->priv->width * 3;
176         break;
177     case SIDE_BY_SIDE_2_RL:
178         d_width                *= 2;
179     case SIDE_BY_SIDE_RL:
180         vf->priv->width         = width / 2;
181         vf->priv->in.off_left   = vf->priv->width * 3;
182         break;
183     case ABOVE_BELOW_2_LR:
184         d_height               *= 2;
185     case ABOVE_BELOW_LR:
186         vf->priv->height        = height / 2;
187         vf->priv->in.row_right  = vf->priv->height;
188         break;
189     case ABOVE_BELOW_2_RL:
190         d_height               *= 2;
191     case ABOVE_BELOW_RL:
192         vf->priv->height        = height / 2;
193         vf->priv->in.row_left   = vf->priv->height;
194         break;
195     default:
196         ff_mp_msg(MSGT_VFILTER, MSGL_WARN,
197                "[stereo3d] stereo format of input is not supported\n");
198         return 0;
199         break;
200     }
201     //default output values
202     vf->priv->out.width         = vf->priv->width;
203     vf->priv->out.height        = vf->priv->height;
204     vf->priv->out.off_left      = 0;
205     vf->priv->out.off_right     = 0;
206     vf->priv->out.row_left      = 0;
207     vf->priv->out.row_right     = 0;
208
209     //check output format
210     switch (vf->priv->out.fmt) {
211     case ANAGLYPH_RC_GRAY:
212     case ANAGLYPH_RC_HALF:
213     case ANAGLYPH_RC_COLOR:
214     case ANAGLYPH_RC_DUBOIS:
215     case ANAGLYPH_GM_GRAY:
216     case ANAGLYPH_GM_HALF:
217     case ANAGLYPH_GM_COLOR:
218     case ANAGLYPH_GM_DUBOIS:
219     case ANAGLYPH_YB_GRAY:
220     case ANAGLYPH_YB_HALF:
221     case ANAGLYPH_YB_COLOR:
222     case ANAGLYPH_YB_DUBOIS:
223         memcpy(vf->priv->ana_matrix, ana_coeff[vf->priv->out.fmt],
224                sizeof(vf->priv->ana_matrix));
225         break;
226     case SIDE_BY_SIDE_2_LR:
227         d_width                /= 2;
228     case SIDE_BY_SIDE_LR:
229         vf->priv->out.width     = vf->priv->width * 2;
230         vf->priv->out.off_right = vf->priv->width * 3;
231         break;
232     case SIDE_BY_SIDE_2_RL:
233         d_width                /= 2;
234     case SIDE_BY_SIDE_RL:
235         vf->priv->out.width     = vf->priv->width * 2;
236         vf->priv->out.off_left  = vf->priv->width * 3;
237         break;
238     case ABOVE_BELOW_2_LR:
239         d_height               /= 2;
240     case ABOVE_BELOW_LR:
241         vf->priv->out.height    = vf->priv->height * 2;
242         vf->priv->out.row_right = vf->priv->height;
243         break;
244     case ABOVE_BELOW_2_RL:
245         d_height               /= 2;
246     case ABOVE_BELOW_RL:
247         vf->priv->out.height    = vf->priv->height * 2;
248         vf->priv->out.row_left  = vf->priv->height;
249         break;
250     case INTERLEAVE_ROWS_LR:
251         vf->priv->row_step      = 2;
252         vf->priv->height        = vf->priv->height / 2;
253         vf->priv->out.off_right = vf->priv->width * 3;
254         vf->priv->in.off_right += vf->priv->in.width * 3;
255         break;
256     case INTERLEAVE_ROWS_RL:
257         vf->priv->row_step      = 2;
258         vf->priv->height        = vf->priv->height / 2;
259         vf->priv->out.off_left  = vf->priv->width * 3;
260         vf->priv->in.off_left  += vf->priv->in.width * 3;
261         break;
262     case MONO_R:
263         //same as MONO_L only needs switching of input offsets
264         vf->priv->in.off_left   = vf->priv->in.off_right;
265         vf->priv->in.row_left   = vf->priv->in.row_right;
266         //nobreak;
267     case MONO_L:
268         //use default settings
269         break;
270     default:
271         ff_mp_msg(MSGT_VFILTER, MSGL_WARN,
272             "[stereo3d] stereo format of output is not supported\n");
273         return 0;
274         break;
275     }
276 //    if (!opt_screen_size_x && !opt_screen_size_y) {
277         d_width     = d_width  * vf->priv->out.width  / width;
278         d_height    = d_height * vf->priv->out.height / height;
279 //    }
280
281     return ff_vf_next_config(vf, vf->priv->out.width, vf->priv->out.height,
282                           d_width, d_height, flags, outfmt);
283 }
284
285 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
286 {
287     mp_image_t *dmpi;
288     if (vf->priv->in.fmt == vf->priv->out.fmt) { //nothing to do
289         dmpi = mpi;
290     } else {
291         int out_off_left, out_off_right;
292         int in_off_left  = vf->priv->in.row_left   * mpi->stride[0]  +
293                            vf->priv->in.off_left;
294         int in_off_right = vf->priv->in.row_right  * mpi->stride[0]  +
295                            vf->priv->in.off_right;
296
297         dmpi = ff_vf_get_image(vf->next, IMGFMT_RGB24, MP_IMGTYPE_TEMP,
298                             MP_IMGFLAG_ACCEPT_STRIDE,
299                             vf->priv->out.width, vf->priv->out.height);
300         out_off_left   = vf->priv->out.row_left  * dmpi->stride[0] +
301                          vf->priv->out.off_left;
302         out_off_right  = vf->priv->out.row_right * dmpi->stride[0] +
303                          vf->priv->out.off_right;
304
305         switch (vf->priv->out.fmt) {
306         case SIDE_BY_SIDE_LR:
307         case SIDE_BY_SIDE_RL:
308         case SIDE_BY_SIDE_2_LR:
309         case SIDE_BY_SIDE_2_RL:
310         case ABOVE_BELOW_LR:
311         case ABOVE_BELOW_RL:
312         case ABOVE_BELOW_2_LR:
313         case ABOVE_BELOW_2_RL:
314         case INTERLEAVE_ROWS_LR:
315         case INTERLEAVE_ROWS_RL:
316             memcpy_pic2(dmpi->planes[0] + out_off_left,
317                        mpi->planes[0] + in_off_left,
318                        3 * vf->priv->width,
319                        vf->priv->height,
320                        dmpi->stride[0] * vf->priv->row_step,
321                        mpi->stride[0] * vf->priv->row_step,
322                        vf->priv->row_step != 1);
323             memcpy_pic2(dmpi->planes[0] + out_off_right,
324                        mpi->planes[0] + in_off_right,
325                        3 * vf->priv->width,
326                        vf->priv->height,
327                        dmpi->stride[0] * vf->priv->row_step,
328                        mpi->stride[0] * vf->priv->row_step,
329                        vf->priv->row_step != 1);
330             break;
331         case MONO_L:
332         case MONO_R:
333             memcpy_pic(dmpi->planes[0],
334                        mpi->planes[0] + in_off_left,
335                        3 * vf->priv->width,
336                        vf->priv->height,
337                        dmpi->stride[0],
338                        mpi->stride[0]);
339             break;
340         case ANAGLYPH_RC_GRAY:
341         case ANAGLYPH_RC_HALF:
342         case ANAGLYPH_RC_COLOR:
343         case ANAGLYPH_RC_DUBOIS:
344         case ANAGLYPH_GM_GRAY:
345         case ANAGLYPH_GM_HALF:
346         case ANAGLYPH_GM_COLOR:
347         case ANAGLYPH_GM_DUBOIS:
348         case ANAGLYPH_YB_GRAY:
349         case ANAGLYPH_YB_HALF:
350         case ANAGLYPH_YB_COLOR:
351         case ANAGLYPH_YB_DUBOIS: {
352             int i,x,y,il,ir,o;
353             unsigned char *source     = mpi->planes[0];
354             unsigned char *dest       = dmpi->planes[0];
355             unsigned int   out_width  = vf->priv->out.width;
356             int           *ana_matrix[3];
357
358             for(i = 0; i < 3; i++)
359                 ana_matrix[i] = vf->priv->ana_matrix[i];
360
361             for (y = 0; y < vf->priv->out.height; y++) {
362                 o   = dmpi->stride[0] * y;
363                 il  = in_off_left  + y * mpi->stride[0];
364                 ir  = in_off_right + y * mpi->stride[0];
365                 for (x = 0; x < out_width; x++) {
366                     dest[o    ]  = ana_convert(
367                                    ana_matrix[0], source + il, source + ir); //red out
368                     dest[o + 1]  = ana_convert(
369                                    ana_matrix[1], source + il, source + ir); //green out
370                     dest[o + 2]  = ana_convert(
371                                    ana_matrix[2], source + il, source + ir); //blue out
372                     il += 3;
373                     ir += 3;
374                     o  += 3;
375                 }
376             }
377             break;
378         }
379         default:
380             ff_mp_msg(MSGT_VFILTER, MSGL_WARN,
381                    "[stereo3d] stereo format of output is not supported\n");
382             return 0;
383             break;
384         }
385     }
386     return ff_vf_next_put_image(vf, dmpi, pts);
387 }
388
389 static int query_format(struct vf_instance *vf, unsigned int fmt)
390 {
391     switch (fmt)
392     case IMGFMT_RGB24:
393         return ff_vf_next_query_format(vf, fmt);
394     return 0;
395 }
396
397 static void uninit(vf_instance_t *vf)
398 {
399     free(vf->priv);
400 }
401
402 static int vf_open(vf_instance_t *vf, char *args)
403 {
404     vf->config          = config;
405     vf->uninit          = uninit;
406     vf->put_image       = put_image;
407     vf->query_format    = query_format;
408     vf->priv=malloc(sizeof(struct vf_priv_s));
409     memset(vf->priv, 0, sizeof(struct vf_priv_s));
410
411     vf->priv->in.fmt = SIDE_BY_SIDE_LR;
412     vf->priv->out.fmt= ANAGLYPH_RC_DUBOIS;
413     if (args) sscanf(args, "%d:%d", &vf->priv->in.fmt, &vf->priv->out.fmt);
414
415     return 1;
416 }
417 #if 0
418 ///Presets usage
419 static const struct format_preset {
420   char* name;
421   stereo_code scode;
422 } vf_format_presets_defs[] = {
423     {"arcg",                             ANAGLYPH_RC_GRAY},
424     {"anaglyph_red_cyan_gray",           ANAGLYPH_RC_GRAY},
425     {"arch",                             ANAGLYPH_RC_HALF},
426     {"anaglyph_red_cyan_half_color",     ANAGLYPH_RC_HALF},
427     {"arcc",                             ANAGLYPH_RC_COLOR},
428     {"anaglyph_red_cyan_color",          ANAGLYPH_RC_COLOR},
429     {"arcd",                             ANAGLYPH_RC_DUBOIS},
430     {"anaglyph_red_cyan_dubios",         ANAGLYPH_RC_DUBOIS},
431     {"agmg",                             ANAGLYPH_GM_GRAY},
432     {"anaglyph_green_magenta_gray",      ANAGLYPH_GM_GRAY},
433     {"agmh",                             ANAGLYPH_GM_HALF},
434     {"anaglyph_green_magenta_half_color",ANAGLYPH_GM_HALF},
435     {"agmc",                             ANAGLYPH_GM_COLOR},
436     {"anaglyph_green_magenta_color",     ANAGLYPH_GM_COLOR},
437     {"agmd",                             ANAGLYPH_GM_DUBOIS},
438     {"anaglyph_green_magenta_dubois",    ANAGLYPH_GM_DUBOIS},
439     {"aybg",                             ANAGLYPH_YB_GRAY},
440     {"anaglyph_yellow_blue_gray",        ANAGLYPH_YB_GRAY},
441     {"aybh",                             ANAGLYPH_YB_HALF},
442     {"anaglyph_yellow_blue_half_color",  ANAGLYPH_YB_HALF},
443     {"aybc",                             ANAGLYPH_YB_COLOR},
444     {"anaglyph_yellow_blue_color",       ANAGLYPH_YB_COLOR},
445     {"aybd",                             ANAGLYPH_YB_DUBOIS},
446     {"anaglyph_yellow_blue_dubois",      ANAGLYPH_YB_DUBOIS},
447     {"ml",                               MONO_L},
448     {"mono_left",                        MONO_L},
449     {"mr",                               MONO_R},
450     {"mono_right",                       MONO_R},
451     {"sbsl",                             SIDE_BY_SIDE_LR},
452     {"side_by_side_left_first",          SIDE_BY_SIDE_LR},
453     {"sbsr",                             SIDE_BY_SIDE_RL},
454     {"side_by_side_right_first",         SIDE_BY_SIDE_RL},
455     {"sbs2l",                              SIDE_BY_SIDE_2_LR},
456     {"side_by_side_half_width_left_first", SIDE_BY_SIDE_2_LR},
457     {"sbs2r",                              SIDE_BY_SIDE_2_RL},
458     {"side_by_side_half_width_right_first",SIDE_BY_SIDE_2_RL},
459     {"abl",                              ABOVE_BELOW_LR},
460     {"above_below_left_first",           ABOVE_BELOW_LR},
461     {"abr",                              ABOVE_BELOW_RL},
462     {"above_below_right_first",          ABOVE_BELOW_RL},
463     {"ab2l",                               ABOVE_BELOW_2_LR},
464     {"above_below_half_height_left_first", ABOVE_BELOW_2_LR},
465     {"ab2r",                               ABOVE_BELOW_2_RL},
466     {"above_below_half_height_right_first",ABOVE_BELOW_2_RL},
467     {"irl",                                INTERLEAVE_ROWS_LR},
468     {"interleave_rows_left_first",         INTERLEAVE_ROWS_LR},
469     {"irr",                                INTERLEAVE_ROWS_RL},
470     {"interleave_rows_right_first",        INTERLEAVE_ROWS_RL},
471     { NULL, 0}
472 };
473
474 #define ST_OFF(f) M_ST_OFF(struct format_preset,f)
475 static const m_option_t vf_format_preset_fields_in[] = {
476   {"in", ST_OFF(scode), CONF_TYPE_INT, 0,0,0, NULL},
477   { NULL, NULL, 0, 0, 0, 0,  NULL }
478 };
479 static const m_option_t vf_format_preset_fields_out[] = {
480   {"out", ST_OFF(scode), CONF_TYPE_INT, 0,0,0, NULL},
481   { NULL, NULL, 0, 0, 0, 0,  NULL }
482 };
483
484 static const m_struct_t vf_format_preset_in = {
485   "stereo_format_preset_in",
486   sizeof(struct format_preset),
487   NULL,
488   vf_format_preset_fields_in
489 };
490 static const m_struct_t vf_format_preset_out = {
491   "stereo_format_preset_out",
492   sizeof(struct format_preset),
493   NULL,
494   vf_format_preset_fields_out
495 };
496
497 static const m_struct_t vf_opts;
498 static const m_obj_presets_t format_preset_in = {
499   (struct m_struct_st*)&vf_format_preset_in,
500   (struct m_struct_st*)&vf_opts,
501   (struct format_preset*)vf_format_presets_defs,
502   ST_OFF(name)
503 };
504 static const m_obj_presets_t format_preset_out = {
505   (struct m_struct_st*)&vf_format_preset_out,
506   (struct m_struct_st*)&vf_opts,
507   (struct format_preset*)vf_format_presets_defs,
508   ST_OFF(name)
509 };
510
511 /// Now the options
512 #undef ST_OFF
513 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
514 static const m_option_t vf_opts_fields[] = {
515   {"stereo_in", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0,
516                    (m_obj_presets_t*)&format_preset_in},
517   {"stereo_out", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0,
518                     (m_obj_presets_t*)&format_preset_out},
519   {"in", ST_OFF(in.fmt), CONF_TYPE_INT, 0,0,0, NULL},
520   {"out", ST_OFF(out.fmt), CONF_TYPE_INT, 0,0,0, NULL},
521   { NULL, NULL, 0, 0, 0, 0,  NULL }
522 };
523
524 static const m_struct_t vf_opts = {
525   "stereo3d",
526   sizeof(struct vf_priv_s),
527   &ff_vf_priv_default,
528   vf_opts_fields
529 };
530 #endif
531
532 //==info struct==//
533 const vf_info_t ff_vf_info_stereo3d = {
534     "stereoscopic 3d view",
535     "stereo3d",
536     "Gordon Schmidt",
537     "view stereoscopic videos",
538     vf_open,
539 //    &vf_opts
540 };