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
80ce23da
Commit
80ce23da
authored
Oct 28, 2018
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi_encode_h265: Reduce SAR to valid range
Matching previous commit for H.264.
parent
a830056b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
vaapi_encode_h265.c
libavcodec/vaapi_encode_h265.c
+7
-5
No files found.
libavcodec/vaapi_encode_h265.c
View file @
80ce23da
...
...
@@ -472,18 +472,20 @@ static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
{
80
,
33
},
{
18
,
11
},
{
15
,
11
},
{
64
,
33
},
{
160
,
99
},
{
4
,
3
},
{
3
,
2
},
{
2
,
1
},
};
int
i
;
int
num
,
den
,
i
;
av_reduce
(
&
num
,
&
den
,
avctx
->
sample_aspect_ratio
.
num
,
avctx
->
sample_aspect_ratio
.
den
,
65535
);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
sar_idc
);
i
++
)
{
if
(
avctx
->
sample_aspect_ratio
.
num
==
sar_idc
[
i
].
num
&&
avctx
->
sample_aspect_ratio
.
den
==
sar_idc
[
i
].
den
)
{
if
(
num
==
sar_idc
[
i
].
num
&&
den
==
sar_idc
[
i
].
den
)
{
vui
->
aspect_ratio_idc
=
i
;
break
;
}
}
if
(
i
>=
FF_ARRAY_ELEMS
(
sar_idc
))
{
vui
->
aspect_ratio_idc
=
255
;
vui
->
sar_width
=
avctx
->
sample_aspect_ratio
.
num
;
vui
->
sar_height
=
avctx
->
sample_aspect_ratio
.
den
;
vui
->
sar_width
=
num
;
vui
->
sar_height
=
den
;
}
vui
->
aspect_ratio_info_present_flag
=
1
;
}
...
...
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