[CFL] Use MAX_NUM_TXB_SQUARE instead of MAX_NUM_TXB
MAX_NUM_TXB represents the maximum number of transform blocks in 1
dimension. CfL requires the maximum number of transform blocks in 2
dimensions. As such, we now use MAX_NUM_TXB_SQUARE instead of the
erroneous MAX_NUM_TXB for the average buffer.
There's an assert guarding for overrun on the average buffer.
This fix stops assertions on 4:4:4 sequences. This patch does
not alter AWCY results as AWCY only covers 4:2:0 sequences (for
which MAX_NUM_TXB turns out to be sufficient).
Change-Id: I628db0131f60abc2d06cbbe3fe3dc40e28894ce3
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 23ea3b1..007e039 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -714,7 +714,7 @@
// * Max error will be 1/16th.
// Note: 3 is chosen so that y_averages fits in 15 bits when 12 bit input is
// used
- int y_averages_q3[MAX_NUM_TXB];
+ int y_averages_q3[MAX_NUM_TXB_SQUARE];
int y_averages_stride;
int are_parameters_computed;