| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a property called Correction Angle in QCameraDevice. The correction
angle represents the rotation in degrees needed to match the mounted
camera angle with the native orientation.
Refactored to a QVideo namespace for the RotationAngle.
Change-Id: Icfbd766e12ee1331de5235a535348b502ec158f0
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The color transformation matrices are hard to maintain. Having tests
that demonstrates how they are calculated makes them easier to maintain.
While writing these tests, we found that the matrices for BT2020 with
full range YUV signal did not match the limited range version, giving
too green images.
Other coefficients were also adjusted to agree better with the
reference, but these changes were insignificant.
Task-number: QTBUG-117744
Pick-to: 6.5 6.6
Change-Id: I2207e4919bf7f8ff63cec995b866843354228364
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-117744
Pick-to: 6.6 6.5
Change-Id: I9f80add59986a6bd8aa1947a2804097e84eea2d5
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It has been pointed out that platforms with static builds can end up
in symbol name clashes when a Qt library and an application uses the
same resource_name in qt_add_shaders or qt_add_resources.
Avoid this by using more unique resource_names for Multimedia's own
qt_add_shaders calls.
Pick-to: 6.6 6.5
Fixes: QTBUG-118624
Change-Id: Ie3cc65abe42be1ae6bc61a6e2951997b4c398b79
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In QVideoTextureHelper::updateTextureWithMap() we do frame.map(),
but there is no corresponding frame.unmap() call, what may potentially
lead to memory leaks and/or other side effects. So adding a scope guard
to call frame.unmap() on any return from the function.
Task-number: QTBUG-118587
Pick-to: 6.5 6.6
Change-Id: I04062cfcd23698872e825bd88044e30858e8d12a
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A regression in change-344586 caused the QVideoFrame::map function
to set the incorrect strides for the YUV422P format. This caused
QVideoFrame::bytesPerLine to return incorrect stride value, and thereby
giving wrong sizes for frame allocations that disagree with FFmpeg.
The YUV422P format is a planar format, where the Y, U, and V components
are in separate color planes. The U and V planes are sub-sampled
horizontally to half the width of the Y plane, but have the same height
as the Y plane.
+----------- Y_stride ------------+
| |
| Y (8 bit) | height
| |
U_offset --> +--- U_stride ---+----------------+
| |
| U (8 bit) | height
| |
V_offset --> +--- V_stride ---+
| |
| V (8 bit) | height
| |
+----------------+
After this fix, the U and V strides are correctly calculated as
U_stride = Y_stride / 2
and
U_stride = Y_stride / 2
Thus we get the correct plane size as
V_offset = Y_stride * height + Y_stride / 2 * height
Fixes: QTBUG-116991
Pick-to: 6.5 6.6
Change-Id: Ifd9f83ee75e0d5f869675232d13d7e2b84a04c7b
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We declare 0xFF alpha channel in formats XRGB, BGRX, etc, but
on some linux systems it's 0xff in xImage.
The patch fixes the problem and suggests SIMD
optimizations for intel platforms that makes a difference
with 4K displays. With the optimizations, the overhead is not so
big comparing with memcpy.
We have a test that covers the case, it failed on some machines.
Pick-to: 6.6 6.5
Change-Id: I78927ea58159ae67bbf993f30b8dec45f617edc1
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* toImage is const and it's expected to be thread-safe
* since video frames are often emitted from separate threads,
there might be collisions with 2 images created in parallel.
* Even though QImage assignment is thread safe, let's avoid
possible parallel rendering to different images.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-111975
Change-Id: Ib26982e3a1df888dbf70c3c0ff73392d4dc81c80
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- export QCapturableWindow methods instead of the class
- add Q_DECLARE_SHARED
- use QT6_ONLY macro
- make QCapturableWindow operators hidden friends
API comparison:
codereview.qt-project.org/c/qt/qtmultimedia/+/481755
Pick-to: 6.6
Change-Id: I90b8d58611208fccd2ce027d63b9cd15a9fe6d30
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-113331
Change-Id: I992f3cbc9e4ceff6e62452bf354e5c46dd8fa84b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The color matrix for BT709 video (limited) range, had a small mistake.
From calculations based on the BT709 standard and for video range
(16 - 235) values, the conversion equations are:
R = Y * 1.1644 + V * 1.7928 + (-248.100994)
G = Y * 1.1644 + U * -0.2132 + V * -0.5329 + 76.878080
B = Y * 1.1644 + U * 2.1124 + (-289.017566)
So there was a missplacement between two of the coeficients
in the matrix.
Fixes: QTBUG-108083
Pick-to: 6.5 6.2
Change-Id: If58c7df8a9ad4d975a2ac0c90cd3692232210995
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
| |
Pick-to: 6.5 6.5
Change-Id: Ibce8162ff461a5798ecd5720e41f60077ad19ab4
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
| |
They cause clashes in CMake Unity (Jumbo) builds.
Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: I856ed6b5f511299845a49f989ccd74a3e5480e44
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
|
|
|
|
|
|
| |
The use of QVideoFrameTextures got removed in 8117f791a9.
Pick-to: 6.5
Change-Id: Ia801d6d8bd7e59473f9d79e45bba96194f95ebec
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
|
| |
Q_LOGGING_CATEGORY is a macro with a function under the hood.
Since we're using it in cpp files, better to make it static in order to
get rid of extra public linking symbols.
Pick-to: 6.5
Change-Id: If384073993fdc70a2affab4bd3bf50c0c4129687
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
| |
Fixing it would be BIC, so has to wait until Qt 7
Change-Id: I05afee1b9228a826fccd56c791a9146e53622baf
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
|
|
| |
gstreamer implementation of QPlatformVideoSink emits signals to
QVideoSink on the call to unregisterSource(). This causes ASSERT
failure as QVideoSink is being destroyed at that time.
Disconnecting all signals from QVideSink before calling
unregisterSource() prevents this.
Pick-to: 6.5 6.4 6.2
Change-Id: I137bef89ec84e166b9d2c176680d4cde1abbdea2
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reason of the refactoring is following the common approach
that leads to reducing compilation time and binary size.
- logic hasn't been touched
- some headers have been decoupled into header and cpp
- the same refactorings of examples, tests, plugins
are coming in the next commits
Task-number: QTBUG-103290
Pick-to: 6.5 6.4
Change-Id: I6716cef5116769230c36e8d584d9ba6ec40aabb2
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
| |
Change-Id: Ia9c8964ce8671fcf384c5590b4fcb804a3e42915
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
| |
Pick-to: 6.4
Fixes: QTBUG-103238
Change-Id: I50b0bd74760c8b6f35e307e1580fc3ea7b57cd0d
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: Ieb825a93f62da4919986643ba6b7a2d8f1d05815
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds an option to report error message when a backend
component cannot be instantiated. This error message is then
displayed in the console with qWarning and in some cases reported
to the app user with error signals. We need further improvements
on the error reporting side.
Additionally, this patch cleans up the code in the .cpp API
classes.
Pick-to: 6.4
Change-Id: Id39865cc8f1e9b52804bf5b9d9b15e738508f860
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: I6e5f670e6becf14394b30157803c03f6b7864092
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: Ie581fb8b9618ea68e82f476dc54b3bce577e62c6
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
|
|
|
|
|
|
|
|
|
| |
Declaration of QMacAutoReleasePool will be moved from qglobal.h to
qcore_mac_p.h, so include qcore_mac_p.h where it's used.
Task-number: QTBUG-99313
Change-Id: I8f05ee9a4442391b0201710edf267b4d02da3b6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch was incorrect, as the shader-based conversion always
generates RGBA images, while the CPU-based conversion can generate
other formats. It caused, for instance, images to be captured from
the camera with the wrong colors. Also adjusting
tst_QVideoFrame::image() accordingly.
This reverts commit 80871c952a009be6b35a912d946d63b78d5d06b4.
Pick-to: 6.4
Change-Id: Iadfb9a391bb7a3290e604a8ac13803cb4f0d2e87
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
| |
This commit amends 05b505645ec41106174bab5dfa5a8a7dcca4553c and
44b1526cf98c23b0c8d5c82e48dad479944d7b00
Task-number: QTBUG-105513
Pick-to: 6.4
Change-Id: Ic1c217235b85e13f78d75e6fcb5bbb8d9968a8ab
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
| |
textureHandle and mapTextures should only be use internally
and we can get access to those from QAbstractVideoBuffer.
Change-Id: I9651bf65112d86b861b884af58a942feeeeb518e
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From API review:
- use consistent deprecation versions (6.4 vs. 6.0)
- QT_DEPRECATED_SINCE what's deprecated
Pick-to: 6.4
Change-Id: I48b80305637595962a9cdd61e139fa01d0fac827
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the QVideoFrameTextures class that holds textures
created for a given QRhi device and takes responsibiliy of cleaning
up after disposing of them. Exporting texture handlers as it was
implemented does not work as these are often not created for QRhi that
will use them.
For example, when calling QVideoFrame::toImage() and using HW
accelerated conversion, we have to generate a new set of texture handles
that are compatible with QRhi used for conversion. In parallel
a frame may be displayed using other QRhi that requires other set
of handles that are created specifically for it.
Change-Id: I73f99ca2c17207f403409228b933dd76671451c7
Task-number: QTBUG-105169
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
|
|
|
|
|
|
|
|
|
| |
When frame converter works with an OpenGL texture owned by foreign QRhi
it should set up its own QRhi to share OpenGL context with the foreign
QRhi. Otherwise, it will not have access to the texture data.
Change-Id: If4b424b436fe4b29f082dac92aabe3c6c27cd75e
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Add Q_PROPERTY macros for these properties so they can be
used from QML.
Fixes: QTBUG-104906
Pick-to: 6.4
Change-Id: I3ac20bdabbcb786b5686d0bf40ac9155dd956874
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The textures of QVideoFrames are consumed by a QRhi device that calls
textureHandle, or texture on the frame. However, this QRhi device
is not explicitly signalled to QVideoFrame when preparing the texutre.
Instead, QVideoFrame uses QRhi that it fetched from QMediaPlayer or
QMediaCaptureSession context related to QVideoSink. This should work
for most cases.
This patch explicitly states to which QRhi device QVideoFrame textures
should be mapped. This can be later used to execute or validate
the mapping, which is not a part of this patch.
Change-Id: I4e0301f4ebbc68ec6d482cf52dc40f10d59c7dce
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Ida08dfe6c84778656e942178c3d39042c9ef1ed2
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
The window must be set for QRhiSwapChain before calling
isFormatSupported.
Change-Id: I8be432c8d1d00f61480c7fa5e14e4a833841ec89
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
A pointer to the primary screen, which in GUI-less applications
is null, was being dereferenced without testing, resulting in a
crash when using the camera.
Pick-to: 6.3 6.2
Fixes: QTBUG-103394
Change-Id: Id891423bba585b474adab079521287677e8c8075
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qSwap() is a monster that looks for ADL overloads of swap() and also
detects the noexcept of the wrapped swap() function, so it should only
be used when the argument type is unknown. In the vast majority of
cases, the type is known to be efficiently std::swap()able or to have
a member-swap. Call either of these.
Task-number: QTBUG-97601
Pick-to: 6.3 6.2 5.15
Change-Id: Ida8402522bc980e871455d8fb21dddcf5b2dd384
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The size of the allocated QRhiBuffer's was smaller that the uniform
buffer that was copied into the QRhiBuffer after recent increase of
the uniform buffer size. This patch documents the buffer size and
layout using the UniformBuffer struct. This should prevent similar
errors in the future and improve documentation.
Change-Id: I8df2d8976e01ebc8c7017091c5a4fdeb18b0970e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The QImage constructor was always called in the same image format.
Therefore, the QImage with the same format was always returned.
Pick-to: 6.2 6.3
Fixes: QTBUG-99093
Change-Id: I5d34333f1de8486dd46155aecb9aea34c5722fc0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
|
|
|
|
|
|
|
| |
That adds the last missing bit to do correct YUV -> RGB conversions
for all supported video signals.
Change-Id: I0e50d0766e5f92bf52e562b0537368e077df9f66
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is much more in line with common naming in other places and also
a lot simpler. In addition, color spaces do define how RGB pixel values
are supposed to be interpreted as well.
Change-Id: Ia5e21a541deb17c8373c72293eca2f6b3c0299d4
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
| |
This value is required for the tonemapping for HDR videos. Pass it from
the video stream down to the video frame format and the shaders.
Change-Id: I5f555c3a03b6aab1858af3f9fb79a609a566d9aa
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
| |
Amends 72947171a99fbc592d2687894749fec70aa31b2d.
Change-Id: I204d3cf62ace01af1cb33259d1f481ca2e095991
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Videos that do not have a colorspace set can be encoded in either
BT601 or BT709 (giving slight color differences esp. for green
colors). The way most other players do the selection is to use
BT601 for SD content (less than 576 lines) and BT709 for HD
content.
See also https://forum.doom9.org/showthread.php?t=164378.
Change-Id: Ia9d1cfb636c83b26fb9118eb3348bbd751d50098
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add QVideoFrameFormat::colorRange, and expose the color range being
used in the video data.
Deprecate the full range color space enum values. This is much better
exposed through a separate property. As a drive by fix and clarify the
naming of the JPEG color space by renaming it to AdobeRgb.
Change-Id: Ifcdadcca41fdeade7d5ff2b80f59c135518d5d39
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Inline tone mapping as it is always required. And we can do the
required calculations in non linear (PQ/HLG) space before mapping to
linear. That way we avoid another back and forth conversion to and
from PQ.
Change-Id: If705cf6abaf6f04edeb6b878f0ee2793835c6285
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure we reformat HDR content with a gamma of 2.2 when rendering
to a SDR surface and linearize SDR video content when rendering to
HDR surfaces
This look very good for SDR content, but the tone mapping for
HDR->SDR could still be improved.
Change-Id: I330190e1d9dbfc50aa36b920477d01dde082cd94
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
| |
Add support for HDR videos using a hybrid log gamma transfer
function.
Change-Id: I844e688daa7d8db8aa727ce2bc8e182b12c8a41d
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a larger change adding various pieces required to properly
playback HEVC encoded HDR videos.
Those videos are usually encoded in the BT2020 color space, but have
a non linear transfer function (perceptual quantizer or hybrid log gamma)
that is required to properly map the encoded video data to linear space.
In addition, the resulting pixels need to be tonemapped back to the supported
range of the display, something we do using the algorithm defined in
BT2390-6.
Finally, we need to acquire a HDR enabled surface from RHI to be able to
properly render the final result to screen.
This is tested on macOS, where we now get very good rendering of HDR videos.
Some more work is required to implement support for HLG transfer functions,
rendering properly on SDR surfaces (where we need to apply an inverse gamma
transform) and to support more HDR pixel formats.
Change-Id: Ida180260622136ee1f9dc9ae19781c3529424ebc
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|
|
|
|
|
|
|
|
|
| |
We will need the full format there, as the shader to be used will be
dependent on the color space and transfer characteristics in addition
to the pixel format.
Change-Id: I8325642493a198a789feaefd86dbb9e002552bc5
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
|