[NORMATIVE] Use 3 profile bits to keep room f/ ext

BUG=aomedia:1683

Change-Id: Ia3f1f32e3a01cab13ea95c646f8e80f53ac91d2e
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 0071461..6877943 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -95,15 +95,18 @@
 // Shall be removed when bitmask code is completely checkedin
 #define LOOP_FILTER_BITMASK 0
 
+#define PROFILE_BITS 3
+// The following three profiles are currently defined.
 // Profile 0.  8-bit and 10-bit 4:2:0 and 4:0:0 only.
 // Profile 1.  8-bit and 10-bit 4:4:4
 // Profile 2.  8-bit and 10-bit 4:2:2
-//            12 bit  4:0:0, 4:2:2 and 4:4:4
+//            12-bit  4:0:0, 4:2:2 and 4:4:4
+// Since we have three bits for the profiles, it can be extended later.
 typedef enum BITSTREAM_PROFILE {
   PROFILE_0,
   PROFILE_1,
   PROFILE_2,
-  MAX_PROFILES
+  MAX_PROFILES,
 } BITSTREAM_PROFILE;
 
 // Note: Some enums use the attribute 'packed' to use smallest possible integer
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 653ce96..56c7b45 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -3083,7 +3083,7 @@
 }
 
 BITSTREAM_PROFILE av1_read_profile(struct aom_read_bit_buffer *rb) {
-  int profile = aom_rb_read_literal(rb, 2);
+  int profile = aom_rb_read_literal(rb, PROFILE_BITS);
   return (BITSTREAM_PROFILE)profile;
 }
 
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 98105fb..08306f3 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2423,7 +2423,7 @@
 static void write_profile(BITSTREAM_PROFILE profile,
                           struct aom_write_bit_buffer *wb) {
   assert(profile >= PROFILE_0 && profile < MAX_PROFILES);
-  aom_wb_write_literal(wb, profile, 2);
+  aom_wb_write_literal(wb, profile, PROFILE_BITS);
 }
 
 static void write_bitdepth(AV1_COMMON *const cm,