Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
d39485a7
Commit
d39485a7
authored
Jan 15, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Jan 15, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "calculate_modified_err() cleanup."
parents
2123c5d6
efdbd299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
vp9/encoder/vp9_firstpass.c
vp9/encoder/vp9_firstpass.c
+7
-15
No files found.
vp9/encoder/vp9_firstpass.c
View file @
d39485a7
...
...
@@ -49,9 +49,6 @@
#define DOUBLE_DIVIDE_CHECK(x) ((x) < 0 ? (x) - 0.000001 : (x) + 0.000001)
#define POW1 (double)cpi->oxcf.two_pass_vbrbias/100.0
#define POW2 (double)cpi->oxcf.two_pass_vbrbias/100.0
static
void
swap_yv12
(
YV12_BUFFER_CONFIG
*
a
,
YV12_BUFFER_CONFIG
*
b
)
{
YV12_BUFFER_CONFIG
temp
=
*
a
;
*
a
=
*
b
;
...
...
@@ -269,20 +266,15 @@ static void avg_stats(FIRSTPASS_STATS *section) {
// harder frames.
static
double
calculate_modified_err
(
VP9_COMP
*
cpi
,
FIRSTPASS_STATS
*
this_frame
)
{
const
FIRSTPASS_STATS
*
const
stats
=
&
cpi
->
twopass
.
total_stats
;
struct
twopass_rc
*
const
twopass
=
&
cpi
->
twopass
;
const
FIRSTPASS_STATS
*
const
stats
=
&
twopass
->
total_stats
;
const
double
av_err
=
stats
->
ssim_weighted_pred_err
/
stats
->
count
;
const
double
this_err
=
this_frame
->
ssim_weighted_pred_err
;
double
modified_error
;
modified_error
=
av_err
*
pow
(
this_err
/
DOUBLE_DIVIDE_CHECK
(
av_err
),
this_err
>
av_err
?
POW1
:
POW2
);
if
(
modified_error
<
cpi
->
twopass
.
modified_error_min
)
modified_error
=
cpi
->
twopass
.
modified_error_min
;
else
if
(
modified_error
>
cpi
->
twopass
.
modified_error_max
)
modified_error
=
cpi
->
twopass
.
modified_error_max
;
double
modified_error
=
av_err
*
pow
(
this_frame
->
ssim_weighted_pred_err
/
DOUBLE_DIVIDE_CHECK
(
av_err
),
cpi
->
oxcf
.
two_pass_vbrbias
/
100
.
0
);
return
modified_error
;
return
fclamp
(
modified_error
,
twopass
->
modified_error_min
,
twopass
->
modified_error_max
);
}
static
const
double
weight_table
[
256
]
=
{
...
...
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