Simplify conditions on bitdepth

This avoids use of preprocessor when possible, and removes a
duplicated legacy check on codec name.

Change-Id: I8f0d25cf69b51d3379f25c1a69f88c8d404c4e38
diff --git a/aomenc.c b/aomenc.c
index f4bf888..26c3866 100644
--- a/aomenc.c
+++ b/aomenc.c
@@ -1061,15 +1061,8 @@
     }
   }
 #if CONFIG_HIGHBITDEPTH
-#if CONFIG_LOWBITDEPTH
-  if (strcmp(global->codec->name, "av1") == 0 ||
-      strcmp(global->codec->name, "av1") == 0) {
-    config->use_16bit_internal =
-        test_16bit_internal | (config->cfg.g_profile > 1);
-  }
-#else
-  config->use_16bit_internal = 1;
-#endif
+  config->use_16bit_internal =
+      test_16bit_internal || (config->cfg.g_profile > 1) || !CONFIG_LOWBITDEPTH;
 #endif
   return eos_mark_found;
 }
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index bf7485c..98d594f 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -3927,15 +3927,7 @@
   }
 
 #if CONFIG_HIGHBITDEPTH
-  if (cm->bit_depth > AOM_BITS_8) {
-    cm->use_highbitdepth = 1;
-  } else {
-#if CONFIG_LOWBITDEPTH
-    cm->use_highbitdepth = 0;
-#else
-    cm->use_highbitdepth = 1;
-#endif
-  }
+  cm->use_highbitdepth = cm->bit_depth > AOM_BITS_8 || !CONFIG_LOWBITDEPTH;
 #endif
 
   cm->color_space = aom_rb_read_literal(rb, 3);