Merge "Syncing write_modes_{b, sb} implementation with decode_modes_{b, sb}."