Bug 453149 - Vectorscope colors R and B channel shown reversed.
Summary: Vectorscope colors R and B channel shown reversed.
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (show other bugs)
Version: 21.12.3
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: erjiang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-28 15:13 UTC by ArdaE
Modified: 2022-07-27 13:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.08
Sentry Crash Report:
fritzibaby: Brainstorm+


Attachments
white to red gradient shows as blue to white on vectorscope. (47.59 KB, image/jpeg)
2022-04-28 15:13 UTC, ArdaE
Details
red-white-colorscope.png (138.35 KB, image/png)
2022-06-23 02:52 UTC, erjiang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ArdaE 2022-04-28 15:13:16 UTC
Created attachment 148435 [details]
white to red gradient shows as blue to white on vectorscope.

SUMMARY
Vectorscope R and B channels are swapped. Graph shows wrong information.

STEPS TO REPRODUCE (tested on windows10)
1. eg. Generate a red color clip, put on timeline.
2.  open vectorscope from View > Vectorscope.
3. observe scope mark the red color as blue.
(bug is limited to generated-color-clips, applies to all video files)

OBSERVED RESULT
Scope mark towards blue instead of red.

EXPECTED RESULT
Scope mark towards red.

SOFTWARE/OS VERSIONS
Windows:  10 pro

ADDITIONAL INFORMATION
Comment 1 erjiang 2022-06-23 02:52:20 UTC
Created attachment 150079 [details]
red-white-colorscope.png

Wasn't able to repro this on Ubuntu 22.04 with Kdenlive 21.12.3 AppImage (screenshot attached). Vectorscope seems to show Red correctly.
Comment 2 emohr 2022-07-20 12:23:55 UTC
Here is a step by step instruction how to see the issue: Bug 455053. Maybe a Windows (Mac) issue only?
Comment 3 Bug Janitor Service 2022-07-23 05:25:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/kdenlive/-/merge_requests/330
Comment 4 Jean-Baptiste Mardelle 2022-07-25 11:31:48 UTC
Git commit 3f8105070aeedcf09adba716f79639fc63f72f96 by Jean-Baptiste Mardelle, on behalf of Eric Jiang.
Committed on 25/07/2022 at 11:13.
Pushed by mardelle into branch 'master'.

Change vectorscope to use QImage::pixel()

Vectorscope tried to directly reinterpret the input QImage as RGB
data, which makes an assumption that the input is RGB. On Windows, the
input QImage is BGR, causing red and blue to be switched in the
Vectorscope.

QImage::pixel() checks QImageData->format and converts the to QRgb
appropriately. Casual benchmarking seems to show that using pixel() is
about 5% slower for each vectorscope calculation in the no-conversion
case (e.g. Linux).

M  +13   -12   src/scopes/colorscopes/vectorscopegenerator.cpp

https://invent.kde.org/multimedia/kdenlive/commit/3f8105070aeedcf09adba716f79639fc63f72f96
Comment 5 Jean-Baptiste Mardelle 2022-07-27 11:48:04 UTC
Git commit e0f68346d015180a0ccce2fd740bb3598f359a4a by Jean-Baptiste Mardelle, on behalf of Eric Jiang.
Committed on 27/07/2022 at 11:47.
Pushed by mardelle into branch 'release/22.08'.

Change vectorscope to use QImage::pixel()

Vectorscope tried to directly reinterpret the input QImage as RGB
data, which makes an assumption that the input is RGB. On Windows, the
input QImage is BGR, causing red and blue to be switched in the
Vectorscope.

QImage::pixel() checks QImageData->format and converts the to QRgb
appropriately. Casual benchmarking seems to show that using pixel() is
about 5% slower for each vectorscope calculation in the no-conversion
case (e.g. Linux).

M  +13   -12   src/scopes/colorscopes/vectorscopegenerator.cpp

https://invent.kde.org/multimedia/kdenlive/commit/e0f68346d015180a0ccce2fd740bb3598f359a4a