Digital Video Scrambling Method Using Intra Prediction Mode Jinhaeng Ahn1 , Hiuk Jae Shim2 , Byeungwoo Jeon3 , and Inchoon Choi4 School of Information and Communication Engineering, Sungkyunkwan University 300 Chunchun-dong, Jangan-gu, Suwon, Kyunggi-do, Republic of Korea. {1 skajh,2 waitnual,4 sonne}@ece.skku.ac.kr,3
[email protected]
Abstract. As the amount of digitalized contents increases rapidly, ‘security’ necessarily arises as one of the most important issues. The main distribution channel of digital contents is Internet which is very easily accessible. Therefore content protection becomes a major issue as important as data coding techniques. In recent years, many developers have studied techniques that allow only authorized person to access contents. Among them, scrambling is one of well-known security techniques. In this paper, we propose a simple and effective digital video scrambling method which utilizes the intra block properties of a recent video coding technique, H.264. In addition to its simplicity, the proposed method does not cause bit rate increase after scrambling.
1
Introduction
As digital contents have been widely produced, security of multimedia data is highly required. By its nature, the feature that one can easily copy and distribute digital content has been believed to be advantageous for a while; however, it is no longer just “advantageous” in these days. Especially digital video sequences are widely distributed through non-private channel such as satellite links, cable television networks, wireless networks, and the Internet. Accordingly, video content providers demand more secure but simple techniques such as video scrambling. In general, video scrambling is a well-known analog technique that protects cable television signal from unauthorized user. In this paper, the main concept of scrambling is translated into the digital form of video signals, and digital video scrambling techniques applicable to MPEG-1, 2, 4 have been proposed. A digital video scrambling method distorts video signal as much as one can barely recognize original one. Only an authorized receiver who has ‘key’ or a descrambler can properly restore the original video signal. There is an additional purpose that an unauthorized receiver decodes incorrectly a scrambled video sequence. Despite distorted visual quality, one can still recognize important objects such as actor’s movement which stimulates an unauthorized viewer’s interest. In recent years, many researchers have proposed various different scrambling techniques [1]- [5]. The motion vector scrambling method utilizes CBP (Coded Block Pattern) information and motion vectors [5]. In inter frame coding, VLC code of the given K. Aizawa, Y. Nakamura, and S. Satoh (Eds.): PCM 2004, LNCS 3333, pp. 386–393, 2004. c Springer-Verlag Berlin Heidelberg 2004
Digital Video Scrambling Method Using Intra Prediction Mode
387
motion vector is changed in accordance to the value of CBP modula 33. However, it has main disadvantage of increased bit rate of scrambled video. Another existing scrambling method utilizes frequency domain such as wavelet or DCT [1]. There are many wavelet transform-based scrambling techniques such as selective bit scrambling, block shuffling, block rotation, etc., however, most of video coding methods such as MPEG-1, 2, 4, and H.264 do not adopt wavelet transform process. As a result, an additional wavelet transform process is required to scramble and descramble video sequences, and these methods have the same drawback of increased bit rate after scrambling. There are also many scrambling techniques based on 8x8 DCT transform. Those are DCT coefficient scrambling, motion vector scrambling, sign encryption, and so on. Most of these techniques also increase the bit rate of video sequence like other existing techniques [2]. Among them, the sign encryption [1] is one which does not increase bit rate, however, computational overheads are considerably increased. Since it changes the sign of every DCT coefficient, coding complexity is increased by up to about 15-20% [1]. Therefore we can conclude that both bit rate increase and complexity are the major problems of video scrambling techniques. Under the constraints, we propose a new scrambling method utilizing an intra block coding scheme. The proposed method satisfies its original purpose that it distorts visual quality but still provides minimal information which can induce interest of unauthorized receiver at the same time. However the proposed technique does not increase bit rate, and it is efficient and easy to implement. Also, there is little increase of complexity increases. Therefore it will be an attractive method on providing digital video. The proposed method is described in Section 2, and its experimental results are shown in Section 3. Then we summarize the whole procedure and draw conclusion in Section 4.
2
Proposed Scrambling Method
The H.264 video coding standard employs intra prediction technique in order to remove spatial redundancies within intra frame. To decide the best intra prediction, it calculates SAD (Sum of Absolute Difference) as prediction error along specified directions, and a mode that has the smallest error is decided as the chosen intra prediction mode. After calculating the intra prediction mode, prediction residual values are obtained by subtracting the pixel values of selected prediction mode from current block. Then both the residual values and the prediction mode are transmitted to entropy encoder. Since video sequences can be easily distorted by modification of the prediction mode, the intra prediction mode is our main target for easy video scrambling. Accordingly the proposed scrambling method is based on intra block coding. In addition to the simple modification of intra block, another reason of considering only intra block is the effect of error propagation. The first frame of every video sequence is encoded with the intra coding technique and following inter frames refer the intra frame during inter coding. Therefore if we scramble only intra frame, inter frames
388
J. Ahn et al.
undergo distortion propagated from the scrambled intra frame. Due to this error propagation, we don’t have to scramble every inter frame. The Intra coding scheme in H.264 has two cases: The Intra 4x4 and the Intra 16x16. In case of the Intra 4x4, the size of unit block is 4x4 and there are 9 directions of intra prediction mode. Since the 4x4 prediction modes consist of 9 cases, at least 4 bits are required to encode the selected mode correctly. However, only 3 bits are used by utilization of a flag bit. It is called ‘prev intra4x4 pred mode’. If the prediction mode of current block is equal to minimum prediction mode of its two neighboring upper and left blocks, the flag bit is set to ‘1’. Otherwise, the flag bit is set to ‘0’. By signaling the flag bit, we can exclude one mode which is equal to the minimum value from 9 modes. Therefore only 8 modes are to be encoded, which means only 3 bits are enough to represent every mode. Thus Intra 4x4 prediction mode is encoded with 3 bits fixed length code. In the Intra 4x4 prediction, every prediction mode is calculated with neighboring upper or left block of current block. For instance, if only upper block is available, then ‘horizontal’, ‘diagonal down/right’, ‘vertical right’, ‘diagonal down/left’, and ‘horizontal up’ modes can be chosen. Therefore, in case that either upper or left block is not available to current block, the number of available mode can be reduced. However, the proposed scramble method modifies prediction modes only when both neighboring blocks are available. Since both blocks are available in most cases, it is enough to scramble video sequence, and the consideration of neighboring block increases its complexity. However, if more visual distortion is required, it is also possible to consider every case of existing block such as ‘both available’, ‘only upper available’, ‘only left available’, and ‘both unavailable’. When the flag bit is ‘1’, the encoder does not send the prediction mode and no scrambling is done in this case, but when the flag bit is ‘0’, intra prediction modes are modified. For scrambling, pseudo random sequence is generated by a given specific key. If the flag bit is “1”, 3 bits are read from the pseudo random sequence. And then we obtain new prediction mode with following equation. Modenew = Modeorg ⊕ 3 bits random sequence ,
(1)
where ⊕ is XOR (exclusive-or) operator. Since the length of Modenew and the original prediction mode are the same, there is no bit rate increase after the proposed scrambling procedure. In addition, the exclusive-or operator is very simple to implement, and complexity of the operator is trivial. Similarly in case of Intra 16x16, the size of unit block is 16x16 and there are 4 intra prediction modes. However, Intra 16x16 prediction modes are encoded in a different way from the Intra 4x4 case. In H.264 standard, the 16x16 prediction modes are encoded as variable length code instead of fixed length code. Moreover the Intra 16x16 prediction modes are jointly coded with luma and chroma CBP (Coded Block Pattern) values. Accordingly, the VLC table is utilized to encode the Intra 16x16 prediction mode. Since luma and chroma CBP is jointly coded with the prediction mode, the Intra 16x16 prediction modes can not be modified
Digital Video Scrambling Method Using Intra Prediction Mode
389
in the same way as Intra 4x4 are. When they are to be modified, the CBP values should not be changed; otherwise video sequences can not be decoded properly. Also bit rate should be preserved after scrambling. A simple way to satisfy these conditions is to find a pair of possible exchanging modes. For example, mode 0 and mode 1 in the VLC table shown in Table 1 constitutes a pair. Mode 2 and mode 3 is the other pair, and so on. Thus in case of the Intra 16x16, only one bit is required from the pseudo random sequence. If the bit is 1, then the parity bit of prediction mode is changed. Otherwise, the original prediction mode is not changed. This means that the mode is modified to its pair mode only when pseudo random sequence is 1. As one can see in Table 1, even though we change a mode to its pair mode, CBP values remain unchanged. Beside, the code length of the new mode and the original mode is the same. For example, since the pair of mode 1 is mode 0, when the pseudo random bit is 1 and the original mode is 0, mode 0 is modified to mode 1. Whatever the macroblcok type is, it is apparent that CBP value and the code length of both new mode and original mode are not changed as can be confirmed in Table 1. Table 1. VLC table for Intra 16x16 prediction mode mb type
Name of
Intra16x16
mb type
PredMode PatternChroma PatternLuma Legth Number
CodedBlock
CodedBlock Code
Pair
1
I 16x16 0 0 0
0
0
0
3
0
2
I 16x16 1 0 0
1
0
0
3
0
3
I 16x16 2 0 0
2
0
0
5
1
4
I 16x16 3 0 0
3
0
0
5
1
5
I 16x16 0 1 0
0
1
0
5
2
6
I 16x16 1 1 0
1
1
0
5
2
7
I 16x16 2 1 0
2
1
0
7
3
8
I 16x16 3 1 0
3
1
0
7
3
9
I 16x16 0 2 0
0
2
0
7
4
10 .. .
I 16x16 1 2 0 .. .
1 .. .
2 .. .
0 .. .
7 .. .
4 .. .
Since only the parity bit of a prediction mode is changed, there is no increase of complexity. And when the generated pseudo random sequence exhausted, we circulate the sequence to the first bit, which means that we read the required bits again from the beginning of the sequence. De-scrambling procedure is similar to the scrambling procedures. In case of the Intra 4x4, 3 bits are read from the given pseudo random sequence. Authorized receivers are supposed to have the same ‘key’ used by the scrambling procedure, therefore they can generate the pseudo random sequence. After reading 3 bits
390
J. Ahn et al.
from the pseudo random sequence, the original video can be reconstructed with exclusive-or operation. This is as follows. Modeorg = Modenew ⊕ 3 bits random sequence
(2)
The property of exclusive-or operator guarantees that original prediction mode is properly obtained. In case of the Intra 16x16, 1 bit is read from the pseudo random sequence. If the bit is 1, then is reverted the parity bit of received mode. ‘The bit is 1’ means that transmitter modifies an original mode to its pair mode. Therefore, we convert a received mode to its pair again. When the read bit is 0, we use a received mode as prediction mode. Consequently, only the authorized receiver with proper seed can reconstruct a scrambled video sequence, which is the same as the case of Intra 4x4. Similarly there are no increase in the size of bitstream and complexity. Scrambling and de-scrambling pseudo-codes are as follows. Scrambling Pseudo-code switch (Intra mode) case intra 4x4: if prev_intra4x4_pred_mode != 1 read 3 bits from pseudo random sequence new_mode = original_mode XOR 3_bits else new_mode = original_mode transmit new mode case intra 16x16: read 1 bit from pseudo random sequence if the bit == 1 change parity bit of original mode transmit the mode De-scrambling Pseudo-code switch (Intra mode) case intra 4x4: if prev_intra4x4_pred_mode != 1 read 3 bits from pseudo random sequence original_mode = received_mode XOR 3_bits case intra 16x16: read 1 bit from pseudo random sequence if the bit == 1 change parity bit of received mode
Digital Video Scrambling Method Using Intra Prediction Mode
3
391
Experimental Results
For the simulation of the proposed video scrambling, well-known sequences such as ‘paris’, ‘mother and daughter’, and ‘foreman’ sequences are used. The size of these sequences is CIF. Note that ‘Foreman’ sequence has camera panning, therefore, it hse only small number of intra blocks in inter frames. ‘Paris’ and ‘mother and daughter’ sequences contain complex and simple background, respectively. Since these backgrounds do not have motions, it remains as it is scrambled. All sequences are simulated with H.264 reference software JM (Joint Model) 8.1a under the baseline profile. Only the first frame of each sequence is encoded as Intra frame. The scrambled sequences of the proposed method are shown in Fig. 1. For the comparison of intra and inter frames, the first frame and the 100th frame are shown. All blocks in the first frame is scrambled. All other fames are encoded as inter frame. Therefore, only small number of intra blocks in the inter frames are scrambled. Thus inter frames are affected only by error propagation from the scrambled intra blocks mostly at the first intra frame. The effect of error propagation works as similar as the scrambling effect. This can be observed from Fig. 1 (b), (d), and (f).
4
Conclusion
We proposed a scrambling method using intra prediction mode in H.264. The proposed method is designed to scramble only the intra blocks, therefore there is no direct scrambling in inter blocks. The second inter frame, however, refers to scrambled intra blocks in the first frame as referencem. Therefore the second frame can not be reconstructed correctly. In the same manner, following successive frames refer to distorted blocks in their previous frames. Thus, scrambling errors of intra blocks are propagated through video sequence. As a result, we can obtain scrambling effects as much as intra blocks without direct inter scrambling. Therefore we can reduce computational overheads considerably in contrast to other scrambling methods that modify both intra and inter blocks. In addition, bit rate is not increased at all. The idea of our method is the simple modification of intra prediction mode without bit overheads, and is verified with H.264 video coding scheme. However this concept can be applied to other video coding schemes that adopt similar intra prediction techniques. The purpose of scrambling is to allow only authorized receiver to access the original video sequence. The proposed method achieves the goal without bit overheads. For correct descrambling, a pre-defined key is delivered to the authorized receiver. With the proposed method, video sequence is not totally distorted, which makes unauthorized receivers are still capable of recognizing slight movements which stimulate the interest of unauthorized receivers from scrambled sequences.
392
J. Ahn et al.
(a)
(b)
(c)
(d)
(e)
(f)
Fig. 1. The first and 100th decoded frames using the proposed scrambling method: (a) the first frame of ‘foreman’ sequence, (b) 100th frame of ‘foreman’ sequence, (c) the first frame of ‘paris’ sequence, (d) 100th frame of ‘paris’ sequence, (e) the first frame of ‘mother and daughter’ sequence, (f) 100th frame of ‘mother and daughter’ sequence
Digital Video Scrambling Method Using Intra Prediction Mode
393
References 1. W. Zeng and S. Lei: Efficient frequency domain selective scrambling of digital video IEEE Transactions on Multimedia, March (2003) 118–129 2. B. Macq and J. Quisquate: Digital images multiresolution encryption Interactive Multimedia Assoc. Intell. Property Proj., Jan. (1994) 179–186 3. W. Zeng and S. Lei: Efficient frequency domain video scrambling for content access control ACM Multimedia ’99, Nov. (1999) 4. N. Katta et al. Scrambling apparatus and descramble apparatus U.S patent 5377266, Dec. 27 (1994) 5. J. Junpil: Digital video scrambling method KR patent 0151199, Jun. 18 (1998)