Libav 0.7.1
Defines | Functions | Variables
libswscale/swscale.c File Reference
#include <inttypes.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include "config.h"
#include <assert.h>
#include "swscale.h"
#include "swscale_internal.h"
#include "rgb2rgb.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/cpu.h"
#include "libavutil/avutil.h"
#include "libavutil/mathematics.h"
#include "libavutil/bswap.h"
#include "libavutil/pixdesc.h"

Go to the source code of this file.

Defines

#define DITHER1XBPP
#define RGB2YUV_SHIFT   15
#define BY   ( (int)(0.114*219/255*(1<<RGB2YUV_SHIFT)+0.5))
#define BV   (-(int)(0.081*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define BU   ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define GY   ( (int)(0.587*219/255*(1<<RGB2YUV_SHIFT)+0.5))
#define GV   (-(int)(0.419*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define GU   (-(int)(0.331*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define RY   ( (int)(0.299*219/255*(1<<RGB2YUV_SHIFT)+0.5))
#define RV   ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define RU   (-(int)(0.169*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define output_pixel(pos, val)
#define yuv2NBPS(bits, BE_LE, is_be)
#define output_pixel(pos, val)
#define YUV2PACKEDWRAPPER(name, base, ext, fmt)
#define output_pixel(pos, acc)
#define output_pixels(pos, Y1, U, Y2, V)
#define r_b   ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? r : b)
#define b_r   ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? b : r)
#define YSCALE_YUV_2_RGBX_C(type, alpha)
#define YSCALE_YUV_2_RGBX_FULL_C(rnd, alpha)
#define YSCALE_YUV_2_RGB2_C(type, alpha)
#define YSCALE_YUV_2_RGB1_C(type, alpha)
#define YSCALE_YUV_2_RGB1B_C(type, alpha)
#define YSCALE_YUV_2_ANYRGB_C(func)
#define input_pixel(pos)   (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
#define r   ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? b_r : r_b)
#define b   ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? r_b : b_r)
#define rgb48funcs(pattern, BE_LE, origin)
#define input_pixel(i)
#define rgb16_32_wrapper(fmt, name, shr, shg, shb, shp, maskr, maskg, maskb, rsh, gsh, bsh, S)
#define input_pixel(pos)   (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
#define YUV_NBPS(depth, BE_LE, origin)
#define DEBUG_SWSCALE_BUFFERS   0
#define DEBUG_BUFFERS(...)   if (DEBUG_SWSCALE_BUFFERS) av_log(c, AV_LOG_DEBUG, __VA_ARGS__)

Functions

static av_always_inline void yuv2yuvX16_c_template (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, uint16_t *dest, uint16_t *uDest, uint16_t *vDest, uint16_t *aDest, int dstW, int chrDstW, int big_endian, int output_bits)
 yuv2NBPS (9, BE, 1)
 yuv2NBPS (9, LE, 0)
 yuv2NBPS (10, BE, 1)
 yuv2NBPS (10, LE, 0)
 yuv2NBPS (16, BE, 1)
 yuv2NBPS (16, LE, 0)
static void yuv2yuvX_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, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
static void yuv2yuv1_c (SwsContext *c, const int16_t *lumSrc, const int16_t *chrUSrc, const int16_t *chrVSrc, const int16_t *alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
static void yuv2nv12X_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, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
static av_always_inline void yuv2gray16_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 PixelFormat target)
static av_always_inline void yuv2gray16_2_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target)
static av_always_inline void yuv2gray16_1_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y, enum PixelFormat target)
 YUV2PACKEDWRAPPER (yuv2gray16,, LE, PIX_FMT_GRAY16LE)
 YUV2PACKEDWRAPPER (yuv2gray16,, BE, PIX_FMT_GRAY16BE)
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 PixelFormat target)
static av_always_inline void yuv2mono_2_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target)
static av_always_inline void yuv2mono_1_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y, enum PixelFormat target)
 YUV2PACKEDWRAPPER (yuv2mono,, white, PIX_FMT_MONOWHITE)
 YUV2PACKEDWRAPPER (yuv2mono,, black, PIX_FMT_MONOBLACK)
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 PixelFormat target)
static av_always_inline void yuv2422_2_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target)
static av_always_inline void yuv2422_1_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y, enum PixelFormat target)
 YUV2PACKEDWRAPPER (yuv2, 422, yuyv422, PIX_FMT_YUYV422)
 YUV2PACKEDWRAPPER (yuv2, 422, uyvy422, PIX_FMT_UYVY422)
static av_always_inline void yuv2rgb48_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 PixelFormat target)
static av_always_inline void yuv2rgb48_2_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target)
static av_always_inline void yuv2rgb48_1_c_template (SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y, enum PixelFormat target)
 YUV2PACKEDWRAPPER (yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE)
 YUV2PACKEDWRAPPER (yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE)
static void yuv2packedX_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)
static void yuv2rgbX_c_full (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)
static void yuv2packed2_c (SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 vertical bilinear scale YV12 to RGB
static void yuv2packed1_c (SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y)
 YV12 to RGB without scaling or interpolating.
static av_always_inline void fillPlane (uint8_t *plane, int stride, int width, int height, int y, uint8_t val)
static av_always_inline void rgb48ToY_c_template (uint8_t *dst, const uint8_t *src, int width, enum PixelFormat origin)
static av_always_inline void rgb48ToUV_c_template (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, enum PixelFormat origin)
static av_always_inline void rgb48ToUV_half_c_template (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, enum PixelFormat origin)
 rgb48funcs (rgb, LE, PIX_FMT_RGB48LE)
 rgb48funcs (rgb, BE, PIX_FMT_RGB48BE)
 rgb48funcs (bgr, LE, PIX_FMT_BGR48LE)
 rgb48funcs (bgr, BE, PIX_FMT_BGR48BE)
static av_always_inline void rgb16_32ToY_c_template (uint8_t *dst, const uint8_t *src, int width, enum PixelFormat origin, int shr, int shg, int shb, int shp, int maskr, int maskg, int maskb, int rsh, int gsh, int bsh, int S)
static av_always_inline void rgb16_32ToUV_c_template (uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat origin, int shr, int shg, int shb, int shp, int maskr, int maskg, int maskb, int rsh, int gsh, int bsh, int S)
static av_always_inline void rgb16_32ToUV_half_c_template (uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat origin, int shr, int shg, int shb, int shp, int maskr, int maskg, int maskb, int rsh, int gsh, int bsh, int S)
 rgb16_32_wrapper (PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7)
 rgb16_32_wrapper (PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7)
 rgb16_32_wrapper (PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7)
 rgb16_32_wrapper (PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8)
 rgb16_32_wrapper (PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7)
static void abgrToA_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void rgbaToA_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void palToY_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *pal)
static void palToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *pal)
static void monowhite2Y_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void monoblack2Y_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void yuy2ToY_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void yuy2ToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void LEToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void uyvyToY_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void uyvyToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void BEToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static av_always_inline void nvXXtoUV_c (uint8_t *dst1, uint8_t *dst2, const uint8_t *src, int width)
static void nv12ToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void nv21ToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static av_always_inline void yuv9_OR_10ToUV_c_template (uint8_t *dstU, uint8_t *dstV, const uint8_t *_srcU, const uint8_t *_srcV, int width, enum PixelFormat origin, int depth)
static av_always_inline void yuv9_or_10ToY_c_template (uint8_t *dstY, const uint8_t *_srcY, int width, enum PixelFormat origin, int depth)
 YUV_NBPS (9, LE, PIX_FMT_YUV420P9LE)
 YUV_NBPS (9, BE, PIX_FMT_YUV420P9BE)
 YUV_NBPS (10, LE, PIX_FMT_YUV420P10LE)
 YUV_NBPS (10, BE, PIX_FMT_YUV420P10BE)
static void bgr24ToY_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void bgr24ToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void bgr24ToUV_half_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void rgb24ToY_c (uint8_t *dst, const uint8_t *src, int width, uint32_t *unused)
static void rgb24ToUV_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void rgb24ToUV_half_c (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused)
static void hScale_c (int16_t *dst, int dstW, const uint8_t *src, int srcW, int xInc, const int16_t *filter, const int16_t *filterPos, int filterSize)
static void chrRangeToJpeg_c (int16_t *dstU, int16_t *dstV, int width)
static void chrRangeFromJpeg_c (int16_t *dstU, int16_t *dstV, int width)
static void lumRangeToJpeg_c (int16_t *dst, int width)
static void lumRangeFromJpeg_c (int16_t *dst, int width)
static void hyscale_fast_c (SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc)
static av_always_inline void hyscale (SwsContext *c, uint16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc, const int16_t *hLumFilter, const int16_t *hLumFilterPos, int hLumFilterSize, uint8_t *formatConvBuffer, uint32_t *pal, int isAlpha)
static void hcscale_fast_c (SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc)
static av_always_inline void hcscale (SwsContext *c, uint16_t *dst1, uint16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc, const int16_t *hChrFilter, const int16_t *hChrFilterPos, int hChrFilterSize, uint8_t *formatConvBuffer, uint32_t *pal)
static av_always_inline void find_c_packed_planar_out_funcs (SwsContext *c, yuv2planar1_fn *yuv2yuv1, yuv2planarX_fn *yuv2yuvX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, yuv2packedX_fn *yuv2packedX)
static int swScale (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static av_cold void sws_init_swScale_c (SwsContext *c)
SwsFunc ff_getSwsFunc (SwsContext *c)
 Returns function pointer to fastest main scaler path function depending on architecture and available optimizations.

Variables

static const double rgb2yuv_table [8][9]
static const uint8_t dither_2x2_4 [2][8]
static const uint8_t dither_2x2_8 [2][8]
const uint8_t dither_4x4_16 [4][8]
const uint8_t dither_8x8_32 [8][8]
const uint8_t dither_8x8_73 [8][8]
const uint8_t dither_8x8_220 [8][8]
 break
case PIX_FMT_ABGR
 aidx = 0
case PIX_FMT_BGR24
case PIX_FMT_BGRA
 dest [aidx] = needAlpha ? A : 255
default __pad0__

Define Documentation

#define b   ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? r_b : b_r)

Definition at line 1321 of file swscale.c.

Referenced by add_bytes_c(), add_bytes_l2_c(), add_hfyu_left_prediction_bgr32_c(), av_add_q(), av_compare_mod(), av_compare_ts(), av_find_stream_info(), av_mlfg_get(), av_mul_q(), av_nearer_q(), av_rescale_q(), av_set_string3(), avg2(), avg2_no_rnd(), avg_pixels16_l2_altivec(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bgr8torgb8(), bidir_refine(), binkb_read_bundle(), blend_slice(), body(), cdata_probe(), cdg_load_palette(), cin_decode_huffman(), common_init_after_header(), compare_vlcspec(), compute_bit_allocation(), compute_lpc_coefs(), compute_mod(), convert_to_rgb32_loco(), decode_block_coeffs_internal(), decode_blocks(), decode_blocks_ind(), decode_frame(), decode_init(), decode_rgb_frame(), decode_scale_factors(), decode_spectrum_and_dequant(), decode_subframe(), decode_subframe_fixed(), decorrelate_stereo_24(), decorrelation(), deInterlaceBlendLinear_TMPL(), deInterlaceInterpolateLinear_TMPL(), deInterlaceMedian_TMPL(), diff_bytes_c(), dv_encode_video_segment(), dv_guess_qnos(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), encode_dvb_subtitles(), encode_frame(), encode_picture(), encode_residual_fixed(), encode_superframe(), ff_add_png_paeth_prediction(), ff_celp_lp_synthesis_filterf(), ff_eac3_decode_transform_coeffs_aht_ch(), ff_eval_refl(), ff_h264_chroma_dc_dequant_idct(), ff_index_search_timestamp(), ff_interp(), ff_ivi_free_buffers(), ff_ivi_init_planes(), ff_ivi_init_tiles(), ff_match_2uint16(), ff_mjpeg_find_marker(), ff_mov_read_stsd_entries(), ff_mpeg4_pred_dc(), ff_msmpeg4_coded_block_pred(), ff_rms(), ff_set_systematic_pal2(), ff_snow_horizontal_compose97i_sse2(), ff_sqrt(), ff_wma_init(), flac_decode_frame(), flic_decode_frame_8BPP(), gen_image(), generate_joint_tables(), get_block_sizes(), glyph_cmp(), guess_palette(), h_block_filter(), horizX1Filter(), hpel_motion_search(), huff_cmp(), idcin_read_packet(), initMMX2HScaler(), int_sqrt(), ipmovie_probe(), load_with_perm_vec(), loco_predict(), log16(), main(), make_cdt15_entry(), make_cdt16_entry(), make_cdt24_entry(), map_idx_10_to_20(), matroska_read_header(), mc_block(), memshl(), mid_pred(), mix_core(), mp_decode_layer2(), mp_yuv_to_rgb(), mpegts_write_section(), msmpeg4_pred_dc(), mul_poly(), multiswap_dec(), multiswap_enc(), mxf_read_sync(), no_rnd_avg32(), no_rnd_avg64(), nsv_parse_NSVf_header(), output_audio_block(), paint_mouse_pointer(), parse_palette_segment(), png_filter_row(), png_get_interlaced_row(), png_put_interlaced_row(), pnm_decode_frame(), pow_m1_4(), pred16x16_plane_compat(), pred16x16_vertical(), pred8x8_plane(), pred8x8_vertical(), pred8x8l_vertical(), pred_spatial_direct_motion(), probe(), process_ipmovie_chunk(), put_no_rnd_pixels16_l2(), put_no_rnd_pixels8_l2(), put_pixel(), put_pixels16_l2_altivec(), put_vp8_epel_h_altivec_core(), qpel_motion_search(), qsort_comparison_function_int16(), qtrle_decode_24bpp(), qtrle_decode_32bpp(), quantize_mantissas_blk_ch(), read_frame_data(), read_line(), read_var_block_data(), reconstruct_stereo_16(), render_charset(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_c_template(), rgb16_32ToY_c_template(), rgb24_to_yuv420p(), rgb24to15_c(), rgb24to15_TMPL(), rgb24to16_c(), rgb24to16_TMPL(), rgb24tobgr15_c(), rgb24tobgr15_TMPL(), rgb24tobgr16_c(), rgb24tobgr16_TMPL(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb24toyv12_c(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48ToY_c_template(), rnd_avg32(), rnd_avg64(), sad_hpel_motion_search(), search_for_quantizers_faac(), search_for_quantizers_twoloop(), seq_decode_op1(), sha1_transform(), sha256_transform(), smk_get_code(), stereo_processing(), sub_left_prediction_bgr32(), sub_png_paeth_prediction(), subtitle_thread(), sum_bits(), sws_scale(), synth_filter_float(), tgq_calculate_qtable(), try_8x8basis_c(), v_block_filter(), vb_decode_framedata(), vc1_coded_block_pred(), vc1_h_overlap_c(), vc1_h_s_overlap_c(), vc1_i_pred_dc(), vc1_pred_dc(), vc1_v_overlap_c(), vc1_v_s_overlap_c(), vertX1Filter_TMPL(), video_audio_display(), vmd_decode(), vmdvideo_decode_init(), vp56_add_predictors_dc(), vp56_decode_4mv(), vp56_decode_mb(), vp56_decode_mv(), vp56_mc(), vp5_parse_coeff(), vp6_build_huff_tree(), vp6_huff_cmp(), vp6_parse_coeff(), vp6_parse_coeff_huffman(), vqa_decode_chunk(), wma_lsp_to_curve_init(), write_float_3d_array(), x8_get_prediction(), xan_decode_frame(), yuv2rgb48_1_c_template(), yuv2rgb48_2_c_template(), yuv2rgb48_X_c_template(), yuv_a_to_rgba(), and zero_remaining().

#define b_r   ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? b : r)
#define BU   ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define BV   (-(int)(0.081*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define BY   ( (int)(0.114*219/255*(1<<RGB2YUV_SHIFT)+0.5))

Definition at line 73 of file swscale.c.

Referenced by bgr24ToY_c(), rgb16_32ToY_c_template(), rgb24ToY_c(), and rgb48ToY_c_template().

#define DEBUG_BUFFERS (   ...)    if (DEBUG_SWSCALE_BUFFERS) av_log(c, AV_LOG_DEBUG, __VA_ARGS__)

Definition at line 2023 of file swscale.c.

Referenced by swScale().

#define DEBUG_SWSCALE_BUFFERS   0

Definition at line 2022 of file swscale.c.

#define DITHER1XBPP

Definition at line 70 of file swscale.c.

Referenced by sws_init_context().

#define GU   (-(int)(0.331*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define GV   (-(int)(0.419*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define GY   ( (int)(0.587*219/255*(1<<RGB2YUV_SHIFT)+0.5))

Definition at line 76 of file swscale.c.

Referenced by bgr24ToY_c(), rgb16_32ToY_c_template(), rgb24ToY_c(), and rgb48ToY_c_template().

#define input_pixel (   pos)    (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
#define input_pixel (   pos)    (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))

Definition at line 1672 of file swscale.c.

#define input_pixel (   i)
Value:
((origin == PIX_FMT_RGBA || origin == PIX_FMT_BGRA || \
                         origin == PIX_FMT_ARGB || origin == PIX_FMT_ABGR) ? AV_RN32A(&src[(i)*4]) : \
                        (isBE(origin) ? AV_RB16(&src[(i)*2]) : AV_RL16(&src[(i)*2])))

Definition at line 1672 of file swscale.c.

#define output_pixel (   pos,
  acc 
)
Value:
if (target == PIX_FMT_MONOBLACK) { \
        pos = acc; \
    } else { \
        pos = ~acc; \
    }

Definition at line 533 of file swscale.c.

#define output_pixel (   pos,
  val 
)
Value:
if (big_endian) { \
        if (output_bits == 16) { \
            AV_WB16(pos, av_clip_uint16(val >> shift)); \
        } else { \
            AV_WB16(pos, av_clip_uintp2(val >> shift, output_bits)); \
        } \
    } else { \
        if (output_bits == 16) { \
            AV_WL16(pos, av_clip_uint16(val >> shift)); \
        } else { \
            AV_WL16(pos, av_clip_uintp2(val >> shift, output_bits)); \
        } \
    }

Definition at line 533 of file swscale.c.

Referenced by yuv2gray16_1_c_template(), yuv2gray16_2_c_template(), yuv2gray16_X_c_template(), yuv2mono_1_c_template(), yuv2mono_2_c_template(), yuv2mono_X_c_template(), and yuv2yuvX16_c_template().

#define output_pixel (   pos,
  val 
)
Value:
if (target == PIX_FMT_GRAY16BE) { \
            AV_WB16(pos, val); \
        } else { \
            AV_WL16(pos, val); \
        }

Definition at line 533 of file swscale.c.

#define output_pixels (   pos,
  Y1,
  U,
  Y2,
 
)
Value:
if (target == PIX_FMT_YUYV422) { \
        dest[pos + 0] = Y1; \
        dest[pos + 1] = U;  \
        dest[pos + 2] = Y2; \
        dest[pos + 3] = V;  \
    } else { \
        dest[pos + 0] = U;  \
        dest[pos + 1] = Y1; \
        dest[pos + 2] = V;  \
        dest[pos + 3] = Y2; \
    }

Definition at line 633 of file swscale.c.

Referenced by yuv2422_1_c_template(), yuv2422_2_c_template(), and yuv2422_X_c_template().

#define r   ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? b_r : r_b)
#define r_b   ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? r : b)
#define rgb16_32_wrapper (   fmt,
  name,
  shr,
  shg,
  shb,
  shp,
  maskr,
  maskg,
  maskb,
  rsh,
  gsh,
  bsh,
  S 
)
Value:
static void name ## ToY_c(uint8_t *dst, const uint8_t *src, \
                          int width, uint32_t *unused) \
{ \
    rgb16_32ToY_c_template(dst, src, width, fmt, shr, shg, shb, shp, \
                           maskr, maskg, maskb, rsh, gsh, bsh, S); \
} \
 \
static void name ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
                           const uint8_t *src, const uint8_t *dummy, \
                           int width, uint32_t *unused) \
{ \
    rgb16_32ToUV_c_template(dstU, dstV, src, width, fmt, shr, shg, shb, shp, \
                            maskr, maskg, maskb, rsh, gsh, bsh, S); \
} \
 \
static void name ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \
                                const uint8_t *src, const uint8_t *dummy, \
                                int width, uint32_t *unused) \
{ \
    rgb16_32ToUV_half_c_template(dstU, dstV, src, width, fmt, shr, shg, shb, shp, \
                                 maskr, maskg, maskb, rsh, gsh, bsh, S); \
}

Definition at line 1486 of file swscale.c.

#define RGB2YUV_SHIFT   15
#define rgb48funcs (   pattern,
  BE_LE,
  origin 
)
Value:
static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *dst, const uint8_t *src, \
                                    int width, uint32_t *unused) \
{ \
    rgb48ToY_c_template(dst, src, width, origin); \
} \
 \
static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
                                    const uint8_t *src1, const uint8_t *src2, \
                                    int width, uint32_t *unused) \
{ \
    rgb48ToUV_c_template(dstU, dstV, src1, src2, width, origin); \
} \
 \
static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \
                                    const uint8_t *src1, const uint8_t *src2, \
                                    int width, uint32_t *unused) \
{ \
    rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin); \
}

Definition at line 1375 of file swscale.c.

#define RU   (-(int)(0.169*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define RV   ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5))
#define RY   ( (int)(0.299*219/255*(1<<RGB2YUV_SHIFT)+0.5))

Definition at line 79 of file swscale.c.

Referenced by bgr24ToY_c(), rgb16_32ToY_c_template(), rgb24ToY_c(), and rgb48ToY_c_template().

#define YSCALE_YUV_2_ANYRGB_C (   func)

Definition at line 1026 of file swscale.c.

Referenced by yuv2packed1_c(), yuv2packed2_c(), and yuv2packedX_c().

#define YSCALE_YUV_2_RGB1_C (   type,
  alpha 
)
Value:
for (i=0; i<(dstW>>1); i++) {\
        const int i2= 2*i;\
        int Y1= buf0[i2  ]>>7;\
        int Y2= buf0[i2+1]>>7;\
        int U= (ubuf1[i])>>7;\
        int V= (vbuf1[i])>>7;\
        type av_unused *r, *b, *g;\
        int av_unused A1, A2;\
        if (alpha) {\
            A1= abuf0[i2  ]>>7;\
            A2= abuf0[i2+1]>>7;\
        }\
    r = (type *)c->table_rV[V];\
    g = (type *)(c->table_gU[U] + c->table_gV[V]);\
    b = (type *)c->table_bU[U];

Definition at line 992 of file swscale.c.

Referenced by yuv2packed1_c().

#define YSCALE_YUV_2_RGB1B_C (   type,
  alpha 
)
Value:
for (i=0; i<(dstW>>1); i++) {\
        const int i2= 2*i;\
        int Y1= buf0[i2  ]>>7;\
        int Y2= buf0[i2+1]>>7;\
        int U= (ubuf0[i] + ubuf1[i])>>8;\
        int V= (vbuf0[i] + vbuf1[i])>>8;\
        type av_unused *r, *b, *g;\
        int av_unused A1, A2;\
        if (alpha) {\
            A1= abuf0[i2  ]>>7;\
            A2= abuf0[i2+1]>>7;\
        }\
    r = (type *)c->table_rV[V];\
    g = (type *)(c->table_gU[U] + c->table_gV[V]);\
    b = (type *)c->table_bU[U];

Definition at line 1009 of file swscale.c.

Referenced by yuv2packed1_c().

#define YSCALE_YUV_2_RGB2_C (   type,
  alpha 
)
Value:
for (i=0; i<(dstW>>1); i++) { \
        const int i2= 2*i;       \
        int Y1= (buf0[i2  ]*yalpha1+buf1[i2  ]*yalpha)>>19;           \
        int Y2= (buf0[i2+1]*yalpha1+buf1[i2+1]*yalpha)>>19;           \
        int U= (ubuf0[i]*uvalpha1+ubuf1[i]*uvalpha)>>19;              \
        int V= (vbuf0[i]*uvalpha1+vbuf1[i]*uvalpha)>>19;              \
        type av_unused *r, *b, *g;                                    \
        int av_unused A1, A2;                                         \
        if (alpha) {\
            A1= (abuf0[i2  ]*yalpha1+abuf1[i2  ]*yalpha)>>19;         \
            A2= (abuf0[i2+1]*yalpha1+abuf1[i2+1]*yalpha)>>19;         \
        }\
    r = (type *)c->table_rV[V];\
    g = (type *)(c->table_gU[U] + c->table_gV[V]);\
    b = (type *)c->table_bU[U];

Definition at line 975 of file swscale.c.

Referenced by yuv2packed2_c().

#define YSCALE_YUV_2_RGBX_C (   type,
  alpha 
)

Definition at line 888 of file swscale.c.

Referenced by yuv2packedX_c().

#define YSCALE_YUV_2_RGBX_FULL_C (   rnd,
  alpha 
)

Definition at line 936 of file swscale.c.

Referenced by yuv2rgbX_c_full().

#define yuv2NBPS (   bits,
  BE_LE,
  is_be 
)
Value:
static void yuv2yuvX ## bits ## BE_LE ## _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, uint8_t *_uDest, uint8_t *_vDest, \
                              uint8_t *_aDest, int dstW, int chrDstW) \
{ \
    uint16_t *dest  = (uint16_t *) _dest,  *uDest = (uint16_t *) _uDest, \
             *vDest = (uint16_t *) _vDest, *aDest = (uint16_t *) _aDest; \
    yuv2yuvX16_c_template(lumFilter, lumSrc, lumFilterSize, \
                          chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
                          alpSrc, \
                          dest, uDest, vDest, aDest, \
                          dstW, chrDstW, is_be, bits); \
}

Definition at line 264 of file swscale.c.

#define YUV2PACKEDWRAPPER (   name,
  base,
  ext,
  fmt 
)

Definition at line 493 of file swscale.c.

#define YUV_NBPS (   depth,
  BE_LE,
  origin 
)
Value:
static void BE_LE ## depth ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
                                     const uint8_t *srcU, const uint8_t *srcV, \
                                     int width, uint32_t *unused) \
{ \
    yuv9_OR_10ToUV_c_template(dstU, dstV, srcU, srcV, width, origin, depth); \
} \
static void BE_LE ## depth ## ToY_c(uint8_t *dstY, const uint8_t *srcY, \
                                    int width, uint32_t *unused) \
{ \
    yuv9_or_10ToY_c_template(dstY, srcY, width, origin, depth); \
}

Definition at line 1703 of file swscale.c.


Function Documentation

static void abgrToA_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1524 of file swscale.c.

Referenced by sws_init_swScale_c().

static void BEToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1638 of file swscale.c.

Referenced by sws_init_swScale_c().

static void bgr24ToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1734 of file swscale.c.

Referenced by sws_init_swScale_c().

static void bgr24ToUV_half_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1749 of file swscale.c.

Referenced by sws_init_swScale_c().

static void bgr24ToY_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1721 of file swscale.c.

Referenced by sws_init_swScale_c().

static void chrRangeFromJpeg_c ( int16_t *  dstU,
int16_t *  dstV,
int  width 
) [static]

Definition at line 1838 of file swscale.c.

Referenced by sws_init_swScale_c().

static void chrRangeToJpeg_c ( int16_t *  dstU,
int16_t *  dstV,
int  width 
) [static]

Definition at line 1830 of file swscale.c.

Referenced by sws_init_swScale_c().

SwsFunc ff_getSwsFunc ( SwsContext c)

Returns function pointer to fastest main scaler path function depending on architecture and available optimizations.

Definition at line 2446 of file swscale.c.

Referenced by sws_init_context().

static av_always_inline void fillPlane ( uint8_t *  plane,
int  stride,
int  width,
int  height,
int  y,
uint8_t  val 
) [static]

Definition at line 1306 of file swscale.c.

Referenced by swScale().

static av_always_inline void find_c_packed_planar_out_funcs ( SwsContext c,
yuv2planar1_fn yuv2yuv1,
yuv2planarX_fn yuv2yuvX,
yuv2packed1_fn yuv2packed1,
yuv2packed2_fn yuv2packed2,
yuv2packedX_fn yuv2packedX 
) [static]

Definition at line 1938 of file swscale.c.

Referenced by sws_init_swScale_c(), and swScale().

static av_always_inline void hcscale ( SwsContext c,
uint16_t *  dst1,
uint16_t *  dst2,
int  dstWidth,
const uint8_t *  src1,
const uint8_t *  src2,
int  srcW,
int  xInc,
const int16_t *  hChrFilter,
const int16_t *  hChrFilterPos,
int  hChrFilterSize,
uint8_t *  formatConvBuffer,
uint32_t *  pal 
) [static]

Definition at line 1913 of file swscale.c.

Referenced by swScale().

static void hcscale_fast_c ( SwsContext c,
int16_t *  dst1,
int16_t *  dst2,
int  dstWidth,
const uint8_t *  src1,
const uint8_t *  src2,
int  srcW,
int  xInc 
) [static]

Definition at line 1898 of file swscale.c.

Referenced by sws_init_swScale_c().

static void hScale_c ( int16_t *  dst,
int  dstW,
const uint8_t *  src,
int  srcW,
int  xInc,
const int16_t *  filter,
const int16_t *  filterPos,
int  filterSize 
) [static]

Definition at line 1809 of file swscale.c.

Referenced by sws_init_swScale_c().

static av_always_inline void hyscale ( SwsContext c,
uint16_t *  dst,
int  dstWidth,
const uint8_t *  src,
int  srcW,
int  xInc,
const int16_t *  hLumFilter,
const int16_t *  hLumFilterPos,
int  hLumFilterSize,
uint8_t *  formatConvBuffer,
uint32_t *  pal,
int  isAlpha 
) [static]

Definition at line 1873 of file swscale.c.

Referenced by swScale().

static void hyscale_fast_c ( SwsContext c,
int16_t *  dst,
int  dstWidth,
const uint8_t *  src,
int  srcW,
int  xInc 
) [static]

Definition at line 1859 of file swscale.c.

Referenced by sws_init_swScale_c().

static void LEToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1607 of file swscale.c.

Referenced by sws_init_swScale_c().

static void lumRangeFromJpeg_c ( int16_t *  dst,
int  width 
) [static]

Definition at line 1852 of file swscale.c.

Referenced by sws_init_swScale_c().

static void lumRangeToJpeg_c ( int16_t *  dst,
int  width 
) [static]

Definition at line 1846 of file swscale.c.

Referenced by sws_init_swScale_c().

static void monoblack2Y_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1575 of file swscale.c.

Referenced by sws_init_swScale_c().

static void monowhite2Y_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1564 of file swscale.c.

Referenced by sws_init_swScale_c().

static void nv12ToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1658 of file swscale.c.

Referenced by sws_init_swScale_c().

static void nv21ToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1665 of file swscale.c.

Referenced by sws_init_swScale_c().

static av_always_inline void nvXXtoUV_c ( uint8_t *  dst1,
uint8_t *  dst2,
const uint8_t *  src,
int  width 
) [static]

Definition at line 1648 of file swscale.c.

Referenced by nv12ToUV_c(), and nv21ToUV_c().

static void palToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  pal 
) [static]

Definition at line 1550 of file swscale.c.

Referenced by sws_init_swScale_c().

static void palToY_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  pal 
) [static]

Definition at line 1540 of file swscale.c.

Referenced by sws_init_swScale_c().

rgb16_32_wrapper ( PIX_FMT_BGR32  ,
bgr32  ,
16  ,
,
,
,
0xFF0000  ,
0xFF00  ,
0x00FF  ,
,
,
,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_BGR32_1  ,
bgr321  ,
16  ,
,
,
,
0xFF0000  ,
0xFF00  ,
0x00FF  ,
,
,
,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_RGB32_1  ,
rgb321  ,
,
,
16  ,
,
0x00FF  ,
0xFF00  ,
0xFF0000  ,
,
,
,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_BGR565LE  ,
bgr16le  ,
,
,
,
,
0x001F  ,
0x07E0  ,
0xF800  ,
11  ,
,
,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_BGR555LE  ,
bgr15le  ,
,
,
,
,
0x001F  ,
0x03E0  ,
0x7C00  ,
10  ,
,
,
RGB2YUV_SHIFT+  7 
)
rgb16_32_wrapper ( PIX_FMT_RGB565LE  ,
rgb16le  ,
,
,
,
,
0xF800  ,
0x07E0  ,
0x001F  ,
,
,
11  ,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_RGB555LE  ,
rgb15le  ,
,
,
,
,
0x7C00  ,
0x03E0  ,
0x001F  ,
,
,
10  ,
RGB2YUV_SHIFT+  7 
)
rgb16_32_wrapper ( PIX_FMT_BGR565BE  ,
bgr16be  ,
,
,
,
,
0x001F  ,
0x07E0  ,
0xF800  ,
11  ,
,
,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_BGR555BE  ,
bgr15be  ,
,
,
,
,
0x001F  ,
0x03E0  ,
0x7C00  ,
10  ,
,
,
RGB2YUV_SHIFT+  7 
)
rgb16_32_wrapper ( PIX_FMT_RGB565BE  ,
rgb16be  ,
,
,
,
,
0xF800  ,
0x07E0  ,
0x001F  ,
,
,
11  ,
RGB2YUV_SHIFT+  8 
)
rgb16_32_wrapper ( PIX_FMT_RGB555BE  ,
rgb15be  ,
,
,
,
,
0x7C00  ,
0x03E0  ,
0x001F  ,
,
,
10  ,
RGB2YUV_SHIFT+  7 
)
rgb16_32_wrapper ( PIX_FMT_RGB32  ,
rgb32  ,
,
,
16  ,
,
0x00FF  ,
0xFF00  ,
0xFF0000  ,
,
,
,
RGB2YUV_SHIFT+  8 
)
static av_always_inline void rgb16_32ToUV_c_template ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src,
int  width,
enum PixelFormat  origin,
int  shr,
int  shg,
int  shb,
int  shp,
int  maskr,
int  maskg,
int  maskb,
int  rsh,
int  gsh,
int  bsh,
int  S 
) [static]

Definition at line 1427 of file swscale.c.

static av_always_inline void rgb16_32ToUV_half_c_template ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src,
int  width,
enum PixelFormat  origin,
int  shr,
int  shg,
int  shb,
int  shp,
int  maskr,
int  maskg,
int  maskb,
int  rsh,
int  gsh,
int  bsh,
int  S 
) [static]

Definition at line 1451 of file swscale.c.

static av_always_inline void rgb16_32ToY_c_template ( uint8_t *  dst,
const uint8_t *  src,
int  width,
enum PixelFormat  origin,
int  shr,
int  shg,
int  shb,
int  shp,
int  maskr,
int  maskg,
int  maskb,
int  rsh,
int  gsh,
int  bsh,
int  S 
) [static]

Definition at line 1406 of file swscale.c.

static void rgb24ToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1777 of file swscale.c.

Referenced by sws_init_swScale_c().

static void rgb24ToUV_half_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1792 of file swscale.c.

Referenced by sws_init_swScale_c().

static void rgb24ToY_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1764 of file swscale.c.

Referenced by sws_init_swScale_c().

rgb48funcs ( rgb  ,
BE  ,
PIX_FMT_RGB48BE   
)
rgb48funcs ( bgr  ,
BE  ,
PIX_FMT_BGR48BE   
)
rgb48funcs ( bgr  ,
LE  ,
PIX_FMT_BGR48LE   
)
rgb48funcs ( rgb  ,
LE  ,
PIX_FMT_RGB48LE   
)
static av_always_inline void rgb48ToUV_c_template ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
enum PixelFormat  origin 
) [static]

Definition at line 1338 of file swscale.c.

static av_always_inline void rgb48ToUV_half_c_template ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
enum PixelFormat  origin 
) [static]

Definition at line 1355 of file swscale.c.

static av_always_inline void rgb48ToY_c_template ( uint8_t *  dst,
const uint8_t *  src,
int  width,
enum PixelFormat  origin 
) [static]

Definition at line 1324 of file swscale.c.

static void rgbaToA_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1532 of file swscale.c.

Referenced by sws_init_swScale_c().

static av_cold void sws_init_swScale_c ( SwsContext c) [static]

Definition at line 2284 of file swscale.c.

Referenced by ff_getSwsFunc().

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

Definition at line 2025 of file swscale.c.

Referenced by ff_bfin_get_unscaled_swscale(), and ff_getSwsFunc().

static void uyvyToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1627 of file swscale.c.

Referenced by sws_init_swScale_c().

static void uyvyToY_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1619 of file swscale.c.

Referenced by sws_init_swScale_c().

static av_always_inline void yuv2422_1_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
enum PixelFormat  dstFormat,
int  flags,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 709 of file swscale.c.

static av_always_inline void yuv2422_2_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  buf1,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
const uint16_t *  abuf1,
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 686 of file swscale.c.

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 PixelFormat  target 
) [static]

Definition at line 647 of file swscale.c.

static av_always_inline void yuv2gray16_1_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
enum PixelFormat  dstFormat,
int  flags,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 472 of file swscale.c.

static av_always_inline void yuv2gray16_2_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  buf1,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
const uint16_t *  abuf1,
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 450 of file swscale.c.

static av_always_inline void yuv2gray16_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 PixelFormat  target 
) [static]

Definition at line 419 of file swscale.c.

static av_always_inline void yuv2mono_1_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
enum PixelFormat  dstFormat,
int  flags,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 604 of file swscale.c.

static av_always_inline void yuv2mono_2_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  buf1,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
const uint16_t *  abuf1,
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 577 of file swscale.c.

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 PixelFormat  target 
) [static]

Definition at line 541 of file swscale.c.

yuv2NBPS ( ,
BE  ,
 
)
yuv2NBPS ( 10  ,
BE  ,
 
)
yuv2NBPS ( 10  ,
LE  ,
 
)
yuv2NBPS ( 16  ,
BE  ,
 
)
yuv2NBPS ( ,
LE  ,
 
)
yuv2NBPS ( 16  ,
LE  ,
 
)
static void yuv2nv12X_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,
uint8_t *  uDest,
uint8_t *  vDest,
uint8_t *  aDest,
int  dstW,
int  chrDstW 
) [static]

Definition at line 359 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

static void yuv2packed1_c ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
enum PixelFormat  dstFormat,
int  flags,
int  y 
) [static]

YV12 to RGB without scaling or interpolating.

Definition at line 1290 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

static void yuv2packed2_c ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  buf1,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
const uint16_t *  abuf1,
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y 
) [static]

vertical bilinear scale YV12 to RGB

Definition at line 1273 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

YUV2PACKEDWRAPPER ( yuv2  ,
422  ,
uyvy422  ,
PIX_FMT_UYVY422   
)
YUV2PACKEDWRAPPER ( yuv2mono  ,
white  ,
PIX_FMT_MONOWHITE   
)
YUV2PACKEDWRAPPER ( yuv2gray16  ,
BE  ,
PIX_FMT_GRAY16BE   
)
YUV2PACKEDWRAPPER ( yuv2gray16  ,
LE  ,
PIX_FMT_GRAY16LE   
)
YUV2PACKEDWRAPPER ( yuv2  ,
422  ,
yuyv422  ,
PIX_FMT_YUYV422   
)
YUV2PACKEDWRAPPER ( yuv2mono  ,
black  ,
PIX_FMT_MONOBLACK   
)
YUV2PACKEDWRAPPER ( yuv2  ,
rgb48  ,
rgb48be  ,
PIX_FMT_RGB48BE   
)
YUV2PACKEDWRAPPER ( yuv2  ,
rgb48  ,
bgr48be  ,
PIX_FMT_BGR48BE   
)
static void yuv2packedX_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 
) [static]

Definition at line 1174 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

static av_always_inline void yuv2rgb48_1_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
enum PixelFormat  dstFormat,
int  flags,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 832 of file swscale.c.

static av_always_inline void yuv2rgb48_2_c_template ( SwsContext c,
const uint16_t *  buf0,
const uint16_t *  buf1,
const uint16_t *  ubuf0,
const uint16_t *  ubuf1,
const uint16_t *  vbuf0,
const uint16_t *  vbuf1,
const uint16_t *  abuf0,
const uint16_t *  abuf1,
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y,
enum PixelFormat  target 
) [static]

Definition at line 800 of file swscale.c.

static av_always_inline void yuv2rgb48_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 PixelFormat  target 
) [static]

Definition at line 748 of file swscale.c.

static void yuv2rgbX_c_full ( 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 
) [static]

Definition at line 1184 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

static void yuv2yuv1_c ( SwsContext c,
const int16_t *  lumSrc,
const int16_t *  chrUSrc,
const int16_t *  chrVSrc,
const int16_t *  alpSrc,
uint8_t *  dest,
uint8_t *  uDest,
uint8_t *  vDest,
uint8_t *  aDest,
int  dstW,
int  chrDstW 
) [static]

Definition at line 332 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

static av_always_inline void yuv2yuvX16_c_template ( 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,
uint16_t *  dest,
uint16_t *  uDest,
uint16_t *  vDest,
uint16_t *  aDest,
int  dstW,
int  chrDstW,
int  big_endian,
int  output_bits 
) [static]

Definition at line 198 of file swscale.c.

static void yuv2yuvX_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,
uint8_t *  uDest,
uint8_t *  vDest,
uint8_t *  aDest,
int  dstW,
int  chrDstW 
) [static]

Definition at line 288 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

static av_always_inline void yuv9_OR_10ToUV_c_template ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  _srcU,
const uint8_t *  _srcV,
int  width,
enum PixelFormat  origin,
int  depth 
) [static]

Definition at line 1676 of file swscale.c.

static av_always_inline void yuv9_or_10ToY_c_template ( uint8_t *  dstY,
const uint8_t *  _srcY,
int  width,
enum PixelFormat  origin,
int  depth 
) [static]

Definition at line 1691 of file swscale.c.

YUV_NBPS ( 10  ,
BE  ,
PIX_FMT_YUV420P10BE   
)
YUV_NBPS ( ,
LE  ,
PIX_FMT_YUV420P9LE   
)
YUV_NBPS ( 10  ,
LE  ,
PIX_FMT_YUV420P10LE   
)
YUV_NBPS ( ,
BE  ,
PIX_FMT_YUV420P9BE   
)
static void yuy2ToUV_c ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src1,
const uint8_t *  src2,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1596 of file swscale.c.

Referenced by sws_init_swScale_c().

static void yuy2ToY_c ( uint8_t *  dst,
const uint8_t *  src,
int  width,
uint32_t *  unused 
) [static]

Definition at line 1588 of file swscale.c.

Referenced by sws_init_swScale_c().


Variable Documentation

default __pad0__

Definition at line 1264 of file swscale.c.

aidx = 0

Definition at line 1232 of file swscale.c.

Referenced by aw_pulse_set2(), and yuv2rgbX_c_full().

Definition at line 1229 of file swscale.c.

dest = needAlpha ? A : 255
const uint8_t dither_2x2_4[2][8] [static]
Initial value:
{
{  1,   3,   1,   3,   1,   3,   1,   3, },
{  2,   0,   2,   0,   2,   0,   2,   0, },
}

Definition at line 109 of file swscale.c.

const uint8_t dither_2x2_8[2][8] [static]
Initial value:
{
{  6,   2,   6,   2,   6,   2,   6,   2, },
{  0,   4,   0,   4,   0,   4,   0,   4, },
}

Definition at line 114 of file swscale.c.

const uint8_t dither_4x4_16[4][8]
Initial value:
{
{  8,   4,  11,   7,   8,   4,  11,   7, },
{  2,  14,   1,  13,   2,  14,   1,  13, },
{ 10,   6,   9,   5,  10,   6,   9,   5, },
{  0,  12,   3,  15,   0,  12,   3,  15, },
}

Definition at line 119 of file swscale.c.

const uint8_t dither_8x8_220[8][8]
Initial value:
{
{117,  62, 158, 103, 113,  58, 155, 100, },
{ 34, 199,  21, 186,  31, 196,  17, 182, },
{144,  89, 131,  76, 141,  86, 127,  72, },
{  0, 165,  41, 206,  10, 175,  52, 217, },
{110,  55, 151,  96, 120,  65, 162, 107, },
{ 28, 193,  14, 179,  38, 203,  24, 189, },
{138,  83, 124,  69, 148,  93, 134,  79, },
{  7, 172,  48, 213,   3, 168,  45, 210, },
}

Definition at line 149 of file swscale.c.

Referenced by yuv2mono_1_c_template(), yuv2mono_2_c_template(), and yuv2mono_X_c_template().

const uint8_t dither_8x8_32[8][8]
Initial value:
{
{ 17,   9,  23,  15,  16,   8,  22,  14, },
{  5,  29,   3,  27,   4,  28,   2,  26, },
{ 21,  13,  19,  11,  20,  12,  18,  10, },
{  0,  24,   6,  30,   1,  25,   7,  31, },
{ 16,   8,  22,  14,  17,   9,  23,  15, },
{  4,  28,   2,  26,   5,  29,   3,  27, },
{ 20,  12,  18,  10,  21,  13,  19,  11, },
{  1,  25,   7,  31,   0,  24,   6,  30, },
}

Definition at line 126 of file swscale.c.

const uint8_t dither_8x8_73[8][8]
Initial value:
{
{  0,  55,  14,  68,   3,  58,  17,  72, },
{ 37,  18,  50,  32,  40,  22,  54,  35, },
{  9,  64,   5,  59,  13,  67,   8,  63, },
{ 46,  27,  41,  23,  49,  31,  44,  26, },
{  2,  57,  16,  71,   1,  56,  15,  70, },
{ 39,  21,  52,  34,  38,  19,  51,  33, },
{ 11,  66,   7,  62,  10,  65,   6,  60, },
{ 48,  30,  43,  25,  47,  29,  42,  24, },
}

Definition at line 137 of file swscale.c.

Definition at line 1231 of file swscale.c.

Definition at line 1234 of file swscale.c.

Definition at line 1237 of file swscale.c.

const double rgb2yuv_table[8][9] [static]
Initial value:
{
    {0.7152, 0.0722, 0.2126, -0.386, 0.5, -0.115, -0.454, -0.046, 0.5}, 
    {0.7152, 0.0722, 0.2126, -0.386, 0.5, -0.115, -0.454, -0.046, 0.5}, 
    {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5}, 
    {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5}, 
    {0.59  , 0.11  , 0.30  , -0.331, 0.5, -0.169, -0.421, -0.079, 0.5}, 
    {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5}, 
    {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5}, 
    {0.701 , 0.087 , 0.212 , -0.384, 0.5, -0.116, -0.445, -0.055, 0.5}, 
}

Definition at line 83 of file swscale.c.