{p
1
, ..., p
N
}. Shannon’s entropy (Thiemer, 2006) of P
is given by:
j2
N
1j
j
plog.p)P(H
∑
=
−=
(3)
From the source-channel point of view H(P)
stands for the average size of the code necessary to
transmit data from D when these are generated by P.
In our experiments D is the set of gray level values
taken from a current block (in practice N=256).
Given a block B(u, v), where (u, v) is its location in
a macroblock of 16×16 pixels. Let H(B(u, v)), be the
entropy of the gray level distribution in B(u, v). We
derive a slight variation of (3) as following:
j2
255
0j
j
plog.p))v,u(B(H
∑
=
−=
(4)
{pj} is the probability distribution of the gray level
values in B(u, v).
Once the entropies blocks of each macroblock
are calculated, they are ranked in descending order
to choose those blocks with high value of entropy.
To improve the robustness of this approach, the
position G(i) of the selected high entropy blocks
within a macroblock are randomly scrambled using
the simplest and fastest random generator called
“Linear Congruential Generator” (LCG) (Raymond,
2006) such as:
M mod )cr )1i(G*m()i(G +−=
(5)
where m, cr and M represent the multiplier, the
increment and the modulus, respectively. They are
chosen to maximise the period which cannot exceed
M and which is equal to 16 in our case. G(0) is a key
for the insertion and extraction of the watermark.
2.2 Detection Process
Watermark detection is performed after entropy
decoding: the bitstream is partially decoded to obtain
the transformed ac coefficients. This is followed by
applying the LCG with the same key used in the
insertion process to select the watermarked blocks.
For each selected block containing DCT coefficients
in the I-frames, the watermark bit is determined as
follows:
(6)
3 EXPERIMENTS AND RESULTS
The proposed watermarking technique has been
integrated into the H.264 J-M-7.6 reference software
(H.264/AVC Joint Model 7.6 (JM-7.6) Reference
Software). The standard test video clips include
Foreman, Claire, Stefan. All frames are coded at 30
frames/s at 372 kbits/s.
All video clips are coded in QCIF format
(176x144). P and B frames are not used in our
experiments because there are very few nonzero
DCT coefficients due to the efficient compression
performance. A small 16x16 grayscale watermark is
used for the experiment (Figure. 2). In each I-
frames, the watermark to be inserted must be
adjusted with the blocks into the macroblock. By
embedding the watermark in the higher entropy
blocks within a macroblock, a total of 256 bits are
embedded as copyright owner’s signature in a frame
QCIF (176x144) resolution according to the position
of the blocks generated by the LCG. By comparing
to [5] where the total of 99 bits are embedded in a
frame, the embedding process developed increases
the capacity of insertion about 157 bits by frame
while still maintaining a high visual quality. The
experiment shows us that only the QP = [28,32,36],
corresponding to typical QPs for low bit-rate
applications are suitable to obtain the
imperceptibility and the integrity of the watermark.
Figure. 3 shows the insertion tests performed on
different values of QP: for QP less than 28, the
watermark is not completely removed, beyond QP =
36 the watermark is visible.
Figure 2: Logo image as watermark.
Figure 3: Extracted watermark with different values of
QP.
Figure. 4 shows the insertion tests performed on
different values of QP for the videos "Claire" and
"Container" and their correspondent PSNR (dB),
respectively. The quality degradation is clearly
shown on the picture for the insertion performed
with QP greater than 36. Figure. 5 illustrates the
average PSNR comparison results for a set of test
sequences.
QP = 16 QP = 24 QP = 26 QP = 28
⎩
⎨
⎧
≥
=
∧
otherwise 0
0)v,u(X if 1
W
q
SECURE AND ROBUST COPYRIGHT PROTECTION FOR H.264/AVC BASED ON SELECTED BLOCKS DCT
353