Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libvpx
Project
Project
Details
Activity
Releases
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
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
external
libvpx
Commits
8d7cd8e7
Commit
8d7cd8e7
authored
Feb 05, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Feb 05, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Removing unused estimate_cq() function."
parents
96cabf8d
e8294873
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
vp9_firstpass.c
vp9/encoder/vp9_firstpass.c
+0
-52
No files found.
vp9/encoder/vp9_firstpass.c
View file @
8d7cd8e7
...
...
@@ -936,58 +936,6 @@ static int estimate_max_q(VP9_COMP *cpi, FIRSTPASS_STATS *fpstats,
return
q
;
}
// For cq mode estimate a cq level that matches the observed
// complexity and data rate.
static
int
estimate_cq
(
VP9_COMP
*
cpi
,
FIRSTPASS_STATS
*
fpstats
,
int
section_target_bandwitdh
)
{
int
q
;
int
num_mbs
=
cpi
->
common
.
MBs
;
int
target_norm_bits_per_mb
;
double
section_err
=
(
fpstats
->
coded_error
/
fpstats
->
count
);
double
err_per_mb
=
section_err
/
num_mbs
;
double
err_correction_factor
;
double
clip_iiratio
;
double
clip_iifactor
;
target_norm_bits_per_mb
=
(
section_target_bandwitdh
<
(
1
<<
20
))
?
(
512
*
section_target_bandwitdh
)
/
num_mbs
:
512
*
(
section_target_bandwitdh
/
num_mbs
);
// II ratio correction factor for clip as a whole
clip_iiratio
=
cpi
->
twopass
.
total_stats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
cpi
->
twopass
.
total_stats
.
coded_error
);
clip_iifactor
=
1
.
0
-
((
clip_iiratio
-
10
.
0
)
*
0
.
025
);
if
(
clip_iifactor
<
0
.
80
)
clip_iifactor
=
0
.
80
;
// Try and pick a Q that can encode the content at the given rate.
for
(
q
=
0
;
q
<
MAXQ
;
q
++
)
{
int
bits_per_mb_at_this_q
;
// Error per MB based correction factor
err_correction_factor
=
calc_correction_factor
(
err_per_mb
,
100
.
0
,
0
.
5
,
0
.
90
,
q
)
*
clip_iifactor
;
bits_per_mb_at_this_q
=
vp9_rc_bits_per_mb
(
INTER_FRAME
,
q
,
err_correction_factor
);
if
(
bits_per_mb_at_this_q
<=
target_norm_bits_per_mb
)
break
;
}
// Clip value to range "best allowed to (worst allowed - 1)"
q
=
select_cq_level
(
q
);
if
(
q
>=
cpi
->
rc
.
worst_quality
)
q
=
cpi
->
rc
.
worst_quality
-
1
;
if
(
q
<
cpi
->
rc
.
best_quality
)
q
=
cpi
->
rc
.
best_quality
;
return
q
;
}
extern
void
vp9_new_framerate
(
VP9_COMP
*
cpi
,
double
framerate
);
void
vp9_init_second_pass
(
VP9_COMP
*
cpi
)
{
...
...
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