Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
4ebded68
Commit
4ebded68
authored
Aug 26, 2015
by
Marco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp9_spatial_svc_encoder: Add encoding time log.
Change-Id: Iab4e4a13a65c9dc5314e5107b126c30667c7b448
parent
467c66e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
examples/vp9_spatial_svc_encoder.c
examples/vp9_spatial_svc_encoder.c
+10
-0
No files found.
examples/vp9_spatial_svc_encoder.c
View file @
4ebded68
...
...
@@ -25,6 +25,7 @@
#include "../tools_common.h"
#include "../video_writer.h"
#include "../vpx_ports/vpx_timer.h"
#include "vpx/svc_context.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
...
...
@@ -564,6 +565,8 @@ int main(int argc, const char **argv) {
double
sum_bitrate2
=
0
.
0
;
double
framerate
=
30
.
0
;
#endif
struct
vpx_usec_timer
timer
;
int64_t
cx_time
=
0
;
memset
(
&
svc_ctx
,
0
,
sizeof
(
svc_ctx
));
svc_ctx
.
log_print
=
1
;
exec_name
=
argv
[
0
];
...
...
@@ -643,9 +646,12 @@ int main(int argc, const char **argv) {
end_of_stream
=
1
;
}
vpx_usec_timer_start
(
&
timer
);
res
=
vpx_svc_encode
(
&
svc_ctx
,
&
codec
,
(
end_of_stream
?
NULL
:
&
raw
),
pts
,
frame_duration
,
svc_ctx
.
speed
>=
5
?
VPX_DL_REALTIME
:
VPX_DL_GOOD_QUALITY
);
vpx_usec_timer_mark
(
&
timer
);
cx_time
+=
vpx_usec_timer_elapsed
(
&
timer
);
printf
(
"%s"
,
vpx_svc_get_message
(
&
svc_ctx
));
if
(
res
!=
VPX_CODEC_OK
)
{
...
...
@@ -784,6 +790,10 @@ int main(int argc, const char **argv) {
}
}
#endif
printf
(
"Frame cnt and encoding time/FPS stats for encoding: %d %f %f
\n
"
,
frame_cnt
,
1000
*
(
float
)
cx_time
/
(
double
)(
frame_cnt
*
1000000
),
1000000
*
(
double
)
frame_cnt
/
(
double
)
cx_time
);
vpx_img_free
(
&
raw
);
// display average size, psnr
printf
(
"%s"
,
vpx_svc_dump_statistics
(
&
svc_ctx
));
...
...
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