Modify lightfield encoding example

Modified the lightfield encoding example to accommodate HW implementation
requirements. Fixed the encoding scheme, generated a bitstream of a list
of references followed by the surrounding large scale tile coded frames.
All large scale tile coded frames use the same uncompressed frame header
and the same set of frame contexts. This example also wrote out the frame
header and frame contexts while encoding a large scale tile frame and
setting EXT_TILE_DEBUG to 1.

Change-Id: I7cc19099195d0a20335d5c6bfb9f493f1bf3a7b2
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 2644452..d8965c3 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -4808,6 +4808,21 @@
     }
     data += uncompressed_hdr_size + compressed_hdr_size;
 
+#define EXT_TILE_DEBUG 0
+#if EXT_TILE_DEBUG
+    {
+      char fn[20] = "./fh";
+      fn[4] = cm->current_video_frame / 100 + '0';
+      fn[5] = (cm->current_video_frame % 100) / 10 + '0';
+      fn[6] = (cm->current_video_frame % 10) + '0';
+      fn[7] = '\0';
+      av1_print_uncompressed_frame_header(
+          data - uncompressed_hdr_size - compressed_hdr_size,
+          uncompressed_hdr_size, fn);
+    }
+#endif  // EXT_TILE_DEBUG
+#undef EXT_TILE_DEBUG
+
     // Write the encoded tile data
     data_size = write_tiles(cpi, data, &max_tile_size, &max_tile_col_size);
   } else {