[Libva] [LIBVA_INTEL_DRIVER][PATCH V2 4/8] Initialize internal context based on Render ring earlier

Sean V Kelley sean.v.kelley at intel.com
Mon Nov 14 22:16:31 UTC 2016


On Thu, Nov 10, 2016 at 5:56 PM, Zhao Yakui <yakui.zhao at intel.com> wrote:
> V1->V2: Remove the unnecessary implicit initialization in gen75_vpp_fmt_cvt
> as it is already initalized.
>
> Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>


lgtm.

Sean


> ---
>  src/gen75_picture_process.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/src/gen75_picture_process.c b/src/gen75_picture_process.c
> index 0b681f1..6e1102a 100644
> --- a/src/gen75_picture_process.c
> +++ b/src/gen75_picture_process.c
> @@ -53,11 +53,6 @@ gen75_vpp_fmt_cvt(VADriverContextP ctx,
>      struct intel_video_process_context *proc_ctx =
>               (struct intel_video_process_context *)hw_context;
>
> -    /* implicity surface format coversion and scaling */
> -    if(proc_ctx->vpp_fmt_cvt_ctx == NULL){
> -         proc_ctx->vpp_fmt_cvt_ctx = i965_proc_context_init(ctx, NULL);
> -    }
> -
>      va_status = i965_proc_picture(ctx, profile, codec_state,
>                                    proc_ctx->vpp_fmt_cvt_ctx);
>
> @@ -148,6 +143,12 @@ gen75_proc_picture(VADriverContextP ctx,
>          goto error;
>      }
>
> +    if (pipeline_param->num_filters == 0 || pipeline_param->filters == NULL ){
> +        /* explicitly initialize the VPP based on Render ring */
> +        if (proc_ctx->vpp_fmt_cvt_ctx == NULL)
> +            proc_ctx->vpp_fmt_cvt_ctx = i965_proc_context_init(ctx, NULL);
> +    }
> +
>      if (!obj_dst_surf->bo) {
>          unsigned int is_tiled = 1;
>          unsigned int fourcc = VA_FOURCC_NV12;
> --
> 1.9.0
>
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libva



-- 
Sean V. Kelley <sean.v.kelley at intel.com>
Open Source Technology Center / SSG
Intel Corp.


More information about the Libva mailing list