|
FFmpeg
|
#include "libavutil/attributes.h"#include "libavutil/avassert.h"#include "libavutil/hdr_dynamic_metadata.h"#include "libavutil/mastering_display_metadata.h"#include "libavutil/refstruct.h"#include "format.h"#include "csputils.h"#include "ops_internal.h"#include "config_components.h"Go to the source code of this file.
Data Structures | |
| struct | LegacyFormatEntry |
Macros | |
| #define | Q(N) ((AVRational) { N, 1 }) |
| #define | Q0 Q(0) |
| #define | Q1 Q(1) |
| #define | RET(x) |
Functions | |
| int | sws_isSupportedInput (enum AVPixelFormat pix_fmt) |
| Return a positive value if pix_fmt is a supported input format, 0 otherwise. More... | |
| int | sws_isSupportedOutput (enum AVPixelFormat pix_fmt) |
| Return a positive value if pix_fmt is a supported output format, 0 otherwise. More... | |
| int | sws_isSupportedEndiannessConversion (enum AVPixelFormat pix_fmt) |
| static void | sanitize_fmt (SwsFormat *fmt, const AVPixFmtDescriptor *desc) |
| SwsFormat | ff_fmt_from_frame (const AVFrame *frame, int field) |
| This function also sanitizes and strips the input data, removing irrelevant fields for certain formats. More... | |
| void | ff_fmt_from_pixfmt (enum AVPixelFormat pixfmt, SwsFormat *fmt) |
| Subset of ff_fmt_from_frame() that sets default metadata for the format. More... | |
| static int | infer_prim_ref (SwsColor *csp, const SwsColor *ref) |
| static int | infer_trc_ref (SwsColor *csp, const SwsColor *ref) |
| bool | ff_infer_colors (SwsColor *src, SwsColor *dst) |
| static int | test_format_ops (enum AVPixelFormat format, int output) |
| static int | test_format_legacy (enum AVPixelFormat format, int output) |
| int | ff_sws_test_pixfmt_backend (const SwsBackend backends, enum AVPixelFormat format, int output) |
| int | sws_test_format (enum AVPixelFormat format, int output) |
| Test if a given (software) pixel format is supported by any backend, excluding unstable backends. More... | |
| int | sws_test_hw_format (enum AVPixelFormat format) |
| Test if a given hardware pixel format is supported by any backend, excluding unstable backends. More... | |
| int | sws_test_colorspace (enum AVColorSpace csp, int output) |
| Test if a given color space is supported. More... | |
| int | sws_test_primaries (enum AVColorPrimaries prim, int output) |
| Test if a given set of color primaries is supported. More... | |
| int | sws_test_transfer (enum AVColorTransferCharacteristic trc, int output) |
| Test if a given color transfer function is supported. More... | |
| static int | test_range (enum AVColorRange range) |
| static int | test_loc (enum AVChromaLocation loc) |
| int | ff_test_fmt (const SwsBackend backends, const SwsFormat *fmt, int output) |
| Statically test if a given format is supported by the given set of backends. More... | |
| int | sws_test_frame (const AVFrame *frame, int output) |
| Helper function to run all sws_test_* against a frame, as well as testing the basic frame properties for sanity. More... | |
| int | sws_is_noop (const AVFrame *dst, const AVFrame *src) |
| Check if a given conversion is a noop. More... | |
| void | ff_sws_frame_from_avframe (SwsFrame *dst, const AVFrame *src) |
| Initialize a SwsFrame from an AVFrame. More... | |
Variables | |
| static const LegacyFormatEntry | legacy_format_entries [] |
| #define Q | ( | N | ) | ((AVRational) { N, 1 }) |
| #define RET | ( | x | ) |
|
static |
Definition at line 309 of file format.c.
Referenced by ff_fmt_from_frame(), and ff_fmt_from_pixfmt().
This function also sanitizes and strips the input data, removing irrelevant fields for certain formats.
Calculate largest value from histogram to use as fallback for clips with missing MaxSCL information. Note that this may end up picking the "reserved" value at the 5% percentile, which in practice appears to track the brightest pixel in the scene.
Definition at line 349 of file format.c.
Referenced by sws_frame_setup(), sws_is_noop(), and sws_test_frame().
| void ff_fmt_from_pixfmt | ( | enum AVPixelFormat | pixfmt, |
| SwsFormat * | fmt | ||
| ) |
Subset of ff_fmt_from_frame() that sets default metadata for the format.
Definition at line 483 of file format.c.
Referenced by enum_ops_fmt().
Definition at line 491 of file format.c.
Referenced by ff_infer_colors().
Definition at line 515 of file format.c.
Referenced by ff_infer_colors().
Definition at line 540 of file format.c.
Referenced by adapt_colors(), and enum_ops_fmt().
|
static |
Definition at line 1708 of file format.c.
Referenced by ff_sws_test_pixfmt_backend().
|
static |
Definition at line 559 of file format.c.
Referenced by ff_sws_test_pixfmt_backend().
| int ff_sws_test_pixfmt_backend | ( | const SwsBackend | backends, |
| enum AVPixelFormat | format, | ||
| int | output | ||
| ) |
Definition at line 564 of file format.c.
Referenced by ff_test_fmt(), sws_test_format(), and test_formats().
|
static |
Definition at line 620 of file format.c.
Referenced by ff_test_fmt().
|
static |
Definition at line 625 of file format.c.
Referenced by ff_test_fmt().
| int ff_test_fmt | ( | SwsBackend | backends, |
| const SwsFormat * | fmt, | ||
| int | output | ||
| ) |
Statically test if a given format is supported by the given set of backends.
This is a heuristic, which may have false positives if a specific backend does not actually implement all operations that would be required to support the format.
Definition at line 630 of file format.c.
Referenced by sws_frame_setup(), and sws_test_frame().
Initialize a SwsFrame from an AVFrame.
Definition at line 669 of file format.c.
Referenced by get_field(), and pass_alloc_output().
|
static |
Definition at line 54 of file format.c.
Referenced by sws_isSupportedEndiannessConversion(), sws_isSupportedInput(), and sws_isSupportedOutput().
1.8.17