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
d80f243a
Commit
d80f243a
authored
Sep 27, 2006
by
Panagiotis Issaris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ratecontrol use ff_eval2().
Originally committed as revision 6354 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0c630922
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
mpegvideo.h
libavcodec/mpegvideo.h
+6
-0
ratecontrol.c
libavcodec/ratecontrol.c
+3
-2
No files found.
libavcodec/mpegvideo.h
View file @
d80f243a
...
...
@@ -991,10 +991,16 @@ int ff_rate_control_init(MpegEncContext *s);
float
ff_rate_estimate_qscale
(
MpegEncContext
*
s
,
int
dry_run
);
void
ff_write_pass1_stats
(
MpegEncContext
*
s
);
void
ff_rate_control_uninit
(
MpegEncContext
*
s
);
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
double
ff_eval
(
char
*
s
,
double
*
const_value
,
const
char
**
const_name
,
double
(
**
func1
)(
void
*
,
double
),
const
char
**
func1_name
,
double
(
**
func2
)(
void
*
,
double
,
double
),
char
**
func2_name
,
void
*
opaque
);
#endif
double
ff_eval2
(
char
*
s
,
double
*
const_value
,
const
char
**
const_name
,
double
(
**
func1
)(
void
*
,
double
),
const
char
**
func1_name
,
double
(
**
func2
)(
void
*
,
double
,
double
),
char
**
func2_name
,
void
*
opaque
,
char
**
error
);
int
ff_vbv_update
(
MpegEncContext
*
s
,
int
frame_size
);
void
ff_get_2pass_fcode
(
MpegEncContext
*
s
);
...
...
libavcodec/ratecontrol.c
View file @
d80f243a
...
...
@@ -259,6 +259,7 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f
const
int
pict_type
=
rce
->
new_pict_type
;
const
double
mb_num
=
s
->
mb_num
;
int
i
;
char
*
error
=
NULL
;
double
const_values
[]
=
{
M_PI
,
...
...
@@ -325,9 +326,9 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f
NULL
};
bits
=
ff_eval
(
s
->
avctx
->
rc_eq
,
const_values
,
const_names
,
func1
,
func1_names
,
NULL
,
NULL
,
rce
);
bits
=
ff_eval
2
(
s
->
avctx
->
rc_eq
,
const_values
,
const_names
,
func1
,
func1_names
,
NULL
,
NULL
,
rce
,
&
error
);
if
(
isnan
(
bits
))
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"
Unable to parse rc_eq
\"
%s
\"
.
\n
"
,
s
->
avctx
->
rc_eq
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"
Error evaluating rc_eq
\"
%s
\"
: %s
\n
"
,
s
->
avctx
->
rc_eq
,
error
?
error
:
""
);
return
-
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