Merge "Refactor rate distortion cost structure in non-RD coding mode"