Merge "Fix rate cost calculation for ext-intra" into nextgenv2