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
8b75e45d
Commit
8b75e45d
authored
Jul 18, 2006
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync to x264 r537
Originally committed as revision 5780 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fd0fb306
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
x264.c
libavcodec/x264.c
+8
-3
No files found.
libavcodec/x264.c
View file @
8b75e45d
...
@@ -142,13 +142,18 @@ X264_init(AVCodecContext *avctx)
...
@@ -142,13 +142,18 @@ X264_init(AVCodecContext *avctx)
x4
->
params
.
rc
.
b_stat_write
=
(
avctx
->
flags
&
CODEC_FLAG_PASS1
);
x4
->
params
.
rc
.
b_stat_write
=
(
avctx
->
flags
&
CODEC_FLAG_PASS1
);
if
(
avctx
->
flags
&
CODEC_FLAG_PASS2
)
x4
->
params
.
rc
.
b_stat_read
=
1
;
if
(
avctx
->
flags
&
CODEC_FLAG_PASS2
)
x4
->
params
.
rc
.
b_stat_read
=
1
;
else
{
else
{
if
(
avctx
->
crf
)
x4
->
params
.
rc
.
i_rf_constant
=
avctx
->
crf
;
if
(
avctx
->
crf
){
else
if
(
avctx
->
cqp
>
-
1
)
x4
->
params
.
rc
.
i_qp_constant
=
avctx
->
cqp
;
x4
->
params
.
rc
.
i_rc_method
=
X264_RC_CRF
;
x4
->
params
.
rc
.
i_rf_constant
=
avctx
->
crf
;
}
else
if
(
avctx
->
cqp
>
-
1
){
x4
->
params
.
rc
.
i_rc_method
=
X264_RC_CQP
;
x4
->
params
.
rc
.
i_qp_constant
=
avctx
->
cqp
;
}
}
}
// if neither crf nor cqp modes are selected we have to enable the RC
// if neither crf nor cqp modes are selected we have to enable the RC
// we do it this way because we cannot check if the bitrate has been set
// we do it this way because we cannot check if the bitrate has been set
if
(
!
(
avctx
->
crf
||
(
avctx
->
cqp
>
-
1
)))
x4
->
params
.
rc
.
b_cbr
=
1
;
if
(
!
(
avctx
->
crf
||
(
avctx
->
cqp
>
-
1
)))
x4
->
params
.
rc
.
i_rc_method
=
X264_RC_ABR
;
x4
->
params
.
i_bframe
=
avctx
->
max_b_frames
;
x4
->
params
.
i_bframe
=
avctx
->
max_b_frames
;
x4
->
params
.
b_cabac
=
avctx
->
coder_type
==
FF_CODER_TYPE_AC
;
x4
->
params
.
b_cabac
=
avctx
->
coder_type
==
FF_CODER_TYPE_AC
;
...
...
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