- frame: Complete (progressive image), in interlaced format it consists of two fields.
- field: Half of a frame (in interlaced format), it is __not_defined__ in the progressive format.
- image: Either a field or a frame.
Size & storage format of image buffers:
In many cases stride can be equal to width. In some cases the starting address of a line needs to have an aligned memory address (this would be something that the application demands). In that case stride is larger than width to provide the proper memory alignment. If you do not know what to do with the stride (i.e. no special alignment constraints are known for the application), you can make the stride equal to the width. The stride can also be used to access a field in a frame buffer. In that case the stride for accessing the field in the frame buffer needs to be two times the stride of the frame buffer.
All image buffers used are one-dimensional arrays (i.e. they are of type unsigned char* or of type unsigned short*). To address a single (2-D) pixel on coordinates (x,y) in such a buffer use:
|| | |
height || Image data | |
|| | |
pixel = buffer[y * stride + x];
Generated on Thu Nov 19 16:28:20 2009 for cpfspd by