3#ifndef QFFMPEGVIDEOENCODERUTILS_P_H
4#define QFFMPEGVIDEOENCODERUTILS_P_H
17#include <QtFFmpegMediaPluginImpl/private/qffmpegdefs_p.h>
18#include <QtFFmpegMediaPluginImpl/private/qffmpeghwaccel_p.h>
20#include <QtCore/qspan.h>
26std::optional<AVPixelFormat> findTargetSWFormat(AVPixelFormat sourceSWFormat,
const Codec &codec,
28 const AVPixelFormatSet &prohibitedFormats = {});
30std::optional<AVPixelFormat> findTargetFormat(AVPixelFormat sourceFormat,
31 AVPixelFormat sourceSWFormat,
const Codec &codec,
33 const AVPixelFormatSet &prohibitedFormats = {});
35AVScore findSWFormatScores(
const Codec &codec, AVPixelFormat sourceSWFormat);
38
39
40
41
42
46
47
48
49
50
51
52
53
54
55
56
57
60QSize adjustVideoResolution(
const Codec &codec, QSize requestedResolution);
static auto targetSwFormatScoreCalculator(AVPixelFormat sourceFormat, std::reference_wrapper< const AVPixelFormatSet > prohibitedFormats)
static AVScore calculateTargetSwFormatScore(const AVPixFmtDescriptor *sourceSwFormatDesc, AVPixelFormat fmt, const AVPixelFormatSet &prohibitedFormats)
std::optional< AVPixelFormat > findTargetFormat(AVPixelFormat sourceFormat, AVPixelFormat sourceSWFormat, const Codec &codec, const HWAccel *accel, const AVPixelFormatSet &prohibitedFormats)
AVRational adjustFrameTimeBase(QSpan< const AVRational > supportedRates, AVRational frameRate)
adjustFrameTimeBase gets adjusted timebase by a list of supported frame rates and an already adjusted...
static bool isHwFormatAcceptedByCodec(AVPixelFormat pixFormat)
AVScore findSWFormatScores(const Codec &codec, AVPixelFormat sourceSWFormat)
SwsFlags getScaleConversionType(const QSize &sourceSize, const QSize &targetSize)
QSize adjustVideoResolution(const Codec &codec, QSize requestedResolution)
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType
AVRational adjustFrameRate(QSpan< const AVRational > supportedRates, qreal requestedRate)
adjustFrameRate get a rational frame rate be requested qreal rate. If the codec supports fixed frame ...
std::optional< AVPixelFormat > findTargetSWFormat(AVPixelFormat sourceSWFormat, const Codec &codec, const HWAccel &accel, const AVPixelFormatSet &prohibitedFormats)