summaryrefslogtreecommitdiff
path: root/vp8/vp8_cx_iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/vp8_cx_iface.c')
-rw-r--r--vp8/vp8_cx_iface.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index 8f0a782bc..d3e200594 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -802,7 +802,20 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
unsigned long deadline) {
vpx_codec_err_t res = VPX_CODEC_OK;
- if (!ctx->cfg.rc_target_bitrate) return res;
+ if (!ctx->cfg.rc_target_bitrate) {
+#if CONFIG_MULTI_RES_ENCODING
+ if (!ctx->cpi) return VPX_CODEC_ERROR;
+ if (ctx->cpi->oxcf.mr_total_resolutions > 1) {
+ LOWER_RES_FRAME_INFO *low_res_frame_info =
+ (LOWER_RES_FRAME_INFO *)ctx->cpi->oxcf.mr_low_res_mode_info;
+ if (!low_res_frame_info) return VPX_CODEC_ERROR;
+ low_res_frame_info->skip_encoding_prev_stream = 1;
+ if (ctx->cpi->oxcf.mr_encoder_id == 0)
+ low_res_frame_info->skip_encoding_base_stream = 1;
+ }
+#endif
+ return res;
+ }
if (img) res = validate_img(ctx, img);
@@ -902,8 +915,8 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
(unsigned long)((delta * ctx->cfg.g_timebase.den + round) /
ctx->cfg.g_timebase.num / 10000000);
pkt.data.frame.flags = lib_flags << 16;
- pkt.data.frame.width = cpi->common.Width;
- pkt.data.frame.height = cpi->common.Height;
+ pkt.data.frame.width[0] = cpi->common.Width;
+ pkt.data.frame.height[0] = cpi->common.Height;
if (lib_flags & FRAMEFLAGS_KEY) {
pkt.data.frame.flags |= VPX_FRAME_IS_KEY;
@@ -1261,6 +1274,9 @@ CODEC_INTERFACE(vpx_codec_vp8_cx) = {
vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t cfg_maps; */
vp8e_encode, /* vpx_codec_encode_fn_t encode; */
vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t get_cx_data; */
- vp8e_set_config, NULL, vp8e_get_preview, vp8e_mr_alloc_mem,
+ vp8e_set_config,
+ NULL,
+ vp8e_get_preview,
+ vp8e_mr_alloc_mem,
} /* encoder functions */
};