Merge "Optimize HBD up-sampled prediction functions" into nextgenv2