vf_stereo3d.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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. //==includes==//
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <string.h>
  24. #include "config.h"
  25. #include "mp_msg.h"
  26. #include "help_mp.h"
  27. #include "img_format.h"
  28. #include "mp_image.h"
  29. #include "vf.h"
  30. #include "libavutil/common.h"
  31. #include "libvo/fastmemcpy.h"
  32. //==types==//
  33. typedef enum stereo_code {
  34. ANAGLYPH_RC_GRAY, //anaglyph red/cyan gray
  35. ANAGLYPH_RC_HALF, //anaglyph red/cyan half colored
  36. ANAGLYPH_RC_COLOR, //anaglyph red/cyan colored
  37. ANAGLYPH_RC_DUBOIS, //anaglyph red/cyan dubois
  38. ANAGLYPH_GM_GRAY, //anaglyph green/magenta gray
  39. ANAGLYPH_GM_HALF, //anaglyph green/magenta half colored
  40. ANAGLYPH_GM_COLOR, //anaglyph green/magenta colored
  41. ANAGLYPH_YB_GRAY, //anaglyph yellow/blue gray
  42. ANAGLYPH_YB_HALF, //anaglyph yellow/blue half colored
  43. ANAGLYPH_YB_COLOR, //anaglyph yellow/blue colored
  44. MONO_L, //mono output for debugging (left eye only)
  45. MONO_R, //mono output for debugging (right eye only)
  46. SIDE_BY_SIDE_LR, //side by side parallel (left eye left, right eye right)
  47. SIDE_BY_SIDE_RL, //side by side crosseye (right eye left, left eye right)
  48. SIDE_BY_SIDE_2_LR, //side by side parallel with half width resolution
  49. SIDE_BY_SIDE_2_RL, //side by side crosseye with half width resolution
  50. ABOVE_BELOW_LR, //above-below (left eye above, right eye below)
  51. ABOVE_BELOW_RL, //above-below (right eye above, left eye below)
  52. ABOVE_BELOW_2_LR, //above-below with half height resolution
  53. ABOVE_BELOW_2_RL, //above-below with half height resolution
  54. INTERLEAVE_ROWS_LR, //row-interleave (left eye has top row)
  55. INTERLEAVE_ROWS_RL, //row-interleave (right eye has top row)
  56. STEREO_CODE_COUNT //no value set - TODO: needs autodetection
  57. } stereo_code;
  58. typedef struct component {
  59. stereo_code fmt;
  60. unsigned int width;
  61. unsigned int height;
  62. unsigned int off_left;
  63. unsigned int off_right;
  64. unsigned int row_left;
  65. unsigned int row_right;
  66. } component;
  67. //==global variables==//
  68. static const int ana_coeff[10][3][6] = {
  69. {{19595, 38470, 7471, 0, 0, 0}, //ANAGLYPH_RC_GRAY
  70. { 0, 0, 0, 19595, 38470, 7471},
  71. { 0, 0, 0, 19595, 38470, 7471}},
  72. {{19595, 38470, 7471, 0, 0, 0}, //ANAGLYPH_RC_HALF
  73. { 0, 0, 0, 0, 65536, 0},
  74. { 0, 0, 0, 0, 0, 65536}},
  75. {{65536, 0, 0, 0, 0, 0}, //ANAGLYPH_RC_COLOR
  76. { 0, 0, 0, 0, 65536, 0},
  77. { 0, 0, 0, 0, 0, 65536}},
  78. {{29891, 32800, 11559, -2849, -5763, -102}, //ANAGLYPH_RC_DUBOIS
  79. {-2627, -2479, -1033, 24804, 48080, -1209},
  80. { -997, -1350, -358, -4729, -7403, 80373}},
  81. {{ 0, 0, 0, 19595, 38470, 7471}, //ANAGLYPH_GM_GRAY
  82. {19595, 38470, 7471, 0, 0, 0},
  83. { 0, 0, 0, 19595, 38470, 7471}},
  84. {{ 0, 0, 0, 65536, 0, 0}, //ANAGLYPH_GM_HALF
  85. {19595, 38470, 7471, 0, 0, 0},
  86. { 0, 0, 0, 0, 0, 65536}},
  87. {{ 0, 0, 0, 65536, 0, 0}, //ANAGLYPH_GM_COLOR
  88. { 0, 65536, 0, 0, 0, 0},
  89. { 0, 0, 0, 0, 0, 65536}},
  90. {{ 0, 0, 0, 19595, 38470, 7471}, //ANAGLYPH_YB_GRAY
  91. { 0, 0, 0, 19595, 38470, 7471},
  92. {19595, 38470, 7471, 0, 0, 0}},
  93. {{ 0, 0, 0, 65536, 0, 0}, //ANAGLYPH_YB_HALF
  94. { 0, 0, 0, 0, 65536, 0},
  95. {19595, 38470, 7471, 0, 0, 0}},
  96. {{ 0, 0, 0, 65536, 0, 0}, //ANAGLYPH_YB_COLOR
  97. { 0, 0, 0, 0, 65536, 0},
  98. { 0, 0, 65536, 0, 0, 0}}
  99. };
  100. struct vf_priv_s {
  101. component in;
  102. component out;
  103. int ana_matrix[3][6];
  104. unsigned int width;
  105. unsigned int height;
  106. unsigned int row_step;
  107. } const vf_priv_default = {
  108. {SIDE_BY_SIDE_LR},
  109. {ANAGLYPH_RC_DUBOIS}
  110. };
  111. //==functions==//
  112. static inline uint8_t ana_convert(int coeff[6], uint8_t left[3], uint8_t right[3])
  113. {
  114. int sum;
  115. sum = coeff[0] * left[0] + coeff[3] * right[0]; //red in
  116. sum += coeff[1] * left[1] + coeff[4] * right[1]; //green in
  117. sum += coeff[2] * left[2] + coeff[5] * right[2]; //blue in
  118. return av_clip_uint8(sum >> 16);
  119. }
  120. static int config(struct vf_instance *vf, int width, int height, int d_width,
  121. int d_height, unsigned int flags, unsigned int outfmt)
  122. {
  123. if ((width & 1) || (height & 1)) {
  124. mp_msg(MSGT_VFILTER, MSGL_WARN, "[stereo3d] invalid height or width\n");
  125. return 0;
  126. }
  127. //default input values
  128. vf->priv->width = width;
  129. vf->priv->height = height;
  130. vf->priv->row_step = 1;
  131. vf->priv->in.width = width;
  132. vf->priv->in.height = height;
  133. vf->priv->in.off_left = 0;
  134. vf->priv->in.off_right = 0;
  135. vf->priv->in.row_left = 0;
  136. vf->priv->in.row_right = 0;
  137. //check input format
  138. switch (vf->priv->in.fmt) {
  139. case SIDE_BY_SIDE_2_LR:
  140. d_width *= 2;
  141. case SIDE_BY_SIDE_LR:
  142. vf->priv->width = width / 2;
  143. vf->priv->in.off_right = vf->priv->width * 3;
  144. break;
  145. case SIDE_BY_SIDE_2_RL:
  146. d_width *= 2;
  147. case SIDE_BY_SIDE_RL:
  148. vf->priv->width = width / 2;
  149. vf->priv->in.off_left = vf->priv->width * 3;
  150. break;
  151. case ABOVE_BELOW_2_LR:
  152. d_height *= 2;
  153. case ABOVE_BELOW_LR:
  154. vf->priv->height = height / 2;
  155. vf->priv->in.row_right = vf->priv->height;
  156. break;
  157. case ABOVE_BELOW_2_RL:
  158. d_height *= 2;
  159. case ABOVE_BELOW_RL:
  160. vf->priv->height = height / 2;
  161. vf->priv->in.row_left = vf->priv->height;
  162. break;
  163. default:
  164. mp_msg(MSGT_VFILTER, MSGL_WARN,
  165. "[stereo3d] stereo format of input is not supported\n");
  166. return 0;
  167. break;
  168. }
  169. //default output values
  170. vf->priv->out.width = vf->priv->width;
  171. vf->priv->out.height = vf->priv->height;
  172. vf->priv->out.off_left = 0;
  173. vf->priv->out.off_right = 0;
  174. vf->priv->out.row_left = 0;
  175. vf->priv->out.row_right = 0;
  176. //check output format
  177. switch (vf->priv->out.fmt) {
  178. case ANAGLYPH_RC_GRAY:
  179. case ANAGLYPH_RC_HALF:
  180. case ANAGLYPH_RC_COLOR:
  181. case ANAGLYPH_RC_DUBOIS:
  182. case ANAGLYPH_GM_GRAY:
  183. case ANAGLYPH_GM_HALF:
  184. case ANAGLYPH_GM_COLOR:
  185. case ANAGLYPH_YB_GRAY:
  186. case ANAGLYPH_YB_HALF:
  187. case ANAGLYPH_YB_COLOR:
  188. memcpy(vf->priv->ana_matrix, ana_coeff[vf->priv->out.fmt],
  189. sizeof(vf->priv->ana_matrix));
  190. break;
  191. case SIDE_BY_SIDE_2_LR:
  192. d_width /= 2;
  193. case SIDE_BY_SIDE_LR:
  194. vf->priv->out.width = vf->priv->width * 2;
  195. vf->priv->out.off_right = vf->priv->width * 3;
  196. break;
  197. case SIDE_BY_SIDE_2_RL:
  198. d_width /= 2;
  199. case SIDE_BY_SIDE_RL:
  200. vf->priv->out.width = vf->priv->width * 2;
  201. vf->priv->out.off_left = vf->priv->width * 3;
  202. break;
  203. case ABOVE_BELOW_2_LR:
  204. d_height /= 2;
  205. case ABOVE_BELOW_LR:
  206. vf->priv->out.height = vf->priv->height * 2;
  207. vf->priv->out.row_right = vf->priv->height;
  208. break;
  209. case ABOVE_BELOW_2_RL:
  210. d_height /= 2;
  211. case ABOVE_BELOW_RL:
  212. vf->priv->out.height = vf->priv->height * 2;
  213. vf->priv->out.row_left = vf->priv->height;
  214. break;
  215. case INTERLEAVE_ROWS_LR:
  216. vf->priv->row_step = 2;
  217. vf->priv->height = vf->priv->height / 2;
  218. vf->priv->out.off_right = vf->priv->width * 3;
  219. vf->priv->in.off_right += vf->priv->in.width * 3;
  220. break;
  221. case INTERLEAVE_ROWS_RL:
  222. vf->priv->row_step = 2;
  223. vf->priv->height = vf->priv->height / 2;
  224. vf->priv->out.off_left = vf->priv->width * 3;
  225. vf->priv->in.off_left += vf->priv->in.width * 3;
  226. break;
  227. case MONO_R:
  228. //same as MONO_L only needs switching of input offsets
  229. vf->priv->in.off_left = vf->priv->in.off_right;
  230. vf->priv->in.row_left = vf->priv->in.row_right;
  231. //nobreak;
  232. case MONO_L:
  233. //use default settings
  234. break;
  235. default:
  236. mp_msg(MSGT_VFILTER, MSGL_WARN,
  237. "[stereo3d] stereo format of output is not supported\n");
  238. return 0;
  239. break;
  240. }
  241. // if (!opt_screen_size_x && !opt_screen_size_y) {
  242. d_width = d_width * vf->priv->out.width / width;
  243. d_height = d_height * vf->priv->out.height / height;
  244. // }
  245. return vf_next_config(vf, vf->priv->out.width, vf->priv->out.height,
  246. d_width, d_height, flags, outfmt);
  247. }
  248. static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
  249. {
  250. mp_image_t *dmpi;
  251. if (vf->priv->in.fmt == vf->priv->out.fmt) { //nothing to do
  252. dmpi = mpi;
  253. } else {
  254. int out_off_left, out_off_right;
  255. int in_off_left = vf->priv->in.row_left * mpi->stride[0] +
  256. vf->priv->in.off_left;
  257. int in_off_right = vf->priv->in.row_right * mpi->stride[0] +
  258. vf->priv->in.off_right;
  259. dmpi = vf_get_image(vf->next, IMGFMT_RGB24, MP_IMGTYPE_TEMP,
  260. MP_IMGFLAG_ACCEPT_STRIDE,
  261. vf->priv->out.width, vf->priv->out.height);
  262. out_off_left = vf->priv->out.row_left * dmpi->stride[0] +
  263. vf->priv->out.off_left;
  264. out_off_right = vf->priv->out.row_right * dmpi->stride[0] +
  265. vf->priv->out.off_right;
  266. switch (vf->priv->out.fmt) {
  267. case SIDE_BY_SIDE_LR:
  268. case SIDE_BY_SIDE_RL:
  269. case SIDE_BY_SIDE_2_LR:
  270. case SIDE_BY_SIDE_2_RL:
  271. case ABOVE_BELOW_LR:
  272. case ABOVE_BELOW_RL:
  273. case ABOVE_BELOW_2_LR:
  274. case ABOVE_BELOW_2_RL:
  275. case INTERLEAVE_ROWS_LR:
  276. case INTERLEAVE_ROWS_RL:
  277. memcpy_pic2(dmpi->planes[0] + out_off_left,
  278. mpi->planes[0] + in_off_left,
  279. 3 * vf->priv->width,
  280. vf->priv->height,
  281. dmpi->stride[0] * vf->priv->row_step,
  282. mpi->stride[0] * vf->priv->row_step,
  283. vf->priv->row_step != 1);
  284. memcpy_pic2(dmpi->planes[0] + out_off_right,
  285. mpi->planes[0] + in_off_right,
  286. 3 * vf->priv->width,
  287. vf->priv->height,
  288. dmpi->stride[0] * vf->priv->row_step,
  289. mpi->stride[0] * vf->priv->row_step,
  290. vf->priv->row_step != 1);
  291. break;
  292. case MONO_L:
  293. case MONO_R:
  294. memcpy_pic(dmpi->planes[0],
  295. mpi->planes[0] + in_off_left,
  296. 3 * vf->priv->width,
  297. vf->priv->height,
  298. dmpi->stride[0],
  299. mpi->stride[0]);
  300. break;
  301. case ANAGLYPH_RC_GRAY:
  302. case ANAGLYPH_RC_HALF:
  303. case ANAGLYPH_RC_COLOR:
  304. case ANAGLYPH_RC_DUBOIS:
  305. case ANAGLYPH_GM_GRAY:
  306. case ANAGLYPH_GM_HALF:
  307. case ANAGLYPH_GM_COLOR:
  308. case ANAGLYPH_YB_GRAY:
  309. case ANAGLYPH_YB_HALF:
  310. case ANAGLYPH_YB_COLOR: {
  311. int i,x,y,il,ir,o;
  312. unsigned char *source = mpi->planes[0];
  313. unsigned char *dest = dmpi->planes[0];
  314. unsigned int out_width = vf->priv->out.width;
  315. int *ana_matrix[3];
  316. for(i = 0; i < 3; i++)
  317. ana_matrix[i] = vf->priv->ana_matrix[i];
  318. for (y = 0; y < vf->priv->out.height; y++) {
  319. o = dmpi->stride[0] * y;
  320. il = in_off_left + y * mpi->stride[0];
  321. ir = in_off_right + y * mpi->stride[0];
  322. for (x = 0; x < out_width; x++) {
  323. dest[o ] = ana_convert(
  324. ana_matrix[0], source + il, source + ir); //red out
  325. dest[o + 1] = ana_convert(
  326. ana_matrix[1], source + il, source + ir); //green out
  327. dest[o + 2] = ana_convert(
  328. ana_matrix[2], source + il, source + ir); //blue out
  329. il += 3;
  330. ir += 3;
  331. o += 3;
  332. }
  333. }
  334. break;
  335. }
  336. default:
  337. mp_msg(MSGT_VFILTER, MSGL_WARN,
  338. "[stereo3d] stereo format of output is not supported\n");
  339. return 0;
  340. break;
  341. }
  342. }
  343. return vf_next_put_image(vf, dmpi, pts);
  344. }
  345. static int query_format(struct vf_instance *vf, unsigned int fmt)
  346. {
  347. switch (fmt)
  348. case IMGFMT_RGB24:
  349. return vf_next_query_format(vf, fmt);
  350. return 0;
  351. }
  352. static void uninit(vf_instance_t *vf)
  353. {
  354. free(vf->priv);
  355. }
  356. static int vf_open(vf_instance_t *vf, char *args)
  357. {
  358. vf->config = config;
  359. vf->uninit = uninit;
  360. vf->put_image = put_image;
  361. vf->query_format = query_format;
  362. vf->priv=malloc(sizeof(struct vf_priv_s));
  363. memset(vf->priv, 0, sizeof(struct vf_priv_s));
  364. vf->priv->in.fmt = SIDE_BY_SIDE_LR;
  365. vf->priv->out.fmt= ANAGLYPH_RC_DUBOIS;
  366. if (args) sscanf(args, "%d:%d", &vf->priv->in.fmt, &vf->priv->out.fmt);
  367. return 1;
  368. }
  369. #if 0
  370. ///Presets usage
  371. static const struct format_preset {
  372. char* name;
  373. stereo_code scode;
  374. } vf_format_presets_defs[] = {
  375. {"arcg", ANAGLYPH_RC_GRAY},
  376. {"anaglyph_red_cyan_gray", ANAGLYPH_RC_GRAY},
  377. {"arch", ANAGLYPH_RC_HALF},
  378. {"anaglyph_red_cyan_half_color", ANAGLYPH_RC_HALF},
  379. {"arcc", ANAGLYPH_RC_COLOR},
  380. {"anaglyph_red_cyan_color", ANAGLYPH_RC_COLOR},
  381. {"arcd", ANAGLYPH_RC_DUBOIS},
  382. {"anaglyph_red_cyan_dubios", ANAGLYPH_RC_DUBOIS},
  383. {"agmg", ANAGLYPH_GM_GRAY},
  384. {"anaglyph_green_magenta_gray", ANAGLYPH_GM_GRAY},
  385. {"agmh", ANAGLYPH_GM_HALF},
  386. {"anaglyph_green_magenta_half_color",ANAGLYPH_GM_HALF},
  387. {"agmc", ANAGLYPH_GM_COLOR},
  388. {"anaglyph_green_magenta_color", ANAGLYPH_GM_COLOR},
  389. {"aybg", ANAGLYPH_YB_GRAY},
  390. {"anaglyph_yellow_blue_gray", ANAGLYPH_YB_GRAY},
  391. {"aybh", ANAGLYPH_YB_HALF},
  392. {"anaglyph_yellow_blue_half_color", ANAGLYPH_YB_HALF},
  393. {"aybc", ANAGLYPH_YB_COLOR},
  394. {"anaglyph_yellow_blue_color", ANAGLYPH_YB_COLOR},
  395. {"ml", MONO_L},
  396. {"mono_left", MONO_L},
  397. {"mr", MONO_R},
  398. {"mono_right", MONO_R},
  399. {"sbsl", SIDE_BY_SIDE_LR},
  400. {"side_by_side_left_first", SIDE_BY_SIDE_LR},
  401. {"sbsr", SIDE_BY_SIDE_RL},
  402. {"side_by_side_right_first", SIDE_BY_SIDE_RL},
  403. {"sbs2l", SIDE_BY_SIDE_2_LR},
  404. {"side_by_side_half_width_left_first", SIDE_BY_SIDE_2_LR},
  405. {"sbs2r", SIDE_BY_SIDE_2_RL},
  406. {"side_by_side_half_width_right_first",SIDE_BY_SIDE_2_RL},
  407. {"abl", ABOVE_BELOW_LR},
  408. {"above_below_left_first", ABOVE_BELOW_LR},
  409. {"abr", ABOVE_BELOW_RL},
  410. {"above_below_right_first", ABOVE_BELOW_RL},
  411. {"ab2l", ABOVE_BELOW_2_LR},
  412. {"above_below_half_height_left_first", ABOVE_BELOW_2_LR},
  413. {"ab2r", ABOVE_BELOW_2_RL},
  414. {"above_below_half_height_right_first",ABOVE_BELOW_2_RL},
  415. {"irl", INTERLEAVE_ROWS_LR},
  416. {"interleave_rows_left_first", INTERLEAVE_ROWS_LR},
  417. {"irr", INTERLEAVE_ROWS_RL},
  418. {"interleave_rows_right_first", INTERLEAVE_ROWS_RL},
  419. { NULL, 0}
  420. };
  421. #define ST_OFF(f) M_ST_OFF(struct format_preset,f)
  422. static const m_option_t vf_format_preset_fields_in[] = {
  423. {"in", ST_OFF(scode), CONF_TYPE_INT, 0,0,0, NULL},
  424. { NULL, NULL, 0, 0, 0, 0, NULL }
  425. };
  426. static const m_option_t vf_format_preset_fields_out[] = {
  427. {"out", ST_OFF(scode), CONF_TYPE_INT, 0,0,0, NULL},
  428. { NULL, NULL, 0, 0, 0, 0, NULL }
  429. };
  430. static const m_struct_t vf_format_preset_in = {
  431. "stereo_format_preset_in",
  432. sizeof(struct format_preset),
  433. NULL,
  434. vf_format_preset_fields_in
  435. };
  436. static const m_struct_t vf_format_preset_out = {
  437. "stereo_format_preset_out",
  438. sizeof(struct format_preset),
  439. NULL,
  440. vf_format_preset_fields_out
  441. };
  442. static const m_struct_t vf_opts;
  443. static const m_obj_presets_t format_preset_in = {
  444. (struct m_struct_st*)&vf_format_preset_in,
  445. (struct m_struct_st*)&vf_opts,
  446. (struct format_preset*)vf_format_presets_defs,
  447. ST_OFF(name)
  448. };
  449. static const m_obj_presets_t format_preset_out = {
  450. (struct m_struct_st*)&vf_format_preset_out,
  451. (struct m_struct_st*)&vf_opts,
  452. (struct format_preset*)vf_format_presets_defs,
  453. ST_OFF(name)
  454. };
  455. /// Now the options
  456. #undef ST_OFF
  457. #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
  458. static const m_option_t vf_opts_fields[] = {
  459. {"stereo_in", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0,
  460. (m_obj_presets_t*)&format_preset_in},
  461. {"stereo_out", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0,
  462. (m_obj_presets_t*)&format_preset_out},
  463. {"in", ST_OFF(in.fmt), CONF_TYPE_INT, 0,0,0, NULL},
  464. {"out", ST_OFF(out.fmt), CONF_TYPE_INT, 0,0,0, NULL},
  465. { NULL, NULL, 0, 0, 0, 0, NULL }
  466. };
  467. static const m_struct_t vf_opts = {
  468. "stereo3d",
  469. sizeof(struct vf_priv_s),
  470. &vf_priv_default,
  471. vf_opts_fields
  472. };
  473. #endif
  474. //==info struct==//
  475. const vf_info_t vf_info_stereo3d = {
  476. "stereoscopic 3d view",
  477. "stereo3d",
  478. "Gordon Schmidt",
  479. "view stereoscopic videos",
  480. vf_open,
  481. // &vf_opts
  482. };