Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

unsigned PVideoDevice::CalculateFrameBytes ( unsigned  width,
unsigned  height,
const PString colourFormat 
) [static, inherited]

Get the number of bytes of an image, given a particular width, height and colour format.

Definition at line 875 of file videoio.cxx.

Referenced by PVideoOutputDevice_NULLOutput::GetMaxFrameBytes(), PVideoInputDevice_BSDCAPTURE::SetColourFormat(), PColourConverter::SetDstFrameSize(), PVideoInputDevice_FakeVideo::SetFrameSize(), PVideoInputDevice_V4L::SetFrameSize(), PVideoInputDevice_1394DC::SetFrameSize(), PVideoInputDevice_BSDCAPTURE::SetFrameSize(), PVideoInputDevice_1394AVC::SetFrameSize(), and PColourConverter::SetSrcFrameSize().

  for (PINDEX i = 0; i < PARRAYSIZE(colourFormatBPPTab); i++) {
    if (colourFormat *= colourFormatBPPTab[i].colourFormat)
      return width * height * colourFormatBPPTab[i].bitsPerPixel/8;
  return 0;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index