[Libva] [PATCH 2/2] VPP: Initialize the uninitialed surface to avoid NULL GPU buffer
Zhao Yakui
yakui.zhao at intel.com
Sun Aug 16 17:26:43 PDT 2015
On 08/14/2015 02:55 PM, Zhao Yakui wrote:
> Sometimes the surface allocation is deferred. In such case it should be
> checked correctly before it is using. Otherwise the corresponding
> GPU buffer is NULL.
> This is to fix the regression issue reported by XBMC.
>
This patch will be pushed.
Thanks.
Yakui
> Tested-by: Zaverel<zaverel at free.fr>
> Signed-off-by: Zhao Yakui<yakui.zhao at intel.com>
> ---
> src/i965_post_processing.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
> index 7efb75b..a1c0e4d 100755
> --- a/src/i965_post_processing.c
> +++ b/src/i965_post_processing.c
> @@ -5953,6 +5953,12 @@ i965_proc_picture(VADriverContextP ctx,
> unsigned int saved_filter_flag;
> struct i965_post_processing_context *i965pp_context = i965->pp_context;
>
> + if (obj_surface->fourcc == 0) {
> + i965_check_alloc_surface_bo(ctx, obj_surface, 1,
> + VA_FOURCC_NV12,
> + SUBSAMPLE_YUV420);
> + }
> +
> i965_vpp_clear_surface(ctx,&proc_context->pp_context,
> obj_surface,
> pipeline_param->output_background_color);
More information about the Libva
mailing list