Use aom_reader with od_decode_pvq_codeword().

Change the od_decode_pvq_codeword() function to take an aom_reader
 struct instead of an od_ec_dec struct.
Rename od_decode_pvq_codeword() to aom_decode_pvq_codeword().

Change-Id: I9fc2dda28a6169cb04410e822070991f3bcbc25a
This commit is contained in:
Nathan E. Egge 2016-12-28 15:48:17 -05:00
Родитель 89f5876f27
Коммит 0bccd5dc48
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -27,12 +27,16 @@
#include "av1/decoder/decint.h"
#include "av1/decoder/pvq_decoder.h"
static void od_decode_pvq_codeword(od_ec_dec *ec, od_pvq_codeword_ctx *ctx,
static void aom_decode_pvq_codeword(aom_reader *r, od_pvq_codeword_ctx *ctx,
od_coeff *y, int n, int k) {
int i;
od_decode_band_pvq_splits(ec, ctx, y, n, k, 0);
#if CONFIG_DAALA_EC
od_decode_band_pvq_splits(&r->ec, ctx, y, n, k, 0);
#else
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
#endif
for (i = 0; i < n; i++) {
if (y[i] && od_ec_dec_bits(ec, 1, "pvq:sign")) y[i] = -y[i];
if (y[i] && aom_read_bit(r, "pvq:sign")) y[i] = -y[i];
}
}
@ -260,12 +264,8 @@ static void pvq_decode_partition(aom_reader *r,
k = od_pvq_compute_k(qcg, itheta, theta, *noref, n, beta, nodesync);
if (k != 0) {
/* when noref==0, y is actually size n-1 */
#if CONFIG_DAALA_EC
od_decode_pvq_codeword(&r->ec, &adapt->pvq.pvq_codeword_ctx, y,
aom_decode_pvq_codeword(r, &adapt->pvq.pvq_codeword_ctx, y,
n - !*noref, k);
#else
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
#endif
}
else {
OD_CLEAR(y, n);