## 3 Reversible Watermarking Based on intDCT
### Integer Discrete Cosine Transform  
The integer discrete cosine transform (intDCT) is a transform similar to the discrete cosine transform (DCT) [29]. The unique feature of intDCT is that both the original and transformed signals are a series of integers. Since most media data, such as image, audio, and video, are encoded as integer values, the intDCT is used for lossless processing of those media data [24; 30; 31; 32].  
Let  
\[h = (h(1)\;h(2)\;\ldots\;h(N))^{T} \tag{1}\] \[H = (H(1)\;H(2)\;\ldots\;H(N))^{T} \tag{2}\]  
be a time-domain signal at an \(N\)-point frame and its DCT coefficients, respectively. In a continuous case, we can obtain DCT coefficients \(H\) from a time-domain signal \(h\) by DCT-IV matrix as  
\[H=C_{N}^{IV}h \tag{3}\]  
where the \((i,t)\)-th (\(1\leq i\leq N,1\leq t\leq N\)) elements of the DCT matrix \(C^{IV}\) are represented as  
\[C_{N}^{IV}(i,t)=\sqrt{\frac{2}{N}}\Bigg{[}\cos\Bigg{(}\frac{(t+\frac{1}{2})(i +\frac{1}{2})\pi}{N}\Bigg{)}\Bigg{]} \tag{4}\]  
Here, an input signal \(\mathbf{h}\) is an integer, while \(C^{IV}\) is not. Although we can obtain the integers of \(\mathbf{H}\) by applying the rounding operation to \(C_{N}^{IV}\mathbf{h}\), it leads to information loss, which means \(H\) is irreversible. Here we need the reversible DCT.  
In intDCT, the integer signal in the time domain is reversibly transformed into integer DCT coefficients. The reversibility of intDCT is based on the following factorization [33].  
\[C_{N}^{IV}=R_{1}R_{2}ST_{1}T_{2} \tag{5}\]  
where  
\[R_{1}=\left[\begin{array}{cc}I_{N/2}&0\\ H_{1}&I_{N/2}\end{array}\right], \tag{6}\]  
\[T_{1}=\left[\begin{array}{cc}-D_{N/2}&K_{2}\\ 0&I_{N/2}\end{array}\right], \tag{7}\]  
\[S=\left[\begin{array}{cc}I_{N/2}&0\\ H_{3}+K_{1}&I_{N/2}\end{array}\right], \tag{8}\]  
\[R_{2}=\left[\begin{array}{cc}I_{N/2}&H_{2}\\ 0&I_{N/2}\end{array}\right], \tag{9}\]  
\[T_{2}=\left[\begin{array}{cc}I_{N/2}&0\\ K_{3}&I_{N/2}\end{array}\right]. \tag{10}\]  
Here, \(I_{N/2}\) is the identity matrix of order \(N/2\). \(R_{1}\), \(R_{2}\), \(S\), \(T_{1}\), \(T_{2}\) are block triangular matrices defined in [33]. \(K_{1},K_{2},K_{3}\), \(H_{1}\), \(H_{2}\), \(H_{3}\), \(D\) are as follows:  
\[K_{1}=-(C_{N/2}^{IV}D_{N/2}+\sqrt{2}I_{N/2})C_{N/2}^{IV} \tag{11}\]\[K_{2}=\frac{C_{N/2}^{IV}}{\sqrt{2}} \tag{12}\] \[K_{3}=\sqrt{2}C_{N/2}^{IV}D_{N/2}+I_{N/2}\] (13) \[H_{1}=\left[\begin{array}{cccc}0&0&\cdots&-\tan\frac{(N-1)\pi}{ 8N}\\ \vdots&\iddots&\vdots\\ 0&-\tan\frac{3\pi}{8N}&\cdots&0\\ -\tan\frac{\pi}{8N}&0&\cdots&0\\ \end{array}\right],\]  
\[H_{3}=H_{1}, \tag{14}\] \[H_{2}=\left[\begin{array}{cccc}0&\cdots&0&\sin\frac{\pi}{4N}\\ 0&\cdots&\sin\frac{3\pi}{4N}&0\\ \vdots&\iddots&\vdots\\ \sin\frac{(N-1)\pi}{4N}&0&\cdots&0\\ \end{array}\right],\] (15) \[D=\left[\begin{array}{cccc}1&0&0&\cdots&0\\ 0&-1&0&\cdots&0\\ 0&0&1&\cdots&0\\ 0&0&0&\ddots&0\\ 0&0&0&\cdots&-1\\ \end{array}\right]. \tag{16}\]  
This equation shows that a DCT matrix can be factorized into the product of block triangular matrices with block identity diagonals. Multiplying a triangular matrix followed by a rounding operation can be reversible even if elements of the triangular matrix are not integers. This property also holds in the block matrix case. Therefore, iteratively multiplying triangular matrices in order and applying the rounding operation can be completely reversible [13].