Use the more common way to clear a bit.

Change-Id: I1f41ee2e58a1b4bfedc08b1cd49198f79366988f
diff --git a/apps/aomdec.c b/apps/aomdec.c
index e1741fd..4895258 100644
--- a/apps/aomdec.c
+++ b/apps/aomdec.c
@@ -927,9 +927,8 @@
         // Shift up or down if necessary
         if (output_bit_depth != 0) {
           const aom_img_fmt_t shifted_fmt =
-              output_bit_depth == 8
-                  ? img->fmt ^ (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH)
-                  : img->fmt | AOM_IMG_FMT_HIGHBITDEPTH;
+              output_bit_depth == 8 ? img->fmt & ~AOM_IMG_FMT_HIGHBITDEPTH
+                                    : img->fmt | AOM_IMG_FMT_HIGHBITDEPTH;
 
           if (shifted_fmt != img->fmt || output_bit_depth != img->bit_depth) {
             if (img_shifted &&
diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc
index 9585cbe..1bfeacb 100644
--- a/test/test_vector_test.cc
+++ b/test/test_vector_test.cc
@@ -69,7 +69,7 @@
     ::libaom_test::MD5 md5_res;
 #if !CONFIG_LOWBITDEPTH
     const aom_img_fmt_t shifted_fmt =
-        (aom_img_fmt)(img.fmt ^ (img.fmt & AOM_IMG_FMT_HIGHBITDEPTH));
+        (aom_img_fmt)(img.fmt & ~AOM_IMG_FMT_HIGHBITDEPTH);
     if (img.bit_depth == 8 && shifted_fmt != img.fmt) {
       aom_image_t *img_shifted =
           aom_img_alloc(NULL, shifted_fmt, img.d_w, img.d_h, 16);