Fix subsampling check for images 1 pixel wide/tall

Change-Id: I0e262ede7eb4a4ae0c86181922d744e542e93350
This commit is contained in:
Alex Converse
2014-10-01 11:23:57 -07:00
committed by Deb Mukherjee
parent 6a0976dc3c
commit a0befb93e7
5 changed files with 19 additions and 11 deletions

View File

@@ -735,6 +735,8 @@ static void setup_frame_size(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) {
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
"Failed to allocate frame buffer");
}
cm->frame_bufs[cm->new_fb_idx].buf.subsampling_x = cm->subsampling_x;
cm->frame_bufs[cm->new_fb_idx].buf.subsampling_y = cm->subsampling_y;
cm->frame_bufs[cm->new_fb_idx].buf.bit_depth = (unsigned int)cm->bit_depth;
}
@@ -787,8 +789,8 @@ static void setup_frame_size_with_refs(VP9_COMMON *cm,
RefBuffer *const ref_frame = &cm->frame_refs[i];
if (!valid_ref_frame_img_fmt(
ref_frame->buf->bit_depth,
ref_frame->buf->uv_crop_width < ref_frame->buf->y_crop_width,
ref_frame->buf->uv_crop_height < ref_frame->buf->y_crop_height,
ref_frame->buf->subsampling_x,
ref_frame->buf->subsampling_y,
cm->bit_depth,
cm->subsampling_x,
cm->subsampling_y))
@@ -811,6 +813,8 @@ static void setup_frame_size_with_refs(VP9_COMMON *cm,
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
"Failed to allocate frame buffer");
}
cm->frame_bufs[cm->new_fb_idx].buf.subsampling_x = cm->subsampling_x;
cm->frame_bufs[cm->new_fb_idx].buf.subsampling_y = cm->subsampling_y;
cm->frame_bufs[cm->new_fb_idx].buf.bit_depth = (unsigned int)cm->bit_depth;
}