summaryrefslogtreecommitdiff
path: root/src/i965_decoder_utils.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-04-12 14:49:10 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-02-27 10:05:15 +0800
commit016a43518435fbefdc34187c915318cb82766aa6 (patch)
treeef101fb3d5e59dedc3a6f30b4ff100b86e020855 /src/i965_decoder_utils.c
parent3a2e4b45c0937561b1e142c9eb0e7a0dfd61d487 (diff)
Update states for VP8 decoding on BDW
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'src/i965_decoder_utils.c')
-rw-r--r--src/i965_decoder_utils.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/i965_decoder_utils.c b/src/i965_decoder_utils.c
index b3aba3d..51d38a6 100644
--- a/src/i965_decoder_utils.c
+++ b/src/i965_decoder_utils.c
@@ -654,6 +654,48 @@ error:
return VA_STATUS_ERROR_INVALID_PARAMETER;
}
+static VAStatus
+intel_decoder_check_vp8_parameter(VADriverContextP ctx,
+ struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ VAPictureParameterBufferVP8 *pic_param = (VAPictureParameterBufferVP8 *)decode_state->pic_param->buffer;
+ struct object_surface *obj_surface;
+ int i = 0;
+
+ if (pic_param->last_ref_frame != VA_INVALID_SURFACE) {
+ obj_surface = SURFACE(pic_param->last_ref_frame);
+
+ if (obj_surface && obj_surface->bo)
+ decode_state->reference_objects[i++] = obj_surface;
+ else
+ decode_state->reference_objects[i++] = NULL;
+ }
+
+ if (pic_param->golden_ref_frame != VA_INVALID_SURFACE) {
+ obj_surface = SURFACE(pic_param->golden_ref_frame);
+
+ if (obj_surface && obj_surface->bo)
+ decode_state->reference_objects[i++] = obj_surface;
+ else
+ decode_state->reference_objects[i++] = NULL;
+ }
+
+ if (pic_param->alt_ref_frame != VA_INVALID_SURFACE) {
+ obj_surface = SURFACE(pic_param->alt_ref_frame);
+
+ if (obj_surface && obj_surface->bo)
+ decode_state->reference_objects[i++] = obj_surface;
+ else
+ decode_state->reference_objects[i++] = NULL;
+ }
+
+ for ( ; i < 16; i++)
+ decode_state->reference_objects[i] = NULL;
+
+ return VA_STATUS_SUCCESS;
+}
+
VAStatus
intel_decoder_sanity_check_input(VADriverContextP ctx,
VAProfile profile,
@@ -695,6 +737,10 @@ intel_decoder_sanity_check_input(VADriverContextP ctx,
vaStatus = VA_STATUS_SUCCESS;
break;
+ case VAProfileVP8Version0_3:
+ vaStatus = intel_decoder_check_vp8_parameter(ctx, decode_state);
+ break;
+
default:
vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER;
break;