Adding VP9_FRAME_MARKER constant.

Also renaming SYNC_CODE_* to VP9_SYNC_CODE_*.

Change-Id: I9ff504c6ebce6cd6673d7df2085d597b818f5960
diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h
index 3ac192b..36d1cdf 100644
--- a/vp9/common/vp9_common.h
+++ b/vp9/common/vp9_common.h
@@ -84,9 +84,11 @@
   } while (0)
 #endif
 
-#define SYNC_CODE_0 0x49
-#define SYNC_CODE_1 0x83
-#define SYNC_CODE_2 0x42
+#define VP9_SYNC_CODE_0 0x49
+#define VP9_SYNC_CODE_1 0x83
+#define VP9_SYNC_CODE_2 0x42
+
+#define VP9_FRAME_MARKER 0x2
 
 
 #endif  // VP9_COMMON_VP9_COMMON_H_
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index 3ee8ba4..0cb0709 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -821,9 +821,9 @@
 }
 
 static void check_sync_code(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) {
-  if (vp9_rb_read_literal(rb, 8) != SYNC_CODE_0 ||
-      vp9_rb_read_literal(rb, 8) != SYNC_CODE_1 ||
-      vp9_rb_read_literal(rb, 8) != SYNC_CODE_2) {
+  if (vp9_rb_read_literal(rb, 8) != VP9_SYNC_CODE_0 ||
+      vp9_rb_read_literal(rb, 8) != VP9_SYNC_CODE_1 ||
+      vp9_rb_read_literal(rb, 8) != VP9_SYNC_CODE_2) {
     vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
                        "Invalid frame sync code");
   }
@@ -875,7 +875,7 @@
 
   cm->last_frame_type = cm->frame_type;
 
-  if (vp9_rb_read_literal(rb, 2) != 0x2)
+  if (vp9_rb_read_literal(rb, 2) != VP9_FRAME_MARKER)
       vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
                          "Invalid frame marker");
 
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index 8378a78..f82802d 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1295,17 +1295,16 @@
 }
 
 static void write_sync_code(struct vp9_write_bit_buffer *wb) {
-  vp9_wb_write_literal(wb, SYNC_CODE_0, 8);
-  vp9_wb_write_literal(wb, SYNC_CODE_1, 8);
-  vp9_wb_write_literal(wb, SYNC_CODE_2, 8);
+  vp9_wb_write_literal(wb, VP9_SYNC_CODE_0, 8);
+  vp9_wb_write_literal(wb, VP9_SYNC_CODE_1, 8);
+  vp9_wb_write_literal(wb, VP9_SYNC_CODE_2, 8);
 }
 
 static void write_uncompressed_header(VP9_COMP *cpi,
                                       struct vp9_write_bit_buffer *wb) {
   VP9_COMMON *const cm = &cpi->common;
 
-  // frame marker bits
-  vp9_wb_write_literal(wb, 0x2, 2);
+  vp9_wb_write_literal(wb, VP9_FRAME_MARKER, 2);
 
   // bitstream version.
   // 00 - profile 0. 4:2:0 only
diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c
index 6b92316..5dacab4 100644
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -172,9 +172,9 @@
       rb.bit_offset += 1;  // show frame
       rb.bit_offset += 1;  // error resilient
 
-      if (vp9_rb_read_literal(&rb, 8) != SYNC_CODE_0 ||
-          vp9_rb_read_literal(&rb, 8) != SYNC_CODE_1 ||
-          vp9_rb_read_literal(&rb, 8) != SYNC_CODE_2) {
+      if (vp9_rb_read_literal(&rb, 8) != VP9_SYNC_CODE_0 ||
+          vp9_rb_read_literal(&rb, 8) != VP9_SYNC_CODE_1 ||
+          vp9_rb_read_literal(&rb, 8) != VP9_SYNC_CODE_2) {
         return VPX_CODEC_UNSUP_BITSTREAM;
       }