Another kind of adaptive watermarking schemes
exploits the HVS characteristics to classify the
image into several classes based on several
parameters (texture, edge, luminance, chroma, etc.).
As human sensitivity to error is different in different
classes, different watermark strength is embedded.
So the classification rule is the key technique in
adaptive watermarking algorithms.
Some block classification methods in DCT
compressed domain have been proposed. The AC
energy of the DCT coefficients of a block is a
common measure of the local block texture activity.
By calculating the energy of AC coefficients, we can
determine whether the block is smooth or not. In
(Tong and Venetsanopoulos, 1998), a more
complicated model for JPEG application based on
block classification and texture masking is
presented. However, these methods cannot be
applied directly to H.264 video. With the
employment of intra-prediction, the DCT
coefficients residue cannot reflect the texture
activity accurately.
The goal of this paper is to present an adaptive
watermarking algorithm for H.264 compressed
domain. If a compressed video bitstream is to be
watermarked, it has to be decoded to some extent.
Our algorithm is designed to operate directly in the
DCT domain to make it suitable for real-time
application. Then how to achieve block
classification according to H.264 quantized DCT
residues becomes the first task.
The paper is organized as follows. In Section 2,
an improved block classification algorithm is
introduced. In Section 3, we propose a simple
watermarking method based on block classification.
Experimental results are provided in Section 4 to
show the performance of the proposed algorithm.
Finally, conclusions are drawn in Section 5.
2 PROPOSED BLOCK
CLASSIFICATION METHOD
In our prior work (Zhang et al., 2008), we have
noticed the limitation of previous block
classification methods encountered in H.264 and
proposed a new method. Here we extend this method
and further improve classification.
Our target is to get better block classification
result from the DCT coefficients in H.264 bitstream.
Because of the employment of intra-prediction, the
DCT coefficients in the H.264 bitstream is in fact
the prediction residue signal, which cannot reflect
the texture activity accurately. However, for DC
prediction mode, all samples of the current 4×4
block are predicted by the mean of the adjacent
samples, and this will not affect the distribution of
AC coefficients. The DCT coefficients residue is
still available for the classification rules. So we
propose a prediction mode restriction method to
overcome this drawback.
The experiments shows that the texture of a
block is uniform when its variance is very small, and
the encoder will most probably choose mode 0~2 as
the best prediction mode for blocks with a uniform
texture; on the contrary, mode 3~8 will be selected
as the best when the block has a complex texture
(Wang et al., 2007). Based on this result, we give
our approach as follows.
1) Restriction during the encoding process
a. Transform every 4×4 block into integer DCT
domain
b. Calculate AC coefficients energy E
AC
33
22
,0,0
00
AC i j
ij
XX
==
=−
∑∑
(1)
c. Set the prediction mode
determine the best mode using RDO 1
use DC mode only 1
AC
AC
if E T
if E T
>
⎧
⎨
≤
⎩
If the energy value is larger than the threshold
T1, the encoder determines the best mode using
RDO (Rate Distortion Optimization) as usual. If the
energy value is small, which means the predicted
blocks with different prediction modes are almost
the same, we then force the encoder to use DC
mode. This restriction will neither degrade the
picture quality nor increase the bit rate markedly like
restriction of DC mode only, and is convenient for
block classification in the next step.
2) Block classification
a. Obtain the intra prediction mode and the DCT
coefficients residue of current block
b. If mode is DC, calculate AC coefficients
residue energy E
R
c. The block is classified by
non-smooth area mode DC or
(mode=DC and 2)
smooth area mode=DC and 2
R
R
if
ET
if E T
≠
>
≤
⎧
⎪
⎨
⎪
⎩
where T2 is another threshold and usually much
smaller than T1.
For H.264 video encoded with our restriction, we
can detect the block type directly in compressed
domain. If the prediction mode is not DC mode,
obviously the preceding AC energy value is large;
we consider it as non-smooth block. If the prediction
mode is DC mode, we cannot conclude whether the
preceding AC energy value is large or not, and then
ADAPTIVE REAL-TIME WATERMARKING USING BLOCK CLASSIFICATION FOR H.264 COMPRESSED
DOMAIN
309