aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2013-06-27 23:09:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-21 16:04:02 +0200
commit8710a634a5d422d9ee9d1578ff1c07cd39f16ce0 (patch)
tree3d0d3f2b5d11adcbb4b247b1c4df04323b7a3664 /libavcodec/h264.h
parent0f229f9b91fe3c4ebd97e88f004d638819b76add (diff)
downloadffmpeg-8710a634a5d422d9ee9d1578ff1c07cd39f16ce0.tar.gz
h264: add frame packing as stereo_mode frame metadata
This matches the matroska defintion of stereo_mode, with no metadata written if no info exist in sei Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index ed07ad6778..b2365bce83 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -127,7 +127,8 @@ typedef enum {
SEI_TYPE_PIC_TIMING = 1, ///< picture timing
SEI_TYPE_USER_DATA_ITU_T_T35 = 4, ///< user data registered by ITU-T Recommendation T.35
SEI_TYPE_USER_DATA_UNREGISTERED = 5, ///< unregistered user data
- SEI_TYPE_RECOVERY_POINT = 6 ///< recovery point (frame # to decoder sync)
+ SEI_TYPE_RECOVERY_POINT = 6, ///< recovery point (frame # to decoder sync)
+ SEI_TYPE_FRAME_PACKING = 45, ///< frame packing arrangement
} SEI_Type;
/**
@@ -146,6 +147,19 @@ typedef enum {
} SEI_PicStructType;
/**
+ * frame_packing_arrangement types
+ */
+typedef enum {
+ SEI_FPA_TYPE_CHECKERBOARD = 0,
+ SEI_FPA_TYPE_INTERLEAVE_COLUMN = 1,
+ SEI_FPA_TYPE_INTERLEAVE_ROW = 2,
+ SEI_FPA_TYPE_SIDE_BY_SIDE = 3,
+ SEI_FPA_TYPE_TOP_BOTTOM = 4,
+ SEI_FPA_TYPE_INTERLEAVE_TEMPORAL = 5,
+ SEI_FPA_TYPE_2D = 6,
+} SEI_FpaType;
+
+/**
* Sequence parameter set
*/
typedef struct SPS {
@@ -233,6 +247,18 @@ typedef struct PPS {
} PPS;
/**
+ * Frame Packing Arrangement Type
+ */
+typedef struct FPA {
+ int frame_packing_arrangement_id;
+ int frame_packing_arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received
+ SEI_FpaType frame_packing_arrangement_type;
+ int frame_packing_arrangement_repetition_period;
+ int content_interpretation_type;
+ int quincunx_sampling_flag;
+} FPA;
+
+/**
* Memory management control operation opcode.
*/
typedef enum MMCOOpcode {
@@ -628,6 +654,8 @@ typedef struct H264Context {
*/
int valid_recovery_point;
+ FPA sei_fpa;
+
int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag
int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag
@@ -775,6 +803,12 @@ void ff_h264_filter_mb(H264Context *h, int mb_x, int mb_y,
*/
void ff_h264_reset_sei(H264Context *h);
+/**
+ * Get stereo_mode string from the h264 frame_packing_arrangement
+ * @param h H.264 context.
+ */
+const char* ff_h264_sei_stereo_mode(H264Context *h);
+
/*
* o-o o-o
* / / /