dixie: handle buffer size changes

spatial resampling now supported.

Change-Id: Ifd959072b76ac3f8eeed00a0fd25acdde036defe
This commit is contained in:
John Koleszar
2011-02-03 00:07:32 -05:00
parent def479510e
commit 52a1b7df97
2 changed files with 8 additions and 6 deletions

View File

@@ -325,10 +325,6 @@ decode_frame(struct vp8_decoder_ctx *ctx,
if (ctx->frame_hdr.is_keyframe)
{
if (ctx->frame_hdr.kf.scale_w || ctx->frame_hdr.kf.scale_h)
vpx_internal_error(&ctx->error, VPX_CODEC_UNSUP_BITSTREAM,
"Spatial resampling not supported.");
data += KEYFRAME_HEADER_SZ;
sz -= KEYFRAME_HEADER_SZ;
ctx->mb_cols = (ctx->frame_hdr.kf.w + 15) / 16;

View File

@@ -639,8 +639,14 @@ vp8_dixie_modemv_init(struct vp8_decoder_ctx *ctx)
mbi_w = ctx->mb_cols + 1; /* For left border col */
mbi_h = ctx->mb_rows + 1; /* For above border row */
/* TODO: Handle buffer size changes */
if (ctx->frame_hdr.frame_size_updated)
{
free(ctx->mb_info_storage);
ctx->mb_info_storage = NULL;
free(ctx->mb_info_rows_storage);
ctx->mb_info_rows_storage = NULL;
}
if (!ctx->mb_info_storage)
ctx->mb_info_storage = calloc(mbi_w * mbi_h,
sizeof(*ctx->mb_info_storage));