# Mixed type 2D FourierDCT

Is there way to get Mathematica to do a FourierDCT that is of mixed "type"?

To clarify suppose we have some data on a 2D grid that includes the boundary,

type1grid =   Table[N[Cos[x] Cos[y]], {x, 0, Pi, Pi/10}, {y, 0, Pi, Pi/10}]


In this case we can do a "Type I" FourierDCT to recover the coefficients, i.e.

Chop@FourierDCT[type1grid, 1]


will produce a grid of zeroes, except at the (2,2) position.

Similarly, if we have a similar grid of data that avoids the boundary,

type2grid = Table[N[Cos[x] Cos[y]], {x, Pi/20, Pi, Pi/10}, {y, Pi/ 20, pi, Pi/10}],


we can do a "type II" FourierDCT to extract the coefficients, i.e.

Chop@FourierDCT[type2grid, 2]


will again produce a grid of zeroes, except at the (2,2) position.

Now suppose we have a grid that in one direction includes the boundaries and in the other avoids the boundary,

 mixedgrid = Table[N[Cos[x] Cos[y]], {x, 0, Pi, Pi/10}, {y, Pi/ 20, pi, Pi/10}].


I would like to be able to do a "mixed type I/II" FourierDCT that recovers the correct coefficients. The Mathematica documentation for FourierDCT does not mention this as an option, and naively trying

Chop@FourierDCT[mixedgrid, {1, 2}]


results in Mathematica asserting that the second argument should be 1, 2, 3, or 4.

Short of outright implementing a FastDCT from scratch, is there a way to do the mixed type FourierDCT using built in functions?

(type3grid =