From 2c2fea2c5bab1761de6ad36c93e030a395a3e77e Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Mon, 22 Jan 2018 15:34:59 -0800 Subject: Fix frame sizes in pkt to support spatial layers. Add test for svc frame sizes in pkt. BUG=webm:1485 Change-Id: I983dc229e526d72d22360d7f3016d8358d6beae7 --- vp9/vp9_cx_iface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vp9/vp9_cx_iface.c') diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 5bfe9aa05..3778c5a16 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -1234,6 +1234,8 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, ctx->pending_frame_magnitude |= size; cx_data += size; cx_data_sz -= size; + pkt.data.frame.width[cpi->svc.spatial_layer_id] = cpi->common.width; + pkt.data.frame.height[cpi->svc.spatial_layer_id] = cpi->common.height; if (ctx->output_cx_pkt_cb.output_cx_pkt) { pkt.kind = VPX_CODEC_CX_FRAME_PKT; @@ -1260,8 +1262,8 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, pkt.data.frame.duration = (unsigned long)ticks_to_timebase_units( timebase, dst_end_time_stamp - dst_time_stamp); pkt.data.frame.flags = get_frame_pkt_flags(cpi, lib_flags); - pkt.data.frame.width = cpi->common.width; - pkt.data.frame.height = cpi->common.height; + pkt.data.frame.width[cpi->svc.spatial_layer_id] = cpi->common.width; + pkt.data.frame.height[cpi->svc.spatial_layer_id] = cpi->common.height; if (ctx->pending_cx_data) { if (size) ctx->pending_frame_sizes[ctx->pending_frame_count++] = size; -- cgit v1.2.3