diff options
Diffstat (limited to 'toxav/codec.c')
-rw-r--r-- | toxav/codec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toxav/codec.c b/toxav/codec.c index 772b0a9d..f3d24969 100644 --- a/toxav/codec.c +++ b/toxav/codec.c | |||
@@ -220,6 +220,11 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t | |||
220 | cfg.rc_target_bitrate = video_bitrate; | 220 | cfg.rc_target_bitrate = video_bitrate; |
221 | cfg.g_w = width; | 221 | cfg.g_w = width; |
222 | cfg.g_h = height; | 222 | cfg.g_h = height; |
223 | cfg.g_pass = VPX_RC_ONE_PASS; | ||
224 | cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT | VPX_ERROR_RESILIENT_PARTITIONS; | ||
225 | cfg.g_lag_in_frames = 0; | ||
226 | cfg.kf_min_dist = 0; | ||
227 | cfg.kf_max_dist = 300; | ||
223 | 228 | ||
224 | rc = vpx_codec_enc_init_ver(&cs->v_encoder, VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0, VPX_ENCODER_ABI_VERSION); | 229 | rc = vpx_codec_enc_init_ver(&cs->v_encoder, VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0, VPX_ENCODER_ABI_VERSION); |
225 | 230 | ||
@@ -228,6 +233,7 @@ int init_video_encoder(CodecState *cs, uint16_t width, uint16_t height, uint32_t | |||
228 | return -1; | 233 | return -1; |
229 | } | 234 | } |
230 | 235 | ||
236 | rc = vpx_codec_control(&cs->v_encoder, VP8E_SET_CPUUSED, 7); | ||
231 | return 0; | 237 | return 0; |
232 | } | 238 | } |
233 | 239 | ||