186 int32_t
flags()
const {
return m_flags; }
217 void getContext(int32_t
flags = 0);
220 bool validate(
int width,
int height,
PixelFormat pixelFormat);
224 int m_dstHeight = -1;
228 int m_srcHeight = -1;
Error codes, error categories and the OptionalErrorCode convention.
Common helpers: comparisons, value lookup, non-copyable base, string utilities.
Carries the caller's choice between exceptions and error codes.
Definition averror.h:96
One video frame.
Definition frame.h:578
VideoRescaler()
Create an uninitialised scaler.
VideoRescaler(VideoRescaler &&other)
Move the scaler.
PixelFormat dstPixelFormat()
Output pixel format.
Definition videorescaler.h:160
VideoFrame rescale(const VideoFrame &src, OptionalErrorCode ec=throws())
Scale into a newly allocated frame.
void rescale(VideoFrame &dst, const VideoFrame &src, OptionalErrorCode ec=throws())
Scale into an existing frame.
VideoRescaler & operator=(VideoRescaler &&rhs)
Move assignment.
int dstHeight() const
Output height.
Definition videorescaler.h:154
VideoRescaler & operator=(const VideoRescaler &rhs)
Copy assignment: replaces the configuration and the libswscale context.
VideoRescaler(const VideoRescaler &other)
Copy the scaler configuration.
int srcWidth() const
Input width.
Definition videorescaler.h:167
PixelFormat srcPixelFormat()
Input pixel format.
Definition videorescaler.h:179
VideoRescaler(int m_dstWidth, int m_dstHeight, PixelFormat m_dstPixelFormat, int32_t flags=SwsFlagAuto)
Create a scaler that keeps the input geometry and only converts formats.
int srcHeight() const
Input height.
Definition videorescaler.h:173
VideoRescaler(int dstWidth, int dstHeight, PixelFormat dstPixelFormat, int srcWidth, int srcHeight, PixelFormat srcPixelFormat, int32_t flags=SwsFlagAuto)
Create a scaler with explicit source and destination.
int32_t flags() const
Scaling options in use.
Definition videorescaler.h:186
int dstWidth() const
Output width.
Definition videorescaler.h:148
bool isValid() const
Whether the scaler has a libswscale context.
FFmpeg types re-exported for the public API and small value wrappers.
Video frames, audio samples and their common frame interface.
Root namespace of the library.
Definition audioresampler.h:19
SwsFlags
Scaling algorithms and options of libswscale.
Definition videorescaler.h:28
@ SwsFlagSinc
Sinc filter.
Definition videorescaler.h:48
@ SwsFlagAccurateRnd
Rounding mode that costs speed and gains accuracy.
Definition videorescaler.h:56
@ SwsFlagBitexact
Bit-exact output where the algorithm allows it.
Definition videorescaler.h:62
@ SwsFlagBicublin
Bicubic for luma, bilinear for chroma.
Definition videorescaler.h:44
@ SwsFlagErrorDiffusion
Error diffusion for palette conversion.
Definition videorescaler.h:64
@ SwsFlagLanczos
Lanczos filter, a good default for high quality.
Definition videorescaler.h:50
@ SwsFlagPrintInfo
Print the chosen filter configuration.
Definition videorescaler.h:54
@ SwsFlagFullChromaInp
Treat the input chroma as full resolution.
Definition videorescaler.h:60
@ SwsFlagAuto
Let libswscale pick the algorithm.
Definition videorescaler.h:30
@ SwsFlagArea
Averaging over the source area; good for downscaling.
Definition videorescaler.h:42
@ SwsFlagSpline
Spline filter.
Definition videorescaler.h:52
@ SwsFlagBicubic
Bicubic filtering.
Definition videorescaler.h:36
@ SwsFlagNeighbor
Nearest neighbour, the fastest and crudest option.
Definition videorescaler.h:40
@ SwsFlagFastBilinear
Bilinear filtering with reduced chroma interpolation.
Definition videorescaler.h:32
@ SwsFlagBilinear
Bilinear filtering.
Definition videorescaler.h:34
@ SwsFlagGauss
Gaussian filter.
Definition videorescaler.h:46
@ SwsFlagFullChromaInt
Full chroma interpolation by the scaler.
Definition videorescaler.h:58
@ SwsFlagExprerimental
Experimental filter, kept for compatibility.
Definition videorescaler.h:38