Fix a buffer overflow in parse_tiles_specification
Moved all the stream related stuff into substream_write_bitstream
reorganized encoder_state structure
Slices and WPP in command line and encoder
lcu_at_tile_start and lcu_at_tile_end helper functions
added parent to encoder_state
Refactor encoder_state
fixed typo
Fix iteration on children
Debug code to generate a graph
Parsing seems to work now
Renamed encoder_clear_refs to encoder_state_clear_refs
encoder_control_input_init near the other encoder_control_* functions
Fix small bugs with compilation
Works when not using tiles
Fix bug with cabac stream pointing to bad data
Refactor picture to remove hidden dependency between slice and tiles

picture.type -> encoder_state->global->pictype
picture.slicetype -> encoder_state->global->slicetype
picture.slice_sao_luma_flag -> 1 (was constant)
picture.slice_sao_chroma_flag -> 1 (was constant)

This may be changed later. For now it's better to avoid having slice related stuff in picture.
Restored parallelism, but it will be done in another way... OpenMP is not very efficient in these kind of dynamic situation
Remove quote from graphviz dump
Remove extra [ from graphviz dump