[Libva] [PATCH][G45][2/4] Simplify vaGetImage() (round 2)

Xiang, Haihao haihao.xiang at intel.com
Tue Jul 13 00:34:31 PDT 2010


On Tue, 2010-07-13 at 14:13 +0800, Gwenole Beauchesne wrote:
> Hi,
> 
> Le 13 juil. 10 à 04:07, Xiang, Haihao a écrit :
> 
> >> This patch factors out code for get_image_{yv12,nv12}(). A new
> >> memcpy_pic() function is introduced and the net result is fewer  
> >> source
> >> code lines.
> >
> > 1. This patch uses rect->y to calculate address for U/V, however the
> > original function uses rect->y/2, which one is right?
> 
> You are right, this should have been rect->y/2. I wonder how I did not  
> see any difference, visually.
> 
> > 2. Why is (rect->x & -2) needed for UV data?
> 
> This is 2 * (rect->x/2), so this must be an even number in the end.
> 
> New patch attached with extra documentation and get_image_yv12()  
> changed to get_image_i420() as I420 is the internal VA surface format  
> in that case.
> 
Applied.

Thanks
Haihao

> Regards,
> Gwenole.
> 



More information about the Libva mailing list