Libav
|
#include <assert.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "libavutil/attributes.h"
#include "libavutil/avutil.h"
#include "libavutil/bswap.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "config.h"
#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"
Go to the source code of this file.
Macros | |
#define | output_pixel(pos, val, bias, signedness) |
#define | output_pixel(pos, val) |
#define | yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t) |
#define | accumulate_bit(acc, val) |
#define | output_pixel(pos, acc) |
#define | YUV2PACKEDWRAPPER(name, base, ext, fmt) |
#define | output_pixels(pos, Y1, U, Y2, V) |
#define | R_B ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE) ? R : B) |
#define | B_R ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE) ? B : R) |
#define | output_pixel(pos, val) |
#define | YUV2PACKED16WRAPPER(name, base, ext, fmt) |
#define | r_b ((target == AV_PIX_FMT_RGB24) ? r : b) |
#define | b_r ((target == AV_PIX_FMT_RGB24) ? b : r) |
#define | YUV2RGBWRAPPERX(name, base, ext, fmt, hasAlpha) |
#define | YUV2RGBWRAPPER(name, base, ext, fmt, hasAlpha) |
Functions | |
static av_always_inline void | yuv2plane1_16_c_template (const int32_t *src, uint16_t *dest, int dstW, int big_endian, int output_bits) |
static av_always_inline void | yuv2planeX_16_c_template (const int16_t *filter, int filterSize, const int32_t **src, uint16_t *dest, int dstW, int big_endian, int output_bits) |
static av_always_inline void | yuv2plane1_10_c_template (const int16_t *src, uint16_t *dest, int dstW, int big_endian, int output_bits) |
static av_always_inline void | yuv2planeX_10_c_template (const int16_t *filter, int filterSize, const int16_t **src, uint16_t *dest, int dstW, int big_endian, int output_bits) |
yuv2NBPS (yuv2NBPS(9, yuv2NBPS(BE, yuv2NBPS(1, yuv2NBPS(10, int16_t) | |
static void | yuv2plane1_8_c (const int16_t *src, uint8_t *dest, int dstW, const uint8_t *dither, int offset) |
static void | yuv2nv12cX_c (SwsContext *c, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest, int chrDstW) |
static av_always_inline void | yuv2mono_X_c_template (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2mono_2_c_template (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2mono_1_c_template (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2422_X_c_template (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2422_2_c_template (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2422_1_c_template (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2rgb48_X_c_template (SwsContext *c, const int16_t *lumFilter, const int32_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int32_t **chrUSrc, const int32_t **chrVSrc, int chrFilterSize, const int32_t **alpSrc, uint16_t *dest, int dstW, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2rgb48_2_c_template (SwsContext *c, const int32_t *buf[2], const int32_t *ubuf[2], const int32_t *vbuf[2], const int32_t *abuf[2], uint16_t *dest, int dstW, int yalpha, int uvalpha, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2rgb48_1_c_template (SwsContext *c, const int32_t *buf0, const int32_t *ubuf[2], const int32_t *vbuf[2], const int32_t *abuf0, uint16_t *dest, int dstW, int uvalpha, int y, enum AVPixelFormat target) |
static av_always_inline void | yuv2rgb_write (uint8_t *_dest, int i, unsigned Y1, unsigned Y2, unsigned A1, unsigned A2, const void *_r, const void *_g, const void *_b, int y, enum AVPixelFormat target, int hasAlpha) |
static av_always_inline void | yuv2rgb_X_c_template (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int y, enum AVPixelFormat target, int hasAlpha) |
static av_always_inline void | yuv2rgb_2_c_template (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum AVPixelFormat target, int hasAlpha) |
static av_always_inline void | yuv2rgb_1_c_template (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y, enum AVPixelFormat target, int hasAlpha) |
static av_always_inline void | yuv2rgb_full_X_c_template (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int y, enum AVPixelFormat target, int hasAlpha) |
static void | yuv2gbrp_full_X_c (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t **dest, int dstW, int y) |
av_cold void | ff_sws_init_output_funcs (SwsContext *c, yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, yuv2packedX_fn *yuv2packedX, yuv2anyX_fn *yuv2anyX) |
Variables | |
static const uint8_t | dither_2x2_4 [2][8] |
static const uint8_t | dither_2x2_8 [2][8] |
const uint8_t | ff_dither_4x4_16 [4][8] |
const uint8_t | ff_dither_8x8_32 [8][8] |
const uint8_t | ff_dither_8x8_73 [8][8] |
const uint8_t | ff_dither_8x8_220 [8][8] |
#define output_pixel | ( | pos, | |
val, | |||
bias, | |||
signedness | |||
) |
Definition at line 582 of file output.c.
Referenced by yuv2mono_1_c_template(), yuv2mono_2_c_template(), yuv2mono_X_c_template(), yuv2plane1_10_c_template(), yuv2plane1_16_c_template(), yuv2planeX_10_c_template(), yuv2planeX_16_c_template(), yuv2rgb48_1_c_template(), yuv2rgb48_2_c_template(), and yuv2rgb48_X_c_template().
#define output_pixel | ( | pos, | |
val | |||
) |
#define yuv2NBPS | ( | bits, | |
BE_LE, | |||
is_be, | |||
template_size, | |||
typeX_t | |||
) |
#define accumulate_bit | ( | acc, | |
val | |||
) |
Definition at line 299 of file output.c.
Referenced by yuv2mono_1_c_template(), yuv2mono_2_c_template(), and yuv2mono_X_c_template().
#define output_pixel | ( | pos, | |
acc | |||
) |
#define YUV2PACKEDWRAPPER | ( | name, | |
base, | |||
ext, | |||
fmt | |||
) |
Definition at line 412 of file output.c.
Referenced by yuv2422_1_c_template().
Definition at line 447 of file output.c.
Referenced by yuv2422_1_c_template(), yuv2422_2_c_template(), and yuv2422_X_c_template().
#define R_B ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE) ? R : B) |
Definition at line 580 of file output.c.
Referenced by yuv2rgb48_1_c_template(), yuv2rgb48_2_c_template(), and yuv2rgb48_X_c_template().
#define B_R ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE) ? B : R) |
Definition at line 581 of file output.c.
Referenced by yuv2rgb48_1_c_template(), yuv2rgb48_2_c_template(), and yuv2rgb48_X_c_template().
#define output_pixel | ( | pos, | |
val | |||
) |
#define r_b ((target == AV_PIX_FMT_RGB24) ? r : b) |
Referenced by rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48ToY_c_template(), and yuv2rgb_write().
#define b_r ((target == AV_PIX_FMT_RGB24) ? b : r) |
Referenced by rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48ToY_c_template(), and yuv2rgb_write().
#define YUV2RGBWRAPPERX | ( | name, | |
base, | |||
ext, | |||
fmt, | |||
hasAlpha | |||
) |
Definition at line 1108 of file output.c.
Referenced by yuv2rgb_full_X_c_template().
#define YUV2RGBWRAPPER | ( | name, | |
base, | |||
ext, | |||
fmt, | |||
hasAlpha | |||
) |
|
static |
|
static |
|
static |
|
static |
yuv2NBPS | ( | yuv2NBPS( | 9, |
yuv2NBPS( | BE, | ||
yuv2NBPS( | 1, | ||
yuv2NBPS( | 10, | ||
int16_t | |||
) |
|
static |
Definition at line 253 of file output.c.
Referenced by ff_sws_init_output_funcs().
|
static |
Definition at line 263 of file output.c.
Referenced by ff_sws_init_output_funcs().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 821 of file output.c.
Referenced by yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), and yuv2rgb_X_c_template().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1271 of file output.c.
Referenced by ff_sws_init_output_funcs().
av_cold void ff_sws_init_output_funcs | ( | SwsContext * | c, |
yuv2planar1_fn * | yuv2plane1, | ||
yuv2planarX_fn * | yuv2planeX, | ||
yuv2interleavedX_fn * | yuv2nv12cX, | ||
yuv2packed1_fn * | yuv2packed1, | ||
yuv2packed2_fn * | yuv2packed2, | ||
yuv2packedX_fn * | yuv2packedX, | ||
yuv2anyX_fn * | yuv2anyX | ||
) |
Definition at line 1347 of file output.c.
Referenced by sws_init_swscale(), swscale(), and usePal().
|
static |
Definition at line 39 of file output.c.
Referenced by yuv2rgb_write().
|
static |
Definition at line 44 of file output.c.
Referenced by yuv2rgb_write().
const uint8_t ff_dither_4x4_16[4][8] |
Definition at line 49 of file output.c.
Referenced by usePal(), and yuv2rgb_write().
const uint8_t ff_dither_8x8_32[8][8] |
Definition at line 56 of file output.c.
Referenced by usePal(), and yuv2rgb_write().
const uint8_t ff_dither_8x8_73[8][8] |
Definition at line 67 of file output.c.
Referenced by usePal(), and yuv2rgb_write().
const uint8_t ff_dither_8x8_220[8][8] |
Definition at line 79 of file output.c.
Referenced by usePal(), yuv2mono_1_c_template(), yuv2mono_2_c_template(), yuv2mono_X_c_template(), and yuv2rgb_write().