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.

Macros

#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, bias, signedness)
#define output_pixel(pos, val)
#define yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t)
#define output_pixel(pos, val)
#define YUV2PACKED16WRAPPER(name, base, ext, fmt)
#define output_pixel(pos, acc)
#define YUV2PACKEDWRAPPER(name, base, ext, fmt)
#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 output_pixel(pos, val)
#define r_b   ((target == PIX_FMT_RGB24) ? r : b)
#define b_r   ((target == PIX_FMT_RGB24) ? b : r)
#define YUV2RGBWRAPPERX(name, base, ext, fmt, hasAlpha)
#define YUV2RGBWRAPPER(name, base, ext, fmt, hasAlpha)
#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 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 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 yuv2gray16_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 PixelFormat target)
static av_always_inline void yuv2gray16_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 PixelFormat target)
static av_always_inline void yuv2gray16_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 PixelFormat target)
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 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat 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 PixelFormat target, int hasAlpha)
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 (uint16_t *dst, const uint16_t *src, int width, enum PixelFormat origin)
static av_always_inline void rgb48ToUV_c_template (uint16_t *dstU, uint16_t *dstV, const uint16_t *src1, const uint16_t *src2, int width, enum PixelFormat origin)
static av_always_inline void rgb48ToUV_half_c_template (uint16_t *dstU, uint16_t *dstV, const uint16_t *src1, const uint16_t *src2, int width, enum PixelFormat origin)
 rgb48funcs (rgb48funcs(rgb, rgb48funcs(LE, PIX_FMT_RGB48LE)
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
RGB2YUV_SHIFT 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
RGB2YUV_SHIFT RGB2YUV_SHIFT 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
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT 
rgb16_32_wrapper (PIX_FMT_BGR444LE, bgr12le, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT+4) rgb16_32_wrapper(PIX_FMT_RGB565LE
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT 
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_RGB444LE
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT 
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
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT 
rgb16_32_wrapper (PIX_FMT_BGR444BE, bgr12be, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT+4) rgb16_32_wrapper(PIX_FMT_RGB565BE
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT 
rgb16_32_wrapper (PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7) rgb16_32_wrapper(PIX_FMT_RGB444BE
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT static
RGB2YUV_SHIFT 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 bswap16Y_c (uint8_t *_dst, const uint8_t *_src, int width, uint32_t *unused)
static void bswap16UV_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 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 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 planar_rgb_to_y (uint8_t *dst, const uint8_t *src[4], int width)
static void planar_rgb16le_to_y (uint8_t *_dst, const uint8_t *_src[4], int width)
static void planar_rgb16be_to_y (uint8_t *_dst, const uint8_t *_src[4], int width)
static void planar_rgb_to_uv (uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width)
static void planar_rgb16le_to_uv (uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src[4], int width)
static void planar_rgb16be_to_uv (uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src[4], int width)
static void hScale16To19_c (SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
static void hScale16To15_c (SwsContext *c, int16_t *dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
static void hScale8To15_c (SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
static void hScale8To19_c (SwsContext *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_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 chrRangeToJpeg16_c (int16_t *_dstU, int16_t *_dstV, int width)
static void chrRangeFromJpeg16_c (int16_t *_dstU, int16_t *_dstV, int width)
static void lumRangeToJpeg16_c (int16_t *_dst, int width)
static void lumRangeFromJpeg16_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, int16_t *dst, int dstWidth, const uint8_t *src_in[4], int srcW, int xInc, const int16_t *hLumFilter, const int32_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, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src_in[4], int srcW, int xInc, const int16_t *hChrFilter, const int32_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 *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, 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)
 Return function pointer to fastest main scaler path function depending on architecture and available optimizations.

Variables

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]
const uint8_t dither_8x8_128 [8][8]
const uint8_t ff_sws_pb_64 [8]
 bgr321
RGB2YUV_SHIFT rgb321
RGB2YUV_SHIFT RGB2YUV_SHIFT bgr15le
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT 
rgb16le
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT 
rgb12le
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT 
bgr15be
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT 
rgb16be
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT RGB2YUV_SHIFT
RGB2YUV_SHIFT 
rgb12be

Macro Definition Documentation

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

Definition at line 1335 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_mlfg_get(), av_mul_q(), av_nearer_q(), av_rescale_q(), avformat_find_stream_info(), avg2(), avg2_no_rnd(), avg_pixels16_l2_altivec(), avio_w8(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bgr8torgb8(), bidir_refine(), binkb_read_bundle(), blend_slice(), blur_power(), body(), cdata_probe(), cdg_load_palette(), cin_decode_huffman(), compare_vlcspec(), compute_bit_allocation(), compute_lpc_coefs(), compute_mod(), convert_to_rgb32_loco(), decode_audio_s16(), decode_block_coeffs_internal(), decode_blocks(), decode_blocks_ind(), decode_frame(), decode_hybrid(), decode_init(), decode_rgb_frame(), decode_scale_factors(), decode_spectrum_and_dequant(), decode_subframe(), decode_subframe_fixed(), decorrelate_stereo(), 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_adx_calculate_coeffs(), ff_celp_lp_synthesis_filterf(), ff_eac3_decode_transform_coeffs_aht_ch(), ff_eval_refl(), ff_h264_chroma_dc_dequant_idct(), ff_h264_filter_mb(), ff_id3v2_parse(), ff_index_search_timestamp(), ff_interp(), ff_ivi_decode_frame(), 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_common_end(), ff_snow_common_init_after_header(), ff_snow_horizontal_compose97i_sse2(), ff_sqrt(), ff_wma_init(), filter_mb_edgech(), filter_mb_edgecv(), filter_mb_edgeh(), filter_mb_edgev(), filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), flac_decode_frame(), flic_decode_frame_8BPP(), for(), gen_image(), generate_joint_tables(), get_block_sizes(), glyph_cmp(), guess_palette(), h264_filter_mb_fast_internal(), h_block_filter(), horizX1Filter(), hpel_motion_search(), huff_cmp(), idcin_read_packet(), initMMX2HScaler(), int_sqrt(), ipmovie_probe(), lag_decode_frame(), load_with_perm_vec(), loco_predict(), log16(), main(), make_cdt15_entry(), make_cdt16_entry(), make_cdt24_entry(), 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(), planar_rgb16be_to_uv(), planar_rgb16be_to_y(), planar_rgb16le_to_uv(), planar_rgb16le_to_y(), planar_rgb_to_uv(), planar_rgb_to_y(), png_filter_row(), png_get_interlaced_row(), png_put_interlaced_row(), pnm_decode_frame(), pow_m1_4(), pred16x16_vertical(), pred8x16_plane(), pred8x16_vertical(), pred8x8_plane(), pred8x8_vertical(), pred8x8l_vertical(), pred_spatial_direct_motion(), probe(), process_ipmovie_chunk(), put_no_rnd_pixels16_l2(), put_pixel(), put_pixels16_l2_altivec(), put_vp8_epel_h_altivec_core(), qpel_motion_search(), qsort_comparison_function_int16(), qtrle_decode_24bpp(), quantize_mantissas_blk_ch(), read_frame_data(), read_line(), read_var_block_data(), render_charset(), restore_rgb_planes(), rgb12to15(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_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(), rgb48funcs(), 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(), set_string_binary(), sha1_transform(), sha256_transform(), smk_get_code(), 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(), yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), yuv2rgb_write(), yuv2rgb_X_c_template(), and yuv_a_to_rgba().

#define B_R   ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? B : R)
#define BY   ( (int)(0.114*219/255*(1<<RGB2YUV_SHIFT)+0.5))
#define DEBUG_BUFFERS (   ...)    if (DEBUG_SWSCALE_BUFFERS) av_log(c, AV_LOG_DEBUG, __VA_ARGS__)

Definition at line 2356 of file swscale.c.

Referenced by swScale().

#define DEBUG_SWSCALE_BUFFERS   0

Definition at line 2355 of file swscale.c.

#define DITHER1XBPP

Definition at line 37 of file swscale.c.

Referenced by sws_init_context().

#define GY   ( (int)(0.587*219/255*(1<<RGB2YUV_SHIFT)+0.5))
#define input_pixel (   pos)    (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
#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 1702 of file swscale.c.

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

Definition at line 1702 of file swscale.c.

#define output_pixel (   pos,
  val,
  bias,
  signedness 
)
Value:
if (big_endian) { \
AV_WB16(pos, bias + av_clip_ ## signedness ## 16(val >> shift)); \
} else { \
AV_WL16(pos, bias + av_clip_ ## signedness ## 16(val >> shift)); \
}

Definition at line 703 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(), 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 
)
Value:
if (big_endian) { \
AV_WB16(pos, av_clip_uintp2(val >> shift, output_bits)); \
} else { \
AV_WL16(pos, av_clip_uintp2(val >> shift, output_bits)); \
}

Definition at line 703 of file swscale.c.

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

Definition at line 703 of file swscale.c.

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

Definition at line 703 of file swscale.c.

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

Definition at line 703 of file swscale.c.

#define output_pixels (   pos,
  Y1,
  U,
  Y2,
  V 
)
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 589 of file swscale.c.

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

#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 1509 of file swscale.c.

#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) \
{ \
const uint16_t *src = (const uint16_t *) _src; \
uint16_t *dst = (uint16_t *) _dst; \
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) \
{ \
const uint16_t *src1 = (const uint16_t *) _src1, \
*src2 = (const uint16_t *) _src2; \
uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
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) \
{ \
const uint16_t *src1 = (const uint16_t *) _src1, \
*src2 = (const uint16_t *) _src2; \
uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin); \
}

Definition at line 1389 of file swscale.c.

#define RY   ( (int)(0.299*219/255*(1<<RGB2YUV_SHIFT)+0.5))
#define yuv2NBPS (   bits,
  BE_LE,
  is_be,
  template_size,
  typeX_t 
)
Value:
static void yuv2plane1_ ## bits ## BE_LE ## _c(const int16_t *src, \
uint8_t *dest, int dstW, \
const uint8_t *dither, int offset)\
{ \
yuv2plane1_ ## template_size ## _c_template((const typeX_t *) src, \
(uint16_t *) dest, dstW, is_be, bits); \
}\
static void yuv2planeX_ ## bits ## BE_LE ## _c(const int16_t *filter, int filterSize, \
const int16_t **src, uint8_t *dest, int dstW, \
const uint8_t *dither, int offset)\
{ \
yuv2planeX_## template_size ## _c_template(filter, \
filterSize, (const typeX_t **) src, \
(uint16_t *) dest, dstW, is_be, bits); \
}

Definition at line 253 of file swscale.c.

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

Definition at line 411 of file swscale.c.

#define YUV2PACKEDWRAPPER (   name,
  base,
  ext,
  fmt 
)
Value:
static void name ## ext ## _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) \
{ \
name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \
chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
alpSrc, dest, dstW, y, fmt); \
} \
\
static void name ## ext ## _2_c(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) \
{ \
name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \
dest, dstW, yalpha, uvalpha, y, fmt); \
} \
\
static void name ## ext ## _1_c(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) \
{ \
name ## base ## _1_c_template(c, buf0, ubuf, vbuf, \
abuf0, dest, dstW, uvalpha, \
y, fmt); \
}

Definition at line 554 of file swscale.c.

#define YUV2RGBWRAPPER (   name,
  base,
  ext,
  fmt,
  hasAlpha 
)
Value:
YUV2RGBWRAPPERX(name, base, ext, fmt, hasAlpha) \
static void name ## ext ## _2_c(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) \
{ \
name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \
dest, dstW, yalpha, uvalpha, y, fmt, hasAlpha); \
} \
\
static void name ## ext ## _1_c(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) \
{ \
name ## base ## _1_c_template(c, buf0, ubuf, vbuf, abuf0, dest, \
dstW, uvalpha, y, fmt, hasAlpha); \
}

Definition at line 1169 of file swscale.c.

#define YUV2RGBWRAPPERX (   name,
  base,
  ext,
  fmt,
  hasAlpha 
)
Value:
static void name ## ext ## _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) \
{ \
name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \
chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
alpSrc, dest, dstW, y, fmt, hasAlpha); \
}

Definition at line 1157 of file swscale.c.

Function Documentation

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

Definition at line 1551 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 1717 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 1732 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 1704 of file swscale.c.

Referenced by sws_init_swScale_c().

static void bswap16UV_c ( uint8_t *  _dstU,
uint8_t *  _dstV,
const uint8_t *  _src1,
const uint8_t *  _src2,
int  width,
uint32_t *  unused 
)
static

Definition at line 1644 of file swscale.c.

Referenced by sws_init_swScale_c().

static void bswap16Y_c ( uint8_t *  _dst,
const uint8_t *  _src,
int  width,
uint32_t *  unused 
)
static

Definition at line 1634 of file swscale.c.

Referenced by sws_init_swScale_c().

static void chrRangeFromJpeg16_c ( int16_t *  _dstU,
int16_t *  _dstV,
int  width 
)
static

Definition at line 1998 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 1967 of file swscale.c.

Referenced by sws_init_swScale_c().

static void chrRangeToJpeg16_c ( int16_t *  _dstU,
int16_t *  _dstV,
int  width 
)
static

Definition at line 1988 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 1959 of file swscale.c.

Referenced by sws_init_swScale_c().

SwsFunc ff_getSwsFunc ( SwsContext c)

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

Definition at line 2907 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 1320 of file swscale.c.

Referenced by swScale().

static av_always_inline void find_c_packed_planar_out_funcs ( SwsContext c,
yuv2planar1_fn yuv2plane1,
yuv2planarX_fn yuv2planeX,
yuv2interleavedX_fn yuv2nv12cX,
yuv2packed1_fn yuv2packed1,
yuv2packed2_fn yuv2packed2,
yuv2packedX_fn yuv2packedX 
)
static

Definition at line 2112 of file swscale.c.

Referenced by sws_init_swScale_c(), and swScale().

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

Definition at line 2081 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 2066 of file swscale.c.

Referenced by sws_init_swScale_c().

static void hScale16To15_c ( SwsContext c,
int16_t *  dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t *  filterPos,
int  filterSize 
)
static

Definition at line 1898 of file swscale.c.

Referenced by sws_init_swScale_c().

static void hScale16To19_c ( SwsContext c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t *  filterPos,
int  filterSize 
)
static

Definition at line 1875 of file swscale.c.

Referenced by sws_init_swScale_c().

static void hScale8To15_c ( SwsContext c,
int16_t *  dst,
int  dstW,
const uint8_t *  src,
const int16_t *  filter,
const int32_t *  filterPos,
int  filterSize 
)
static

Definition at line 1920 of file swscale.c.

Referenced by sws_init_swScale_c().

static void hScale8To19_c ( SwsContext c,
int16_t *  _dst,
int  dstW,
const uint8_t *  src,
const int16_t *  filter,
const int32_t *  filterPos,
int  filterSize 
)
static

Definition at line 1938 of file swscale.c.

Referenced by sws_init_swScale_c().

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

Definition at line 2037 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 2023 of file swscale.c.

Referenced by sws_init_swScale_c().

static void lumRangeFromJpeg16_c ( int16_t *  _dst,
int  width 
)
static

Definition at line 2015 of file swscale.c.

Referenced by sws_init_swScale_c().

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

Definition at line 1981 of file swscale.c.

Referenced by sws_init_swScale_c().

static void lumRangeToJpeg16_c ( int16_t *  _dst,
int  width 
)
static

Definition at line 2008 of file swscale.c.

Referenced by sws_init_swScale_c().

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

Definition at line 1975 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 1602 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 1591 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 1688 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 1695 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 1678 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 1577 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 1567 of file swscale.c.

Referenced by sws_init_swScale_c().

static void planar_rgb16be_to_uv ( uint8_t *  _dstU,
uint8_t *  _dstV,
const uint8_t *  _src[4],
int  width 
)
static

Definition at line 1859 of file swscale.c.

Referenced by sws_init_swScale_c().

static void planar_rgb16be_to_y ( uint8_t *  _dst,
const uint8_t *  _src[4],
int  width 
)
static

Definition at line 1816 of file swscale.c.

Referenced by sws_init_swScale_c().

static void planar_rgb16le_to_uv ( uint8_t *  _dstU,
uint8_t *  _dstV,
const uint8_t *  _src[4],
int  width 
)
static

Definition at line 1843 of file swscale.c.

Referenced by sws_init_swScale_c().

static void planar_rgb16le_to_y ( uint8_t *  _dst,
const uint8_t *  _src[4],
int  width 
)
static

Definition at line 1802 of file swscale.c.

Referenced by sws_init_swScale_c().

static void planar_rgb_to_uv ( uint8_t *  dstU,
uint8_t *  dstV,
const uint8_t *  src[4],
int  width 
)
static

Definition at line 1830 of file swscale.c.

Referenced by sws_init_swScale_c().

static void planar_rgb_to_y ( uint8_t *  dst,
const uint8_t *  src[4],
int  width 
)
static

Definition at line 1790 of file swscale.c.

Referenced by sws_init_swScale_c().

rgb16_32_wrapper ( PIX_FMT_BGR32  ,
bgr32  ,
16  ,
,
,
,
0xFF0000  ,
0xFF00  ,
0x00FF  ,
,
,
,
RGB2YUV_SHIFT 8 
)
RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_RGB32  ,
rgb32  ,
,
,
16  ,
,
0x00FF  ,
0xFF00  ,
0xFF0000  ,
,
,
,
RGB2YUV_SHIFT 8 
)
RGB2YUV_SHIFT RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_BGR565LE  ,
bgr16le  ,
,
,
,
,
0x001F  ,
0x07E0  ,
0xF800  ,
11  ,
,
,
RGB2YUV_SHIFT 8 
)
RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_BGR444LE  ,
bgr12le  ,
,
,
,
,
0x000F  ,
0x00F0  ,
0x0F00  ,
,
,
,
RGB2YUV_SHIFT 4 
)
RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_RGB555LE  ,
rgb15le  ,
,
,
,
,
0x7C00  ,
0x03E0  ,
0x001F  ,
,
,
10  ,
RGB2YUV_SHIFT 7 
)
RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_BGR565BE  ,
bgr16be  ,
,
,
,
,
0x001F  ,
0x07E0  ,
0xF800  ,
11  ,
,
,
RGB2YUV_SHIFT 8 
)
RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_BGR444BE  ,
bgr12be  ,
,
,
,
,
0x000F  ,
0x00F0  ,
0x0F00  ,
,
,
,
RGB2YUV_SHIFT 4 
)
RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT RGB2YUV_SHIFT rgb16_32_wrapper ( PIX_FMT_RGB555BE  ,
rgb15be  ,
,
,
,
,
0x7C00  ,
0x03E0  ,
0x001F  ,
,
,
10  ,
RGB2YUV_SHIFT 7 
)
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 1449 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 1473 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 1760 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 1775 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 1747 of file swscale.c.

Referenced by sws_init_swScale_c().

rgb48funcs ( rgb48funcs(  rgb,
rgb48funcs(  LE,
PIX_FMT_RGB48LE   
)

Definition at line 1418 of file swscale.c.

static av_always_inline void rgb48ToUV_c_template ( uint16_t *  dstU,
uint16_t *  dstV,
const uint16_t *  src1,
const uint16_t *  src2,
int  width,
enum PixelFormat  origin 
)
static

Definition at line 1352 of file swscale.c.

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

Definition at line 1369 of file swscale.c.

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

Definition at line 1338 of file swscale.c.

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

Definition at line 1559 of file swscale.c.

Referenced by sws_init_swScale_c().

static av_cold void sws_init_swScale_c ( SwsContext c)
static

Definition at line 2692 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 2358 of file swscale.c.

Referenced by 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 1667 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 1659 of file swscale.c.

Referenced by sws_init_swScale_c().

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

Definition at line 666 of file swscale.c.

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

Definition at line 642 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 603 of file swscale.c.

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

Definition at line 393 of file swscale.c.

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

Definition at line 373 of file swscale.c.

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

Definition at line 345 of file swscale.c.

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

Definition at line 530 of file swscale.c.

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

Definition at line 504 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 468 of file swscale.c.

yuv2NBPS ( yuv2NBPS(  9,
yuv2NBPS(  BE,
yuv2NBPS(  1,
yuv2NBPS(  10,
int16_t   
)

Definition at line 269 of file swscale.c.

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

Definition at line 301 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

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

Definition at line 220 of file swscale.c.

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

Definition at line 173 of file swscale.c.

static void yuv2plane1_8_c ( const int16_t *  src,
uint8_t *  dest,
int  dstW,
const uint8_t *  dither,
int  offset 
)
static

Definition at line 291 of file swscale.c.

Referenced by find_c_packed_planar_out_funcs().

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 
)
static

Definition at line 233 of file swscale.c.

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

Definition at line 186 of file swscale.c.

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

Definition at line 812 of file swscale.c.

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

Definition at line 770 of file swscale.c.

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

Definition at line 711 of file swscale.c.

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 PixelFormat  target,
int  hasAlpha 
)
static

Definition at line 1106 of file swscale.c.

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 PixelFormat  target,
int  hasAlpha 
)
static

Definition at line 1070 of file swscale.c.

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 PixelFormat  target,
int  hasAlpha 
)
static

Definition at line 1210 of file swscale.c.

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 PixelFormat  target,
int  hasAlpha 
)
static

Definition at line 896 of file swscale.c.

Referenced by yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), and yuv2rgb_X_c_template().

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 PixelFormat  target,
int  hasAlpha 
)
static

Definition at line 1008 of file swscale.c.

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 1623 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 1615 of file swscale.c.

Referenced by sws_init_swScale_c().

Variable Documentation

Definition at line 1539 of file swscale.c.

bgr321

Definition at line 1535 of file swscale.c.

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 65 of file swscale.c.

Referenced by yuv2rgb_write().

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 70 of file swscale.c.

Referenced by yuv2rgb_write().

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 75 of file swscale.c.

Referenced by yuv2rgb_write().

const uint8_t dither_8x8_128[8][8]
Initial value:
{
{ 36, 68, 60, 92, 34, 66, 58, 90,},
{ 100, 4,124, 28, 98, 2,122, 26,},
{ 52, 84, 44, 76, 50, 82, 42, 74,},
{ 116, 20,108, 12,114, 18,106, 10,},
{ 32, 64, 56, 88, 38, 70, 62, 94,},
{ 96, 0,120, 24,102, 6,126, 30,},
{ 48, 80, 40, 72, 54, 86, 46, 78,},
{ 112, 16,104, 8,118, 22,110, 14,},
}

Definition at line 152 of file swscale.c.

Referenced by swScale().

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 105 of file swscale.c.

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

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 82 of file swscale.c.

Referenced by yuv2rgb_write().

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 93 of file swscale.c.

Referenced by yuv2rgb_write().

const uint8_t ff_sws_pb_64[8]
Initial value:
{ 64, 64, 64, 64, 64, 64, 64, 64 }

Definition at line 162 of file swscale.c.

Referenced by swScale().

Definition at line 1541 of file swscale.c.

RGB2YUV_SHIFT rgb321

Definition at line 1537 of file swscale.c.