diff options
author | Yaowu Xu <yaowu@google.com> | 2013-10-28 09:02:42 -0700 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2013-10-29 11:34:19 -0700 |
commit | 91745bcff92a0ea66f697d1db97c41c8a54317fd (patch) | |
tree | 0b81fcc2471855fbbb1a1afa0a7d6d6c4bf827ba | |
parent | 07b0dab5dfe89b0543a82eaf36ab80c52dd38b32 (diff) | |
download | libvpx-91745bcff92a0ea66f697d1db97c41c8a54317fd.tar.gz |
changed to comply with strict aliasing rule
The clamp operation may not affect the values of the final assigned mv
where compiler may make use of strict aliasing rule to optimize out the
clamp operation. This change made the code segments to better comply
the strict aliasing rule.
Change-Id: I24502ff18bd4f9e62507a879cc8760a91a0fd07e
-rw-r--r-- | vp8/decoder/decodemv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index 8027a07ed..4327d3b12 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -512,15 +512,15 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi) else { mbmi->mode = NEARMV; - vp8_clamp_mv2(&near_mvs[CNT_NEAR], &pbi->mb); mbmi->mv.as_int = near_mvs[CNT_NEAR].as_int; + vp8_clamp_mv2(&mbmi->mv, &pbi->mb); } } else { mbmi->mode = NEARESTMV; - vp8_clamp_mv2(&near_mvs[CNT_NEAREST], &pbi->mb); mbmi->mv.as_int = near_mvs[CNT_NEAREST].as_int; + vp8_clamp_mv2(&mbmi->mv, &pbi->mb); } } else |