Commit 909bbe73 authored by Angie Chiang's avatar Angie Chiang

Add flip feature to vp10_inv_txfm2d.c

Change-Id: Id5f0fade42749d2bed5553eda0d690af22b6c5b1
parent 6a752533
......@@ -168,45 +168,6 @@ static const TXFM_2D_CFG* fwd_txfm_cfg_ls[TX_TYPES][TX_SIZES] = {
};
#endif // CONFIG_EXT_TX
void set_flip_cfg(int tx_type, TXFM_2D_FLIP_CFG* cfg) {
switch (tx_type) {
case DCT_DCT:
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
cfg->ud_flip = 0;
cfg->lr_flip = 0;
break;
#if CONFIG_EXT_TX
case FLIPADST_DCT:
cfg->ud_flip = 1;
cfg->lr_flip = 0;
break;
case DCT_FLIPADST:
cfg->ud_flip = 0;
cfg->lr_flip = 1;
break;
case FLIPADST_FLIPADST:
cfg->ud_flip = 1;
cfg->lr_flip = 1;
break;
case ADST_FLIPADST:
cfg->ud_flip = 0;
cfg->lr_flip = 1;
break;
case FLIPADST_ADST:
cfg->ud_flip = 1;
cfg->lr_flip = 0;
break;
#endif // CONFIG_EXT_TX
default:
cfg->ud_flip = 0;
cfg->lr_flip = 0;
assert(0);
}
}
TXFM_2D_FLIP_CFG vp10_get_fwd_txfm_cfg(int tx_type, int tx_size) {
TXFM_2D_FLIP_CFG cfg;
set_flip_cfg(tx_type, &cfg);
......
This diff is collapsed.
......@@ -14,6 +14,7 @@
#include <math.h>
#include <assert.h>
#include "vp10/common/enums.h"
#include "vpx/vpx_integer.h"
#include "vpx_dsp/vpx_dsp_common.h"
......@@ -171,6 +172,44 @@ typedef struct TXFM_2D_FLIP_CFG {
const TXFM_2D_CFG* cfg;
} TXFM_2D_FLIP_CFG;
static INLINE void set_flip_cfg(int tx_type, TXFM_2D_FLIP_CFG* cfg) {
switch (tx_type) {
case DCT_DCT:
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
cfg->ud_flip = 0;
cfg->lr_flip = 0;
break;
#if CONFIG_EXT_TX
case FLIPADST_DCT:
cfg->ud_flip = 1;
cfg->lr_flip = 0;
break;
case DCT_FLIPADST:
cfg->ud_flip = 0;
cfg->lr_flip = 1;
break;
case FLIPADST_FLIPADST:
cfg->ud_flip = 1;
cfg->lr_flip = 1;
break;
case ADST_FLIPADST:
cfg->ud_flip = 0;
cfg->lr_flip = 1;
break;
case FLIPADST_ADST:
cfg->ud_flip = 1;
cfg->lr_flip = 0;
break;
#endif // CONFIG_EXT_TX
default:
cfg->ud_flip = 0;
cfg->lr_flip = 0;
assert(0);
}
}
#ifdef __cplusplus
extern "C" {
#endif
......
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