On Wed, Aug 11, 2010 at 4:14 AM, Cui, Hunk <[email protected]> wrote:
> Hi, guys,
>
> In xf86-video-geode:
>        lx_video.c -> LXCopyPlanar function, some codes make me confuse,
>
> (
> http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/tree/src/lx_vid
> eo.c#n224 )
>    YSrcPitch = (width + 3) & ~3;
>    YDstPitch = (width + 31) & ~31;
>
>    UVSrcPitch = ((width >> 1) + 3) & ~3;
>    UVDstPitch = ((width >> 1) + 15) & ~15;
>
>    USrcOffset = YSrcPitch * height;
>    VSrcOffset = USrcOffset + (UVSrcPitch * (height >> 1));
>
>    UDstOffset = YDstPitch * height;
>    VDstOffset = UDstOffset + (UVDstPitch * (height >> 1));
>
>    size = YDstPitch * height;
>    size += UVDstPitch * height;
>
> What is the formula for reference?

See http://fourcc.org/

> How to define and calculate the YDstPitch and UVDstPitch?

Planar formats store the YUV data in separate planes rather than
packed as pixel tuples.  Depending on the format the UV portion has
half the resolution as the Y component.

Alex

>
> And in xf86-video-ati:
> http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/tree/src/radeon_v
> ideo.c#n2940
> The new_size(ATI) have same principle with size(Geode), how to explain
> it?
>
> Thanks,
> Hunk Cui
>
> _______________________________________________
> [email protected]: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to