Add util function for reading OBU type.

This began as an investigation into decoder_peek_si()
and decoder_peek_si_internal(). Both functions need
additional changes to function correctly, but since
existing code and tests depends on current behavior the
changes to those functions have been deferred and the
required updates noted in TODOs and comments within
decoder_peek_si_internal() within av1_dx_iface.c.

BUG=aomedia:1445

Change-Id: I89ee3f1a7adcf7c09938645d3fb2280ab1960698
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 5f09523..89f7f6f 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -41,6 +41,21 @@
 } SCALABILITY_STRUCTURES;
 #endif
 
+int get_obu_type(uint8_t obu_header, OBU_TYPE *obu_type) {
+  if (!obu_type) return -1;
+  *obu_type = (OBU_TYPE)((obu_header >> 3) & 0xF);
+  switch (*obu_type) {
+    case OBU_SEQUENCE_HEADER: break;
+    case OBU_TEMPORAL_DELIMITER: break;
+    case OBU_FRAME_HEADER: break;
+    case OBU_TILE_GROUP: break;
+    case OBU_METADATA: break;
+    case OBU_PADDING: break;
+    default: return -1;
+  }
+  return 0;
+}
+
 static OBU_TYPE read_obu_header(struct aom_read_bit_buffer *rb,
                                 size_t *header_size,
                                 uint8_t *obu_extension_header) {