MediaX v1.0.0rc7 [7e6cb74]
Video streaming for military vehicles
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
mediax::video::ColourSpace Class Referenceabstract

Helper functions for different colour space options, base class. More...

#include <colourspace.h>

Inheritance diagram for mediax::video::ColourSpace:
Inheritance graph
Collaboration diagram for mediax::video::ColourSpace:
Collaboration graph

Public Member Functions

 ColourSpace ()=default
 Construct a new Colour Space object.
 
virtual ~ColourSpace ()=default
 Destroy the Colour Space object.
 
virtual int RgbToYuv (uint32_t height, uint32_t width, uint8_t *rgb, uint8_t *yuv) const =0
 Convert YUV to RGBA.
 
virtual int RgbToMono8 (uint32_t height, uint32_t width, uint8_t *rgb, uint8_t *mono8) const =0
 Convert RGB to Monochrome 8 bits ber pixel.
 
virtual int RgbToMono16 (uint32_t height, uint32_t width, uint8_t *rgb, uint8_t *mono16) const =0
 Convert RGB to Monochrome 16 bits ber pixel.
 
virtual int RgbaToYuv (uint32_t width, uint32_t height, uint8_t *rgba, uint8_t *yuv) const =0
 Convert RGBA to YUV.
 
virtual int RgbaToRgb (uint32_t width, uint32_t height, uint8_t *rgba, uint8_t *rgb) const =0
 Convert RGBA to RGB.
 
virtual int RgbaToBgra (uint32_t width, uint32_t height, uint8_t *rgba, uint8_t *bgra) const =0
 Convert RGBA to RGB.
 
virtual int RgbToBgra (uint32_t width, uint32_t height, uint8_t *rgba, uint8_t *rgb) const =0
 Convert RGB to RGBA.
 
virtual int YuvToBgra (uint32_t height, uint32_t width, uint8_t *yuv, uint8_t *rgba) const =0
 Convert YUV to RGBA.
 
virtual int Mono8ToBgra (uint32_t width, uint32_t height, uint8_t *mono8, uint8_t *bgra) const =0
 Convert Mono8 to RGBA on the CPU.
 
virtual int Mono16ToBgra (uint32_t width, uint32_t height, uint8_t *mono16, uint8_t *bgra) const =0
 Convert Mono16 to RGBA on the CPU.
 
virtual int RgbToRgba (uint32_t width, uint32_t height, uint8_t *rgb, uint8_t *rgba) const =0
 Convert RGB to RGBA on the CPU.
 
virtual int Yuv422ToRgba (uint32_t height, uint32_t width, uint8_t *yuv422, uint8_t *rgba) const =0
 Convert YUV to RGBA on the CPU.
 
virtual int Yuv420ToRgba (uint32_t height, uint32_t width, uint8_t *yuv420, uint8_t *rgba) const =0
 
virtual int Mono8ToRgba (uint32_t width, uint32_t height, uint8_t *mono8, uint8_t *rgba) const =0
 Convert Mono8 to RGBA on the CPU.
 
virtual int Mono8ToRgb (uint32_t width, uint32_t height, uint8_t *mono8, uint8_t *rgb) const =0
 Convert Mono8 to RGB on the CPU.
 
virtual int Mono16ToRgba (uint32_t width, uint32_t height, uint8_t *mono16, uint8_t *rgba) const =0
 Convert Mono16 to RGBA on the CPU.
 
virtual int Mono16ToRgb (uint32_t width, uint32_t height, uint8_t *mono16, uint8_t *rgb) const =0
 Convert Mono16 to RGBA on the CPU.
 
virtual int YuvToRgb (uint32_t height, uint32_t width, uint8_t *yuv, uint8_t *rgb) const =0
 Convert YUV to RGB.
 
virtual int Yuv420pToRgb (uint32_t height, uint32_t width, uint8_t *yuv, uint8_t *rgb) const =0
 Convert YUV:420P to RGB.
 
virtual int ScaleToSizeRgb (uint32_t source_height, uint32_t source_width, uint8_t *source_rgb_buffer, uint32_t target_height, uint32_t target_width, uint8_t *target_rgb_buffer) const =0
 Scale the image to the target size for RGB.
 
virtual int ScaleToSizeRgba (uint32_t source_height, uint32_t source_width, uint8_t *source_rgb_buffer, uint32_t target_height, uint32_t target_width, uint8_t *target_rgb_buffer) const =0
 Scale the image to the target size for RGBA.
 

Detailed Description

Helper functions for different colour space options, base class.

Member Function Documentation

◆ Mono16ToBgra()

virtual int mediax::video::ColourSpace::Mono16ToBgra ( uint32_t  width,
uint32_t  height,
uint8_t *  mono16,
uint8_t *  bgra 
) const
pure virtual

Convert Mono16 to RGBA on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
mono16The monochrome 16 bit image
bgraThe BGRA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ Mono16ToRgb()

virtual int mediax::video::ColourSpace::Mono16ToRgb ( uint32_t  width,
uint32_t  height,
uint8_t *  mono16,
uint8_t *  rgb 
) const
pure virtual

Convert Mono16 to RGBA on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
mono16The monochrome 16 bit image
rgbThe RGB image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ Mono16ToRgba()

virtual int mediax::video::ColourSpace::Mono16ToRgba ( uint32_t  width,
uint32_t  height,
uint8_t *  mono16,
uint8_t *  rgba 
) const
pure virtual

Convert Mono16 to RGBA on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
mono16The monochrome 16 bit image
rgbaThe RGBA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ Mono8ToBgra()

virtual int mediax::video::ColourSpace::Mono8ToBgra ( uint32_t  width,
uint32_t  height,
uint8_t *  mono8,
uint8_t *  bgra 
) const
pure virtual

Convert Mono8 to RGBA on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
mono8The monochrome 8 bit image
bgraThe BGRA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ Mono8ToRgb()

virtual int mediax::video::ColourSpace::Mono8ToRgb ( uint32_t  width,
uint32_t  height,
uint8_t *  mono8,
uint8_t *  rgb 
) const
pure virtual

Convert Mono8 to RGB on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
mono8The monochrome 8 bit image
rgbThe RGB image buffer
Returns
int

Implemented in mediax::video::ColourSpaceCpu.

◆ Mono8ToRgba()

virtual int mediax::video::ColourSpace::Mono8ToRgba ( uint32_t  width,
uint32_t  height,
uint8_t *  mono8,
uint8_t *  rgba 
) const
pure virtual

Convert Mono8 to RGBA on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
mono8The monochrome 8 bit image
rgbaThe RGBA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ RgbaToBgra()

virtual int mediax::video::ColourSpace::RgbaToBgra ( uint32_t  width,
uint32_t  height,
uint8_t *  rgba,
uint8_t *  bgra 
) const
pure virtual

Convert RGBA to RGB.

Parameters
widthThe height of the image
heightThe width of the image
rgbaThe RGBA image buffer
bgraThe RGB image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ RgbaToRgb()

virtual int mediax::video::ColourSpace::RgbaToRgb ( uint32_t  width,
uint32_t  height,
uint8_t *  rgba,
uint8_t *  rgb 
) const
pure virtual

Convert RGBA to RGB.

Parameters
widthThe height of the image
heightThe width of the image
rgbaThe RGBA image buffer
rgbThe RGB image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.

◆ RgbaToYuv()

virtual int mediax::video::ColourSpace::RgbaToYuv ( uint32_t  width,
uint32_t  height,
uint8_t *  rgba,
uint8_t *  yuv 
) const
pure virtual

Convert RGBA to YUV.

Parameters
widthThe width of the image
heightThe height of the image
rgbaThe RGB image buffer
yuvThe YUV:422 image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.

◆ RgbToBgra()

virtual int mediax::video::ColourSpace::RgbToBgra ( uint32_t  width,
uint32_t  height,
uint8_t *  rgba,
uint8_t *  rgb 
) const
pure virtual

Convert RGB to RGBA.

Parameters
widthThe height of the image
heightThe width of the image
rgbaThe RGBA image buffer
rgbThe RGB image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ RgbToMono16()

virtual int mediax::video::ColourSpace::RgbToMono16 ( uint32_t  height,
uint32_t  width,
uint8_t *  rgb,
uint8_t *  mono16 
) const
pure virtual

Convert RGB to Monochrome 16 bits ber pixel.

Parameters
heightThe height of the image
widthThe width of the image
rgbThe RGB image buffer
mono16The monochrome 16 image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.

◆ RgbToMono8()

virtual int mediax::video::ColourSpace::RgbToMono8 ( uint32_t  height,
uint32_t  width,
uint8_t *  rgb,
uint8_t *  mono8 
) const
pure virtual

Convert RGB to Monochrome 8 bits ber pixel.

Parameters
heightThe height of the image
widthThe width of the image
rgbThe RGB image buffer
mono8The monochrome 8 image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.

◆ RgbToRgba()

virtual int mediax::video::ColourSpace::RgbToRgba ( uint32_t  width,
uint32_t  height,
uint8_t *  rgb,
uint8_t *  rgba 
) const
pure virtual

Convert RGB to RGBA on the CPU.

Parameters
widthThe height of the image
heightThe width of the image
rgbThe RGB image buffer
rgbaThe RGBA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ RgbToYuv()

virtual int mediax::video::ColourSpace::RgbToYuv ( uint32_t  height,
uint32_t  width,
uint8_t *  rgb,
uint8_t *  yuv 
) const
pure virtual

Convert YUV to RGBA.

Parameters
heightThe height of the image
widthThe width of the image
rgbThe RGB image buffer
yuvThe YUV:422 image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.

◆ ScaleToSizeRgb()

virtual int mediax::video::ColourSpace::ScaleToSizeRgb ( uint32_t  source_height,
uint32_t  source_width,
uint8_t *  source_rgb_buffer,
uint32_t  target_height,
uint32_t  target_width,
uint8_t *  target_rgb_buffer 
) const
pure virtual

Scale the image to the target size for RGB.

Parameters
source_heightThe height of the source image
source_widthThe width of the source image
source_rgb_bufferThe source image buffer
target_heightThe height of the target image
target_widthThe width of the target image
target_rgb_bufferThe target image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ ScaleToSizeRgba()

virtual int mediax::video::ColourSpace::ScaleToSizeRgba ( uint32_t  source_height,
uint32_t  source_width,
uint8_t *  source_rgb_buffer,
uint32_t  target_height,
uint32_t  target_width,
uint8_t *  target_rgb_buffer 
) const
pure virtual

Scale the image to the target size for RGBA.

Parameters
source_heightThe height of the source image
source_widthThe width of the source image
source_rgb_bufferThe source image buffer
target_heightThe height of the target image
target_widthThe width of the target image
target_rgb_bufferThe target image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ Yuv420pToRgb()

virtual int mediax::video::ColourSpace::Yuv420pToRgb ( uint32_t  height,
uint32_t  width,
uint8_t *  yuv,
uint8_t *  rgb 
) const
pure virtual

Convert YUV:420P to RGB.

Parameters
heightThe height of the image
widthThe width of the image
yuvThe YUV:420p image buffer
rgbThe RGB image buffer
Returns
int

Implemented in mediax::video::ColourSpaceCpu.

◆ Yuv420ToRgba()

virtual int mediax::video::ColourSpace::Yuv420ToRgba ( uint32_t  height,
uint32_t  width,
uint8_t *  yuv420,
uint8_t *  rgba 
) const
pure virtual
Parameters
heightThe height of the image
widthThe width of the image
yuv420The YUV:420 image buffer
rgbaThe RGBA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ Yuv422ToRgba()

virtual int mediax::video::ColourSpace::Yuv422ToRgba ( uint32_t  height,
uint32_t  width,
uint8_t *  yuv422,
uint8_t *  rgba 
) const
pure virtual

Convert YUV to RGBA on the CPU.

Parameters
heightThe height of the image
widthThe width of the image
yuv422The YUV:422 image buffer
rgbaThe RGBA image buffer

Implemented in mediax::video::ColourSpaceCpu.

◆ YuvToBgra()

virtual int mediax::video::ColourSpace::YuvToBgra ( uint32_t  height,
uint32_t  width,
uint8_t *  yuv,
uint8_t *  rgba 
) const
pure virtual

Convert YUV to RGBA.

Parameters
heightThe height of the image
widthThe width of the image
yuvThe YUV:422 image buffer
rgbaThe RGBA image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.

◆ YuvToRgb()

virtual int mediax::video::ColourSpace::YuvToRgb ( uint32_t  height,
uint32_t  width,
uint8_t *  yuv,
uint8_t *  rgb 
) const
pure virtual

Convert YUV to RGB.

Parameters
heightThe height of the image
widthThe width of the image
yuvThe YUV:422 image buffer
rgbThe RGB image buffer

Implemented in mediax::video::ColourSpaceCpu, and mediax::video::ColourSpaceCuda.


The documentation for this class was generated from the following file: