Integer DCT approximation constraints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The question: preserving symmetry structure of DCT and orthonormality | |
| (up to scale), how many DoFs are left in integer block transforms? | |
| I wrote a small program that computes the matrix form and resulting | |
| constraints. | |
| S is the overall squared scaling factor. In practice, the S=... constraints | |
| only have to be met approximately (resulting in a transform that's still | |
| orthogonal and close to uniform gain). The off-diagonal (0=) constraints | |
| better be exactly satisfied, though, or we lose orthogonality. | |
| N = 4 | |
| c(k) ~proportional to cos(k*pi/8) | |
| c2 c2 c2 c2 | |
| c1 c3 -c3 -c1 | |
| c2 -c2 -c2 c2 | |
| c3 -c1 c1 -c3 | |
| Constraints resulting from orthonormality: | |
| S = 2 * (c1^2 + c3^2) | |
| S = 4 * (c2^2) | |
| N = 8 | |
| c(k) ~proportional to cos(k*pi/16) | |
| c4 c4 c4 c4 c4 c4 c4 c4 | |
| c1 c3 c5 c7 -c7 -c5 -c3 -c1 | |
| c2 c6 -c6 -c2 -c2 -c6 c6 c2 | |
| c3 -c7 -c1 -c5 c5 c1 c7 -c3 | |
| c4 -c4 -c4 c4 c4 -c4 -c4 c4 | |
| c5 -c1 c7 c3 -c3 -c7 c1 -c5 | |
| c6 -c2 c2 -c6 -c6 c2 -c2 c6 | |
| c7 -c5 c3 -c1 c1 -c3 c5 -c7 | |
| Constraints resulting from orthonormality: | |
| S = 2 * (c1^2 + c3^2 + c5^2 + c7^2) | |
| S = 8 * (c4^2) | |
| S = 4 * (c2^2 + c6^2) | |
| 0 = -c1*c3 + c1*c5 + c3*c7 + c5*c7 | |
| N = 16 | |
| c(k) ~proportional to cos(k*pi/32) | |
| c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 c8 | |
| c1 c3 c5 c7 c9 c11 c13 c15 -c15 -c13 -c11 -c9 -c7 -c5 -c3 -c1 | |
| c2 c6 c10 c14 -c14 -c10 -c6 -c2 -c2 -c6 -c10 -c14 c14 c10 c6 c2 | |
| c3 c9 c15 -c11 -c5 -c1 -c7 -c13 c13 c7 c1 c5 c11 -c15 -c9 -c3 | |
| c4 c12 -c12 -c4 -c4 -c12 c12 c4 c4 c12 -c12 -c4 -c4 -c12 c12 c4 | |
| c5 c15 -c7 -c3 -c13 c9 c1 c11 -c11 -c1 -c9 c13 c3 c7 -c15 -c5 | |
| c6 -c14 -c2 -c10 c10 c2 c14 -c6 -c6 c14 c2 c10 -c10 -c2 -c14 c6 | |
| c7 -c11 -c3 c15 c1 c13 -c5 -c9 c9 c5 -c13 -c1 -c15 c3 c11 -c7 | |
| c8 -c8 -c8 c8 c8 -c8 -c8 c8 c8 -c8 -c8 c8 c8 -c8 -c8 c8 | |
| c9 -c5 -c13 c1 -c15 -c3 c11 c7 -c7 -c11 c3 c15 -c1 c13 c5 -c9 | |
| c10 -c2 c14 c6 -c6 -c14 c2 -c10 -c10 c2 -c14 -c6 c6 c14 -c2 c10 | |
| c11 -c1 c9 c13 -c3 c7 c15 -c5 c5 -c15 -c7 c3 -c13 -c9 c1 -c11 | |
| c12 -c4 c4 -c12 -c12 c4 -c4 c12 c12 -c4 c4 -c12 -c12 c4 -c4 c12 | |
| c13 -c7 c1 -c5 c11 c15 -c9 c3 -c3 c9 -c15 -c11 c5 -c1 c7 -c13 | |
| c14 -c10 c6 -c2 c2 -c6 c10 -c14 -c14 c10 -c6 c2 -c2 c6 -c10 c14 | |
| c15 -c13 c11 -c9 c7 -c5 c3 -c1 c1 -c3 c5 -c7 c9 -c11 c13 -c15 | |
| Constraints resulting from orthonormality: | |
| S = 8 * (c4^2 + c12^2) | |
| S = 16 * (c8^2) | |
| S = 4 * (c2^2 + c6^2 + c10^2 + c14^2) | |
| S = 2 * (c1^2 + c3^2 + c5^2 + c7^2 + c9^2 + c11^2 + c13^2 + c15^2) | |
| 0 = -c1*c5 - c1*c13 + c3*c7 - c3*c15 + c5*c7 - c9*c11 + c9*c13 - c11*c15 | |
| 0 = -c1*c7 - c1*c9 + c3*c5 + c3*c11 + c5*c13 - c7*c15 + c9*c15 - c11*c13 | |
| 0 = -c1*c3 + c1*c11 - c3*c9 + c5*c9 - c5*c15 + c7*c11 + c7*c13 + c13*c15 | |
| 0 = -c2*c6 + c2*c10 + c6*c14 + c10*c14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment