]> granicus.if.org Git - libvpx/commitdiff
vp8_change_config: fix unsigned/signed comparison
authorJohann <johannkoenig@google.com>
Sat, 11 Jun 2016 01:09:04 +0000 (18:09 -0700)
committerJohann Koenig <johannkoenig@google.com>
Thu, 16 Jun 2016 20:58:37 +0000 (20:58 +0000)
Use ~15 instead of 0x..F0

Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'
if (((cm->Width + 15) & 0xfffffff0) !=
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
comparison of integers of different signs: 'unsigned int' and 'int'
((cm->Height + 15) & 0xfffffff0) !=
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^

Change-Id: Iac25839cde3425b7b9db7f33740dc46a551b7546

vp8/encoder/onyx_if.c

index 66c3f426742fa018db6206fff2c90babc1c0479c..1a309938c73639ea945e625fac36e5fcbf3080c9 100644 (file)
@@ -1787,10 +1787,8 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf)
     if (last_w != cpi->oxcf.Width || last_h != cpi->oxcf.Height)
         cpi->force_next_frame_intra = 1;
 
-    if (((cm->Width + 15) & 0xfffffff0) !=
-          cm->yv12_fb[cm->lst_fb_idx].y_width ||
-        ((cm->Height + 15) & 0xfffffff0) !=
-          cm->yv12_fb[cm->lst_fb_idx].y_height ||
+    if (((cm->Width + 15) & ~15) != cm->yv12_fb[cm->lst_fb_idx].y_width ||
+        ((cm->Height + 15) & ~15) != cm->yv12_fb[cm->lst_fb_idx].y_height ||
         cm->yv12_fb[cm->lst_fb_idx].y_width == 0)
     {
         dealloc_raw_frame_buffers(cpi);