diff options
author | Jim Bankoski <jimbankoski@google.com> | 2014-01-29 08:39:39 -0800 |
---|---|---|
committer | Jim Bankoski <jimbankoski@google.com> | 2014-01-29 08:39:39 -0800 |
commit | ea8aaf15b55a19f569c328f26cc8d8ad82a9235c (patch) | |
tree | e0d0308cf23b90b30eb360875751b326a3357363 /vp9/vp9_cx_iface.c | |
parent | 00bfacb769d95c89b361aa57a9f0da10bc2810a3 (diff) | |
download | libvpx-ea8aaf15b55a19f569c328f26cc8d8ad82a9235c.tar libvpx-ea8aaf15b55a19f569c328f26cc8d8ad82a9235c.tar.gz libvpx-ea8aaf15b55a19f569c328f26cc8d8ad82a9235c.tar.bz2 libvpx-ea8aaf15b55a19f569c328f26cc8d8ad82a9235c.zip |
create super fast rtc mode
This patch only works if the video is a width and height that are both
a multiple of 32.. It sets every partition to 16x16, and does INTRADC
only on the first frame and ZEROMV on every other frame. It always does
does the largest possible transform, and loop filter level is set to 4.
Was ~20% faster than speed -5 of vp8
Now 20% slower but adds motion search ( every block ), nearest, near
and zeromv
The SVC test was changed because - while this realtime mode produces
bad quality albeit quickly, it isn't obeying all the rules it should
about which frames are available.
Change-Id: I235c0b22573957986d41497dfb84568ec1dec8c7
Diffstat (limited to 'vp9/vp9_cx_iface.c')
-rw-r--r-- | vp9/vp9_cx_iface.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 897ecd702..6b181710e 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -563,10 +563,21 @@ static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx, unsigned int new_qc; /* Use best quality mode if no deadline is given. */ - if (deadline) - new_qc = MODE_GOODQUALITY; - else - new_qc = MODE_BESTQUALITY; + new_qc = MODE_BESTQUALITY; + + if (deadline) { + uint64_t duration_us; + + /* Convert duration parameter from stream timebase to microseconds */ + duration_us = (uint64_t)duration * 1000000 + * (uint64_t)ctx->cfg.g_timebase.num + / (uint64_t)ctx->cfg.g_timebase.den; + + /* If the deadline is more that the duration this frame is to be shown, + * use good quality mode. Otherwise use realtime mode. + */ + new_qc = (deadline > duration_us) ? MODE_GOODQUALITY : MODE_REALTIME; + } if (ctx->cfg.g_pass == VPX_RC_FIRST_PASS) new_qc = MODE_FIRSTPASS; |