Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
382470db
Commit
382470db
authored
Jan 14, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Jan 14, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Removing unnecessary casts + cleanup."
parents
970e9457
88798447
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
38 deletions
+28
-38
vp9/encoder/vp9_firstpass.c
vp9/encoder/vp9_firstpass.c
+28
-38
No files found.
vp9/encoder/vp9_firstpass.c
View file @
382470db
...
...
@@ -793,58 +793,48 @@ void vp9_first_pass(VP9_COMP *cpi) {
vp9_clear_system_state
();
// __asm emms;
{
double
weight
=
0
.
0
;
FIRSTPASS_STATS
fps
;
fps
.
frame
=
cm
->
current_video_frame
;
fps
.
intra_error
=
(
double
)(
intra_error
>>
8
);
fps
.
coded_error
=
(
double
)(
coded_error
>>
8
);
fps
.
sr_coded_error
=
(
double
)(
sr_coded_error
>>
8
);
weight
=
simple_weight
(
cpi
->
Source
);
if
(
weight
<
0
.
1
)
weight
=
0
.
1
;
fps
.
ssim_weighted_pred_err
=
fps
.
coded_error
*
weight
;
fps
.
pcnt_inter
=
0
.
0
;
fps
.
frame
=
cm
->
current_video_frame
;
fps
.
intra_error
=
intra_error
>>
8
;
fps
.
coded_error
=
coded_error
>>
8
;
fps
.
sr_coded_error
=
sr_coded_error
>>
8
;
fps
.
ssim_weighted_pred_err
=
fps
.
coded_error
*
MAX
(
0
.
1
,
simple_weight
(
cpi
->
Source
));
fps
.
pcnt_inter
=
0
.
0
;
fps
.
pcnt_motion
=
0
.
0
;
fps
.
MVr
=
0
.
0
;
fps
.
mvr_abs
=
0
.
0
;
fps
.
MVc
=
0
.
0
;
fps
.
mvc_abs
=
0
.
0
;
fps
.
MVrv
=
0
.
0
;
fps
.
MVcv
=
0
.
0
;
fps
.
mv_in_out_count
=
0
.
0
;
fps
.
MVr
=
0
.
0
;
fps
.
mvr_abs
=
0
.
0
;
fps
.
MVc
=
0
.
0
;
fps
.
mvc_abs
=
0
.
0
;
fps
.
MVrv
=
0
.
0
;
fps
.
MVcv
=
0
.
0
;
fps
.
mv_in_out_count
=
0
.
0
;
fps
.
new_mv_count
=
0
.
0
;
fps
.
count
=
1
.
0
;
fps
.
count
=
1
.
0
;
fps
.
pcnt_inter
=
1
.
0
*
(
double
)
intercount
/
cm
->
MBs
;
fps
.
pcnt_second_ref
=
1
.
0
*
(
double
)
second_ref_count
/
cm
->
MBs
;
fps
.
pcnt_neutral
=
1
.
0
*
(
double
)
neutral_count
/
cm
->
MBs
;
fps
.
pcnt_inter
=
(
double
)
intercount
/
cm
->
MBs
;
fps
.
pcnt_second_ref
=
(
double
)
second_ref_count
/
cm
->
MBs
;
fps
.
pcnt_neutral
=
(
double
)
neutral_count
/
cm
->
MBs
;
if
(
mvcount
>
0
)
{
fps
.
MVr
=
(
double
)
sum_mvr
/
(
double
)
mvcount
;
fps
.
mvr_abs
=
(
double
)
sum_mvr_abs
/
(
double
)
mvcount
;
fps
.
MVc
=
(
double
)
sum_mvc
/
(
double
)
mvcount
;
fps
.
mvc_abs
=
(
double
)
sum_mvc_abs
/
(
double
)
mvcount
;
fps
.
MVrv
=
((
double
)
sum_mvrs
-
(
fps
.
MVr
*
fps
.
MVr
/
(
double
)
mvcount
))
/
(
double
)
mvcount
;
fps
.
MVcv
=
((
double
)
sum_mvcs
-
(
fps
.
MVc
*
fps
.
MVc
/
(
double
)
mvcount
))
/
(
double
)
mvcount
;
fps
.
mv_in_out_count
=
(
double
)
sum_in_vectors
/
(
double
)
(
mvcount
*
2
);
fps
.
MVr
=
(
double
)
sum_mvr
/
mvcount
;
fps
.
mvr_abs
=
(
double
)
sum_mvr_abs
/
mvcount
;
fps
.
MVc
=
(
double
)
sum_mvc
/
mvcount
;
fps
.
mvc_abs
=
(
double
)
sum_mvc_abs
/
mvcount
;
fps
.
MVrv
=
((
double
)
sum_mvrs
-
(
fps
.
MVr
*
fps
.
MVr
/
mvcount
))
/
mvcount
;
fps
.
MVcv
=
((
double
)
sum_mvcs
-
(
fps
.
MVc
*
fps
.
MVc
/
mvcount
))
/
mvcount
;
fps
.
mv_in_out_count
=
(
double
)
sum_in_vectors
/
(
mvcount
*
2
);
fps
.
new_mv_count
=
new_mv_count
;
fps
.
pcnt_motion
=
1
.
0
*
(
double
)
mvcount
/
cpi
->
common
.
MBs
;
}
// TODO(paulwilkins): Handle the case when duration is set to 0, or
// something less than the full time between subsequent values of
// cpi->source_time_stamp.
fps
.
duration
=
(
double
)(
cpi
->
source
->
ts_end
-
cpi
->
source
->
ts_start
);
fps
.
duration
=
(
double
)(
cpi
->
source
->
ts_end
-
cpi
->
source
->
ts_start
);
// don't want to do output stats with a stack variable!
cpi
->
twopass
.
this_frame_stats
=
fps
;
...
...
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