---
I'm not so sure about the anaglyph information, maybe it's better to remove it
altogether?
---
libavcodec/avcodec.h | 35 +++++++++++++++++++++++++++++++
libavutil/Makefile | 1 +
libavutil/frame.h | 4 ++++
libavutil/stereoscopy.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 92 insertions(+)
create mode 100644 libavutil/stereoscopy.h
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f4a10e1..4b64b79 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -37,6 +37,7 @@
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
+#include "libavutil/stereoscopy.h"
#include "libavcodec/version.h"
/**
@@ -802,6 +803,40 @@ typedef struct AVPanScan{
int16_t position[3][2];
}AVPanScan;
+/**
+ * Stereoscopic 3D area.
+ * This specifies how the stereoscopic pair is packed.
+ */
+typedef struct AVStereo3D {
+ /**
+ * mode of storing the stereo pair
+ * - encoding: Not set.
+ * - decoding: Set by libavcodec.
+ */
+ enum AVStereo3DType type;
+
+ /**
+ * order of the views
+ * - encoding: Not set.
+ * - decoding: Set by libavcodec.
+ */
+ enum AVStereo3DOrder order;
+
+ /**
+ * if mode is anaglyph, which mode it is
+ * - encoding: Not set.
+ * - decoding: Set by libavcodec.
+ */
+ enum AVStereo3DOld anaglyph;
+
+ /**
+ * the views are at full size or half width
+ * - encoding: Not set.
+ * - decoding: Set by libavcodec.
+ */
+ int fullsize;
+} AVStereo3D;
+
#define FF_QSCALE_TYPE_MPEG1 0
#define FF_QSCALE_TYPE_MPEG2 1
#define FF_QSCALE_TYPE_H264 2
diff --git a/libavutil/Makefile b/libavutil/Makefile
index 910f6f0..db33ff7 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -41,6 +41,7 @@ HEADERS = adler32.h
\
rational.h \
samplefmt.h \
sha.h \
+ stereoscopy.h \
time.h \
version.h \
xtea.h \
diff --git a/libavutil/frame.h b/libavutil/frame.h
index adc23b2..708b80d 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -35,6 +35,10 @@ enum AVFrameSideDataType {
* The data is the AVPanScan struct defined in libavcodec.
*/
AV_FRAME_DATA_PANSCAN,
+ /**
+ * The data is the AVStereo3D struct defined in libavcodec.
+ */
+ AV_FRAME_DATA_STEREO3D,
};
typedef struct AVFrameSideData {
diff --git a/libavutil/stereoscopy.h b/libavutil/stereoscopy.h
new file mode 100644
index 0000000..f28c9f3
--- /dev/null
+++ b/libavutil/stereoscopy.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013 Vittorio Giovara <[email protected]>
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+/* How views are packed within the frame */
+enum AVStereo3DType {
+ STEREO_NONE,
+ STEREO_ANAGLYPH,
+ STEREO_FRAMESEQUENCE,
+ STEREO_SIDEBYSIDE,
+ STEREO_TOPBOTTOM,
+ STEREO_CHECKERS,
+ STEREO_LINES,
+ STEREO_COLUMNS,
+};
+
+/* Left/Rigth or Right/Left */
+enum AVStereo3DOrder {
+ ORDER_NA,
+ ORDER_LR,
+ ORDER_RL,
+};
+
+/* https://en.wikipedia.org/wiki/Anaglyph_3D */
+enum AVStereo3DOld {
+ ANAGLYPH_NONE,
+ ANAGLYPH_RED_GREEN,
+ ANAGLYPH_RED_BLUE,
+ ANAGLYPH_RED_CYAN,
+ ANAGLYPH_GREEN_MAGENTA,
+ ANAGLYPH_AMBER_BLUE,
+ ANAGLYPH_MAGENTA_CYAN,
+};
+
+
--
1.7.9.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel