summaryrefslogtreecommitdiff
path: root/src/i965_drv_video.h
diff options
context:
space:
mode:
authorZhao, Yakui <yakui.zhao@intel.com>2014-06-12 08:54:41 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-06-16 12:00:11 +0800
commit745340dd013399f64507de73401ab3adb712dad5 (patch)
treee58afbbf2ef6272a6bf74dd2a42cc08bbb2cea5b /src/i965_drv_video.h
parent773525af39331df7a9d3178037320734774fc8be (diff)
downloadlibva-intel-driver-745340dd013399f64507de73401ab3adb712dad5.tar.gz
libva-intel-driver-745340dd013399f64507de73401ab3adb712dad5.tar.bz2
libva-intel-driver-745340dd013399f64507de73401ab3adb712dad5.zip
Encoding: Use the different delimeter to pass packed_rawdata and slice_header based on VAConfigAttribEncPackedHeaders attribute
Currently the packed_slice_header is optional. And it uses the VAEncSliceParameterBuffer as the delimeter to decide how to insert the packed rawdata/slice_header for one slice. This is not convenient under some scenario. For example: some user hope to be more flexible. When the user is responsible for generating the packed slice_header, it hopes to use the packed slice_header as the delimeter to determine how to inser the packed rawdata/slice_header for the given slice. So the VAConfigAttribEncPackedHeaders attriburation of encoding_context is used to decide which kind of delimeter. a. When the VAEncPackedSlice is set when calling vaCreateConfig, it will use the packed slice_header as delimeter. Of course the packed rawdata should be parsed before the packed slice_header for one given slice. For exmaple: for the slice 0: the packed rawdata should be parsed before paring the first packed slice_header. After one packed slice_header is parsed, it will start to parse the corresponding data for a new slice. b. When the VAEncPackedSlice is not set when calling vaCreateConfig, it will use the VAEncSliceParameterBuffer as delimeter. V1->V2: Return an error instead of only complaining warning message when packed slice_header is missing for some slice under the VAEncPackedSlice mode. This is the suggestion from Gwenole and Sreerenj Balachandran. Signed-off-by: Zhao, Yakui <yakui.zhao@intel.com> (cherry picked from commit 9d49a6d693aa6c862467a4a879bc86d9cb98dbe5)
Diffstat (limited to 'src/i965_drv_video.h')
-rw-r--r--src/i965_drv_video.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index dfa2a7a..10e8778 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -149,6 +149,12 @@ struct encode_state
int max_slice_params_ext;
int num_slice_params_ext;
+ /* Check the user-configurable packed_header attribute.
+ * Currently it is mainly used to check whether the packed slice_header data
+ * is provided by user or the driver.
+ * TBD: It will check for the packed SPS/PPS/MISC/RAWDATA and so on.
+ */
+ unsigned int packed_header_flag;
/* For the packed data that needs to be inserted into video clip */
/* currently it is mainly to track packed raw data and packed slice_header data. */
struct buffer_store **packed_header_params_ext;
@@ -158,8 +164,10 @@ struct encode_state
int max_packed_header_data_ext;
int num_packed_header_data_ext;
+ /* the index of current slice */
+ int slice_index;
/* the array is determined by max_slice_params_ext */
- int slice_num;
+ int max_slice_num;
/* This is to store the first index of packed data for one slice */
int *slice_rawdata_index;
/* This is to store the number of packed data for one slice.