Created
April 22, 2017 13:38
-
-
Save anonymous/e5383bd3c78bf389d124fcecde5a1556 to your computer and use it in GitHub Desktop.
add surface attribute information to G4X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- intel-vaapi-driver/src/i965_drv_video.c.orig 2017-04-20 00:11:01.000000000 +0200 | |
+++ intel-vaapi-driver/src/i965_drv_video.c 2017-04-22 15:33:21.986238617 +0200 | |
@@ -5459,15 +5459,7 @@ | |
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_info)) { | |
- if (obj_config->profile == VAProfileMPEG2Simple || | |
- obj_config->profile == VAProfileMPEG2Main) { | |
- attrib_list[i].value.value.i = VA_FOURCC_I420; | |
- } else { | |
- assert(0); | |
- attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED; | |
- } | |
- } else if (IS_IRONLAKE(i965->intel.device_info)) { | |
+ if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) { | |
if (obj_config->profile == VAProfileMPEG2Simple || | |
obj_config->profile == VAProfileMPEG2Main) { | |
attrib_list[i].value.value.i = VA_FOURCC_I420; | |
@@ -5492,18 +5484,7 @@ | |
attrib_list[i].value.value.i = VA_FOURCC_NV12; | |
} | |
} else { | |
- 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) { | |
- attrib_list[i].value.value.i = 0; | |
- attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE; | |
- } | |
- } else { | |
- assert(0); | |
- attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED; | |
- } | |
- } else if (IS_IRONLAKE(i965->intel.device_info)) { | |
+ if (IS_G4X(i965->intel.device_info) || 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) { | |
@@ -5649,16 +5630,7 @@ | |
if (attribs == NULL) | |
return VA_STATUS_ERROR_ALLOCATION_FAILED; | |
- if (IS_G4X(i965->intel.device_info)) { | |
- if (obj_config->profile == VAProfileMPEG2Simple || | |
- obj_config->profile == VAProfileMPEG2Main) { | |
- attribs[i].type = VASurfaceAttribPixelFormat; | |
- attribs[i].value.type = VAGenericValueTypeInteger; | |
- attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; | |
- attribs[i].value.value.i = VA_FOURCC_I420; | |
- i++; | |
- } | |
- } else if (IS_IRONLAKE(i965->intel.device_info)) { | |
+ if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) { | |
switch (obj_config->profile) { | |
case VAProfileMPEG2Simple: | |
case VAProfileMPEG2Main: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment