summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideotexturehelper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-04-04 17:16:18 +0200
committerLars Knoll <lars.knoll@qt.io>2021-04-08 12:18:55 +0000
commit74c7dc45ed4b79843260e4e16d808987de1aacc8 (patch)
tree14d43c3bb5bc65d9a4ace58a310caa0dd3de4e7d /src/multimedia/video/qvideotexturehelper.cpp
parentccb7398c3d839f36fcbdcad1e3c9fc13f387713f (diff)
Remove endian specific surface formats
For 16bit data, we only support the platforms native endianness. Change-Id: Ic04097125622715e6847d568551d572cd317b674 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideotexturehelper.cpp')
-rw-r--r--src/multimedia/video/qvideotexturehelper.cpp35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/multimedia/video/qvideotexturehelper.cpp b/src/multimedia/video/qvideotexturehelper.cpp
index 1eed562aa..ed3742b47 100644
--- a/src/multimedia/video/qvideotexturehelper.cpp
+++ b/src/multimedia/video/qvideotexturehelper.cpp
@@ -181,26 +181,16 @@ static const TextureDescription descriptions[QVideoSurfaceFormat::NPixelFormats]
{ { 1, 1 }, { 1, 1 }, { 1, 1 } }
},
- // Format_P010LE
+ // Format_P010
{ 2,
{ QRhiTexture::R16, QRhiTexture::RG16, QRhiTexture::UnknownFormat },
{ { 1, 1 }, { 2, 2 }, { 1, 1 } }
},
- // Format_P010BE
- { 2,
- { QRhiTexture::RG8, QRhiTexture::BGRA8, QRhiTexture::UnknownFormat },
- { { 1, 1 }, { 2, 2 }, { 1, 1 } }
- },
- // Format_P016LE
+ // Format_P016
{ 2,
{ QRhiTexture::R16, QRhiTexture::RG16, QRhiTexture::UnknownFormat },
{ { 1, 1 }, { 2, 2 }, { 1, 1 } }
},
- // Format_P016BE
- { 2,
- { QRhiTexture::RG8, QRhiTexture::BGRA8, QRhiTexture::UnknownFormat },
- { { 1, 1 }, { 2, 2 }, { 1, 1 } }
- },
// Format_Jpeg
{ 1,
@@ -252,10 +242,8 @@ QString vertexShaderFileName(QVideoSurfaceFormat::PixelFormat format)
case QVideoSurfaceFormat::Format_YUYV:
case QVideoSurfaceFormat::Format_NV12:
case QVideoSurfaceFormat::Format_NV21:
- case QVideoSurfaceFormat::Format_P010LE:
- case QVideoSurfaceFormat::Format_P010BE:
- case QVideoSurfaceFormat::Format_P016LE:
- case QVideoSurfaceFormat::Format_P016BE:
+ case QVideoSurfaceFormat::Format_P010:
+ case QVideoSurfaceFormat::Format_P016:
return QStringLiteral(":/qt-project.org/multimedia/shaders/yuv.vert.qsb");
}
}
@@ -302,12 +290,9 @@ QString fragmentShaderFileName(QVideoSurfaceFormat::PixelFormat format)
return QStringLiteral(":/qt-project.org/multimedia/shaders/nv12.frag.qsb");
case QVideoSurfaceFormat::Format_NV21:
return QStringLiteral(":/qt-project.org/multimedia/shaders/nv21.frag.qsb");
- case QVideoSurfaceFormat::Format_P010LE:
- case QVideoSurfaceFormat::Format_P016LE:
- return QStringLiteral(":/qt-project.org/multimedia/shaders/p010le.frag.qsb");
- case QVideoSurfaceFormat::Format_P010BE:
- case QVideoSurfaceFormat::Format_P016BE:
- return QStringLiteral(":/qt-project.org/multimedia/shaders/p010be.frag.qsb");
+ case QVideoSurfaceFormat::Format_P010:
+ case QVideoSurfaceFormat::Format_P016:
+ return QStringLiteral(":/qt-project.org/multimedia/shaders/p010.frag.qsb");
}
}
@@ -394,10 +379,8 @@ QByteArray uniformData(const QVideoSurfaceFormat &format, const QMatrix4x4 &tran
}
case QVideoSurfaceFormat::Format_NV12:
case QVideoSurfaceFormat::Format_NV21:
- case QVideoSurfaceFormat::Format_P010LE:
- case QVideoSurfaceFormat::Format_P010BE:
- case QVideoSurfaceFormat::Format_P016LE:
- case QVideoSurfaceFormat::Format_P016BE: {
+ case QVideoSurfaceFormat::Format_P010:
+ case QVideoSurfaceFormat::Format_P016: {
static constexpr float pw[] = { 1, 1, 0 };
planeWidth = pw;
break;