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
c695ca3b
Commit
c695ca3b
authored
Aug 25, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing qmin==qmax && qsquish==1
Originally committed as revision 865 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d0d816d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ratecontrol.c
libavcodec/ratecontrol.c
+4
-2
No files found.
libavcodec/ratecontrol.c
View file @
c695ca3b
...
...
@@ -387,7 +387,7 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q,
}
}
if
(
s
->
avctx
->
rc_qsquish
==
0
.
0
){
if
(
s
->
avctx
->
rc_qsquish
==
0
.
0
||
qmin
==
qmax
){
if
(
q
<
qmin
)
q
=
qmin
;
else
if
(
q
>
qmax
)
q
=
qmax
;
}
else
{
...
...
@@ -517,12 +517,12 @@ int ff_rate_estimate_qscale(MpegEncContext *s)
q
=
get_qscale
(
s
,
rce
,
rate_factor
,
picture_number
);
assert
(
q
>
0
.
0
);
//printf("%f ", q);
if
(
pict_type
==
I_TYPE
&&
s
->
avctx
->
i_quant_factor
>
0
.
0
)
q
=
rcc
->
next_p_qscale
*
s
->
avctx
->
i_quant_factor
+
s
->
avctx
->
i_quant_offset
;
else
if
(
pict_type
==
B_TYPE
&&
s
->
avctx
->
b_quant_factor
>
0
.
0
)
q
=
rcc
->
next_non_b_qscale
*
s
->
avctx
->
b_quant_factor
+
s
->
avctx
->
b_quant_offset
;
//printf("%f ", q);
assert
(
q
>
0
.
0
);
...
...
@@ -540,6 +540,8 @@ int ff_rate_estimate_qscale(MpegEncContext *s)
rcc
->
pass1_wanted_bits
+=
s
->
bit_rate
/
fps
;
assert
(
q
>
0
.
0
);
if
(
pict_type
!=
B_TYPE
)
rcc
->
next_non_b_qscale
=
q
;
if
(
pict_type
==
P_TYPE
)
rcc
->
next_p_qscale
=
q
;
}
...
...
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