summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r--vp9/encoder/vp9_bitstream.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index a72856db4..c7d489db6 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -611,10 +611,6 @@ static void update_coef_probs_common(vp9_writer* const bc, VP9_COMP *cpi,
case ONE_LOOP_REDUCED: {
int updates = 0;
int noupdates_before_first = 0;
- if (tx_size >= TX_16X16 && cpi->sf.tx_size_search_method == USE_TX_8X8) {
- vp9_write_bit(bc, 0);
- return;
- }
for (i = 0; i < PLANE_TYPES; ++i) {
for (j = 0; j < REF_TYPES; ++j) {
for (k = 0; k < COEF_BANDS; ++k) {
@@ -678,10 +674,15 @@ static void update_coef_probs(VP9_COMP *cpi, vp9_writer* w) {
for (tx_size = TX_4X4; tx_size <= max_tx_size; ++tx_size) {
vp9_coeff_stats frame_branch_ct[PLANE_TYPES];
vp9_coeff_probs_model frame_coef_probs[PLANE_TYPES];
- build_tree_distribution(cpi, tx_size, frame_branch_ct,
- frame_coef_probs);
- update_coef_probs_common(w, cpi, tx_size, frame_branch_ct,
- frame_coef_probs);
+ if (cpi->td.counts->tx.tx_totals[tx_size] == 0 ||
+ (tx_size >= TX_16X16 && cpi->sf.tx_size_search_method == USE_TX_8X8)) {
+ vp9_write_bit(w, 0);
+ } else {
+ build_tree_distribution(cpi, tx_size, frame_branch_ct,
+ frame_coef_probs);
+ update_coef_probs_common(w, cpi, tx_size, frame_branch_ct,
+ frame_coef_probs);
+ }
}
}