summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideoframeconversionhelper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-03-23 13:31:22 +0100
committerLars Knoll <lars.knoll@qt.io>2021-04-06 08:11:45 +0000
commitd6e52bea2da1d31bce91d1a175f9b9e84b8e37f5 (patch)
tree90e41da7f8a6abdd069da5e7fcd410d8accb8843 /src/multimedia/video/qvideoframeconversionhelper.cpp
parent9aaec39aef634a9f2d972f35484a566bdd01ecd6 (diff)
Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormat
Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideoframeconversionhelper.cpp')
-rw-r--r--src/multimedia/video/qvideoframeconversionhelper.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/multimedia/video/qvideoframeconversionhelper.cpp b/src/multimedia/video/qvideoframeconversionhelper.cpp
index b2d724703..7612c88c3 100644
--- a/src/multimedia/video/qvideoframeconversionhelper.cpp
+++ b/src/multimedia/video/qvideoframeconversionhelper.cpp
@@ -624,7 +624,7 @@ static void QT_FASTCALL qt_convert_P016BE_to_ARGB32(const QVideoFrame &frame, uc
}
-static VideoFrameConvertFunc qConvertFuncs[QVideoFrame::NPixelFormats] = {
+static VideoFrameConvertFunc qConvertFuncs[QVideoSurfaceFormat::NPixelFormats] = {
/* Format_Invalid */ nullptr, // Not needed
/* Format_ARGB32 */ nullptr, // Not needed
/* Format_ARGB32_Premultiplied */ nullptr, // Not needed
@@ -669,30 +669,30 @@ static void qInitConvertFuncsAsm()
#ifdef QT_COMPILER_SUPPORTS_SSE2
extern void QT_FASTCALL qt_convert_BGRA32_to_ARGB32_sse2(const QVideoFrame&, uchar*);
if (qCpuHasFeature(SSE2)){
- qConvertFuncs[QVideoFrame::Format_BGRA32] = qt_convert_BGRA32_to_ARGB32_sse2;
- qConvertFuncs[QVideoFrame::Format_BGRA32_Premultiplied] = qt_convert_BGRA32_to_ARGB32_sse2;
- qConvertFuncs[QVideoFrame::Format_BGR32] = qt_convert_BGRA32_to_ARGB32_sse2;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGRA32] = qt_convert_BGRA32_to_ARGB32_sse2;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGRA32_Premultiplied] = qt_convert_BGRA32_to_ARGB32_sse2;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGR32] = qt_convert_BGRA32_to_ARGB32_sse2;
}
#endif
#ifdef QT_COMPILER_SUPPORTS_SSSE3
extern void QT_FASTCALL qt_convert_BGRA32_to_ARGB32_ssse3(const QVideoFrame&, uchar*);
if (qCpuHasFeature(SSSE3)){
- qConvertFuncs[QVideoFrame::Format_BGRA32] = qt_convert_BGRA32_to_ARGB32_ssse3;
- qConvertFuncs[QVideoFrame::Format_BGRA32_Premultiplied] = qt_convert_BGRA32_to_ARGB32_ssse3;
- qConvertFuncs[QVideoFrame::Format_BGR32] = qt_convert_BGRA32_to_ARGB32_ssse3;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGRA32] = qt_convert_BGRA32_to_ARGB32_ssse3;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGRA32_Premultiplied] = qt_convert_BGRA32_to_ARGB32_ssse3;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGR32] = qt_convert_BGRA32_to_ARGB32_ssse3;
}
#endif
#ifdef QT_COMPILER_SUPPORTS_AVX2
extern void QT_FASTCALL qt_convert_BGRA32_to_ARGB32_avx2(const QVideoFrame&, uchar*);
if (qCpuHasFeature(AVX2)){
- qConvertFuncs[QVideoFrame::Format_BGRA32] = qt_convert_BGRA32_to_ARGB32_avx2;
- qConvertFuncs[QVideoFrame::Format_BGRA32_Premultiplied] = qt_convert_BGRA32_to_ARGB32_avx2;
- qConvertFuncs[QVideoFrame::Format_BGR32] = qt_convert_BGRA32_to_ARGB32_avx2;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGRA32] = qt_convert_BGRA32_to_ARGB32_avx2;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGRA32_Premultiplied] = qt_convert_BGRA32_to_ARGB32_avx2;
+ qConvertFuncs[QVideoSurfaceFormat::Format_BGR32] = qt_convert_BGRA32_to_ARGB32_avx2;
}
#endif
}
-VideoFrameConvertFunc qConverterForFormat(QVideoFrame::PixelFormat format)
+VideoFrameConvertFunc qConverterForFormat(QVideoSurfaceFormat::PixelFormat format)
{
static bool initAsmFuncsDone = false;
if (!initAsmFuncsDone) {