PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
Macros | Functions
v2u_util.h File Reference
#include "v2u_defs.h"
#include <stdio.h>
Include dependency graph for v2u_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DAVINCI   0
 
#define FALSE   0
 
#define MAX(x, y)   (((x)>(y))?(x):(y))
 
#define MIN(x, y)   (((x)<(y))?(x):(y))
 
#define TRUE   1
 
#define V2U_EDID_SIZE   128
 
#define V2U_LINE_SIZE(w, fmt)   V2U_LINE_SIZE_BPP(w,V2UPALETTE_2_BPP(fmt))
 
#define V2U_LINE_SIZE_BPP(w, bpp)   ((w)*(bpp)/8)
 

Functions

void v2u_convert_2vuy_to_bgr24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_2vuy_to_rgb24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_i420_to_bgr24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_i420_to_rgb24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_nv12_to_bgr24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_nv12_to_rgb24 (void *dst, const void *src, int row, int w, int h)
 
V2U_BOOL v2u_convert_to_rgb24 (void *dst, const void *scr, int fmt, int row, int w, int h)
 
void v2u_convert_yuy2_to_bgr24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_yuy2_to_rgb24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_yv12_to_bgr24 (void *dst, const void *src, int row, int w, int h)
 
void v2u_convert_yv12_to_rgb24 (void *dst, const void *src, int row, int w, int h)
 
V2U_BOOL v2u_copy_line (void *dst24, const void *bmp, int fmt, int w)
 
V2U_BOOL v2u_edid_read (FILE *in, V2U_UINT8 edid[V2U_EDID_SIZE])
 
V2U_BOOL v2u_edid_write (FILE *out, const V2U_UINT8 edid[V2U_EDID_SIZE])
 
const char * v2u_product_name (V2UProductType type)
 

Macro Definition Documentation

◆ DAVINCI

#define DAVINCI   0

Definition at line 40 of file v2u_util.h.

◆ FALSE

#define FALSE   0

Definition at line 18 of file v2u_util.h.

◆ MAX

#define MAX (   x,
  y 
)    (((x)>(y))?(x):(y))

Definition at line 30 of file v2u_util.h.

◆ MIN

#define MIN (   x,
  y 
)    (((x)<(y))?(x):(y))

Definition at line 26 of file v2u_util.h.

◆ TRUE

#define TRUE   1

Definition at line 22 of file v2u_util.h.

◆ V2U_EDID_SIZE

#define V2U_EDID_SIZE   128

Definition at line 33 of file v2u_util.h.

◆ V2U_LINE_SIZE

#define V2U_LINE_SIZE (   w,
  fmt 
)    V2U_LINE_SIZE_BPP(w,V2UPALETTE_2_BPP(fmt))

Definition at line 50 of file v2u_util.h.

◆ V2U_LINE_SIZE_BPP

#define V2U_LINE_SIZE_BPP (   w,
  bpp 
)    ((w)*(bpp)/8)

Definition at line 48 of file v2u_util.h.

Function Documentation

◆ v2u_convert_2vuy_to_bgr24()

void v2u_convert_2vuy_to_bgr24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_2vuy_to_rgb24()

void v2u_convert_2vuy_to_rgb24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_i420_to_bgr24()

void v2u_convert_i420_to_bgr24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_i420_to_rgb24()

void v2u_convert_i420_to_rgb24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_nv12_to_bgr24()

void v2u_convert_nv12_to_bgr24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_nv12_to_rgb24()

void v2u_convert_nv12_to_rgb24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_to_rgb24()

V2U_BOOL v2u_convert_to_rgb24 ( void *  dst,
const void *  scr,
int  fmt,
int  row,
int  w,
int  h 
)

Converts a single row from the specified grab format to RGB24. Used by v2u_write_jpeg and v2u_write_png. The following image formats are supported:

V2U_GRABFRAME_FORMAT_Y8 V2U_GRABFRAME_FORMAT_RGB4 V2U_GRABFRAME_FORMAT_RGB8 V2U_GRABFRAME_FORMAT_RGB16 V2U_GRABFRAME_FORMAT_BGR16 V2U_GRABFRAME_FORMAT_RGB24 V2U_GRABFRAME_FORMAT_BGR24 V2U_GRABFRAME_FORMAT_ARGB32 V2U_GRABFRAME_FORMAT_YUY2 V2U_GRABFRAME_FORMAT_2VUY V2U_GRABFRAME_FORMAT_YV12 V2U_GRABFRAME_FORMAT_I420

◆ v2u_convert_yuy2_to_bgr24()

void v2u_convert_yuy2_to_bgr24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_yuy2_to_rgb24()

void v2u_convert_yuy2_to_rgb24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_yv12_to_bgr24()

void v2u_convert_yv12_to_bgr24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

◆ v2u_convert_yv12_to_rgb24()

void v2u_convert_yv12_to_rgb24 ( void *  dst,
const void *  src,
int  row,
int  w,
int  h 
)

Pixel format converters. Convert a single row from one format to another. Parameters: dst - points to the destination buffer that receives the requested row in RGB24 or BGR24 format src - points the source image row - index of the row to transform w - width of the row in pixels h - height of the row in pixels

The source image is assumed to be tightly packed, i.e. no padding between the rows.

◆ v2u_copy_line()

V2U_BOOL v2u_copy_line ( void *  dst24,
const void *  bmp,
int  fmt,
int  w 
)

Copies BMP row (or a part of it) that came from VGA2USB into 24-bit RGB row in the format understood by JPEG and PNG libraries. The following image formats are supported:

V2U_GRABFRAME_FORMAT_Y8 V2U_GRABFRAME_FORMAT_RGB4 V2U_GRABFRAME_FORMAT_RGB8 V2U_GRABFRAME_FORMAT_RGB16 V2U_GRABFRAME_FORMAT_BGR16 V2U_GRABFRAME_FORMAT_RGB24 V2U_GRABFRAME_FORMAT_BGR24 V2U_GRABFRAME_FORMAT_ARGB32

◆ v2u_edid_read()

V2U_BOOL v2u_edid_read ( FILE *  in,
V2U_UINT8  edid[V2U_EDID_SIZE] 
)

Reads text EDID from the stream. The text EDID must be in the Phoenix EDID Designer format. It looks like this:

EDID BYTES:

0x 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00 | 00 FF FF FF FF FF FF 00 16 08 22 22 00 00 00 00 10 | 08 10 01 03 EE 28 1E 78 0B 01 95 A3 57 4C 9C 25 20 | 12 50 54 EF CF 00 81 C0 8B C0 90 40 B3 00 A9 40 30 | D1 C0 01 01 01 01 C8 32 40 A0 60 B0 23 40 30 20 40 | 35 00 90 2C 11 00 00 18 00 00 00 FF 00 56 33 55 50 | 58 58 58 58 58 0A 0A 0A 0A 0A 00 00 00 FD 00 38 60 | 55 0F 6E 10 00 0A 20 20 20 20 20 20 00 00 00 FC 70 | 00 45 70 69 70 68 61 6E 20 44 32 55 0A 0A 00 14

◆ v2u_edid_write()

V2U_BOOL v2u_edid_write ( FILE *  out,
const V2U_UINT8  edid[V2U_EDID_SIZE] 
)

Writes EDID to the stream in the text form (Phoenix EDID Designer format).

◆ v2u_product_name()

const char* v2u_product_name ( V2UProductType  type)

Returns user-readable name for the specified device type