Commit 3aca16e8 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

opus_rc: fix CDF encoding of zeroes

0th CDF value is where probabilities are.
Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 0a813ca0
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment