summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpylee <penne.y.lee@intel.com>2013-10-30 09:41:31 -0700
committerXiang, Haihao <haihao.xiang@intel.com>2015-04-03 09:28:45 +0800
commit062a63932c0f1439aa587aa986bbcfb758ff38f2 (patch)
treebbacf8a5cc1e8fb5c620108a67aba8ddabd812cd
parentdc1131911b989fee64740a12d4a74774192d3599 (diff)
downloadlibva-062a63932c0f1439aa587aa986bbcfb758ff38f2.tar.gz
Add VAConfigAttribEncSkipFrame and corresponding structures to support sending skip frame parameters to the encoder's rate control, when the user has externally skipped frames.
(cherry picked from commit 959f462709c9c4cba3243805031cf8d836a940ed) Conflicts: va/va.h
-rw-r--r--va/va.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/va/va.h b/va/va.h
index f757728..83d633f 100644
--- a/va/va.h
+++ b/va/va.h
@@ -425,6 +425,14 @@ typedef enum
* that can be configured. e.g. a value of 2 means there are two distinct quality levels.
*/
VAConfigAttribEncQualityRange = 21,
+ /**
+ * \brief Encoding skip frame attribute. Read-only.
+ *
+ * This attribute conveys whether the driver supports sending skip frame parameters
+ * (VAEncMiscParameterTypeSkipFrame) to the encoder's rate control, when the user has
+ * externally skipped frames.
+ */
+ VAConfigAttribEncSkipFrame = 24,
/**@}*/
VAConfigAttribTypeMax
} VAConfigAttribType;
@@ -1006,6 +1014,9 @@ typedef enum
/** \brief Buffer type used for HRD parameters. */
VAEncMiscParameterTypeHRD = 5,
VAEncMiscParameterTypeQualityLevel = 6,
+ /** \brief Buffer type used for sending skip frame parameters to the encoder's
+ * rate control, when the user has externally skipped frames. */
+ VAEncMiscParameterTypeSkipFrame = 9
} VAEncMiscParameterType;
/** \brief Packed header type. */
@@ -1155,6 +1166,30 @@ typedef struct _VAEncMiscParameterBufferQualityLevel {
unsigned int quality_level;
} VAEncMiscParameterBufferQualityLevel;
+/**
+ * \brief Encoding skip frame.
+ *
+ * The application may choose to skip frames externally to the encoder (e.g. drop completely or
+ * code as all skip's). For rate control purposes the encoder will need to know the size and number
+ * of skipped frames. Skip frame(s) indicated through this structure is applicable only to the
+ * current frame. It is allowed for the application to still send in packed headers for the driver to
+ * pack, although no frame will be encoded (e.g. for HW to encrypt the frame).
+ */
+typedef struct _VAEncMiscParameterSkipFrame {
+ /** \brief Indicates skip frames as below.
+ * 0: Encode as normal, no skip.
+ * 1: One or more frames were skipped prior to the current frame, encode the current frame as normal.
+ * 2: The current frame is to be skipped, do not encode it but pack/encrypt the packed header contents
+ * (all except VAEncPackedHeaderSlice) which could contain actual frame contents (e.g. pack the frame
+ * in VAEncPackedHeaderPicture). */
+ unsigned char skip_frame_flag;
+ /** \brief The number of frames skipped prior to the current frame. Valid when skip_frame_flag = 1. */
+ unsigned char num_skip_frames;
+ /** \brief When skip_frame_flag = 1, the size of the skipped frames in bits. When skip_frame_flag = 2,
+ * the size of the current skipped frame that is to be packed/encrypted in bits. */
+ unsigned int size_skip_frames;
+} VAEncMiscParameterSkipFrame;
+
/*
* There will be cases where the bitstream buffer will not have enough room to hold
* the data for the entire slice, and the following flags will be used in the slice