FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
swscale_internal.h File Reference
#include <stdatomic.h>
#include <assert.h>
#include "config.h"
#include "swscale.h"
#include "graph.h"
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/frame.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/mem_internal.h"
#include "libavutil/pixfmt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/slicethread.h"
#include "libavutil/half2float.h"

Go to the source code of this file.

Data Structures

struct  Range
 
struct  RangeList
 
struct  SwsInternal
 
struct  SwsPlane
 Slice plane. More...
 
struct  SwsSlice
 Struct which defines a slice of an image to be scaled or an output for a scaled slice. More...
 
struct  SwsFilterDescriptor
 Struct which holds all necessary data for processing a slice. More...
 

Macros

#define STR(s)   AV_TOSTRING(s)
 
#define YUVRGB_TABLE_HEADROOM   512
 
#define YUVRGB_TABLE_LUMA_HEADROOM   512
 
#define MAX_FILTER_SIZE   SWS_MAX_FILTER_SIZE
 
#define SWS_MAX_THREADS   8192 /* sanity clamp */
 
#define ALT32_CORR   1
 
#define APCK_PTR2   4
 
#define APCK_COEF   8
 
#define APCK_SIZE   16
 
#define RETCODE_USE_CASCADE   -12345
 
#define MAX_SLICE_PLANES   4
 
#define MAX_LINES_AHEAD   4
 
Horizontal and vertical filters.

To better understand the following fields, here is a pseudo-code of their usage in filtering a horizontal line:

for (i = 0; i < width; i++) {
dst[i] = 0;
for (j = 0; j < filterSize; j++)
dst[i] += src[ filterPos[i] + j ] * filter[ filterSize * i + j ];
dst[i] >>= FRAC_BITS; // The actual implementation is fixed-point.
}
#define RY_IDX   0
 
#define GY_IDX   1
 
#define BY_IDX   2
 
#define RU_IDX   3
 
#define GU_IDX   4
 
#define BU_IDX   5
 
#define RV_IDX   6
 
#define GV_IDX   7
 
#define BV_IDX   8
 
#define RGB2YUV_SHIFT   15
 
#define RED_DITHER   "0*8"
 
#define GREEN_DITHER   "1*8"
 
#define BLUE_DITHER   "2*8"
 
#define Y_COEFF   "3*8"
 
#define VR_COEFF   "4*8"
 
#define UB_COEFF   "5*8"
 
#define VG_COEFF   "6*8"
 
#define UG_COEFF   "7*8"
 
#define Y_OFFSET   "8*8"
 
#define U_OFFSET   "9*8"
 
#define V_OFFSET   "10*8"
 
#define LUM_MMX_FILTER_OFFSET   "11*8"
 
#define CHR_MMX_FILTER_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)
 
#define DSTW_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2"
 
#define ESP_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+8"
 
#define VROUNDER_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+16"
 
#define U_TEMP   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+24"
 
#define V_TEMP   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+32"
 
#define Y_TEMP   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+40"
 
#define ALP_MMX_FILTER_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+48"
 
#define UV_OFF_PX   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+48"
 
#define UV_OFF_BYTE   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+56"
 
#define DITHER16   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+64"
 
#define DITHER32   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+80"
 
#define DITHER32_INT   (11*8+4*4*MAX_FILTER_SIZE*3+80)
 
#define XYZ_GAMMA   (2.6f)
 
#define RGB_GAMMA   (2.2f)
 

Typedefs

typedef int(* SwsFunc) (SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
 
typedef void(* yuv2planar1_fn) (const int16_t *src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
 Write one line of horizontally scaled data to planar output without any additional vertical scaling (or point-scaling). More...
 
typedef void(* yuv2planarX_fn) (const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
 Write one line of horizontally scaled data to planar output with multi-point vertical scaling between input pixels. More...
 
typedef void(* yuv2interleavedX_fn) (enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest, int dstW)
 Write one line of horizontally scaled chroma to interleaved output with multi-point vertical scaling between input pixels. More...
 
typedef void(* yuv2packed1_fn) (SwsInternal *c, const int16_t *lumSrc, const int16_t *chrUSrc[2], const int16_t *chrVSrc[2], const int16_t *alpSrc, uint8_t *dest, int dstW, int uvalpha, int y)
 Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output without any additional vertical scaling (or point-scaling). More...
 
typedef void(* yuv2packed2_fn) (SwsInternal *c, const int16_t *lumSrc[2], const int16_t *chrUSrc[2], const int16_t *chrVSrc[2], const int16_t *alpSrc[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output by doing bilinear scaling between two input lines. More...
 
typedef void(* yuv2packedX_fn) (SwsInternal *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)
 Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output by doing multi-point vertical scaling between input pixels. More...
 
typedef void(* yuv2anyX_fn) (SwsInternal *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)
 Write one line of horizontally scaled Y/U/V/A to YUV/RGB output by doing multi-point vertical scaling between input pixels. More...
 
typedef void(* planar1_YV12_fn) (uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal, void *opaque)
 Unscaled conversion of luma/alpha plane to YV12 for horizontal scaler. More...
 
typedef void(* planar2_YV12_fn) (uint8_t *dst, uint8_t *dst2, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal, void *opaque)
 Unscaled conversion of chroma plane to YV12 for horizontal scaler. More...
 
typedef void(* planarX_YV12_fn) (uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opaque)
 Unscaled conversion of arbitrary planar data (e.g. More...
 
typedef void(* planarX2_YV12_fn) (uint8_t *dst, uint8_t *dst2, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opaque)
 

Functions

static SwsInternalsws_internal (const SwsContext *sws)
 
int ff_range_add (RangeList *r, unsigned int start, unsigned int len)
 
SwsFunc ff_yuv2rgb_get_func_ptr (SwsInternal *c)
 
int ff_yuv2rgb_c_init_tables (SwsInternal *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
 
void ff_yuv2rgb_init_tables_ppc (SwsInternal *c, const int inv_table[4], int brightness, int contrast, int saturation)
 
void ff_updateMMXDitherTables (SwsInternal *c, int dstY)
 
void ff_update_palette (SwsInternal *c, const uint32_t *pal)
 
av_cold void ff_sws_init_range_convert (SwsInternal *c)
 
av_cold void ff_sws_init_range_convert_aarch64 (SwsInternal *c)
 
av_cold void ff_sws_init_range_convert_loongarch (SwsInternal *c)
 
av_cold void ff_sws_init_range_convert_riscv (SwsInternal *c)
 
av_cold void ff_sws_init_range_convert_x86 (SwsInternal *c)
 
SwsFunc ff_yuv2rgb_init_x86 (SwsInternal *c)
 
SwsFunc ff_yuv2rgb_init_ppc (SwsInternal *c)
 
SwsFunc ff_yuv2rgb_init_loongarch (SwsInternal *c)
 
static av_always_inline int is16BPS (enum AVPixelFormat pix_fmt)
 
static av_always_inline int is32BPS (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isNBPS (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isBE (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isYUV (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isPlanarYUV (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isSemiPlanarYUV (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isRGB (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isGray (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isRGBinInt (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isBGRinInt (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isBayer (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isBayer16BPS (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isAnyRGB (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isFloat (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isFloat16 (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isALPHA (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isPacked (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isPlanar (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isPackedRGB (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isPlanarRGB (enum AVPixelFormat pix_fmt)
 
static av_always_inline int usePal (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isDataInHighBits (enum AVPixelFormat pix_fmt)
 
static av_always_inline int isSwappedChroma (enum AVPixelFormat pix_fmt)
 
int ff_sws_init_single_context (SwsContext *sws, SwsFilter *srcFilter, SwsFilter *dstFilter)
 
void ff_get_unscaled_swscale (SwsInternal *c)
 Set c->convert_unscaled to an unscaled converter if one exists for the specific source and destination formats, bit depths, flags, etc. More...
 
void ff_get_unscaled_swscale_ppc (SwsInternal *c)
 
void ff_get_unscaled_swscale_arm (SwsInternal *c)
 
void ff_get_unscaled_swscale_aarch64 (SwsInternal *c)
 
void ff_sws_init_scale (SwsInternal *c)
 
void ff_sws_init_input_funcs (SwsInternal *c, planar1_YV12_fn *lumToYV12, planar1_YV12_fn *alpToYV12, planar2_YV12_fn *chrToYV12, planarX_YV12_fn *readLumPlanar, planarX_YV12_fn *readAlpPlanar, planarX2_YV12_fn *readChrPlanar)
 
void ff_sws_init_output_funcs (SwsInternal *c, yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, yuv2packedX_fn *yuv2packedX, yuv2anyX_fn *yuv2anyX)
 
void ff_sws_init_swscale_ppc (SwsInternal *c)
 
void ff_sws_init_swscale_vsx (SwsInternal *c)
 
void ff_sws_init_swscale_x86 (SwsInternal *c)
 
void ff_sws_init_swscale_aarch64 (SwsInternal *c)
 
void ff_sws_init_swscale_arm (SwsInternal *c)
 
void ff_sws_init_swscale_loongarch (SwsInternal *c)
 
void ff_sws_init_swscale_riscv (SwsInternal *c)
 
void ff_hyscale_fast_c (SwsInternal *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc)
 
void ff_hcscale_fast_c (SwsInternal *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc)
 
int ff_init_hscaler_mmxext (int dstW, int xInc, uint8_t *filterCode, int16_t *filter, int32_t *filterPos, int numSplits)
 
void ff_hyscale_fast_mmxext (SwsInternal *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc)
 
void ff_hcscale_fast_mmxext (SwsInternal *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc)
 
int ff_sws_alphablendaway (SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
 
void ff_copyPlane (const uint8_t *src, int srcStride, int srcSliceY, int srcSliceH, int width, uint8_t *dst, int dstStride)
 
void ff_xyz12Torgb48 (const SwsInternal *c, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
 
void ff_rgb48Toxyz12 (const SwsInternal *c, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
 
static void fillPlane16 (uint8_t *plane, int stride, int width, int height, int y, int alpha, int bits, const int big_endian)
 
static void fillPlane32 (uint8_t *plane, int stride, int width, int height, int y, int alpha, int bits, const int big_endian, int is_float)
 
int ff_init_slice_from_src (SwsSlice *s, uint8_t *const src[4], const int stride[4], int srcW, int lumY, int lumH, int chrY, int chrH, int relative)
 
int ff_init_filters (SwsInternal *c)
 
int ff_free_filters (SwsInternal *c)
 
int ff_rotate_slice (SwsSlice *s, int lum, int chr)
 
int ff_init_gamma_convert (SwsFilterDescriptor *desc, SwsSlice *src, uint16_t *table)
 initializes gamma conversion descriptor More...
 
int ff_init_desc_fmt_convert (SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst, uint32_t *pal)
 initializes lum pixel format conversion descriptor More...
 
int ff_init_desc_hscale (SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst, uint16_t *filter, int *filter_pos, int filter_size, int xInc)
 initializes lum horizontal scaling descriptor More...
 
int ff_init_desc_cfmt_convert (SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst, uint32_t *pal)
 initializes chr pixel format conversion descriptor More...
 
int ff_init_desc_chscale (SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst, uint16_t *filter, int *filter_pos, int filter_size, int xInc)
 initializes chr horizontal scaling descriptor More...
 
int ff_init_desc_no_chr (SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst)
 
int ff_init_vscale (SwsInternal *c, SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst)
 initializes vertical scaling descriptors More...
 
void ff_init_vscale_pfn (SwsInternal *c, yuv2planar1_fn yuv2plane1, yuv2planarX_fn yuv2planeX, yuv2interleavedX_fn yuv2nv12cX, yuv2packed1_fn yuv2packed1, yuv2packed2_fn yuv2packed2, yuv2packedX_fn yuv2packedX, yuv2anyX_fn yuv2anyX, int use_mmx)
 setup vertical scaler functions More...
 
void ff_sws_slice_worker (void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads)
 
int ff_swscale (SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[], int dstSliceY, int dstSliceH)
 
int ff_shuffle_filter_coefficients (SwsInternal *c, int *filterPos, int filterSize, int16_t *filter, int dstW)
 

Variables

const uint64_t ff_dither4 [2]
 
const uint64_t ff_dither8 [2]
 
const uint8_t ff_dither_2x2_4 [3][8]
 
const uint8_t ff_dither_2x2_8 [3][8]
 
const uint8_t ff_dither_4x4_16 [5][8]
 
const uint8_t ff_dither_8x8_32 [9][8]
 
const uint8_t ff_dither_8x8_73 [9][8]
 
const uint8_t ff_dither_8x8_128 [9][8]
 
const uint8_t ff_dither_8x8_220 [9][8]
 
const int32_t ff_yuv2rgb_coeffs [11][4]
 
const AVClass ff_sws_context_class
 

Macro Definition Documentation

◆ STR

#define STR (   s)    AV_TOSTRING(s)

Definition at line 45 of file swscale_internal.h.

◆ YUVRGB_TABLE_HEADROOM

#define YUVRGB_TABLE_HEADROOM   512

Definition at line 47 of file swscale_internal.h.

◆ YUVRGB_TABLE_LUMA_HEADROOM

#define YUVRGB_TABLE_LUMA_HEADROOM   512

Definition at line 48 of file swscale_internal.h.

◆ MAX_FILTER_SIZE

#define MAX_FILTER_SIZE   SWS_MAX_FILTER_SIZE

Definition at line 50 of file swscale_internal.h.

◆ SWS_MAX_THREADS

#define SWS_MAX_THREADS   8192 /* sanity clamp */

Definition at line 52 of file swscale_internal.h.

◆ ALT32_CORR

#define ALT32_CORR   1

Definition at line 57 of file swscale_internal.h.

◆ APCK_PTR2

#define APCK_PTR2   4

Definition at line 65 of file swscale_internal.h.

◆ APCK_COEF

#define APCK_COEF   8

Definition at line 66 of file swscale_internal.h.

◆ APCK_SIZE

#define APCK_SIZE   16

Definition at line 67 of file swscale_internal.h.

◆ RETCODE_USE_CASCADE

#define RETCODE_USE_CASCADE   -12345

Definition at line 70 of file swscale_internal.h.

◆ RY_IDX

#define RY_IDX   0

Definition at line 449 of file swscale_internal.h.

◆ GY_IDX

#define GY_IDX   1

Definition at line 450 of file swscale_internal.h.

◆ BY_IDX

#define BY_IDX   2

Definition at line 451 of file swscale_internal.h.

◆ RU_IDX

#define RU_IDX   3

Definition at line 452 of file swscale_internal.h.

◆ GU_IDX

#define GU_IDX   4

Definition at line 453 of file swscale_internal.h.

◆ BU_IDX

#define BU_IDX   5

Definition at line 454 of file swscale_internal.h.

◆ RV_IDX

#define RV_IDX   6

Definition at line 455 of file swscale_internal.h.

◆ GV_IDX

#define GV_IDX   7

Definition at line 456 of file swscale_internal.h.

◆ BV_IDX

#define BV_IDX   8

Definition at line 457 of file swscale_internal.h.

◆ RGB2YUV_SHIFT

#define RGB2YUV_SHIFT   15

Definition at line 458 of file swscale_internal.h.

◆ RED_DITHER

#define RED_DITHER   "0*8"

Definition at line 477 of file swscale_internal.h.

◆ GREEN_DITHER

#define GREEN_DITHER   "1*8"

Definition at line 478 of file swscale_internal.h.

◆ BLUE_DITHER

#define BLUE_DITHER   "2*8"

Definition at line 479 of file swscale_internal.h.

◆ Y_COEFF

#define Y_COEFF   "3*8"

Definition at line 480 of file swscale_internal.h.

◆ VR_COEFF

#define VR_COEFF   "4*8"

Definition at line 481 of file swscale_internal.h.

◆ UB_COEFF

#define UB_COEFF   "5*8"

Definition at line 482 of file swscale_internal.h.

◆ VG_COEFF

#define VG_COEFF   "6*8"

Definition at line 483 of file swscale_internal.h.

◆ UG_COEFF

#define UG_COEFF   "7*8"

Definition at line 484 of file swscale_internal.h.

◆ Y_OFFSET

#define Y_OFFSET   "8*8"

Definition at line 485 of file swscale_internal.h.

◆ U_OFFSET

#define U_OFFSET   "9*8"

Definition at line 486 of file swscale_internal.h.

◆ V_OFFSET

#define V_OFFSET   "10*8"

Definition at line 487 of file swscale_internal.h.

◆ LUM_MMX_FILTER_OFFSET

#define LUM_MMX_FILTER_OFFSET   "11*8"

Definition at line 488 of file swscale_internal.h.

◆ CHR_MMX_FILTER_OFFSET

#define CHR_MMX_FILTER_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)

Definition at line 489 of file swscale_internal.h.

◆ DSTW_OFFSET

#define DSTW_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2"

Definition at line 490 of file swscale_internal.h.

◆ ESP_OFFSET

#define ESP_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+8"

Definition at line 491 of file swscale_internal.h.

◆ VROUNDER_OFFSET

#define VROUNDER_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+16"

Definition at line 492 of file swscale_internal.h.

◆ U_TEMP

#define U_TEMP   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+24"

Definition at line 493 of file swscale_internal.h.

◆ V_TEMP

#define V_TEMP   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+32"

Definition at line 494 of file swscale_internal.h.

◆ Y_TEMP

#define Y_TEMP   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+40"

Definition at line 495 of file swscale_internal.h.

◆ ALP_MMX_FILTER_OFFSET

#define ALP_MMX_FILTER_OFFSET   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+48"

Definition at line 496 of file swscale_internal.h.

◆ UV_OFF_PX

#define UV_OFF_PX   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+48"

Definition at line 497 of file swscale_internal.h.

◆ UV_OFF_BYTE

#define UV_OFF_BYTE   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+56"

Definition at line 498 of file swscale_internal.h.

◆ DITHER16

#define DITHER16   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+64"

Definition at line 499 of file swscale_internal.h.

◆ DITHER32

#define DITHER32   "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+80"

Definition at line 500 of file swscale_internal.h.

◆ DITHER32_INT

#define DITHER32_INT   (11*8+4*4*MAX_FILTER_SIZE*3+80)

Definition at line 501 of file swscale_internal.h.

◆ XYZ_GAMMA

#define XYZ_GAMMA   (2.6f)

Definition at line 548 of file swscale_internal.h.

◆ RGB_GAMMA

#define RGB_GAMMA   (2.2f)

Definition at line 549 of file swscale_internal.h.

◆ MAX_SLICE_PLANES

#define MAX_SLICE_PLANES   4

Definition at line 1087 of file swscale_internal.h.

◆ MAX_LINES_AHEAD

#define MAX_LINES_AHEAD   4

Definition at line 1184 of file swscale_internal.h.

Typedef Documentation

◆ SwsFunc

typedef int(* SwsFunc) (SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])

Definition at line 92 of file swscale_internal.h.

◆ yuv2planar1_fn

typedef void(* yuv2planar1_fn) (const int16_t *src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)

Write one line of horizontally scaled data to planar output without any additional vertical scaling (or point-scaling).

Parameters
srcscaled source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
destpointer to the output plane. For >8-bit output, this is in uint16_t
dstWwidth of destination in pixels
ditherordered dither array of type int16_t and size 8
offsetDither offset

Definition at line 108 of file swscale_internal.h.

◆ yuv2planarX_fn

typedef void(* yuv2planarX_fn) (const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)

Write one line of horizontally scaled data to planar output with multi-point vertical scaling between input pixels.

Parameters
filtervertical luma/alpha scaling coefficients, 12 bits [0,4096]
srcscaled luma (Y) or alpha (A) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
filterSizenumber of vertical input lines to scale
destpointer to output plane. For >8-bit output, this is in uint16_t
dstWwidth of destination pixels
offsetDither offset

Definition at line 124 of file swscale_internal.h.

◆ yuv2interleavedX_fn

typedef void(* yuv2interleavedX_fn) (enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest, int dstW)

Write one line of horizontally scaled chroma to interleaved output with multi-point vertical scaling between input pixels.

Parameters
dstFormatdestination pixel format
chrDitherordered dither array of type uint8_t and size 8
chrFiltervertical chroma scaling coefficients, 12 bits [0,4096]
chrUSrcscaled chroma (U) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrVSrcscaled chroma (V) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrFilterSizenumber of vertical chroma input lines to scale
destpointer to the output plane. For >8-bit output, this is in uint16_t
dstWwidth of chroma planes

Definition at line 144 of file swscale_internal.h.

◆ yuv2packed1_fn

typedef void(* yuv2packed1_fn) (SwsInternal *c, const int16_t *lumSrc, const int16_t *chrUSrc[2], const int16_t *chrVSrc[2], const int16_t *alpSrc, uint8_t *dest, int dstW, int uvalpha, int y)

Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output without any additional vertical scaling (or point-scaling).

Note that this function may do chroma scaling, see the "uvalpha" argument.

Parameters
cSWS scaling context
lumSrcscaled luma (Y) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrUSrcscaled chroma (U) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrVSrcscaled chroma (V) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
alpSrcscaled alpha (A) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
destpointer to the output plane. For 16-bit output, this is uint16_t
dstWwidth of lumSrc and alpSrc in pixels, number of pixels to write into dest[]
uvalphachroma scaling coefficient for the second line of chroma pixels, either 2048 or 0. If 0, one chroma input is used for 2 output pixels (or if the SWS_FLAG_FULL_CHR_INT flag is set, it generates 1 output pixel). If 2048, two chroma input pixels should be averaged for 2 output pixels (this only happens if SWS_FLAG_FULL_CHR_INT is not set)
yvertical line number for this output. This does not need to be used to calculate the offset in the destination, but can be used to generate comfort noise using dithering for some output formats.

Definition at line 181 of file swscale_internal.h.

◆ yuv2packed2_fn

typedef void(* yuv2packed2_fn) (SwsInternal *c, const int16_t *lumSrc[2], const int16_t *chrUSrc[2], const int16_t *chrVSrc[2], const int16_t *alpSrc[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)

Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output by doing bilinear scaling between two input lines.

Parameters
cSWS scaling context
lumSrcscaled luma (Y) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrUSrcscaled chroma (U) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrVSrcscaled chroma (V) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
alpSrcscaled alpha (A) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
destpointer to the output plane. For 16-bit output, this is uint16_t
dstWwidth of lumSrc and alpSrc in pixels, number of pixels to write into dest[]
yalphaluma/alpha scaling coefficients for the second input line. The first line's coefficients can be calculated by using 4096 - yalpha
uvalphachroma scaling coefficient for the second input line. The first line's coefficients can be calculated by using 4096 - uvalpha
yvertical line number for this output. This does not need to be used to calculate the offset in the destination, but can be used to generate comfort noise using dithering for some output formats.

Definition at line 214 of file swscale_internal.h.

◆ yuv2packedX_fn

typedef void(* yuv2packedX_fn) (SwsInternal *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)

Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output by doing multi-point vertical scaling between input pixels.

Parameters
cSWS scaling context
lumFiltervertical luma/alpha scaling coefficients, 12 bits [0,4096]
lumSrcscaled luma (Y) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
lumFilterSizenumber of vertical luma/alpha input lines to scale
chrFiltervertical chroma scaling coefficients, 12 bits [0,4096]
chrUSrcscaled chroma (U) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrVSrcscaled chroma (V) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrFilterSizenumber of vertical chroma input lines to scale
alpSrcscaled alpha (A) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
destpointer to the output plane. For 16-bit output, this is uint16_t
dstWwidth of lumSrc and alpSrc in pixels, number of pixels to write into dest[]
yvertical line number for this output. This does not need to be used to calculate the offset in the destination, but can be used to generate comfort noise using dithering or some output formats.

Definition at line 246 of file swscale_internal.h.

◆ yuv2anyX_fn

typedef void(* yuv2anyX_fn) (SwsInternal *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)

Write one line of horizontally scaled Y/U/V/A to YUV/RGB output by doing multi-point vertical scaling between input pixels.

Parameters
cSWS scaling context
lumFiltervertical luma/alpha scaling coefficients, 12 bits [0,4096]
lumSrcscaled luma (Y) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
lumFilterSizenumber of vertical luma/alpha input lines to scale
chrFiltervertical chroma scaling coefficients, 12 bits [0,4096]
chrUSrcscaled chroma (U) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrVSrcscaled chroma (V) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
chrFilterSizenumber of vertical chroma input lines to scale
alpSrcscaled alpha (A) source data, 15 bits for 8-10-bit output, 19 bits for 16-bit output (in int32_t)
destpointer to the output planes. For 16-bit output, this is uint16_t
dstWwidth of lumSrc and alpSrc in pixels, number of pixels to write into dest[]
yvertical line number for this output. This does not need to be used to calculate the offset in the destination, but can be used to generate comfort noise using dithering or some output formats.

Definition at line 280 of file swscale_internal.h.

◆ planar1_YV12_fn

typedef void(* planar1_YV12_fn) (uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal, void *opaque)

Unscaled conversion of luma/alpha plane to YV12 for horizontal scaler.

Definition at line 291 of file swscale_internal.h.

◆ planar2_YV12_fn

typedef void(* planar2_YV12_fn) (uint8_t *dst, uint8_t *dst2, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal, void *opaque)

Unscaled conversion of chroma plane to YV12 for horizontal scaler.

Definition at line 298 of file swscale_internal.h.

◆ planarX_YV12_fn

typedef void(* planarX_YV12_fn) (uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opaque)

Unscaled conversion of arbitrary planar data (e.g.

RGBA) to YV12, through conversion using the given color matrix.

Definition at line 306 of file swscale_internal.h.

◆ planarX2_YV12_fn

typedef void(* planarX2_YV12_fn) (uint8_t *dst, uint8_t *dst2, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opaque)

Definition at line 309 of file swscale_internal.h.

Function Documentation

◆ sws_internal()

static SwsInternal* sws_internal ( const SwsContext sws)
inlinestatic

◆ ff_range_add()

int ff_range_add ( RangeList r,
unsigned int  start,
unsigned int  len 
)

Definition at line 2589 of file utils.c.

Referenced by sws_send_slice().

◆ ff_yuv2rgb_get_func_ptr()

SwsFunc ff_yuv2rgb_get_func_ptr ( SwsInternal c)

Referenced by ff_get_unscaled_swscale(), and if().

◆ ff_yuv2rgb_c_init_tables()

int ff_yuv2rgb_c_init_tables ( SwsInternal c,
const int  inv_table[4],
int  fullRange,
int  brightness,
int  contrast,
int  saturation 
)

Referenced by if(), and sws_setColorspaceDetails().

◆ ff_yuv2rgb_init_tables_ppc()

void ff_yuv2rgb_init_tables_ppc ( SwsInternal c,
const int  inv_table[4],
int  brightness,
int  contrast,
int  saturation 
)

Definition at line 606 of file yuv2rgb_altivec.c.

Referenced by sws_setColorspaceDetails().

◆ ff_updateMMXDitherTables()

void ff_updateMMXDitherTables ( SwsInternal c,
int  dstY 
)

Referenced by ff_swscale().

◆ ff_update_palette()

void ff_update_palette ( SwsInternal c,
const uint32_t *  pal 
)

Definition at line 857 of file swscale.c.

Referenced by scale_internal(), and setup_legacy_swscale().

◆ ff_sws_init_range_convert()

av_cold void ff_sws_init_range_convert ( SwsInternal c)

Definition at line 622 of file swscale.c.

Referenced by sws_init_swscale(), and sws_setColorspaceDetails().

◆ ff_sws_init_range_convert_aarch64()

av_cold void ff_sws_init_range_convert_aarch64 ( SwsInternal c)

Definition at line 238 of file swscale.c.

Referenced by ff_sws_init_range_convert().

◆ ff_sws_init_range_convert_loongarch()

av_cold void ff_sws_init_range_convert_loongarch ( SwsInternal c)

Definition at line 27 of file swscale_init_loongarch.c.

Referenced by ff_sws_init_range_convert().

◆ ff_sws_init_range_convert_riscv()

av_cold void ff_sws_init_range_convert_riscv ( SwsInternal c)

Definition at line 29 of file swscale.c.

Referenced by ff_sws_init_range_convert().

◆ ff_sws_init_range_convert_x86()

av_cold void ff_sws_init_range_convert_x86 ( SwsInternal c)

Definition at line 479 of file swscale.c.

Referenced by ff_sws_init_range_convert().

◆ ff_yuv2rgb_init_x86()

SwsFunc ff_yuv2rgb_init_x86 ( SwsInternal c)

Definition at line 241 of file yuv2rgb.c.

Referenced by if().

◆ ff_yuv2rgb_init_ppc()

SwsFunc ff_yuv2rgb_init_ppc ( SwsInternal c)

Definition at line 535 of file yuv2rgb_altivec.c.

Referenced by if().

◆ ff_yuv2rgb_init_loongarch()

SwsFunc ff_yuv2rgb_init_loongarch ( SwsInternal c)

Definition at line 110 of file swscale_init_loongarch.c.

Referenced by if().

◆ is16BPS()

static av_always_inline int is16BPS ( enum AVPixelFormat  pix_fmt)
static

◆ is32BPS()

static av_always_inline int is32BPS ( enum AVPixelFormat  pix_fmt)
static

Definition at line 734 of file swscale_internal.h.

Referenced by ff_swscale().

◆ isNBPS()

static av_always_inline int isNBPS ( enum AVPixelFormat  pix_fmt)
static

◆ isBE()

static av_always_inline int isBE ( enum AVPixelFormat  pix_fmt)
static

◆ isYUV()

static av_always_inline int isYUV ( enum AVPixelFormat  pix_fmt)
static

◆ isPlanarYUV()

static av_always_inline int isPlanarYUV ( enum AVPixelFormat  pix_fmt)
static

Definition at line 762 of file swscale_internal.h.

Referenced by isSemiPlanarYUV(), and isSwappedChroma().

◆ isSemiPlanarYUV()

static av_always_inline int isSemiPlanarYUV ( enum AVPixelFormat  pix_fmt)
static

◆ isRGB()

static av_always_inline int isRGB ( enum AVPixelFormat  pix_fmt)
static

Definition at line 780 of file swscale_internal.h.

◆ isGray()

static av_always_inline int isGray ( enum AVPixelFormat  pix_fmt)
static

◆ isRGBinInt()

static av_always_inline int isRGBinInt ( enum AVPixelFormat  pix_fmt)
static

Definition at line 798 of file swscale_internal.h.

Referenced by findRgbConvFn().

◆ isBGRinInt()

static av_always_inline int isBGRinInt ( enum AVPixelFormat  pix_fmt)
static

Definition at line 820 of file swscale_internal.h.

Referenced by findRgbConvFn().

◆ isBayer()

static av_always_inline int isBayer ( enum AVPixelFormat  pix_fmt)
static

◆ isBayer16BPS()

static av_always_inline int isBayer16BPS ( enum AVPixelFormat  pix_fmt)
static

Definition at line 849 of file swscale_internal.h.

Referenced by ff_sws_init_single_context().

◆ isAnyRGB()

static av_always_inline int isAnyRGB ( enum AVPixelFormat  pix_fmt)
static

◆ isFloat()

static av_always_inline int isFloat ( enum AVPixelFormat  pix_fmt)
static

◆ isFloat16()

static av_always_inline int isFloat16 ( enum AVPixelFormat  pix_fmt)
static

Definition at line 871 of file swscale_internal.h.

Referenced by ff_init_filters().

◆ isALPHA()

static av_always_inline int isALPHA ( enum AVPixelFormat  pix_fmt)
static

◆ isPacked()

static av_always_inline int isPacked ( enum AVPixelFormat  pix_fmt)
static

Definition at line 887 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale(), and ff_swscale().

◆ isPlanar()

static av_always_inline int isPlanar ( enum AVPixelFormat  pix_fmt)
static

Definition at line 896 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale(), ff_swscale(), if(), and reset_ptr().

◆ isPackedRGB()

static av_always_inline int isPackedRGB ( enum AVPixelFormat  pix_fmt)
static

Definition at line 903 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale().

◆ isPlanarRGB()

static av_always_inline int isPlanarRGB ( enum AVPixelFormat  pix_fmt)
static

Definition at line 910 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale(), and ff_sws_init_single_context().

◆ usePal()

static av_always_inline int usePal ( enum AVPixelFormat  pix_fmt)
static

◆ isDataInHighBits()

static av_always_inline int isDataInHighBits ( enum AVPixelFormat  pix_fmt)
static

◆ isSwappedChroma()

static av_always_inline int isSwappedChroma ( enum AVPixelFormat  pix_fmt)
static

Definition at line 955 of file swscale_internal.h.

Referenced by yuv2nv12cX_c().

◆ ff_sws_init_single_context()

int ff_sws_init_single_context ( SwsContext sws,
SwsFilter srcFilter,
SwsFilter dstFilter 
)

Definition at line 1316 of file utils.c.

Referenced by context_init_threaded(), init_legacy_subpass(), and sws_init_context().

◆ ff_get_unscaled_swscale()

void ff_get_unscaled_swscale ( SwsInternal c)

Set c->convert_unscaled to an unscaled converter if one exists for the specific source and destination formats, bit depths, flags, etc.

Definition at line 2309 of file swscale_unscaled.c.

Referenced by ff_sws_init_single_context().

◆ ff_get_unscaled_swscale_ppc()

void ff_get_unscaled_swscale_ppc ( SwsInternal c)

Definition at line 187 of file yuv2yuv_altivec.c.

Referenced by ff_get_unscaled_swscale().

◆ ff_get_unscaled_swscale_arm()

void ff_get_unscaled_swscale_arm ( SwsInternal c)

Definition at line 185 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ ff_get_unscaled_swscale_aarch64()

void ff_get_unscaled_swscale_aarch64 ( SwsInternal c)

Definition at line 218 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ ff_sws_init_scale()

void ff_sws_init_scale ( SwsInternal c)

◆ ff_sws_init_input_funcs()

void ff_sws_init_input_funcs ( SwsInternal c,
planar1_YV12_fn lumToYV12,
planar1_YV12_fn alpToYV12,
planar2_YV12_fn chrToYV12,
planarX_YV12_fn readLumPlanar,
planarX_YV12_fn readAlpPlanar,
planarX2_YV12_fn readChrPlanar 
)

Referenced by sws_init_swscale().

◆ ff_sws_init_output_funcs()

void ff_sws_init_output_funcs ( SwsInternal c,
yuv2planar1_fn yuv2plane1,
yuv2planarX_fn yuv2planeX,
yuv2interleavedX_fn yuv2nv12cX,
yuv2packed1_fn yuv2packed1,
yuv2packed2_fn yuv2packed2,
yuv2packedX_fn yuv2packedX,
yuv2anyX_fn yuv2anyX 
)

Definition at line 3169 of file output.c.

Referenced by ff_swscale(), and sws_init_swscale().

◆ ff_sws_init_swscale_ppc()

void ff_sws_init_swscale_ppc ( SwsInternal c)

Definition at line 232 of file swscale_altivec.c.

Referenced by ff_sws_init_scale().

◆ ff_sws_init_swscale_vsx()

void ff_sws_init_swscale_vsx ( SwsInternal c)

Definition at line 2019 of file swscale_vsx.c.

Referenced by ff_sws_init_swscale_ppc().

◆ ff_sws_init_swscale_x86()

void ff_sws_init_swscale_x86 ( SwsInternal c)

Definition at line 495 of file swscale.c.

Referenced by ff_sws_init_scale().

◆ ff_sws_init_swscale_aarch64()

void ff_sws_init_swscale_aarch64 ( SwsInternal c)

Definition at line 263 of file swscale.c.

Referenced by ff_sws_init_scale().

◆ ff_sws_init_swscale_arm()

void ff_sws_init_swscale_arm ( SwsInternal c)

Definition at line 33 of file swscale.c.

Referenced by ff_sws_init_scale().

◆ ff_sws_init_swscale_loongarch()

void ff_sws_init_swscale_loongarch ( SwsInternal c)

Definition at line 62 of file swscale_init_loongarch.c.

Referenced by ff_sws_init_scale().

◆ ff_sws_init_swscale_riscv()

void ff_sws_init_swscale_riscv ( SwsInternal c)

Definition at line 74 of file swscale.c.

Referenced by ff_sws_init_scale().

◆ ff_hyscale_fast_c()

void ff_hyscale_fast_c ( SwsInternal c,
int16_t *  dst,
int  dstWidth,
const uint8_t *  src,
int  srcW,
int  xInc 
)

Definition at line 23 of file hscale_fast_bilinear.c.

Referenced by sws_init_swscale().

◆ ff_hcscale_fast_c()

void ff_hcscale_fast_c ( SwsInternal c,
int16_t *  dst1,
int16_t *  dst2,
int  dstWidth,
const uint8_t *  src1,
const uint8_t *  src2,
int  srcW,
int  xInc 
)

Definition at line 38 of file hscale_fast_bilinear.c.

Referenced by sws_init_swscale().

◆ ff_init_hscaler_mmxext()

int ff_init_hscaler_mmxext ( int  dstW,
int  xInc,
uint8_t *  filterCode,
int16_t *  filter,
int32_t filterPos,
int  numSplits 
)

◆ ff_hyscale_fast_mmxext()

void ff_hyscale_fast_mmxext ( SwsInternal c,
int16_t *  dst,
int  dstWidth,
const uint8_t *  src,
int  srcW,
int  xInc 
)

Referenced by sws_init_swscale_TMPL().

◆ ff_hcscale_fast_mmxext()

void ff_hcscale_fast_mmxext ( SwsInternal c,
int16_t *  dst1,
int16_t *  dst2,
int  dstWidth,
const uint8_t *  src1,
const uint8_t *  src2,
int  srcW,
int  xInc 
)

Referenced by sws_init_swscale_TMPL().

◆ ff_sws_alphablendaway()

int ff_sws_alphablendaway ( SwsInternal c,
const uint8_t *const  src[],
const int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *const  dst[],
const int  dstStride[] 
)

Definition at line 23 of file alphablend.c.

Referenced by ff_sws_init_single_context().

◆ ff_copyPlane()

void ff_copyPlane ( const uint8_t *  src,
int  srcStride,
int  srcSliceY,
int  srcSliceH,
int  width,
uint8_t *  dst,
int  dstStride 
)

◆ ff_xyz12Torgb48()

void ff_xyz12Torgb48 ( const SwsInternal c,
uint8_t *  dst,
int  dst_stride,
const uint8_t *  src,
int  src_stride,
int  w,
int  h 
)

Definition at line 739 of file swscale.c.

Referenced by run_xyz2rgb(), and scale_internal().

◆ ff_rgb48Toxyz12()

void ff_rgb48Toxyz12 ( const SwsInternal c,
uint8_t *  dst,
int  dst_stride,
const uint8_t *  src,
int  src_stride,
int  w,
int  h 
)

Definition at line 798 of file swscale.c.

Referenced by run_rgb2xyz(), and scale_internal().

◆ fillPlane16()

static void fillPlane16 ( uint8_t *  plane,
int  stride,
int  width,
int  height,
int  y,
int  alpha,
int  bits,
const int  big_endian 
)
inlinestatic

Definition at line 1052 of file swscale_internal.h.

Referenced by ff_swscale(), and planarCopyWrapper().

◆ fillPlane32()

static void fillPlane32 ( uint8_t *  plane,
int  stride,
int  width,
int  height,
int  y,
int  alpha,
int  bits,
const int  big_endian,
int  is_float 
)
inlinestatic

Definition at line 1066 of file swscale_internal.h.

Referenced by ff_swscale().

◆ ff_init_slice_from_src()

int ff_init_slice_from_src ( SwsSlice s,
uint8_t *const  src[4],
const int  stride[4],
int  srcW,
int  lumY,
int  lumH,
int  chrY,
int  chrH,
int  relative 
)

Definition at line 148 of file slice.c.

Referenced by ff_swscale().

◆ ff_init_filters()

int ff_init_filters ( SwsInternal c)

Definition at line 250 of file slice.c.

Referenced by ff_sws_init_single_context().

◆ ff_free_filters()

int ff_free_filters ( SwsInternal c)

Definition at line 390 of file slice.c.

Referenced by ff_init_filters(), ff_sws_init_single_context(), and sws_freeContext().

◆ ff_rotate_slice()

int ff_rotate_slice ( SwsSlice s,
int  lum,
int  chr 
)

Definition at line 120 of file slice.c.

Referenced by ff_swscale().

◆ ff_init_gamma_convert()

int ff_init_gamma_convert ( SwsFilterDescriptor desc,
SwsSlice src,
uint16_t *  table 
)

initializes gamma conversion descriptor

Definition at line 59 of file gamma.c.

Referenced by ff_init_filters().

◆ ff_init_desc_fmt_convert()

int ff_init_desc_fmt_convert ( SwsFilterDescriptor desc,
SwsSlice src,
SwsSlice dst,
uint32_t *  pal 
)

initializes lum pixel format conversion descriptor

Definition at line 129 of file hscale.c.

Referenced by ff_init_filters().

◆ ff_init_desc_hscale()

int ff_init_desc_hscale ( SwsFilterDescriptor desc,
SwsSlice src,
SwsSlice dst,
uint16_t *  filter,
int *  filter_pos,
int  filter_size,
int  xInc 
)

initializes lum horizontal scaling descriptor

Definition at line 146 of file hscale.c.

Referenced by ff_init_filters().

◆ ff_init_desc_cfmt_convert()

int ff_init_desc_cfmt_convert ( SwsFilterDescriptor desc,
SwsSlice src,
SwsSlice dst,
uint32_t *  pal 
)

initializes chr pixel format conversion descriptor

Definition at line 238 of file hscale.c.

Referenced by ff_init_filters().

◆ ff_init_desc_chscale()

int ff_init_desc_chscale ( SwsFilterDescriptor desc,
SwsSlice src,
SwsSlice dst,
uint16_t *  filter,
int *  filter_pos,
int  filter_size,
int  xInc 
)

initializes chr horizontal scaling descriptor

Definition at line 253 of file hscale.c.

Referenced by ff_init_filters().

◆ ff_init_desc_no_chr()

int ff_init_desc_no_chr ( SwsFilterDescriptor desc,
SwsSlice src,
SwsSlice dst 
)

Definition at line 284 of file hscale.c.

Referenced by ff_init_filters().

◆ ff_init_vscale()

int ff_init_vscale ( SwsInternal c,
SwsFilterDescriptor desc,
SwsSlice src,
SwsSlice dst 
)

initializes vertical scaling descriptors

Definition at line 214 of file vscale.c.

Referenced by ff_init_filters().

◆ ff_init_vscale_pfn()

void ff_init_vscale_pfn ( SwsInternal c,
yuv2planar1_fn  yuv2plane1,
yuv2planarX_fn  yuv2planeX,
yuv2interleavedX_fn  yuv2nv12cX,
yuv2packed1_fn  yuv2packed1,
yuv2packed2_fn  yuv2packed2,
yuv2packedX_fn  yuv2packedX,
yuv2anyX_fn  yuv2anyX,
int  use_mmx 
)

setup vertical scaler functions

Definition at line 258 of file vscale.c.

Referenced by ff_init_vscale(), and ff_swscale().

◆ ff_sws_slice_worker()

void ff_sws_slice_worker ( void *  priv,
int  jobnr,
int  threadnr,
int  nb_jobs,
int  nb_threads 
)

Definition at line 1523 of file swscale.c.

Referenced by context_init_threaded().

◆ ff_swscale()

int ff_swscale ( SwsInternal c,
const uint8_t *const  src[],
const int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *const  dst[],
const int  dstStride[],
int  dstSliceY,
int  dstSliceH 
)

Definition at line 259 of file swscale.c.

Referenced by run_legacy_swscale(), and scale_internal().

◆ ff_shuffle_filter_coefficients()

int ff_shuffle_filter_coefficients ( SwsInternal c,
int *  filterPos,
int  filterSize,
int16_t *  filter,
int  dstW 
)

Definition at line 316 of file utils.c.

Referenced by check_hscale(), and ff_sws_init_single_context().

Variable Documentation

◆ ff_dither4

const uint64_t ff_dither4[2]

Definition at line 33 of file swscale.c.

◆ ff_dither8

const uint64_t ff_dither8[2]

Definition at line 37 of file swscale.c.

◆ ff_dither_2x2_4

const uint8_t ff_dither_2x2_4[3][8]

Definition at line 39 of file output.c.

Referenced by yuv2rgb_write().

◆ ff_dither_2x2_8

const uint8_t ff_dither_2x2_8[3][8]

Definition at line 45 of file output.c.

Referenced by yuv2rgb_write().

◆ ff_dither_4x4_16

const uint8_t ff_dither_4x4_16[5][8]

Definition at line 51 of file output.c.

Referenced by yuv2rgb_write().

◆ ff_dither_8x8_32

const uint8_t ff_dither_8x8_32[9][8]

Definition at line 59 of file output.c.

Referenced by yuv2rgb_write().

◆ ff_dither_8x8_73

const uint8_t ff_dither_8x8_73[9][8]

Definition at line 71 of file output.c.

Referenced by yuv2rgb_write().

◆ ff_dither_8x8_128

const uint8_t ff_dither_8x8_128[9][8]

Definition at line 38 of file swscale.c.

Referenced by ff_swscale().

◆ ff_dither_8x8_220

const uint8_t ff_dither_8x8_220[9][8]

◆ ff_yuv2rgb_coeffs

const int32_t ff_yuv2rgb_coeffs[11][4]

Definition at line 47 of file yuv2rgb.c.

Referenced by ff_sws_init_single_context(), and sws_getCoefficients().

◆ ff_sws_context_class

const AVClass ff_sws_context_class

Definition at line 90 of file options.c.

Referenced by sws_alloc_context(), and sws_get_class().

filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
FRAC_BITS
#define FRAC_BITS
Definition: g729postfilter.c:36
width
#define width
Definition: dsp.h:85
src
#define src
Definition: vp8dsp.c:248