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

2018-10-09 Thread Ilia Mirkin
On Tue, Oct 9, 2018 at 3:09 PM Boyuan Zhang 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

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

2018-10-09 Thread Boyuan Zhang
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

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

2018-10-09 Thread Ilia Mirkin
On Tue, Oct 9, 2018 at 1:59 PM Boyuan Zhang wrote: > > Hi ilia, > > I saw the function > u_box_clip_2d(https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/auxiliary/util/u_box.h#n74). > > But I still don't quite understand why we need to do this? Or say, what > will happen if we don't do this

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

2018-10-09 Thread Boyuan Zhang
Hi ilia, I saw the function u_box_clip_2d(https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/auxiliary/util/u_box.h#n74). But I still don't quite understand why we need to do this? Or say, what will happen if we don't do this box clipping here? Can you provide more information about

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

2018-10-05 Thread Liu, Leo
Reviewed-by: Leo Liu -Original Message- From: Zhang, Boyuan Sent: Friday, October 05, 2018 12:01 PM To: mesa-dev@lists.freedesktop.org Cc: Liu, Leo ; imir...@alum.mit.edu; ckoenig.leichtzumer...@gmail.com; Zhang, Boyuan Subject: [PATCH] st/va: use provided sizes and coords for

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

2018-10-05 Thread Christian König
If that also fixes the problem, then yeah that makes perfect sense to me as well. Christian. Am 05.10.2018 um 18:11 schrieb Ilia Mirkin: This is an improvement, but I think you need to clip the box to 1. Size of the surface 2. Size of the image I think that there are clipping helpers

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

2018-10-05 Thread Ilia Mirkin
This is an improvement, but I think you need to clip the box to 1. Size of the surface 2. Size of the image I think that there are clipping helpers available to do that (maybe pipe_box_clip or so? I forget, check the auxiliary dir). Christian - does that make sense to you? Cheers, -ilia On

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

2018-10-05 Thread boyuan.zhang
From: Boyuan Zhang vlVaGetImage should respect the width, height, and coordinates x and y that passed in. Therefore, pipe_box should be created with the passed in values instead of surface width/height. Signed-off-by: Boyuan Zhang --- src/gallium/state_trackers/va/image.c | 9 ++--- 1