PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
v2u_util.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * $Id: v2u_util.h 12604 2011-03-10 15:37:50Z monich $
4  *
5  * Copyright (C) 2003-2011 Epiphan Systems Inc. All rights reserved.
6  *
7  * Header file for miscellaneous utilities.
8  *
9  ****************************************************************************/
10 
11 #ifndef _V2U_UTIL_H_
12 #define _V2U_UTIL_H_ 1
13 
14 #include "v2u_defs.h"
15 #include <stdio.h>
16 
17 #ifndef FALSE
18 #define FALSE 0
19 #endif
20 
21 #ifndef TRUE
22 #define TRUE 1
23 #endif
24 
25 #ifndef MIN
26 # define MIN(x,y) (((x)<(y))?(x):(y))
27 #endif /* MIN */
28 
29 #ifndef MAX
30 # define MAX(x,y) (((x)>(y))?(x):(y))
31 #endif /* MAX */
32 
33 #define V2U_EDID_SIZE 128
34 
35 /* Hack for line size (aligned at 32 pixels on daVinci platform) */
36 #ifndef DAVINCI
37 # ifdef __arm__
38 # define DAVINCI 1
39 # else
40 # define DAVINCI 0
41 # endif
42 #endif /* DAVINCI */
43 
44 /* V2U_LINE_SIZE macro returns the line size in bytes */
45 #if DAVINCI
46 # define V2U_LINE_SIZE_BPP(w,bpp) ((((w)+31)&(-32))*(bpp)/8)
47 #else
48 # define V2U_LINE_SIZE_BPP(w,bpp) ((w)*(bpp)/8)
49 #endif /* DAVINCI */
50 #define V2U_LINE_SIZE(w,fmt) V2U_LINE_SIZE_BPP(w,V2UPALETTE_2_BPP(fmt))
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif /* __cplusplus */
55 
70 extern V2U_BOOL v2u_copy_line(void* dst24, const void* bmp, int fmt, int w);
71 
85 void v2u_convert_yv12_to_rgb24(void* dst,const void* src,int row,int w,int h);
86 void v2u_convert_yv12_to_bgr24(void* dst,const void* src,int row,int w,int h);
87 void v2u_convert_i420_to_rgb24(void* dst,const void* src,int row,int w,int h);
88 void v2u_convert_i420_to_bgr24(void* dst,const void* src,int row,int w,int h);
89 void v2u_convert_yuy2_to_rgb24(void* dst,const void* src,int row,int w,int h);
90 void v2u_convert_yuy2_to_bgr24(void* dst,const void* src,int row,int w,int h);
91 void v2u_convert_2vuy_to_rgb24(void* dst,const void* src,int row,int w,int h);
92 void v2u_convert_2vuy_to_bgr24(void* dst,const void* src,int row,int w,int h);
93 void v2u_convert_nv12_to_rgb24(void* dst,const void* src,int row,int w,int h);
94 void v2u_convert_nv12_to_bgr24(void* dst,const void* src,int row,int w,int h);
95 
113 extern V2U_BOOL v2u_convert_to_rgb24(void* dst, const void* scr, int fmt,
114  int row, int w, int h);
115 
119 extern const char* v2u_product_name(V2UProductType type);
120 
137 extern V2U_BOOL v2u_edid_read(FILE* in, V2U_UINT8 edid[V2U_EDID_SIZE]);
138 
142 extern V2U_BOOL v2u_edid_write(FILE* out, const V2U_UINT8 edid[V2U_EDID_SIZE]);
143 
144 #ifdef __cplusplus
145 } /* end of extern "C" */
146 #endif /* __cplusplus */
147 
148 #endif /* _V2U_UTIL_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_edid_read(FILE *in, V2U_UINT8 edid[V2U_EDID_SIZE])
#define V2U_EDID_SIZE
Definition: v2u_util.h:33
const char int const char const char * src
Definition: phidget22.h:2458
V2U_BOOL v2u_convert_to_rgb24(void *dst, const void *scr, int fmt, 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_yv12_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_i420_to_bgr24(void *dst, const void *src, int row, int w, int h)
V2U_BOOL v2u_edid_write(FILE *out, const V2U_UINT8 edid[V2U_EDID_SIZE])
V2U_INT32 V2U_BOOL
Definition: v2u_defs.h:71
void v2u_convert_yuy2_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)
enum v2u_product_type V2UProductType
void v2u_convert_2vuy_to_bgr24(void *dst, const void *src, int row, int w, int h)
const char * v2u_product_name(V2UProductType type)
void v2u_convert_yuy2_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)
uint8_t V2U_UINT8
Definition: v2u_defs.h:60