summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaggie Sun <maggie.sun@intel.com>2015-06-16 12:01:42 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2015-06-17 10:30:36 +0800
commit299b6a4b564db248bc64d870288d293772e4283d (patch)
treeef0188b8ed4f642d26c71082289ba16bdfa3f130
parent8455834161bab3374fe9756fd4a28d919027daf7 (diff)
downloadlibva-299b6a4b564db248bc64d870288d293772e4283d.tar.gz
Add 2 new featuers in VP8 Encode interface
1.Support Status feedback information. 2.Indicate reference frame search order. Signed-off-by: Wang, Ce <ce.wang@intel.com> Signed-off-by: Maggie Sun <maggie.sun@intel.com>
-rw-r--r--va/va_enc_vp8.h56
1 files changed, 53 insertions, 3 deletions
diff --git a/va/va_enc_vp8.h b/va/va_enc_vp8.h
index 85f7124..186c602 100644
--- a/va/va_enc_vp8.h
+++ b/va/va_enc_vp8.h
@@ -115,7 +115,12 @@ typedef struct _VAEncPictureParameterBufferVP8
VASurfaceID ref_gf_frame;
VASurfaceID ref_arf_frame;
- /* buffer to store coded data */
+ /**
+ * \brief Output encoded bitstream.
+ *
+ * \ref coded_buf has type #VAEncCodedBufferType. It should be
+ * large enough to hold the compressed bit stream.
+ */
VABufferID coded_buf;
union {
@@ -130,8 +135,19 @@ typedef struct _VAEncPictureParameterBufferVP8
unsigned int no_ref_arf : 1;
/* The temporal id the frame belongs to. */
unsigned int temporal_id : 8;
- unsigned int reserved : 20;
- } bits;
+ /**
+ * following two flags indicate the reference order
+ * LastRef is specified by 01b;
+ * GoldRef is specified by 10b;
+ * AltRef is specified by 11b;
+ * first_ref specifies the reference frame which is searched first.
+ * second_ref specifies the reference frame which is searched second
+ * if there is.
+ */
+ unsigned int first_ref : 2;
+ unsigned int second_ref : 2;
+ unsigned int reserved : 16;
+ } bits;
unsigned int value;
} ref_flags;
@@ -307,6 +323,40 @@ typedef struct _VAQMatrixBufferVP8
* If segmentation is not enabled, the application does not need to provide it.
*/
+/**
+ * \brief VP8 Encoding Information Buffer Structure
+ *
+ * This structure is used to convey status data from encoder to application.
+ * Driver allocates VACodedBufferVP8Status as a private data buffer.
+ * Driver encapsulates the status buffer with a VACodedBufferSegment,
+ * and sets VACodedBufferSegment.status to be VA_CODED_BUF_STATUS_CODEC_SPECIFIC.
+ * And driver associates status data segment to the bit stream buffer segment
+ * by setting VACodedBufferSegment.next of coded_buf (bit stream) to the private
+ * buffer segment of status data.
+ * Application accesses it by calling VAMapBuffer() with VAEncCodedBufferType.
+ *
+ */
+typedef struct _VACodedBufferVP8Status
+{
+ /** Final quantization index used (yac), determined by BRC.
+ * Application is providing quantization index deltas
+ * ydc(0), y2dc(1), y2ac(2), uvdc(3), uvac(4) that are applied to all segments
+ * and segmentation qi deltas, they will not be changed by BRC.
+ */
+ unsigned short quantization_index;
+
+ /** Final loopfilter levels for the frame, if segmentation is disabled
+ * only index 0 is used.
+ * If loop_filter_level[] is 0, it indicates loop filter is disabled.
+ */
+ char loop_filter_level[4];
+
+ /** Long term reference frame indication from BRC. BRC recommends the
+ * current frame that is being queried is a good candidate for a long
+ * term reference.
+ */
+ unsigned char long_term_indication;
+} VACodedBufferVP8Status;
/**@}*/