This is the initial patch for VLC player's polarized 3D support.
将这个patch应用到VLC播放器的源代码中,会多出一个--anaglyph-scheme polarized的3d模式,全屏幕播放视频时,可以支持偏振3D效果。
# use "./vlc --anaglyph-scheme polarized" to start vlc then watch SBS 3d in fullscreen
# brought to you by Joyer(collger AT gmail.com)
diff --git a/modules/video_filter/anaglyph.c b/modules/video_filter/anaglyph.c
index 5e103d4..6968cda 100644
--- a/modules/video_filter/anaglyph.c
+++ b/modules/video_filter/anaglyph.c
@@ -24,7 +24,7 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-
+#include <math.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
@@ -35,6 +35,7 @@ static int Create(vlc_object_t *);
static void Destroy(vlc_object_t *);
static picture_t *Filter(filter_t *, picture_t *);
static void combine_side_by_side_yuv420(picture_t *, picture_t *, int, int);
+static void combine_side_by_side_yuv420_polarized(picture_t *, picture_t *);
#define SCHEME_TEXT N_("Color scheme")
#define SCHEME_LONGTEXT N_("Define the glasses' color scheme")
@@ -51,6 +52,7 @@ enum scheme_e
red_cyan,
trioscopic,
magenta_cyan,
+ polarized
};
static const char *const ppsz_scheme_values[] = {
@@ -