mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
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:
parent
0a813ca091
commit
3aca16e857
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user