Create function for checks related to second pass
Moved the check for second pass into two inline functions
is_stat_consumption_stage_twopass (checks specific to two pass)
and is_stat_consumption_stage(checks common between two pass
and single pass with lookahead).
Change-Id: I968566d6ec30358049afb911e0d12aec28dccb2f
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 16bb2cf..91be79e 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -1367,6 +1367,15 @@
static INLINE int is_stat_generation_stage(const AV1_COMP *const cpi) {
return (cpi->oxcf.pass == 1);
}
+// Check if statistics consumption stage
+static INLINE int is_stat_consumption_stage_twopass(const AV1_COMP *const cpi) {
+ return (cpi->oxcf.pass == 2);
+}
+
+// Check if statistics consumption stage
+static INLINE int is_stat_consumption_stage(const AV1_COMP *const cpi) {
+ return (is_stat_consumption_stage_twopass(cpi));
+}
// Check if the current stage has statistics
static INLINE int has_no_stats_stage(const AV1_COMP *const cpi) {