[Libva] [PATCH intel-driver] dri: return error for unimplemented subsampling types

Xiang, Haihao haihao.xiang at intel.com
Fri Jul 22 05:46:06 UTC 2016


> Previously YUV422 surfaces were allowed to be rendered but got
> rendered improperly.

YUV422 (planar) surface works for me, but packed surface is not
supported.


> 
> Signed-off-by: Scott D Phillips <scott.d.phillips at intel.com>
> ---
>  src/i965_output_dri.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/i965_output_dri.c b/src/i965_output_dri.c
> index d36fec5..f141a67 100644
> --- a/src/i965_output_dri.c
> +++ b/src/i965_output_dri.c
> @@ -26,6 +26,7 @@
>  
>  #include <va/va_dricommon.h>
>  
> +#include "i965_defines.h"
>  #include "i965_drv_video.h"
>  #include "i965_output_dri.h"
>  #include "dso_utils.h"
> @@ -135,6 +136,9 @@ i965_put_surface_dri(
>       */
>      obj_surface = SURFACE(surface);
>      ASSERT_RET(obj_surface && obj_surface->bo, VA_STATUS_SUCCESS);
> +    ASSERT_RET(obj_surface->subsampling == SUBSAMPLE_YUV420 ||
> +               obj_surface->subsampling == SUBSAMPLE_RGBX,
> +               VA_STATUS_ERROR_UNIMPLEMENTED);

Currently i965_put_surface_dri() supports
YUV400/YUV411/YUV420/YUV422/YUV444, but it doesn't support RGBA. 

>  
>      _i965LockMutex(&i965->render_mutex);
>  


More information about the Libva mailing list