summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2014-04-24 13:39:21 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-05-26 12:16:34 +0800
commita7343f9148198f25b2c10bf610c95e6ebd4fa189 (patch)
tree54c6d2719d70afc4a24b6d2c1aace4c327699397
parentcd9d671b88b6f999142a8a90a86c5b42021e6ee5 (diff)
downloadlibva-intel-driver-a7343f9148198f25b2c10bf610c95e6ebd4fa189.tar.gz
libva-intel-driver-a7343f9148198f25b2c10bf610c95e6ebd4fa189.tar.bz2
libva-intel-driver-a7343f9148198f25b2c10bf610c95e6ebd4fa189.zip
Rename HAS_PP() to HAS_VPP()
Directly check the flag of has_vpp in codec_info Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit 1c4d3468229797e787f4b99b0729baf90a115a1d) Conflicts: src/gen8_post_processing.c src/i965_post_processing.c
-rw-r--r--src/gen8_post_processing.c6
-rwxr-xr-xsrc/i965_post_processing.c13
2 files changed, 5 insertions, 14 deletions
diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
index 4ff7f41..cf613cf 100644
--- a/src/gen8_post_processing.c
+++ b/src/gen8_post_processing.c
@@ -41,12 +41,6 @@
#include "i965_render.h"
#include "intel_media.h"
-#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 bcd22cd..72279da 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -40,10 +40,7 @@
#include "i965_render.h"
#include "intel_media.h"
-#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))
@@ -4638,7 +4635,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;
@@ -4681,7 +4678,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;
@@ -5073,7 +5070,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);
@@ -5276,7 +5273,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);