TinyUVC 0.1.0
Header-only USB Video Class (UVC) device: turn an MCU into a USB webcam
Loading...
Searching...
No Matches
Classes | Static Public Member Functions | List of all members
tinyuvc::UVCConvert Class Reference

Converts raw pixel formats (RGB565, RGB888, BGR888, gray) to YUY2, one pixel pair at a time. More...

#include <UVCConvert.h>

Classes

struct  Rgb
 One pixel as 8 bit red, green and blue. More...
 

Static Public Member Functions

static void toYUY2 (PixelFormat fmt, const uint8_t *src, uint8_t *dst, size_t pairs)
 
static Rgb rgb565 (uint16_t v)
 
static uint8_t y (const Rgb &c)
 
static uint8_t u (int r, int g, int b)
 
static uint8_t v (int r, int g, int b)
 

Detailed Description

Converts raw pixel formats (RGB565, RGB888, BGR888, gray) to YUY2, one pixel pair at a time.

Member Function Documentation

◆ rgb565()

static Rgb tinyuvc::UVCConvert::rgb565 ( uint16_t  v)
inlinestatic

◆ toYUY2()

static void tinyuvc::UVCConvert::toYUY2 ( PixelFormat  fmt,
const uint8_t *  src,
uint8_t *  dst,
size_t  pairs 
)
inlinestatic

Converts pairs pixel pairs from src (in format fmt) to YUY2 in dst (4 bytes per pair). JPEG is not supported (nothing is written).

◆ u()

static uint8_t tinyuvc::UVCConvert::u ( int  r,
int  g,
int  b 
)
inlinestatic

◆ v()

static uint8_t tinyuvc::UVCConvert::v ( int  r,
int  g,
int  b 
)
inlinestatic

◆ y()

static uint8_t tinyuvc::UVCConvert::y ( const Rgb &  c)
inlinestatic

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