[Libva] [PATCH] Encode: Don't mess up the index handling of packed raw data with packed slice header
sreerenj.balachandran at intel.com
sreerenj.balachandran at intel.com
Wed May 28 00:10:20 PDT 2014
From: Sreerenj Balachandran <sreerenj.balachandran at intel.com>
Avoid storing packed slice header index as packed raw data index.
This is necessary for handling the use case of having
only packed slice header and no packed raw data feeding from user.
---
src/i965_drv_video.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index c5a4f37..b69c606 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -2334,8 +2334,7 @@ i965_encoder_render_picture(VADriverContextP ctx,
vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER;
return vaStatus;
}
- if (encode->last_packed_header_type == VAEncPackedHeaderRawData ||
- encode->last_packed_header_type == VAEncPackedHeaderSlice) {
+ if (encode->last_packed_header_type == VAEncPackedHeaderRawData) {
vaStatus = I965_RENDER_ENCODE_BUFFER(packed_header_data_ext);
if (vaStatus == VA_STATUS_SUCCESS) {
/* store the first index of the packed header data for current slice */
@@ -2344,6 +2343,10 @@ i965_encoder_render_picture(VADriverContextP ctx,
SLICE_PACKED_DATA_INDEX_TYPE | (encode->num_packed_header_data_ext - 1);
}
encode->slice_rawdata_count[encode->num_slice_params_ext]++;
+ }
+ } else if (encode->last_packed_header_type == VAEncPackedHeaderSlice) {
+ vaStatus = I965_RENDER_ENCODE_BUFFER(packed_header_data_ext);
+ if (vaStatus == VA_STATUS_SUCCESS) {
if (encode->last_packed_header_type == VAEncPackedHeaderSlice) {
if (encode->slice_header_index[encode->num_slice_params_ext] == 0) {
encode->slice_header_index[encode->num_slice_params_ext] =
--
1.9.1
More information about the Libva
mailing list