Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
edadda96
Commit
edadda96
authored
Oct 01, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_histogram: change order of histograms for planar rgb
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
cac9af68
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
filters.texi
doc/filters.texi
+1
-1
vf_histogram.c
libavfilter/vf_histogram.c
+4
-3
No files found.
doc/filters.texi
View file @
edadda96
...
...
@@ -4698,7 +4698,7 @@ It accepts the following values:
@item levels
standard histogram that display color components distribution in an image.
Displays color graph for each color component. Shows distribution
of the Y, U, V, A or
G, B, R
components, depending on input format,
of the Y, U, V, A or
R, G, B
components, depending on input format,
in current frame. Bellow each graph is color component scale meter.
@item color
...
...
libavfilter/vf_histogram.c
View file @
edadda96
...
...
@@ -248,12 +248,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
switch
(
h
->
mode
)
{
case
MODE_LEVELS
:
for
(
k
=
0
;
k
<
h
->
ncomp
;
k
++
)
{
const
int
p
=
h
->
desc
->
comp
[
k
].
plane
;
int
start
=
k
*
(
h
->
level_height
+
h
->
scale_height
)
*
h
->
display_mode
;
double
max_hval_log
;
unsigned
max_hval
=
0
;
for
(
i
=
0
;
i
<
in
->
height
;
i
++
)
{
src
=
in
->
data
[
k
]
+
i
*
in
->
linesize
[
k
];
src
=
in
->
data
[
p
]
+
i
*
in
->
linesize
[
p
];
for
(
j
=
0
;
j
<
in
->
width
;
j
++
)
h
->
histogram
[
src
[
j
]]
++
;
}
...
...
@@ -275,11 +276,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for
(
l
=
0
;
l
<
h
->
ncomp
;
l
++
)
out
->
data
[
l
][(
j
+
start
)
*
out
->
linesize
[
l
]
+
i
]
=
h
->
fg_color
[
l
];
}
else
{
out
->
data
[
k
][(
j
+
start
)
*
out
->
linesize
[
k
]
+
i
]
=
255
;
out
->
data
[
p
][(
j
+
start
)
*
out
->
linesize
[
p
]
+
i
]
=
255
;
}
}
for
(
j
=
h
->
level_height
+
h
->
scale_height
-
1
;
j
>=
h
->
level_height
;
j
--
)
out
->
data
[
k
][(
j
+
start
)
*
out
->
linesize
[
k
]
+
i
]
=
i
;
out
->
data
[
p
][(
j
+
start
)
*
out
->
linesize
[
p
]
+
i
]
=
i
;
}
memset
(
h
->
histogram
,
0
,
256
*
sizeof
(
unsigned
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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