diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-05-12 11:26:29 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-05-14 08:18:27 +0000 |
commit | 9a4822037def3b9d48abea8bbfd7ea20fd19849b (patch) | |
tree | c4dc47b1752bb69774f7b62376d2f3ec174c8a9f /src/multimedia/video | |
parent | 34976a67b51b4b0db14ce2093aafd8f6b4e6bee6 (diff) |
Fix a number of compiler warnings/errors when using gcc
Change-Id: Ifa7bcd4507948cd61909a11af203852ee1586787
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/multimedia/video')
-rw-r--r-- | src/multimedia/video/qvideotexturehelper.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/multimedia/video/qvideotexturehelper.cpp b/src/multimedia/video/qvideotexturehelper.cpp index 70238a50c..850cba5f9 100644 --- a/src/multimedia/video/qvideotexturehelper.cpp +++ b/src/multimedia/video/qvideotexturehelper.cpp @@ -152,7 +152,7 @@ static const TextureDescription descriptions[QVideoFrameFormat::NPixelFormats] = [](int stride, int height) { // IMC1 requires that U and V components are aligned on a multiple of 16 lines int h = (height + 15) & ~15; - h += 2*((h/2) + 15 & ~15); + h += 2*(((h/2) + 15) & ~15); return stride * h; }, { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, @@ -169,7 +169,7 @@ static const TextureDescription descriptions[QVideoFrameFormat::NPixelFormats] = [](int stride, int height) { // IMC3 requires that U and V components are aligned on a multiple of 16 lines int h = (height + 15) & ~15; - h += 2*((h/2) + 15 & ~15); + h += 2*(((h/2) + 15) & ~15); return stride * h; }, { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, @@ -243,10 +243,6 @@ QString vertexShaderFileName(QVideoFrameFormat::PixelFormat /*format*/) QString fragmentShaderFileName(QVideoFrameFormat::PixelFormat format) { switch (format) { - case QVideoFrameFormat::Format_Invalid: - case QVideoFrameFormat::Format_Jpeg: - return QString(); - case QVideoFrameFormat::Format_Y8: case QVideoFrameFormat::Format_Y16: return QStringLiteral(":/qt-project.org/multimedia/shaders/y.frag.qsb"); @@ -285,6 +281,8 @@ QString fragmentShaderFileName(QVideoFrameFormat::PixelFormat format) return QStringLiteral(":/qt-project.org/multimedia/shaders/nv12.frag.qsb"); case QVideoFrameFormat::Format_NV21: return QStringLiteral(":/qt-project.org/multimedia/shaders/nv21.frag.qsb"); + default: + return QString(); } } |