int uv_dst_offset = ucdev->dst_offset + (ucdev->dst_pitch * rect->h);
    int uv_src_offset = ucdev->src_offset + (ucdev->src_pitch * rect->h);

If rect is the source rect which should be blitted then:
- destination offset  of y plane should be advanced by dst_pitch * dy.
- dest offset of 1st uv plane is dst_offset + dest_pitch * dst_high +
(dst_pitch * dy) / 4.
- dest offset of 2nd uv plane is (dest_pitch * dst_high) / 4 past 1st
plane offset.


I can believe there could be a bug in the blitting of planar surfaces but I
don't follow your analysis.  dst_offset is simply the memory location of
start of the surface image data.  uv_dst_offset holds the memory location of
the start of the first chrominance plane's image data (and is subsequently
adjusted to point to the second).  What further correction to these values
is needed and why?

The existing code in uc_blit_planar adjusts the rectangle and pitch values
when it blits the chrominance planes.

Perhaps we could rewind a bit and you could describe what's actually going
wrong?

M.
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to