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
e98ab799
Commit
e98ab799
authored
Jul 03, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vaapi_encode_h264: Use av_clip_uintp2()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
fd6dbc53
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vaapi_encode_h264.c
libavcodec/vaapi_encode_h264.c
+2
-2
No files found.
libavcodec/vaapi_encode_h264.c
View file @
e98ab799
...
@@ -861,12 +861,12 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
...
@@ -861,12 +861,12 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
// Try to scale these to a sensible range so that the
// Try to scale these to a sensible range so that the
// golomb encode of the value is not overlong.
// golomb encode of the value is not overlong.
mseq
->
bit_rate_scale
=
mseq
->
bit_rate_scale
=
av_clip
(
av_log2
(
avctx
->
bit_rate
)
-
15
,
0
,
15
);
av_clip
_uintp2
(
av_log2
(
avctx
->
bit_rate
)
-
15
,
4
);
mseq
->
bit_rate_value_minus1
[
0
]
=
mseq
->
bit_rate_value_minus1
[
0
]
=
(
avctx
->
bit_rate
>>
mseq
->
bit_rate_scale
)
-
1
;
(
avctx
->
bit_rate
>>
mseq
->
bit_rate_scale
)
-
1
;
mseq
->
cpb_size_scale
=
mseq
->
cpb_size_scale
=
av_clip
(
av_log2
(
priv
->
hrd_params
.
hrd
.
buffer_size
)
-
15
,
0
,
15
);
av_clip
_uintp2
(
av_log2
(
priv
->
hrd_params
.
hrd
.
buffer_size
)
-
15
,
4
);
mseq
->
cpb_size_value_minus1
[
0
]
=
mseq
->
cpb_size_value_minus1
[
0
]
=
(
priv
->
hrd_params
.
hrd
.
buffer_size
>>
mseq
->
cpb_size_scale
)
-
1
;
(
priv
->
hrd_params
.
hrd
.
buffer_size
>>
mseq
->
cpb_size_scale
)
-
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