FFmpeg
Macros | Functions | Variables
yuv2rgb_template.c File Reference
#include <stdint.h>
#include "libavutil/x86/asm.h"
#include "libswscale/swscale_internal.h"

Go to the source code of this file.

Macros

#define YUV2RGB_LOOP(depth)
 

Functions

void ff_yuv_420_rgb24_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index)
 
void ff_yuv_420_bgr24_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index)
 
void ff_yuv_420_rgb15_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index)
 
void ff_yuv_420_rgb16_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index)
 
void ff_yuv_420_rgb32_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index)
 
void ff_yuv_420_bgr32_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index)
 
void ff_yuva_420_rgb32_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index, const uint8_t *pa_2index)
 
void ff_yuva_420_bgr32_TMPL (x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index, const uint8_t *pa_2index)
 
static int yuv420_rgb15_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuv420_rgb16_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuv420_rgb32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuv420_bgr32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuva420_rgb32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuva420_bgr32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuv420_rgb24_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yuv420_bgr24_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 

Variables

return srcSliceH
 

Macro Definition Documentation

◆ YUV2RGB_LOOP

#define YUV2RGB_LOOP (   depth)
Value:
h_size = (c->dstW + 7) & ~7; \
if (h_size * depth > FFABS(dstStride[0])) \
h_size -= 8; \
\
vshift = c->srcFormat != AV_PIX_FMT_YUV422P; \
for (y = 0; y < srcSliceH; y++) { \
uint8_t *image = dst[0] + (y + srcSliceY) * dstStride[0]; \
const uint8_t *py = src[0] + y * srcStride[0]; \
const uint8_t *pu = src[1] + (y >> vshift) * srcStride[1]; \
const uint8_t *pv = src[2] + (y >> vshift) * srcStride[2]; \
x86_reg index = -h_size / 2; \

Definition at line 29 of file yuv2rgb_template.c.

Function Documentation

◆ ff_yuv_420_rgb24_TMPL()

void ff_yuv_420_rgb24_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index 
)

◆ ff_yuv_420_bgr24_TMPL()

void ff_yuv_420_bgr24_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index 
)

◆ ff_yuv_420_rgb15_TMPL()

void ff_yuv_420_rgb15_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index 
)

◆ ff_yuv_420_rgb16_TMPL()

void ff_yuv_420_rgb16_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index 
)

◆ ff_yuv_420_rgb32_TMPL()

void ff_yuv_420_rgb32_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index 
)

◆ ff_yuv_420_bgr32_TMPL()

void ff_yuv_420_bgr32_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index 
)

◆ ff_yuva_420_rgb32_TMPL()

void ff_yuva_420_rgb32_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index,
const uint8_t *  pa_2index 
)

◆ ff_yuva_420_bgr32_TMPL()

void ff_yuva_420_bgr32_TMPL ( x86_reg  index,
uint8_t *  image,
const uint8_t *  pu_index,
const uint8_t *  pv_index,
const uint64_t *  pointer_c_dither,
const uint8_t *  py_2index,
const uint8_t *  pa_2index 
)

◆ yuv420_rgb15_TMPL()

static int yuv420_rgb15_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 70 of file yuv2rgb_template.c.

◆ yuv420_rgb16_TMPL()

static int yuv420_rgb16_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 90 of file yuv2rgb_template.c.

◆ yuv420_rgb32_TMPL()

static int yuv420_rgb32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 110 of file yuv2rgb_template.c.

◆ yuv420_bgr32_TMPL()

static int yuv420_bgr32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 124 of file yuv2rgb_template.c.

◆ yuva420_rgb32_TMPL()

static int yuva420_rgb32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 138 of file yuv2rgb_template.c.

◆ yuva420_bgr32_TMPL()

static int yuva420_bgr32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 152 of file yuv2rgb_template.c.

◆ yuv420_rgb24_TMPL()

static int yuv420_rgb24_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 169 of file yuv2rgb_template.c.

◆ yuv420_bgr24_TMPL()

static int yuv420_bgr24_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
)
inlinestatic

Definition at line 183 of file yuv2rgb_template.c.

Variable Documentation

◆ srcSliceH

return srcSliceH
FFABS
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Definition: common.h:72
index
int index
Definition: gxfenc.c:89
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
srcSliceH
return srcSliceH
Definition: yuv2rgb_template.c:87
pv
#define pv
Definition: regdef.h:60
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418