This no longer assumes that planes are contiguous. It should help with libav reference counting, and also avoids interleaving unused padding.