[Mesa-dev] [PATCH] st/va: use provided sizes and coords for getimage

Ilia Mirkin imirkin at alum.mit.edu
Tue Oct 9 19:19:12 UTC 2018


On Tue, Oct 9, 2018 at 3:09 PM Boyuan Zhang <boyzhang at amd.com> wrote:
>
> Thanks for the explanation ilia.
>
> I'm curious too here that if it's legal for player to not respect the
> image size when calling vlVaGetImage. If player already know the size of
> image is 100x100, then why should it still call vlVaGetImage with
> width/height=600?
>
> I mean when VA-API player calls to create image and create surface, it
> should behave itself, or will be considered a player bug. If player
> calls something out of range, even the driver have the size
> clipped(driver trying to fix player bug), but player still won't get
> expected stuff, since the requested size have been clipped by driver.
> Does this make sense?

Yeah, that totally makes sense. Different APIs have different
approaches to such error conditions.

IMHO it'd be perfectly fine to return an error status in such cases,
in theory. But I'm no VA-API expert, and the docs[1] appear silent on
the matter.

Cheers,

  -ilia

[1] http://intel.github.io/libva/group__api__core.html#ga3d56f2eaf0be528a512cc935aca35418


More information about the mesa-dev mailing list