diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2013-03-13 13:59:18 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-03-15 15:45:28 +0800 |
commit | 4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f (patch) | |
tree | 31822949f14e0034457fb715a550e0376e28113f | |
parent | 9fbbc9b03a52c45571d0407b889461619a8dce52 (diff) | |
download | vaapi-intel-driver-4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f.tar.gz vaapi-intel-driver-4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f.tar.bz2 vaapi-intel-driver-4b256a2f9e1c9316fe1e6238dafb6fd5fb28566f.zip |
Decoder: use surface object for the workaround
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r-- | src/gen75_mfd.c | 9 | ||||
-rwxr-xr-x | src/gen7_mfd.c | 7 | ||||
-rw-r--r-- | src/gen7_mfd.h | 1 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/gen75_mfd.c b/src/gen75_mfd.c index c01796c..4f08f38 100644 --- a/src/gen75_mfd.c +++ b/src/gen75_mfd.c @@ -2530,6 +2530,7 @@ gen75_jpeg_wa_init(VADriverContextP ctx, obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); assert(obj_surface); i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420); + gen7_mfd_context->jpeg_wa_surface_object = obj_surface; if (!gen7_mfd_context->jpeg_wa_slice_data_bo) { gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr, @@ -2575,8 +2576,7 @@ static void gen75_jpeg_wa_surface_state(VADriverContextP ctx, struct gen7_mfd_context *gen7_mfd_context) { - struct i965_driver_data *i965 = i965_driver_data(ctx); - struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); + struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object; struct intel_batchbuffer *batch = gen7_mfd_context->base.batch; BEGIN_BCS_BATCH(batch, 6); @@ -2607,7 +2607,7 @@ gen75_jpeg_wa_pipe_buf_addr_state_bplus(VADriverContextP ctx, struct gen7_mfd_context *gen7_mfd_context) { struct i965_driver_data *i965 = i965_driver_data(ctx); - struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); + struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object; struct intel_batchbuffer *batch = gen7_mfd_context->base.batch; dri_bo *intra_bo; int i; @@ -2680,7 +2680,7 @@ gen75_jpeg_wa_pipe_buf_addr_state(VADriverContextP ctx, struct gen7_mfd_context *gen7_mfd_context) { struct i965_driver_data *i965 = i965_driver_data(ctx); - struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); + struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object; struct intel_batchbuffer *batch = gen7_mfd_context->base.batch; dri_bo *intra_bo; int i; @@ -3283,6 +3283,7 @@ gen75_dec_hw_context_init(VADriverContextP ctx, struct object_config *obj_config } gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE; + gen7_mfd_context->jpeg_wa_surface_object = NULL; switch (obj_config->profile) { case VAProfileMPEG2Simple: diff --git a/src/gen7_mfd.c b/src/gen7_mfd.c index 3421c07..c081826 100755 --- a/src/gen7_mfd.c +++ b/src/gen7_mfd.c @@ -2159,6 +2159,7 @@ gen7_jpeg_wa_init(VADriverContextP ctx, obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); assert(obj_surface); i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420); + gen7_mfd_context->jpeg_wa_surface_object = obj_surface; if (!gen7_mfd_context->jpeg_wa_slice_data_bo) { gen7_mfd_context->jpeg_wa_slice_data_bo = dri_bo_alloc(i965->intel.bufmgr, @@ -2204,8 +2205,7 @@ static void gen7_jpeg_wa_surface_state(VADriverContextP ctx, struct gen7_mfd_context *gen7_mfd_context) { - struct i965_driver_data *i965 = i965_driver_data(ctx); - struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); + struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object; struct intel_batchbuffer *batch = gen7_mfd_context->base.batch; BEGIN_BCS_BATCH(batch, 6); @@ -2236,7 +2236,7 @@ gen7_jpeg_wa_pipe_buf_addr_state(VADriverContextP ctx, struct gen7_mfd_context *gen7_mfd_context) { struct i965_driver_data *i965 = i965_driver_data(ctx); - struct object_surface *obj_surface = SURFACE(gen7_mfd_context->jpeg_wa_surface_id); + struct object_surface *obj_surface = gen7_mfd_context->jpeg_wa_surface_object; struct intel_batchbuffer *batch = gen7_mfd_context->base.batch; dri_bo *intra_bo; int i; @@ -2713,6 +2713,7 @@ gen7_dec_hw_context_init(VADriverContextP ctx, struct object_config *obj_config) } gen7_mfd_context->jpeg_wa_surface_id = VA_INVALID_SURFACE; + gen7_mfd_context->jpeg_wa_surface_object = NULL; switch (obj_config->profile) { case VAProfileMPEG2Simple: diff --git a/src/gen7_mfd.h b/src/gen7_mfd.h index 0700c80..e3111ab 100644 --- a/src/gen7_mfd.h +++ b/src/gen7_mfd.h @@ -87,6 +87,7 @@ struct gen7_mfd_context GenBuffer bitplane_read_buffer; VASurfaceID jpeg_wa_surface_id; + struct object_surface *jpeg_wa_surface_object; dri_bo *jpeg_wa_slice_data_bo; int wa_mpeg2_slice_vertical_position; |