ref: f0446164fbabe0f21ecbb4d29ec75b3cb130dfc8
parent: 0e1756330b3da4e77c2f4a4f52dbbcdced43f6be
parent: a49e77af50c663807721a6cfd757c69cf4b75deb
author: Yaowu Xu <[email protected]>
date: Fri Nov 1 02:59:17 EDT 2013
Merge "simplify read_coef_prob()"
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -552,16 +552,10 @@
static void read_coef_probs(FRAME_CONTEXT *fc, TX_MODE tx_mode,
vp9_reader *r) {
- read_coef_probs_common(fc->coef_probs[TX_4X4], r);
-
- if (tx_mode > ONLY_4X4)
- read_coef_probs_common(fc->coef_probs[TX_8X8], r);
-
- if (tx_mode > ALLOW_8X8)
- read_coef_probs_common(fc->coef_probs[TX_16X16], r);
-
- if (tx_mode > ALLOW_16X16)
- read_coef_probs_common(fc->coef_probs[TX_32X32], r);
+ const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode];
+ TX_SIZE tx_size;
+ for (tx_size = TX_4X4; tx_size <= max_tx_size; ++tx_size)
+ read_coef_probs_common(fc->coef_probs[tx_size], r);
}
static void setup_segmentation(struct segmentation *seg,