ZBar Bar Code Reader Library  version 0.10
convert.c File Reference
Include dependency graph for convert.c:

Classes

struct  conversion_def_s
 

Macros

#define RGB_BITS(off, size)
 

Typedefs

typedef struct conversion_def_s conversion_def_t
 
typedef voidconversion_handler_t) (zbar_image_t *, const zbar_format_def_t *, const zbar_image_t *, const zbar_format_def_t *)
 

Functions

int _zbar_best_format (uint32_t src, uint32_t *dst, const uint32_t *dsts)
 
const zbar_format_def_t_zbar_format_lookup (uint32_t fmt)
 
static void cleanup_ref (zbar_image_t *img)
 
static void convert_copy (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static uint32_t convert_read_rgb (const uint8_t *srcp, int bpp)
 
static void convert_rgb_resample (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_rgb_to_yuv (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_rgb_to_yuvp (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_uv_resample (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_uvp_append (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_uvp_resample (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_write_rgb (uint8_t *dstp, uint32_t p, int bpp)
 
static void convert_y_resize (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt, size_t n)
 
static void convert_yuv_pack (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_yuv_to_rgb (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_yuv_unpack (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static void convert_yuvp_to_rgb (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt)
 
static int has_format (uint32_t fmt, const uint32_t *fmts)
 
static void uv_round (zbar_image_t *img, const zbar_format_def_t *fmt)
 
static void uv_roundup (zbar_image_t *img, const zbar_format_def_t *fmt)
 
static unsigned long uvp_size (const zbar_image_t *img, const zbar_format_def_t *fmt)
 
static int verify_format_sort (void)
 
zbar_image_t * zbar_image_convert (const zbar_image_t *src, unsigned long fmt)
 
zbar_image_t * zbar_image_convert_resize (const zbar_image_t *src, unsigned long fmt, unsigned width, unsigned height)
 
int zbar_negotiate_format (zbar_video_t *vdo, zbar_window_t *win)
 

Variables

const uint32_t _zbar_formats []
 
const int _zbar_num_formats
 
static conversion_def_t conversions [][ZBAR_FMT_NUM]
 
static const zbar_format_def_t format_defs []
 
static const int num_format_defs
 

Macro Definition Documentation

#define RGB_BITS (   off,
  size 
)

Typedef Documentation

typedef void( conversion_handler_t) (zbar_image_t *, const zbar_format_def_t *, const zbar_image_t *, const zbar_format_def_t *)

Function Documentation

int _zbar_best_format ( uint32_t  src,
uint32_t *  dst,
const uint32_t *  dsts 
)

References _zbar_format_lookup(), _zbar_verbosity, zbar_format_def_s::cmp, conversion_def_s::cost, fprintf(), zbar_format_def_s::group, has_format(), zbar_format_def_s::p, and zprintf.

Referenced by zbar_negotiate_format(), and zbar_window_redraw().

Here is the call graph for this function:

Here is the caller graph for this function:

static void cleanup_ref ( zbar_image_t *  img)
static

References _zbar_image_refcnt().

Referenced by convert_copy().

Here is the call graph for this function:

Here is the caller graph for this function:

static void convert_copy ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References _zbar_image_refcnt(), cleanup_ref(), convert_y_resize(), and zbar_image_s::next.

Referenced by zbar_image_convert_resize().

Here is the call graph for this function:

Here is the caller graph for this function:

static uint32_t convert_read_rgb ( const uint8_t *  srcp,
int  bpp 
)
inlinestatic

Referenced by convert_rgb_resample(), convert_rgb_to_yuv(), and convert_rgb_to_yuvp().

Here is the caller graph for this function:

static void convert_rgb_resample ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static
static void convert_rgb_to_yuv ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static
static void convert_rgb_to_yuvp ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References convert_read_rgb(), g, zbar_format_def_s::p, zbar_format_def_s::rgb, RGB_OFFSET, RGB_SIZE, uv_roundup(), uvp_size(), scan_image::width, x, and y.

Here is the call graph for this function:

static void convert_uv_resample ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References flags, zbar_format_def_s::p, uv_roundup(), uvp_size(), scan_image::width, x, y, and zbar_format_def_s::yuv.

Here is the call graph for this function:

static void convert_uvp_append ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References convert_y_resize(), uv_roundup(), uvp_size(), and zprintf.

Here is the call graph for this function:

static void convert_uvp_resample ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References convert_y_resize(), uv_roundup(), and uvp_size().

Here is the call graph for this function:

static void convert_write_rgb ( uint8_t *  dstp,
uint32_t  p,
int  bpp 
)
inlinestatic

Referenced by convert_rgb_resample(), convert_yuv_to_rgb(), and convert_yuvp_to_rgb().

Here is the caller graph for this function:

static void convert_y_resize ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt,
size_t  n 
)
inlinestatic

References scan_image::height, scan_image::width, and y.

Referenced by convert_copy(), convert_uvp_append(), and convert_uvp_resample().

Here is the caller graph for this function:

static void convert_yuv_pack ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References flags, zbar_format_def_s::p, uv_roundup(), uvp_size(), scan_image::width, x, y, and zbar_format_def_s::yuv.

Here is the call graph for this function:

static void convert_yuv_to_rgb ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static
static void convert_yuv_unpack ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static

References flags, zbar_format_def_s::p, uv_roundup(), uvp_size(), scan_image::width, x, y, and zbar_format_def_s::yuv.

Here is the call graph for this function:

static void convert_yuvp_to_rgb ( zbar_image_t *  dst,
const zbar_format_def_t dstfmt,
const zbar_image_t *  src,
const zbar_format_def_t srcfmt 
)
static
static int has_format ( uint32_t  fmt,
const uint32_t *  fmts 
)
inlinestatic

Referenced by _zbar_best_format(), and zbar_negotiate_format().

Here is the caller graph for this function:

static void uv_round ( zbar_image_t *  img,
const zbar_format_def_t fmt 
)
inlinestatic
static int verify_format_sort ( void  )
inlinestatic

References format, fprintf(), and num_format_defs.

Referenced by zbar_negotiate_format().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_image_t* zbar_image_convert ( const zbar_image_t *  src,
unsigned long  fmt 
)

References zbar_image_convert_resize().

Referenced by _zbar_process_image(), image_convert(), main(), and zbar_gtk_process_image().

Here is the call graph for this function:

Here is the caller graph for this function:

zbar_image_t* zbar_image_convert_resize ( const zbar_image_t *  src,
unsigned long  fmt,
unsigned  width,
unsigned  height 
)

Variable Documentation

const uint32_t _zbar_formats[]

Referenced by zbar_negotiate_format().

const int _zbar_num_formats
conversion_def_t conversions[][ZBAR_FMT_NUM]
static
const zbar_format_def_t format_defs[]
static
const int num_format_defs
static

Referenced by verify_format_sort().