opus_rc: fix CDF encoding of zeroes

0th CDF value is where probabilities are.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
Rostislav Pehlivanov 2017-07-20 07:33:33 +01:00
parent 0a813ca091
commit 3aca16e857
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ uint32_t ff_opus_rc_dec_cdf(OpusRangeCoder *rc, const uint16_t *cdf)
void ff_opus_rc_enc_cdf(OpusRangeCoder *rc, int val, const uint16_t *cdf)
{
opus_rc_enc_update(rc, cdf[val], cdf[val + 1], cdf[0], 1);
opus_rc_enc_update(rc, (!!val)*cdf[val], cdf[val + 1], cdf[0], 1);
}
uint32_t ff_opus_rc_dec_log(OpusRangeCoder *rc, uint32_t bits)