Frame processing

Tools for managing frame buffers and converting between image formats. More...

## Functions

uvc_error_t | uvc_mjpeg2rgb (uvc_frame_t *in, uvc_frame_t *out)
| Convert an MJPEG frame to RGB. More...
uvc_frame_t * | uvc_allocate_frame (size_t data_bytes)
| Allocate a frame structure. More...
void | uvc_free_frame (uvc_frame_t *frame)
| Free a frame structure. More...
uvc_error_t | uvc_duplicate_frame (uvc_frame_t *in, uvc_frame_t *out)
| Duplicate a frame, preserving color format. More...
uvc_error_t | uvc_yuyv2rgb (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame from YUYV to RGB. More...
uvc_error_t | uvc_yuyv2bgr (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame from YUYV to BGR. More...
uvc_error_t | uvc_yuyv2y (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame from YUYV to Y (GRAY8) More...
uvc_error_t | uvc_yuyv2uv (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame from YUYV to UV (GRAY8) More...
uvc_error_t | uvc_uyvy2rgb (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame from UYVY to RGB. More...
uvc_error_t | uvc_uyvy2bgr (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame from UYVY to BGR. More...
uvc_error_t | uvc_any2rgb (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame to RGB. More...
uvc_error_t | uvc_any2bgr (uvc_frame_t *in, uvc_frame_t *out)
| Convert a frame to BGR. More...

## Detailed Description

Tools for managing frame buffers and converting between image formats.

## Function Documentation

## uvc_mjpeg2rgb()

uvc_error_t uvc_mjpeg2rgb | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert an MJPEG frame to RGB.

Parameters

  in | MJPEG frame
  out | RGB frame

## uvc_allocate_frame()

uvc_frame_t* uvc_allocate_frame | ( | size_t | data_bytes | ) |

Allocate a frame structure.

Parameters

  data_bytes | Number of bytes to allocate, or zero

Returns
  New frame, or NULL on error

## uvc_free_frame()

void uvc_free_frame | ( | uvc_frame_t * | frame | ) |

Free a frame structure.

Parameters

  frame | Frame to destroy

## uvc_duplicate_frame()

uvc_error_t uvc_duplicate_frame | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Duplicate a frame, preserving color format.

Parameters

  in | Original frame
  out | Duplicate frame

## uvc_yuyv2rgb()

uvc_error_t uvc_yuyv2rgb | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame from YUYV to RGB.

Parameters

  in | YUYV frame
  out | RGB frame

## uvc_yuyv2bgr()

uvc_error_t uvc_yuyv2bgr | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame from YUYV to BGR.

Parameters

  in | YUYV frame
  out | BGR frame

## uvc_yuyv2y()

uvc_error_t uvc_yuyv2y | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame from YUYV to Y (GRAY8)

Parameters

  in | YUYV frame
  out | GRAY8 frame

## uvc_yuyv2uv()

uvc_error_t uvc_yuyv2uv | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame from YUYV to UV (GRAY8)

Parameters

  in | YUYV frame
  out | GRAY8 frame

## uvc_uyvy2rgb()

uvc_error_t uvc_uyvy2rgb | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame from UYVY to RGB.

Parameters

  ini | UYVY frame
  out | RGB frame

## uvc_uyvy2bgr()

uvc_error_t uvc_uyvy2bgr | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame from UYVY to BGR.

Parameters

  ini | UYVY frame
  out | BGR frame

## uvc_any2rgb()

uvc_error_t uvc_any2rgb | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame to RGB.

Parameters

  in | non-RGB frame
  out | RGB frame

## uvc_any2bgr()

uvc_error_t uvc_any2bgr | ( | uvc_frame_t * | in,
|  | uvc_frame_t * | out
| ) |  |

Convert a frame to BGR.

Parameters

  in | non-BGR frame
  out | BGR frame