ref: aab1b2912bcab60aa1427e52d8c49da249fc96ca
parent: fe47e829298a7f7c44749164a480ff7dcdf07ea5
author: Jingning Han <[email protected]>
date: Wed Aug 22 06:16:46 EDT 2018
Refactor encoder frame count update This refactoring allows the encoder to skip frame count update in the show_existing_frame mode. Change-Id: Id69707976ccdad144cba93a8f5d36b6947611f91
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4913,17 +4913,18 @@
}
vp9_update_reference_frames(cpi);
- for (t = TX_4X4; t <= TX_32X32; t++)
- full_to_model_counts(cpi->td.counts->coef[t],
- cpi->td.rd_counts.coef_counts[t]);
+ if (!cm->show_existing_frame) {
+ for (t = TX_4X4; t <= TX_32X32; ++t) {
+ full_to_model_counts(cpi->td.counts->coef[t],
+ cpi->td.rd_counts.coef_counts[t]);
+ }
- if (!cm->error_resilient_mode && !cm->frame_parallel_decoding_mode)
- vp9_adapt_coef_probs(cm);
-
- if (!frame_is_intra_only(cm)) {
if (!cm->error_resilient_mode && !cm->frame_parallel_decoding_mode) {
- vp9_adapt_mode_probs(cm);
- vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv);
+ if (!frame_is_intra_only(cm)) {
+ vp9_adapt_mode_probs(cm);
+ vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv);
+ }
+ vp9_adapt_coef_probs(cm);
}
}