summaryrefslogtreecommitdiff
path: root/src/i965_drv_video.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2014-04-19 00:12:39 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-05-26 12:06:23 +0800
commit7fb211f94dae32532d1326565b48d86e558ceb24 (patch)
tree576d04015b2ee11324dfe72cbec567885b4fb01b /src/i965_drv_video.c
parente889cefebad2a2fa2230882b8070309f23054247 (diff)
downloadlibva-intel-driver-7fb211f94dae32532d1326565b48d86e558ceb24.tar.gz
libva-intel-driver-7fb211f94dae32532d1326565b48d86e558ceb24.tar.bz2
libva-intel-driver-7fb211f94dae32532d1326565b48d86e558ceb24.zip
Simplify some macros
Now it can directly use the information in intel_device_info instead of checking the pci id. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit f1b3f83953cd5f6e39900d98b4858a7cb825dee0) Conflicts: src/gen8_post_processing.c src/i965_post_processing.c src/intel_driver.h
Diffstat (limited to 'src/i965_drv_video.c')
-rwxr-xr-xsrc/i965_drv_video.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index db8b2d1..96ca997 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1116,9 +1116,9 @@ i965_guess_surface_format(VADriverContextP ctx,
if (!obj_config)
return;
- if (IS_GEN6(i965->intel.device_id) ||
- IS_GEN7(i965->intel.device_id) ||
- IS_GEN8(i965->intel.device_id)) {
+ if (IS_GEN6(i965->intel.device_info) ||
+ IS_GEN7(i965->intel.device_info) ||
+ IS_GEN8(i965->intel.device_info)) {
*fourcc = VA_FOURCC_NV12;
*is_tiled = 1;
return;
@@ -1500,7 +1500,7 @@ i965_CreateContext(VADriverContextP ctx,
render_state->interleaved_uv = 1;
break;
default:
- render_state->interleaved_uv = !!(IS_GEN6(i965->intel.device_id) || IS_GEN7(i965->intel.device_id) || IS_GEN8(i965->intel.device_id));
+ render_state->interleaved_uv = !!(IS_GEN6(i965->intel.device_info) || IS_GEN7(i965->intel.device_info) || IS_GEN8(i965->intel.device_info));
break;
}
@@ -4213,7 +4213,7 @@ i965_GetSurfaceAttributes(
attrib_list[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
if (attrib_list[i].value.value.i == 0) {
- if (IS_G4X(i965->intel.device_id)) {
+ if (IS_G4X(i965->intel.device_info)) {
if (obj_config->profile == VAProfileMPEG2Simple ||
obj_config->profile == VAProfileMPEG2Main) {
attrib_list[i].value.value.i = VA_FOURCC_I420;
@@ -4221,7 +4221,7 @@ i965_GetSurfaceAttributes(
assert(0);
attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED;
}
- } else if (IS_IRONLAKE(i965->intel.device_id)) {
+ } else if (IS_IRONLAKE(i965->intel.device_info)) {
if (obj_config->profile == VAProfileMPEG2Simple ||
obj_config->profile == VAProfileMPEG2Main) {
attrib_list[i].value.value.i = VA_FOURCC_I420;
@@ -4235,17 +4235,17 @@ i965_GetSurfaceAttributes(
assert(0);
attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED;
}
- } else if (IS_GEN6(i965->intel.device_id)) {
+ } else if (IS_GEN6(i965->intel.device_info)) {
attrib_list[i].value.value.i = VA_FOURCC_NV12;
- } else if (IS_GEN7(i965->intel.device_id) ||
- IS_GEN8(i965->intel.device_id)) {
+ } else if (IS_GEN7(i965->intel.device_info) ||
+ IS_GEN8(i965->intel.device_info)) {
if (obj_config->profile == VAProfileJPEGBaseline)
attrib_list[i].value.value.i = 0; /* internal format */
else
attrib_list[i].value.value.i = VA_FOURCC_NV12;
}
} else {
- if (IS_G4X(i965->intel.device_id)) {
+ if (IS_G4X(i965->intel.device_info)) {
if (obj_config->profile == VAProfileMPEG2Simple ||
obj_config->profile == VAProfileMPEG2Main) {
if (attrib_list[i].value.value.i != VA_FOURCC_I420) {
@@ -4256,7 +4256,7 @@ i965_GetSurfaceAttributes(
assert(0);
attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED;
}
- } else if (IS_IRONLAKE(i965->intel.device_id)) {
+ } else if (IS_IRONLAKE(i965->intel.device_info)) {
if (obj_config->profile == VAProfileMPEG2Simple ||
obj_config->profile == VAProfileMPEG2Main) {
if (attrib_list[i].value.value.i != VA_FOURCC_I420) {
@@ -4290,7 +4290,7 @@ i965_GetSurfaceAttributes(
assert(0);
attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED;
}
- } else if (IS_GEN6(i965->intel.device_id)) {
+ } else if (IS_GEN6(i965->intel.device_info)) {
if (obj_config->entrypoint == VAEntrypointEncSlice ||
obj_config->entrypoint == VAEntrypointVideoProc) {
switch (attrib_list[i].value.value.i) {
@@ -4314,8 +4314,8 @@ i965_GetSurfaceAttributes(
attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE;
}
}
- } else if (IS_GEN7(i965->intel.device_id) ||
- IS_GEN8(i965->intel.device_id)) {
+ } else if (IS_GEN7(i965->intel.device_info) ||
+ IS_GEN8(i965->intel.device_info)) {
if (obj_config->entrypoint == VAEntrypointEncSlice ||
obj_config->entrypoint == VAEntrypointVideoProc) {
switch (attrib_list[i].value.value.i) {
@@ -4398,7 +4398,7 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
if (attribs == NULL)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
- if (IS_G4X(i965->intel.device_id)) {
+ if (IS_G4X(i965->intel.device_info)) {
if (obj_config->profile == VAProfileMPEG2Simple ||
obj_config->profile == VAProfileMPEG2Main) {
attribs[i].type = VASurfaceAttribPixelFormat;
@@ -4407,7 +4407,7 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
attribs[i].value.value.i = VA_FOURCC_I420;
i++;
}
- } else if (IS_IRONLAKE(i965->intel.device_id)) {
+ } else if (IS_IRONLAKE(i965->intel.device_info)) {
switch (obj_config->profile) {
case VAProfileMPEG2Simple:
case VAProfileMPEG2Main:
@@ -4446,7 +4446,7 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
default:
break;
}
- } else if (IS_GEN6(i965->intel.device_id)) {
+ } else if (IS_GEN6(i965->intel.device_info)) {
if (obj_config->entrypoint == VAEntrypointVLD) { /* decode */
attribs[i].type = VASurfaceAttribPixelFormat;
attribs[i].value.type = VAGenericValueTypeInteger;
@@ -4493,7 +4493,7 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
i++;
}
}
- } else if (IS_GEN7(i965->intel.device_id)) {
+ } else if (IS_GEN7(i965->intel.device_info)) {
if (obj_config->entrypoint == VAEntrypointVLD) { /* decode */
if (obj_config->profile == VAProfileJPEGBaseline) {
attribs[i].type = VASurfaceAttribPixelFormat;
@@ -4596,7 +4596,7 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
i++;
}
}
- } else if (IS_GEN8(i965->intel.device_id)) {
+ } else if (IS_GEN8(i965->intel.device_info)) {
if (obj_config->entrypoint == VAEntrypointVLD) { /* decode */
if (obj_config->profile == VAProfileJPEGBaseline) {
attribs[i].type = VASurfaceAttribPixelFormat;