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

#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; \
return srcSliceH
uint8_t
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
#define src
Definition: vp8dsp.c:254
#define pv
Definition: regdef.h:60
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Definition: common.h:72
if(ret)
int index
Definition: gxfenc.c:89
int x86_reg
Definition: asm.h:72
for(j=16;j >0;--j)

Definition at line 29 of file yuv2rgb_template.c.

Referenced by yuv420_bgr24_TMPL(), yuv420_bgr32_TMPL(), yuv420_rgb15_TMPL(), yuv420_rgb16_TMPL(), yuv420_rgb24_TMPL(), yuv420_rgb32_TMPL(), yuva420_bgr32_TMPL(), and yuva420_rgb32_TMPL().

Function Documentation

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[] 
)
inlinestatic

Definition at line 70 of file yuv2rgb_template.c.

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.

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.

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.

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.

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.

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 168 of file yuv2rgb_template.c.

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 182 of file yuv2rgb_template.c.

Variable Documentation

return srcSliceH