summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-10-30 15:13:05 +0100
committerXiang, Haihao <haihao.xiang@intel.com>2014-12-24 08:53:17 +0800
commit141351a85edd17b0c3b0df7110f4104846ab7553 (patch)
treeecea31e359a400e3be4a7b6d0eca529c6d84db9b
parent165789f1885b6b1697ece09b6a100721418cda71 (diff)
downloadlibva-intel-driver-141351a85edd17b0c3b0df7110f4104846ab7553.tar.gz
vpp: fix check for non-linear anamorphic scaling on Sandybridge.
Fix pp_nv12_avs_initialize() to disable non-linear anamorphic scaling when not actually requested on Sandybridge. This is now the main entry point for advanced video scaling there, so the actual scaling mode is checked for beforehand. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rwxr-xr-xsrc/i965_post_processing.c42
1 files changed, 13 insertions, 29 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index e376fbab..c49a9b9c 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -133,12 +133,12 @@ static VAStatus pp_null_initialize(VADriverContextP ctx, struct i965_post_proces
struct i965_surface *dst_surface,
const VARectangle *dst_rect,
void *filter_param);
-static VAStatus pp_nv12_avs_initialize_nlas(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
- const struct i965_surface *src_surface,
- const VARectangle *src_rect,
- struct i965_surface *dst_surface,
- const VARectangle *dst_rect,
- void *filter_param);
+static VAStatus
+pp_nv12_avs_initialize(VADriverContextP ctx,
+ struct i965_post_processing_context *pp_context,
+ const struct i965_surface *src_surface, const VARectangle *src_rect,
+ struct i965_surface *dst_surface, const VARectangle *dst_rect,
+ void *filter_param);
static VAStatus pp_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
const struct i965_surface *src_surface,
const VARectangle *src_rect,
@@ -252,7 +252,7 @@ static struct pp_module pp_modules_gen5[] = {
NULL,
},
- pp_nv12_avs_initialize_nlas,
+ pp_nv12_avs_initialize,
},
{
@@ -526,7 +526,7 @@ static struct pp_module pp_modules_gen6[] = {
NULL,
},
- pp_nv12_avs_initialize_nlas,
+ pp_nv12_avs_initialize,
},
{
@@ -2485,8 +2485,7 @@ pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context
const VARectangle *src_rect,
struct i965_surface *dst_surface,
const VARectangle *dst_rect,
- void *filter_param,
- int nlas)
+ void *filter_param)
{
struct pp_avs_context *pp_avs_context = (struct pp_avs_context *)&pp_context->pp_avs_context;
struct pp_inline_parameter *pp_inline_parameter = pp_context->pp_inline_parameter;
@@ -2501,6 +2500,9 @@ pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context
AVSState * const avs = &pp_avs_context->state;
float sx, sy;
+ const int nlas = (pp_context->filter_flags & VA_FILTER_SCALING_MASK) ==
+ VA_FILTER_SCALING_NL_ANAMORPHIC;
+
/* surface */
obj_surface = (struct object_surface *)src_surface->base;
in_w = obj_surface->orig_width;
@@ -2788,23 +2790,6 @@ pp_nv12_avs_initialize(VADriverContextP ctx, struct i965_post_processing_context
}
static VAStatus
-pp_nv12_avs_initialize_nlas(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
- const struct i965_surface *src_surface,
- const VARectangle *src_rect,
- struct i965_surface *dst_surface,
- const VARectangle *dst_rect,
- void *filter_param)
-{
- return pp_nv12_avs_initialize(ctx, pp_context,
- src_surface,
- src_rect,
- dst_surface,
- dst_rect,
- filter_param,
- 1);
-}
-
-static VAStatus
gen6_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_context *pp_context,
const struct i965_surface *src_surface,
const VARectangle *src_rect,
@@ -2817,8 +2802,7 @@ gen6_nv12_scaling_initialize(VADriverContextP ctx, struct i965_post_processing_c
src_rect,
dst_surface,
dst_rect,
- filter_param,
- 0);
+ filter_param);
}
static int