Initialize tx_type_probs_thresh unconditionally
In case of resize mode enabled, tx_type_probs_thresh
may not be initialized with appropriate thresholds
if key frame is resized below 480p. This CL enables
initialization of tx_type_prob_thresh for all frames.
Change-Id: Ida99c44954a702f80f23af7adc0ecadd8d6ba140
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index bdd8158..eeba604 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -5410,10 +5410,7 @@
}
}
- if (cpi->sf.tx_sf.tx_type_search.prune_tx_type_using_stats &&
- cm->current_frame.frame_type == KEY_FRAME) {
- av1_copy(cpi->tx_type_probs, default_tx_type_probs);
-
+ if (cpi->sf.tx_sf.tx_type_search.prune_tx_type_using_stats) {
const int thr[2][2] = { { 15, 10 }, { 17, 10 } };
for (int f = 0; f < FRAME_UPDATE_TYPES; f++) {
int kf_arf_update = (f == KF_UPDATE || f == ARF_UPDATE);
@@ -5421,6 +5418,9 @@
thr[cpi->sf.tx_sf.tx_type_search.prune_tx_type_using_stats - 1]
[kf_arf_update];
}
+ if (cm->current_frame.frame_type == KEY_FRAME) {
+ av1_copy(cpi->tx_type_probs, default_tx_type_probs);
+ }
}
if (!cpi->sf.inter_sf.disable_obmc &&