[Mesa-dev] [PATCH v2 6/8] st/va: handle Video Post Processing for configs

Christian König deathsimple at vodafone.de
Thu Oct 29 06:55:39 PDT 2015


On 22.10.2015 18:37, Julien Isorce wrote:
> Add support for VA_PROFILE_NONE and VAEntrypointVideoProc
> in the 4 following functions:
>
> vlVaQueryConfigProfiles
> vlVaQueryConfigEntrypoints
> vlVaCreateConfig
> vlVaQueryConfigAttributes
>
> Signed-off-by: Julien Isorce <j.isorce at samsung.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   src/gallium/state_trackers/va/config.c     | 20 ++++++++++++++++++++
>   src/gallium/state_trackers/va/va_private.h |  5 ++++-
>   2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
> index cfb0b25..bde6615 100644
> --- a/src/gallium/state_trackers/va/config.c
> +++ b/src/gallium/state_trackers/va/config.c
> @@ -52,6 +52,9 @@ vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int *num_
>               profile_list[(*num_profiles)++] = vap;
>         }
>   
> +   /* Support postprocessing through vl_compositor */
> +   profile_list[(*num_profiles)++] = VAProfileNone;
> +
>      return VA_STATUS_SUCCESS;
>   }
>   
> @@ -67,6 +70,11 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
>   
>      *num_entrypoints = 0;
>   
> +   if (profile == VAProfileNone) {
> +       entrypoint_list[(*num_entrypoints)++] = VAEntrypointVideoProc;
> +       return VA_STATUS_SUCCESS;
> +   }
> +
>      p = ProfileToPipe(profile);
>      if (p == PIPE_VIDEO_PROFILE_UNKNOWN)
>         return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
> @@ -118,6 +126,11 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
>      if (!ctx)
>         return VA_STATUS_ERROR_INVALID_CONTEXT;
>   
> +   if (profile == VAProfileNone && entrypoint == VAEntrypointVideoProc) {
> +       *config_id = PIPE_VIDEO_PROFILE_UNKNOWN;
> +       return VA_STATUS_SUCCESS;
> +   }
> +
>      p = ProfileToPipe(profile);
>      if (p == PIPE_VIDEO_PROFILE_UNKNOWN)
>         return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
> @@ -151,6 +164,13 @@ vlVaQueryConfigAttributes(VADriverContextP ctx, VAConfigID config_id, VAProfile
>         return VA_STATUS_ERROR_INVALID_CONTEXT;
>   
>      *profile = PipeToProfile(config_id);
> +
> +   if (config_id == PIPE_VIDEO_PROFILE_UNKNOWN) {
> +      *entrypoint = VAEntrypointVideoProc;
> +       *num_attribs = 0;
> +      return VA_STATUS_SUCCESS;
> +   }
> +
>      *entrypoint = VAEntrypointVLD;
>   
>      *num_attribs = 1;
> diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h
> index c0287e7..770c7dd 100644
> --- a/src/gallium/state_trackers/va/va_private.h
> +++ b/src/gallium/state_trackers/va/va_private.h
> @@ -147,7 +147,8 @@ PipeToProfile(enum pipe_video_profile profile)
>      case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
>         return VAProfileH264High;
>      case PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED:
> -       return VAProfileNone;
> +   case PIPE_VIDEO_PROFILE_UNKNOWN:
> +      return VAProfileNone;
>      default:
>         assert(0);
>         return -1;
> @@ -178,6 +179,8 @@ ProfileToPipe(VAProfile profile)
>         return PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN;
>      case VAProfileH264High:
>         return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH;
> +   case VAProfileNone:
> +       return PIPE_VIDEO_PROFILE_UNKNOWN;
>      default:
>         return PIPE_VIDEO_PROFILE_UNKNOWN;
>      }



More information about the mesa-dev mailing list