if (InfoIsBranchTaken(info))
encoHIST = (encoHIST << 1) | 0; // Mark branch as taken
else
encoHIST = (encoHIST << 1) | 1; // Mark branch as not-taken
Bits 0 and 1 are reversed. Current reference code (and everywhere else in the spec ...) HIST bit=1 means 'taken' and 0 means 'not-taken'.
This is considered a typo.
In example encoder pseudo-code has this section:
if (InfoIsBranchTaken(info)) encoHIST = (encoHIST << 1) | 0; // Mark branch as taken else encoHIST = (encoHIST << 1) | 1; // Mark branch as not-taken
Bits 0 and 1 are reversed. Current reference code (and everywhere else in the spec ...) HIST bit=1 means 'taken' and 0 means 'not-taken'. This is considered a typo.