[Mesa-dev] [PATCH 07/20] st/va: create decoder for MJPEG format

Christian König deathsimple at vodafone.de
Thu Aug 17 09:12:03 UTC 2017


Am 16.08.2017 um 19:53 schrieb Leo Liu:
> Mjpeg doesn't need reference
>
> Signed-off-by: Leo Liu <leo.liu at amd.com>

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

> ---
>   src/gallium/state_trackers/va/picture.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
> index 338e0902d6..30617e8cfe 100644
> --- a/src/gallium/state_trackers/va/picture.c
> +++ b/src/gallium/state_trackers/va/picture.c
> @@ -170,14 +170,17 @@ handlePictureParameterBuffer(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *
>   
>      /* Create the decoder once max_references is known. */
>      if (!context->decoder) {
> +      enum pipe_video_format format =
> +         u_reduce_video_profile(context->templat.profile);
> +
>         if (!context->target)
>            return VA_STATUS_ERROR_INVALID_CONTEXT;
>   
> -      if (context->templat.max_references == 0)
> +      if (context->templat.max_references == 0 &&
> +         format != PIPE_VIDEO_FORMAT_JPEG)
>            return VA_STATUS_ERROR_INVALID_BUFFER;
>   
> -      if (u_reduce_video_profile(context->templat.profile) ==
> -          PIPE_VIDEO_FORMAT_MPEG4_AVC)
> +      if (format == PIPE_VIDEO_FORMAT_MPEG4_AVC)
>            context->templat.level = u_get_h264_level(context->templat.width,
>               context->templat.height, &context->templat.max_references);
>   




More information about the mesa-dev mailing list