diff options
author | Marco Paniconi <marpan@google.com> | 2018-05-29 15:50:00 -0700 |
---|---|---|
committer | Marco Paniconi <marpan@google.com> | 2018-05-29 19:31:23 -0700 |
commit | e1921294f90d036736bb6dec5868172420ca4c39 (patch) | |
tree | fab943cb581d8b5373352769a6c9b1a5091947cd /examples/vp9_spatial_svc_encoder.c | |
parent | 2b08f89076d1e93339fbbcc10e3298a0eec66bd6 (diff) | |
download | libvpx-e1921294f90d036736bb6dec5868172420ca4c39.tar libvpx-e1921294f90d036736bb6dec5868172420ca4c39.tar.gz libvpx-e1921294f90d036736bb6dec5868172420ca4c39.tar.bz2 libvpx-e1921294f90d036736bb6dec5868172420ca4c39.zip |
vp9-svc: Add frame dropper control to sample encoder.
Disabled as default as enc_cfg.rc_dropframe_thresh is
set to 0 as default.
Change-Id: Ia888aa16b1a86a716ec33ea041e8b16b19bf93be
Diffstat (limited to 'examples/vp9_spatial_svc_encoder.c')
-rw-r--r-- | examples/vp9_spatial_svc_encoder.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c index 091c6954d..3fd961bdc 100644 --- a/examples/vp9_spatial_svc_encoder.c +++ b/examples/vp9_spatial_svc_encoder.c @@ -622,6 +622,7 @@ int main(int argc, const char **argv) { vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t enc_cfg; SvcContext svc_ctx; + vpx_svc_frame_drop_t svc_drop_frame; uint32_t i; uint32_t frame_cnt = 0; vpx_image_t raw; @@ -732,6 +733,12 @@ int main(int argc, const char **argv) { vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0); + svc_drop_frame.framedrop_mode = FULL_SUPERFRAME_DROP; + for (sl = 0; sl < (unsigned int)svc_ctx.spatial_layers; ++sl) + svc_drop_frame.framedrop_thresh[sl] = enc_cfg.rc_dropframe_thresh; + svc_drop_frame.max_consec_drop = INT_MAX; + vpx_codec_control(&codec, VP9E_SET_SVC_FRAME_DROP_LAYER, &svc_drop_frame); + // Encode frames while (!end_of_stream) { vpx_codec_iter_t iter = NULL; |