Commit 0bccd5dc authored by Nathan E. Egge's avatar Nathan E. Egge
Browse files

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
parent 89f5876f
......@@ -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);
od_decode_band_pvq_splits(&r->ec, ctx, y, n, k, 0);
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
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 */
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);
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
else {
OD_CLEAR(y, n);
Supports Markdown
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