A method for encoding video data, the method comprising: generating a coded slice network abstraction layer, NAL, unit comprising a plurality of bits that include encoded representations of a plurality of treeblocks (410A-N, 414A-N) that are associated with a slice of a picture, wherein the picture is divided into a plurality of slices, each slice of the plurality of slices including an integer number of treeblocks; and encoding the picture, characterized in that: i) the picture is encoded using wavefront parallel processing, WPP, by which the picture is also partitioned into a plurality of WPP waves (300A-E), each of the WPP waves comprising a different row of treeblocks in the picture, ii) the coded slice NAL unit comprises a plurality of bits that include encoded representations of a plurality of consecutive treeblocks (410A-N, 414A-N), the plurality of consecutive treeblocks of the coded slice NAL unit including treeblocks from two or more adjacent WPP waves of the picture, iii) the encoded representations of the treeblocks (410A-N, 414A-N) are grouped within the coded slice NAL unit into a plurality of segments (406, 408), each segment being a consecutive series of bits comprising bits coding the treeblocks of a different one of the two or more adjacent WPP waves, iv) the method further comprises padding one or more of the segments (406, 408), such that each of the segments begins on a byte boundary, and v) the coded slice NAL unit comprises a slice header that indicates entry points for one or more of the segments, wherein the entry points for the segments indicate byte offsets of the segments. generating a coded slice network abstraction layer, NAL, unit comprising a plurality of bits that include encoded representations of a plurality of treeblocks (410A-N, 414A-N) that are associated with a slice of a picture, wherein the picture is divided into a plurality of slices, each slice of the plurality of slices including an integer number of treeblocks; and encoding the picture, characterized in that: i) the picture is encoded using wavefront parallel processing, WPP, by which the picture is also partitioned into a plurality of WPP waves (300A-E), each of the WPP waves comprising a different row of treeblocks in the picture, ii) the coded slice NAL unit comprises a plurality of bits that include encoded representations of a plurality of consecutive treeblocks (410A-N, 414A-N), the plurality of consecutive treeblocks of the coded slice NAL unit including treeblocks from two or more adjacent WPP waves of the picture, iii) the encoded representations of the treeblocks (410A-N, 414A-N) are grouped within the coded slice NAL unit into a plurality of segments (406, 408), each segment being a consecutive series of bits comprising bits coding the treeblocks of a different one of the two or more adjacent WPP waves, iv) the method further comprises padding one or more of the segments (406, 408), such that each of the segments begins on a byte boundary, and v) the coded slice NAL unit comprises a slice header that indicates entry points for one or more of the segments, wherein the entry points for the segments indicate byte offsets of the segments. i) the picture is encoded using wavefront parallel processing, WPP, by which the picture is also partitioned into a plurality of WPP waves (300A-E), each of the WPP waves comprising a different row of treeblocks in the picture, ii) the coded slice NAL unit comprises a plurality of bits that include encoded representations of a plurality of consecutive treeblocks (410A-N, 414A-N), the plurality of consecutive treeblocks of the coded slice NAL unit including treeblocks from two or more adjacent WPP waves of the picture, iii) the encoded representations of the treeblocks (410A-N, 414A-N) are grouped within the coded slice NAL unit into a plurality of segments (406, 408), each segment being a consecutive series of bits comprising bits coding the treeblocks of a different one of the two or more adjacent WPP waves, iv) the method further comprises padding one or more of the segments (406, 408), such that each of the segments begins on a byte boundary, and v) the coded slice NAL unit comprises a slice header that indicates entry points for one or more of the segments, wherein the entry points for the segments indicate byte offsets of the segments.