Change PVQ's K=1 symbols to use dyadic and ec_adapt adaptation
Change-Id: I7b855a68c5fedda4e34bfcbbabafa9ba52c09735
This commit is contained in:
Родитель
a0d6f117ff
Коммит
b9802238ea
|
@ -196,8 +196,7 @@ void od_adapt_pvq_ctx_reset(od_pvq_adapt_ctx *state, int is_keyframe) {
|
|||
ctx->pvq_adapt[4*i + OD_ADAPT_COUNT_Q8] = 104;
|
||||
ctx->pvq_adapt[4*i + OD_ADAPT_COUNT_EX_Q8] = 128;
|
||||
}
|
||||
ctx->pvq_k1_increment = 128;
|
||||
OD_CDFS_INIT(ctx->pvq_k1_cdf, ctx->pvq_k1_increment);
|
||||
OD_CDFS_INIT(ctx->pvq_k1_cdf, 0);
|
||||
for (pli = 0; pli < OD_NPLANES_MAX; pli++) {
|
||||
for (bs = 0; bs < OD_TXSIZES; bs++)
|
||||
for (i = 0; i < PVQ_MAX_PARTITIONS; i++) {
|
||||
|
|
|
@ -121,9 +121,8 @@ typedef struct od_pvq_codeword_ctx od_pvq_codeword_ctx;
|
|||
|
||||
struct od_pvq_codeword_ctx {
|
||||
int pvq_adapt[2*OD_TXSIZES*OD_NSB_ADAPT_CTXS];
|
||||
int pvq_k1_increment;
|
||||
/* CDFs are size 16 despite the fact that we're using less than that. */
|
||||
uint16_t pvq_k1_cdf[12][16];
|
||||
uint16_t pvq_k1_cdf[12][CDF_SIZE(16)];
|
||||
uint16_t pvq_split_cdf[22*7][CDF_SIZE(8)];
|
||||
};
|
||||
|
||||
|
|
|
@ -63,8 +63,7 @@ void aom_decode_band_pvq_splits(aom_reader *r, od_pvq_codeword_ctx *adapt,
|
|||
int pos;
|
||||
cdf_id = od_pvq_k1_ctx(n, level == 0);
|
||||
OD_CLEAR(y, n);
|
||||
pos = aom_decode_cdf_adapt(r, adapt->pvq_k1_cdf[cdf_id], n,
|
||||
adapt->pvq_k1_increment, "pvq:k1");
|
||||
pos = aom_read_symbol_pvq(r, adapt->pvq_k1_cdf[cdf_id], n, "pvq:k1");
|
||||
y[pos] = 1;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -51,8 +51,7 @@ void aom_encode_band_pvq_splits(aom_writer *w, od_pvq_codeword_ctx *adapt,
|
|||
cdf_id = od_pvq_k1_ctx(n, level == 0);
|
||||
for (pos = 0; !y[pos]; pos++);
|
||||
OD_ASSERT(pos < n);
|
||||
aom_encode_cdf_adapt(w, pos, adapt->pvq_k1_cdf[cdf_id], n,
|
||||
adapt->pvq_k1_increment);
|
||||
aom_write_symbol_pvq(w, pos, adapt->pvq_k1_cdf[cdf_id], n);
|
||||
}
|
||||
else {
|
||||
mid = n >> 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче