> Hi, i write a mpeg2 hw acceleration on cle266, and  i have to get 
> the x,y
> poisiton of the destination surface in the libmpeg3 video provider-
> >PlayTo()to display the frame.but in the WriteFrame and 
> WriteYUVFrame function, just
> get the ptr and pitch of  the surface.how could i transfer them to 
> the x,y
> poision and the width,height of the display surface.

Hi Sean,

I don't think I am qualified to answer this question, because I don't use libmpeg3 or 
its videoprovider. But, since no one else has answered, I'll give it a go.

If you have a YUV 4:2:0 picture, and if "pitch" works like it does in the rest of 
DirectFB, it would represent the bytes per line of the Y plane. The pitch is always 
rounded up to the nearest value evenly divisible by 32. It is safe to assume that the 
pitch of the U and V planes are exactly half of that, and aligned to 16. 32-byte 
alignment is set in the cle266 driver, so it is no coincidence that this matches the 
hardware requirements.

I hope this helps in some way.

As for finding x,y coordinates - don't you want copy an entire surface and  just 
assume that (x,y) = (0,0) and width = pitch?

But then, I am not sure I understand what you want to do, so please clarify.

Regards,
Andreas




Reply via email to