FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
yuv2rgb.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "libavutil/cpu.h"
#include "libavutil/bswap.h"
#include "config.h"
#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"
#include "libavutil/pixdesc.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 PUTRGB16(dst, src, i, o)
 
#define PUTRGB15(dst, src, i, o)
 
#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 intsws_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)
 
 PUTRGB16 (dst_1, py_1, 0, 0)
 
 PUTRGB16 (dst_2, py_2, 0, 0+8)
 
 PUTRGB16 (dst_2, py_2, 1, 2+8)
 
 PUTRGB16 (dst_1, py_1, 1, 2)
 
 PUTRGB16 (dst_1, py_1, 2, 4)
 
 PUTRGB16 (dst_2, py_2, 2, 4+8)
 
 PUTRGB16 (dst_2, py_2, 3, 6+8)
 
 PUTRGB16 (dst_1, py_1, 3, 6)
 
 PUTRGB15 (dst_1, py_1, 0, 0)
 
 PUTRGB15 (dst_2, py_2, 0, 0+8)
 
 PUTRGB15 (dst_2, py_2, 1, 2+8)
 
 PUTRGB15 (dst_1, py_1, 1, 2)
 
 PUTRGB15 (dst_1, py_1, 2, 4)
 
 PUTRGB15 (dst_2, py_2, 2, 4+8)
 
 PUTRGB15 (dst_2, py_2, 3, 6+8)
 
 PUTRGB15 (dst_1, py_1, 3, 6)
 
 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+2 *YUVRGB_TABLE_HEADROOM], const int elemsize, const int64_t inc, void *y_tab)
 
static void fill_gv_table (int table[256+2 *YUVRGB_TABLE_HEADROOM], const int elemsize, const int64_t 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 [11][4]
 
 pa_1 = 8
 
 pa_2 = 8
 
const uint8_td16 = ff_dither_2x2_8[y & 1]
 
const uint8_te16 = ff_dither_2x2_4[y & 1]
 
const uint8_tf16 = ff_dither_2x2_8[(y & 1)^1]
 
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 + YUVRGB_TABLE_HEADROOM] + c->table_gV[128 + YUVRGB_TABLE_HEADROOM]
 
 dst_1 [0] = out_1
 
 dst_2 [0] = out_2
 

Macro Definition Documentation

#define LOADCHROMA (   i)
Value:
U = pu[i]; \
V = pv[i]; \
r = (void *)c->table_rV[V+YUVRGB_TABLE_HEADROOM]; \
g = (void *)(c->table_gU[U+YUVRGB_TABLE_HEADROOM] + c->table_gV[V+YUVRGB_TABLE_HEADROOM]); \
b = (void *)c->table_bU[U+YUVRGB_TABLE_HEADROOM];
#define YUVRGB_TABLE_HEADROOM
const char * b
Definition: vf_curves.c:113
#define U(x)
Definition: vp56_arith.h:37
#define pv
Definition: regdef.h:60
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
static double c[64]
#define V
Definition: avdct.c:30

Definition at line 70 of file yuv2rgb.c.

#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];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654

Definition at line 77 of file yuv2rgb.c.

#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];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654

Definition at line 83 of file yuv2rgb.c.

#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];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654

Definition at line 93 of file yuv2rgb.c.

#define PUTRGBA (   dst,
  ysrc,
  asrc,
  i,
  s 
)
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);
const char * s
Definition: avisynth_c.h:768
const char * b
Definition: vf_curves.c:113
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654

Definition at line 103 of file yuv2rgb.c.

#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];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654

Definition at line 109 of file yuv2rgb.c.

#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];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654

Definition at line 119 of file yuv2rgb.c.

#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--) { \
dst_1[0]
Definition: yuv2rgb.c:674
static float alpha(float a)
pa_1
Definition: yuv2rgb.c:290
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
uint8_t
#define Y
Definition: vf_boxblur.c:76
#define U(x)
Definition: vp56_arith.h:37
#define pv
Definition: regdef.h:60
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:66
pa_2
Definition: yuv2rgb.c:291
int
if(ret< 0)
Definition: vf_mcdeint.c:279
static double c[64]
dst_2[0]
Definition: yuv2rgb.c:675
for(j=16;j >0;--j)
#define av_unused
Definition: attributes.h:125
#define V
Definition: avdct.c:30

Definition at line 129 of file yuv2rgb.c.

#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)) { \
dst_1[0]
Definition: yuv2rgb.c:674
#define Y
Definition: vf_boxblur.c:76
#define U(x)
Definition: vp56_arith.h:37
#define pv
Definition: regdef.h:60
#define ss
int
if(ret< 0)
Definition: vf_mcdeint.c:279
static double c[64]
dst_2[0]
Definition: yuv2rgb.c:675
#define av_unused
Definition: attributes.h:125
#define V
Definition: avdct.c:30

Definition at line 159 of file yuv2rgb.c.

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

Definition at line 170 of file yuv2rgb.c.

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

Definition at line 176 of file yuv2rgb.c.

#define PUTRGB16 (   dst,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
dst[2 * i] = r[Y + d16[0 + o]] + \
g[Y + e16[0 + o]] + \
b[Y + f16[0 + o]]; \
Y = src[2 * i + 1]; \
dst[2 * i + 1] = r[Y + d16[1 + o]] + \
g[Y + e16[1 + o]] + \
b[Y + f16[1 + o]];
const uint8_t * e16
Definition: yuv2rgb.c:409
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
const uint8_t * d16
Definition: yuv2rgb.c:408
const uint8_t * f16
Definition: yuv2rgb.c:410

Definition at line 412 of file yuv2rgb.c.

#define PUTRGB15 (   dst,
  src,
  i,
 
)
Value:
Y = src[2 * i]; \
dst[2 * i] = r[Y + d16[0 + o]] + \
g[Y + d16[1 + o]] + \
b[Y + e16[0 + o]]; \
Y = src[2 * i + 1]; \
dst[2 * i + 1] = r[Y + d16[1 + o]] + \
g[Y + d16[0 + o]] + \
b[Y + e16[1 + o]];
const uint8_t * e16
Definition: yuv2rgb.c:409
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
const uint8_t * d16
Definition: yuv2rgb.c:408

Definition at line 442 of file yuv2rgb.c.

#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]];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
const uint8_t * d16
Definition: yuv2rgb.c:408

Definition at line 472 of file yuv2rgb.c.

#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]];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const uint8_t * d64
Definition: yuv2rgb.c:502
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
const uint8_t * d32
Definition: yuv2rgb.c:501

Definition at line 504 of file yuv2rgb.c.

#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:554
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const uint8_t * d64
Definition: yuv2rgb.c:502
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
const uint8_t * d128
Definition: yuv2rgb.c:553

Definition at line 556 of file yuv2rgb.c.

#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]];
const char * b
Definition: vf_curves.c:113
#define src
Definition: vp8dsp.c:254
#define Y
Definition: vf_boxblur.c:76
const uint8_t * d64
Definition: yuv2rgb.c:502
const char * r
Definition: vf_curves.c:111
g
Definition: yuv2rgb.c:654
const uint8_t * d128
Definition: yuv2rgb.c:553

Definition at line 608 of file yuv2rgb.c.

#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
#define Y
Definition: vf_boxblur.c:76
g
Definition: yuv2rgb.c:654
const uint8_t * d128
Definition: yuv2rgb.c:553
FILE * out
Definition: movenc.c:54

Definition at line 656 of file yuv2rgb.c.

#define ALLOC_YUV_TABLE (   x)
Value:
c->yuvTable = av_malloc(x); \
if (!c->yuvTable) \
return AVERROR(ENOMEM);
#define av_malloc(s)
#define AVERROR(e)
Definition: error.h:43
return
if(ret< 0)
Definition: vf_mcdeint.c:279
static double c[64]

Referenced by ff_yuv2rgb_c_init_tables().

Function Documentation

LOADCHROMA ( )
PUTRGB48 ( dst_1  ,
py_1  ,
 
)
PUTRGB48 ( dst_2  ,
py_2  ,
 
)
LOADCHROMA ( )
PUTRGB48 ( dst_2  ,
py_2  ,
 
)
PUTRGB48 ( dst_1  ,
py_1  ,
 
)
LOADCHROMA ( )
PUTRGB48 ( dst_1  ,
py_1  ,
 
)
PUTRGB48 ( dst_2  ,
py_2  ,
 
)
LOADCHROMA ( )
PUTRGB48 ( dst_2  ,
py_2  ,
 
)
PUTRGB48 ( dst_1  ,
py_1  ,
 
)
PUTBGR48 ( dst_1  ,
py_1  ,
 
)
PUTBGR48 ( dst_2  ,
py_2  ,
 
)
PUTBGR48 ( dst_2  ,
py_2  ,
 
)
PUTBGR48 ( dst_1  ,
py_1  ,
 
)
PUTBGR48 ( dst_1  ,
py_1  ,
 
)
PUTBGR48 ( dst_2  ,
py_2  ,
 
)
PUTBGR48 ( dst_2  ,
py_2  ,
 
)
PUTBGR48 ( dst_1  ,
py_1  ,
 
)
PUTRGB ( dst_1  ,
py_1  ,
 
)
PUTRGB ( dst_2  ,
py_2  ,
 
)
PUTRGB ( dst_2  ,
py_2  ,
 
)
PUTRGB ( dst_1  ,
py_1  ,
 
)
PUTRGB ( dst_1  ,
py_1  ,
 
)
PUTRGB ( dst_2  ,
py_2  ,
 
)
PUTRGB ( dst_2  ,
py_2  ,
 
)
PUTRGB ( dst_1  ,
py_1  ,
 
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
24   
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
24   
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)
PUTRGBA ( dst_2  ,
py_2  ,
pa_2  ,
,
 
)
PUTRGBA ( dst_1  ,
py_1  ,
pa_1  ,
,
 
)
PUTRGB24 ( dst_1  ,
py_1  ,
 
)
PUTRGB24 ( dst_2  ,
py_2  ,
 
)
PUTRGB24 ( dst_2  ,
py_2  ,
 
)
PUTRGB24 ( dst_1  ,
py_1  ,
 
)
PUTRGB24 ( dst_1  ,
py_1  ,
 
)
PUTRGB24 ( dst_2  ,
py_2  ,
 
)
PUTRGB24 ( dst_2  ,
py_2  ,
 
)
PUTRGB24 ( dst_1  ,
py_1  ,
 
)
PUTBGR24 ( dst_1  ,
py_1  ,
 
)
PUTBGR24 ( dst_2  ,
py_2  ,
 
)
PUTBGR24 ( dst_2  ,
py_2  ,
 
)
PUTBGR24 ( dst_1  ,
py_1  ,
 
)
PUTBGR24 ( dst_1  ,
py_1  ,
 
)
PUTBGR24 ( dst_2  ,
py_2  ,
 
)
PUTBGR24 ( dst_2  ,
py_2  ,
 
)
PUTBGR24 ( dst_1  ,
py_1  ,
 
)
PUTRGB16 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB16 ( dst_2  ,
py_2  ,
,
0+  8 
)
PUTRGB16 ( dst_2  ,
py_2  ,
,
2+  8 
)
PUTRGB16 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB16 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB16 ( dst_2  ,
py_2  ,
,
4+  8 
)
PUTRGB16 ( dst_2  ,
py_2  ,
,
6+  8 
)
PUTRGB16 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB15 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB15 ( dst_2  ,
py_2  ,
,
0+  8 
)
PUTRGB15 ( dst_2  ,
py_2  ,
,
2+  8 
)
PUTRGB15 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB15 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB15 ( dst_2  ,
py_2  ,
,
4+  8 
)
PUTRGB15 ( dst_2  ,
py_2  ,
,
6+  8 
)
PUTRGB15 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB12 ( dst_2  ,
py_2  ,
,
0+  8 
)
PUTRGB12 ( dst_2  ,
py_2  ,
,
2+  8 
)
PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB12 ( dst_2  ,
py_2  ,
,
4+  8 
)
PUTRGB12 ( dst_2  ,
py_2  ,
,
6+  8 
)
PUTRGB12 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB8 ( dst_2  ,
py_2  ,
,
0+  8 
)
PUTRGB8 ( dst_2  ,
py_2  ,
,
2+  8 
)
PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB8 ( dst_2  ,
py_2  ,
,
4+  8 
)
PUTRGB8 ( dst_2  ,
py_2  ,
,
6+  8 
)
PUTRGB8 ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4D ( dst_2  ,
py_2  ,
,
0+  8 
)
PUTRGB4D ( dst_2  ,
py_2  ,
,
2+  8 
)
PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4D ( dst_2  ,
py_2  ,
,
4+  8 
)
PUTRGB4D ( dst_2  ,
py_2  ,
,
6+  8 
)
PUTRGB4D ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4DB ( dst_2  ,
py_2  ,
,
0+  8 
)
PUTRGB4DB ( dst_2  ,
py_2  ,
,
2+  8 
)
PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)
PUTRGB4DB ( dst_2  ,
py_2  ,
,
4+  8 
)
PUTRGB4DB ( dst_2  ,
py_2  ,
,
6+  8 
)
PUTRGB4DB ( dst_1  ,
py_1  ,
,
 
)
PUTRGB1 ( out_1  ,
py_1  ,
,
 
)
PUTRGB1 ( out_2  ,
py_2  ,
,
0+  8 
)
PUTRGB1 ( out_2  ,
py_2  ,
,
2+  8 
)
PUTRGB1 ( out_1  ,
py_1  ,
,
 
)
PUTRGB1 ( out_1  ,
py_1  ,
,
 
)
PUTRGB1 ( out_2  ,
py_2  ,
,
4+  8 
)
PUTRGB1 ( out_2  ,
py_2  ,
,
6+  8 
)
PUTRGB1 ( out_1  ,
py_1  ,
,
 
)
SwsFunc ff_yuv2rgb_get_func_ptr ( SwsContext c)

Definition at line 678 of file yuv2rgb.c.

Referenced by ff_get_unscaled_swscale().

static void fill_table ( uint8_t table[256+2 *YUVRGB_TABLE_HEADROOM],
const int  elemsize,
const int64_t  inc,
void y_tab 
)
static

Definition at line 736 of file yuv2rgb.c.

Referenced by ff_yuv2rgb_c_init_tables().

static void fill_gv_table ( int  table[256+2 *YUVRGB_TABLE_HEADROOM],
const int  elemsize,
const int64_t  inc 
)
static

Definition at line 750 of file yuv2rgb.c.

Referenced by ff_yuv2rgb_c_init_tables().

static uint16_t roundToInt16 ( int64_t  f)
static

Definition at line 761 of file yuv2rgb.c.

Referenced by 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 773 of file yuv2rgb.c.

Referenced by sws_setColorspaceDetails().

Variable Documentation

const int32_t ff_yuv2rgb_coeffs[11][4]
Initial value:
= {
{ 117489, 138438, 13975, 34925 },
{ 117489, 138438, 13975, 34925 },
{ 104597, 132201, 25675, 53279 },
{ 104597, 132201, 25675, 53279 },
{ 104448, 132798, 24759, 53109 },
{ 104597, 132201, 25675, 53279 },
{ 104597, 132201, 25675, 53279 },
{ 117579, 136230, 16907, 35559 },
{ 0 },
{ 110013, 140363, 12277, 42626 },
{ 110013, 140363, 12277, 42626 },
}

Definition at line 49 of file yuv2rgb.c.

Referenced by sws_getCoefficients(), and sws_init_context().

pa_1 = 8

Definition at line 290 of file yuv2rgb.c.

pa_2 = 8

Definition at line 291 of file yuv2rgb.c.

const uint8_t * d16 = ff_dither_2x2_8[y & 1]

Definition at line 408 of file yuv2rgb.c.

const uint8_t * e16 = ff_dither_2x2_4[y & 1]

Definition at line 409 of file yuv2rgb.c.

const uint8_t* f16 = ff_dither_2x2_8[(y & 1)^1]

Definition at line 410 of file yuv2rgb.c.

const uint8_t * d32 = ff_dither_8x8_32[y & 7]

Definition at line 501 of file yuv2rgb.c.

Referenced by av_image_copy_to_buffer(), and yuv2rgb_write().

const uint8_t * d64 = ff_dither_8x8_73[y & 7]

Definition at line 502 of file yuv2rgb.c.

Referenced by yuv2rgb_write().

const uint8_t * d128 = ff_dither_8x8_220[y & 7]
int acc
char out_1 = 0

Definition at line 653 of file yuv2rgb.c.

char out_2 = 0

Definition at line 653 of file yuv2rgb.c.

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

Definition at line 654 of file yuv2rgb.c.

dst_1[0] = out_1

Definition at line 674 of file yuv2rgb.c.

dst_2[0] = out_2

Definition at line 675 of file yuv2rgb.c.