SVSHAPE1[28:29] <- 0b01 # j+halfstep schedule
# FRC (coefficients)
SVSHAPE2[28:29] <- 0b10 # k schedule
- # set schedule up for DCT Inner butterfly
- # SVRM Mode 2 is for pre-calculated coefficients,
- # SVRM Mode 4 is for on-the-fly (Vertical-First Mode)
- if (SVRM = 0b0010) | (SVRM = 0b0100) then
+ # set schedule up for (i)DCT Inner butterfly
+ # SVRM Mode 2 (Mode 6 for iDCT) is for pre-calculated coefficients,
+ # SVRM Mode 4 (Mode 12 for iDCT) is for on-the-fly (Vertical-First Mode)
+ if ((SVRM = 0b0010) | (SVRM = 0b0100) |
+ (SVRM = 0b1010) | (SVRM = 0b1100)) then
# calculate O(N log2 N)
n <- [0] * 3
do while n < 5
# set up template in SVSHAPE0, then copy to 1-3
# set up FRB and FRS
SVSHAPE0[0:5] <- (0b0 || SVxd) # xdim
- SVSHAPE0[30:31] <- 0b01 # DCT/FFT mode
- if (SVRM = 0b0100) then
- SVSHAPE0[6:11] <- 0b000011 # DCT Inner Butterfly mode 4
+ if (SVRM = 0b1010) | (SVRM = 0b1100) then
+ SVSHAPE0[30:31] <- 0b11 # iDCT mode
+ else
+ SVSHAPE0[30:31] <- 0b01 # DCT mode
+ if (SVRM = 0b1100) | (SVRM = 0b0100) then
+ SVSHAPE0[6:11] <- 0b000011 # (i)DCT Inner Butterfly mode 4
else
- SVSHAPE0[6:11] <- 0b000001 # DCT Inner Butterfly mode 2
+ SVSHAPE0[6:11] <- 0b000001 # (i)DCT Inner Butterfly mode 2
SVSHAPE0[18:20] <- 0b001 # DCT Inner Butterfly sub-mode
SVSHAPE0[21:23] <- 0b001 # "inverse" on outer loop
# copy
SVSHAPE2[28:29] <- 0b10 # ci (k for mode 4) schedule
if (SVRM != 0b0100) then
SVSHAPE3[28:29] <- 0b11 # size schedule
- # set schedule up for DCT Outer butterfly
- if (SVRM = 0b0011) then
+ # set schedule up for (i)DCT Outer butterfly
+ if (SVRM = 0b0011) | (SVRM = 0b1011) then
# calculate O(N log2 N) number of outer butterfly overlapping adds
vlen[0:6] <- [0] * 7
n <- 0b000
# set up template in SVSHAPE0, then copy to 1-3
# set up FRB and FRS
SVSHAPE0[0:5] <- (0b0 || SVxd) # xdim
- SVSHAPE0[30:31] <- 0b01 # DCT/FFT mode
+ if (SVRM = 0b1011) then
+ SVSHAPE0[30:31] <- 0b11 # iDCT mode
+ SVSHAPE0[18:20] <- 0b011 # iDCT Outer Butterfly sub-mode
+ else
+ SVSHAPE0[30:31] <- 0b01 # DCT mode
+ SVSHAPE0[18:20] <- 0b100 # DCT Outer Butterfly sub-mode
SVSHAPE0[6:11] <- 0b000010 # DCT Butterfly mode
- SVSHAPE0[18:20] <- 0b100 # DCT Outer Butterfly sub-mode
# copy
SVSHAPE1[0:31] <- SVSHAPE0[0:31]
SVSHAPE2[0:31] <- SVSHAPE0[0:31]