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
1215fbad
Commit
1215fbad
authored
Sep 24, 2018
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h265_profile_level: Fix level guessing with no PTL structure
Fixes CID #1439661.
parent
feb1cf08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
h265_profile_level.c
libavcodec/h265_profile_level.c
+8
-4
No files found.
libavcodec/h265_profile_level.c
View file @
1215fbad
...
...
@@ -175,7 +175,7 @@ const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *pt
int
max_dec_pic_buffering
)
{
const
H265ProfileDescriptor
*
profile
;
int
pic_size
,
hbr_factor
;
int
pic_size
,
lbr_flag
,
hbr_factor
;
int
i
;
if
(
ptl
)
...
...
@@ -189,15 +189,19 @@ const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *pt
pic_size
=
width
*
height
;
if
(
ptl
)
lbr_flag
=
ptl
->
general_lower_bit_rate_constraint_flag
;
else
lbr_flag
=
profile
->
lower_bit_rate
>
0
;
if
(
profile
->
profile_idc
==
1
||
profile
->
profile_idc
==
2
)
{
hbr_factor
=
1
;
}
else
if
(
profile
->
high_throughput
)
{
if
(
profile
->
intra
)
hbr_factor
=
24
-
12
*
ptl
->
general_lower_bit_rate_constraint
_flag
;
hbr_factor
=
24
-
12
*
lbr
_flag
;
else
hbr_factor
=
6
;
}
else
{
hbr_factor
=
2
-
ptl
->
general_lower_bit_rate_constraint
_flag
;
hbr_factor
=
2
-
lbr
_flag
;
}
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
h265_levels
);
i
++
)
{
...
...
@@ -218,7 +222,7 @@ const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *pt
if
(
tile_cols
>
level
->
max_tile_cols
)
continue
;
if
(
ptl
->
general_tier_flag
)
if
(
ptl
&&
ptl
->
general_tier_flag
)
max_br
=
level
->
max_br_high
;
else
max_br
=
level
->
max_br_main
;
...
...
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