[Libva] [PATCH 7/8 965 driver] fix an issue in i965_QueryImageFormats

Gwenole Beauchesne gb.devel at gmail.com
Tue Jun 26 00:54:37 PDT 2012


Hi,

2012/6/26 Zhao Halley <halley.zhao at intel.com>:

> -    for (n = 0; i965_image_formats_map[n].va_format.fourcc != 0; n++) {
> +    for (n = 0; n<sizeof(i965_image_formats_map)/sizeof(i965_image_format_map_t); n++) {

n < ARRAY_ELEMS(i965_image_formats);

> @@ -43,7 +43,7 @@
>  #define I965_MAX_PROFILES                       11
>  #define I965_MAX_ENTRYPOINTS                    5
>  #define I965_MAX_CONFIG_ATTRIBUTES              10
> -#define I965_MAX_IMAGE_FORMATS                  3
> +#define I965_MAX_IMAGE_FORMATS                  4
>  #define I965_MAX_SUBPIC_FORMATS                 4
>  #define I965_MAX_DISPLAY_ATTRIBUTES             4

You can put an arbitrary large number (10), since
vaQueryImageFormats() would only count and return the appropriate
number.

Thanks,
Gwenole.


More information about the Libva mailing list