|
FFmpeg
|
#include <libavutil/refstruct.h>Go to the source code of this file.
Data Structures | |
| struct | SwsFilterParams |
| struct | SwsFilterWeights |
| Represents a computed filter kernel. More... | |
Macros | |
| #define | SWS_NUM_SCALER_PARAMS 2 |
| #define | SWS_MAX_REDUCE_CUTOFF 0.002 |
| #define | SWS_PARAM_DEFAULT 123456 |
Enumerations | |
| enum | SwsScaler { SWS_SCALE_AUTO = 0, SWS_SCALE_BILINEAR, SWS_SCALE_BICUBIC, SWS_SCALE_POINT, SWS_SCALE_AREA, SWS_SCALE_GAUSSIAN, SWS_SCALE_SINC, SWS_SCALE_LANCZOS, SWS_SCALE_SPLINE, SWS_SCALE_NB, SWS_SCALE_MAX_ENUM = 0x7FFFFFFF } |
| enum | { SWS_FILTER_SCALE = (1 << 14), SWS_FILTER_SIZE_MAX = 256 } |
Functions | |
| int | ff_sws_filter_generate (void *log_ctx, const SwsFilterParams *params, SwsFilterWeights **out) |
| Generate a filter kernel for the given parameters. More... | |
| enum SwsScaler |
| Enumerator | |
|---|---|
| SWS_SCALE_AUTO | |
| SWS_SCALE_BILINEAR | bilinear filtering |
| SWS_SCALE_BICUBIC | 2-tap cubic BC-spline |
| SWS_SCALE_POINT | nearest neighbor (point sampling) |
| SWS_SCALE_AREA | area averaging |
| SWS_SCALE_GAUSSIAN | 2-tap gaussian approximation |
| SWS_SCALE_SINC | unwindowed sinc |
| SWS_SCALE_LANCZOS | 3-tap sinc/sinc |
| SWS_SCALE_SPLINE | unwindowned natural cubic spline |
| SWS_SCALE_NB | not part of the ABI |
| SWS_SCALE_MAX_ENUM | force size to 32 bits, not a valid filter type |
| anonymous enum |
| int ff_sws_filter_generate | ( | void * | log_ctx, |
| const SwsFilterParams * | params, | ||
| SwsFilterWeights ** | out | ||
| ) |
Generate a filter kernel for the given parameters.
The generated filter is allocated as a refstruct and must be unref'd by the caller.
Returns 0 or a negative error code. In particular, this may return:
SWS_SCALE_AREA is a pseudo-filter that is equivalent to bilinear filtering for upscaling (since bilinear just evenly mixes samples according to the relative distance), and equivalent to (anti-aliased) point sampling for downscaling.
Definition at line 185 of file filters.c.
Referenced by cudascale_filter_init().
1.8.17