aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-07-23 09:21:28 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-08-28 13:05:31 -0400
commit110841c3ab1d617107f4fb229fcd33d5ca357bbe (patch)
tree18a5b865f62c4bf943ec28f5ba843ff2b9a1cd1c /libavcodec
parent5694831e0693ad70581a766d1f0ebefbbae8bc2f (diff)
downloadffmpeg-110841c3ab1d617107f4fb229fcd33d5ca357bbe.tar.gz
avcodec: add stream-level stereo3d side data
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/utils.c9
-rw-r--r--libavcodec/version.h2
3 files changed, 16 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 93aad35d33..14440fe3c1 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -911,6 +911,12 @@ enum AVPacketSideDataType {
* See libavutil/display.h for a detailed description of the data.
*/
AV_PKT_DATA_DISPLAYMATRIX,
+
+ /*
+ * This side data should be associated with a video stream and contains
+ * Stereoscopic 3D information in form of the AVStereo3D struct.
+ */
+ AV_PKT_DATA_STEREO3D,
};
typedef struct AVPacketSideData {
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index afc0396375..c5fa50d06b 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -596,6 +596,15 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
memcpy(frame_sd->data, packet_sd, size);
}
+ /* copy the stereo3d format to the output frame */
+ packet_sd = av_packet_get_side_data(pkt, AV_PKT_DATA_STEREO3D, &size);
+ if (packet_sd) {
+ frame_sd = av_frame_new_side_data(frame, AV_FRAME_DATA_STEREO3D, size);
+ if (!frame_sd)
+ return AVERROR(ENOMEM);
+
+ memcpy(frame_sd->data, packet_sd, size);
+ }
return 0;
}
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b42b9704ad..8cc2fb0317 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 56
-#define LIBAVCODEC_VERSION_MINOR 0
+#define LIBAVCODEC_VERSION_MINOR 1
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \