Libav
Macros | Functions | Variables
yuv2rgb.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <assert.h>
#include "libavutil/cpu.h"
#include "libavutil/bswap.h"
#include "config.h"
#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"

Go to the source code of this file.

Macros

#define LOADCHROMA(i)
 
#define PUTRGB(dst, src, i)
 
#define PUTRGB24(dst, src, i)
 
#define PUTBGR24(dst, src, i)
 
#define PUTRGBA(dst, ysrc, asrc, i, s)
 
#define PUTRGB48(dst, src, i)
 
#define PUTBGR48(dst, src, i)
 
#define YUV2RGBFUNC(func_name, dst_type, alpha)
 
#define ENDYUV2RGBLINE(dst_delta, ss)
 
#define ENDYUV2RGBFUNC()
 
#define CLOSEYUV2RGBFUNC(dst_delta)
 
#define PUTRGB12(dst, src, i, o)
 
#define PUTRGB8(dst, src, i, o)
 
#define PUTRGB4D(dst, src, i, o)
 
#define PUTRGB4DB(dst, src, i, o)
 
#define PUTRGB1(out, src, i, o)
 
#define ALLOC_YUV_TABLE(x)
 

Functions

const int * sws_getCoefficients (int colorspace)
 Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails(). More...
 
 LOADCHROMA (0)
 
 PUTRGB48 (dst_1, py_1, 0)
 
 PUTRGB48 (dst_2, py_2, 0)
 
 LOADCHROMA (1)
 
 PUTRGB48 (dst_2, py_2, 1)
 
 PUTRGB48 (dst_1, py_1, 1)
 
 LOADCHROMA (2)
 
 PUTRGB48 (dst_1, py_1, 2)
 
 PUTRGB48 (dst_2, py_2, 2)
 
 LOADCHROMA (3)
 
 PUTRGB48 (dst_2, py_2, 3)
 
 PUTRGB48 (dst_1, py_1, 3)
 
 PUTBGR48 (dst_1, py_1, 0)
 
 PUTBGR48 (dst_2, py_2, 0)
 
 PUTBGR48 (dst_2, py_2, 1)
 
 PUTBGR48 (dst_1, py_1, 1)
 
 PUTBGR48 (dst_1, py_1, 2)
 
 PUTBGR48 (dst_2, py_2, 2)
 
 PUTBGR48 (dst_2, py_2, 3)
 
 PUTBGR48 (dst_1, py_1, 3)
 
 PUTRGB (dst_1, py_1, 0)
 
 PUTRGB (dst_2, py_2, 0)
 
 PUTRGB (dst_2, py_2, 1)
 
 PUTRGB (dst_1, py_1, 1)
 
 PUTRGB (dst_1, py_1, 2)
 
 PUTRGB (dst_2, py_2, 2)
 
 PUTRGB (dst_2, py_2, 3)
 
 PUTRGB (dst_1, py_1, 3)
 
 PUTRGBA (dst_1, py_1, pa_1, 0, 24)
 
 PUTRGBA (dst_2, py_2, pa_2, 0, 24)
 
 PUTRGBA (dst_2, py_2, pa_2, 1, 24)
 
 PUTRGBA (dst_1, py_1, pa_1, 1, 24)
 
 PUTRGBA (dst_1, py_1, pa_1, 2, 24)
 
 PUTRGBA (dst_2, py_2, pa_2, 2, 24)
 
 PUTRGBA (dst_2, py_2, pa_2, 3, 24)
 
 PUTRGBA (dst_1, py_1, pa_1, 3, 24)
 
 PUTRGBA (dst_1, py_1, pa_1, 0, 0)
 
 PUTRGBA (dst_2, py_2, pa_2, 0, 0)
 
 PUTRGBA (dst_2, py_2, pa_2, 1, 0)
 
 PUTRGBA (dst_1, py_1, pa_1, 1, 0)
 
 PUTRGBA (dst_1, py_1, pa_1, 2, 0)
 
 PUTRGBA (dst_2, py_2, pa_2, 2, 0)
 
 PUTRGBA (dst_2, py_2, pa_2, 3, 0)
 
 PUTRGBA (dst_1, py_1, pa_1, 3, 0)
 
 PUTRGB24 (dst_1, py_1, 0)
 
 PUTRGB24 (dst_2, py_2, 0)
 
 PUTRGB24 (dst_2, py_2, 1)
 
 PUTRGB24 (dst_1, py_1, 1)
 
 PUTRGB24 (dst_1, py_1, 2)
 
 PUTRGB24 (dst_2, py_2, 2)
 
 PUTRGB24 (dst_2, py_2, 3)
 
 PUTRGB24 (dst_1, py_1, 3)
 
 PUTBGR24 (dst_1, py_1, 0)
 
 PUTBGR24 (dst_2, py_2, 0)
 
 PUTBGR24 (dst_2, py_2, 1)
 
 PUTBGR24 (dst_1, py_1, 1)
 
 PUTBGR24 (dst_1, py_1, 2)
 
 PUTBGR24 (dst_2, py_2, 2)
 
 PUTBGR24 (dst_2, py_2, 3)
 
 PUTBGR24 (dst_1, py_1, 3)
 
 PUTRGB12 (dst_1, py_1, 0, 0)
 
 PUTRGB12 (dst_2, py_2, 0, 0+8)
 
 PUTRGB12 (dst_2, py_2, 1, 2+8)
 
 PUTRGB12 (dst_1, py_1, 1, 2)
 
 PUTRGB12 (dst_1, py_1, 2, 4)
 
 PUTRGB12 (dst_2, py_2, 2, 4+8)
 
 PUTRGB12 (dst_2, py_2, 3, 6+8)
 
 PUTRGB12 (dst_1, py_1, 3, 6)
 
 PUTRGB8 (dst_1, py_1, 0, 0)
 
 PUTRGB8 (dst_2, py_2, 0, 0+8)
 
 PUTRGB8 (dst_2, py_2, 1, 2+8)
 
 PUTRGB8 (dst_1, py_1, 1, 2)
 
 PUTRGB8 (dst_1, py_1, 2, 4)
 
 PUTRGB8 (dst_2, py_2, 2, 4+8)
 
 PUTRGB8 (dst_2, py_2, 3, 6+8)
 
 PUTRGB8 (dst_1, py_1, 3, 6)
 
 PUTRGB4D (dst_1, py_1, 0, 0)
 
 PUTRGB4D (dst_2, py_2, 0, 0+8)
 
 PUTRGB4D (dst_2, py_2, 1, 2+8)
 
 PUTRGB4D (dst_1, py_1, 1, 2)
 
 PUTRGB4D (dst_1, py_1, 2, 4)
 
 PUTRGB4D (dst_2, py_2, 2, 4+8)
 
 PUTRGB4D (dst_2, py_2, 3, 6+8)
 
 PUTRGB4D (dst_1, py_1, 3, 6)
 
 PUTRGB4DB (dst_1, py_1, 0, 0)
 
 PUTRGB4DB (dst_2, py_2, 0, 0+8)
 
 PUTRGB4DB (dst_2, py_2, 1, 2+8)
 
 PUTRGB4DB (dst_1, py_1, 1, 2)
 
 PUTRGB4DB (dst_1, py_1, 2, 4)
 
 PUTRGB4DB (dst_2, py_2, 2, 4+8)
 
 PUTRGB4DB (dst_2, py_2, 3, 6+8)
 
 PUTRGB4DB (dst_1, py_1, 3, 6)
 
 PUTRGB1 (out_1, py_1, 0, 0)
 
 PUTRGB1 (out_2, py_2, 0, 0+8)
 
 PUTRGB1 (out_2, py_2, 1, 2+8)
 
 PUTRGB1 (out_1, py_1, 1, 2)
 
 PUTRGB1 (out_1, py_1, 2, 4)
 
 PUTRGB1 (out_2, py_2, 2, 4+8)
 
 PUTRGB1 (out_2, py_2, 3, 6+8)
 
 PUTRGB1 (out_1, py_1, 3, 6)
 
SwsFunc ff_yuv2rgb_get_func_ptr (SwsContext *c)
 
static void fill_table (uint8_t *table[256], const int elemsize, const int inc, void *y_tab)
 
static void fill_gv_table (int table[256], const int elemsize, const int inc)
 
static uint16_t roundToInt16 (int64_t f)
 
av_cold int ff_yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
 

Variables

const int32_t ff_yuv2rgb_coeffs [8][4]
 
 pa_1 = 8
 
 pa_2 = 8
 
const uint8_td16 = ff_dither_4x4_16[y & 3]
 
const uint8_td32 = ff_dither_8x8_32[y & 7]
 
const uint8_td64 = ff_dither_8x8_73[y & 7]
 
const uint8_td128 = ff_dither_8x8_220[y & 7]
 
int acc
 
char out_1 = 0
 
char out_2 = 0
 
 g = c->table_gU[128] + c->table_gV[128]
 
 dst_1 [0] = out_1
 
 dst_2 [0] = out_2
 

Macro Definition Documentation

◆ LOADCHROMA

#define LOADCHROMA (   i)
Value:
U = pu[i]; \
V = pv[i]; \
r = (void *)c->table_rV[V]; \
g = (void *)(c->table_gU[U] + c->table_gV[V]); \
b = (void *)c->table_bU[U];
Definition: vf_drawbox.c:37
g
Definition: yuv2rgb.c:546
#define V
Definition: options_table.h:34

Definition at line 67 of file yuv2rgb.c.

◆ PUTRGB

#define PUTRGB (   dst,
  src,
 
)
Value:
Y = src[2 * i]; \
dst[2 * i] = r[Y] + g[Y] + b[Y]; \
Y = src[2 * i + 1]; \
dst[2 * i + 1] = r[Y] + g[Y] + b[Y];
#define b
Definition: input.c:52
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37

Definition at line 74 of file yuv2rgb.c.

◆ PUTRGB24

#define PUTRGB24 (   dst,
  src,
 
)
Value:
Y = src[2 * i]; \
dst[6 * i + 0] = r[Y]; \
dst[6 * i + 1] = g[Y]; \
dst[6 * i + 2] = b[Y]; \
Y = src[2 * i + 1]; \
dst[6 * i + 3] = r[Y]; \
dst[6 * i + 4] = g[Y]; \
dst[6 * i + 5] = b[Y];
#define b
Definition: input.c:52
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37

Definition at line 80 of file yuv2rgb.c.

◆ PUTBGR24

#define PUTBGR24 (   dst,
  src,
 
)
Value:
Y = src[2 * i]; \
dst[6 * i + 0] = b[Y]; \
dst[6 * i + 1] = g[Y]; \
dst[6 * i + 2] = r[Y]; \
Y = src[2 * i + 1]; \
dst[6 * i + 3] = b[Y]; \
dst[6 * i + 4] = g[Y]; \
dst[6 * i + 5] = r[Y];
#define b
Definition: input.c:52
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37

Definition at line 90 of file yuv2rgb.c.

◆ PUTRGBA

#define PUTRGBA (   dst,
  ysrc,
  asrc,
  i,
 
)
Value:
Y = ysrc[2 * i]; \
dst[2 * i] = r[Y] + g[Y] + b[Y] + (asrc[2 * i] << s); \
Y = ysrc[2 * i + 1]; \
dst[2 * i + 1] = r[Y] + g[Y] + b[Y] + (asrc[2 * i + 1] << s);
#define b
Definition: input.c:52
#define r
Definition: input.c:51
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37

Definition at line 100 of file yuv2rgb.c.

◆ PUTRGB48

#define PUTRGB48 (   dst,
  src,
 
)
Value:
Y = src[ 2 * i]; \
dst[12 * i + 0] = dst[12 * i + 1] = r[Y]; \
dst[12 * i + 2] = dst[12 * i + 3] = g[Y]; \
dst[12 * i + 4] = dst[12 * i + 5] = b[Y]; \
Y = src[ 2 * i + 1]; \
dst[12 * i + 6] = dst[12 * i + 7] = r[Y]; \
dst[12 * i + 8] = dst[12 * i + 9] = g[Y]; \
dst[12 * i + 10] = dst[12 * i + 11] = b[Y];
#define b
Definition: input.c:52
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37

Definition at line 106 of file yuv2rgb.c.

◆ PUTBGR48

#define PUTBGR48 (   dst,
  src,
 
)
Value:
Y = src[2 * i]; \
dst[12 * i + 0] = dst[12 * i + 1] = b[Y]; \
dst[12 * i + 2] = dst[12 * i + 3] = g[Y]; \
dst[12 * i + 4] = dst[12 * i + 5] = r[Y]; \
Y = src[2 * i + 1]; \
dst[12 * i + 6] = dst[12 * i + 7] = b[Y]; \
dst[12 * i + 8] = dst[12 * i + 9] = g[Y]; \
dst[12 * i + 10] = dst[12 * i + 11] = r[Y];
#define b
Definition: input.c:52
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37

Definition at line 116 of file yuv2rgb.c.

◆ YUV2RGBFUNC

#define YUV2RGBFUNC (   func_name,
  dst_type,
  alpha 
)
Value:
static int func_name(SwsContext *c, const uint8_t *src[], \
int srcStride[], int srcSliceY, int srcSliceH, \
uint8_t *dst[], int dstStride[]) \
{ \
int y; \
if (!alpha && c->srcFormat == AV_PIX_FMT_YUV422P) { \
srcStride[1] *= 2; \
srcStride[2] *= 2; \
} \
for (y = 0; y < srcSliceH; y += 2) { \
dst_type *dst_1 = \
(dst_type *)(dst[0] + (y + srcSliceY) * dstStride[0]); \
dst_type *dst_2 = \
(dst_type *)(dst[0] + (y + srcSliceY + 1) * dstStride[0]); \
dst_type av_unused *r, *g, *b; \
const uint8_t *py_1 = src[0] + y * srcStride[0]; \
const uint8_t *py_2 = py_1 + srcStride[0]; \
const uint8_t *pu = src[1] + (y >> 1) * srcStride[1]; \
const uint8_t *pv = src[2] + (y >> 1) * srcStride[2]; \
const uint8_t av_unused *pa_1, *pa_2; \
unsigned int h_size = c->dstW >> 3; \
if (alpha) { \
pa_1 = src[3] + y * srcStride[3]; \
pa_2 = pa_1 + srcStride[3]; \
} \
while (h_size--) { \
int av_unused U, V, Y; \
dst_1[0]
Definition: yuv2rgb.c:566
pa_1
Definition: yuv2rgb.c:283
Definition: vf_drawbox.c:37
uint8_t
#define b
Definition: input.c:52
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:63
#define V
Definition: options_table.h:34
if(ac->has_optimized_func)
Definition: vf_drawbox.c:37
pa_2
Definition: yuv2rgb.c:284
dst_2[0]
Definition: yuv2rgb.c:567
#define av_unused
Definition: attributes.h:86

Definition at line 126 of file yuv2rgb.c.

◆ ENDYUV2RGBLINE

#define ENDYUV2RGBLINE (   dst_delta,
  ss 
)
Value:
pu += 4 >> ss; \
pv += 4 >> ss; \
py_1 += 8 >> ss; \
py_2 += 8 >> ss; \
dst_1 += dst_delta >> ss; \
dst_2 += dst_delta >> ss; \
} \
if (c->dstW & (4 >> ss)) { \
int av_unused Y, U, V; \
Definition: vf_drawbox.c:37
#define V
Definition: options_table.h:34
Definition: vf_drawbox.c:37
#define av_unused
Definition: attributes.h:86

Definition at line 156 of file yuv2rgb.c.

◆ ENDYUV2RGBFUNC

#define ENDYUV2RGBFUNC ( )
Value:
} \
} \
return srcSliceH; \
}

Definition at line 167 of file yuv2rgb.c.

◆ CLOSEYUV2RGBFUNC

#define CLOSEYUV2RGBFUNC (   dst_delta)
Value:
ENDYUV2RGBLINE(dst_delta, 0) \
ENDYUV2RGBFUNC()
#define ENDYUV2RGBLINE(dst_delta, ss)
Definition: yuv2rgb.c:156

Definition at line 173 of file yuv2rgb.c.

◆ PUTRGB12

#define PUTRGB12 (   dst,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
dst[2 * i] = r[Y + d16[0 + o]] + \
g[Y + d16[0 + o]] + \
b[Y + d16[0 + o]]; \
Y = src[2 * i + 1]; \
dst[2 * i + 1] = r[Y + d16[1 + o]] + \
g[Y + d16[1 + o]] + \
b[Y + d16[1 + o]];
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
const uint8_t * d16
Definition: yuv2rgb.c:418
Definition: vf_drawbox.c:37

Definition at line 420 of file yuv2rgb.c.

◆ PUTRGB8

#define PUTRGB8 (   dst,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
dst[2 * i] = r[Y + d32[0 + o]] + \
g[Y + d32[0 + o]] + \
b[Y + d64[0 + o]]; \
Y = src[2 * i + 1]; \
dst[2 * i + 1] = r[Y + d32[1 + o]] + \
g[Y + d32[1 + o]] + \
b[Y + d64[1 + o]];
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
const uint8_t * d64
Definition: yuv2rgb.c:450
Definition: vf_drawbox.c:37
const uint8_t * d32
Definition: yuv2rgb.c:449

Definition at line 452 of file yuv2rgb.c.

◆ PUTRGB4D

#define PUTRGB4D (   dst,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
acc = r[Y + d128[0 + o]] + \
g[Y + d64[0 + o]] + \
b[Y + d128[0 + o]]; \
Y = src[2 * i + 1]; \
acc |= (r[Y + d128[1 + o]] + \
g[Y + d64[1 + o]] + \
b[Y + d128[1 + o]]) << 4; \
dst[i] = acc;
int acc
Definition: yuv2rgb.c:482
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
const uint8_t * d64
Definition: yuv2rgb.c:450
Definition: vf_drawbox.c:37
const uint8_t * d128
Definition: yuv2rgb.c:481

Definition at line 484 of file yuv2rgb.c.

◆ PUTRGB4DB

#define PUTRGB4DB (   dst,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
dst[2 * i] = r[Y + d128[0 + o]] + \
g[Y + d64[0 + o]] + \
b[Y + d128[0 + o]]; \
Y = src[2 * i + 1]; \
dst[2 * i + 1] = r[Y + d128[1 + o]] + \
g[Y + d64[1 + o]] + \
b[Y + d128[1 + o]];
#define r
Definition: input.c:51
#define src
Definition: vp8dsp.c:254
const uint8_t * d64
Definition: yuv2rgb.c:450
Definition: vf_drawbox.c:37
const uint8_t * d128
Definition: yuv2rgb.c:481

Definition at line 516 of file yuv2rgb.c.

◆ PUTRGB1

#define PUTRGB1 (   out,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
out += out + g[Y + d128[0 + o]]; \
Y = src[2 * i + 1]; \
out += out + g[Y + d128[1 + o]];
#define src
Definition: vp8dsp.c:254
g
Definition: yuv2rgb.c:546
Definition: vf_drawbox.c:37
const uint8_t * d128
Definition: yuv2rgb.c:481
FILE * out
Definition: movenc.c:54

Definition at line 548 of file yuv2rgb.c.

◆ ALLOC_YUV_TABLE

#define ALLOC_YUV_TABLE (   x)
Value:
c->yuvTable = av_malloc(x); \
if (!c->yuvTable) \
return AVERROR(ENOMEM);
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:62
#define AVERROR(e)
Definition: error.h:43

Referenced by ff_yuv2rgb_c_init_tables().

Function Documentation

◆ LOADCHROMA() [1/4]

LOADCHROMA ( )

◆ PUTRGB48() [1/8]

PUTRGB48 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB48() [2/8]

PUTRGB48 ( dst_2  ,
py_2  ,
 
)

◆ LOADCHROMA() [2/4]

LOADCHROMA ( )

◆ PUTRGB48() [3/8]

PUTRGB48 ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB48() [4/8]

PUTRGB48 ( dst_1  ,
py_1  ,
 
)

◆ LOADCHROMA() [3/4]

LOADCHROMA ( )

◆ PUTRGB48() [5/8]

PUTRGB48 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB48() [6/8]

PUTRGB48 ( dst_2  ,
py_2  ,
 
)

◆ LOADCHROMA() [4/4]

LOADCHROMA ( )

◆ PUTRGB48() [7/8]

PUTRGB48 ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB48() [8/8]

PUTRGB48 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR48() [1/8]

PUTBGR48 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR48() [2/8]

PUTBGR48 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR48() [3/8]

PUTBGR48 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR48() [4/8]

PUTBGR48 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR48() [5/8]

PUTBGR48 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR48() [6/8]

PUTBGR48 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR48() [7/8]

PUTBGR48 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR48() [8/8]

PUTBGR48 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB() [1/8]

PUTRGB ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB() [2/8]

PUTRGB ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB() [3/8]

PUTRGB ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB() [4/8]

PUTRGB ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB() [5/8]

PUTRGB ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB() [6/8]

PUTRGB ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB() [7/8]

PUTRGB ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB() [8/8]

PUTRGB ( dst_1  ,
py_1  ,
 
)

◆ PUTRGBA() [1/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)

◆ PUTRGBA() [2/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)

◆ PUTRGBA() [3/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)

◆ PUTRGBA() [4/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)

◆ PUTRGBA() [5/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)

◆ PUTRGBA() [6/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)

◆ PUTRGBA() [7/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)

◆ PUTRGBA() [8/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)

◆ PUTRGBA() [9/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)

◆ PUTRGBA() [10/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)

◆ PUTRGBA() [11/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)

◆ PUTRGBA() [12/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)

◆ PUTRGBA() [13/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)

◆ PUTRGBA() [14/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)

◆ PUTRGBA() [15/16]

PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)

◆ PUTRGBA() [16/16]

PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)

◆ PUTRGB24() [1/8]

PUTRGB24 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB24() [2/8]

PUTRGB24 ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB24() [3/8]

PUTRGB24 ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB24() [4/8]

PUTRGB24 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB24() [5/8]

PUTRGB24 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB24() [6/8]

PUTRGB24 ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB24() [7/8]

PUTRGB24 ( dst_2  ,
py_2  ,
 
)

◆ PUTRGB24() [8/8]

PUTRGB24 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR24() [1/8]

PUTBGR24 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR24() [2/8]

PUTBGR24 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR24() [3/8]

PUTBGR24 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR24() [4/8]

PUTBGR24 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR24() [5/8]

PUTBGR24 ( dst_1  ,
py_1  ,
 
)

◆ PUTBGR24() [6/8]

PUTBGR24 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR24() [7/8]

PUTBGR24 ( dst_2  ,
py_2  ,
 
)

◆ PUTBGR24() [8/8]

PUTBGR24 ( dst_1  ,
py_1  ,
 
)

◆ PUTRGB12() [1/8]

PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB12() [2/8]

PUTRGB12 ( dst_2  ,
py_2  ,
,
0+  8 
)

◆ PUTRGB12() [3/8]

PUTRGB12 ( dst_2  ,
py_2  ,
,
2+  8 
)

◆ PUTRGB12() [4/8]

PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB12() [5/8]

PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB12() [6/8]

PUTRGB12 ( dst_2  ,
py_2  ,
,
4+  8 
)

◆ PUTRGB12() [7/8]

PUTRGB12 ( dst_2  ,
py_2  ,
,
6+  8 
)

◆ PUTRGB12() [8/8]

PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB8() [1/8]

PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB8() [2/8]

PUTRGB8 ( dst_2  ,
py_2  ,
,
0+  8 
)

◆ PUTRGB8() [3/8]

PUTRGB8 ( dst_2  ,
py_2  ,
,
2+  8 
)

◆ PUTRGB8() [4/8]

PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB8() [5/8]

PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB8() [6/8]

PUTRGB8 ( dst_2  ,
py_2  ,
,
4+  8 
)

◆ PUTRGB8() [7/8]

PUTRGB8 ( dst_2  ,
py_2  ,
,
6+  8 
)

◆ PUTRGB8() [8/8]

PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4D() [1/8]

PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4D() [2/8]

PUTRGB4D ( dst_2  ,
py_2  ,
,
0+  8 
)

◆ PUTRGB4D() [3/8]

PUTRGB4D ( dst_2  ,
py_2  ,
,
2+  8 
)

◆ PUTRGB4D() [4/8]

PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4D() [5/8]

PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4D() [6/8]

PUTRGB4D ( dst_2  ,
py_2  ,
,
4+  8 
)

◆ PUTRGB4D() [7/8]

PUTRGB4D ( dst_2  ,
py_2  ,
,
6+  8 
)

◆ PUTRGB4D() [8/8]

PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4DB() [1/8]

PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4DB() [2/8]

PUTRGB4DB ( dst_2  ,
py_2  ,
,
0+  8 
)

◆ PUTRGB4DB() [3/8]

PUTRGB4DB ( dst_2  ,
py_2  ,
,
2+  8 
)

◆ PUTRGB4DB() [4/8]

PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4DB() [5/8]

PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB4DB() [6/8]

PUTRGB4DB ( dst_2  ,
py_2  ,
,
4+  8 
)

◆ PUTRGB4DB() [7/8]

PUTRGB4DB ( dst_2  ,
py_2  ,
,
6+  8 
)

◆ PUTRGB4DB() [8/8]

PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)

◆ PUTRGB1() [1/8]

PUTRGB1 ( out_1  ,
py_1  ,
,
 
)

◆ PUTRGB1() [2/8]

PUTRGB1 ( out_2  ,
py_2  ,
,
0+  8 
)

◆ PUTRGB1() [3/8]

PUTRGB1 ( out_2  ,
py_2  ,
,
2+  8 
)

◆ PUTRGB1() [4/8]

PUTRGB1 ( out_1  ,
py_1  ,
,
 
)

◆ PUTRGB1() [5/8]

PUTRGB1 ( out_1  ,
py_1  ,
,
 
)

◆ PUTRGB1() [6/8]

PUTRGB1 ( out_2  ,
py_2  ,
,
4+  8 
)

◆ PUTRGB1() [7/8]

PUTRGB1 ( out_2  ,
py_2  ,
,
6+  8 
)

◆ PUTRGB1() [8/8]

PUTRGB1 ( out_1  ,
py_1  ,
,
 
)

◆ ff_yuv2rgb_get_func_ptr()

SwsFunc ff_yuv2rgb_get_func_ptr ( SwsContext c)

Definition at line 570 of file yuv2rgb.c.

Referenced by ff_get_unscaled_swscale().

◆ fill_table()

static void fill_table ( uint8_t table[256],
const int  elemsize,
const int  inc,
void y_tab 
)
static

Definition at line 632 of file yuv2rgb.c.

Referenced by ff_yuv2rgb_c_init_tables().

◆ fill_gv_table()

static void fill_gv_table ( int  table[256],
const int  elemsize,
const int  inc 
)
static

Definition at line 647 of file yuv2rgb.c.

Referenced by ff_yuv2rgb_c_init_tables().

◆ roundToInt16()

static uint16_t roundToInt16 ( int64_t  f)
static

Definition at line 659 of file yuv2rgb.c.

Referenced by ff_yuv2rgb_c_init_tables().

◆ ff_yuv2rgb_c_init_tables()

av_cold int ff_yuv2rgb_c_init_tables ( SwsContext c,
const int  inv_table[4],
int  fullRange,
int  brightness,
int  contrast,
int  saturation 
)

Definition at line 671 of file yuv2rgb.c.

Referenced by sws_setColorspaceDetails().

Variable Documentation

◆ ff_yuv2rgb_coeffs

const int32_t ff_yuv2rgb_coeffs[8][4]
Initial value:
= {
{ 117504, 138453, 13954, 34903 },
{ 117504, 138453, 13954, 34903 },
{ 104597, 132201, 25675, 53279 },
{ 104597, 132201, 25675, 53279 },
{ 104448, 132798, 24759, 53109 },
{ 104597, 132201, 25675, 53279 },
{ 104597, 132201, 25675, 53279 },
{ 117579, 136230, 16907, 35559 }
}

Definition at line 49 of file yuv2rgb.c.

Referenced by sws_getCachedContext(), sws_getCoefficients(), sws_getContext(), and usePal().

◆ pa_1

pa_1 = 8

Definition at line 283 of file yuv2rgb.c.

◆ pa_2

pa_2 = 8

Definition at line 284 of file yuv2rgb.c.

◆ d16

const uint8_t* d16 = ff_dither_4x4_16[y & 3]

Definition at line 418 of file yuv2rgb.c.

◆ d32

const uint8_t* d32 = ff_dither_8x8_32[y & 7]

Definition at line 449 of file yuv2rgb.c.

Referenced by yuv2rgb_write().

◆ d64

const uint8_t * d64 = ff_dither_8x8_73[y & 7]

Definition at line 450 of file yuv2rgb.c.

Referenced by yuv2rgb_write().

◆ d128

const uint8_t * d128 = ff_dither_8x8_220[y & 7]

◆ acc

int acc

◆ out_1

char out_1 = 0

Definition at line 545 of file yuv2rgb.c.

◆ out_2

char out_2 = 0

Definition at line 545 of file yuv2rgb.c.

◆ g

g = c->table_gU[128] + c->table_gV[128]

Definition at line 546 of file yuv2rgb.c.

Referenced by aac_encode_frame(), add_hfyu_left_pred_bgr32_c(), add_opt(), adjust_frame_information(), apply_dependent_coupling(), apply_intensity_stereo(), apply_mid_side_stereo(), asf_read_header(), avcodec_string(), avpriv_set_systematic_pal2(), bfi_decode_frame(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bgr8torgb8(), cdg_load_palette(), cdxl_decode_ham6(), cdxl_decode_ham8(), celt_renormalize_vector(), compress_color(), convert_to_rgb32_loco(), dct_quantize_refine(), decode_band_types(), decode_block(), decode_cce(), decode_frame(), decode_hybrid(), decode_mvc2(), decode_pal(), decode_rgb_frame(), decode_scalefactors(), decode_spectrum_and_dequant(), deloco_rgb24(), detect_unknown_subobject(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), dx2_decode_slice_5x5(), encode_dvb_subtitles(), encode_rgb_frame(), filter_frame(), find_best_vect(), find_guid(), finish_group(), flic_decode_frame_8BPP(), generate_joint_tables(), get_match_score(), guess_palette(), idcin_read_packet(), import_palette(), lag_decode_frame(), magy_decode_slice(), mangle_rgb_planes(), mov_parse_stsd_video(), mp_decode_layer3(), mp_yuv_to_rgb(), open_files(), optimize_colors(), paf_video_decode(), parse_chunks(), parse_palette(), parse_palette_segment(), parse_pixel_format(), planar_rgb16_to_uv(), planar_rgb16_to_y(), planar_rgb_to_uv(), planar_rgb_to_y(), png_filter_row(), pnm_decode_frame(), premult2straight(), process_ipmovie_chunk(), psy_3gpp_analyze_channel(), psy_3gpp_init(), put_pixel(), ra144_encode_subblock(), refine_colors(), request_frame(), restore_rgb_planes(), rgb12to15(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_c_template(), rgb24_to_yuv420p(), rgb24to15(), rgb24to15_c(), rgb24to16(), rgb24to16_c(), rgb24tobgr15(), rgb24tobgr15_c(), rgb24tobgr16(), rgb24tobgr16_c(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb24toyv12_c(), rgb48funcs(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48ToY_c_template(), rgb_to_yuv(), rgba2ycocg(), rgtc2_block_internal(), run_postproc(), sbr_hf_gen(), search_for_ms(), search_for_quantizers_anmr(), search_for_quantizers_faac(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), sha256_transform(), shuffle_bytes_2103(), shuffle_bytes_2103_c(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), subtitle_thread(), sws_scale(), vb_decode_framedata(), vmd_decode(), vmdvideo_decode_init(), vp9_handle_packet(), vqa_decode_chunk(), wait_frame(), xan_decode_frame(), ycocg2rgba(), yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), yuv2rgb_write(), yuv2rgb_X_c_template(), yuv_a_to_rgba(), and yuv_to_rgba().

◆ dst_1

dst_1[0] = out_1

Definition at line 566 of file yuv2rgb.c.

◆ dst_2

dst_2[0] = out_2

Definition at line 567 of file yuv2rgb.c.