[Libva] [PATCH libva-intel-driver] Rename HAS_PP() to HAS_VPP()
Xiang, Haihao
haihao.xiang at intel.com
Wed Apr 23 22:39:21 PDT 2014
From: "Xiang, Haihao" <haihao.xiang at intel.com>
Directly check the flag of has_vpp in codec_info
Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
src/gen8_post_processing.c | 6 ------
src/i965_post_processing.c | 14 +++++---------
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
index 5bfd042..1abfd27 100644
--- a/src/gen8_post_processing.c
+++ b/src/gen8_post_processing.c
@@ -43,12 +43,6 @@
#define HAS_BLENDING(ctx) ((ctx)->codec_info->has_blending)
-#define HAS_PP(ctx) (IS_IRONLAKE((ctx)->intel.device_info) || \
- IS_GEN6((ctx)->intel.device_info) || \
- IS_GEN7((ctx)->intel.device_info) || \
- IS_GEN8((ctx)->intel.device_info))
-
-
#define SURFACE_STATE_PADDED_SIZE SURFACE_STATE_PADDED_SIZE_GEN8
#define SURFACE_STATE_OFFSET(index) (SURFACE_STATE_PADDED_SIZE * index)
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index 82f594c..9bfcf49 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -42,11 +42,7 @@
#define HAS_BLENDING(ctx) ((ctx)->codec_info->has_blending)
-#define HAS_PP(ctx) (IS_IRONLAKE((ctx)->intel.device_info) || \
- IS_GEN6((ctx)->intel.device_info) || \
- IS_GEN7((ctx)->intel.device_info) || \
- IS_GEN8((ctx)->intel.device_info))
-
+#define HAS_VPP(ctx) ((ctx)->codec_info->has_vpp)
#define SURFACE_STATE_PADDED_SIZE MAX(SURFACE_STATE_PADDED_SIZE_GEN8,\
MAX(SURFACE_STATE_PADDED_SIZE_GEN6, SURFACE_STATE_PADDED_SIZE_GEN7))
@@ -4786,7 +4782,7 @@ i965_scaling_processing(
assert(src_surface_obj->fourcc == VA_FOURCC_NV12);
assert(dst_surface_obj->fourcc == VA_FOURCC_NV12);
- if (HAS_PP(i965) && (flags & I965_PP_FLAG_AVS)) {
+ if (HAS_VPP(i965) && (flags & I965_PP_FLAG_AVS)) {
struct i965_surface src_surface;
struct i965_surface dst_surface;
@@ -4829,7 +4825,7 @@ i965_post_processing(
*has_done_scaling = 0;
- if (HAS_PP(i965)) {
+ if (HAS_VPP(i965)) {
VAStatus status;
struct i965_surface src_surface;
struct i965_surface dst_surface;
@@ -5221,7 +5217,7 @@ i965_image_processing(VADriverContextP ctx,
struct i965_driver_data *i965 = i965_driver_data(ctx);
VAStatus status = VA_STATUS_ERROR_UNIMPLEMENTED;
- if (HAS_PP(i965)) {
+ if (HAS_VPP(i965)) {
int fourcc = pp_get_surface_fourcc(ctx, src_surface);
_i965LockMutex(&i965->pp_mutex);
@@ -5423,7 +5419,7 @@ i965_post_processing_init(VADriverContextP ctx)
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct i965_post_processing_context *pp_context = i965->pp_context;
- if (HAS_PP(i965)) {
+ if (HAS_VPP(i965)) {
if (pp_context == NULL) {
pp_context = calloc(1, sizeof(*pp_context));
i965->codec_info->post_processing_context_init(ctx, pp_context, i965->pp_batch);
--
1.7.9.5
More information about the Libva
mailing list