Skip update kf count when reaching the end of kf group
This resolves a mis-alignment issue for all intra frame coding.
The regular coding stats for videos remain unchanged.
STATS_CHANGED
Change-Id: Idc0e7c7cfb8427e4940fa7212e9406c655ea3b0e
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index 975f3bd..0425f55 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -130,7 +130,7 @@
}
static INLINE void update_keyframe_counters(AV1_COMP *cpi) {
- if (cpi->common.show_frame) {
+ if (cpi->common.show_frame && cpi->rc.frames_to_key) {
cpi->rc.frames_since_key++;
cpi->rc.frames_to_key--;
}