FFmpeg 9.0
Loading...
Searching...
No Matches
SwsContext Struct Reference

Main external API structure. More...

#include <libswscale/swscale.h>

Data Fields

const AVClassav_class
void * opaque
 Private data of the user, can be used to carry app specific stuff.
unsigned flags
 Bitmask of SWS_*.
double scaler_params [SWS_NUM_SCALER_PARAMS]
int threads
 How many threads to use for processing, or 0 for automatic selection.
SwsDither dither
 Dither mode.
SwsAlphaBlend alpha_blend
 Alpha blending mode.
int gamma_flag
 Use gamma correct scaling.
int src_w
 Deprecated frame property overrides, for the legacy API only.
int src_h
 Width and height of the source frame.
int dst_w
int dst_h
 Width and height of the destination frame.
int src_format
 Source pixel format.
int dst_format
 Destination pixel format.
int src_range
 Source is full range.
int dst_range
 Destination is full range.
int src_v_chr_pos
 Source vertical chroma position in luma grid / 256.
int src_h_chr_pos
 Source horizontal chroma position.
int dst_v_chr_pos
 Destination vertical chroma position.
int dst_h_chr_pos
 Destination horizontal chroma position.
int intent
 Desired ICC intent for color space conversions.
SwsScaler scaler
 Scaling filter.
SwsScaler scaler_sub
 Scaler used specifically for up/downsampling subsampled (chroma) planes.
SwsBackend backends
 Bitmask of SWS_BACKEND_*.

Detailed Description

Main external API structure.

New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(SwsContext) is not part of the ABI.

Examples
mux.c, and scale_video.c.

Definition at line 227 of file swscale.h.

Field Documentation

◆ av_class

const AVClass* SwsContext::av_class

Definition at line 228 of file swscale.h.

◆ opaque

void* SwsContext::opaque

Private data of the user, can be used to carry app specific stuff.

Definition at line 233 of file swscale.h.

◆ flags

unsigned SwsContext::flags

Bitmask of SWS_*.

See SwsFlags for details.

Definition at line 238 of file swscale.h.

◆ scaler_params

double SwsContext::scaler_params[SWS_NUM_SCALER_PARAMS]

Definition at line 244 of file swscale.h.

◆ threads

int SwsContext::threads

How many threads to use for processing, or 0 for automatic selection.

Definition at line 249 of file swscale.h.

◆ dither

SwsDither SwsContext::dither

Dither mode.

Definition at line 254 of file swscale.h.

◆ alpha_blend

SwsAlphaBlend SwsContext::alpha_blend

Alpha blending mode.

See SwsAlphaBlend for details.

Definition at line 259 of file swscale.h.

◆ gamma_flag

int SwsContext::gamma_flag

Use gamma correct scaling.

Definition at line 264 of file swscale.h.

◆ src_w

int SwsContext::src_w

Deprecated frame property overrides, for the legacy API only.

Ignored by sws_scale_frame() when used in dynamic mode, in which case all properties are instead taken from the frame directly.

Examples
scale_video.c.

Definition at line 272 of file swscale.h.

Referenced by main().

◆ src_h

int SwsContext::src_h

Width and height of the source frame.

Examples
scale_video.c.

Definition at line 272 of file swscale.h.

Referenced by main().

◆ dst_w

int SwsContext::dst_w
Examples
scale_video.c.

Definition at line 273 of file swscale.h.

Referenced by main().

◆ dst_h

int SwsContext::dst_h

Width and height of the destination frame.

Examples
scale_video.c.

Definition at line 273 of file swscale.h.

Referenced by main().

◆ src_format

int SwsContext::src_format

Source pixel format.

Definition at line 274 of file swscale.h.

◆ dst_format

int SwsContext::dst_format

Destination pixel format.

Definition at line 275 of file swscale.h.

◆ src_range

int SwsContext::src_range

Source is full range.

Definition at line 276 of file swscale.h.

◆ dst_range

int SwsContext::dst_range

Destination is full range.

Definition at line 277 of file swscale.h.

◆ src_v_chr_pos

int SwsContext::src_v_chr_pos

Source vertical chroma position in luma grid / 256.

Definition at line 278 of file swscale.h.

◆ src_h_chr_pos

int SwsContext::src_h_chr_pos

Source horizontal chroma position.

Definition at line 279 of file swscale.h.

◆ dst_v_chr_pos

int SwsContext::dst_v_chr_pos

Destination vertical chroma position.

Definition at line 280 of file swscale.h.

◆ dst_h_chr_pos

int SwsContext::dst_h_chr_pos

Destination horizontal chroma position.

Definition at line 281 of file swscale.h.

◆ intent

int SwsContext::intent

Desired ICC intent for color space conversions.

Definition at line 286 of file swscale.h.

◆ scaler

SwsScaler SwsContext::scaler

Scaling filter.

If set to something other than SWS_SCALE_AUTO, this will override the filter implied by SwsContext.flags.

Note: Does not affect the legacy (stateful) API.

Definition at line 294 of file swscale.h.

◆ scaler_sub

SwsScaler SwsContext::scaler_sub

Scaler used specifically for up/downsampling subsampled (chroma) planes.

If set to something other than SWS_SCALE_AUTO, this will override the filter implied by SwsContext.scaler. Otherwise, the same filter will be used for both main scaling and chroma subsampling.

Definition at line 302 of file swscale.h.

◆ backends

SwsBackend SwsContext::backends

Bitmask of SWS_BACKEND_*.

If non-zero, this will restrict the available backends to the specified set. If left as zero, a default set of backends will be selected automatically (based on SWS_UNSTABLE).

Note: This is only relevant for the new API (sws_scale_frame()). The stateful legacy API always implies SWS_BACKEND_LEGACY.

Definition at line 312 of file swscale.h.


The documentation for this struct was generated from the following file: