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
23e54f69
Commit
23e54f69
authored
Sep 29, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming variable
Originally committed as revision 981 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2ad1516a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
ratecontrol.c
libavcodec/ratecontrol.c
+4
-4
No files found.
libavcodec/mpegvideo.h
View file @
23e54f69
...
...
@@ -76,7 +76,7 @@ typedef struct RateControlContext{
Predictor
pred
[
5
];
double
short_term_qsum
;
/* sum of recent qscales */
double
short_term_qcount
;
/* count of recent qscales */
double
pass1_
bits
;
/* bits outputted by the pass1 code (including complexity init)
*/
double
pass1_
rc_eq_output_sum
;
/* sum of the output of the rc equation, this is used for normalization
*/
double
pass1_wanted_bits
;
/* bits which should have been outputed by the pass1 code (including complexity init) */
double
last_qscale
;
double
last_qscale_for
[
5
];
/* last qscale for a specific pict type, used for max_diff & ipb factor stuff */
...
...
libavcodec/ratecontrol.c
View file @
23e54f69
...
...
@@ -123,7 +123,7 @@ int ff_rate_control_init(MpegEncContext *s)
rcc
->
short_term_qsum
=
0
.
001
;
rcc
->
short_term_qcount
=
0
.
001
;
rcc
->
pass1_
bits
=
0
.
001
;
rcc
->
pass1_
rc_eq_output_sum
=
0
.
001
;
rcc
->
pass1_wanted_bits
=
0
.
001
;
/* init stuff with the user specified complexity */
...
...
@@ -163,7 +163,7 @@ int ff_rate_control_init(MpegEncContext *s)
bits
=
rce
.
i_tex_bits
+
rce
.
p_tex_bits
;
q
=
get_qscale
(
s
,
&
rce
,
rcc
->
pass1_wanted_bits
/
rcc
->
pass1_
bits
,
i
);
q
=
get_qscale
(
s
,
&
rce
,
rcc
->
pass1_wanted_bits
/
rcc
->
pass1_
rc_eq_output_sum
,
i
);
rcc
->
pass1_wanted_bits
+=
s
->
bit_rate
/
(
s
->
frame_rate
/
(
double
)
FRAME_RATE_BASE
);
}
}
...
...
@@ -296,7 +296,7 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f
bits
=
ff_eval
(
s
->
avctx
->
rc_eq
,
const_values
,
const_names
,
func1
,
func1_names
,
NULL
,
NULL
,
rce
);
rcc
->
pass1_
bits
+=
bits
;
rcc
->
pass1_
rc_eq_output_sum
+=
bits
;
bits
*=
rate_factor
;
if
(
bits
<
0
.
0
)
bits
=
0
.
0
;
bits
+=
1
.
0
;
//avoid 1/0 issues
...
...
@@ -628,7 +628,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s)
rcc
->
frame_count
[
pict_type
]
++
;
bits
=
rce
->
i_tex_bits
+
rce
->
p_tex_bits
;
rate_factor
=
rcc
->
pass1_wanted_bits
/
rcc
->
pass1_
bits
*
br_compensation
;
rate_factor
=
rcc
->
pass1_wanted_bits
/
rcc
->
pass1_
rc_eq_output_sum
*
br_compensation
;
q
=
get_qscale
(
s
,
rce
,
rate_factor
,
picture_number
);
...
...
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