Merge "Fix a RD performance bug in bipredictive frames" into nextgenv2