summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2014-03-24 09:49:06 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-04-23 14:19:25 +0800
commit947cb535e30506922c22e84343c652b436048eaf (patch)
treeed93d668586b75a14bae7c23a05ab263f9853060
parent1ea8d643e3cde59babf46114f083bdf7e78eaaeb (diff)
VPP: Use the VA_FOURCC_ABCD constant to replace the VA_FOURCC(A,B,C,D)
This is helpful to avoid the typo error when using VA_FOURCC(A, B, C, D). Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 0b9ed6ad9fbe46812d566fa31bf6d60739757a17) Conflicts: src/i965_post_processing.c
-rw-r--r--src/gen75_picture_process.c6
-rw-r--r--src/gen75_vpp_gpe.c2
-rw-r--r--src/gen8_post_processing.c42
-rwxr-xr-xsrc/i965_post_processing.c202
4 files changed, 126 insertions, 126 deletions
diff --git a/src/gen75_picture_process.c b/src/gen75_picture_process.c
index d5b5acb..ad7d463 100644
--- a/src/gen75_picture_process.c
+++ b/src/gen75_picture_process.c
@@ -163,7 +163,7 @@ gen75_proc_picture(VADriverContextP ctx,
if (!obj_dst_surf->bo) {
unsigned int is_tiled = 0;
- unsigned int fourcc = VA_FOURCC('N','V','1','2');
+ unsigned int fourcc = VA_FOURCC_NV12;
int sampling = SUBSAMPLE_YUV420;
i965_check_alloc_surface_bo(ctx, obj_dst_surf, is_tiled, fourcc, sampling);
}
@@ -197,8 +197,8 @@ gen75_proc_picture(VADriverContextP ctx,
filter->type == VAProcFilterColorBalance){
gen75_vpp_vebox(ctx, proc_ctx);
}else if(filter->type == VAProcFilterSharpening){
- if (obj_src_surf->fourcc != VA_FOURCC('N', 'V', '1', '2') ||
- obj_dst_surf->fourcc != VA_FOURCC('N', 'V', '1', '2')) {
+ if (obj_src_surf->fourcc != VA_FOURCC_NV12 ||
+ obj_dst_surf->fourcc != VA_FOURCC_NV12) {
status = VA_STATUS_ERROR_UNIMPLEMENTED;
goto error;
}
diff --git a/src/gen75_vpp_gpe.c b/src/gen75_vpp_gpe.c
index 9cb2912..637d2bf 100644
--- a/src/gen75_vpp_gpe.c
+++ b/src/gen75_vpp_gpe.c
@@ -681,7 +681,7 @@ vpp_gpe_process_sharpening(VADriverContextP ctx,
assert(obj_surf);
if (obj_surf) {
- i965_check_alloc_surface_bo(ctx, obj_surf, 1, VA_FOURCC('N','V','1','2'),
+ i965_check_alloc_surface_bo(ctx, obj_surf, 1, VA_FOURCC_NV12,
SUBSAMPLE_YUV420);
vpp_gpe_ctx->surface_tmp_object = obj_surf;
}
diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
index 3abe287..a4fbcbb 100644
--- a/src/gen8_post_processing.c
+++ b/src/gen8_post_processing.c
@@ -469,18 +469,18 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
struct object_image *obj_image;
dri_bo *bo;
int fourcc = pp_get_surface_fourcc(ctx, surface);
- const int U = (fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
- fourcc == VA_FOURCC('Y', 'V', '1', '6') ||
- fourcc == VA_FOURCC('I', 'M', 'C', '1')) ? 2 : 1;
- const int V = (fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
- fourcc == VA_FOURCC('Y', 'V', '1', '6') ||
- fourcc == VA_FOURCC('I', 'M', 'C', '1')) ? 1 : 2;
- int interleaved_uv = fourcc == VA_FOURCC('N', 'V', '1', '2');
- int packed_yuv = (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') || fourcc == VA_FOURCC('U', 'Y', 'V', 'Y'));
- int rgbx_format = (fourcc == VA_FOURCC('R', 'G', 'B', 'A') ||
- fourcc == VA_FOURCC('R', 'G', 'B', 'X') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'A') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'X'));
+ const int U = (fourcc == VA_FOURCC_YV12 ||
+ fourcc == VA_FOURCC_YV16 ||
+ fourcc == VA_FOURCC_IMC1) ? 2 : 1;
+ const int V = (fourcc == VA_FOURCC_YV12 ||
+ fourcc == VA_FOURCC_YV16 ||
+ fourcc == VA_FOURCC_IMC1) ? 1 : 2;
+ int interleaved_uv = fourcc == VA_FOURCC_NV12;
+ int packed_yuv = (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY);
+ int rgbx_format = (fourcc == VA_FOURCC_RGBA ||
+ fourcc == VA_FOURCC_RGBX ||
+ fourcc == VA_FOURCC_BGRA ||
+ fourcc == VA_FOURCC_BGRX);
if (surface->type == I965_SURFACE_TYPE_SURFACE) {
obj_surface = (struct object_surface *)surface->base;
@@ -540,7 +540,7 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
height[2] = obj_image->image.height / 2;
pitch[2] = obj_image->image.pitches[V];
offset[2] = obj_image->image.offsets[V];
- if (fourcc == VA_FOURCC('Y', 'V', '1', '6')) {
+ if (fourcc == VA_FOURCC_YV16) {
width[1] = obj_image->image.width / 2;
height[1] = obj_image->image.height;
width[2] = obj_image->image.width / 2;
@@ -559,8 +559,8 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
struct gen7_pp_static_parameter *pp_static_parameter = pp_context->pp_static_parameter;
/* the format is MSB: X-B-G-R */
pp_static_parameter->grf2.save_avs_rgb_swap = 0;
- if ((fourcc == VA_FOURCC('B', 'G', 'R', 'A')) ||
- (fourcc == VA_FOURCC('B', 'G', 'R', 'X'))) {
+ if ((fourcc == VA_FOURCC_BGRA) ||
+ (fourcc == VA_FOURCC_BGRX)) {
/* It is stored as MSB: X-R-G-B */
pp_static_parameter->grf2.save_avs_rgb_swap = 1;
}
@@ -589,11 +589,11 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
int format0 = SURFACE_FORMAT_Y8_UNORM;
switch (fourcc) {
- case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC_YUY2:
format0 = SURFACE_FORMAT_YCRCB_NORMAL;
break;
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_UYVY:
format0 = SURFACE_FORMAT_YCRCB_SWAPY;
break;
@@ -605,8 +605,8 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
/* Only R8G8B8A8_UNORM is supported for BGRX or RGBX */
format0 = SURFACE_FORMAT_R8G8B8A8_UNORM;
pp_static_parameter->grf2.src_avs_rgb_swap = 0;
- if ((fourcc == VA_FOURCC('B', 'G', 'R', 'A')) ||
- (fourcc == VA_FOURCC('B', 'G', 'R', 'X'))) {
+ if ((fourcc == VA_FOURCC_BGRA) ||
+ (fourcc == VA_FOURCC_BGRX)) {
pp_static_parameter->grf2.src_avs_rgb_swap = 1;
}
}
@@ -751,11 +751,11 @@ static void gen7_update_src_surface_uv_offset(VADriverContextP ctx,
struct gen7_pp_static_parameter *pp_static_parameter = pp_context->pp_static_parameter;
int fourcc = pp_get_surface_fourcc(ctx, surface);
- if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2')) {
+ if (fourcc == VA_FOURCC_YUY2) {
pp_static_parameter->grf2.di_destination_packed_y_component_offset = 0;
pp_static_parameter->grf2.di_destination_packed_u_component_offset = 1;
pp_static_parameter->grf2.di_destination_packed_v_component_offset = 3;
- } else if (fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
+ } else if (fourcc == VA_FOURCC_UYVY) {
pp_static_parameter->grf2.di_destination_packed_y_component_offset = 1;
pp_static_parameter->grf2.di_destination_packed_u_component_offset = 0;
pp_static_parameter->grf2.di_destination_packed_v_component_offset = 2;
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index c4029e1..136e8e3 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -1485,20 +1485,20 @@ static void i965_update_src_surface_static_parameter(
int fourcc = pp_get_surface_fourcc(ctx, surface);
switch (fourcc) {
- case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC_YUY2:
pp_static_parameter->grf1.source_packed_u_offset = 1;
pp_static_parameter->grf1.source_packed_v_offset = 3;
break;
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_UYVY:
pp_static_parameter->grf1.source_packed_y_offset = 1;
pp_static_parameter->grf1.source_packed_v_offset = 2;
break;
- case VA_FOURCC('B', 'G', 'R', 'X'):
- case VA_FOURCC('B', 'G', 'R', 'A'):
+ case VA_FOURCC_BGRX:
+ case VA_FOURCC_BGRA:
pp_static_parameter->grf1.source_rgb_layout = 0;
break;
- case VA_FOURCC('R', 'G', 'B', 'X'):
- case VA_FOURCC('R', 'G', 'B', 'A'):
+ case VA_FOURCC_RGBX:
+ case VA_FOURCC_RGBA:
pp_static_parameter->grf1.source_rgb_layout = 1;
break;
default:
@@ -1516,20 +1516,20 @@ static void i965_update_dst_surface_static_parameter(
int fourcc = pp_get_surface_fourcc(ctx, surface);
switch (fourcc) {
- case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC_YUY2:
pp_static_parameter->grf1.r1_2.load_and_save.destination_packed_u_offset = 1;
pp_static_parameter->grf1.r1_2.load_and_save.destination_packed_v_offset = 3;
break;
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_UYVY:
pp_static_parameter->grf1.r1_2.load_and_save.destination_packed_y_offset = 1;
pp_static_parameter->grf1.r1_2.load_and_save.destination_packed_v_offset = 2;
break;
- case VA_FOURCC('B', 'G', 'R', 'X'):
- case VA_FOURCC('B', 'G', 'R', 'A'):
+ case VA_FOURCC_BGRX:
+ case VA_FOURCC_BGRA:
pp_static_parameter->grf1.r1_2.csc.destination_rgb_layout = 0;
break;
- case VA_FOURCC('R', 'G', 'B', 'X'):
- case VA_FOURCC('R', 'G', 'B', 'A'):
+ case VA_FOURCC_RGBX:
+ case VA_FOURCC_RGBA:
pp_static_parameter->grf1.r1_2.csc.destination_rgb_layout = 1;
break;
default:
@@ -1702,19 +1702,19 @@ pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_processin
dri_bo *bo;
int fourcc = pp_get_surface_fourcc(ctx, surface);
const int Y = 0;
- const int U = ((fourcc == VA_FOURCC('Y', 'V', '1', '2')) ||
- (fourcc == VA_FOURCC('Y', 'V', '1', '6')))
+ const int U = ((fourcc == VA_FOURCC_YV12) ||
+ (fourcc == VA_FOURCC_YV16))
? 2 : 1;
- const int V = ((fourcc == VA_FOURCC('Y', 'V', '1', '2')) ||
- (fourcc == VA_FOURCC('Y', 'V', '1', '6')))
+ const int V = ((fourcc == VA_FOURCC_YV12) ||
+ (fourcc == VA_FOURCC_YV16))
? 1 : 2;
const int UV = 1;
- int interleaved_uv = fourcc == VA_FOURCC('N', 'V', '1', '2');
- int packed_yuv = (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') || fourcc == VA_FOURCC('U', 'Y', 'V', 'Y'));
- int full_packed_format = (fourcc == VA_FOURCC('R', 'G', 'B', 'A') ||
- fourcc == VA_FOURCC('R', 'G', 'B', 'X') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'A') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'X'));
+ int interleaved_uv = fourcc == VA_FOURCC_NV12;
+ int packed_yuv = (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY);
+ int full_packed_format = (fourcc == VA_FOURCC_RGBA ||
+ fourcc == VA_FOURCC_RGBX ||
+ fourcc == VA_FOURCC_BGRA ||
+ fourcc == VA_FOURCC_BGRX);
int scale_factor_of_1st_plane_width_in_byte = 1;
if (surface->type == I965_SURFACE_TYPE_SURFACE) {
@@ -1774,7 +1774,7 @@ pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_processin
height[2] = obj_image->image.height / 2;
pitch[2] = obj_image->image.pitches[2];
offset[2] = obj_image->image.offsets[2];
- if (fourcc == VA_FOURCC('Y', 'V', '1', '6')) {
+ if (fourcc == VA_FOURCC_YV16) {
width[1] = obj_image->image.width / 2;
height[1] = obj_image->image.height;
width[2] = obj_image->image.width / 2;
@@ -1822,18 +1822,18 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
struct object_image *obj_image;
dri_bo *bo;
int fourcc = pp_get_surface_fourcc(ctx, surface);
- const int U = (fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
- fourcc == VA_FOURCC('Y', 'V', '1', '6') ||
- fourcc == VA_FOURCC('I', 'M', 'C', '1')) ? 2 : 1;
- const int V = (fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
- fourcc == VA_FOURCC('Y', 'V', '1', '6') ||
- fourcc == VA_FOURCC('I', 'M', 'C', '1')) ? 1 : 2;
- int interleaved_uv = fourcc == VA_FOURCC('N', 'V', '1', '2');
- int packed_yuv = (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') || fourcc == VA_FOURCC('U', 'Y', 'V', 'Y'));
- int rgbx_format = (fourcc == VA_FOURCC('R', 'G', 'B', 'A') ||
- fourcc == VA_FOURCC('R', 'G', 'B', 'X') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'A') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'X'));
+ const int U = (fourcc == VA_FOURCC_YV12 ||
+ fourcc == VA_FOURCC_YV16 ||
+ fourcc == VA_FOURCC_IMC1) ? 2 : 1;
+ const int V = (fourcc == VA_FOURCC_YV12 ||
+ fourcc == VA_FOURCC_YV16 ||
+ fourcc == VA_FOURCC_IMC1) ? 1 : 2;
+ int interleaved_uv = fourcc == VA_FOURCC_NV12;
+ int packed_yuv = (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY);
+ int rgbx_format = (fourcc == VA_FOURCC_RGBA ||
+ fourcc == VA_FOURCC_RGBX ||
+ fourcc == VA_FOURCC_BGRA ||
+ fourcc == VA_FOURCC_BGRX);
if (surface->type == I965_SURFACE_TYPE_SURFACE) {
obj_surface = (struct object_surface *)surface->base;
@@ -1892,7 +1892,7 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
height[2] = obj_image->image.height / 2;
pitch[2] = obj_image->image.pitches[V];
offset[2] = obj_image->image.offsets[V];
- if (fourcc == VA_FOURCC('Y', 'V', '1', '6')) {
+ if (fourcc == VA_FOURCC_YV16) {
width[1] = obj_image->image.width / 2;
height[1] = obj_image->image.height;
width[2] = obj_image->image.width / 2;
@@ -1911,8 +1911,8 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
struct gen7_pp_static_parameter *pp_static_parameter = pp_context->pp_static_parameter;
/* the format is MSB: X-B-G-R */
pp_static_parameter->grf2.save_avs_rgb_swap = 0;
- if ((fourcc == VA_FOURCC('B', 'G', 'R', 'A')) ||
- (fourcc == VA_FOURCC('B', 'G', 'R', 'X'))) {
+ if ((fourcc == VA_FOURCC_BGRA) ||
+ (fourcc == VA_FOURCC_BGRX)) {
/* It is stored as MSB: X-R-G-B */
pp_static_parameter->grf2.save_avs_rgb_swap = 1;
}
@@ -1941,11 +1941,11 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
int format0 = SURFACE_FORMAT_Y8_UNORM;
switch (fourcc) {
- case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC_YUY2:
format0 = SURFACE_FORMAT_YCRCB_NORMAL;
break;
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_UYVY:
format0 = SURFACE_FORMAT_YCRCB_SWAPY;
break;
@@ -1957,8 +1957,8 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
/* Only R8G8B8A8_UNORM is supported for BGRX or RGBX */
format0 = SURFACE_FORMAT_R8G8B8A8_UNORM;
pp_static_parameter->grf2.src_avs_rgb_swap = 0;
- if ((fourcc == VA_FOURCC('B', 'G', 'R', 'A')) ||
- (fourcc == VA_FOURCC('B', 'G', 'R', 'X'))) {
+ if ((fourcc == VA_FOURCC_BGRA) ||
+ (fourcc == VA_FOURCC_BGRX)) {
pp_static_parameter->grf2.src_avs_rgb_swap = 1;
}
}
@@ -2736,11 +2736,11 @@ static void gen7_update_src_surface_uv_offset(VADriverContextP ctx,
struct gen7_pp_static_parameter *pp_static_parameter = pp_context->pp_static_parameter;
int fourcc = pp_get_surface_fourcc(ctx, surface);
- if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2')) {
+ if (fourcc == VA_FOURCC_YUY2) {
pp_static_parameter->grf2.di_destination_packed_y_component_offset = 0;
pp_static_parameter->grf2.di_destination_packed_u_component_offset = 1;
pp_static_parameter->grf2.di_destination_packed_v_component_offset = 3;
- } else if (fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
+ } else if (fourcc == VA_FOURCC_UYVY) {
pp_static_parameter->grf2.di_destination_packed_y_component_offset = 1;
pp_static_parameter->grf2.di_destination_packed_u_component_offset = 0;
pp_static_parameter->grf2.di_destination_packed_v_component_offset = 2;
@@ -2942,10 +2942,10 @@ gen7_pp_plx_avs_initialize(VADriverContextP ctx, struct i965_post_processing_con
if (pp_static_parameter->grf2.avs_wa_enable) {
int src_fourcc = pp_get_surface_fourcc(ctx, src_surface);
- if ((src_fourcc == VA_FOURCC('R', 'G', 'B', 'A')) ||
- (src_fourcc == VA_FOURCC('R', 'G', 'B', 'X')) ||
- (src_fourcc == VA_FOURCC('B', 'G', 'R', 'A')) ||
- (src_fourcc == VA_FOURCC('B', 'G', 'R', 'X'))) {
+ if ((src_fourcc == VA_FOURCC_RGBA) ||
+ (src_fourcc == VA_FOURCC_RGBX) ||
+ (src_fourcc == VA_FOURCC_BGRA) ||
+ (src_fourcc == VA_FOURCC_BGRX)) {
pp_static_parameter->grf2.avs_wa_enable = 0;
}
}
@@ -3531,7 +3531,7 @@ gen7_pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c
i965_check_alloc_surface_bo(ctx,
pp_dndi_context->current_out_obj_surface,
tiling != I915_TILING_NONE,
- VA_FOURCC('N','V','1','2'),
+ VA_FOURCC_NV12,
SUBSAMPLE_YUV420);
}
@@ -4547,7 +4547,7 @@ i965_vpp_clear_surface(VADriverContextP ctx,
int region_width, region_height;
/* Currently only support NV12 surface */
- if (!obj_surface || obj_surface->fourcc != VA_FOURCC('N', 'V', '1', '2'))
+ if (!obj_surface || obj_surface->fourcc != VA_FOURCC_NV12)
return;
rgb_to_yuv(color, &y, &u, &v, &a);
@@ -4635,8 +4635,8 @@ i965_scaling_processing(
VAStatus va_status = VA_STATUS_SUCCESS;
struct i965_driver_data *i965 = i965_driver_data(ctx);
- assert(src_surface_obj->fourcc == VA_FOURCC('N', 'V', '1', '2'));
- assert(dst_surface_obj->fourcc == VA_FOURCC('N', 'V', '1', '2'));
+ 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)) {
struct i965_surface src_surface;
@@ -4687,7 +4687,7 @@ i965_post_processing(
struct i965_surface dst_surface;
/* Currently only support post processing for NV12 surface */
- if (obj_surface->fourcc != VA_FOURCC('N', 'V', '1', '2'))
+ if (obj_surface->fourcc != VA_FOURCC_NV12)
return out_surface_id;
_i965LockMutex(&i965->pp_mutex);
@@ -4707,7 +4707,7 @@ i965_post_processing(
assert(status == VA_STATUS_SUCCESS);
obj_surface = SURFACE(out_surface_id);
assert(obj_surface);
- i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC('N','V','1','2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
i965_vpp_clear_surface(ctx, i965->pp_context, obj_surface, 0);
dst_surface.base = (struct object_base *)obj_surface;
@@ -4743,7 +4743,7 @@ i965_post_processing(
assert(status == VA_STATUS_SUCCESS);
obj_surface = SURFACE(out_surface_id);
assert(obj_surface);
- i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC('N','V','1','2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
i965_vpp_clear_surface(ctx, i965->pp_context, obj_surface, 0);
dst_surface.base = (struct object_base *)obj_surface;
@@ -4807,7 +4807,7 @@ i965_image_plx_nv12_plx_processing(VADriverContextP ctx,
assert(status == VA_STATUS_SUCCESS);
obj_surface = SURFACE(tmp_surface_id);
assert(obj_surface);
- i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, obj_surface, 0, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
tmp_surface.base = (struct object_base *)obj_surface;
tmp_surface.type = I965_SURFACE_TYPE_SURFACE;
@@ -4847,7 +4847,7 @@ i965_image_pl1_rgbx_processing(VADriverContextP ctx,
VAStatus vaStatus;
switch (fourcc) {
- case VA_FOURCC('N', 'V', '1', '2'):
+ case VA_FOURCC_NV12:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4884,7 +4884,7 @@ i965_image_pl3_processing(VADriverContextP ctx,
VAStatus vaStatus = VA_STATUS_ERROR_UNIMPLEMENTED;
switch (fourcc) {
- case VA_FOURCC('N', 'V', '1', '2'):
+ case VA_FOURCC_NV12:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4895,10 +4895,10 @@ i965_image_pl3_processing(VADriverContextP ctx,
intel_batchbuffer_flush(pp_context->batch);
break;
- case VA_FOURCC('I', 'M', 'C', '1'):
- case VA_FOURCC('I', 'M', 'C', '3'):
- case VA_FOURCC('Y', 'V', '1', '2'):
- case VA_FOURCC('I', '4', '2', '0'):
+ case VA_FOURCC_IMC1:
+ case VA_FOURCC_IMC3:
+ case VA_FOURCC_YV12:
+ case VA_FOURCC_I420:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4909,8 +4909,8 @@ i965_image_pl3_processing(VADriverContextP ctx,
intel_batchbuffer_flush(pp_context->batch);
break;
- case VA_FOURCC('Y', 'U', 'Y', '2'):
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_YUY2:
+ case VA_FOURCC_UYVY:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4947,7 +4947,7 @@ i965_image_pl2_processing(VADriverContextP ctx,
VAStatus vaStatus = VA_STATUS_ERROR_UNIMPLEMENTED;
switch (fourcc) {
- case VA_FOURCC('N', 'V', '1', '2'):
+ case VA_FOURCC_NV12:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4957,10 +4957,10 @@ i965_image_pl2_processing(VADriverContextP ctx,
NULL);
break;
- case VA_FOURCC('I', 'M', 'C', '1'):
- case VA_FOURCC('I', 'M', 'C', '3'):
- case VA_FOURCC('Y', 'V', '1', '2'):
- case VA_FOURCC('I', '4', '2', '0'):
+ case VA_FOURCC_IMC1:
+ case VA_FOURCC_IMC3:
+ case VA_FOURCC_YV12:
+ case VA_FOURCC_I420:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4970,8 +4970,8 @@ i965_image_pl2_processing(VADriverContextP ctx,
NULL);
break;
- case VA_FOURCC('Y', 'U', 'Y', '2'):
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_YUY2:
+ case VA_FOURCC_UYVY:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -4981,10 +4981,10 @@ i965_image_pl2_processing(VADriverContextP ctx,
NULL);
break;
- case VA_FOURCC('B', 'G', 'R', 'X'):
- case VA_FOURCC('B', 'G', 'R', 'A'):
- case VA_FOURCC('R', 'G', 'B', 'X'):
- case VA_FOURCC('R', 'G', 'B', 'A'):
+ case VA_FOURCC_BGRX:
+ case VA_FOURCC_BGRA:
+ case VA_FOURCC_RGBX:
+ case VA_FOURCC_RGBA:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -5016,7 +5016,7 @@ i965_image_pl1_processing(VADriverContextP ctx,
VAStatus vaStatus;
switch (fourcc) {
- case VA_FOURCC('N', 'V', '1', '2'):
+ case VA_FOURCC_NV12:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -5027,7 +5027,7 @@ i965_image_pl1_processing(VADriverContextP ctx,
intel_batchbuffer_flush(pp_context->batch);
break;
- case VA_FOURCC('Y', 'V', '1', '2'):
+ case VA_FOURCC_YV12:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -5038,8 +5038,8 @@ i965_image_pl1_processing(VADriverContextP ctx,
intel_batchbuffer_flush(pp_context->batch);
break;
- case VA_FOURCC('Y', 'U', 'Y', '2'):
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_YUY2:
+ case VA_FOURCC_UYVY:
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
@@ -5079,15 +5079,15 @@ i965_image_processing(VADriverContextP ctx,
_i965LockMutex(&i965->pp_mutex);
switch (fourcc) {
- case VA_FOURCC('Y', 'V', '1', '2'):
- case VA_FOURCC('I', '4', '2', '0'):
- case VA_FOURCC('I', 'M', 'C', '1'):
- case VA_FOURCC('I', 'M', 'C', '3'):
- case VA_FOURCC('4', '2', '2', 'H'):
- case VA_FOURCC('4', '2', '2', 'V'):
- case VA_FOURCC('4', '1', '1', 'P'):
- case VA_FOURCC('4', '4', '4', 'P'):
- case VA_FOURCC('Y', 'V', '1', '6'):
+ case VA_FOURCC_YV12:
+ case VA_FOURCC_I420:
+ case VA_FOURCC_IMC1:
+ case VA_FOURCC_IMC3:
+ case VA_FOURCC_422H:
+ case VA_FOURCC_422V:
+ case VA_FOURCC_411P:
+ case VA_FOURCC_444P:
+ case VA_FOURCC_YV16:
status = i965_image_pl3_processing(ctx,
src_surface,
src_rect,
@@ -5095,25 +5095,25 @@ i965_image_processing(VADriverContextP ctx,
dst_rect);
break;
- case VA_FOURCC('N', 'V', '1', '2'):
+ case VA_FOURCC_NV12:
status = i965_image_pl2_processing(ctx,
src_surface,
src_rect,
dst_surface,
dst_rect);
break;
- case VA_FOURCC('Y', 'U', 'Y', '2'):
- case VA_FOURCC('U', 'Y', 'V', 'Y'):
+ case VA_FOURCC_YUY2:
+ case VA_FOURCC_UYVY:
status = i965_image_pl1_processing(ctx,
src_surface,
src_rect,
dst_surface,
dst_rect);
break;
- case VA_FOURCC('B', 'G', 'R', 'A'):
- case VA_FOURCC('B', 'G', 'R', 'X'):
- case VA_FOURCC('R', 'G', 'B', 'A'):
- case VA_FOURCC('R', 'G', 'B', 'X'):
+ case VA_FOURCC_BGRA:
+ case VA_FOURCC_BGRX:
+ case VA_FOURCC_RGBA:
+ case VA_FOURCC_RGBX:
status = i965_image_pl1_rgbx_processing(ctx,
src_surface,
src_rect,
@@ -5362,7 +5362,7 @@ i965_proc_picture(VADriverContextP ctx,
src_surface.flags = proc_frame_to_pp_frame[pipeline_param->filter_flags & 0x3];
VASurfaceID out_surface_id = VA_INVALID_ID;
- if (obj_surface->fourcc != VA_FOURCC('N', 'V', '1', '2')) {
+ if (obj_surface->fourcc != VA_FOURCC_NV12) {
src_surface.base = (struct object_base *)obj_surface;
src_surface.type = I965_SURFACE_TYPE_SURFACE;
src_surface.flags = I965_SURFACE_FLAG_FRAME;
@@ -5381,7 +5381,7 @@ i965_proc_picture(VADriverContextP ctx,
tmp_surfaces[num_tmp_surfaces++] = out_surface_id;
obj_surface = SURFACE(out_surface_id);
assert(obj_surface);
- i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC('N', 'V', '1', '2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
dst_surface.base = (struct object_base *)obj_surface;
dst_surface.type = I965_SURFACE_TYPE_SURFACE;
@@ -5459,7 +5459,7 @@ i965_proc_picture(VADriverContextP ctx,
tmp_surfaces[num_tmp_surfaces++] = out_surface_id;
obj_surface = SURFACE(out_surface_id);
assert(obj_surface);
- i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC('N','V','1','2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
dst_surface.base = (struct object_base *)obj_surface;
dst_surface.type = I965_SURFACE_TYPE_SURFACE;
status = i965_post_processing_internal(ctx, &proc_context->pp_context,
@@ -5487,7 +5487,7 @@ i965_proc_picture(VADriverContextP ctx,
}
int csc_needed = 0;
- if (obj_surface->fourcc && obj_surface->fourcc != VA_FOURCC('N','V','1','2')){
+ if (obj_surface->fourcc && obj_surface->fourcc != VA_FOURCC_NV12){
csc_needed = 1;
out_surface_id = VA_INVALID_ID;
status = i965_CreateSurfaces(ctx,
@@ -5500,10 +5500,10 @@ i965_proc_picture(VADriverContextP ctx,
tmp_surfaces[num_tmp_surfaces++] = out_surface_id;
struct object_surface *csc_surface = SURFACE(out_surface_id);
assert(csc_surface);
- i965_check_alloc_surface_bo(ctx, csc_surface, !!tiling, VA_FOURCC('N','V','1','2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, csc_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
dst_surface.base = (struct object_base *)csc_surface;
} else {
- i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC('N','V','1','2'), SUBSAMPLE_YUV420);
+ i965_check_alloc_surface_bo(ctx, obj_surface, !!tiling, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
dst_surface.base = (struct object_base *)obj_surface;
}