Go to the documentation of this file.
21 #ifndef SWSCALE_UTILS_H
22 #define SWSCALE_UTILS_H
31 return !
a.num && !
a.den;
70 dst->frame_peak =
src->frame_peak;
71 dst->frame_avg =
src->frame_avg;
94 return c1->prim ==
c2->prim &&
120 return 1 <<
desc->log2_chroma_h;
AVPixelFormat
Pixel format.
static int ff_q_isnan(const AVRational a)
AVColorTransferCharacteristic
Color Transfer Characteristic.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
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 output
This structure describes decoded (raw) audio or video data.
static int ff_prim_equal(const AVPrimaryCoefficients *a, const AVPrimaryCoefficients *b)
int ff_test_fmt(const SwsFormat *fmt, int output)
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVPrimaryCoefficients gamut
Struct defining the red, green, and blue primary locations in terms of CIE 1931 chromaticity x and y.
int ff_infer_colors(SwsColor *src, SwsColor *dst)
enum AVColorTransferCharacteristic trc
SwsFormat ff_fmt_from_frame(const AVFrame *frame, int field)
This function also sanitizes and strips the input data, removing irrelevant fields for certain format...
static int ff_fmt_equal(const SwsFormat *fmt1, const SwsFormat *fmt2)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this field
static int ff_color_equal(const SwsColor *c1, const SwsColor *c2)
Rational number (pair of numerator and denominator).
static int ff_q_equal(const AVRational a, const AVRational b)
Struct containing chromaticity x and y values for the standard CIE 1931 chromaticity definition.
static int ff_fmt_align(enum AVPixelFormat fmt)
static void ff_color_update_dynamic(SwsColor *dst, const SwsColor *src)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
#define AV_PIX_FMT_FLAG_BAYER
The pixel format is following a Bayer pattern.
AVChromaLocation
Location of chroma samples.
AVColorSpace
YUV colorspace type.
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVColorRange
Visual content value range.
static int ff_cie_xy_equal(const AVCIExy a, const AVCIExy b)
enum AVColorPrimaries prim