summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-07-11 17:05:12 +0200
committerXiang, Haihao <haihao.xiang@intel.com>2010-07-12 15:44:58 +0800
commit777c69c2394eeb37dfe6143de80c3d6e05579aac (patch)
tree36a7f994a17e77c366d524152f034ecc5aadebdb
parent5438f92bc0fa803a33f59ff5ff11cee5d7b0f066 (diff)
downloadlibva-777c69c2394eeb37dfe6143de80c3d6e05579aac.tar.gz
Move initialization of render_state->interleaved_uv to vaCreateContext().
-rw-r--r--i965_drv_video/i965_drv_video.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index c5fc2a5..8f893a1 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -697,6 +697,7 @@ i965_CreateContext(VADriverContextP ctx,
VAContextID *context) /* out */
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
struct object_config *obj_config = CONFIG(config_id);
struct object_context *obj_context = NULL;
VAStatus vaStatus = VA_STATUS_SUCCESS;
@@ -718,6 +719,16 @@ i965_CreateContext(VADriverContextP ctx,
return vaStatus;
}
+ switch (obj_config->profile) {
+ case VAProfileH264Baseline:
+ case VAProfileH264Main:
+ case VAProfileH264High:
+ render_state->interleaved_uv = 1;
+ break;
+ default:
+ render_state->interleaved_uv = 0;
+ }
+
obj_context->context_id = contextID;
*context = contextID;
memset(&obj_context->decode_state, 0, sizeof(obj_context->decode_state));
@@ -1112,7 +1123,6 @@ VAStatus
i965_EndPicture(VADriverContextP ctx, VAContextID context)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct i965_render_state *render_state = &i965->render_state;
struct object_context *obj_context = CONTEXT(context);
struct object_config *obj_config;
VAContextID config;
@@ -1128,17 +1138,6 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
obj_config = CONFIG(config);
assert(obj_config);
- switch (obj_config->profile) {
- case VAProfileH264Baseline:
- case VAProfileH264Main:
- case VAProfileH264High:
- render_state->interleaved_uv = 1;
- break;
-
- default:
- render_state->interleaved_uv = 0;
- }
-
i965_media_decode_picture(ctx, obj_config->profile, &obj_context->decode_state);
obj_context->decode_state.current_render_target = -1;
obj_context->decode_state.num_slice_params = 0;