MCPcopy Create free account
hub / github.com/IENT/YUView / getOffsetToFirstByteOfComponent

Function getOffsetToFirstByteOfComponent

YUViewLib/src/video/rgb/ConversionRGB.cpp:48–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46};
47
48int getOffsetToFirstByteOfComponent(const Channel channel,
49 const PixelFormatRGB &pixelFormat,
50 const Size frameSize)
51{
52 auto offset = pixelFormat.getChannelPosition(channel);
53 if (pixelFormat.getDataLayout() == DataLayout::Planar)
54 offset *= frameSize.width * frameSize.height;
55 return offset;
56}
57
58// Convert the input format to the output RGBA format. Apply inversion, scaling,
59// limited range conversion and alpha multiplication. The input can be any supported

Callers 2

convertRGBToARGBFunction · 0.85
getPixelValueFunction · 0.85

Calls 2

getChannelPositionMethod · 0.80
getDataLayoutMethod · 0.80

Tested by

no test coverage detected