FFmpeg
Macros | Functions
bayer_template.c File Reference

Go to the source code of this file.

Macros

#define S(y, x)   BAYER_READ(src[(y)*src_stride + BAYER_SIZEOF*(x)])
 
#define T(y, x)   (unsigned int)S(y, x)
 
#define R(y, x)   dst[(y)*dst_stride + (x)*3 + BAYER_R]
 
#define G(y, x)   dst[(y)*dst_stride + (x)*3 + BAYER_G]
 
#define B(y, x)   dst[(y)*dst_stride + (x)*3 + BAYER_B]
 
#define BAYER_TO_RGB24_COPY
 
#define BAYER_TO_RGB24_INTERPOLATE
 
#define BAYER_TO_RGB48_COPY
 
#define BAYER_TO_RGB48_INTERPOLATE
 
#define rgb24toyv12_2x2(src, dstY, dstU, dstV, luma_stride, src_stride, rgb2yuv)   ff_rgb24toyv12(src, dstY, dstV, dstU, 2, 2, luma_stride, 0, src_stride, rgb2yuv)
 invoke ff_rgb24toyv12 for 2x2 pixels More...
 

Functions

static void BAYER_RENAME() rgb24_copy (const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int width)
 
static void BAYER_RENAME() rgb24_interpolate (const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int width)
 
static void BAYER_RENAME() rgb48_copy (const uint8_t *src, int src_stride, uint8_t *ddst, int dst_stride, int width)
 
static void BAYER_RENAME() rgb48_interpolate (const uint8_t *src, int src_stride, uint8_t *ddst, int dst_stride, int width)
 
static void BAYER_RENAME() yv12_copy (const uint8_t *src, int src_stride, uint8_t *dstY, uint8_t *dstU, uint8_t *dstV, int luma_stride, int width, int32_t *rgb2yuv)
 
static void BAYER_RENAME() yv12_interpolate (const uint8_t *src, int src_stride, uint8_t *dstY, uint8_t *dstU, uint8_t *dstV, int luma_stride, int width, int32_t *rgb2yuv)
 

Macro Definition Documentation

◆ S

#define S (   y,
 
)    BAYER_READ(src[(y)*src_stride + BAYER_SIZEOF*(x)])

Definition at line 49 of file bayer_template.c.

◆ T

#define T (   y,
 
)    (unsigned int)S(y, x)

Definition at line 50 of file bayer_template.c.

◆ R

#define R (   y,
 
)    dst[(y)*dst_stride + (x)*3 + BAYER_R]

Definition at line 51 of file bayer_template.c.

◆ G

#define G (   y,
 
)    dst[(y)*dst_stride + (x)*3 + BAYER_G]

Definition at line 52 of file bayer_template.c.

◆ B

#define B (   y,
 
)    dst[(y)*dst_stride + (x)*3 + BAYER_B]

Definition at line 53 of file bayer_template.c.

◆ BAYER_TO_RGB24_COPY

#define BAYER_TO_RGB24_COPY
Value:
R(0, 0) = \
R(0, 1) = \
R(1, 1) = \
R(1, 0) = S(1, 0) >> BAYER_SHIFT; \
G(0, 0) = S(0, 0) >> BAYER_SHIFT; \
G(1, 1) = S(1, 1) >> BAYER_SHIFT; \
G(0, 1) = \
G(1, 0) = (T(0, 0) + T(1, 1)) >> (1 + BAYER_SHIFT); \
B(1, 1) = \
B(0, 0) = \
B(0, 1) = \
B(1, 0) = S(0, 1) >> BAYER_SHIFT;

Definition at line 88 of file bayer_template.c.

◆ BAYER_TO_RGB24_INTERPOLATE

#define BAYER_TO_RGB24_INTERPOLATE
Value:
R(0, 0) = (T(-1, 0) + T(1, 0)) >> (1 + BAYER_SHIFT); \
G(0, 0) = S(0, 0) >> BAYER_SHIFT; \
B(0, 0) = (T(0, -1) + T(0, 1)) >> (1 + BAYER_SHIFT); \
R(0, 1) = (T(-1, 0) + T(-1, 2) + T(1, 0) + T(1, 2)) >> (2 + BAYER_SHIFT); \
G(0, 1) = (T(-1, 1) + T(0, 0) + T(0, 2) + T(1, 1)) >> (2 + BAYER_SHIFT); \
B(0, 1) = S(0, 1) >> BAYER_SHIFT; \
R(1, 0) = S(1, 0) >> BAYER_SHIFT; \
G(1, 0) = (T(0, 0) + T(1, -1) + T(1, 1) + T(2, 0)) >> (2 + BAYER_SHIFT); \
B(1, 0) = (T(0, -1) + T(0, 1) + T(2, -1) + T(2, 1)) >> (2 + BAYER_SHIFT); \
R(1, 1) = (T(1, 0) + T(1, 2)) >> (1 + BAYER_SHIFT); \
G(1, 1) = S(1, 1) >> BAYER_SHIFT; \
B(1, 1) = (T(0, 1) + T(2, 1)) >> (1 + BAYER_SHIFT);

Definition at line 103 of file bayer_template.c.

◆ BAYER_TO_RGB48_COPY

#define BAYER_TO_RGB48_COPY
Value:
R(0, 0) = \
R(0, 1) = \
R(1, 1) = \
R(1, 0) = S(1, 0); \
G(0, 0) = S(0, 0); \
G(1, 1) = S(1, 1); \
G(0, 1) = \
G(1, 0) = (T(0, 0) + T(1, 1)) >> 1; \
B(1, 1) = \
B(0, 0) = \
B(0, 1) = \
B(1, 0) = S(0, 1);

Definition at line 154 of file bayer_template.c.

◆ BAYER_TO_RGB48_INTERPOLATE

#define BAYER_TO_RGB48_INTERPOLATE
Value:
R(0, 0) = (T(-1, 0) + T(1, 0)) >> 1; \
G(0, 0) = S(0, 0); \
B(0, 0) = (T(0, -1) + T(0, 1)) >> 1; \
R(0, 1) = (T(-1, 0) + T(-1, 2) + T(1, 0) + T(1, 2)) >> 2; \
G(0, 1) = (T(-1, 1) + T(0, 0) + T(0, 2) + T(1, 1)) >> 2; \
B(0, 1) = S(0, 1); \
R(1, 0) = S(1, 0); \
G(1, 0) = (T(0, 0) + T(1, -1) + T(1, 1) + T(2, 0)) >> 2; \
B(1, 0) = (T(0, -1) + T(0, 1) + T(2, -1) + T(2, 1)) >> 2; \
R(1, 1) = (T(1, 0) + T(1, 2)) >> 1; \
G(1, 1) = S(1, 1); \
B(1, 1) = (T(0, 1) + T(2, 1)) >> 1;

Definition at line 169 of file bayer_template.c.

◆ rgb24toyv12_2x2

#define rgb24toyv12_2x2 (   src,
  dstY,
  dstU,
  dstV,
  luma_stride,
  src_stride,
  rgb2yuv 
)    ff_rgb24toyv12(src, dstY, dstV, dstU, 2, 2, luma_stride, 0, src_stride, rgb2yuv)

invoke ff_rgb24toyv12 for 2x2 pixels

Definition at line 190 of file bayer_template.c.

Function Documentation

◆ rgb24_copy()

static void BAYER_RENAME() rgb24_copy ( const uint8_t src,
int  src_stride,
uint8_t dst,
int  dst_stride,
int  width 
)
static

Definition at line 193 of file bayer_template.c.

◆ rgb24_interpolate()

static void BAYER_RENAME() rgb24_interpolate ( const uint8_t src,
int  src_stride,
uint8_t dst,
int  dst_stride,
int  width 
)
static

Definition at line 203 of file bayer_template.c.

◆ rgb48_copy()

static void BAYER_RENAME() rgb48_copy ( const uint8_t src,
int  src_stride,
uint8_t ddst,
int  dst_stride,
int  width 
)
static

Definition at line 222 of file bayer_template.c.

◆ rgb48_interpolate()

static void BAYER_RENAME() rgb48_interpolate ( const uint8_t src,
int  src_stride,
uint8_t ddst,
int  dst_stride,
int  width 
)
static

Definition at line 235 of file bayer_template.c.

◆ yv12_copy()

static void BAYER_RENAME() yv12_copy ( const uint8_t src,
int  src_stride,
uint8_t dstY,
uint8_t dstU,
uint8_t dstV,
int  luma_stride,
int  width,
int32_t rgb2yuv 
)
static

Definition at line 256 of file bayer_template.c.

◆ yv12_interpolate()

static void BAYER_RENAME() yv12_interpolate ( const uint8_t src,
int  src_stride,
uint8_t dstY,
uint8_t dstU,
uint8_t dstV,
int  luma_stride,
int  width,
int32_t rgb2yuv 
)
static

Definition at line 271 of file bayer_template.c.

B
#define B(y, x)
Definition: bayer_template.c:53
G
#define G(y, x)
Definition: bayer_template.c:52
R
#define R(y, x)
Definition: bayer_template.c:51
T
#define T(y, x)
Definition: bayer_template.c:50
S
#define S(y, x)
Definition: bayer_template.c:49