[Libva] [PATCH 3/3] VPP: add x and y region offset for blending
Li Xiaowei
xiaowei.a.li at intel.com
Mon Jul 29 05:34:42 PDT 2013
signed-off-by: Li,Xiaowei <xiaowei.a.li at intel.com>
---
src/i965_post_processing.c | 7 +++++--
src/i965_post_processing.h | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index 3414526..58751f2 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -4012,9 +4012,10 @@ static int
gen7_pp_blending_set_block_parameter(struct i965_post_processing_context *pp_context, int x, int y)
{
struct gen7_pp_inline_parameter *pp_inline_parameter = pp_context->pp_inline_parameter;
+ struct pp_blending_context *pp_blending_context = (struct pp_blending_context *)&pp_context->private_context;
- pp_inline_parameter->grf7.destination_block_horizontal_origin = x * 16;
- pp_inline_parameter->grf7.destination_block_vertical_origin = y * 16;
+ pp_inline_parameter->grf7.destination_block_horizontal_origin = x * 16 + pp_blending_context->dest_x;
+ pp_inline_parameter->grf7.destination_block_vertical_origin = y * 16 + pp_blending_context->dest_y;
return 0;
}
@@ -4076,6 +4077,8 @@ gen7_pp_nv12_blending_initialize(VADriverContextP ctx, struct i965_post_processi
pp_context->pp_y_steps = gen7_pp_blending_y_steps;
pp_context->pp_set_block_parameter = gen7_pp_blending_set_block_parameter;
+ pp_blending_context->dest_x = dst_rect->x;
+ pp_blending_context->dest_y = dst_rect->y;
pp_blending_context->dest_w = ALIGN(dst_rect->width, 16);
pp_blending_context->dest_h = ALIGN(dst_rect->height, 16);
diff --git a/src/i965_post_processing.h b/src/i965_post_processing.h
index a171274..39f7914 100755
--- a/src/i965_post_processing.h
+++ b/src/i965_post_processing.h
@@ -104,6 +104,8 @@ struct pp_dn_context
struct pp_blending_context
{
+ int dest_x;
+ int dest_y;
int dest_w;
int dest_h;
};
--
1.7.9.5
More information about the Libva
mailing list