FFmpeg
Data Fields
SwsContext Struct Reference

#include <swscale_internal.h>

Data Fields

const AVClassav_class
 info on struct for av_log More...
 
struct SwsContextparent
 
AVSliceThreadslicethread
 
struct SwsContext ** slice_ctx
 
intslice_err
 
int nb_slice_ctx
 
int dst_slice_start
 
int dst_slice_height
 
SwsFunc convert_unscaled
 Note that src, dst, srcStride, dstStride will be copied in the sws_scale() wrapper so they can be freely modified here. More...
 
int srcW
 Width of source luma/alpha planes. More...
 
int srcH
 Height of source luma/alpha planes. More...
 
int dstH
 Height of destination luma/alpha planes. More...
 
int chrSrcW
 Width of source chroma planes. More...
 
int chrSrcH
 Height of source chroma planes. More...
 
int chrDstW
 Width of destination chroma planes. More...
 
int chrDstH
 Height of destination chroma planes. More...
 
int lumXInc
 
int chrXInc
 
int lumYInc
 
int chrYInc
 
enum AVPixelFormat dstFormat
 Destination pixel format. More...
 
enum AVPixelFormat srcFormat
 Source pixel format. More...
 
int dstFormatBpp
 Number of bits per pixel of the destination pixel format. More...
 
int srcFormatBpp
 Number of bits per pixel of the source pixel format. More...
 
int dstBpc
 
int srcBpc
 
int chrSrcHSubSample
 Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in source image. More...
 
int chrSrcVSubSample
 Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in source image. More...
 
int chrDstHSubSample
 Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in destination image. More...
 
int chrDstVSubSample
 Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in destination image. More...
 
int vChrDrop
 Binary logarithm of extra vertical subsampling factor in source image chroma planes specified by user. More...
 
int sliceDir
 Direction that slices are fed to the scaler (1 = top-to-bottom, -1 = bottom-to-top). More...
 
int nb_threads
 Number of threads used for scaling. More...
 
double param [2]
 Input parameters for scaling algorithms that need them. More...
 
AVFrameframe_src
 
AVFrameframe_dst
 
RangeList src_ranges
 
struct SwsContextcascaded_context [3]
 
int cascaded_tmpStride [4]
 
uint8_t * cascaded_tmp [4]
 
int cascaded1_tmpStride [4]
 
uint8_t * cascaded1_tmp [4]
 
int cascaded_mainindex
 
double gamma_value
 
int gamma_flag
 
int is_internal_gamma
 
uint16_t * gamma
 
uint16_t * inv_gamma
 
int numDesc
 
int descIndex [2]
 
int numSlice
 
struct SwsSliceslice
 
struct SwsFilterDescriptordesc
 
uint32_t pal_yuv [256]
 
uint32_t pal_rgb [256]
 
float uint2float_lut [256]
 
void(* lumConvertRange )(int16_t *dst, int width)
 Color range conversion function for luma plane if needed. More...
 
void(* chrConvertRange )(int16_t *dst1, int16_t *dst2, int width)
 Color range conversion function for chroma planes if needed. More...
 
int needs_hcscale
 Set if there are chroma planes to be converted. More...
 
SwsDither dither
 
SwsAlphaBlend alphablend
 
uint8_t * rgb0_scratch
 
unsigned int rgb0_scratch_allocated
 
uint8_t * xyz_scratch
 
unsigned int xyz_scratch_allocated
 
unsigned int dst_slice_align
 
atomic_int stride_unaligned_warned
 
atomic_int data_unaligned_warned
 
Scaled horizontal lines ring buffer.

The horizontal scaler keeps just enough scaled lines in a ring buffer so they may be passed to the vertical scaler.

The pointers to the allocated buffers for each line are duplicated in sequence in the ring buffer to simplify indexing and avoid wrapping around between lines inside the vertical scaler code. The wrapping is done before the vertical scaler is called.

int lastInLumBuf
 Last scaled horizontal luma/alpha line from source in the ring buffer. More...
 
int lastInChrBuf
 Last scaled horizontal chroma line from source in the ring buffer. More...
 
uint8_t * formatConvBuffer
 
int needAlpha
 
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.
}
int16_t * hLumFilter
 Array of horizontal filter coefficients for luma/alpha planes. More...
 
int16_t * hChrFilter
 Array of horizontal filter coefficients for chroma planes. More...
 
int16_t * vLumFilter
 Array of vertical filter coefficients for luma/alpha planes. More...
 
int16_t * vChrFilter
 Array of vertical filter coefficients for chroma planes. More...
 
int32_thLumFilterPos
 Array of horizontal filter starting positions for each dst[i] for luma/alpha planes. More...
 
int32_thChrFilterPos
 Array of horizontal filter starting positions for each dst[i] for chroma planes. More...
 
int32_tvLumFilterPos
 Array of vertical filter starting positions for each dst[i] for luma/alpha planes. More...
 
int32_tvChrFilterPos
 Array of vertical filter starting positions for each dst[i] for chroma planes. More...
 
int hLumFilterSize
 Horizontal filter size for luma/alpha pixels. More...
 
int hChrFilterSize
 Horizontal filter size for chroma pixels. More...
 
int vLumFilterSize
 Vertical filter size for luma/alpha pixels. More...
 
int vChrFilterSize
 Vertical filter size for chroma pixels. More...
 
int lumMmxextFilterCodeSize
 Runtime-generated MMXEXT horizontal fast bilinear scaler code size for luma/alpha planes. More...
 
int chrMmxextFilterCodeSize
 Runtime-generated MMXEXT horizontal fast bilinear scaler code size for chroma planes. More...
 
uint8_t * lumMmxextFilterCode
 Runtime-generated MMXEXT horizontal fast bilinear scaler code for luma/alpha planes. More...
 
uint8_t * chrMmxextFilterCode
 Runtime-generated MMXEXT horizontal fast bilinear scaler code for chroma planes. More...
 
int canMMXEXTBeUsed
 
int warned_unuseable_bilinear
 
int dstY
 Last destination vertical line output from last slice. More...
 
int flags
 Flags passed by the user to select scaler algorithm, optimizations, subsampling, etc... More...
 
void * yuvTable
 
int table_gV [256+2 *YUVRGB_TABLE_HEADROOM]
 
uint8_t * table_rV [256+2 *YUVRGB_TABLE_HEADROOM]
 
uint8_t * table_gU [256+2 *YUVRGB_TABLE_HEADROOM]
 
uint8_t * table_bU [256+2 *YUVRGB_TABLE_HEADROOM]
 
int32_t input_rgb2yuv_table [16+40 *4]
 
intdither_error [4]
 
int contrast
 
int brightness
 
int saturation
 
int srcColorspaceTable [4]
 
int dstColorspaceTable [4]
 
int srcRange
 0 = MPG YUV range, 1 = JPG YUV range (source image). More...
 
int dstRange
 0 = MPG YUV range, 1 = JPG YUV range (destination image). More...
 
int src0Alpha
 
int dst0Alpha
 
int srcXYZ
 
int dstXYZ
 
int src_h_chr_pos
 
int dst_h_chr_pos
 
int src_v_chr_pos
 
int dst_v_chr_pos
 
int yuv2rgb_y_offset
 
int yuv2rgb_y_coeff
 
int yuv2rgb_v2r_coeff
 
int yuv2rgb_v2g_coeff
 
int yuv2rgb_u2g_coeff
 
int yuv2rgb_u2b_coeff
 
uint64_t redDither
 
uint64_t greenDither
 
uint64_t blueDither
 
uint64_t yCoeff
 
uint64_t vrCoeff
 
uint64_t ubCoeff
 
uint64_t vgCoeff
 
uint64_t ugCoeff
 
uint64_t yOffset
 
uint64_t uOffset
 
uint64_t vOffset
 
int32_t lumMmxFilter [4 *MAX_FILTER_SIZE]
 
int32_t chrMmxFilter [4 *MAX_FILTER_SIZE]
 
int dstW
 Width of destination luma/alpha planes. More...
 
uint64_t esp
 
uint64_t vRounder
 
uint64_t u_temp
 
uint64_t v_temp
 
uint64_t y_temp
 
int32_t alpMmxFilter [4 *MAX_FILTER_SIZE]
 
ptrdiff_t uv_off
 offset (in pixels) between u and v planes More...
 
ptrdiff_t uv_offx2
 offset (in bytes) between u and v planes More...
 
uint16_t dither16 [8]
 
uint32_t dither32 [8]
 
const uint8_t * chrDither8
 
const uint8_t * lumDither8
 
int use_mmx_vfilter
 
int16_t * xyzgamma
 
int16_t * rgbgamma
 
int16_t * xyzgammainv
 
int16_t * rgbgammainv
 
int16_t xyz2rgb_matrix [3][4]
 
int16_t rgb2xyz_matrix [3][4]
 
yuv2planar1_fn yuv2plane1
 
yuv2planarX_fn yuv2planeX
 
yuv2interleavedX_fn yuv2nv12cX
 
yuv2packed1_fn yuv2packed1
 
yuv2packed2_fn yuv2packed2
 
yuv2packedX_fn yuv2packedX
 
yuv2anyX_fn yuv2anyX
 
void(* lumToYV12 )(uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal)
 Unscaled conversion of luma plane to YV12 for horizontal scaler. More...
 
void(* alpToYV12 )(uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal)
 Unscaled conversion of alpha plane to YV12 for horizontal scaler. More...
 
void(* chrToYV12 )(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal)
 Unscaled conversion of chroma planes to YV12 for horizontal scaler. More...
 
void(* readLumPlanar )(uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv)
 Functions to read planar input, such as planar RGB, and convert internally to Y/UV/A. More...
 
void(* readChrPlanar )(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width, int32_t *rgb2yuv)
 
void(* readAlpPlanar )(uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv)
 
void(* hyscale_fast )(struct SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc)
 Scale one horizontal line of input data using a bilinear filter to produce one line of output data. More...
 
void(* hcscale_fast )(struct SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc)
 
void(* hyScale )(struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 Scale one horizontal line of input data using a filter over the input lines, to produce one (differently sized) line of output data. More...
 
void(* hcScale )(struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 

Detailed Description

Examples
muxing.c, and scaling_video.c.

Definition at line 300 of file swscale_internal.h.

Field Documentation

◆ av_class

const AVClass* SwsContext::av_class

info on struct for av_log

Definition at line 304 of file swscale_internal.h.

◆ parent

struct SwsContext* SwsContext::parent

Definition at line 306 of file swscale_internal.h.

◆ slicethread

AVSliceThread* SwsContext::slicethread

Definition at line 308 of file swscale_internal.h.

◆ slice_ctx

struct SwsContext** SwsContext::slice_ctx

Definition at line 309 of file swscale_internal.h.

Referenced by ff_sws_slice_worker().

◆ slice_err

int* SwsContext::slice_err

Definition at line 310 of file swscale_internal.h.

Referenced by ff_sws_slice_worker().

◆ nb_slice_ctx

int SwsContext::nb_slice_ctx

Definition at line 311 of file swscale_internal.h.

◆ dst_slice_start

int SwsContext::dst_slice_start

Definition at line 314 of file swscale_internal.h.

Referenced by ff_sws_slice_worker().

◆ dst_slice_height

int SwsContext::dst_slice_height

Definition at line 315 of file swscale_internal.h.

Referenced by ff_sws_slice_worker().

◆ convert_unscaled

SwsFunc SwsContext::convert_unscaled

Note that src, dst, srcStride, dstStride will be copied in the sws_scale() wrapper so they can be freely modified here.

Definition at line 321 of file swscale_internal.h.

◆ srcW

int SwsContext::srcW

Width of source luma/alpha planes.

Definition at line 322 of file swscale_internal.h.

Referenced by doTest(), selfTest(), and sws_getCachedContext().

◆ srcH

int SwsContext::srcH

Height of source luma/alpha planes.

Definition at line 323 of file swscale_internal.h.

Referenced by doTest(), selfTest(), and sws_getCachedContext().

◆ dstH

int SwsContext::dstH

Height of destination luma/alpha planes.

Definition at line 324 of file swscale_internal.h.

Referenced by doTest(), ff_get_unscaled_swscale(), selfTest(), and sws_getCachedContext().

◆ chrSrcW

int SwsContext::chrSrcW

Width of source chroma planes.

Definition at line 325 of file swscale_internal.h.

◆ chrSrcH

int SwsContext::chrSrcH

Height of source chroma planes.

Definition at line 326 of file swscale_internal.h.

◆ chrDstW

int SwsContext::chrDstW

Width of destination chroma planes.

Definition at line 327 of file swscale_internal.h.

◆ chrDstH

int SwsContext::chrDstH

Height of destination chroma planes.

Definition at line 328 of file swscale_internal.h.

◆ lumXInc

int SwsContext::lumXInc

Definition at line 329 of file swscale_internal.h.

◆ chrXInc

int SwsContext::chrXInc

Definition at line 329 of file swscale_internal.h.

◆ lumYInc

int SwsContext::lumYInc

Definition at line 330 of file swscale_internal.h.

◆ chrYInc

int SwsContext::chrYInc

Definition at line 330 of file swscale_internal.h.

◆ dstFormat

enum AVPixelFormat SwsContext::dstFormat

◆ srcFormat

enum AVPixelFormat SwsContext::srcFormat

◆ dstFormatBpp

int SwsContext::dstFormatBpp

Number of bits per pixel of the destination pixel format.

Definition at line 333 of file swscale_internal.h.

◆ srcFormatBpp

int SwsContext::srcFormatBpp

Number of bits per pixel of the source pixel format.

Definition at line 334 of file swscale_internal.h.

◆ dstBpc

int SwsContext::dstBpc

Definition at line 335 of file swscale_internal.h.

◆ srcBpc

int SwsContext::srcBpc

Definition at line 335 of file swscale_internal.h.

◆ chrSrcHSubSample

int SwsContext::chrSrcHSubSample

Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in source image.

Definition at line 336 of file swscale_internal.h.

◆ chrSrcVSubSample

int SwsContext::chrSrcVSubSample

Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in source image.

Definition at line 337 of file swscale_internal.h.

◆ chrDstHSubSample

int SwsContext::chrDstHSubSample

Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in destination image.

Definition at line 338 of file swscale_internal.h.

◆ chrDstVSubSample

int SwsContext::chrDstVSubSample

Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in destination image.

Definition at line 339 of file swscale_internal.h.

◆ vChrDrop

int SwsContext::vChrDrop

Binary logarithm of extra vertical subsampling factor in source image chroma planes specified by user.

Definition at line 340 of file swscale_internal.h.

◆ sliceDir

int SwsContext::sliceDir

Direction that slices are fed to the scaler (1 = top-to-bottom, -1 = bottom-to-top).

Definition at line 341 of file swscale_internal.h.

◆ nb_threads

int SwsContext::nb_threads

Number of threads used for scaling.

Definition at line 342 of file swscale_internal.h.

◆ param

double SwsContext::param[2]

Input parameters for scaling algorithms that need them.

Definition at line 343 of file swscale_internal.h.

Referenced by sws_getCachedContext().

◆ frame_src

AVFrame* SwsContext::frame_src

Definition at line 345 of file swscale_internal.h.

Referenced by ff_sws_slice_worker().

◆ frame_dst

AVFrame* SwsContext::frame_dst

Definition at line 346 of file swscale_internal.h.

Referenced by ff_sws_slice_worker().

◆ src_ranges

RangeList SwsContext::src_ranges

Definition at line 348 of file swscale_internal.h.

◆ cascaded_context

struct SwsContext* SwsContext::cascaded_context[3]

Definition at line 354 of file swscale_internal.h.

◆ cascaded_tmpStride

int SwsContext::cascaded_tmpStride[4]

Definition at line 355 of file swscale_internal.h.

◆ cascaded_tmp

uint8_t* SwsContext::cascaded_tmp[4]

Definition at line 356 of file swscale_internal.h.

◆ cascaded1_tmpStride

int SwsContext::cascaded1_tmpStride[4]

Definition at line 357 of file swscale_internal.h.

◆ cascaded1_tmp

uint8_t* SwsContext::cascaded1_tmp[4]

Definition at line 358 of file swscale_internal.h.

◆ cascaded_mainindex

int SwsContext::cascaded_mainindex

Definition at line 359 of file swscale_internal.h.

◆ gamma_value

double SwsContext::gamma_value

Definition at line 361 of file swscale_internal.h.

◆ gamma_flag

int SwsContext::gamma_flag

Definition at line 362 of file swscale_internal.h.

◆ is_internal_gamma

int SwsContext::is_internal_gamma

Definition at line 363 of file swscale_internal.h.

◆ gamma

uint16_t* SwsContext::gamma

Definition at line 364 of file swscale_internal.h.

◆ inv_gamma

uint16_t* SwsContext::inv_gamma

Definition at line 365 of file swscale_internal.h.

◆ numDesc

int SwsContext::numDesc

Definition at line 367 of file swscale_internal.h.

◆ descIndex

int SwsContext::descIndex[2]

Definition at line 368 of file swscale_internal.h.

◆ numSlice

int SwsContext::numSlice

Definition at line 369 of file swscale_internal.h.

◆ slice

struct SwsSlice* SwsContext::slice

Definition at line 370 of file swscale_internal.h.

◆ desc

struct SwsFilterDescriptor* SwsContext::desc

Definition at line 371 of file swscale_internal.h.

◆ pal_yuv

uint32_t SwsContext::pal_yuv[256]

Definition at line 373 of file swscale_internal.h.

◆ pal_rgb

uint32_t SwsContext::pal_rgb[256]

Definition at line 374 of file swscale_internal.h.

◆ uint2float_lut

float SwsContext::uint2float_lut[256]

Definition at line 376 of file swscale_internal.h.

◆ lastInLumBuf

int SwsContext::lastInLumBuf

Last scaled horizontal luma/alpha line from source in the ring buffer.

Definition at line 388 of file swscale_internal.h.

◆ lastInChrBuf

int SwsContext::lastInChrBuf

Last scaled horizontal chroma line from source in the ring buffer.

Definition at line 389 of file swscale_internal.h.

◆ formatConvBuffer

uint8_t* SwsContext::formatConvBuffer

Definition at line 392 of file swscale_internal.h.

◆ needAlpha

int SwsContext::needAlpha

Definition at line 393 of file swscale_internal.h.

◆ hLumFilter

int16_t* SwsContext::hLumFilter

Array of horizontal filter coefficients for luma/alpha planes.

Definition at line 409 of file swscale_internal.h.

◆ hChrFilter

int16_t* SwsContext::hChrFilter

Array of horizontal filter coefficients for chroma planes.

Definition at line 410 of file swscale_internal.h.

◆ vLumFilter

int16_t* SwsContext::vLumFilter

Array of vertical filter coefficients for luma/alpha planes.

Definition at line 411 of file swscale_internal.h.

◆ vChrFilter

int16_t* SwsContext::vChrFilter

Array of vertical filter coefficients for chroma planes.

Definition at line 412 of file swscale_internal.h.

◆ hLumFilterPos

int32_t* SwsContext::hLumFilterPos

Array of horizontal filter starting positions for each dst[i] for luma/alpha planes.

Definition at line 413 of file swscale_internal.h.

◆ hChrFilterPos

int32_t* SwsContext::hChrFilterPos

Array of horizontal filter starting positions for each dst[i] for chroma planes.

Definition at line 414 of file swscale_internal.h.

◆ vLumFilterPos

int32_t* SwsContext::vLumFilterPos

Array of vertical filter starting positions for each dst[i] for luma/alpha planes.

Definition at line 415 of file swscale_internal.h.

◆ vChrFilterPos

int32_t* SwsContext::vChrFilterPos

Array of vertical filter starting positions for each dst[i] for chroma planes.

Definition at line 416 of file swscale_internal.h.

◆ hLumFilterSize

int SwsContext::hLumFilterSize

Horizontal filter size for luma/alpha pixels.

Definition at line 417 of file swscale_internal.h.

◆ hChrFilterSize

int SwsContext::hChrFilterSize

Horizontal filter size for chroma pixels.

Definition at line 418 of file swscale_internal.h.

◆ vLumFilterSize

int SwsContext::vLumFilterSize

Vertical filter size for luma/alpha pixels.

Definition at line 419 of file swscale_internal.h.

◆ vChrFilterSize

int SwsContext::vChrFilterSize

Vertical filter size for chroma pixels.

Definition at line 420 of file swscale_internal.h.

◆ lumMmxextFilterCodeSize

int SwsContext::lumMmxextFilterCodeSize

Runtime-generated MMXEXT horizontal fast bilinear scaler code size for luma/alpha planes.

Definition at line 423 of file swscale_internal.h.

◆ chrMmxextFilterCodeSize

int SwsContext::chrMmxextFilterCodeSize

Runtime-generated MMXEXT horizontal fast bilinear scaler code size for chroma planes.

Definition at line 424 of file swscale_internal.h.

◆ lumMmxextFilterCode

uint8_t* SwsContext::lumMmxextFilterCode

Runtime-generated MMXEXT horizontal fast bilinear scaler code for luma/alpha planes.

Definition at line 425 of file swscale_internal.h.

◆ chrMmxextFilterCode

uint8_t* SwsContext::chrMmxextFilterCode

Runtime-generated MMXEXT horizontal fast bilinear scaler code for chroma planes.

Definition at line 426 of file swscale_internal.h.

◆ canMMXEXTBeUsed

int SwsContext::canMMXEXTBeUsed

Definition at line 428 of file swscale_internal.h.

◆ warned_unuseable_bilinear

int SwsContext::warned_unuseable_bilinear

Definition at line 429 of file swscale_internal.h.

◆ dstY

int SwsContext::dstY

Last destination vertical line output from last slice.

Definition at line 431 of file swscale_internal.h.

Referenced by bayer_to_yv12_wrapper(), planar8ToP01xleWrapper(), planarToP01xWrapper(), yv12_copy(), and yv12_interpolate().

◆ flags

int SwsContext::flags

Flags passed by the user to select scaler algorithm, optimizations, subsampling, etc...

Definition at line 432 of file swscale_internal.h.

◆ yuvTable

void* SwsContext::yuvTable

Definition at line 433 of file swscale_internal.h.

◆ table_gV

int SwsContext::table_gV[256+2 *YUVRGB_TABLE_HEADROOM]

Definition at line 436 of file swscale_internal.h.

◆ table_rV

uint8_t* SwsContext::table_rV[256+2 *YUVRGB_TABLE_HEADROOM]

Definition at line 437 of file swscale_internal.h.

◆ table_gU

uint8_t* SwsContext::table_gU[256+2 *YUVRGB_TABLE_HEADROOM]

Definition at line 438 of file swscale_internal.h.

◆ table_bU

uint8_t* SwsContext::table_bU[256+2 *YUVRGB_TABLE_HEADROOM]

Definition at line 439 of file swscale_internal.h.

◆ input_rgb2yuv_table

int32_t SwsContext::input_rgb2yuv_table[16+40 *4]

Definition at line 440 of file swscale_internal.h.

◆ dither_error

int* SwsContext::dither_error[4]

Definition at line 452 of file swscale_internal.h.

◆ contrast

int SwsContext::contrast

Definition at line 455 of file swscale_internal.h.

Referenced by scale_frame().

◆ brightness

int SwsContext::brightness

Definition at line 455 of file swscale_internal.h.

Referenced by scale_frame().

◆ saturation

int SwsContext::saturation

Definition at line 455 of file swscale_internal.h.

Referenced by scale_frame().

◆ srcColorspaceTable

int SwsContext::srcColorspaceTable[4]

Definition at line 456 of file swscale_internal.h.

◆ dstColorspaceTable

int SwsContext::dstColorspaceTable[4]

Definition at line 457 of file swscale_internal.h.

◆ srcRange

int SwsContext::srcRange

0 = MPG YUV range, 1 = JPG YUV range (source image).

Definition at line 458 of file swscale_internal.h.

◆ dstRange

int SwsContext::dstRange

0 = MPG YUV range, 1 = JPG YUV range (destination image).

Definition at line 459 of file swscale_internal.h.

◆ src0Alpha

int SwsContext::src0Alpha

Definition at line 460 of file swscale_internal.h.

◆ dst0Alpha

int SwsContext::dst0Alpha

Definition at line 461 of file swscale_internal.h.

◆ srcXYZ

int SwsContext::srcXYZ

Definition at line 462 of file swscale_internal.h.

◆ dstXYZ

int SwsContext::dstXYZ

Definition at line 463 of file swscale_internal.h.

◆ src_h_chr_pos

int SwsContext::src_h_chr_pos

Definition at line 464 of file swscale_internal.h.

Referenced by sws_getCachedContext().

◆ dst_h_chr_pos

int SwsContext::dst_h_chr_pos

Definition at line 465 of file swscale_internal.h.

Referenced by sws_getCachedContext().

◆ src_v_chr_pos

int SwsContext::src_v_chr_pos

Definition at line 466 of file swscale_internal.h.

Referenced by sws_getCachedContext().

◆ dst_v_chr_pos

int SwsContext::dst_v_chr_pos

Definition at line 467 of file swscale_internal.h.

Referenced by sws_getCachedContext().

◆ yuv2rgb_y_offset

int SwsContext::yuv2rgb_y_offset

Definition at line 468 of file swscale_internal.h.

◆ yuv2rgb_y_coeff

int SwsContext::yuv2rgb_y_coeff

Definition at line 469 of file swscale_internal.h.

◆ yuv2rgb_v2r_coeff

int SwsContext::yuv2rgb_v2r_coeff

Definition at line 470 of file swscale_internal.h.

◆ yuv2rgb_v2g_coeff

int SwsContext::yuv2rgb_v2g_coeff

Definition at line 471 of file swscale_internal.h.

◆ yuv2rgb_u2g_coeff

int SwsContext::yuv2rgb_u2g_coeff

Definition at line 472 of file swscale_internal.h.

◆ yuv2rgb_u2b_coeff

int SwsContext::yuv2rgb_u2b_coeff

Definition at line 473 of file swscale_internal.h.

◆ redDither

uint64_t SwsContext::redDither

Definition at line 501 of file swscale_internal.h.

◆ greenDither

uint64_t SwsContext::greenDither

Definition at line 502 of file swscale_internal.h.

◆ blueDither

uint64_t SwsContext::blueDither

Definition at line 503 of file swscale_internal.h.

◆ yCoeff

uint64_t SwsContext::yCoeff

Definition at line 505 of file swscale_internal.h.

◆ vrCoeff

uint64_t SwsContext::vrCoeff

Definition at line 506 of file swscale_internal.h.

◆ ubCoeff

uint64_t SwsContext::ubCoeff

Definition at line 507 of file swscale_internal.h.

◆ vgCoeff

uint64_t SwsContext::vgCoeff

Definition at line 508 of file swscale_internal.h.

◆ ugCoeff

uint64_t SwsContext::ugCoeff

Definition at line 509 of file swscale_internal.h.

◆ yOffset

uint64_t SwsContext::yOffset

Definition at line 510 of file swscale_internal.h.

◆ uOffset

uint64_t SwsContext::uOffset

Definition at line 511 of file swscale_internal.h.

◆ vOffset

uint64_t SwsContext::vOffset

Definition at line 512 of file swscale_internal.h.

◆ lumMmxFilter

int32_t SwsContext::lumMmxFilter[4 *MAX_FILTER_SIZE]

Definition at line 513 of file swscale_internal.h.

◆ chrMmxFilter

int32_t SwsContext::chrMmxFilter[4 *MAX_FILTER_SIZE]

Definition at line 514 of file swscale_internal.h.

◆ dstW

int SwsContext::dstW

Width of destination luma/alpha planes.

Definition at line 515 of file swscale_internal.h.

Referenced by check_hscale(), check_yuv2yuvX(), doTest(), ff_get_unscaled_swscale(), selfTest(), and sws_getCachedContext().

◆ esp

uint64_t SwsContext::esp

Definition at line 516 of file swscale_internal.h.

◆ vRounder

uint64_t SwsContext::vRounder

Definition at line 517 of file swscale_internal.h.

◆ u_temp

uint64_t SwsContext::u_temp

Definition at line 518 of file swscale_internal.h.

◆ v_temp

uint64_t SwsContext::v_temp

Definition at line 519 of file swscale_internal.h.

◆ y_temp

uint64_t SwsContext::y_temp

Definition at line 520 of file swscale_internal.h.

◆ alpMmxFilter

int32_t SwsContext::alpMmxFilter[4 *MAX_FILTER_SIZE]

Definition at line 521 of file swscale_internal.h.

◆ uv_off

ptrdiff_t SwsContext::uv_off

offset (in pixels) between u and v planes

Definition at line 525 of file swscale_internal.h.

◆ uv_offx2

ptrdiff_t SwsContext::uv_offx2

offset (in bytes) between u and v planes

Definition at line 526 of file swscale_internal.h.

◆ dither16

uint16_t SwsContext::dither16[8]

Definition at line 527 of file swscale_internal.h.

◆ dither32

uint32_t SwsContext::dither32[8]

Definition at line 528 of file swscale_internal.h.

◆ chrDither8

const uint8_t* SwsContext::chrDither8

Definition at line 530 of file swscale_internal.h.

◆ lumDither8

const uint8_t * SwsContext::lumDither8

Definition at line 530 of file swscale_internal.h.

◆ use_mmx_vfilter

int SwsContext::use_mmx_vfilter

Definition at line 543 of file swscale_internal.h.

◆ xyzgamma

int16_t* SwsContext::xyzgamma

Definition at line 548 of file swscale_internal.h.

◆ rgbgamma

int16_t* SwsContext::rgbgamma

Definition at line 549 of file swscale_internal.h.

◆ xyzgammainv

int16_t* SwsContext::xyzgammainv

Definition at line 550 of file swscale_internal.h.

◆ rgbgammainv

int16_t* SwsContext::rgbgammainv

Definition at line 551 of file swscale_internal.h.

◆ xyz2rgb_matrix

int16_t SwsContext::xyz2rgb_matrix[3][4]

Definition at line 552 of file swscale_internal.h.

◆ rgb2xyz_matrix

int16_t SwsContext::rgb2xyz_matrix[3][4]

Definition at line 553 of file swscale_internal.h.

◆ yuv2plane1

yuv2planar1_fn SwsContext::yuv2plane1

Definition at line 556 of file swscale_internal.h.

◆ yuv2planeX

yuv2planarX_fn SwsContext::yuv2planeX

Definition at line 557 of file swscale_internal.h.

◆ yuv2nv12cX

yuv2interleavedX_fn SwsContext::yuv2nv12cX

Definition at line 558 of file swscale_internal.h.

◆ yuv2packed1

yuv2packed1_fn SwsContext::yuv2packed1

Definition at line 559 of file swscale_internal.h.

◆ yuv2packed2

yuv2packed2_fn SwsContext::yuv2packed2

Definition at line 560 of file swscale_internal.h.

◆ yuv2packedX

yuv2packedX_fn SwsContext::yuv2packedX

Definition at line 561 of file swscale_internal.h.

◆ yuv2anyX

yuv2anyX_fn SwsContext::yuv2anyX

Definition at line 562 of file swscale_internal.h.

◆ lumToYV12

void(* SwsContext::lumToYV12) (uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal)

Unscaled conversion of luma plane to YV12 for horizontal scaler.

Definition at line 565 of file swscale_internal.h.

◆ alpToYV12

void(* SwsContext::alpToYV12) (uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal)

Unscaled conversion of alpha plane to YV12 for horizontal scaler.

Definition at line 568 of file swscale_internal.h.

◆ chrToYV12

void(* SwsContext::chrToYV12) (uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int width, uint32_t *pal)

Unscaled conversion of chroma planes to YV12 for horizontal scaler.

Definition at line 571 of file swscale_internal.h.

◆ readLumPlanar

void(* SwsContext::readLumPlanar) (uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv)

Functions to read planar input, such as planar RGB, and convert internally to Y/UV/A.

Definition at line 580 of file swscale_internal.h.

◆ readChrPlanar

void(* SwsContext::readChrPlanar) (uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width, int32_t *rgb2yuv)

Definition at line 581 of file swscale_internal.h.

◆ readAlpPlanar

void(* SwsContext::readAlpPlanar) (uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv)

Definition at line 583 of file swscale_internal.h.

◆ hyscale_fast

void(* SwsContext::hyscale_fast) (struct SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc)

Scale one horizontal line of input data using a bilinear filter to produce one line of output data.

Compared to SwsContext->hScale(), please take note of the following caveats when using these:

  • Scaling is done using only 7 bits instead of 14-bit coefficients.
  • You can use no more than 5 input pixels to produce 4 output pixels. Therefore, this filter should not be used for downscaling by more than ~20% in width (because that equals more than 5/4th downscaling and thus more than 5 pixels input per 4 pixels output).
  • In general, bilinear filters create artifacts during downscaling (even when <20%), because one output pixel will span more than one input pixel, and thus some pixels will need edges of both neighbor pixels to interpolate the output pixel. Since you can use at most two input pixels per output pixel in bilinear scaling, this is impossible and thus downscaling by any size will create artifacts. To enable this type of scaling, set SWS_FLAG_FAST_BILINEAR in SwsContext->flags.

Definition at line 605 of file swscale_internal.h.

◆ hcscale_fast

void(* SwsContext::hcscale_fast) (struct SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc)

Definition at line 608 of file swscale_internal.h.

◆ hyScale

void(* SwsContext::hyScale) (struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)

Scale one horizontal line of input data using a filter over the input lines, to produce one (differently sized) line of output data.

Parameters
dstpointer to destination buffer for horizontally scaled data. If the number of bits per component of one destination pixel (SwsContext->dstBpc) is <= 10, data will be 15 bpc in 16 bits (int16_t) width. Else (i.e. SwsContext->dstBpc == 16), data will be 19bpc in 32 bits (int32_t) width.
dstWwidth of destination image
srcpointer to source data to be scaled. If the number of bits per component of a source pixel (SwsContext->srcBpc) is 8, this is 8bpc in 8 bits (uint8_t) width. Else (i.e. SwsContext->dstBpc > 8), this is native depth in 16 bits (uint16_t) width. In other words, for 9-bit YUV input, this is 9bpc, for 10-bit YUV input, this is 10bpc, and for 16-bit RGB or YUV, this is 16bpc.
filterfilter coefficients to be used per output pixel for scaling. This contains 14bpp filtering coefficients. Guaranteed to contain dstW * filterSize entries.
filterPosposition of the first input pixel to be used for each output pixel during scaling. Guaranteed to contain dstW entries.
filterSizethe number of input coefficients to be used (and thus the number of input pixels to be used) for creating a single output pixel. Is aligned to 4 (and input coefficients thus padded with zeroes) to simplify creating SIMD code.

Definition at line 645 of file swscale_internal.h.

◆ hcScale

void(* SwsContext::hcScale) (struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)

Definition at line 648 of file swscale_internal.h.

◆ lumConvertRange

void(* SwsContext::lumConvertRange) (int16_t *dst, int width)

Color range conversion function for luma plane if needed.

Definition at line 654 of file swscale_internal.h.

◆ chrConvertRange

void(* SwsContext::chrConvertRange) (int16_t *dst1, int16_t *dst2, int width)

Color range conversion function for chroma planes if needed.

Definition at line 656 of file swscale_internal.h.

◆ needs_hcscale

int SwsContext::needs_hcscale

Set if there are chroma planes to be converted.

Definition at line 658 of file swscale_internal.h.

◆ dither

SwsDither SwsContext::dither

Definition at line 660 of file swscale_internal.h.

◆ alphablend

SwsAlphaBlend SwsContext::alphablend

Definition at line 662 of file swscale_internal.h.

◆ rgb0_scratch

uint8_t* SwsContext::rgb0_scratch

Definition at line 667 of file swscale_internal.h.

◆ rgb0_scratch_allocated

unsigned int SwsContext::rgb0_scratch_allocated

Definition at line 668 of file swscale_internal.h.

◆ xyz_scratch

uint8_t* SwsContext::xyz_scratch

Definition at line 673 of file swscale_internal.h.

◆ xyz_scratch_allocated

unsigned int SwsContext::xyz_scratch_allocated

Definition at line 674 of file swscale_internal.h.

◆ dst_slice_align

unsigned int SwsContext::dst_slice_align

Definition at line 676 of file swscale_internal.h.

◆ stride_unaligned_warned

atomic_int SwsContext::stride_unaligned_warned

Definition at line 677 of file swscale_internal.h.

◆ data_unaligned_warned

atomic_int SwsContext::data_unaligned_warned

Definition at line 678 of file swscale_internal.h.


The documentation for this struct was generated from the following file:
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
width
#define width
src
#define src
Definition: vp8dsp.c:255
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
FRAC_BITS
#define FRAC_BITS
Definition: g729postfilter.c:36