View Single Post
Old 22nd September 2002, 15:58   #5  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Quote:
Originally posted by vlad59

- To make things easier we could keep only one VideoFrameBuffer per VideoFrame and have 3 new pointers for Y, U and V plane. offset and pitch don't need to be duplicated because U and V pitch and offset can be calculated with Y pitch and offset. For width and height, it's the same.
U-V pitch should be the same, but should not be calculated from Y, since pitch also is dependant on other things, as memoryalignment, etc. If Y-pitch is is 8byte-aligned, UV-pitch will only be 4byte aligned, which will result in penalties. Solutions could be:

- GetPitch() returns Ypitch + (UVpitch<<16);
Hacky, but it would work.
- Implement GetUVPitch();
Probably the most reliable.

Regarding data, can it not be assumed that
U = *(data + height* Ypitch)
V = *(V + UVpitch*(height/2))

This would how it would be returned from vfw (and hopefully any MPEG-decoder) - or am I mistaking?

Quote:
- The first avisynth function to port is Avisource (to make test) and it should be better for now to only decode in YV12 if the parameter is set.
Sounds like a great idea! I'll also get on it - we should get as many opinions on this as possible, since it's a very big change, that many people will have to work with it!
__________________
Regards, sh0dan // VoxPod

Last edited by sh0dan; 22nd September 2002 at 16:07.
sh0dan is offline   Reply With Quote