|
FFmpeg
|
Main external API structure. More...
#include <swscale.h>
Data Fields | |
| const AVClass * | av_class |
| void * | opaque |
| Private data of the user, can be used to carry app specific stuff. More... | |
| unsigned | flags |
| Bitmask of SWS_*. More... | |
| double | scaler_params [SWS_NUM_SCALER_PARAMS] |
| int | threads |
| How many threads to use for processing, or 0 for automatic selection. More... | |
| SwsDither | dither |
| Dither mode. More... | |
| SwsAlphaBlend | alpha_blend |
| Alpha blending mode. More... | |
| int | gamma_flag |
| Use gamma correct scaling. More... | |
| int | src_w |
| Deprecated frame property overrides, for the legacy API only. More... | |
| int | src_h |
| Width and height of the source frame. More... | |
| int | dst_w |
| int | dst_h |
| Width and height of the destination frame. More... | |
| int | src_format |
| Source pixel format. More... | |
| int | dst_format |
| Destination pixel format. More... | |
| int | src_range |
| Source is full range. More... | |
| int | dst_range |
| Destination is full range. More... | |
| int | src_v_chr_pos |
| Source vertical chroma position in luma grid / 256. More... | |
| int | src_h_chr_pos |
| Source horizontal chroma position. More... | |
| int | dst_v_chr_pos |
| Destination vertical chroma position. More... | |
| int | dst_h_chr_pos |
| Destination horizontal chroma position. More... | |
| int | intent |
| Desired ICC intent for color space conversions. More... | |
| SwsScaler | scaler |
| Scaling filter. More... | |
| SwsScaler | scaler_sub |
| Scaler used specifically for up/downsampling subsampled (chroma) planes. More... | |
| SwsBackend | backends |
| Bitmask of SWS_BACKEND_*. More... | |
Main external API structure.
Copyright (C) 2025 Niklas Haas.
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.
This file is part of FFmpeg.
FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
| void* SwsContext::opaque |
| unsigned SwsContext::flags |
Bitmask of SWS_*.
See SwsFlags for details.
Definition at line 242 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), check_output_yuv2gbrp(), check_yuv2nv12cX(), check_yuv2yuv1(), check_yuv2yuvX(), ff_sws_init_single_context(), main(), scale_hw(), scale_internal(), scale_legacy(), scale_new(), setup_legacy_swscale(), sws_getCachedContext(), and sws_setColorspaceDetails().
| double SwsContext::scaler_params[SWS_NUM_SCALER_PARAMS] |
Definition at line 248 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), ff_sws_init_single_context(), sws_getCachedContext(), and sws_setColorspaceDetails().
| int SwsContext::threads |
How many threads to use for processing, or 0 for automatic selection.
Definition at line 253 of file swscale.h.
Referenced by context_init_threaded(), scale_legacy(), scale_new(), and sws_init_context().
| SwsDither SwsContext::dither |
Dither mode.
Definition at line 258 of file swscale.h.
Referenced by add_legacy_sws_pass(), context_init_threaded(), ff_sws_init_single_context(), init_legacy_subpass(), scale_hw(), scale_internal(), scale_legacy(), scale_new(), and setup_legacy_swscale().
| SwsAlphaBlend SwsContext::alpha_blend |
Alpha blending mode.
See SwsAlphaBlend for details.
Definition at line 263 of file swscale.h.
Referenced by add_legacy_sws_pass(), ff_sws_init_single_context(), and sws_setColorspaceDetails().
| int SwsContext::gamma_flag |
Use gamma correct scaling.
Definition at line 268 of file swscale.h.
Referenced by add_legacy_sws_pass(), ff_sws_init_single_context(), and scale_internal().
| 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.
Definition at line 276 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), ff_scale_image(), ff_sws_init_single_context(), init_legacy_subpass(), main(), scale_internal(), scale_legacy(), sws_getCachedContext(), and sws_setColorspaceDetails().
| int SwsContext::src_h |
Width and height of the source frame.
Definition at line 276 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), ff_scale_image(), ff_sws_init_single_context(), ff_sws_slice_worker(), init_legacy_subpass(), main(), run_legacy_swscale(), scale_internal(), scale_legacy(), sws_getCachedContext(), sws_receive_slice(), and sws_setColorspaceDetails().
| int SwsContext::dst_w |
Definition at line 277 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), check_hscale(), ff_scale_image(), ff_sws_init_single_context(), init_legacy_subpass(), main(), scale_internal(), scale_legacy(), setup_legacy_swscale(), sws_frame_start(), sws_getCachedContext(), and sws_setColorspaceDetails().
| int SwsContext::dst_h |
Width and height of the destination frame.
Definition at line 277 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), ff_scale_image(), ff_sws_init_single_context(), init_legacy_subpass(), main(), scale_internal(), scale_legacy(), sws_frame_start(), sws_getCachedContext(), sws_scale(), and sws_setColorspaceDetails().
| int SwsContext::src_format |
Source pixel format.
Definition at line 278 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), check_chrConvertRange(), check_input_planar_rgb_to_a(), check_input_planar_rgb_to_uv(), check_input_planar_rgb_to_y(), check_lumConvertRange(), check_rgb_to_uv(), check_rgb_to_y(), check_rgba_to_a(), ff_sws_init_single_context(), handle_formats(), scale_internal(), scale_legacy(), setup_legacy_swscale(), slice_ctx(), sws_getCachedContext(), sws_getColorspaceDetails(), sws_init_context(), and sws_setColorspaceDetails().
| int SwsContext::dst_format |
Destination pixel format.
Definition at line 279 of file swscale.h.
Referenced by add_legacy_sws_pass(), alloc_set_opts(), check_chrConvertRange(), check_input_planar_rgb_to_a(), check_input_planar_rgb_to_uv(), check_input_planar_rgb_to_y(), check_lumConvertRange(), check_output_yuv2gbrp(), check_rgb_to_uv(), check_yuv2nv12cX(), check_yuv2yuvX(), ff_sws_init_single_context(), handle_formats(), init_legacy_subpass(), scale_internal(), scale_legacy(), sws_frame_start(), sws_getCachedContext(), sws_getColorspaceDetails(), sws_init_context(), and sws_setColorspaceDetails().
| int SwsContext::src_range |
Source is full range.
Definition at line 280 of file swscale.h.
Referenced by add_legacy_sws_pass(), check_chrConvertRange(), check_lumConvertRange(), ff_sws_init_single_context(), init_legacy_subpass(), sws_getColorspaceDetails(), sws_init_context(), and sws_setColorspaceDetails().
| int SwsContext::dst_range |
Destination is full range.
Definition at line 281 of file swscale.h.
Referenced by add_legacy_sws_pass(), check_chrConvertRange(), check_lumConvertRange(), ff_sws_init_single_context(), init_legacy_subpass(), sws_getColorspaceDetails(), sws_init_context(), and sws_setColorspaceDetails().
| int SwsContext::src_v_chr_pos |
Source vertical chroma position in luma grid / 256.
Definition at line 282 of file swscale.h.
Referenced by add_legacy_sws_pass(), and ff_sws_init_single_context().
| int SwsContext::src_h_chr_pos |
Source horizontal chroma position.
Definition at line 283 of file swscale.h.
Referenced by add_legacy_sws_pass(), and ff_sws_init_single_context().
| int SwsContext::dst_v_chr_pos |
Destination vertical chroma position.
Definition at line 284 of file swscale.h.
Referenced by add_legacy_sws_pass(), and ff_sws_init_single_context().
| int SwsContext::dst_h_chr_pos |
Destination horizontal chroma position.
Definition at line 285 of file swscale.h.
Referenced by add_legacy_sws_pass(), and ff_sws_init_single_context().
| int SwsContext::intent |
Desired ICC intent for color space conversions.
Definition at line 290 of file swscale.h.
Referenced by adapt_colors().
| 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 298 of file swscale.h.
Referenced by add_legacy_sws_pass(), ff_sws_init_single_context(), scale_legacy(), and scale_new().
| 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 306 of file swscale.h.
Referenced by add_legacy_sws_pass(), ff_sws_init_single_context(), scale_legacy(), and scale_new().
| 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 316 of file swscale.h.
Referenced by main(), scale_new(), and test_formats().
1.8.17