merging in video code