summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2022-06-14 01:24:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-06-14 01:24:23 +0000
commit638e0b7bba3660b19a8f715d8bade0a9a5340eaa (patch)
tree24da114aa9e1df9ca5bdf5ae5c13212ed93a1a7e /vp9
parent013ec5722ce88bebcdcf32b1496fcca413199336 (diff)
parent3dc6aa01bacc9818d4ccc0ee0f1b691ae0ec0315 (diff)
downloadlibvpx-638e0b7bba3660b19a8f715d8bade0a9a5340eaa.tar
libvpx-638e0b7bba3660b19a8f715d8bade0a9a5340eaa.tar.gz
libvpx-638e0b7bba3660b19a8f715d8bade0a9a5340eaa.tar.bz2
libvpx-638e0b7bba3660b19a8f715d8bade0a9a5340eaa.zip
Merge "vp9,encoder: fix some integer sanitizer warnings" into main
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_rdopt.c2
-rw-r--r--vp9/encoder/vp9_segmentation.c2
-rw-r--r--vp9/encoder/x86/vp9_diamond_search_sad_avx.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 0171a0572..3b574ef17 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3470,7 +3470,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, TileDataEnc *tile_data,
}
mode_skip_mask[INTRA_FRAME] |=
- ~(sf->intra_y_mode_mask[max_txsize_lookup[bsize]]);
+ (uint16_t) ~(sf->intra_y_mode_mask[max_txsize_lookup[bsize]]);
for (i = 0; i <= LAST_NEW_MV_INDEX; ++i) mode_threshold[i] = 0;
diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c
index a163297e6..d75488a8e 100644
--- a/vp9/encoder/vp9_segmentation.c
+++ b/vp9/encoder/vp9_segmentation.c
@@ -39,7 +39,7 @@ void vp9_set_segment_data(struct segmentation *seg, signed char *feature_data,
}
void vp9_disable_segfeature(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id) {
- seg->feature_mask[segment_id] &= ~(1 << feature_id);
+ seg->feature_mask[segment_id] &= ~(1u << feature_id);
}
void vp9_clear_segdata(struct segmentation *seg, int segment_id,
diff --git a/vp9/encoder/x86/vp9_diamond_search_sad_avx.c b/vp9/encoder/x86/vp9_diamond_search_sad_avx.c
index fcf50eb2a..0e04a2f41 100644
--- a/vp9/encoder/x86/vp9_diamond_search_sad_avx.c
+++ b/vp9/encoder/x86/vp9_diamond_search_sad_avx.c
@@ -76,9 +76,9 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
int *num00, const vp9_variance_fn_ptr_t *fn_ptr,
const MV *center_mv) {
const int_mv maxmv = pack_int_mv(x->mv_limits.row_max, x->mv_limits.col_max);
- const __m128i v_max_mv_w = _mm_set1_epi32(maxmv.as_int);
+ const __m128i v_max_mv_w = _mm_set1_epi32((int)maxmv.as_int);
const int_mv minmv = pack_int_mv(x->mv_limits.row_min, x->mv_limits.col_min);
- const __m128i v_min_mv_w = _mm_set1_epi32(minmv.as_int);
+ const __m128i v_min_mv_w = _mm_set1_epi32((int)minmv.as_int);
const __m128i v_spb_d = _mm_set1_epi32(sad_per_bit);
@@ -96,14 +96,14 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
const int_mv fcenter_mv =
pack_int_mv(center_mv->row >> 3, center_mv->col >> 3);
- const __m128i vfcmv = _mm_set1_epi32(fcenter_mv.as_int);
+ const __m128i vfcmv = _mm_set1_epi32((int)fcenter_mv.as_int);
const int ref_row = clamp(ref_mv->row, minmv.as_mv.row, maxmv.as_mv.row);
const int ref_col = clamp(ref_mv->col, minmv.as_mv.col, maxmv.as_mv.col);
int_mv bmv = pack_int_mv(ref_row, ref_col);
int_mv new_bmv = bmv;
- __m128i v_bmv_w = _mm_set1_epi32(bmv.as_int);
+ __m128i v_bmv_w = _mm_set1_epi32((int)bmv.as_int);
const int what_stride = x->plane[0].src.stride;
const int in_what_stride = x->e_mbd.plane[0].pre[0].stride;
@@ -300,7 +300,7 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
bmv = new_bmv;
best_address = new_best_address;
- v_bmv_w = _mm_set1_epi32(bmv.as_int);
+ v_bmv_w = _mm_set1_epi32((int)bmv.as_int);
#if VPX_ARCH_X86_64
v_ba_q = _mm_set1_epi64x((intptr_t)best_address);
#else