[Libva] [Libva-intel-driver PATCH] Fix the broken attribute setting of i965_GetConfigAttrib

Xiang, Haihao haihao.xiang at intel.com
Tue Jan 6 21:48:38 PST 2015


LGTM.

Thanks
Haihao

> From: Zhao Yakui <yakui.zhao at intel.com>
> 
> Now the some attributes are incorrectly reported. It is not supported while
> VA_ATTRIB_NOT_SUPPORTED flag is not returned.
> 
> Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
> ---
>  src/i965_drv_video.c |   11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> index 74895da..7f90ad7 100644
> --- a/src/i965_drv_video.c
> +++ b/src/i965_drv_video.c
> @@ -706,6 +706,7 @@ i965_GetConfigAttributes(VADriverContextP ctx,
>      /* Other attributes don't seem to be defined */
>      /* What to do if we don't know the attribute? */
>      for (i = 0; i < num_attribs; i++) {
> +        attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
>          switch (attrib_list[i].type) {
>          case VAConfigAttribRTFormat:
>              attrib_list[i].value = i965_get_default_chroma_formats(ctx,
> @@ -721,7 +722,7 @@ i965_GetConfigAttributes(VADriverContextP ctx,
>                      attrib_list[i].value |= VA_RC_CBR;
>                  break;
>              }
> -
> +            break;
>          case VAConfigAttribEncPackedHeaders:
>              if (entrypoint == VAEntrypointEncSlice) {
>                  attrib_list[i].value = VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_PICTURE | VA_ENC_PACKED_HEADER_MISC;
> @@ -735,12 +736,13 @@ i965_GetConfigAttributes(VADriverContextP ctx,
>                  }
>                  break;
>              }
> -
> +            break;
>  	case VAConfigAttribEncMaxRefFrames:
>  	    if (entrypoint == VAEntrypointEncSlice) {
>  		attrib_list[i].value = (1 << 16) | (1 << 0);
>  		break;
> -	    }
> +            }
> +            break;
>  
>  	case VAConfigAttribEncQualityRange:
>  	    if (entrypoint == VAEntrypointEncSlice) {
> @@ -750,7 +752,8 @@ i965_GetConfigAttributes(VADriverContextP ctx,
>                      profile == VAProfileH264High )
>                      attrib_list[i].value = ENCODER_QUALITY_RANGE;
>  		break;
> -	    }
> +            }
> +            break;
>      
>      case VAConfigAttribEncJPEG: 
>          if( entrypoint == VAEntrypointEncPicture) {




More information about the Libva mailing list