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
5b5bb0d8
Commit
5b5bb0d8
authored
Oct 02, 2013
by
Marton Balint
Committed by
Paul B Mahol
Oct 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_histogram: fix segfault in parade waveform mode for subsampled formats
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
4c292d5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vf_histogram.c
libavfilter/vf_histogram.c
+4
-4
No files found.
libavfilter/vf_histogram.c
View file @
5b5bb0d8
...
...
@@ -183,15 +183,15 @@ static void gen_waveform(HistogramContext *h, AVFrame *inpicref, AVFrame *outpic
int
component
,
int
intensity
,
int
offset
,
int
col_mode
)
{
const
int
plane
=
h
->
desc
->
comp
[
component
].
plane
;
const
int
is_chroma
=
(
component
==
1
||
component
==
2
);
const
int
shift_w
=
(
is_chroma
?
h
->
desc
->
log2_chroma_w
:
0
);
const
int
shift_h
=
(
is_chroma
?
h
->
desc
->
log2_chroma_h
:
0
);
const
int
src_linesize
=
inpicref
->
linesize
[
plane
];
const
int
dst_linesize
=
outpicref
->
linesize
[
plane
];
uint8_t
*
src_data
=
inpicref
->
data
[
plane
];
uint8_t
*
dst_data
=
outpicref
->
data
[
plane
]
+
(
col_mode
?
offset
*
dst_linesize
:
offset
);
uint8_t
*
dst_data
=
outpicref
->
data
[
plane
]
+
(
col_mode
?
(
offset
>>
shift_h
)
*
dst_linesize
:
offset
>>
shift_w
);
uint8_t
*
const
dst_line
=
dst_data
;
const
uint8_t
max
=
255
-
intensity
;
const
int
is_chroma
=
(
component
==
1
||
component
==
2
);
const
int
shift_w
=
(
is_chroma
?
h
->
desc
->
log2_chroma_w
:
0
);
const
int
shift_h
=
(
is_chroma
?
h
->
desc
->
log2_chroma_h
:
0
);
const
int
src_h
=
FF_CEIL_RSHIFT
(
inpicref
->
height
,
shift_h
);
const
int
src_w
=
FF_CEIL_RSHIFT
(
inpicref
->
width
,
shift_w
);
uint8_t
*
dst
,
*
p
;
...
...
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