I have been looking at some implementations of Viterbi decoders and noticed a strange way of calculating the branch metric (1):
"BM is calculated by the product of information codewords c and hamming distance hd with R inputs."
The input to the function that does the forward phase are the input bits c and also the hamming distances hd. My question is, how can the hamming distances be the input when the branch metric should in my understanding be the hamming distance of the input bits and the branch values of the trellis? So why would you calculate it as the product of input bits and hamming distances, when the branch metric should actually be the hamming distance?