# Data Embedding in SHVC Video Using Threshold-Controlled Block Splitting
## 3 Proposed Data Embedding Method
### Data Embedding
The encoder will then compute the prediction error by comparing the predicted values (obtained by using this new mode) to the original ones. The prediction error is then transformed, quantized and entropy coded. Note that embedding more data using the intra prediction mode may lead to larger prediction error, and when the error is too large the other mode might be selected. Therefore, careful consideration is required when determining the number of bits embedded per intra predicted block. Naturally, if a spatial scalable encoded video contains more layers, then more bits can be embedded. Likewise, when both intra- and inter-coded blocks are jointly utilized to embed data, more data can certainly be embedded. Therefore, we propose to utilize both intra prediction mode and MVP in all coded layers to embed data. Here, instead of using the MV of the inter-coded block, the parity bit of MVP indices is utilized to represent the payload bits. Recall that the predictive syntax element MVP was introduced in the HEVC and its extensions to improve the predictive coding of MVs for a coding block by using the neighboring motion information. Specifically, the difference between the MV of the block to be coded and the selected MVP is reduced (i.e., smaller range) so that the number of bits to be coded also becomes smaller. As an extension of the HEVC standard, the MVs from the spatial and temporally adjacent blocks are utilized as the MVP candidates. ```
TBB-DE(\(CULd_{i}\), \(M\))
1 perform motion estimation if\((d_{i}=d_{max})\)then
2 obtain \(m_{i}\) from \(M\)
3 associate \(m_{t}\) to MVP /* inter mode
4 end if
5 perform motion compensation
6 perform intra prediction if\((d_{i}=d_{max})\)then
7 embed \(m_{i}\) into IPM /* intra mode
8 end if
9 perform prediction error calculation
10 select intra or inter mode based on \(RDC\)
11 if\((d_{i}<d_{max})\)then
12 split \(CUL\) into \(c_{i},j\in 1.4\)
13 for\((j\gets 1\) to \(4)\)do
14 TBS-DE(\(c_{i},d_{i+1},M\))
15 end if
16 calculate accumulated \(RDC\), \(\mathcal{P}d_{i+1}\)
17 if\((\mathcal{P}_{d_{i+1}}<(\mathcal{P}_{d}\times(1+\tau))\)then
18\(\mathcal{P}_{d}\leftarrow\mathcal{P}_{d_{i+1}}\)
19\(CUL\gets c_{i},j\in 1.4\)
20 end if
21
22 end for
23
24 end for return;
```  
**Algorithm 1**Threshold-controlled Block Splitting and Data Embedding  
Then, an MVP can be flexibly selected by specifying the MVP index from this candidate list. Subsequently, MVD, which captures the difference between the current MV and the MVP, together with the MVP index, are encoded and signaled to the decoder. In particular, MVP is derived from the MVs of the spatially neighboring blocks (i.e., \(A_{0}\), \(A_{1}\), \(B_{0}\), \(B_{1}\) and \(B_{2}\)) and/or temporally co-located neighboring block (i.e., \(C_{0}\), \(C_{1}\), \(D_{0}\) and \(D_{1}\)) as shown in Figure 4. The temporal MVP candidate for predicting MV for the current block can selected from more than one reference picture. For example, the first temporal MVP candidate is from the reference picture in the same coding layer while the second MVP candidate is from an inter-layer reference picture. Here, the selection of the MVP candidate depends on the value of \(m_{i}\in\{0,1\}\). Instead of using the MVP determined by RDO, motion information of the MVP candidate whose index (parity) matches \(m_{i}\) is selected for coding. Note that the selected MVP is either the best or first runner-up candidate with the minimum cost for inter picture prediction. The advantages of using MVP as a data carrier as compared to the conventional MV technique is that the predicted MV (magnitude and angle) remains unchanged (i.e., MV = MVP + MVD), hence the quality of inter-coded block can be preserved [21]. In addition, visual quality degradation in the processed video can be kept to the minimum by restricting data embedding to the smallest blocks (i.e., \(4\times 4\) in intra mode as well as \(8\times 4\) or \(4\times 8\) in inter mode) while skipping the rest. Therefore, in this work, only the smallest-coded blocks are leveraged to embed data.