summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-11-24 14:05:59 +0000
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-08-27 10:25:37 +0200
commit8497d65077ce743cb8fea21fa5338fa7c9ee5bb1 (patch)
tree6ba2ef1192c2141f4569f01ad3564adb091dd4f0
parent121428c077e0254b2ba1ce2f23cd0d5931e9e2e8 (diff)
downloadlibva-8497d65077ce743cb8fea21fa5338fa7c9ee5bb1.tar.gz
API: h264 encode: make bitstream writers more consistent.
Avoid downcasts to the generic bitstream writer, libva will handle (and check this) internally.
-rw-r--r--va/va_enc.h5
-rw-r--r--va/va_enc_h264.h17
2 files changed, 8 insertions, 14 deletions
diff --git a/va/va_enc.h b/va/va_enc.h
index a534228..ce14da7 100644
--- a/va/va_enc.h
+++ b/va/va_enc.h
@@ -45,12 +45,9 @@ extern "C" {
/** \brief Abstract representation of a bitstream writer. */
typedef struct _VAEncBitstream VAEncBitstream;
-/** \brief Casts bitstream writer object to the base #VAEncBitstream object. */
-#define VA_ENC_BITSTREAM(bs) ((VAEncBitstream *)(bs))
-
/** @name The set of all possible error codes */
/**@{*/
-/** \brief An invalid bitstream writer was supplied. */
+/** \brief An invalid bitstream writer handle was supplied. */
#define VA_ENC_STATUS_ERROR_INVALID_BITSTREAM_WRITER (-1)
/** \brief An invalid/unsupported parameter value was supplied. */
#define VA_ENC_STATUS_ERROR_INVALID_VALUE (-2)
diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h
index 0b879da..52dbe2a 100644
--- a/va/va_enc_h264.h
+++ b/va/va_enc_h264.h
@@ -585,9 +585,6 @@ typedef struct _VAEncMacroblockParameterBufferH264 {
} info;
} VAEncMacroblockParameterBufferH264;
-/** \brief Abstract representation of an H.264 bitstream writer. */
-typedef struct _VAEncBitstreamH264 VAEncBitstreamH264;
-
/** \brief Bitstream writer attribute types specific to H.264 encoding. */
typedef enum {
/**
@@ -613,10 +610,10 @@ typedef enum {
*
* @param[in] attribs the optional attributes, or NULL
* @param[in] num_attribs the number of attributes available in \c attribs
- * @return a new #VAEncBitstreamH264, or NULL if an error occurred
+ * @return a new #VAEncBitstream, or NULL if an error occurred
*/
-VAEncBitstreamH264 *
-va_enc_h264_bitstream_new(
+VAEncBitstream *
+va_enc_bitstream_h264_new(
VAEncBitstreamAttrib *attribs,
unsigned int num_attribs
);
@@ -627,7 +624,7 @@ va_enc_h264_bitstream_new(
* @param[in] bs the bitstream writer to destroy
*/
void
-va_enc_h264_bitstream_destroy(VAEncBitstreamH264 *bs);
+va_enc_bitstream_h264_destroy(VAEncBitstream *bs);
/**
* \brief Writes an unsigned integer as \c ue(v).
@@ -640,7 +637,7 @@ va_enc_h264_bitstream_destroy(VAEncBitstreamH264 *bs);
* @return the number of bits written, or a negative value to indicate an error
*/
int
-va_enc_h264_bitstream_write_ue(VAEncBitstreamH264 *bs, unsigned int value);
+va_enc_bitstream_h264_write_ue(VAEncBitstream *bs, unsigned int value);
/**
* \brief Writes a signed integer as \c se(v).
@@ -653,7 +650,7 @@ va_enc_h264_bitstream_write_ue(VAEncBitstreamH264 *bs, unsigned int value);
* @return the number of bits written, or a negative value to indicate an error
*/
int
-va_enc_h264_bitstream_write_se(VAEncBitstreamH264 *bs, int value);
+va_enc_bitstream_h264_write_se(VAEncBitstream *bs, int value);
/**
* \brief Helper function to write trailing bits into the bitstream.
@@ -662,7 +659,7 @@ va_enc_h264_bitstream_write_se(VAEncBitstreamH264 *bs, int value);
* @return the number of bits written, or a negative value to indicate an error
*/
int
-va_enc_h264_bitstream_write_trailing_bits(VAEncBitstreamH264 *bs);
+va_enc_bitstream_h264_write_trailing_bits(VAEncBitstream *bs);
/**@}*/