gavl_dsp_funcs_t Struct Reference
DSP Context

Function table. More...

`#include <gavldsp.h>`

## Data Fields

int(* | sad_rgb15 )(const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)
| Get the sum of absolute differences (RGB/BGR15) More...
int(* | sad_rgb16 )(const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)
| Get the sum of absolute differences (RGB/BGR16) More...
int(* | sad_8 )(const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)
| Get the sum of absolute differences (8 bit) More...
int(* | sad_16 )(const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)
| Get the sum of absolute differences (16 bit) More...
float(* | sad_f )(const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)
| Get the sum of absolute differences (float) More...
void(* | average_rgb15 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)
| Average 2 scanlines (RGB/BGR15) More...
void(* | average_rgb16 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)
| Average 2 scanlines (RGB/BGR16) More...
void(* | average_8 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)
| Average 2 scanlines (8 bit) More...
void(* | average_16 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)
| Average 2 scanlines (16 bit) More...
void(* | average_f )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)
| Average 2 scanlines (float) More...
void(* | interpolate_rgb15 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float)
| Interpolate 2 scanlines (RGB/BGR15) More...
void(* | interpolate_rgb16 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)
| Interpolate 2 scanlines (RGB/BGR16) More...
void(* | interpolate_8 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)
| Interpolate 2 scanlines (8 bit) More...
void(* | interpolate_16 )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)
| Interpolate 2 scanlines (16 bit) More...
void(* | interpolate_f )(const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)
| Interpolate 2 scanlines (float) More...
void(* | bswap_16 )(void *ptr, int len)
| Do 16 bit endian swapping. More...
void(* | bswap_32 )(void *ptr, int len)
| Do 32 byte endian swapping. More...
void(* | bswap_64 )(void *ptr, int len)
| Do 64 byte endian swapping. More...
void(* | add_u8 )(const void *src1, const void *src2, void *dst, int num)
| Add 2 uint8_t vectors. More...
void(* | add_u8_s )(const void *src1, const void *src2, void *dst, int num)
| Add 2 uint8_t vectors (for audio stored as unsigned) More...
void(* | add_s8 )(const void *src1, const void *src2, void *dst, int num)
| Add 2 int8_t vectors. More...
void(* | add_u16 )(const void *src1, const void *src2, void *dst, int num)
| Add 2 uint16_t vectors. More...
void(* | add_u16_s )(const void *src1, const void *src2, void *dst, int num)
| Add 2 uint16_t vectors (for audio stored as unsigned) More...
void(* | add_s16 )(const void *src1, const void *src2, void *dst, int num)
| Add 2 int16_t vectors. More...
void(* | add_s32 )(const void *src1, const void *src2, void *dst, int num)
| Add 2 int32_t vectors. More...
void(* | add_float )(const void *src1, const void *src2, void *dst, int num)
| Add 2 float vectors. More...
void(* | add_double )(const void *src1, const void *src2, void *dst, int num)
| Add 2 float vectors. More...
void(* | sub_u8 )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 uint8_t vectors. More...
void(* | sub_u8_s )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 uint8_t vectors (for audio stored as unsigned) More...
void(* | sub_s8 )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 int8_t vectors. More...
void(* | sub_u16 )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 uint16_t vectors. More...
void(* | sub_u16_s )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 uint16_t vectors (for audio stored as unsigned) More...
void(* | sub_s16 )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 int16_t vectors. More...
void(* | sub_s32 )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 int32_t vectors. More...
void(* | sub_float )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 float vectors. More...
void(* | sub_double )(const void *src1, const void *src2, void *dst, int num)
| Subtract 2 float vectors. More...

## Detailed Description

Function table.

This structure contains pointers to the available DSP functions.

## Field Documentation

## sad_rgb15

int(* gavl_dsp_funcs_t::sad_rgb15) (const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)

Get the sum of absolute differences (RGB/BGR15)

Parameters

  src_1 | Plane 1
  src_2 | Plane 2
  stride_1 | Byte distance between scanlines for src_1
  stride_2 | Byte distance between scanlines for src_2
  w | Width
  h | Height

Returns
  The sum of absolute differences

The RGB values will be scaled to 8 bit before the differences are calculated.

## sad_rgb16

int(* gavl_dsp_funcs_t::sad_rgb16) (const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)

Get the sum of absolute differences (RGB/BGR16)

Parameters

  src_1 | Plane 1
  src_2 | Plane 2
  stride_1 | Byte distance between scanlines for src_1
  stride_2 | Byte distance between scanlines for src_2
  w | Width
  h | Height

Returns
  The sum of absolute differences

The RGB values will be scaled to 8 bit before the differences are calculated.

## sad_8

int(* gavl_dsp_funcs_t::sad_8) (const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)

Get the sum of absolute differences (8 bit)

Parameters

  src_1 | Plane 1
  src_2 | Plane 2
  stride_1 | Byte distance between scanlines for src_1
  stride_2 | Byte distance between scanlines for src_2
  w | Width
  h | Height

Returns
  The sum of absolute differences

## sad_16

int(* gavl_dsp_funcs_t::sad_16) (const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)

Get the sum of absolute differences (16 bit)

Parameters

  src_1 | Plane 1
  src_2 | Plane 2
  stride_1 | Byte distance between scanlines for src_1
  stride_2 | Byte distance between scanlines for src_2
  w | Width
  h | Height

Returns
  The sum of absolute differences

## sad_f

float(* gavl_dsp_funcs_t::sad_f) (const uint8_t *src_1, const uint8_t *src_2, int stride_1, int stride_2, int w, int h)

Get the sum of absolute differences (float)

Parameters

  src_1 | Plane 1
  src_2 | Plane 2
  stride_1 | Byte distance between scanlines for src_1
  stride_2 | Byte distance between scanlines for src_2
  w | Width
  h | Height

Returns
  The sum of absolute differences

## average_rgb15

void(* gavl_dsp_funcs_t::average_rgb15) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)

Average 2 scanlines (RGB/BGR15)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of pixels

## average_rgb16

void(* gavl_dsp_funcs_t::average_rgb16) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)

Average 2 scanlines (RGB/BGR16)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of pixels

## average_8

void(* gavl_dsp_funcs_t::average_8) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)

Average 2 scanlines (8 bit)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of bytes

## average_16

void(* gavl_dsp_funcs_t::average_16) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)

Average 2 scanlines (16 bit)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of shorts

## average_f

void(* gavl_dsp_funcs_t::average_f) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num)

Average 2 scanlines (float)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of floats

## interpolate_rgb15

void(* gavl_dsp_funcs_t::interpolate_rgb15) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float)

Interpolate 2 scanlines (RGB/BGR15)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of pixels
  fac | Factor for src_1 (0.0 .. 1.0)

Sets the destination to src_1 * fac + src_2 * (1.0-fac)

## interpolate_rgb16

void(* gavl_dsp_funcs_t::interpolate_rgb16) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)

Interpolate 2 scanlines (RGB/BGR16)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of pixels
  fac | Factor for src_1 (0.0 .. 1.0)

Sets the destination to src_1 * fac + src_2 * (1.0-fac)

## interpolate_8

void(* gavl_dsp_funcs_t::interpolate_8) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)

Interpolate 2 scanlines (8 bit)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of bytes
  fac | Factor for src_1 (0.0 .. 1.0)

Sets the destination to src_1 * fac + src_2 * (1.0-fac)

## interpolate_16

void(* gavl_dsp_funcs_t::interpolate_16) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)

Interpolate 2 scanlines (16 bit)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of shorts
  fac | Factor for src_1 (0.0 .. 1.0)

Sets the destination to src_1 * fac + src_2 * (1.0-fac)

## interpolate_f

void(* gavl_dsp_funcs_t::interpolate_f) (const uint8_t *src_1, const uint8_t *src_2, uint8_t *dst, int num, float fac)

Interpolate 2 scanlines (float)

Parameters

  src_1 | Scanline 1
  src_2 | Scanline 2
  dst | Destination
  num | Number of floats
  fac | Factor for src_1 (0.0 .. 1.0)

Sets the destination to src_1 * fac + src_2 * (1.0-fac)

## bswap_16

void(* gavl_dsp_funcs_t::bswap_16) (void *ptr, int len)

Do 16 bit endian swapping.

Parameters

  ptr | Pointer to the data
  len | Len in 16 bit words

## bswap_32

void(* gavl_dsp_funcs_t::bswap_32) (void *ptr, int len)

Do 32 byte endian swapping.

Parameters

  ptr | Pointer to the data
  len | Len in 32 bit doublewords

## bswap_64

void(* gavl_dsp_funcs_t::bswap_64) (void *ptr, int len)

Do 64 byte endian swapping.

Parameters

  ptr | Pointer to the data
  len | Len in 64 bit quadwords

## add_u8

void(* gavl_dsp_funcs_t::add_u8) (const void *src1, const void *src2, void *dst, int num)

Add 2 uint8_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_u8_s

void(* gavl_dsp_funcs_t::add_u8_s) (const void *src1, const void *src2, void *dst, int num)

Add 2 uint8_t vectors (for audio stored as unsigned)

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_s8

void(* gavl_dsp_funcs_t::add_s8) (const void *src1, const void *src2, void *dst, int num)

Add 2 int8_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_u16

void(* gavl_dsp_funcs_t::add_u16) (const void *src1, const void *src2, void *dst, int num)

Add 2 uint16_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_u16_s

void(* gavl_dsp_funcs_t::add_u16_s) (const void *src1, const void *src2, void *dst, int num)

Add 2 uint16_t vectors (for audio stored as unsigned)

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_s16

void(* gavl_dsp_funcs_t::add_s16) (const void *src1, const void *src2, void *dst, int num)

Add 2 int16_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_s32

void(* gavl_dsp_funcs_t::add_s32) (const void *src1, const void *src2, void *dst, int num)

Add 2 int32_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_float

void(* gavl_dsp_funcs_t::add_float) (const void *src1, const void *src2, void *dst, int num)

Add 2 float vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## add_double

void(* gavl_dsp_funcs_t::add_double) (const void *src1, const void *src2, void *dst, int num)

Add 2 float vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_u8

void(* gavl_dsp_funcs_t::sub_u8) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 uint8_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_u8_s

void(* gavl_dsp_funcs_t::sub_u8_s) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 uint8_t vectors (for audio stored as unsigned)

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_s8

void(* gavl_dsp_funcs_t::sub_s8) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 int8_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_u16

void(* gavl_dsp_funcs_t::sub_u16) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 uint16_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_u16_s

void(* gavl_dsp_funcs_t::sub_u16_s) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 uint16_t vectors (for audio stored as unsigned)

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_s16

void(* gavl_dsp_funcs_t::sub_s16) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 int16_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_s32

void(* gavl_dsp_funcs_t::sub_s32) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 int32_t vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_float

void(* gavl_dsp_funcs_t::sub_float) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 float vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

## sub_double

void(* gavl_dsp_funcs_t::sub_double) (const void *src1, const void *src2, void *dst, int num)

Subtract 2 float vectors.

Parameters

  src1 | Source 1
  src2 | Source 2
  dst | Destination
  num | Number of entries

src1 and/or src2 can be identical to dst

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

- /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_multimedia_gavl/gavl/work/gavl-1.4.0/include/gavl/gavldsp.h