summaryrefslogtreecommitdiff
path: root/vp9/decoder/vp9_detokenize.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2015-06-05 11:54:04 -0700
committerScott LaVarnway <slavarnway@google.com>2015-06-05 11:54:04 -0700
commit63819c033cfbb1f953b10c5c22a82317e2b469e0 (patch)
tree272c3fa562b3d37ea5aa4cf3d957fac2d5d6c4f1 /vp9/decoder/vp9_detokenize.c
parent78b434e8b1c770c8abbd719cc838317f1b8e303c (diff)
downloadlibvpx-63819c033cfbb1f953b10c5c22a82317e2b469e0.tar
libvpx-63819c033cfbb1f953b10c5c22a82317e2b469e0.tar.gz
libvpx-63819c033cfbb1f953b10c5c22a82317e2b469e0.tar.bz2
libvpx-63819c033cfbb1f953b10c5c22a82317e2b469e0.zip
BUG FIX: Remove counts param
member access within null pointer of type 'FRAME_COUNTS' Change-Id: Id3bf75e0a6f2a1abf8522cf9fbb98b3a4443de38
Diffstat (limited to 'vp9/decoder/vp9_detokenize.c')
-rw-r--r--vp9/decoder/vp9_detokenize.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c
index 54ad83532..3304e64b2 100644
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -59,10 +59,8 @@ static int decode_coefs(const MACROBLOCKD *xd,
const vp9_prob (*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
fc->coef_probs[tx_size][type][ref];
const vp9_prob *prob;
- unsigned int (*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] =
- counts->coef[tx_size][type][ref];
- unsigned int (*eob_branch_count)[COEFF_CONTEXTS] =
- counts->eob_branch[tx_size][type][ref];
+ unsigned int (*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1];
+ unsigned int (*eob_branch_count)[COEFF_CONTEXTS];
uint8_t token_cache[32 * 32];
const uint8_t *band_translate = get_band_translate(tx_size);
const int dq_shift = (tx_size == TX_32X32);
@@ -75,6 +73,11 @@ static int decode_coefs(const MACROBLOCKD *xd,
const uint8_t *cat5_prob;
const uint8_t *cat6_prob;
+ if (counts) {
+ coef_counts = counts->coef[tx_size][type][ref];
+ eob_branch_count = counts->eob_branch[tx_size][type][ref];
+ }
+
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->bd > VPX_BITS_8) {
if (xd->bd == VPX_BITS_10) {