Commit 86b75c8a authored by Jingning Han's avatar Jingning Han

Unify adaptive scan enable flag

Change-Id: Ief1bedd68de55c29de15f56d805e242d932ff359
parent e4a0b3c7
......@@ -5797,7 +5797,6 @@ void av1_init_scan_order(AV1_COMMON *cm) {
TX_SIZE tx_size;
TX_TYPE tx_type;
for (tx_size = 0; tx_size < TX_SIZES_ALL; ++tx_size) {
if (tx_size > TX_32X16) continue;
for (tx_type = DCT_DCT; tx_type < TX_TYPES; ++tx_type) {
if (do_adapt_scan(tx_size, tx_type)) {
uint32_t *non_zero_prob = get_non_zero_prob(cm->fc, tx_size, tx_type);
......@@ -5828,7 +5827,6 @@ void av1_adapt_scan_order(AV1_COMMON *cm) {
#endif // CACHE_SCAN_PROB
for (tx_size = 0; tx_size < TX_SIZES_ALL; ++tx_size) {
if (tx_size > TX_32X16) continue;
TX_TYPE tx_type;
for (tx_type = DCT_DCT; tx_type < TX_TYPES; ++tx_type) {
if (do_adapt_scan(tx_size, tx_type)) {
......
......@@ -90,6 +90,7 @@ static INLINE const SCAN_ORDER *get_default_scan(TX_SIZE tx_size,
static INLINE int do_adapt_scan(TX_SIZE tx_size, TX_TYPE tx_type) {
(void)tx_size;
if (tx_size_2d[tx_size] >= 1024 && tx_type != DCT_DCT) return 0;
if (tx_size > TX_32X16) return 0;
return tx_type < IDTX;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment