summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-04-04 17:57:33 +0200
committerLars Knoll <lars.knoll@qt.io>2021-04-08 12:19:15 +0000
commit85cf52390c5d8183820367f84f31b2a1182b224c (patch)
treea87d96ed30709f1d3ec226ac6cc6f32ee88a3dee /src/multimedia/video
parentebb4b2cd47dde5b343c1e53104e8cd5aa426a09c (diff)
Add support for HW rendering of Y8 and Y16 video formats
Change-Id: I00f9fdcc489a18658574642df49336861aa3a14d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/video')
-rw-r--r--src/multimedia/video/qvideotexturehelper.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/multimedia/video/qvideotexturehelper.cpp b/src/multimedia/video/qvideotexturehelper.cpp
index b9db64c5f..9ceccd33f 100644
--- a/src/multimedia/video/qvideotexturehelper.cpp
+++ b/src/multimedia/video/qvideotexturehelper.cpp
@@ -216,14 +216,15 @@ QString vertexShaderFileName(QVideoSurfaceFormat::PixelFormat format)
case QVideoSurfaceFormat::Format_BGR565:
case QVideoSurfaceFormat::Format_BGR555:
- case QVideoSurfaceFormat::Format_Y8:
- case QVideoSurfaceFormat::Format_Y16:
-
case QVideoSurfaceFormat::Format_IMC1:
case QVideoSurfaceFormat::Format_IMC2:
case QVideoSurfaceFormat::Format_IMC3:
case QVideoSurfaceFormat::Format_IMC4:
return QString();
+
+ case QVideoSurfaceFormat::Format_Y8:
+ case QVideoSurfaceFormat::Format_Y16:
+
case QVideoSurfaceFormat::Format_AYUV444:
case QVideoSurfaceFormat::Format_AYUV444_Premultiplied:
return QStringLiteral(":/qt-project.org/multimedia/shaders/yuv.vert.qsb");
@@ -259,14 +260,15 @@ QString fragmentShaderFileName(QVideoSurfaceFormat::PixelFormat format)
case QVideoSurfaceFormat::Format_BGR565:
case QVideoSurfaceFormat::Format_BGR555:
- case QVideoSurfaceFormat::Format_Y8:
- case QVideoSurfaceFormat::Format_Y16:
-
case QVideoSurfaceFormat::Format_IMC1:
case QVideoSurfaceFormat::Format_IMC2:
case QVideoSurfaceFormat::Format_IMC3:
case QVideoSurfaceFormat::Format_IMC4:
return QString();
+
+ case QVideoSurfaceFormat::Format_Y8:
+ case QVideoSurfaceFormat::Format_Y16:
+ return QStringLiteral(":/qt-project.org/multimedia/shaders/y.frag.qsb");
case QVideoSurfaceFormat::Format_AYUV444:
case QVideoSurfaceFormat::Format_AYUV444_Premultiplied:
return QStringLiteral(":/qt-project.org/multimedia/shaders/ayuv.frag.qsb");
@@ -336,9 +338,6 @@ QByteArray uniformData(const QVideoSurfaceFormat &format, const QMatrix4x4 &tran
case QVideoSurfaceFormat::Format_BGR565:
case QVideoSurfaceFormat::Format_BGR555:
- case QVideoSurfaceFormat::Format_Y8:
- case QVideoSurfaceFormat::Format_Y16:
-
case QVideoSurfaceFormat::Format_IMC1:
case QVideoSurfaceFormat::Format_IMC2:
case QVideoSurfaceFormat::Format_IMC3:
@@ -351,6 +350,9 @@ QByteArray uniformData(const QVideoSurfaceFormat &format, const QMatrix4x4 &tran
case QVideoSurfaceFormat::Format_BGRA32_Premultiplied:
case QVideoSurfaceFormat::Format_ABGR32:
case QVideoSurfaceFormat::Format_BGR32:
+
+ case QVideoSurfaceFormat::Format_Y8:
+ case QVideoSurfaceFormat::Format_Y16:
break;
case QVideoSurfaceFormat::Format_AYUV444:
case QVideoSurfaceFormat::Format_AYUV444_Premultiplied: