Merge "Add init and reset functions for RD_COST struct"