summaryrefslogtreecommitdiff
path: root/modules/vp9/encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/vp9/encode.c')
-rw-r--r--modules/vp9/encode.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/modules/vp9/encode.c b/modules/vp9/encode.c
index 7e81b51..faef958 100644
--- a/modules/vp9/encode.c
+++ b/modules/vp9/encode.c
@@ -33,25 +33,23 @@ struct videnc_state {
unsigned n_frames;
unsigned n_key_frames;
size_t n_bytes;
-
- uint64_t ts_start;
};
static void destructor(void *arg)
{
struct videnc_state *ves = arg;
- uint64_t now = tmr_jiffies();
- re_printf("vp9: encoder: total frames %u, total bytes %zu\n",
- ves->n_frames, ves->n_bytes);
- re_printf(" key frames %u\n", ves->n_key_frames);
+ if (ves->ctxup) {
- re_printf(" average frame rate: %.1f fps\n",
- ves->n_frames / (.001 * (now - ves->ts_start)));
+ debug("vp9: encoder stats:"
+ " frames=%u, key_frames=%u, bytes=%zu\n",
+ ves->n_frames,
+ ves->n_key_frames,
+ ves->n_bytes);
- if (ves->ctxup)
vpx_codec_destroy(&ves->ctx);
+ }
}
@@ -132,9 +130,6 @@ static int open_encoder(struct videnc_state *ves, const struct vidsz *size)
cfg.g_bit_depth = 8;
cfg.g_input_bit_depth = 8;
- re_printf("vp9: encoder: rc_target_bitrate %d\n",
- cfg.rc_target_bitrate);
-
if (ves->ctxup) {
debug("vp9: re-opening encoder\n");
vpx_codec_destroy(&ves->ctx);
@@ -245,8 +240,6 @@ int vp9_encode(struct videnc_state *ves, bool update,
return err;
ves->size = frame->size;
-
- ves->ts_start = tmr_jiffies();
}
++ves->n_frames;