diff options
author | James Zern <jzern@google.com> | 2022-07-27 15:15:25 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-07-27 15:37:11 -0700 |
commit | 9763f3c549569df3bad776a02537a97b2d203a3c (patch) | |
tree | b22d90ae1f49b7e0ae2d0b5ec33e467d1eb3f9b1 /vp8 | |
parent | 7dab508cd9c8fc8f0ac44bfb380c31e25919d883 (diff) | |
download | libvpx-9763f3c549569df3bad776a02537a97b2d203a3c.tar.gz |
vp8_find_near_mvs: fix implicit conversion warnings
unsigned -> int and vice versa
reported by clang -fsanitize=integer
vp8/common/findnearmv.c:108:11: runtime error: implicit conversion from
type 'uint32_t' (aka 'unsigned int') of value 4294443008 (32-bit,
unsigned) to type 'int' changed the value to -524288 (32-bit, signed)
vp8/common/findnearmv.c:110:33: runtime error: implicit conversion from
type 'int' of value -524288 (32-bit, signed) to type 'uint32_t' (aka
'unsigned int') changed the value to 4294443008 (32-bit, unsigned)
Bug: b/229626362
Change-Id: Ic7ce0fd98255ccf9307ac73e9fb6a8189b268214
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/common/findnearmv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vp8/common/findnearmv.c b/vp8/common/findnearmv.c index 6889fdedd..3b3192362 100644 --- a/vp8/common/findnearmv.c +++ b/vp8/common/findnearmv.c @@ -105,9 +105,9 @@ void vp8_find_near_mvs(MACROBLOCKD *xd, const MODE_INFO *here, int_mv *nearest, tmp = near_mv_ref_cnts[CNT_NEAREST]; near_mv_ref_cnts[CNT_NEAREST] = near_mv_ref_cnts[CNT_NEAR]; near_mv_ref_cnts[CNT_NEAR] = tmp; - tmp = near_mvs[CNT_NEAREST].as_int; + tmp = (int)near_mvs[CNT_NEAREST].as_int; near_mvs[CNT_NEAREST].as_int = near_mvs[CNT_NEAR].as_int; - near_mvs[CNT_NEAR].as_int = tmp; + near_mvs[CNT_NEAR].as_int = (uint32_t)tmp; } /* Use near_mvs[0] to store the "best" MV */ |