[Libva] [PATCH 20/42] API: h264 encode: add packed SEI header.
Xiang, Haihao
haihao.xiang at intel.com
Mon May 13 00:51:44 PDT 2013
From: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
va/va.h | 15 +++++++++++----
va/va_enc_h264.h | 21 +++++++++++++++++++++
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/va/va.h b/va/va.h
index 9840a47..e329e64 100644
--- a/va/va.h
+++ b/va/va.h
@@ -418,6 +418,8 @@ typedef struct _VAConfigAttrib {
#define VA_ENC_PACKED_HEADER_PICTURE 0x00000002
/** \brief Driver supports packed slice headers. e.g. \c slice_header() for H.264. */
#define VA_ENC_PACKED_HEADER_SLICE 0x00000004
+/** \brief Driver supports misc packed headers. e.g. SEI for H.264. */
+#define VA_ENC_PACKED_HEADER_MISC 0x00000008
/**@}*/
/** @name Attribute values for VAConfigAttribEncInterlaced */
@@ -719,15 +721,20 @@ typedef enum
/** \brief Packed header type. */
typedef enum {
- VAEncPackedHeaderSequence = 1, /**< Packed sequence header. */
- VAEncPackedHeaderPicture = 2, /**< Packed picture header. */
- VAEncPackedHeaderSlice = 3, /**< Packed slice header. */
+ /** \brief Packed sequence header. */
+ VAEncPackedHeaderSequence = 1,
+ /** \brief Packed picture header. */
+ VAEncPackedHeaderPicture = 2,
+ /** \brief Packed slice header. */
+ VAEncPackedHeaderSlice = 3,
+ /** \brief Misc packed header. See codec-specific definitions. */
+ VAEncPackedHeaderMiscMask = 0x80000000,
} VAEncPackedHeaderType;
/** \brief Packed header parameter. */
typedef struct _VAEncPackedHeaderParameterBuffer {
/** Type of the packed header buffer. See #VAEncPackedHeaderType. */
- VAEncPackedHeaderType type;
+ unsigned int type;
/** \brief Size of the #VAEncPackedHeaderDataBuffer in bits. */
unsigned int bit_length;
/** \brief Flag: buffer contains start code emulation prevention bytes? */
diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h
index a57c333..fc809ae 100644
--- a/va/va_enc_h264.h
+++ b/va/va_enc_h264.h
@@ -65,6 +65,27 @@ extern "C" {
/**@}*/
/**
+ * \brief Packed header types specific to H.264 encoding.
+ *
+ * Types of packed headers generally used for H.264 encoding. Each
+ * associated packed header data buffer shall contain the start code
+ * prefix 0x000001 followed by the complete NAL unit, thus also
+ * including the \c nal_unit_type.
+ */
+typedef enum {
+ /**
+ * \brief Packed Supplemental Enhancement Information (SEI).
+ *
+ * The corresponding packed header data buffer shall contain the
+ * complete sei_rbsp() syntax element, thus including several
+ * sei_message() elements if necessary.
+ *
+ * Note: packed \c nal_unit_type shall be equal to 6.
+ */
+ VAEncPackedHeaderH264_SEI = (VAEncPackedHeaderMiscMask | 1),
+} VAEncPackedHeaderTypeH264;
+
+/**
* \brief Sequence parameter for H.264 encoding in main & high profiles.
*
* This structure holds information for \c seq_parameter_set_data() as
--
1.7.4.1
More information about the Libva
mailing list