From 15a3e5f74234b96559a4b116f8dca50901367587 Mon Sep 17 00:00:00 2001 From: hkuang Date: Thu, 9 Oct 2014 11:58:39 -0700 Subject: [PATCH] Remove unnecessary scale check in set_ref. Scale check has been done in read_inter_block_mode_info. Change-Id: I6c86f93bd579109ed30ff13a04a30e35f5ae6fc5 --- vp9/decoder/vp9_decodeframe.c | 3 --- vp9/decoder/vp9_decodemv.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index c54611fba..d9dfc5608 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -389,9 +389,6 @@ static void set_ref(VP9_COMMON *const cm, MACROBLOCKD *const xd, MB_MODE_INFO *const mbmi = &xd->mi[0].src_mi->mbmi; RefBuffer *ref_buffer = &cm->frame_refs[mbmi->ref_frame[idx] - LAST_FRAME]; xd->block_refs[idx] = ref_buffer; - if (!vp9_is_valid_scale(&ref_buffer->sf)) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, - "Invalid scale factors"); if (ref_buffer->buf->corrupted) vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Block reference is corrupt"); diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index ef2dc807e..58fbedcd0 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -436,8 +436,7 @@ static void read_inter_block_mode_info(VP9_COMMON *const cm, for (ref = 0; ref < 1 + is_compound; ++ref) { const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref]; const int ref_idx = frame - LAST_FRAME; - if (cm->frame_refs[ref_idx].sf.x_scale_fp == REF_INVALID_SCALE || - cm->frame_refs[ref_idx].sf.y_scale_fp == REF_INVALID_SCALE ) + if ((!vp9_is_valid_scale(&cm->frame_refs[ref_idx].sf))) vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Reference frame has invalid dimensions"); vp9_find_mv_refs(cm, xd, tile, mi, frame, mbmi->ref_mvs[frame], -- 2.40.0