Professional Documents
Culture Documents
H.264/AVC Video
Yih-Chuan Lin and Jung-Hong Li
Dept. of Computer Sciences and Information Engineering, National Formosa University, Yunlin, Taiwan.
E-mail: lyc@nfu.edu.tw
Abstract - This paper proposes a data hiding algorithm for the video quality caused by the watermark hiding can be
H.264/AVC standard videos. The proposed video data hiding controlled at the bound less than 2 dB.
scheme embeds information that is useful to some specific The remainder of this paper is organized as follows.
applications into the symbols of context adaptive variable Section 2 describes the watermarking principles and related
length coding (CAVLC) domain in H.264/AVC video streams. literatures. Section 3 explains our proposed scheme, including
In order to minimize the changes on both the reproduced video the watermark embedding/extracting schemes and embedding
quality and the output bit-rate, the algorithm selects DCT restriction rule. In Section 4, the performance of our proposed
blocks using a coefficient energy difference (CED) rule and scheme is presented. Finally, some conclusions are given in
then modifies the minor significant symbols, trailing one (T1) Section 5.
symbols and the least significant bits (LSB) of non-zero
quantized coefficient symbols, to hide data into the selected II. BACKGROUND
blocks. Upon considering the joint optimization on rate and In general, most data hiding methods in H.264/AVC are
distortion, the data hiding algorithm considers the data hiding based on entropy coding symbols or motion vectors (MV).
task as a special quantization process and performs within the There are two kinds of entropy coding method in H.264/AVC:
rate-distortion optimization loop of H.264/AVC encoder. The CAVLC and CABAC (Context-adaptive binary arithmetic
experiment results have demonstrated that our scheme has coding). Many scholars choose CAVLC to develop because it
good efficiency on hiding capacity, video quality and output is not complicated and is easy to operate for most situations.
bit-rate. We can modify those nonzero coefficients in DCT blocks for
Keywords: H.264/AVC, data hiding, CAVLC, reconstruction embedding, but it would affect the bit-rate and video quality
loop, coefficient energy difference. seriously. Although the watermark hiding in the DCT blocks is
easy to develop, we should consider avoiding unnecessary
I. INTRODUCTION problems.
Information hiding (or called data hiding interchangeably After transform and quantization, a DCT block usually
hereafter) for video is a video process that adds some useful contains sparse zeros and nonzero coefficients. The nonzero
data to the raw data or compressed formats of the video in a coefficients in high-frequency after the zig-zag reorder are
manner such that the third parties or others can not discern the often sequences ±1, which are called trailing one and they are
presence or contents of the hidden message in perception. limited only up to three at most in H.264/AVC. When the
H.264/AVC can provide better compression efficiency number of trailing ones becomes more, the coding length is
than other exiting standard at the cost of high computation shortest. So most researchers are focus on this part to develop
complexity. Owing to the high popularity of this standard algorithm in data hiding. Consider changing the coefficients in
format over many video applications, the hiding of useful data a DCT block. Four symbols for the CAVLC are available:
into this format attracts a great deal of attention for different coeff_token, trailing_ones_sign_flag, total_zero, and
applications. Recently, many researchers are committed to run_before. The coeff_token is composed of nonzero
develop watermark schemes in H.264/AVC [1-4], but in order coefficients and T1 in a DCT block. In the same case, if the
to make a balance between video quality and bit-rate; they number of trailing one increases, the bit-rate will reduce. On
usually offer only a small capacity to hide data. This paper the contrary, when the number of coefficient is raised, the
proposes a data hiding (or called watermark interchangeably bit-rate will increase oppositely.
hereafter) scheme that is based on the CAVLC in H.264/AVC In Wu et al. [4], their proposed method is emphasizing on
encoder and decoder sides. In the proposed method, one robustness to the compression attacks for H.264/AVC with
watermark bit is embedded by employing the relationship more than a 40:1 compression ratio in I frame. The data
between all of the polarity of T1 symbols in a 4x4 luminance embedded to the predicted 4x4 DCT block is only one bit. In
DCT block. If the DCT block has no any T1, the algorithm Tian et al. [5], this proposed method just modified the nonzero
considers modifying the LSB of the last nonzero coefficient coefficients. Therefore, the bit-rate increase is about 0.1% and
for embedding information. Experiment results have shown the PSNR degradation is less then 0.5dB. It is good at keeping
that our proposed method provide more capacity and can low bit-rate and high quality. However the capacity is too low.
enhance the rate-distortion efficiency. The degradation of In Liao et al. [6], this method embeds message into the trailing
ones of 4x4 blocks during the CAVLC. The feature of this
method is to allow data hiding directly in the compressed is intra-mode, the encoder performs intra-prediction and the
stream in real time and the capacity is more than others [5-6]. mode set contains only I4MB, I16MB and IPCM modes.
In Shahid et al. [7], this proposed method also embeds
watermark into DCT blocks. It modifies the LSB of
coefficients in each inter- and intra-frames and provides a high
capacity of data hiding. In Huang et al. [8], this method is a
new steganography scheme with capacity variability and
synchronization for secure transmission of acoustic data, In
Wang et al. [9], the method has good efficiency, it are always
higher than 45 dB at the hiding capacity of 1.99 bpp by
embedding for all test images
Table II The pseudo code for Embedding Algorithm Table III The pseudo code for Extracting Algorithm
Embedding Algorithm Extracting Algorithm
"
Input: DCTB Input: DCTB
Output: DCTB " Output: W
Initialization: Initialization:
T 1set getT 1set ( DCTB ) T 1set getT 1set ( DCTB )
numT1 getT1count (T 1set ) numT1 getT1count (T 1set )
numLevel getLevcount ( DCTB) numLevel getLevcount ( DCTB)
Begin Embedding() Begin Extracting()
if( numT1 0 ) if( numT1 0 )
coeEngergy getEnergy (DCTB ) coeEngergy getEnergy ( DCTB " )
if( coeEngergy Threshold ) if( coeEngergy Threshold )
W XorT1Polarity(T1set )
"
W XorT1Polarity(T1set )
if( W "! W ) output W
LastT1 getLastT1Index( DCTB) end
ChangeSign( DCTB, LastT 1) else if( numT 1 0 & &numlevel 0 )
output DCTB" LastLevel getLastLevIndex( DCTB " )
end W getLSB ( DCTB " , LastLevel )
end output W
else if( numT1 0 & &numlevel 0 ) end
LastLevel getLastLevIndex(DCTB ) End
ChangeLSB ( DCTB , LastLevel ,W )
output DCTB" IV. EXPERIMENTAL RESULTS
end
End A. THE EXPERIMENT ENVIRONMENT
The second part, when the number of nonzero Table IV the experimental parameters for H.264/AVC codec.
coefficients is nonzero and the number of trailing one is zero, Parameter Information
utilizes the last level to change the LSB for hiding data. Profile IDC 66(baseline)
Otherwise if the number of levels and trailing ones are zero, Intra period 15(I-P-P-P)
we do not perform the embedding work. The advantage of the Slice mode 0
method in the first case is that the change of the sign does not Frames to be encoded 300
affect other symbols in the same block. According to the Motion Estimation scheme Fast Full Search
CAVLC rule, the trailing_ones_sign_flag indicate the sign of Rate Control Disable
trailing one, it is encoded as one bit in the NAL (Network
Abstraction Layer). If the sign is negative, it will be encoded Table V the test video format parameters
bit 1. On the contrary, if the sign of trailing one is positive, it Parameter Information
will be encoded one bit 0. We change only the sign of last Video format QCIF
trailing one so that the encoded block has the same length as YUV format 4:2:0
that prior to embedding process. Frame Size 176×144
D. EXTRACTING ALGORITHM Frame rate 30 fps
The extracting phase as shown in Table III is easier than
the embedding phase. The watermarking extracting algorithm We utilize the H.264/AVC JM Reference software [9] as
is performed between the entropy decoding phase and the the platform to simulate our proposed method. This subsection
inverse quantization phase. We find out all of the trailing ones presents that the experiment parameters for our method in JM
in current DCT block firstly and calculate the CED value; if reference software. We use the version of JM software is 12.2,
the CED is lower than threshold, we collect all of the polarity where the related environmental parameters are shown in
values for each trailing one to do XOR operation to get the Table IV. In the experiment, four videos: “akiyo,” “foreman,”
“mobile,” and “news” are used as test data set. Their format
information is shown in Table V. The secret data to be hided Table VI Comparison the efficiency between the original’s
into the test videos is a random bit stream. and proposed method for foreman in QP = 15
QP = 15
B. The EXPERIMENT RESULTS
PSNR(dB) Bit-rate(kbit) Capacity(bit)
In this subsection, we demonstrate the experiment results Original 47.32 969.62
and make an explanation about the results. Three methods are without ER 45.18 1070.09 337752
considered. The original method refers to the method without With ER
data hiding; the “within RDO” method represents the method
T=0.5 46.35 1023.22 165019
operated in the RDO loop while the “without RDO” method
T=0.1 46.35 1024.11 164923
means that it executes after the RDO stage in the
T=0.05 46.36 1025.11 165190
reconstruction loop of encoder. As shown in Figs. 6 and 7, the
“within RDO” method is superior to the “without RDO” in
Table VII Comparison the efficiency between the original and
terms of the output video bit-rate and the reconstructed video
embedding method for foreman in QP = 27
PSNR.
QP = 27
PSNR(dB) Bit-rate(kbit) Capacity(bit)
Original 37.5 196.26
without ER 36.62 228.05 80708
With ER
T=0.5 37.33 205.92 22118
T=0.1 37.33 205.7 22216
T=0.05 37.32 205.59 22273
ACKNOWLEDGEMENT
This research is supported in part by National Science Council,
Taiwan under the grant NSC 98-2221-E-150-051
REFERENCES
[1] G. Qiu, P. Marziliano, A. Ho, D. He, Q. Sun, “A Hybrid
Watermarking Scheme for H.264 Video”, Processing of
the 17th International Conference on Pattern Recognition,
ICPR, vol.4, pp.865-868, Aug. 2004.