Merge "Factor out common tx_type writing codes from inter/intra frame" into nextgenv2