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
b799ec7e
Commit
b799ec7e
authored
Dec 15, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hevc: Print an error if luma_log2_weight_denom is out of range
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
241943d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
hevc.c
libavcodec/hevc.c
+5
-1
No files found.
libavcodec/hevc.c
View file @
b799ec7e
...
...
@@ -143,8 +143,12 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb)
uint8_t
chroma_weight_l0_flag
[
16
];
uint8_t
luma_weight_l1_flag
[
16
];
uint8_t
chroma_weight_l1_flag
[
16
];
int
luma_log2_weight_denom
;
s
->
sh
.
luma_log2_weight_denom
=
av_clip_c
(
get_ue_golomb_long
(
gb
),
0
,
7
);
luma_log2_weight_denom
=
get_ue_golomb_long
(
gb
);
if
(
luma_log2_weight_denom
<
0
||
luma_log2_weight_denom
>
7
)
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"luma_log2_weight_denom %d is invalid
\n
"
,
luma_log2_weight_denom
);
s
->
sh
.
luma_log2_weight_denom
=
av_clip_c
(
luma_log2_weight_denom
,
0
,
7
);
if
(
s
->
sps
->
chroma_format_idc
!=
0
)
{
int
delta
=
get_se_golomb
(
gb
);
s
->
sh
.
chroma_log2_weight_denom
=
av_clip
(
s
->
sh
.
luma_log2_weight_denom
+
delta
,
0
,
7
);
...
...
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