hevc: fix put_weighted_pred_avg out of bound accesses