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

Gwenole Beauchesne gbeauchesne at splitted-desktop.com
Mon Jul 12 23:13:58 PDT 2010


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.

Regards,
Gwenole.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0501-G45-Simplify-vaGetImage.patch
Type: application/octet-stream
Size: 6521 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libva/attachments/20100713/bf37d078/attachment-0001.obj>
-------------- next part --------------



More information about the Libva mailing list