Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
3a146b81
Commit
3a146b81
authored
Jul 21, 2022
by
Eric Jiang
Committed by
Jean-Baptiste Mardelle
Jul 25, 2022
Browse files
Test histogram handling RGB/BGR
Histogram didn't have the red/blue switch bug to begin with.
parent
4157005e
Pipeline
#208799
passed with stage
in 9 minutes and 16 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
tests/colorscopestest.cpp
View file @
3a146b81
...
...
@@ -4,6 +4,7 @@
#include
"scopes/colorscopes/vectorscopegenerator.h"
#include
"scopes/colorscopes/waveformgenerator.h"
#include
"scopes/colorscopes/rgbparadegenerator.h"
#include
"scopes/colorscopes/histogramgenerator.h"
// test for a bug where pixels were assumed to be RGB which was not true on
// Windows, resulting in red and blue switched. BUG: 453149
...
...
@@ -59,4 +60,19 @@ TEST_CASE("Colorscope RGB/BGR handling")
CHECK
(
rgbScope
==
bgrScope
);
}
SECTION
(
"Histogram handles both RGB and BGR"
)
{
const
auto
ALL_COMPONENTS
=
HistogramGenerator
::
Components
::
ComponentR
|
HistogramGenerator
::
Components
::
ComponentG
|
HistogramGenerator
::
Components
::
ComponentB
;
HistogramGenerator
hist
{};
QImage
rgbScope
=
hist
.
calculateHistogram
(
scopeSize
,
inputImage
,
ALL_COMPONENTS
,
ITURec
::
Rec_709
,
false
,
false
,
3
);
QImage
bgrScope
=
hist
.
calculateHistogram
(
scopeSize
,
bgrInputImage
,
ALL_COMPONENTS
,
ITURec
::
Rec_709
,
false
,
false
,
3
);
CHECK
(
rgbScope
==
bgrScope
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment