summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2014-02-10 14:56:56 +0800
committerbuildslave <sys_buildbot@intel.com>2014-02-18 06:46:07 +0000
commitf6339eece05892fb49c4891b838545c41159ae39 (patch)
tree5ad277801f880f8296939eff97b6ad41a7e2f92d /va
parent1c9d519ecad2a00b197adc90a8179e91ea77321e (diff)
downloadlibva-f6339eece05892fb49c4891b838545c41159ae39.tar.gz
Update libva vp8 changes and new MVC data structure
BZ: 170069 Change-Id: I6c7b0e5380f61aac19cdb3be1b20b52311b6fdcb Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'va')
-rwxr-xr-xva/va.h8
-rw-r--r--va/va_dec_vp8.h25
-rw-r--r--va/va_enc_h264.h119
-rwxr-xr-xva/va_trace.c1
-rw-r--r--va/va_vpp.h17
5 files changed, 159 insertions, 11 deletions
diff --git a/va/va.h b/va/va.h
index 0872620..af572af 100755
--- a/va/va.h
+++ b/va/va.h
@@ -1234,7 +1234,7 @@ typedef enum
VAProcFilterParameterBufferType = 42,
VAParsePictureParameterBufferType = 43,
VAParseSliceHeaderGroupBufferType = 44,
-
+
/**
* \brief Intel specific buffer types start at 1001
*/
@@ -2618,10 +2618,11 @@ typedef enum
*/
typedef struct _VASurfaceDecodeMBErrors
{
- int status; /* 1 if hardware has returned detailed info below, -1 means this record is invalid */
+ int status; /* 1 if start_mb/end_mb with errors is returned, 2 if num_mb with errors is returned, -1 means this record is invalid */
unsigned int start_mb; /* start mb address with errors */
- unsigned int end_mb; /* end mb address with errors */
+ unsigned int end_mb; /* end mb address with errors */
VADecodeErrorType decode_error_type;
+ unsigned int num_mb; /* number of mbs with errors */
} VASurfaceDecodeMBErrors;
/*
@@ -2654,6 +2655,7 @@ VAStatus vaQuerySurfaceError(
* Pre-defined fourcc codes
*/
#define VA_FOURCC_NV12 0x3231564E
+#define VA_FOURCC_NV21 0x3132564E
#define VA_FOURCC_AI44 0x34344149
#define VA_FOURCC_RGBA 0x41424752
#define VA_FOURCC_RGBX 0x58424752
diff --git a/va/va_dec_vp8.h b/va/va_dec_vp8.h
index 268ed19..32830cb 100644
--- a/va/va_dec_vp8.h
+++ b/va/va_dec_vp8.h
@@ -54,7 +54,11 @@ typedef struct _VABoolCoderContextVPX
unsigned char range;
/* partition 0 "value" */
unsigned char value;
- /* partition 0 number of shifts before an output byte is available */
+ /*
+ * 'partition 0 number of shifts before an output byte is available'
+ * it is the number of remaining bits in 'value' for decoding, range [0, 7].
+ */
+
unsigned char count;
} VABoolCoderContextVPX;
@@ -83,7 +87,7 @@ typedef struct _VAPictureParameterBufferVP8
union {
struct {
- /* same as key_frame in bitstream syntax */
+ /* same as key_frame in bitstream syntax, 0 means a key frame */
unsigned int key_frame : 1;
/* same as version in bitstream syntax */
unsigned int version : 3;
@@ -107,8 +111,6 @@ typedef struct _VAPictureParameterBufferVP8
unsigned int sign_bias_alternate : 1;
/* same as mb_no_coeff_skip in bitstream syntax */
unsigned int mb_no_coeff_skip : 1;
- /* see section 11.1 for mb_skip_coeff */
- unsigned int mb_skip_coeff : 1;
/* flag to indicate that loop filter should be disabled */
unsigned int loop_filter_disable : 1;
} bits;
@@ -172,7 +174,7 @@ typedef struct _VASliceParameterBufferVP8
*/
unsigned int slice_data_size;
/*
- * offset to the first byte of partition data
+ * offset to the first byte of partition data (control partition)
*/
unsigned int slice_data_offset;
/*
@@ -180,12 +182,20 @@ typedef struct _VASliceParameterBufferVP8
*/
unsigned int slice_data_flag;
/*
- * offset to the first bit of MB from the first byte of partition data
+ * offset to the first bit of MB from the first byte of partition data(slice_data_offset)
*/
unsigned int macroblock_offset;
- /* Partitions */
+ /*
+ * Partitions
+ * (1<<log2_nbr_of_dct_partitions)+1, count both control partition (frame header) and toke partition
+ */
unsigned char num_of_partitions;
+ /*
+ * partition_size[0] is remaining bytes of control partition after parsed by application.
+ * exclude current byte for the remaining bits in bool_coder_ctx.
+ * exclude the uncompress data chunk since first_part_size 'excluding the uncompressed data chunk'
+ */
unsigned int partition_size[9];
} VASliceParameterBufferVP8;
@@ -219,6 +229,7 @@ typedef struct _VAIQMatrixBufferVP8
{
/*
* array first dimensional is segment and 2nd dimensional is Q index
+ * all Q indexs should be clipped to be range [0, 127]
*/
unsigned short quantization_index[4][6];
} VAIQMatrixBufferVP8;
diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h
index 43aac42..dfeda01 100644
--- a/va/va_enc_h264.h
+++ b/va/va_enc_h264.h
@@ -36,6 +36,7 @@
extern "C" {
#endif
+#include <stdint.h>
#include <va/va_enc.h>
/**
@@ -585,6 +586,124 @@ typedef struct _VAEncMacroblockParameterBufferH264 {
} info;
} VAEncMacroblockParameterBufferH264;
+/**
+ * \brief H.264 Mutiview Coding(MVC) Sequence Parameter Buffer
+ *
+ */
+typedef struct _VAEncSequenceParameterBufferH264_MVC {
+ /** brief Basic common sequence parameter */
+ VAEncSequenceParameterBufferH264 base;
+
+ /** brief Plus 1 specify the max number of views
+ * coded in the video sequence
+ */
+ uint16_t num_views_minus1;
+
+ /** brief Specify the view information in all layers */
+ struct H264SPSExtMVCViewInfo{
+ /** \brief The current view identifier. */
+ uint16_t view_id;
+ /** \brief Specifies the number of view components for inter-view
+ * prediction in the initialized RefPicList0 in decoding
+ * anchor views.
+ */
+ uint8_t num_anchor_refs_l0;
+ /** \brief Specifies the view_id for inter-view prediction in
+ * the initialized RefPicList0 in decoding anchor views.
+ */
+ uint16_t anchor_ref_l0[15];
+ /** \brief Specifies the number of view components for inter-view
+ * prediction in the initialized RefPicList1 in decoding
+ * anchor views
+ */
+ uint8_t num_anchor_refs_l1;
+ /** \brief Specifies the view_id for inter-view prediction in
+ * the initialized RefPicList1 in decoding anchor views.
+ */
+ uint16_t anchor_ref_l1[15];
+ /** \brief Specifies the number of view components for inter-view
+ * prediction in the initialized RefPicList0 in decoding
+ * non-anchor views.
+ */
+ uint8_t num_non_anchor_refs_l0;
+ /** \brief Specifies the view_id for inter-view prediction in
+ * the initialized RefPicList0 in decoding non-anchor views.
+ */
+ uint16_t non_anchor_ref_l0[15];
+ /** \brief Specifies the number of view components for inter-view
+ * prediction in the initialized RefPicList1 in decoding
+ * non-anchor view.
+ */
+ uint8_t num_non_anchor_refs_l1;
+ /** \brief Specifies the view_id for inter-view prediction in
+ * the initialized RefPicList1 in decoding non-anchor views.
+ */
+ uint16_t non_anchor_ref_l1[15];
+ }* view_list;
+
+ /** brief Plus 1 specifies the number of level values
+ * signalled for the coded video sequence
+ */
+ uint8_t num_level_values_signalled_minus1;
+
+ /** brief Level values operation for a set of the operation
+ * points in the current sequence
+ */
+ struct H264SPSExtMVCLevelValue {
+ /** \brief Specifies the level value signalled for the coded video sequence */
+ uint8_t level_idc;
+
+ /** \brief Plus 1 specifies the number of operation points to
+ * which the level indicated by level_idc applies
+ */
+ uint16_t num_applicable_ops_minus1;
+
+ /** \brief Represent the specific operation to the view in the video sequence */
+ struct H264SPSExtMVCLevelValueOps {
+ /** \brief Specify a temporal identifier for the NAL unit */
+ uint8_t temporal_id;
+ /** \brief Specify the number of the views whose level value will be modified */
+ uint16_t num_target_views_minus1;
+ /** \brief Specify the views whose level value will be modified */
+ uint16_t* target_view_id_list;
+ /** \brief Specify the number of views whose level value can be modified */
+ uint16_t num_views_minus1;
+ }* level_value_ops_list;
+
+ }* level_value_list;
+
+} VAEncSequenceParameterBufferH264_MVC;
+
+/**
+ * \brief H.264 Multiview Coding(MVC) Picture Parameter Buffer
+ *
+ */
+typedef struct _VAEncPictureParameterBufferH264_MVC
+{
+ /** brief Basic common picture parameter */
+ VAEncPictureParameterBufferH264 base;
+
+ /** brief Specifes the view id for current picture */
+ uint16_t view_id;
+
+ /** brief Specifes whether the picture is one anchor picture */
+ uint8_t anchor_pic_flag;
+
+ /** brief Specifes whether inter view reference frame
+ * is used to encode current picture.
+ */
+ uint8_t inter_view_flag;
+} VAEncPictureParameterBufferH264_MVC;
+
+typedef struct _VAEncQpBufferH264 {
+ /*
+ * \brief This structure holds luma Qp per 16x16 macroblock. Buffer size shall be
+ * sufficient to fit the slice or frame to be encoded depending on if it is a slice level
+ * or frame level encoding.
+ */
+ unsigned char qp_y;
+} VAEncQpBufferH264;
+
/** \brief Bitstream writer attribute types specific to H.264 encoding. */
typedef enum {
/**
diff --git a/va/va_trace.c b/va/va_trace.c
index 005da38..5e02e29 100755
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -2109,7 +2109,6 @@ static void va_TraceVAPictureParameterBufferVP8(
va_TraceMsg(trace_ctx, "\tsign_bias_golden = %d\n", p->pic_fields.bits.sign_bias_golden);
va_TraceMsg(trace_ctx, "\tsign_bias_alternate = %d\n", p->pic_fields.bits.sign_bias_alternate);
va_TraceMsg(trace_ctx, "\tmb_no_coeff_skip = %d\n", p->pic_fields.bits.mb_no_coeff_skip);
- va_TraceMsg(trace_ctx, "\tmb_skip_coeff = %d\n", p->pic_fields.bits.mb_skip_coeff);
va_TraceMsg(trace_ctx, "\tloop_filter_disable = %d\n", p->pic_fields.bits.loop_filter_disable);
va_TraceMsg(trace_ctx, "\tmb_segment_tree_probs: 0x%2x, 0x%2x, 0x%2x\n",
diff --git a/va/va_vpp.h b/va/va_vpp.h
index 290fa16..e1b6bf0 100644
--- a/va/va_vpp.h
+++ b/va/va_vpp.h
@@ -426,6 +426,21 @@ typedef struct _VABlendState {
#define VA_PIPELINE_FLAG_END 0x00000004
/**@}*/
+/** @name Chroma Siting flag */
+/**@{*/
+#define VA_CHROMA_SITING_UNKNOWN 0x00000000
+/** \brief Chroma samples are co-sited vertically on the top with the luma samples. */
+#define VA_CHROMA_SITING_VERTICAL_TOP 0x00000001
+/** \brief Chroma samples are not co-sited vertically with the luma samples. */
+#define VA_CHROMA_SITING_VERTICAL_CENTER 0x00000002
+/** \brief Chroma samples are co-sited vertically on the bottom with the luma samples. */
+#define VA_CHROMA_SITING_VERTICAL_BOTTOM 0x00000003
+/** \brief Chroma samples are co-sited horizontally on the left with the luma samples. */
+#define VA_CHROMA_SITING_HORIZONTAL_LEFT 0x00000004
+/** \brief Chroma samples are not co-sited horizontally with the luma samples. */
+#define VA_CHROMA_SITING_HORIZONTAL_CENTER 0x00000008
+/**@}*/
+
/** \brief Video processing pipeline capabilities. */
typedef struct _VAProcPipelineCaps {
/** \brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags. */
@@ -692,6 +707,8 @@ typedef struct _VAProcPipelineParameterBuffer {
VASurfaceID *additional_outputs;
/** \brief Number of additional output surfaces. */
unsigned int num_additional_outputs;
+ /** \brief Flag to indicate the chroma siting information. */
+ unsigned int chroma_siting_flag;
} VAProcPipelineParameterBuffer;
/**