diff options
author | Yunqing Wang <yunqingwang@google.com> | 2013-10-18 08:56:30 -0700 |
---|---|---|
committer | Yunqing Wang <yunqingwang@google.com> | 2013-10-22 13:10:22 -0700 |
commit | 175c313a128fd3b543e73751dc2334af5c45a5fa (patch) | |
tree | fd5242ff2de904d2f10d756c60651a87ce9829db /vp9/decoder | |
parent | f6d870f7ae6f968bdbc342af80c8f71fa98f2ac2 (diff) | |
download | libvpx-175c313a128fd3b543e73751dc2334af5c45a5fa.tar libvpx-175c313a128fd3b543e73751dc2334af5c45a5fa.tar.gz libvpx-175c313a128fd3b543e73751dc2334af5c45a5fa.tar.bz2 libvpx-175c313a128fd3b543e73751dc2334af5c45a5fa.zip |
Improve scale_factors struct
The ref's scale_factors are set at frame level, and then copied for
each partition block. Since the struct members are mostly constant,
this patch separated the constant and non-constant members, and
reduced struct copying. This gave 0.5% ~ 1.4% decoder speed gain.
Change-Id: I94043bf5a6995c8042da52e5c661818dfa6f6d4c
Diffstat (limited to 'vp9/decoder')
-rw-r--r-- | vp9/decoder/vp9_decodframe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index b79ff554d..9e1ae4af7 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -209,13 +209,13 @@ static void set_ref(VP9_COMMON *const cm, MACROBLOCKD *const xd, MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi; const int ref = mbmi->ref_frame[idx] - LAST_FRAME; const YV12_BUFFER_CONFIG *cfg = &cm->yv12_fb[cm->active_ref_idx[ref]]; - const struct scale_factors *sf = &cm->active_ref_scale[ref]; - if (!vp9_is_valid_scale(sf)) + const struct scale_factors_common *sfc = &cm->active_ref_scale_comm[ref]; + if (!vp9_is_valid_scale(sfc)) vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Invalid scale factors"); - xd->scale_factor[idx] = *sf; - setup_pre_planes(xd, idx, cfg, mi_row, mi_col, sf); + xd->scale_factor[idx].sfc = sfc; + setup_pre_planes(xd, idx, cfg, mi_row, mi_col, &xd->scale_factor[idx]); xd->corrupted |= cfg->corrupted; } |