SlideShare a Scribd company logo
VLSI Design for Video Coding 2010th Edition Youn -
PDF Download (2025)
https://ebookultra.com/download/vlsi-design-for-video-
coding-2010th-edition-youn/
Visit ebookultra.com today to download the complete set of
ebooks or textbooks
We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.
Emerging Technologies for 3D Video Creation Coding
Transmission and Rendering 1st Edition Frederic Dufaux
https://ebookultra.com/download/emerging-technologies-for-3d-video-
creation-coding-transmission-and-rendering-1st-edition-frederic-
dufaux/
Multidimensional signal image and video processing and
coding 2ed Edition Woods J.W.
https://ebookultra.com/download/multidimensional-signal-image-and-
video-processing-and-coding-2ed-edition-woods-j-w/
3D Integration for VLSI Systems Chuan Seng Tan
https://ebookultra.com/download/3d-integration-for-vlsi-systems-chuan-
seng-tan/
VLSI Technology Wai
https://ebookultra.com/download/vlsi-technology-wai/
VLSI Circuits for Biomedical Applications 1st Edition
Krzysztof Iniewski
https://ebookultra.com/download/vlsi-circuits-for-biomedical-
applications-1st-edition-krzysztof-iniewski/
VLSI for Wireless Communication 1st Edition Bosco H. Leung
https://ebookultra.com/download/vlsi-for-wireless-communication-1st-
edition-bosco-h-leung/
Drawing Basics and Video Game Art Classic to Cutting Edge
Art Techniques for Winning Video Game Design 1st Edition
Chris Solarski
https://ebookultra.com/download/drawing-basics-and-video-game-art-
classic-to-cutting-edge-art-techniques-for-winning-video-game-
design-1st-edition-chris-solarski/
Coding For Dummies 1st Edition Nikhil Abraham
https://ebookultra.com/download/coding-for-dummies-1st-edition-nikhil-
abraham/
Handbook of Video Databases Design and Applications 1st
Edition Borko Furht
https://ebookultra.com/download/handbook-of-video-databases-design-
and-applications-1st-edition-borko-furht/
VLSI Design for Video Coding 2010th Edition Youn
VLSI Design for Video Coding 2010th Edition Youn
Digital Instant Download
Author(s): Youn,Long Steve Lin, Chao,Yang Kao, Hung,Chih Kuo, Jian,Wen
Chen
ISBN(s): 9781441909589, 1441909583
Edition: 2010
File Details: PDF, 29.76 MB
Year: 2010
Language: english
VLSI Design for Video Coding 2010th Edition Youn
VLSI Design for Video Coding
Youn-Long Steve Lin • Chao-Yang Kao
Huang-Chih Kuo • Jian-Wen Chen
VLSI Design for
Video Coding
H.264/AVC Encoding from Standard
Specification to Chip
123
Prof. Youn-Long Steve Lin
National Tsing Hua University
Dept. Computer Science
101 Kuang Fu Road
HsinChu 300
Section 2
Taiwan R.O.C.
Chao-Yang Kao
National Tsing Hua University
Dept. Computer Science
101 Kuang Fu Road
HsinChu 300
Section 2
Taiwan R.O.C.
Huang-Chih Kuo
National Tsing Hua University
Dept. Computer Science
101 Kuang Fu Road
HsinChu 300
Section 2
Taiwan R.O.C.
Jian-Wen Chen
National Tsing Hua University
Dept. Computer Science
101 Kuang Fu Road
HsinChu 300
Section 2
Taiwan R.O.C.
ISBN 978-1-4419-0958-9 e-ISBN 978-1-4419-0959-6
DOI 10.1007/978-1-4419-0959-6
Springer New York Dordrecht Heidelberg London
Library of Congress Control Number: 2009943294
c
 Springer Science+Business Media, LLC 2010
All rights reserved. This work may not be translated or copied in whole or in part without the written
permission of the publisher (Springer Science+Business Media, LLC, 233 Spring Street, New York,
NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in
connection with any form of information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed is forbidden.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are
not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject
to proprietary rights.
Printed on acid-free paper
Springer is part of Springer Science+Business Media (www.springer.com)
Preface
A video signal is represented as a sequence of frames of pixels. There exists vast
amount of redundant information that can be eliminated with video compression
technology so that its transmission and storage becomes more efficient. To facilitate
interoperability between compression at the video producing source and decompres-
sion at the consumption end, several generations of video coding standards have
been defined and adapted.
After MPEG-1 for VCD and MPEG-2 for DVD applications, H.264/AVC is
the latest and most advanced video coding standard defined by the international
standard organizations. Its high compression ratio comes at the expense of more
computational-intensive coding algorithms. For low-end applications, software so-
lutions are adequate. For high-end applications, dedicated hardware solutions are
needed.
This book describes an academic project of developing an application-specific
VLSI architecture for H.264/AVC video encoding. Each subfunction is analyzed
before a suitable parallel-processing architecture is designed. Integration of sub-
functional modules as well as the integration into a bus-based SOC platform is
presented. The whole encoder has been prototyped using an FPGA.
Intended readers are researchers, educators, and developers in video coding sys-
tems, hardware accelerators for image/video processing, and high-level synthesis
of VLSI. Especially, those who are interested in state-of-the-art parallel architecture
and implementation of intra prediction, integer motion estimation, fractional motion
estimation, discrete cosine transform, context-adaptive binary arithmetic coding,
and deblocking filter will find design ideas from this book.
HsinChu, Taiwan, ROC Youn-Long Lin
Chao-Yang Kao
Huang-Chih Kuo
Jian-Wen Chen
v
Acknowledgments
Cheng-Long Wu, Cheng-Ru Chang, Chun-Hsin Lee, Chun-Lin Chiu, Hao-Ting
Huang, Huan-Chun Tseng, Huan-Kai Peng, Hui-Ting Yang, Jhong-Wei Gu,
Kai-Hsiang Chang, Li-Cian Wu, Ping Chao, Po-Sheng Liu, Sheng-Tsung Hsu,
Sheng-Yu Shih, Shin-Chih Lee, Tzu-Jen Lo, Wei-Cheng Huang, Yu-Chien Kao,
Yuan-Chun Lin, and Yung-Hung Chan of the Theda.Design Group, National Tsing
Hua University contribute to the development of the H.264 Video Encoder System
described in this book.
The authors appreciate financial support from Taiwan’s National Science Council
under Contracts no. 95-2220-E-007-024, 96-2220-E-007-013, and 97-2220-E-007-
003 and Ministry of Economics Affairs under Contracts no. 94-EC-17-A-01-S1-
038, 95-EC-17-A-01-S1-038, and 96-EC-17-A-01-S1-038. Financial support from
Taiwan Semiconductor Manufacturing Company Limited (TSMC) and Industry
Technology Research Institute (ITRI) is also greatly appreciated.
Global Unichip Corp. provided us with its UMVP multimedia SOC platform and
consultation during the FPGA prototyping stage of the development. The authors are
grateful to Chi Mei Optoelectronics for a 52-in. Quad Full HD display panel. Joint
research with the Microprocessor Research Center (MPRC) of Peking University
has been an important milestone of this project.
vii
Contents
1 Introduction to Video Coding and H.264/AVC ............................. 1
1.1 Introduction ............................................................... 1
1.1.1 Basic Coding Unit ............................................... 2
1.1.2 Video Encoding Flow ........................................... 2
1.1.3 Color Space Conversion......................................... 2
1.1.4 Prediction of a Macroblock ..................................... 3
1.1.5 Intraframe Prediction............................................ 4
1.1.6 Interframe Prediction............................................ 4
1.1.7 Motion Vector ................................................... 4
1.1.8 Prediction Error.................................................. 4
1.1.9 Space-Domain to Frequency-Domain
Transformation of Residual Error .............................. 5
1.1.10 Coefficient Quantization ........................................ 5
1.1.11 Reconstruction................................................... 5
1.1.12 Motion Compensation........................................... 5
1.1.13 Deblocking Filtering ............................................ 6
1.2 Book Organization ........................................................ 6
2 Intra Prediction ................................................................ 11
2.1 Introduction ............................................................... 11
2.1.1 Algorithm ........................................................ 12
2.1.2 Design Consideration ........................................... 16
2.2 Related Works ............................................................. 19
2.2.1 Prediction Time Reduction Approaches........................ 19
2.2.2 Hardware Area Reduction Approaches ........................ 19
2.3 A VLSI Design for Intra Prediction ...................................... 20
2.3.1 Subtasks Scheduling ............................................ 20
2.3.2 Architecture...................................................... 24
2.3.3 Evaluation ....................................................... 30
2.4 Summary .................................................................. 30
ix
x Contents
3 Integer Motion Estimation .................................................... 31
3.1 Introduction ............................................................... 31
3.1.1 Algorithms ....................................................... 33
3.1.2 Design Considerations .......................................... 36
3.2 Related Works ............................................................. 37
3.2.1 Architecture...................................................... 37
3.2.2 Data-Reuse Schemes ............................................ 43
3.3 A VLSI Design for Integer Motion Estimation .......................... 44
3.3.1 Proposed Data-Reuse Scheme .................................. 45
3.3.2 Architecture...................................................... 47
3.3.3 Data Flow ........................................................ 49
3.3.4 Evaluation ....................................................... 52
3.4 Summary .................................................................. 53
4 Fractional Motion Estimation ................................................ 57
4.1 Introduction ............................................................... 57
4.1.1 Algorithms ....................................................... 58
4.1.2 Design Considerations .......................................... 61
4.2 Related Works ............................................................. 61
4.3 A VLSI Design for Fractional Motion Estimation ...................... 63
4.3.1 Proposed Architecture........................................... 63
4.3.2 Proposed Resource Sharing Method
for SATD Generator ............................................. 68
4.3.3 Evaluation ....................................................... 72
4.4 Summary .................................................................. 72
5 Motion Compensation ......................................................... 73
5.1 Introduction ............................................................... 73
5.1.1 Algorithms ....................................................... 73
5.1.2 Design Considerations .......................................... 75
5.2 Related Works ............................................................. 75
5.2.1 Memory Traffic Reduction...................................... 76
5.2.2 Interpolation Engine............................................. 76
5.3 A VLSI Design for Motion Compensation .............................. 77
5.3.1 Motion Vector Generator........................................ 77
5.3.2 Interpolator ...................................................... 79
5.3.3 Evaluation ....................................................... 83
5.4 Summary .................................................................. 83
6 Transform Coding ............................................................. 85
6.1 Introduction ............................................................... 85
6.1.1 Algorithms ....................................................... 85
6.1.2 Design Consideration ........................................... 97
6.2 Related Works ............................................................. 97
6.2.1 Multitransform Engine Approaches ............................ 97
6.2.2 Trans/Quan or InvQuan/InvTrans Integration Approaches .... 97
Contents xi
6.3 A VLSI Design for Transform Coding................................... 98
6.3.1 Subtasks Scheduling ............................................ 98
6.3.2 Architecture...................................................... 98
6.3.3 Evaluation .......................................................106
6.4 Summary ..................................................................106
7 Deblocking Filter...............................................................107
7.1 Introduction ...............................................................107
7.1.1 Deblocking Filter Algorithm....................................108
7.1.2 Subtasks Processing Order......................................112
7.1.3 Design Considerations ..........................................113
7.2 Related Works .............................................................115
7.3 A VLSI Design for Deblocking Filter....................................116
7.3.1 Subtasks Scheduling ............................................116
7.3.2 Architecture......................................................116
7.3.3 Evaluation .......................................................122
7.4 Summary ..................................................................124
8 CABAC Encoder ...............................................................125
8.1 Introduction ...............................................................125
8.1.1 CABAC Encoder Algorithm ....................................125
8.1.2 Subtasks Processing Order .....................................134
8.1.3 Design Consideration ...........................................134
8.2 Related Works .............................................................136
8.3 A VLSI Design for CABAC Encoder ....................................139
8.3.1 Subtasks Scheduling ............................................139
8.3.2 Architecture......................................................140
8.3.3 Evaluation .......................................................147
8.4 Summary ..................................................................148
9 System Integration .............................................................151
9.1 Introduction ...............................................................151
9.1.1 Algorithm ........................................................151
9.1.2 Design Consideration ...........................................153
9.2 Related Works .............................................................155
9.3 A VLSI Design for H.264/AVC Encoder ................................156
9.3.1 Subtasks Scheduling ............................................156
9.3.2 Architecture......................................................159
9.3.3 Evaluation .......................................................165
9.4 Summary ..................................................................166
References...........................................................................167
Index.................................................................................173
Chapter 1
Introduction to Video Coding and H.264/AVC
Abstract A video signal is represented as a sequence of frames of pixels. There
exists a vast amount of redundant information that can be eliminated with video
compression technology so that transmission and storage becomes more efficient.
To facilitate interoperability between compression at the video producing source
and decompression at the consumption end, several generations of video coding
standards have been defined and adapted. For low-end applications, software so-
lutions are adequate. For high-end applications, dedicated hardware solutions are
needed. This chapter gives an overview of the principles behind video coding in
general and the advanced features of H.264/AVC standard in particular. It serves as
an introduction to the remaining chapters; each covers an important coding tool and
its VLSI architectural design of an H.264/AVC encoder.
1.1 Introduction
A video encoder takes as its input a video sequence, performs compression, and
then produces as its output a bit-stream data which can be decoded back to a video
sequence by a standard-compliant video decoder.
A video signal is a sequence of frames. It has a frame rate defined as the number
of frames per second (fps). For typical consumer applications, 30 fps is adequate.
However, it could be as high as 60 or 72 for very high-end applications or as low as
10 or 15 for video conferencing over a low-bandwidth communication link.
A frame consists of a two-dimensional array of color pixels. Its size is called
frame resolution. A standard definition (SD) frame has 720  480 pixels per frame
whereas a full high definition (FullHD) one has 1,920  1,088. There are large num-
ber of frame size variations developed by various applications such as computer
monitors.
A color pixel is composed of three elementary components: R, G, and B. Each
component is digitized to an 8-bit data for consumer applications or a 12-bit one for
high-end applications.
Y.-L.S. Lin et al., VLSI Design for Video Coding: H.264/AVC Encoding from Standard
Specification to Chip, DOI 10.1007/978-1-4419-0959-6 1,
c
 Springer Science+Business Media, LLC 2010
1
2 1 Introduction to Video Coding and H.264/AVC
The data rate for a raw video signal is huge. For example, a 30-fps FullHD one
will have a data rate of 30  1;920  1;088  3  8 D 1:5Gbps, which is impractical
for today’s communication or storage infrastructure.
Fortunately, by taking advantage of the characteristics of human visual system
and the redundancy in the video signal, we can compress the data by two orders of
magnitude without scarifying the quality of the decompressed video.
1.1.1 Basic Coding Unit
In order for a video encoding or decoding system to handle video of different frame
rates and simplify the implementation, a basic size of 16  16 has been popularly
adopted. Every main stream coding standards from MPEG-1, MPEG-2, : : : to H.264
has chosen a macroblock of 16  16 pixels as their basic unit of processing. Hence,
for video of different resolutions, we just have to process different number of mac-
roblocks. For every 720  480 SD frame, we process 45  30 macroblocks while for
every FullHD frame, we process 120  68 macroblocks.
1.1.2 Video Encoding Flow
Algorithm 1.1 depicts a typical flow of video encoding. frame(t) is the current frame
to be encoded. frame0
(t1) is the reconstructed frame for referencing or called ref-
erence frame. frame0
(t) is the reconstructed current frame. We encode F.t/ one
macroblock (MB) at a time starting from the leftmost MB of the topmost row.
We called the MB being encoded as Curr MB. It can be encoded in one of the
three modes: I for intra prediction, P or unidirectional interprediction, and B for
bidirectional interprediction. The resultant MB from prediction is called Pred MB
and the difference between Curr MB and Pred MB is called Res MB for residu-
als. Res MB goes through space-to-frequency transformation and then quantization
processes to become Res Coef or residual coefficients. Entropy coding then com-
presses Res Coef to get final bit-stream. In order to prepare reconstructed current
frame for future reference, we perform inverse quantization and inverse transform
on Res Coef to get reconstructed residuals called Reconst res. Adding together Re-
const res and Pred MB, we have Reconstruct MB for insertion into frame0
(t).
1.1.3 Color Space Conversion
Naturally, each pixel is composed of R, G, and B 8-bit components. Applying the
following conversion operation, it can be represented as one luminance (luma) com-
ponent Y and two chrominance (chroma) components Cr and Cb. Since the human
1.1 Introduction 3
Algorithm 1.1: Encode a frame.
encode a frame (frame(t), mode)
for I D 1, N do //** N: #rows of MBs per frame
for I D 1, M do //** N: #rows of MBs per frame
Curr MB D MB(frame(t), I, J);
case (mode)
I: Pred MB D Intra Pred (frame(t)’, I, J);
P: Pred MB D ME (frame(t-1)’, I, J);
B: Pred MB D ME (frame(t-1)’, frame(tC1)’, I, J);
endcase
Res MB D Curr MB - Pred MB;
Res Coef D Quant(Transform(Res MB));
Output(Entropy code(Res Coef));
Reconst res D InverseTransform(InverseQuant(Res Coef));
Reconst MB D Reconst res C Pred MB;
Insert(Reconst MB, frame(t)’);
endfor
endfor
end encode a frame;
visual system is more sensitive to luminance component than chrominance ones, we
can subsample Cr and Cb to reduce the data amount without sacrificing the video
quality. Usually one out of two or one out of four subsampling is applied. The for-
mer is called 4:2:2 format and the later 4:2:0 format. In this book, we assume that
4:2:0 format is chosen. Of course, the inverse conversion will give us R, G, B com-
ponents from a set of Y , Cr, Cb components.
Y D 0:299R C 0:587G C 0:114B;
Cb D 0:564.B  Y /;
Cr D 0:713.R  Y /:
(1.1)
1.1.4 Prediction of a Macroblock
A macroblock M has 1616 D 256 pixels. It takes 2563 D 768 bytes to represent
it in RGB format and 256.1C1=4C1=4/ D 384 bytes in 4:2:0 format. If we can
find during decoding a macroblock M0
which is similar to M, then we only have to
get from the encoding end the difference between M and M0
. If M and M0
are very
similar, the difference becomes very small so does the amount of data needed to
be transmitted/stored. Another way to interpret similarity is redundancy. There exist
two types of redundancy: spatial and temporal. Spatial redundancy results from sim-
ilarity between a pixel (region) and its surrounding pixels (regions) in a frame. Tem-
poral redundancy results from slow change of video contents from one frame to the
next. Redundancy information can be identified and removed with prediction tools.
4 1 Introduction to Video Coding and H.264/AVC
1.1.5 Intraframe Prediction
In an image region with smooth change, a macroblock is likely to be similar to its
neighboring macroblocks in color or texture. For example, if all its neighbors are
red, we can predict that a macroblock is also red. Generally, we can define sev-
eral prediction functions; each takes pixel values from neighboring macroblocks
as its input and produces a predicted macroblock as its output. To carry out in-
traframe prediction, every function is evaluated and the one resulting in the smallest
error is chosen. Only the function type and the error need to be encoded and
stored/transmitted. This tool is also called intra prediction and a prediction func-
tion is also called a prediction mode.
1.1.6 Interframe Prediction
Interframe prediction, also called interprediction, identifies temporal redundancy
between neighboring frames. We call the frame currently being processed the cur-
rent frame and the neighboring one the reference frame. We try to find from
the reference frame a reference macroblock that is very similar to the current
macroblock of the current frame. The process is called motion estimation. A mo-
tion estimator compares the current macroblock with candidate macroblocks within
a search window in the reference frame. After finding the best-matched candi-
date macroblock, only the displacement and the error need to be encoded and
stored/transmitted. The displacement from the location of the current macroblock
to that of the best candidate block is called motion vector (MV). In other words,
motion estimation determines the MV that results in the smallest interprediction
error. A bigger search window will give better prediction at the expense of longer
estimation time.
1.1.7 Motion Vector
A MV obtained from motion estimation is adequate for retrieving a block from the
reference frame. Yet, we do not have to encode/transmit the whole of it because there
exists similarity (or redundancy) among MVs of neighboring blocks. Instead, we can
have a motion vector prediction (MVP) as a function of neighboring blocks’ MVs
and just process the difference, called motion vector difference (MVD), between the
MV and its MVP. In most cases, the MVD is much smaller than its associated MV.
1.1.8 Prediction Error
We call the difference between the current macroblock and the predicted one as
prediction error. It is also called residual error or just residual.
1.1 Introduction 5
1.1.9 Space-Domain to Frequency-Domain Transformation
of Residual Error
Residual error is in the space domain and can be represented in the frequency
domain by applying discrete cosine transformation (DCT). DCT can be viewed
as representing an image block with a weighted sum of elementary patterns. The
weights are termed as coefficients. For computational feasibility, a macroblock of
residual errors is usually divided into smaller 4  4 or 8  8 blocks before applying
DCT one by one.
1.1.10 Coefficient Quantization
Coefficients generated by DCT carry image components of various frequencies.
Since human visual system is more sensitive to low frequency components and
less sensitive to high frequency ones, we can treat them with different resolution
by means of quantization. Quantization effectively discards certain least significant
bits (LSBs) of a coefficient. By giving smaller quantization steps to low frequency
components and larger quantization steps to high frequency ones, we can reduce the
amount of data without scarifying the visual quality.
1.1.11 Reconstruction
Both encoding and decoding ends have to reconstruct video frame. In the encoding
end, the reconstructed frame instead of the original one should be used as refer-
ence because no original frame is available in the decoding end. To reconstruct, we
perform inverse quantization and inverse DCT to obtain reconstructed residual. Note
that the reconstructed residual is not identical to the original residual as quantization
is irreversible. Therefore, distortion is introduced here. We then add prediction data
to the reconstructed residual to obtain reconstructed image. For an intrapredicted
macroblock, we perform predict function on its neighboring reconstructed mac-
roblocks while for an interpredicted one we perform motion compensation. Both
methods give a reconstructed version of the current macroblock.
1.1.12 Motion Compensation
Given a MV, the motion compensator retrieves from the reference frame a re-
constructed macroblock pointed to by the integer part of the MV. If the MV has
fractional part, it performs interpolation over the retrieved image to obtain the final
reconstructed image. Usually, interpolation is done twice, one for half-pixel accu-
racy and the other for quarter-pixel accuracy.
6 1 Introduction to Video Coding and H.264/AVC
1.1.13 Deblocking Filtering
After every macroblock of a frame is reconstructed one by one, we obtain a
reconstructed frame. Since the encoding/decoding process is done macroblock-wise,
there exists blocking artifacts between boundaries of adjacent macroblocks or sub-
blocks. Deblocking filter is used to eliminate this kind of artificial edges.
1.2 Book Organization
This book describe a VLSI implementation of a hardware H.264/AVC encoder as
depicted in Fig. 1.1.
Inter Info
Memory
IME
Engine
TransCoding
Engine
FME
Engine
MC
Engine
IntraPred
Engine
IntraMD
Engine
Multiplexer
Recons
Engine
DF
Engine
Unfilter
Memory
ReconsMB
Memory
CABAC
Engine
PE
Engine
DF
MAU
Encoder Core
MB
MAU
SR
MAU
BIT
MAU
MAU Arbiter
Command
Receiver
AMBA
Slave
AMBA
Master
AMBA
MainCtrl
Engine
AMBA Interface
Fig. 1.1 Top-level block diagram of the proposed design
1.2 Book Organization 7
In Chap. 2, we present intra prediction. Intra prediction is the first process of
H.264/AVC intra encoding. It predicts a macroblock by referring to its neighboring
macroblocks to eliminate spatial redundancy. There are 17 prediction modes for a
macroblock: nine modes for each of the 16 luma 4  4 blocks, four modes for a luma
16  16 block, and four modes for each of the two chroma 8  8 blocks. Because
there exists great similarity among equations of generating prediction pixels across
prediction modes, effective hardware resource sharing is the main design consider-
ation. Moreover, there exists a long data-dependency loop among luma 4  4 blocks
during encoding. Increasing parallelism and skipping some modes are two of the
popular methods to design a high-performance architecture for high-end applica-
tions. However, to increase throughput will require more hardware area and to skip
some modes will degrade video quality. We will present a novel VLSI implementa-
tion for intra prediction in this chapter.
In Chap. 3, we present integer motion estimation. Interframe prediction in
H.264/AVC is carried out in three phases: integer motion estimation (IME), frac-
tional motion estimation (FME), and motion compensation (MC). We will discuss
these functions in Chaps. 3, 4, and 5, respectively. Because motion estimation
in H.264/AVC supports variable block sizes and multiple reference frames, high
computational complexity and huge data traffic become main difficulties in VLSI
implementation. Moreover, high-resolution video applications, such as HDTV,
make these problems more critical. Therefore, current VLSI designs usually adopt
parallel architecture to increase the total throughput and solve high computational
complexity. On the other hand, many data-reuse schemes try to increase data-reuse
ratio and, hence, reduce required data traffic. We will introduce several key points
of VLSI implementation for IME.
In Chap. 4, we present fractional motion estimation. Motion estimation in
H.264/AVC supports quarter-pixel precision and is usually carried out in two
phases: IME and FME. We have talked about IME in Chap. 3. After IME finds an
integer motion vector (IMV) for each of the 41 subblocks, FME performs motion
search around the refinement center pointed to by IMV and further refines 41 IMVs
into fractional MVs (FMVs) of quarter-pixel precision. FME interpolates half-
pixels using a six-tap filter and then quarter-pixels a two-tap one. Nine positions are
searched in both half refinement (one integer-pixel search center pointed to by IMV
and eight half-pixel positions) and then quarter refinement (one half-pixel position
and eight quarter-pixel positions). The position with minimum residual error is
chosen as the best match. FME can significantly improve the video quality (C0:3
to C0:5dB) and reduce bit-rate (20–37%) according to our experimental results.
However, our profiling report shows that FME consumes more than 40% of the total
encoding time. Therefore, an efficient hardware accelerator for fractional motion
estimation is indispensable.
In Chap. 5, we present motion compensation. Following integer and fractional
motion estimation, motion compensation (MC) is the third stage in H.264/AVC
interframe prediction (P or B frame). After the motion estimator finds MVs and
related information for each current macroblock, the motion compensator generates
8 1 Introduction to Video Coding and H.264/AVC
compensated macroblocks (MBs) from reference frames. Due to quarter-pixel
precision and variable-block-size motion estimation supported in H.264, motion
compensation also needs to generate half- or quarter-pixels for MB compensation.
Therefore, motion compensation also has high computational complexity and dom-
inates the data traffic on DRAM. Current VLSI designs for MC usually focus on
reducing memory traffic or increasing interpolator throughput. In this chapter, we
will introduce several key points of VLSI implementation for motion compensation.
In Chap. 6, we present transform coding. In H.264/AVC, both transform and
quantization units consist of forward and inverse parts. Residuals are transformed
into frequency domain coefficients in the forward transform unit and quantized in
the forward quantization unit to reduce insignificant data for bit-rate saving. To gen-
erate reconstructed pixels for the intra prediction unit and reference frames for the
motion estimation unit, quantized coefficients are rescaled in the inverse quanti-
zation unit and transformed back to residuals in the inverse transform unit. There
are three kinds of transforms used in H.264/AVC: 4  4 integer discrete cosine
transform, 2  2 Hadamard transform, and 4  4 Hadamard transform. To design
an area-efficient architecture is the main design challenge. We will present a VLSI
implementation of transform coding in this chapter.
In Chap. 7, we present deblocking filter. The deblocking filter (DF) adopted
in H.264/AVC reduces the blocking artifact generated by block-based motion-
compensated interprediction, intra prediction, and integer discrete cosine transform.
The filter for eliminating blocking artifacts is embedded within the coding loop.
Therefore, it is also called in-loop filter. Expirically, it achieves up to 9% bit-rate
saving at the expense of intensive computation. Even with today’s fastest CPU, it
is hard to perform software-based real-time encoding of high-resolution sequences
such as QFHD (3,840  2,160). Consequently, accelerating the deblocking filter by
VLSI implementation is indeed required. Through optimizing processing cycle, ex-
ternal memory access, and working frequency, we show a design that can support
QFHD at 60-fps application by running at 195 MHz.
In Chap. 8, we present context-based adaptive binary arithmetic coding. Context-
based adaptive binary arithmetic coding (CABAC) adopted in H.264/AVC main
profile is the state-of-the-art in terms of bit-rate efficiency. In comparison with
context-based adaptive variable length coding (CAVLC) used in baseline profile, it
can save up to 7% of the bit-rate. However, CABAC occupies 9.6% of total encoding
time and its throughput is limited by bit-level data dependency. Moreover, for ultra-
high resolution, such like QFHD (3,840  2,160), its performance is difficult to meet
real-time requirement for a pure software CABAC encoder. Therefore, it is neces-
sary to accelerate the CABAC encoder by VLSI implementation. In this chapter, a
novel architecture of CABAC encoder will be described. Its performance is capable
of real-time encoding QFHD video in the worst case of main profile Level 5.1.
In Chap. 9, we present system integration. Hardware cost and encoding perfor-
mance are the two main challenges in designing a high-performance H.264/AVC en-
coder. We have proposed several high-performance architectures for the functional
1.2 Book Organization 9
units in an H.264/AVC encoder. In addition, external memory management is
another design issue. We have to access an external memory up to 3.3 GBps for
real-time encoding 1080pHD video in our encoder. We propose several AMBA-
compliant memory access units (MAUs) to efficiently access an external memory.
We will present our H.264/AVC encoder in this chapter.
Chapter 2
Intra Prediction
Abstract Intra prediction is the first process of H.264/AVC intra encoding. It
predicts a macroblock by referring to its neighboring macroblocks to eliminate spa-
tial redundancy. There are 17 prediction modes for a macroblock: nine modes for
each of the 16 luma 4  4 blocks, four modes for a luma 16  16 block, and four
modes for each of the two chroma 8  8 blocks. Because there exists great similarity
among equations of generating prediction pixels across prediction modes, effective
hardware resource sharing is the main design consideration. Moreover, there exists
a long data-dependency loop among luma 4  4 blocks during encoding. Increasing
parallelism and skipping some modes are two of the popular methods to design
a high-performance architecture for high-end applications. However, to increase
throughput will require more hardware area and to skip some modes will degrade
video quality. We will present a novel VLSI implementation for intra prediction in
this chapter.
2.1 Introduction
H.264/AVC intra encoding achieves higher compression ratio and quality compared
with the latest still image coding standard JPEG2000 [1]. The intra prediction unit,
which is the first process of H.264/AVC intra encoding, employs 17 kinds of pre-
diction modes and supports several different block sizes. For baseline, main, and
extended profiles, it supports 4  4 and 16  16 block sizes. For high profile, it ad-
ditionally supports an 8  8 block size.
In this chapter, we focus on the intra prediction for baseline, main, and extended
profiles. The intra prediction unit refers to reconstructed neighboring pixels to gen-
erate prediction pixels. Therefore, its superior performance comes at the expense of
very high computational complexity.
We describe the detailed algorithm of intra prediction in Sect. 2.1.1 and address
some design considerations in Sect. 2.1.2.
Y.-L.S. Lin et al., VLSI Design for Video Coding: H.264/AVC Encoding from Standard
Specification to Chip, DOI 10.1007/978-1-4419-0959-6 2,
c
 Springer Science+Business Media, LLC 2010
11
12 2 Intra Prediction
2.1.1 Algorithm
All intra prediction pixels are calculated based on the reconstructed pixels of
previously encoded neighboring blocks. Figure 2.1 lists all intra prediction modes
with different block sizes. For the luma component, a 16  16 macroblock can be
partitioned into sixteen 4  4 blocks or just one 16  16 block. The chroma com-
ponent simply contains one 8  8 Cb block and one 8  8 Cr block. There are nine
prediction modes for each of the 16 luma 4  4 blocks and four prediction modes
for a luma 16  16 block and two chroma 8  8 blocks.
Figure 2.2 illustrates the reference pixels of a luma macroblock. A luma 16  16
block is predicted by referring to its upper, upper-left, and left neighboring luma
16  16 blocks. For a luma 4  4 block, we utilize its upper, upper-left, left, and
upper-right neighboring 4  4 blocks. There are 33 and 13 reference pixels for a
luma 16  16 block and a luma 4  4 block, respectively. To predict a chroma 8  8
block is like to predict a luma 16  16 block by using its upper, upper-left, and left
neighboring chroma blocks. There are 17 reference pixels for a chroma block.
Figure 2.3 shows all the computation equations of luma 4  4 modes. Upper case
letters from “A” to “M” denote the 13 reference pixels and lower case letters from
“a” to “p” denote the 16 prediction pixels.
Cr
Cb
8x8
8x8
1 8x8
1 8x8
Y
16x16
1 16x16
Component Block Size Prediction Modes Abbreviation
16 4x4
0:vertical
1:horizontal
2:DC
3:plane
L16_VER
L16_HOR
L16_DC
L16_PLANE
0:vertical
1:horizontal
2:DC
3:diagonal down-left
4:diagonal down-right
5:vertical-right
6:horizontal-down
7:vertical-left
8:horizontal-up
L4_VER
L4_HOR
L4_DC
L4_DDL
L4_DDR
L4_VR
L4_HD
L4_VL
L4_HU
2:vertical
1:horizontal
0:DC
3:plane
CB8_VER
CB8_DC
CB8_PLANE
CB8_HOR
2:vertical
1:horizontal
0:DC
3:plane
CR8_VER
CR8_DC
CR8_PLANE
CR8_HOR
Fig. 2.1 Intra prediction modes
Other documents randomly have
different content
keep you under my wing for the night, until we become better acquainted.
You look like the right sort of fellow, Giorgi, and your friend is not so poor
a man for a Frank; but after all, as I said to you, you came in to me from the
street this afternoon, and all I know about you is that you are a good thief.
It is not enough. I must know more. And for another thing, it will help
you to await the return of the two I have out watching these Franks in Pera.
They have not found much, but they can tell you something of what the
Franks do and how they spend their time. So make yourselves comfortable.
You shall eat heartily, and this evening Kara will dance in the courtyard as
she promised you. That is worth waiting for, Giorgi. If I were a young
fellow, I would rather do that than lurk the corners of Pera. Heh-heh!
He stepped aside, and waved us permission to go; and we walked
through the courtyard to the crumbling wall which rimmed the Bosphorus at
one point, its base a rubble-heap, its battlements in fragments, its platform
overgrown with weeds. From its top we could look down on the margin of
beach, loaded with bowlders, and the ruins of what had been a jetty
enclosing a little harbor for the Imperial pleasure galleys.
It would not be difficult to climb up here, I said idly, pointing to the
gaps between the stones, and the sloping piles of bowlders. Does he
suspect us, Nikka?
No, that is only his Gypsy caution. He thinks we are too good to be
true. He needed what we seem to be—and behold, we arrive! He has waited
long. He feels he can wait a little longer.
I'm afraid he may wait a little too long for us, I answered.
There's a chance, Nikka admitted after a moment's reflection. But
we've got to risk it. In the meantime you must let me do all the talking. I'll
tell everybody you are a sulky devil, a killer whose deeds haunt him. They'll
leave you alone. Gypsies respect temperamental criminals. But come along,
we mustn't stay by ourselves. We'll be suspected of considering ourselves
too highly or else having something to conceal. We can't afford any
suspicions or even a dislike.
So we strolled over to the young men's quarters, and while I wrapped
myself in a gloomy atmosphere that I considered was typical of a
temperamental killer, Nikka swapped anecdotes of crime with the others
who drifted in and out. I looked for Kara, but she was nowhere in view.
After Nikka had once established my character, the Gypsies gave me a wide
berth, and I had nothing to do but smoke and appear murderous. And I must
say I got sick of the part. I was the first man up when Mother Kathene
swung the stew-pot out of the chimney and old Zitzi and Lilli began to
distribute tin plates and cups in an irregular circle on the floor. It was poor
food, but plenty, and anyway, it broke the monotony of being an abandoned
criminal.
With the passing of the twilight the young men moved to the courtyard.
In the middle of the open space was a black smirch on the paving, and here
they built a fire of driftwood collected from the beach under the wall. It was
a tribute to the immemorial habits of their race. Even here in the crowded
city they must close the day with a discussion of its events around a tribal
blaze, exactly as they would have done upon the road, exactly as thousands
of other Gypsy tribes were doing at that very moment on the slopes of the
Caucasus, in the recesses of the Kilo Dagh, in the pine forests of the
Carpathians, on the alien flanks of the Appalachians far across the sea.
A buzz of talk arose. The primitive Gypsy fiddles and guitars began to
twang softly. Nikka was the center of a gossiping group. Men and women
from the opposite side of the court joined the circle. Young girls, with the
lithe grace of the Gypsy, as unselfconscious as animals, sifted through the
ranks of the bachelors. Beran Tokalji, himself, a cigarette drooping
sardonically from the corner of his mouth, stalked out and sat down with
Nikka.
In the changing shadows beyond the range of the firelight children
dodged and played unhindered by their elders. High overhead the stars
shone like fireflies under a purple vault. And from the spreading mass of
Stamboul echoed a gentle hum, the hum of a giant hive, a myriad voices
talking, singing, praying, laughing, shouting, cursing, screaming. None of
the discordant night noises of the West. No whistle-blasts, no shrieking of
flat wheels on tortured rails, no honking of motor-horns, no clamor of
machinery. Only the drone of the hive.
A man raised his voice in a song, and the exultantly melancholy pæan to
beauty blended with the other sounds like a skillfully woven thread in a
tapestry. It died away so gradually as to seem as if it had never been. The
fiddles sighed to silence in a burst of expiring passion.
Nobody spoke for several moments. Music was bred in the bone of these
wild folk. It held them as could nothing else.
What of Giorgi Bordu? said Tokalji presently. Does he sing or play or
dance?
Nikka reached out his hand almost eagerly.
I will play, if you wish. I vowed not to touch the fiddle again, but—
His fingers closed lovingly on the crude instrument, and he cuddled it
under his chin. His bow swept the strings in a torrent of arpeggios. He stood
up and strode into the firelight as if upon a stage. And then he began to play,
plaintively, at first, in a minor key. There were the noises of the night, a
crackling fire, animals stirring, the cry of a child, awakening. The music
brightened, quickened, became joyous. You felt the rays of the sun, and
comfort of work. Men and women danced and sang. A harsh note
intervened. There was a quarrel. Anger yelled from the strings. Turmoil
ensued. Faster and faster went the tune. And then peace, and the measure
became slower, almost stately.
The caravan had passed on. A forest encompassed it. Boughs clashed
overhead, birds twittered and sang. Cool shadows fell athwart the path. But
the way grew steep. The music told of the rocks and the slippery mud where
a stream had overflowed, of the steady climb, of the endurance required.
The caravan reached the height. A chill wind blew, but fair before them
stretched a pleasant land, and the descent was easy to the warm, brown road
that wound across the plain. Sunset and camp again, firelight, the moon
overhead, talk of love, the sensuous movement of a dance. Then,
languorous and slow, the coming of sleep.
I did not know it, but I was listening to the composition of Zaranko's
Gypsy Sonata Op. 27, which some day, I suppose, will be as famous as the
Revolutionary Etude or the Hungarian Rhapsody or Beethoven's dream of
the moonlight. But no audience will ever hear it with greater appreciation
than those ragged Gypsies who sat around the fire in the dirty courtyard of
the house in Sokaki Masyeri. As Nikka resumed his place in the outer
circle, only the whispering of the flames broke the stillness. The very
children were frozen on their knees, drunk with the ecstasy of melody.
Heh! called Beran Tokalji, first to shake off the spell. I do not wonder
you vowed not to touch the fiddle, if you like the open road. With that bow
of yours, Giorgi Bordu, you could wring hundreds of gold pieces from the
Franks. You play like the Redcoats in the khans in Buda and Bucharest.
Heh-heh! I have heard Niketu and Stoyan Mirko and Karaji, and they were
not to be compared with you. It is seldom the bravest men have the touch of
the fiddler.
Others spoke up readily in praise or asked questions as to Nikka's
opinion on moot points of harmony and the desirable methods of
interpreting various Gipsy songs. They would have had him play again, but
he refused. I think he was emotionally exhausted.
We have no fiddler to match with you, remarked Tokalji, and the
gaida[1] and the flute are not fit for real music. But our maidens can dance.
Heh, girls, come out, shy ones! Let the strangers view your grace.
[1] Bagpipes.
They giggled amongst themselves, and swayed into a group that was as
spontaneously instinct with rhythm as an old Greek temple frieze. But
suddenly they split apart.
Kara will dance, they cried. Let Kara dance for the strangers.
And Kara floated into the circle of firelight like a spirit of the forest. She
still wore only the scanty madder-red skirt and torn bodice. The cloud of her
hair tumbled below her waist. Her tiny naked feet barely touched the
ground. Slowly she whirled, and the Gipsy fiddles caught her time. A man
with cymbals clashed an accompaniment. A flute whistled soprano. She
increased the tempo; she varied her steps. She was a flower shrinking
beneath the grass. She was a dove pursued by a falcon. She was a maiden
deserted by her lover. She was a fairy hovering above the world.
We who watched her were breathless with the joy of the spectacle, and
when she sank to the ground in a little pile of rags and hair as the music
ended, I thought she must be worn out. But she bounded up at once,
breathing regularly, radiating vitality.
Now I will dance the Knife Dance! she exclaimed. Who will dance
with me? And before any could answer her, she seized a blazing stick from
the fire, and ran around the circle waving it overhead until she came to
where Nikka sat. Ho, Giorgi Bordu, you who do not fear the knife, will
you dance the Knife Dance with me?
Every eye in the circle was fixed on Nikka, for, although I did not know
it then, to have refused her invitation would have been a deadly insult,
equivalent to a declaration of enmity toward her family and tribe. Similarly,
acceptance of it amounted to an admission that he considered her favorably
as a wife, without definitely committing him to matrimony.
Nikka did not hesitate. He stepped to her side. She slipped one arm
around his waist, and with the other swung her torch in air until it showered
sparks over the circle.
Hi! she cried.
Hi! echoed Nikka.
And they pranced around the fire while the music commenced an air so
fiercely wild that it made the blood tingle to listen to it. Then she flung
down her torch, and tore free from Nikka's arm. He followed her. She
eluded him. Bound and round they tore, keeping step the while. Now she
accepted him, now she rejected him. At last he turned from her, arms
folded, contemptuously unmoved. She wooed him with rhythmic ardor. He
denied her. She drew her knife; he drew his. Eyes glaring, lips pinched, they
circled one another, feinting, striking, leaping, posturing.
Click! The blades struck together.
Hi! Hi! they cried.
Click! Clack! Click! went the knife-blades.
Ho! Ho! they shouted.
The game was to see how near you could come without cutting. To avoid
hurt the dancers required quick eyes and agile bodies. The blades flashed
like meteors in the shifting light, wheeling and slashing and stabbing. In the
beginning Kara forced the pace. Nikka retired before her, rather than risk
doing her harm. But slowly he assumed the mastery. His knife was always
at her throat, and active as she was, he refused to be shaken off. She fended
desperately, panting now, bright-eyed and flushed. But he pressed her. Their
blades clashed, he gave his a twist and hers dropped from her hand.
He seized her, forcing her back across his knee, knife up-raised to strike,
while the fiddles clutched at one's nerves and the cymbals clanged with
wicked glee. The scene—Nikka's tall figure, with the poised knife, and the
lithe, slender form he held, expressing in every curve and line its
tempestuous, untamed soul—brought to my memory the song I had heard
him sing one morning in the music-room at Chesby:
And best of all, I shall hear
The wild, mad Tzigane songs,
Cruel and gay and lustful,
Like fiddles and clanging gongs.
And in the glare of the campfires
I shall see the Tziganes dance—
Women with lithe, round bodies,
Men straight as a heiduck's lance.
And perhaps a wild brown maiden
Will seek me—
Crash! boomed a knock on the street-door. And rap-rap-rap! it was
repeated. Crash! again.
The music stopped. Nikka released his partner, and Kara stooped quickly
and snatched up her knife, tossing the hair out of her eyes, heedless as usual
of the rags that slipped off her shoulders.
Men looked at each other uncertainly. Hands crept to waist-sashes.
Heh! said Tokalji. Who can it be in such a hurry at this hour?'
Crash! The door resounded under the battering of a pistol-butt.
CHAPTER XVIII
THE BIG SHOW BEGINS
The women and children—all save Kara—withdrew into the shadows.
The men gathered together. Tokalji crossed to the entrance.
Less noise there! he shouted threateningly. This is a peaceful house.
But his manner changed the moment he opened the wicket. What he said
we could not hear, but we saw him quickly turn the lock and throw back a
leaf of the door, salaaming low as he stepped aside. Six men burst in, four
of them in European clothes, and Nikka and I exchanged a glance of
apprehension as we recognized the broad shoulders of their leader and
heard his snarling voice.
Toutou LaFitte had arrived. With him were Hilyer, Serge Vassilievich
and Hilmi Bey. The two who brought up the rear, somewhat sulky and
fearful, were the spies we had seen in front of the Pera Palace that morning.
Can I trust nobody to fulfill my orders? whined Toutou, striding
toward the fire. I tell you to spare no efforts—and I come to find you
singing and dancing around a fire! Is that working? Is that carrying out our
treaty? But all are the same! My best people fail me.
His green eyes shone evilly; his hands writhed with suppressed ferocity.
Tokalji, having refastened the door, followed him across the courtyard. The
Gypsy looked uncomfortable, but showed no fear.
What could we have done that we have not done? he retorted. Was it
our fault that you lost track of the two missing ones? As for the English lord
and his servant, my two men that I see with you have shadowed them day
and night.
And lost them to-day, as they admit, snarled Toutou. Lost them for a
whole day! Who knows what has been accomplished in that time?
You are right there, agreed Tokalji coolly, and I have just picked two
new men to take their places. Zlacho and Petko are good enough for
ordinary thievery, but this job seems to be above them.
That is well, said Toutou, partly mollified. There must be a change in
our methods or we shall fail in this coup. I decided to hasten on to
Constantinople with my colleagues because I was sure the two who have
escaped us must come here sooner or later, and whenever they come we
shall find them. But I cannot do everything. It is for you to follow their
trails.
Never fear! We shall, replied Tokalji. My new men start out at once.
One of them is a Frank like yourself; the other is a Tzigane.
Ha; let me see that Frank, exclaimed Toutou. I know many of the
Franks who live with the Tziganes.
Step out, Giorgi Bordu and Jakka, called Tokalji.
Nikka sunk his fingers in my arm in a warning grip, and we stepped
forth from the group of Tziganes clustered in front of the fire. There was at
least a chance that we should not be identified—but its value was
demonstrated the instant the firelight splashed over Nikka's aquiline face
and tense, febrile body.
Surely, I have seen that lean fellow before, piped Hilmi Bey, pointing
at Nikka.
I saw them standing near the Frank lord and his servant in Pera this
morning, said one of the spies.
What of that? shouted Tokalji angrily. It is true they followed the
Franks—which was more than you could do, Petko—and robbed them.
No, the Franks followed them, protested Zlacho, the other spy.
You lie, you dog! bellowed Tokalji. You think to discredit them
because they will do the work you bungled.
Vassilievich pushed in front of the newcomers.
Is it my imagination, he inquired softly, or does the stocky one bear a
resemblance to the Americansky, Nash?
By jove, I think you're right! exclaimed Hilyer, speaking for the first
time.
Be ready, hissed Nikka from the corner of his mouth, without shifting
his eyes from our enemies.
His right hand was thrust into his waist-sash.
I do not like this business, rasped Toutou, pulling a knife from inside
his vest. Somebody shall be tortured until he tells the truth.
I felt a pressure between Nikka and myself, and Kara's voice whispered:
Run, you fools! To the House of the Married!
Nikka's pistol flashed blue in the firelight.
Shoot, Jack! he cried.
A ruddy flame jetted from his muzzle, and the spy Petko dropped dead.
Toutou LaFitte pushed Zlacho in the line of fire before himself, and dived
into the encircling shadows as Zlacho crumpled up with a broken leg.
Tokalji, Hilyer, Vassilievich and Hilmi scattered. I swung on my heel and
shot twice over the group of Gypsies by the fire. I could not bring myself to
shoot at them, for there were women and children close by. Then a bullet
whistled past my ear, and Toutou's voice whined:
No shooting! Use your knives! Take them alive!
I had a fleeting glimpse of Kara, running at me with her knife raised.
There are only two! roared Tokalji. Pull them down!
Run! I heard Nikka shout.
We pelted for the house on our left, the House of the Married, as Kara
had called it. Despite Toutou's warning, a second bullet spattered on the
stones between Nikka and me; but we were poor marks in the half-light,
with people running in every direction, many of them uncertain who were
friends or foes. I turned as I ran, and fired into the ground in front of Kara,
who was the closest of our pursuers; but she refused to be frightened and
actually plunged through the doorway on our heels.
I'll tend to her, panted Nikka. You fasten the door, Jack.
There was a wooden bar, which I dropped into place, and the next
minute the framework groaned under a weight of bodies.
No shooting, yelled Tokalji. You fools, you'll have the Frank police in
here!
One hundred Napoleons a head for them, barked Toutou. Dead or
alive.
The uproar redoubled, and then Tokalji evidently invaded the throng
hammering at the door.
Leave that door alone, he snapped. You're wasting time. Go through
the windows.
Come on, Nikka, I urged. We can't guard every point. We must run
for it.
But what about this? demanded Nikka whimsically. He jerked his
pistol muzzle at Kara sitting demurely on the floor, playing with her knife.
If we show our backs, she'll knife us or open the door—and besides, where
shall we go?
Tie her up, I answered impatiently.
Kara, who, of course, could not understand a word of what we were
saying, laughed with glee.
Do you think I am your enemy? she demanded in the Tzigane dialect.
I tell you I am your friend. See!
And she tossed her knife across the room.
I came with you to help you, Giorgi Bordu.
My name is Nikka Zaranko, he answered shortly.
What matters your name? She leaped up and flung her arms around his
neck. It is you I love—not your name.
Nikka eyed me sheepishly across her shoulder.
See you, little one, he remonstrated, this is no time for talking of love.
We may be dead in five minutes.
Oh, no, she said, releasing him, nevertheless, you shall be off and
away. I, Kara— and it was ridiculous how she strutted in the manner of
Tokalji, himself—will set you free—because I love you.
But I am the enemy of your tribe—your enemy, replied Nikka. You
do not realize what you do.
I care not who you are, she insisted. I love you. I care that for the
tribe!
She snapped her fingers.
But come, she added as a crash sounded outside. They have broken in
a window. Follow me.
She led us into an adjoining room, where in the thickness of the wall a
narrow stairway corkscrewed upward, debouching on the upper floor. Here
was a long hall, with rooms opening off it, their windows usually on the
inner courtyard, the Garden of the Cedars of the First Hugh's Instructions.
She turned to the right, and entered one of the rooms. A ladder leaned
against the wall below a trap-door in the roof. In a corner stood a bedstead,
which she stripped of its clothes, revealing the cords that served for springs.
Cut those with your knife, she said. When we take to the roofs we
will need them to help us down again.
Nikka did as she directed, while I shut the door, and piled the few
articles of furniture against it. Tokalji's men were in full cry downstairs.
There is more than enough rope here, said Nikka, coiling it on his arm.
Some of it I am going to use for you.
What?
Passion dawned in her big eyes.
You cannot go with us, little one. We have no place to take you. And
you do not know me. To-morrow you would cry your eyes out.
I tell you I love you, she answered proudly. I, Kara Tokalji.
The daughter of my deadly enemy, reiterated Nikka.
Oh, he is not my father, she said lightly. No, I think I will go with
you, Nikka.
And I think you won't, retorted Nikka, gritting his teeth. Here, Jack,
catch hold.
He cut the rope in two, gave me half, and with the remaining section,
approached her. She backed away from him.
I'm not going to hurt you, pleaded Nikka. But I must bind you so they
will not suspect that you aided us. Don't you see? And we could not run so
fast with you.
I can run as fast as the Frank, she declared. But—
Our enemies will be here in a moment, warned Nikka.
She extended her hands, wrists joined together.
Bind me, she said wearily. I love you, Nikka Zaranko. If I can help
you in no other way, then, I will help you by staying here.
He bound her gently, hand and foot, without a word, and laid her on the
floor by the bed. I ascended the ladder, and pushed back the trapdoor.
You will come again? she asked, looking up at him with mournful
eyes.
If I do, it will be as an enemy, he returned.
Your enemies are my enemies, she cried, struggling to a sitting
position. With a woman it is her man who counts. She cares nothing for the
tribe—unless it be her man's. Now, you are my man, Nikka Zaranko.
Nikka stooped over her, and I scrambled up on the roof. I believe he
kissed her. I heard his feet on the ladder-rungs, and his voice calling back:
You are a brave girl. We will talk about this some other time, if the stars
are kind.
Oh, we shall meet again, she replied, her cords creaking as she
dropped flat on the floor. I am as sure of it as if Mother Kathene had told
me when the sight was on her.
To me he merely said:
Hurry, Jack! We've lost too much time. Which way?
But I reached down first, and hauled up the ladder. The door was shaking
under a shower of blows. Kara looked interested as my arm appeared, and
her lips shaped themselves for a kiss. Then she saw it was I, and scowled.
Next house, I panted, and we set off across the roof.
To our left was the inner courtyard, a well of darkness in which tinkled
the Fountain of the Lion. To our right lay Sokaki Masyeri. Ahead was a
drop of ten feet on to the adjoining roof, the difference in height
representing the declining slope of the ground. We made it without any
difficulty. The people in this house had been aroused by the shooting, and
we could hear their voices and movements. But we shuffled on cautiously,
until we came to their courtyard, which ran clear from the street-front to the
old sea-wall.
No choice, grunted Nikka. Here's a chimney. Knot your rope. It can't
be more than twenty-five feet to the ground.'
Why not slide directly into the street? I argued.
They might catch us coming down. Do as I say, and we can make sure
whether the coast is clear before we leave the courtyard.
He went down first, and I followed him, scorching my hands, for the
rope was thin and had no knots to check one's descent. I was in mid-air
when I heard an exclamation beneath me, and a thud.
What the devil— I started to whisper.
Hsst! came from Nikka. Don't say anything.
He was standing over an inert figure lying on the ground beside a half-
opened door.
Did you—
No, only belted him over the head with my pistol.
A woman's voice sounded inside the house, aggressively inquisitive.
My God! breathed Nikka. She'll be out in a minute, and I can't hit her.
We've got to try the street.
We stole through the courtyard to the street-door. Behind us Toutou's
house was seething with activity. Somebody, apparently, had just gained the
roof. The woman inside the house we had invaded became impatient, and a
light showed. My fingers fumbled for the latch; it seemed to me I should
never find it. The light wavered into the doorway, and a scream rose shrilly.
Let me try, said Nikka. Here it is!
He pulled the door toward us very slowly, and we peered into the street.
Not a figure showed in the direction of Tokalji's house. Ahead of us only a
kerosene lantern burned in front of a coffee-shop on the corner where
Sokaki Masyeri curved to the north. And the woman in the doorway of the
house behind us was shrieking for dear life.
We sped out into the street, letting the door slam behind us. The noise
distracted the attention of the woman from her unconscious husband, and
she left him to run after us. We also made the mistake of taking the middle
of the way instead of sticking to the shadows under the walls. And we had
not gone fifty feet when we were seen by Gypsies on the roof of Tokalji's
house, and they, with the woman to help them, cried the rest of the pack hot
on our trail.
At the corner by the coffee-shop I looked back and counted six in a
tapering string, with more emerging from the courtyard or climbing over the
roofs. Luckily for us, however, there was a four-way crossing a hundred
yards beyond the coffee-shop, and Nikka turned left, away from Pera,
toward which they would expect us to head. We would have been safe then
if we had not blundered into a Turkish gendarme. He was naturally
suspicious of our haste, and blocked the narrow way; but I gave him a
terrific punch in his fat stomach before he could pull his gun.
We got by, of course, but his roars put the Tziganes right, and they
followed the scent instead of losing it as we reckoned they would. The only
thing for Nikka to do in the circumstances was to twist and turn without
heed to direction and lose both pursuers and ourselves in the breakneck
purlieus of Stamboul. He succeeded in shaking off the Gypsies finally, but
we were hopelessly astray, and it was past midnight when we found the
Khan of the Georgians and staggered through the gate to thread a precarious
path between sleeping men, camels, bullocks, asses and horses.
Wasso Mikali awakened with the first knock on his door, and admitted
us. Smoking cigarette after cigarette as rapidly as he could roll them, he
listened to the story of our adventures with avidity,—although I discovered
later that Nikka had suppressed Kara's part—and immediately dispatched
his young men to spy around Tokalji's house, and learn the dispositions the
enemy were taking. Then he insisted that we should sleep while he kept
watch, and the last memory I have of that awful night is of the old Gypsy's
figure stretched out on the floor, his back against the bolted door and a
cigarette in his mouth.
When we awakened the sun was streaming in through the open door
along with all the noises of the Khan and many of its smells. Our guardian
had coffee ready for us in a pot on the brazier, and his young men had sent
in a report. The women and children had left Tokalji's house under escort of
several of the men shortly after dawn. A vigilant guard was being
maintained on the entrance, and nobody had come or gone—aside from the
party of women and children—since observation had been established.
Before sunrise our spies had heard the sounds of digging inside the
premises.
Wasso Mikali looked doubtful as he imparted this last information.
Perhaps they, too, have discovered the location of the treasure, he
suggested.
No, said Nikka, smiling. They are burying their dead.
Ha, that is a good thought to hold in the mind, exclaimed the old
Gypsy, immensely pleased. What better pleasure could a man ask than to
contemplate his enemies burying their brother that he slew!
But instead of indulging in this Tzigane pastime we decided to take our
European clothing and adjourn to a neighboring Turkish bath where we
could remove the evidence of our Gypsy life. Wasso Mikali went with us to
carry back to the khan our discarded Gipsy costumes. I urged him to join us
in the pool after we had soaked off the top layer of iniquities in a private
room; but he shook his head with a grimace of disgust.
Tell Jakka, O son of my sister, he said, that I marvel at the way you
risk your naked skins. How can a man hope to withstand the cold and heat
if he has nothing but clothing to cover him? Too much water is bad for the
strongest. It weakens the muscles.
CHAPTER XIX
FIRST CRUISE OF THE CURLEW
So far, Jack, you and Mr. Zaranko seem to have had most of the fun,
pronounced my cousin Betty, as we sat at luncheon in the Kings' private
sittingroom in the Pera Palace.
Watkins for the moment acted as butler, and we were safe from
inquisitive ears and could talk with freedom.
What interests me, said Hugh thoughtfully, is how many of those
Johnnies you scragged last night.
Only the one, I think, replied Nikka.
You hit another chap, I reminded him.
Yes, but two off their strength doesn't mean any great reduction in their
fighting force.
Still, counting in those two and the men they sent off with their women,
as Nikka's pals reported, they'll be a good bit weaker than they were,
argued Hugh.
Just the same, insisted Betty, we ought not to run any unnecessary
risks.
Who's we? I inquired.
See here, Jack, she flashed, because you're my cousin is no reason
why you can bully me. You might as well understand that I am in this, and I
am going to have my part in whatever we do.
Hear, hear, Hugh applauded servilely.
Nikka laughed.
How about it, Vernon? I demanded of my uncle.
He spread his hands in a gesture of depreciation.
My dear Jack, he said, you evidently have small acquaintance with
the younger feminine generation. Betty is of legal age—I trust, my dear,
you have no objection to the revelation of an intimate detail your sex are
supposed to cherish in secret?—
Not a particle, dad, Betty responded cheerfully.
—and within reasonable limits, her judgment is to be depended upon.
Moreover, a not unimportant consideration is that she knows how to run a
motor, and in our excursions in the Curlew her aid has been of some
value.,
Don't be stuffy, Jack, urged Hugh. Give the girl a chance. There are
lots of things she can do, short of mixing it with your friend Toutou. I
gather that Nikka's lady friend in the hostile camp was not averse—
That's a different matter, I interrupted, perceiving the embarrassment
on Nikka's face.
We had slurred over Kara's personal interest in his fortunes, but even so,
the incident, to quote Betty's analysis, was romantic to the nth degree.
I don't see that it is, asserted Betty stubbornly, and I intend to play my
part. You are short-handed—
You forget that Nikka has seven men hidden away in Stamboul, I
reminded her.
On the contrary, I take them into account, she retorted. But you have
all been saying that it is advisable not to use them, except in a final
emergency.
That is true, agreed Nikka. The more we bring into this row, the
noisier it will become. Also, as we decided before, we ought to have an ace
or two in the hole. Take my advice, and hang on to Wasso Mikali and his
young men to the last.
I'm not disputing you, said Betty, still belligerent. What you say is
only what I've been saying. But would you mind telling me why you are so
set against using your Gypsies?
If we use them there will be killing on a big scale, said Nikka
succinctly. That sort of thing is bound to become known.
I met Riley-Gratton, the O.C. of the M.P.s this morning, and he gave me
a wad of town gossip, cut in Hugh, but he didn't say anything about our
lads' scrap at Tokalji's house.
Oh, we can get away with it once or maybe twice, returned Nikka, but
if we keep it up we'll run into trouble.
No question of it, I said.
Then what are we arguing about?' demanded Betty.
I laughed.
Darn it all, I confessed. You won't let up, will you? Well, have it your
own way. What do you want to do?
Run you down the Bosphorus after dark for a look at Tokalji's house
from the water side, she answered promptly.
Hugh intervened.
There's no question in the minds of you two chaps but that any attack
ought to come from the water front, is there? he asked.
It couldn't very well come from the street, replied Nikka. There's a
high, windowless wall and a strong door, and even in that lawless quarter
publicity would attend an armed invasion of private property.
Of course, said Betty, her head in the air, it couldn't be any other way.
Now tell us some more about the hiding-place of the treasure.
Nikka shrugged his shoulders and looked at me.
What more can we say? I answered. There's the courtyard and the red
stone.
It's not hollow, you said? spoke up King.
No.
That would indicate a task of some difficulty in prying loose the
covering of the treasure chamber, he remarked. We have—or rather, I
should say, Betty has—taken precautions to install on board the Curlew an
equipment of crowbars, pick-axes, shovels, chisels and other tools—
—and a knotted rope with a grapnel on the end to help in going up the
sea-wall, reminded Betty.
True, my dear. Your forethought has been admirable. What I was about
to say, however, was that a certain amount of time—I fear, perhaps, an
inordinate amount of time—will be required to pry loose the covering of the
vault. How are we to secure ourselves such an opportunity?
By choosing a time when the occupants of the house are off-watch and
their numbers diminished, declared Hugh.
True, agreed Nikka, yet I confess I don't see how—
And to make a long story short we hashed it over all afternoon until tea-
time, without arriving at any clearer view of the outlook before us. By that
time we were sick of the discussion, and voted to suspend. Vernon King and
Betty went to a reception at the British High Commissioner's, and the rest
of us planned to take a walk on the chance of running into Wasso Mikali,
who had promised to come over to Pera in the afternoon if his spies picked
up any additional information.
The first person we saw in the hotel lobby was Montey Hilyer. He hailed
us in front of the booking-office.
I say, Chesby, he drawled in tones that reached all the bystanders, I
don't know what sort of a lark you fellows were up to last night, but really,
you know, you can't take liberties with natives in the East—and especially,
with their women. Really, old chap, you ought to be careful. In your place, I
think I'd clear out of Constantinople. No knowing what kind of trouble you
may get into.
Hugh was furious. He looked Hilyer up and down with cold scorn.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com

More Related Content

PDF
VLSI Design for Video Coding 2010th Edition Youn
PDF
VLSI Design for Video Coding 2010th Edition Youn
PDF
VLSI Design for Video Coding 2010th Edition Youn
PDF
VLSI Design for Video Coding 2010th Edition Youn
PDF
Serial parallel dataflow-pipelined processing architecture based accelerator ...
PDF
10.1.1.184.6612
PDF
The H.264/AVC Advanced Video Coding Standard: Overview and ...
PDF
A04840107
VLSI Design for Video Coding 2010th Edition Youn
VLSI Design for Video Coding 2010th Edition Youn
VLSI Design for Video Coding 2010th Edition Youn
VLSI Design for Video Coding 2010th Edition Youn
Serial parallel dataflow-pipelined processing architecture based accelerator ...
10.1.1.184.6612
The H.264/AVC Advanced Video Coding Standard: Overview and ...
A04840107

Similar to VLSI Design for Video Coding 2010th Edition Youn (20)

PDF
Overview of the H.264/AVC video coding standard - Circuits ...
PDF
Video Compression Algorithm Based on Frame Difference Approaches
PPT
Communication.ppt
PDF
Emerging H.264 Standard:
PDF
HARDWARE SOFTWARE CO-SIMULATION OF MOTION ESTIMATION IN H.264 ENCODER
PPT
H 264 in cuda presentation
PDF
A REAL-TIME H.264/AVC ENCODER&DECODER WITH VERTICAL MODE FOR INTRA FRAME AND ...
PDF
Spatial Scalable Video Compression Using H.264
PDF
E010132529
PDF
The H.264 Video Compression Standard
PPTX
Generic Video Adaptation Framework Towards Content – and Context Awareness in...
PDF
Recent Advances On Video Coding Javier Del Ser Lorente Editor
PDF
Efficient Architecture for Variable Block Size Motion Estimation in H.264/AVC
PDF
PPT
Introduction to Video Compression Techniques - Anurag Jain
PDF
Complexity Analysis in Scalable Video Coding
PDF
H264 final
PDF
[IJET-V1I2P1] Authors :Imran Ullah Khan ,Mohd. Javed Khan ,S.Hasan Saeed ,Nup...
PPTX
High Efficiency Video Codec
PPTX
THE H.264/MPEG4 AND ITS APPLICATIONS
Overview of the H.264/AVC video coding standard - Circuits ...
Video Compression Algorithm Based on Frame Difference Approaches
Communication.ppt
Emerging H.264 Standard:
HARDWARE SOFTWARE CO-SIMULATION OF MOTION ESTIMATION IN H.264 ENCODER
H 264 in cuda presentation
A REAL-TIME H.264/AVC ENCODER&DECODER WITH VERTICAL MODE FOR INTRA FRAME AND ...
Spatial Scalable Video Compression Using H.264
E010132529
The H.264 Video Compression Standard
Generic Video Adaptation Framework Towards Content – and Context Awareness in...
Recent Advances On Video Coding Javier Del Ser Lorente Editor
Efficient Architecture for Variable Block Size Motion Estimation in H.264/AVC
Introduction to Video Compression Techniques - Anurag Jain
Complexity Analysis in Scalable Video Coding
H264 final
[IJET-V1I2P1] Authors :Imran Ullah Khan ,Mohd. Javed Khan ,S.Hasan Saeed ,Nup...
High Efficiency Video Codec
THE H.264/MPEG4 AND ITS APPLICATIONS
Ad

Recently uploaded (20)

PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Cell Structure & Organelles in detailed.
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Insiders guide to clinical Medicine.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Pharma ospi slides which help in ospi learning
PDF
Pre independence Education in Inndia.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
VCE English Exam - Section C Student Revision Booklet
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Supply Chain Operations Speaking Notes -ICLT Program
RMMM.pdf make it easy to upload and study
GDM (1) (1).pptx small presentation for students
Cell Structure & Organelles in detailed.
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPH.pptx obstetrics and gynecology in nursing
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Insiders guide to clinical Medicine.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharma ospi slides which help in ospi learning
Pre independence Education in Inndia.pdf
Microbial diseases, their pathogenesis and prophylaxis
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Ad

VLSI Design for Video Coding 2010th Edition Youn

  • 1. VLSI Design for Video Coding 2010th Edition Youn - PDF Download (2025) https://ebookultra.com/download/vlsi-design-for-video- coding-2010th-edition-youn/ Visit ebookultra.com today to download the complete set of ebooks or textbooks
  • 2. We have selected some products that you may be interested in Click the link to download now or visit ebookultra.com for more options!. Emerging Technologies for 3D Video Creation Coding Transmission and Rendering 1st Edition Frederic Dufaux https://ebookultra.com/download/emerging-technologies-for-3d-video- creation-coding-transmission-and-rendering-1st-edition-frederic- dufaux/ Multidimensional signal image and video processing and coding 2ed Edition Woods J.W. https://ebookultra.com/download/multidimensional-signal-image-and- video-processing-and-coding-2ed-edition-woods-j-w/ 3D Integration for VLSI Systems Chuan Seng Tan https://ebookultra.com/download/3d-integration-for-vlsi-systems-chuan- seng-tan/ VLSI Technology Wai https://ebookultra.com/download/vlsi-technology-wai/
  • 3. VLSI Circuits for Biomedical Applications 1st Edition Krzysztof Iniewski https://ebookultra.com/download/vlsi-circuits-for-biomedical- applications-1st-edition-krzysztof-iniewski/ VLSI for Wireless Communication 1st Edition Bosco H. Leung https://ebookultra.com/download/vlsi-for-wireless-communication-1st- edition-bosco-h-leung/ Drawing Basics and Video Game Art Classic to Cutting Edge Art Techniques for Winning Video Game Design 1st Edition Chris Solarski https://ebookultra.com/download/drawing-basics-and-video-game-art- classic-to-cutting-edge-art-techniques-for-winning-video-game- design-1st-edition-chris-solarski/ Coding For Dummies 1st Edition Nikhil Abraham https://ebookultra.com/download/coding-for-dummies-1st-edition-nikhil- abraham/ Handbook of Video Databases Design and Applications 1st Edition Borko Furht https://ebookultra.com/download/handbook-of-video-databases-design- and-applications-1st-edition-borko-furht/
  • 5. VLSI Design for Video Coding 2010th Edition Youn Digital Instant Download Author(s): Youn,Long Steve Lin, Chao,Yang Kao, Hung,Chih Kuo, Jian,Wen Chen ISBN(s): 9781441909589, 1441909583 Edition: 2010 File Details: PDF, 29.76 MB Year: 2010 Language: english
  • 7. VLSI Design for Video Coding
  • 8. Youn-Long Steve Lin • Chao-Yang Kao Huang-Chih Kuo • Jian-Wen Chen VLSI Design for Video Coding H.264/AVC Encoding from Standard Specification to Chip 123
  • 9. Prof. Youn-Long Steve Lin National Tsing Hua University Dept. Computer Science 101 Kuang Fu Road HsinChu 300 Section 2 Taiwan R.O.C. Chao-Yang Kao National Tsing Hua University Dept. Computer Science 101 Kuang Fu Road HsinChu 300 Section 2 Taiwan R.O.C. Huang-Chih Kuo National Tsing Hua University Dept. Computer Science 101 Kuang Fu Road HsinChu 300 Section 2 Taiwan R.O.C. Jian-Wen Chen National Tsing Hua University Dept. Computer Science 101 Kuang Fu Road HsinChu 300 Section 2 Taiwan R.O.C. ISBN 978-1-4419-0958-9 e-ISBN 978-1-4419-0959-6 DOI 10.1007/978-1-4419-0959-6 Springer New York Dordrecht Heidelberg London Library of Congress Control Number: 2009943294 c Springer Science+Business Media, LLC 2010 All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer Science+Business Media, LLC, 233 Spring Street, New York, NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com)
  • 10. Preface A video signal is represented as a sequence of frames of pixels. There exists vast amount of redundant information that can be eliminated with video compression technology so that its transmission and storage becomes more efficient. To facilitate interoperability between compression at the video producing source and decompres- sion at the consumption end, several generations of video coding standards have been defined and adapted. After MPEG-1 for VCD and MPEG-2 for DVD applications, H.264/AVC is the latest and most advanced video coding standard defined by the international standard organizations. Its high compression ratio comes at the expense of more computational-intensive coding algorithms. For low-end applications, software so- lutions are adequate. For high-end applications, dedicated hardware solutions are needed. This book describes an academic project of developing an application-specific VLSI architecture for H.264/AVC video encoding. Each subfunction is analyzed before a suitable parallel-processing architecture is designed. Integration of sub- functional modules as well as the integration into a bus-based SOC platform is presented. The whole encoder has been prototyped using an FPGA. Intended readers are researchers, educators, and developers in video coding sys- tems, hardware accelerators for image/video processing, and high-level synthesis of VLSI. Especially, those who are interested in state-of-the-art parallel architecture and implementation of intra prediction, integer motion estimation, fractional motion estimation, discrete cosine transform, context-adaptive binary arithmetic coding, and deblocking filter will find design ideas from this book. HsinChu, Taiwan, ROC Youn-Long Lin Chao-Yang Kao Huang-Chih Kuo Jian-Wen Chen v
  • 11. Acknowledgments Cheng-Long Wu, Cheng-Ru Chang, Chun-Hsin Lee, Chun-Lin Chiu, Hao-Ting Huang, Huan-Chun Tseng, Huan-Kai Peng, Hui-Ting Yang, Jhong-Wei Gu, Kai-Hsiang Chang, Li-Cian Wu, Ping Chao, Po-Sheng Liu, Sheng-Tsung Hsu, Sheng-Yu Shih, Shin-Chih Lee, Tzu-Jen Lo, Wei-Cheng Huang, Yu-Chien Kao, Yuan-Chun Lin, and Yung-Hung Chan of the Theda.Design Group, National Tsing Hua University contribute to the development of the H.264 Video Encoder System described in this book. The authors appreciate financial support from Taiwan’s National Science Council under Contracts no. 95-2220-E-007-024, 96-2220-E-007-013, and 97-2220-E-007- 003 and Ministry of Economics Affairs under Contracts no. 94-EC-17-A-01-S1- 038, 95-EC-17-A-01-S1-038, and 96-EC-17-A-01-S1-038. Financial support from Taiwan Semiconductor Manufacturing Company Limited (TSMC) and Industry Technology Research Institute (ITRI) is also greatly appreciated. Global Unichip Corp. provided us with its UMVP multimedia SOC platform and consultation during the FPGA prototyping stage of the development. The authors are grateful to Chi Mei Optoelectronics for a 52-in. Quad Full HD display panel. Joint research with the Microprocessor Research Center (MPRC) of Peking University has been an important milestone of this project. vii
  • 12. Contents 1 Introduction to Video Coding and H.264/AVC ............................. 1 1.1 Introduction ............................................................... 1 1.1.1 Basic Coding Unit ............................................... 2 1.1.2 Video Encoding Flow ........................................... 2 1.1.3 Color Space Conversion......................................... 2 1.1.4 Prediction of a Macroblock ..................................... 3 1.1.5 Intraframe Prediction............................................ 4 1.1.6 Interframe Prediction............................................ 4 1.1.7 Motion Vector ................................................... 4 1.1.8 Prediction Error.................................................. 4 1.1.9 Space-Domain to Frequency-Domain Transformation of Residual Error .............................. 5 1.1.10 Coefficient Quantization ........................................ 5 1.1.11 Reconstruction................................................... 5 1.1.12 Motion Compensation........................................... 5 1.1.13 Deblocking Filtering ............................................ 6 1.2 Book Organization ........................................................ 6 2 Intra Prediction ................................................................ 11 2.1 Introduction ............................................................... 11 2.1.1 Algorithm ........................................................ 12 2.1.2 Design Consideration ........................................... 16 2.2 Related Works ............................................................. 19 2.2.1 Prediction Time Reduction Approaches........................ 19 2.2.2 Hardware Area Reduction Approaches ........................ 19 2.3 A VLSI Design for Intra Prediction ...................................... 20 2.3.1 Subtasks Scheduling ............................................ 20 2.3.2 Architecture...................................................... 24 2.3.3 Evaluation ....................................................... 30 2.4 Summary .................................................................. 30 ix
  • 13. x Contents 3 Integer Motion Estimation .................................................... 31 3.1 Introduction ............................................................... 31 3.1.1 Algorithms ....................................................... 33 3.1.2 Design Considerations .......................................... 36 3.2 Related Works ............................................................. 37 3.2.1 Architecture...................................................... 37 3.2.2 Data-Reuse Schemes ............................................ 43 3.3 A VLSI Design for Integer Motion Estimation .......................... 44 3.3.1 Proposed Data-Reuse Scheme .................................. 45 3.3.2 Architecture...................................................... 47 3.3.3 Data Flow ........................................................ 49 3.3.4 Evaluation ....................................................... 52 3.4 Summary .................................................................. 53 4 Fractional Motion Estimation ................................................ 57 4.1 Introduction ............................................................... 57 4.1.1 Algorithms ....................................................... 58 4.1.2 Design Considerations .......................................... 61 4.2 Related Works ............................................................. 61 4.3 A VLSI Design for Fractional Motion Estimation ...................... 63 4.3.1 Proposed Architecture........................................... 63 4.3.2 Proposed Resource Sharing Method for SATD Generator ............................................. 68 4.3.3 Evaluation ....................................................... 72 4.4 Summary .................................................................. 72 5 Motion Compensation ......................................................... 73 5.1 Introduction ............................................................... 73 5.1.1 Algorithms ....................................................... 73 5.1.2 Design Considerations .......................................... 75 5.2 Related Works ............................................................. 75 5.2.1 Memory Traffic Reduction...................................... 76 5.2.2 Interpolation Engine............................................. 76 5.3 A VLSI Design for Motion Compensation .............................. 77 5.3.1 Motion Vector Generator........................................ 77 5.3.2 Interpolator ...................................................... 79 5.3.3 Evaluation ....................................................... 83 5.4 Summary .................................................................. 83 6 Transform Coding ............................................................. 85 6.1 Introduction ............................................................... 85 6.1.1 Algorithms ....................................................... 85 6.1.2 Design Consideration ........................................... 97 6.2 Related Works ............................................................. 97 6.2.1 Multitransform Engine Approaches ............................ 97 6.2.2 Trans/Quan or InvQuan/InvTrans Integration Approaches .... 97
  • 14. Contents xi 6.3 A VLSI Design for Transform Coding................................... 98 6.3.1 Subtasks Scheduling ............................................ 98 6.3.2 Architecture...................................................... 98 6.3.3 Evaluation .......................................................106 6.4 Summary ..................................................................106 7 Deblocking Filter...............................................................107 7.1 Introduction ...............................................................107 7.1.1 Deblocking Filter Algorithm....................................108 7.1.2 Subtasks Processing Order......................................112 7.1.3 Design Considerations ..........................................113 7.2 Related Works .............................................................115 7.3 A VLSI Design for Deblocking Filter....................................116 7.3.1 Subtasks Scheduling ............................................116 7.3.2 Architecture......................................................116 7.3.3 Evaluation .......................................................122 7.4 Summary ..................................................................124 8 CABAC Encoder ...............................................................125 8.1 Introduction ...............................................................125 8.1.1 CABAC Encoder Algorithm ....................................125 8.1.2 Subtasks Processing Order .....................................134 8.1.3 Design Consideration ...........................................134 8.2 Related Works .............................................................136 8.3 A VLSI Design for CABAC Encoder ....................................139 8.3.1 Subtasks Scheduling ............................................139 8.3.2 Architecture......................................................140 8.3.3 Evaluation .......................................................147 8.4 Summary ..................................................................148 9 System Integration .............................................................151 9.1 Introduction ...............................................................151 9.1.1 Algorithm ........................................................151 9.1.2 Design Consideration ...........................................153 9.2 Related Works .............................................................155 9.3 A VLSI Design for H.264/AVC Encoder ................................156 9.3.1 Subtasks Scheduling ............................................156 9.3.2 Architecture......................................................159 9.3.3 Evaluation .......................................................165 9.4 Summary ..................................................................166 References...........................................................................167 Index.................................................................................173
  • 15. Chapter 1 Introduction to Video Coding and H.264/AVC Abstract A video signal is represented as a sequence of frames of pixels. There exists a vast amount of redundant information that can be eliminated with video compression technology so that transmission and storage becomes more efficient. To facilitate interoperability between compression at the video producing source and decompression at the consumption end, several generations of video coding standards have been defined and adapted. For low-end applications, software so- lutions are adequate. For high-end applications, dedicated hardware solutions are needed. This chapter gives an overview of the principles behind video coding in general and the advanced features of H.264/AVC standard in particular. It serves as an introduction to the remaining chapters; each covers an important coding tool and its VLSI architectural design of an H.264/AVC encoder. 1.1 Introduction A video encoder takes as its input a video sequence, performs compression, and then produces as its output a bit-stream data which can be decoded back to a video sequence by a standard-compliant video decoder. A video signal is a sequence of frames. It has a frame rate defined as the number of frames per second (fps). For typical consumer applications, 30 fps is adequate. However, it could be as high as 60 or 72 for very high-end applications or as low as 10 or 15 for video conferencing over a low-bandwidth communication link. A frame consists of a two-dimensional array of color pixels. Its size is called frame resolution. A standard definition (SD) frame has 720 480 pixels per frame whereas a full high definition (FullHD) one has 1,920 1,088. There are large num- ber of frame size variations developed by various applications such as computer monitors. A color pixel is composed of three elementary components: R, G, and B. Each component is digitized to an 8-bit data for consumer applications or a 12-bit one for high-end applications. Y.-L.S. Lin et al., VLSI Design for Video Coding: H.264/AVC Encoding from Standard Specification to Chip, DOI 10.1007/978-1-4419-0959-6 1, c Springer Science+Business Media, LLC 2010 1
  • 16. 2 1 Introduction to Video Coding and H.264/AVC The data rate for a raw video signal is huge. For example, a 30-fps FullHD one will have a data rate of 30 1;920 1;088 3 8 D 1:5Gbps, which is impractical for today’s communication or storage infrastructure. Fortunately, by taking advantage of the characteristics of human visual system and the redundancy in the video signal, we can compress the data by two orders of magnitude without scarifying the quality of the decompressed video. 1.1.1 Basic Coding Unit In order for a video encoding or decoding system to handle video of different frame rates and simplify the implementation, a basic size of 16 16 has been popularly adopted. Every main stream coding standards from MPEG-1, MPEG-2, : : : to H.264 has chosen a macroblock of 16 16 pixels as their basic unit of processing. Hence, for video of different resolutions, we just have to process different number of mac- roblocks. For every 720 480 SD frame, we process 45 30 macroblocks while for every FullHD frame, we process 120 68 macroblocks. 1.1.2 Video Encoding Flow Algorithm 1.1 depicts a typical flow of video encoding. frame(t) is the current frame to be encoded. frame0 (t1) is the reconstructed frame for referencing or called ref- erence frame. frame0 (t) is the reconstructed current frame. We encode F.t/ one macroblock (MB) at a time starting from the leftmost MB of the topmost row. We called the MB being encoded as Curr MB. It can be encoded in one of the three modes: I for intra prediction, P or unidirectional interprediction, and B for bidirectional interprediction. The resultant MB from prediction is called Pred MB and the difference between Curr MB and Pred MB is called Res MB for residu- als. Res MB goes through space-to-frequency transformation and then quantization processes to become Res Coef or residual coefficients. Entropy coding then com- presses Res Coef to get final bit-stream. In order to prepare reconstructed current frame for future reference, we perform inverse quantization and inverse transform on Res Coef to get reconstructed residuals called Reconst res. Adding together Re- const res and Pred MB, we have Reconstruct MB for insertion into frame0 (t). 1.1.3 Color Space Conversion Naturally, each pixel is composed of R, G, and B 8-bit components. Applying the following conversion operation, it can be represented as one luminance (luma) com- ponent Y and two chrominance (chroma) components Cr and Cb. Since the human
  • 17. 1.1 Introduction 3 Algorithm 1.1: Encode a frame. encode a frame (frame(t), mode) for I D 1, N do //** N: #rows of MBs per frame for I D 1, M do //** N: #rows of MBs per frame Curr MB D MB(frame(t), I, J); case (mode) I: Pred MB D Intra Pred (frame(t)’, I, J); P: Pred MB D ME (frame(t-1)’, I, J); B: Pred MB D ME (frame(t-1)’, frame(tC1)’, I, J); endcase Res MB D Curr MB - Pred MB; Res Coef D Quant(Transform(Res MB)); Output(Entropy code(Res Coef)); Reconst res D InverseTransform(InverseQuant(Res Coef)); Reconst MB D Reconst res C Pred MB; Insert(Reconst MB, frame(t)’); endfor endfor end encode a frame; visual system is more sensitive to luminance component than chrominance ones, we can subsample Cr and Cb to reduce the data amount without sacrificing the video quality. Usually one out of two or one out of four subsampling is applied. The for- mer is called 4:2:2 format and the later 4:2:0 format. In this book, we assume that 4:2:0 format is chosen. Of course, the inverse conversion will give us R, G, B com- ponents from a set of Y , Cr, Cb components. Y D 0:299R C 0:587G C 0:114B; Cb D 0:564.B Y /; Cr D 0:713.R Y /: (1.1) 1.1.4 Prediction of a Macroblock A macroblock M has 1616 D 256 pixels. It takes 2563 D 768 bytes to represent it in RGB format and 256.1C1=4C1=4/ D 384 bytes in 4:2:0 format. If we can find during decoding a macroblock M0 which is similar to M, then we only have to get from the encoding end the difference between M and M0 . If M and M0 are very similar, the difference becomes very small so does the amount of data needed to be transmitted/stored. Another way to interpret similarity is redundancy. There exist two types of redundancy: spatial and temporal. Spatial redundancy results from sim- ilarity between a pixel (region) and its surrounding pixels (regions) in a frame. Tem- poral redundancy results from slow change of video contents from one frame to the next. Redundancy information can be identified and removed with prediction tools.
  • 18. 4 1 Introduction to Video Coding and H.264/AVC 1.1.5 Intraframe Prediction In an image region with smooth change, a macroblock is likely to be similar to its neighboring macroblocks in color or texture. For example, if all its neighbors are red, we can predict that a macroblock is also red. Generally, we can define sev- eral prediction functions; each takes pixel values from neighboring macroblocks as its input and produces a predicted macroblock as its output. To carry out in- traframe prediction, every function is evaluated and the one resulting in the smallest error is chosen. Only the function type and the error need to be encoded and stored/transmitted. This tool is also called intra prediction and a prediction func- tion is also called a prediction mode. 1.1.6 Interframe Prediction Interframe prediction, also called interprediction, identifies temporal redundancy between neighboring frames. We call the frame currently being processed the cur- rent frame and the neighboring one the reference frame. We try to find from the reference frame a reference macroblock that is very similar to the current macroblock of the current frame. The process is called motion estimation. A mo- tion estimator compares the current macroblock with candidate macroblocks within a search window in the reference frame. After finding the best-matched candi- date macroblock, only the displacement and the error need to be encoded and stored/transmitted. The displacement from the location of the current macroblock to that of the best candidate block is called motion vector (MV). In other words, motion estimation determines the MV that results in the smallest interprediction error. A bigger search window will give better prediction at the expense of longer estimation time. 1.1.7 Motion Vector A MV obtained from motion estimation is adequate for retrieving a block from the reference frame. Yet, we do not have to encode/transmit the whole of it because there exists similarity (or redundancy) among MVs of neighboring blocks. Instead, we can have a motion vector prediction (MVP) as a function of neighboring blocks’ MVs and just process the difference, called motion vector difference (MVD), between the MV and its MVP. In most cases, the MVD is much smaller than its associated MV. 1.1.8 Prediction Error We call the difference between the current macroblock and the predicted one as prediction error. It is also called residual error or just residual.
  • 19. 1.1 Introduction 5 1.1.9 Space-Domain to Frequency-Domain Transformation of Residual Error Residual error is in the space domain and can be represented in the frequency domain by applying discrete cosine transformation (DCT). DCT can be viewed as representing an image block with a weighted sum of elementary patterns. The weights are termed as coefficients. For computational feasibility, a macroblock of residual errors is usually divided into smaller 4 4 or 8 8 blocks before applying DCT one by one. 1.1.10 Coefficient Quantization Coefficients generated by DCT carry image components of various frequencies. Since human visual system is more sensitive to low frequency components and less sensitive to high frequency ones, we can treat them with different resolution by means of quantization. Quantization effectively discards certain least significant bits (LSBs) of a coefficient. By giving smaller quantization steps to low frequency components and larger quantization steps to high frequency ones, we can reduce the amount of data without scarifying the visual quality. 1.1.11 Reconstruction Both encoding and decoding ends have to reconstruct video frame. In the encoding end, the reconstructed frame instead of the original one should be used as refer- ence because no original frame is available in the decoding end. To reconstruct, we perform inverse quantization and inverse DCT to obtain reconstructed residual. Note that the reconstructed residual is not identical to the original residual as quantization is irreversible. Therefore, distortion is introduced here. We then add prediction data to the reconstructed residual to obtain reconstructed image. For an intrapredicted macroblock, we perform predict function on its neighboring reconstructed mac- roblocks while for an interpredicted one we perform motion compensation. Both methods give a reconstructed version of the current macroblock. 1.1.12 Motion Compensation Given a MV, the motion compensator retrieves from the reference frame a re- constructed macroblock pointed to by the integer part of the MV. If the MV has fractional part, it performs interpolation over the retrieved image to obtain the final reconstructed image. Usually, interpolation is done twice, one for half-pixel accu- racy and the other for quarter-pixel accuracy.
  • 20. 6 1 Introduction to Video Coding and H.264/AVC 1.1.13 Deblocking Filtering After every macroblock of a frame is reconstructed one by one, we obtain a reconstructed frame. Since the encoding/decoding process is done macroblock-wise, there exists blocking artifacts between boundaries of adjacent macroblocks or sub- blocks. Deblocking filter is used to eliminate this kind of artificial edges. 1.2 Book Organization This book describe a VLSI implementation of a hardware H.264/AVC encoder as depicted in Fig. 1.1. Inter Info Memory IME Engine TransCoding Engine FME Engine MC Engine IntraPred Engine IntraMD Engine Multiplexer Recons Engine DF Engine Unfilter Memory ReconsMB Memory CABAC Engine PE Engine DF MAU Encoder Core MB MAU SR MAU BIT MAU MAU Arbiter Command Receiver AMBA Slave AMBA Master AMBA MainCtrl Engine AMBA Interface Fig. 1.1 Top-level block diagram of the proposed design
  • 21. 1.2 Book Organization 7 In Chap. 2, we present intra prediction. Intra prediction is the first process of H.264/AVC intra encoding. It predicts a macroblock by referring to its neighboring macroblocks to eliminate spatial redundancy. There are 17 prediction modes for a macroblock: nine modes for each of the 16 luma 4 4 blocks, four modes for a luma 16 16 block, and four modes for each of the two chroma 8 8 blocks. Because there exists great similarity among equations of generating prediction pixels across prediction modes, effective hardware resource sharing is the main design consider- ation. Moreover, there exists a long data-dependency loop among luma 4 4 blocks during encoding. Increasing parallelism and skipping some modes are two of the popular methods to design a high-performance architecture for high-end applica- tions. However, to increase throughput will require more hardware area and to skip some modes will degrade video quality. We will present a novel VLSI implementa- tion for intra prediction in this chapter. In Chap. 3, we present integer motion estimation. Interframe prediction in H.264/AVC is carried out in three phases: integer motion estimation (IME), frac- tional motion estimation (FME), and motion compensation (MC). We will discuss these functions in Chaps. 3, 4, and 5, respectively. Because motion estimation in H.264/AVC supports variable block sizes and multiple reference frames, high computational complexity and huge data traffic become main difficulties in VLSI implementation. Moreover, high-resolution video applications, such as HDTV, make these problems more critical. Therefore, current VLSI designs usually adopt parallel architecture to increase the total throughput and solve high computational complexity. On the other hand, many data-reuse schemes try to increase data-reuse ratio and, hence, reduce required data traffic. We will introduce several key points of VLSI implementation for IME. In Chap. 4, we present fractional motion estimation. Motion estimation in H.264/AVC supports quarter-pixel precision and is usually carried out in two phases: IME and FME. We have talked about IME in Chap. 3. After IME finds an integer motion vector (IMV) for each of the 41 subblocks, FME performs motion search around the refinement center pointed to by IMV and further refines 41 IMVs into fractional MVs (FMVs) of quarter-pixel precision. FME interpolates half- pixels using a six-tap filter and then quarter-pixels a two-tap one. Nine positions are searched in both half refinement (one integer-pixel search center pointed to by IMV and eight half-pixel positions) and then quarter refinement (one half-pixel position and eight quarter-pixel positions). The position with minimum residual error is chosen as the best match. FME can significantly improve the video quality (C0:3 to C0:5dB) and reduce bit-rate (20–37%) according to our experimental results. However, our profiling report shows that FME consumes more than 40% of the total encoding time. Therefore, an efficient hardware accelerator for fractional motion estimation is indispensable. In Chap. 5, we present motion compensation. Following integer and fractional motion estimation, motion compensation (MC) is the third stage in H.264/AVC interframe prediction (P or B frame). After the motion estimator finds MVs and related information for each current macroblock, the motion compensator generates
  • 22. 8 1 Introduction to Video Coding and H.264/AVC compensated macroblocks (MBs) from reference frames. Due to quarter-pixel precision and variable-block-size motion estimation supported in H.264, motion compensation also needs to generate half- or quarter-pixels for MB compensation. Therefore, motion compensation also has high computational complexity and dom- inates the data traffic on DRAM. Current VLSI designs for MC usually focus on reducing memory traffic or increasing interpolator throughput. In this chapter, we will introduce several key points of VLSI implementation for motion compensation. In Chap. 6, we present transform coding. In H.264/AVC, both transform and quantization units consist of forward and inverse parts. Residuals are transformed into frequency domain coefficients in the forward transform unit and quantized in the forward quantization unit to reduce insignificant data for bit-rate saving. To gen- erate reconstructed pixels for the intra prediction unit and reference frames for the motion estimation unit, quantized coefficients are rescaled in the inverse quanti- zation unit and transformed back to residuals in the inverse transform unit. There are three kinds of transforms used in H.264/AVC: 4 4 integer discrete cosine transform, 2 2 Hadamard transform, and 4 4 Hadamard transform. To design an area-efficient architecture is the main design challenge. We will present a VLSI implementation of transform coding in this chapter. In Chap. 7, we present deblocking filter. The deblocking filter (DF) adopted in H.264/AVC reduces the blocking artifact generated by block-based motion- compensated interprediction, intra prediction, and integer discrete cosine transform. The filter for eliminating blocking artifacts is embedded within the coding loop. Therefore, it is also called in-loop filter. Expirically, it achieves up to 9% bit-rate saving at the expense of intensive computation. Even with today’s fastest CPU, it is hard to perform software-based real-time encoding of high-resolution sequences such as QFHD (3,840 2,160). Consequently, accelerating the deblocking filter by VLSI implementation is indeed required. Through optimizing processing cycle, ex- ternal memory access, and working frequency, we show a design that can support QFHD at 60-fps application by running at 195 MHz. In Chap. 8, we present context-based adaptive binary arithmetic coding. Context- based adaptive binary arithmetic coding (CABAC) adopted in H.264/AVC main profile is the state-of-the-art in terms of bit-rate efficiency. In comparison with context-based adaptive variable length coding (CAVLC) used in baseline profile, it can save up to 7% of the bit-rate. However, CABAC occupies 9.6% of total encoding time and its throughput is limited by bit-level data dependency. Moreover, for ultra- high resolution, such like QFHD (3,840 2,160), its performance is difficult to meet real-time requirement for a pure software CABAC encoder. Therefore, it is neces- sary to accelerate the CABAC encoder by VLSI implementation. In this chapter, a novel architecture of CABAC encoder will be described. Its performance is capable of real-time encoding QFHD video in the worst case of main profile Level 5.1. In Chap. 9, we present system integration. Hardware cost and encoding perfor- mance are the two main challenges in designing a high-performance H.264/AVC en- coder. We have proposed several high-performance architectures for the functional
  • 23. 1.2 Book Organization 9 units in an H.264/AVC encoder. In addition, external memory management is another design issue. We have to access an external memory up to 3.3 GBps for real-time encoding 1080pHD video in our encoder. We propose several AMBA- compliant memory access units (MAUs) to efficiently access an external memory. We will present our H.264/AVC encoder in this chapter.
  • 24. Chapter 2 Intra Prediction Abstract Intra prediction is the first process of H.264/AVC intra encoding. It predicts a macroblock by referring to its neighboring macroblocks to eliminate spa- tial redundancy. There are 17 prediction modes for a macroblock: nine modes for each of the 16 luma 4 4 blocks, four modes for a luma 16 16 block, and four modes for each of the two chroma 8 8 blocks. Because there exists great similarity among equations of generating prediction pixels across prediction modes, effective hardware resource sharing is the main design consideration. Moreover, there exists a long data-dependency loop among luma 4 4 blocks during encoding. Increasing parallelism and skipping some modes are two of the popular methods to design a high-performance architecture for high-end applications. However, to increase throughput will require more hardware area and to skip some modes will degrade video quality. We will present a novel VLSI implementation for intra prediction in this chapter. 2.1 Introduction H.264/AVC intra encoding achieves higher compression ratio and quality compared with the latest still image coding standard JPEG2000 [1]. The intra prediction unit, which is the first process of H.264/AVC intra encoding, employs 17 kinds of pre- diction modes and supports several different block sizes. For baseline, main, and extended profiles, it supports 4 4 and 16 16 block sizes. For high profile, it ad- ditionally supports an 8 8 block size. In this chapter, we focus on the intra prediction for baseline, main, and extended profiles. The intra prediction unit refers to reconstructed neighboring pixels to gen- erate prediction pixels. Therefore, its superior performance comes at the expense of very high computational complexity. We describe the detailed algorithm of intra prediction in Sect. 2.1.1 and address some design considerations in Sect. 2.1.2. Y.-L.S. Lin et al., VLSI Design for Video Coding: H.264/AVC Encoding from Standard Specification to Chip, DOI 10.1007/978-1-4419-0959-6 2, c Springer Science+Business Media, LLC 2010 11
  • 25. 12 2 Intra Prediction 2.1.1 Algorithm All intra prediction pixels are calculated based on the reconstructed pixels of previously encoded neighboring blocks. Figure 2.1 lists all intra prediction modes with different block sizes. For the luma component, a 16 16 macroblock can be partitioned into sixteen 4 4 blocks or just one 16 16 block. The chroma com- ponent simply contains one 8 8 Cb block and one 8 8 Cr block. There are nine prediction modes for each of the 16 luma 4 4 blocks and four prediction modes for a luma 16 16 block and two chroma 8 8 blocks. Figure 2.2 illustrates the reference pixels of a luma macroblock. A luma 16 16 block is predicted by referring to its upper, upper-left, and left neighboring luma 16 16 blocks. For a luma 4 4 block, we utilize its upper, upper-left, left, and upper-right neighboring 4 4 blocks. There are 33 and 13 reference pixels for a luma 16 16 block and a luma 4 4 block, respectively. To predict a chroma 8 8 block is like to predict a luma 16 16 block by using its upper, upper-left, and left neighboring chroma blocks. There are 17 reference pixels for a chroma block. Figure 2.3 shows all the computation equations of luma 4 4 modes. Upper case letters from “A” to “M” denote the 13 reference pixels and lower case letters from “a” to “p” denote the 16 prediction pixels. Cr Cb 8x8 8x8 1 8x8 1 8x8 Y 16x16 1 16x16 Component Block Size Prediction Modes Abbreviation 16 4x4 0:vertical 1:horizontal 2:DC 3:plane L16_VER L16_HOR L16_DC L16_PLANE 0:vertical 1:horizontal 2:DC 3:diagonal down-left 4:diagonal down-right 5:vertical-right 6:horizontal-down 7:vertical-left 8:horizontal-up L4_VER L4_HOR L4_DC L4_DDL L4_DDR L4_VR L4_HD L4_VL L4_HU 2:vertical 1:horizontal 0:DC 3:plane CB8_VER CB8_DC CB8_PLANE CB8_HOR 2:vertical 1:horizontal 0:DC 3:plane CR8_VER CR8_DC CR8_PLANE CR8_HOR Fig. 2.1 Intra prediction modes
  • 26. Other documents randomly have different content
  • 27. keep you under my wing for the night, until we become better acquainted. You look like the right sort of fellow, Giorgi, and your friend is not so poor a man for a Frank; but after all, as I said to you, you came in to me from the street this afternoon, and all I know about you is that you are a good thief. It is not enough. I must know more. And for another thing, it will help you to await the return of the two I have out watching these Franks in Pera. They have not found much, but they can tell you something of what the Franks do and how they spend their time. So make yourselves comfortable. You shall eat heartily, and this evening Kara will dance in the courtyard as she promised you. That is worth waiting for, Giorgi. If I were a young fellow, I would rather do that than lurk the corners of Pera. Heh-heh! He stepped aside, and waved us permission to go; and we walked through the courtyard to the crumbling wall which rimmed the Bosphorus at one point, its base a rubble-heap, its battlements in fragments, its platform overgrown with weeds. From its top we could look down on the margin of beach, loaded with bowlders, and the ruins of what had been a jetty enclosing a little harbor for the Imperial pleasure galleys. It would not be difficult to climb up here, I said idly, pointing to the gaps between the stones, and the sloping piles of bowlders. Does he suspect us, Nikka? No, that is only his Gypsy caution. He thinks we are too good to be true. He needed what we seem to be—and behold, we arrive! He has waited long. He feels he can wait a little longer. I'm afraid he may wait a little too long for us, I answered. There's a chance, Nikka admitted after a moment's reflection. But we've got to risk it. In the meantime you must let me do all the talking. I'll tell everybody you are a sulky devil, a killer whose deeds haunt him. They'll leave you alone. Gypsies respect temperamental criminals. But come along, we mustn't stay by ourselves. We'll be suspected of considering ourselves too highly or else having something to conceal. We can't afford any suspicions or even a dislike.
  • 28. So we strolled over to the young men's quarters, and while I wrapped myself in a gloomy atmosphere that I considered was typical of a temperamental killer, Nikka swapped anecdotes of crime with the others who drifted in and out. I looked for Kara, but she was nowhere in view. After Nikka had once established my character, the Gypsies gave me a wide berth, and I had nothing to do but smoke and appear murderous. And I must say I got sick of the part. I was the first man up when Mother Kathene swung the stew-pot out of the chimney and old Zitzi and Lilli began to distribute tin plates and cups in an irregular circle on the floor. It was poor food, but plenty, and anyway, it broke the monotony of being an abandoned criminal. With the passing of the twilight the young men moved to the courtyard. In the middle of the open space was a black smirch on the paving, and here they built a fire of driftwood collected from the beach under the wall. It was a tribute to the immemorial habits of their race. Even here in the crowded city they must close the day with a discussion of its events around a tribal blaze, exactly as they would have done upon the road, exactly as thousands of other Gypsy tribes were doing at that very moment on the slopes of the Caucasus, in the recesses of the Kilo Dagh, in the pine forests of the Carpathians, on the alien flanks of the Appalachians far across the sea. A buzz of talk arose. The primitive Gypsy fiddles and guitars began to twang softly. Nikka was the center of a gossiping group. Men and women from the opposite side of the court joined the circle. Young girls, with the lithe grace of the Gypsy, as unselfconscious as animals, sifted through the ranks of the bachelors. Beran Tokalji, himself, a cigarette drooping sardonically from the corner of his mouth, stalked out and sat down with Nikka. In the changing shadows beyond the range of the firelight children dodged and played unhindered by their elders. High overhead the stars shone like fireflies under a purple vault. And from the spreading mass of Stamboul echoed a gentle hum, the hum of a giant hive, a myriad voices talking, singing, praying, laughing, shouting, cursing, screaming. None of the discordant night noises of the West. No whistle-blasts, no shrieking of
  • 29. flat wheels on tortured rails, no honking of motor-horns, no clamor of machinery. Only the drone of the hive. A man raised his voice in a song, and the exultantly melancholy pæan to beauty blended with the other sounds like a skillfully woven thread in a tapestry. It died away so gradually as to seem as if it had never been. The fiddles sighed to silence in a burst of expiring passion. Nobody spoke for several moments. Music was bred in the bone of these wild folk. It held them as could nothing else. What of Giorgi Bordu? said Tokalji presently. Does he sing or play or dance? Nikka reached out his hand almost eagerly. I will play, if you wish. I vowed not to touch the fiddle again, but— His fingers closed lovingly on the crude instrument, and he cuddled it under his chin. His bow swept the strings in a torrent of arpeggios. He stood up and strode into the firelight as if upon a stage. And then he began to play, plaintively, at first, in a minor key. There were the noises of the night, a crackling fire, animals stirring, the cry of a child, awakening. The music brightened, quickened, became joyous. You felt the rays of the sun, and comfort of work. Men and women danced and sang. A harsh note intervened. There was a quarrel. Anger yelled from the strings. Turmoil ensued. Faster and faster went the tune. And then peace, and the measure became slower, almost stately. The caravan had passed on. A forest encompassed it. Boughs clashed overhead, birds twittered and sang. Cool shadows fell athwart the path. But the way grew steep. The music told of the rocks and the slippery mud where a stream had overflowed, of the steady climb, of the endurance required. The caravan reached the height. A chill wind blew, but fair before them stretched a pleasant land, and the descent was easy to the warm, brown road that wound across the plain. Sunset and camp again, firelight, the moon overhead, talk of love, the sensuous movement of a dance. Then, languorous and slow, the coming of sleep.
  • 30. I did not know it, but I was listening to the composition of Zaranko's Gypsy Sonata Op. 27, which some day, I suppose, will be as famous as the Revolutionary Etude or the Hungarian Rhapsody or Beethoven's dream of the moonlight. But no audience will ever hear it with greater appreciation than those ragged Gypsies who sat around the fire in the dirty courtyard of the house in Sokaki Masyeri. As Nikka resumed his place in the outer circle, only the whispering of the flames broke the stillness. The very children were frozen on their knees, drunk with the ecstasy of melody. Heh! called Beran Tokalji, first to shake off the spell. I do not wonder you vowed not to touch the fiddle, if you like the open road. With that bow of yours, Giorgi Bordu, you could wring hundreds of gold pieces from the Franks. You play like the Redcoats in the khans in Buda and Bucharest. Heh-heh! I have heard Niketu and Stoyan Mirko and Karaji, and they were not to be compared with you. It is seldom the bravest men have the touch of the fiddler. Others spoke up readily in praise or asked questions as to Nikka's opinion on moot points of harmony and the desirable methods of interpreting various Gipsy songs. They would have had him play again, but he refused. I think he was emotionally exhausted. We have no fiddler to match with you, remarked Tokalji, and the gaida[1] and the flute are not fit for real music. But our maidens can dance. Heh, girls, come out, shy ones! Let the strangers view your grace. [1] Bagpipes. They giggled amongst themselves, and swayed into a group that was as spontaneously instinct with rhythm as an old Greek temple frieze. But suddenly they split apart. Kara will dance, they cried. Let Kara dance for the strangers.
  • 31. And Kara floated into the circle of firelight like a spirit of the forest. She still wore only the scanty madder-red skirt and torn bodice. The cloud of her hair tumbled below her waist. Her tiny naked feet barely touched the ground. Slowly she whirled, and the Gipsy fiddles caught her time. A man with cymbals clashed an accompaniment. A flute whistled soprano. She increased the tempo; she varied her steps. She was a flower shrinking beneath the grass. She was a dove pursued by a falcon. She was a maiden deserted by her lover. She was a fairy hovering above the world. We who watched her were breathless with the joy of the spectacle, and when she sank to the ground in a little pile of rags and hair as the music ended, I thought she must be worn out. But she bounded up at once, breathing regularly, radiating vitality. Now I will dance the Knife Dance! she exclaimed. Who will dance with me? And before any could answer her, she seized a blazing stick from the fire, and ran around the circle waving it overhead until she came to where Nikka sat. Ho, Giorgi Bordu, you who do not fear the knife, will you dance the Knife Dance with me? Every eye in the circle was fixed on Nikka, for, although I did not know it then, to have refused her invitation would have been a deadly insult, equivalent to a declaration of enmity toward her family and tribe. Similarly, acceptance of it amounted to an admission that he considered her favorably as a wife, without definitely committing him to matrimony. Nikka did not hesitate. He stepped to her side. She slipped one arm around his waist, and with the other swung her torch in air until it showered sparks over the circle. Hi! she cried. Hi! echoed Nikka. And they pranced around the fire while the music commenced an air so fiercely wild that it made the blood tingle to listen to it. Then she flung down her torch, and tore free from Nikka's arm. He followed her. She eluded him. Bound and round they tore, keeping step the while. Now she
  • 32. accepted him, now she rejected him. At last he turned from her, arms folded, contemptuously unmoved. She wooed him with rhythmic ardor. He denied her. She drew her knife; he drew his. Eyes glaring, lips pinched, they circled one another, feinting, striking, leaping, posturing. Click! The blades struck together. Hi! Hi! they cried. Click! Clack! Click! went the knife-blades. Ho! Ho! they shouted. The game was to see how near you could come without cutting. To avoid hurt the dancers required quick eyes and agile bodies. The blades flashed like meteors in the shifting light, wheeling and slashing and stabbing. In the beginning Kara forced the pace. Nikka retired before her, rather than risk doing her harm. But slowly he assumed the mastery. His knife was always at her throat, and active as she was, he refused to be shaken off. She fended desperately, panting now, bright-eyed and flushed. But he pressed her. Their blades clashed, he gave his a twist and hers dropped from her hand. He seized her, forcing her back across his knee, knife up-raised to strike, while the fiddles clutched at one's nerves and the cymbals clanged with wicked glee. The scene—Nikka's tall figure, with the poised knife, and the lithe, slender form he held, expressing in every curve and line its tempestuous, untamed soul—brought to my memory the song I had heard him sing one morning in the music-room at Chesby: And best of all, I shall hear The wild, mad Tzigane songs, Cruel and gay and lustful, Like fiddles and clanging gongs. And in the glare of the campfires I shall see the Tziganes dance— Women with lithe, round bodies, Men straight as a heiduck's lance.
  • 33. And perhaps a wild brown maiden Will seek me— Crash! boomed a knock on the street-door. And rap-rap-rap! it was repeated. Crash! again. The music stopped. Nikka released his partner, and Kara stooped quickly and snatched up her knife, tossing the hair out of her eyes, heedless as usual of the rags that slipped off her shoulders. Men looked at each other uncertainly. Hands crept to waist-sashes. Heh! said Tokalji. Who can it be in such a hurry at this hour?' Crash! The door resounded under the battering of a pistol-butt. CHAPTER XVIII THE BIG SHOW BEGINS The women and children—all save Kara—withdrew into the shadows. The men gathered together. Tokalji crossed to the entrance. Less noise there! he shouted threateningly. This is a peaceful house. But his manner changed the moment he opened the wicket. What he said we could not hear, but we saw him quickly turn the lock and throw back a leaf of the door, salaaming low as he stepped aside. Six men burst in, four of them in European clothes, and Nikka and I exchanged a glance of apprehension as we recognized the broad shoulders of their leader and heard his snarling voice.
  • 34. Toutou LaFitte had arrived. With him were Hilyer, Serge Vassilievich and Hilmi Bey. The two who brought up the rear, somewhat sulky and fearful, were the spies we had seen in front of the Pera Palace that morning. Can I trust nobody to fulfill my orders? whined Toutou, striding toward the fire. I tell you to spare no efforts—and I come to find you singing and dancing around a fire! Is that working? Is that carrying out our treaty? But all are the same! My best people fail me. His green eyes shone evilly; his hands writhed with suppressed ferocity. Tokalji, having refastened the door, followed him across the courtyard. The Gypsy looked uncomfortable, but showed no fear. What could we have done that we have not done? he retorted. Was it our fault that you lost track of the two missing ones? As for the English lord and his servant, my two men that I see with you have shadowed them day and night. And lost them to-day, as they admit, snarled Toutou. Lost them for a whole day! Who knows what has been accomplished in that time? You are right there, agreed Tokalji coolly, and I have just picked two new men to take their places. Zlacho and Petko are good enough for ordinary thievery, but this job seems to be above them. That is well, said Toutou, partly mollified. There must be a change in our methods or we shall fail in this coup. I decided to hasten on to Constantinople with my colleagues because I was sure the two who have escaped us must come here sooner or later, and whenever they come we shall find them. But I cannot do everything. It is for you to follow their trails. Never fear! We shall, replied Tokalji. My new men start out at once. One of them is a Frank like yourself; the other is a Tzigane. Ha; let me see that Frank, exclaimed Toutou. I know many of the Franks who live with the Tziganes.
  • 35. Step out, Giorgi Bordu and Jakka, called Tokalji. Nikka sunk his fingers in my arm in a warning grip, and we stepped forth from the group of Tziganes clustered in front of the fire. There was at least a chance that we should not be identified—but its value was demonstrated the instant the firelight splashed over Nikka's aquiline face and tense, febrile body. Surely, I have seen that lean fellow before, piped Hilmi Bey, pointing at Nikka. I saw them standing near the Frank lord and his servant in Pera this morning, said one of the spies. What of that? shouted Tokalji angrily. It is true they followed the Franks—which was more than you could do, Petko—and robbed them. No, the Franks followed them, protested Zlacho, the other spy. You lie, you dog! bellowed Tokalji. You think to discredit them because they will do the work you bungled. Vassilievich pushed in front of the newcomers. Is it my imagination, he inquired softly, or does the stocky one bear a resemblance to the Americansky, Nash? By jove, I think you're right! exclaimed Hilyer, speaking for the first time. Be ready, hissed Nikka from the corner of his mouth, without shifting his eyes from our enemies. His right hand was thrust into his waist-sash. I do not like this business, rasped Toutou, pulling a knife from inside his vest. Somebody shall be tortured until he tells the truth. I felt a pressure between Nikka and myself, and Kara's voice whispered:
  • 36. Run, you fools! To the House of the Married! Nikka's pistol flashed blue in the firelight. Shoot, Jack! he cried. A ruddy flame jetted from his muzzle, and the spy Petko dropped dead. Toutou LaFitte pushed Zlacho in the line of fire before himself, and dived into the encircling shadows as Zlacho crumpled up with a broken leg. Tokalji, Hilyer, Vassilievich and Hilmi scattered. I swung on my heel and shot twice over the group of Gypsies by the fire. I could not bring myself to shoot at them, for there were women and children close by. Then a bullet whistled past my ear, and Toutou's voice whined: No shooting! Use your knives! Take them alive! I had a fleeting glimpse of Kara, running at me with her knife raised. There are only two! roared Tokalji. Pull them down! Run! I heard Nikka shout. We pelted for the house on our left, the House of the Married, as Kara had called it. Despite Toutou's warning, a second bullet spattered on the stones between Nikka and me; but we were poor marks in the half-light, with people running in every direction, many of them uncertain who were friends or foes. I turned as I ran, and fired into the ground in front of Kara, who was the closest of our pursuers; but she refused to be frightened and actually plunged through the doorway on our heels. I'll tend to her, panted Nikka. You fasten the door, Jack. There was a wooden bar, which I dropped into place, and the next minute the framework groaned under a weight of bodies. No shooting, yelled Tokalji. You fools, you'll have the Frank police in here!
  • 37. One hundred Napoleons a head for them, barked Toutou. Dead or alive. The uproar redoubled, and then Tokalji evidently invaded the throng hammering at the door. Leave that door alone, he snapped. You're wasting time. Go through the windows. Come on, Nikka, I urged. We can't guard every point. We must run for it. But what about this? demanded Nikka whimsically. He jerked his pistol muzzle at Kara sitting demurely on the floor, playing with her knife. If we show our backs, she'll knife us or open the door—and besides, where shall we go? Tie her up, I answered impatiently. Kara, who, of course, could not understand a word of what we were saying, laughed with glee. Do you think I am your enemy? she demanded in the Tzigane dialect. I tell you I am your friend. See! And she tossed her knife across the room. I came with you to help you, Giorgi Bordu. My name is Nikka Zaranko, he answered shortly. What matters your name? She leaped up and flung her arms around his neck. It is you I love—not your name. Nikka eyed me sheepishly across her shoulder. See you, little one, he remonstrated, this is no time for talking of love. We may be dead in five minutes.
  • 38. Oh, no, she said, releasing him, nevertheless, you shall be off and away. I, Kara— and it was ridiculous how she strutted in the manner of Tokalji, himself—will set you free—because I love you. But I am the enemy of your tribe—your enemy, replied Nikka. You do not realize what you do. I care not who you are, she insisted. I love you. I care that for the tribe! She snapped her fingers. But come, she added as a crash sounded outside. They have broken in a window. Follow me. She led us into an adjoining room, where in the thickness of the wall a narrow stairway corkscrewed upward, debouching on the upper floor. Here was a long hall, with rooms opening off it, their windows usually on the inner courtyard, the Garden of the Cedars of the First Hugh's Instructions. She turned to the right, and entered one of the rooms. A ladder leaned against the wall below a trap-door in the roof. In a corner stood a bedstead, which she stripped of its clothes, revealing the cords that served for springs. Cut those with your knife, she said. When we take to the roofs we will need them to help us down again. Nikka did as she directed, while I shut the door, and piled the few articles of furniture against it. Tokalji's men were in full cry downstairs. There is more than enough rope here, said Nikka, coiling it on his arm. Some of it I am going to use for you. What? Passion dawned in her big eyes. You cannot go with us, little one. We have no place to take you. And you do not know me. To-morrow you would cry your eyes out.
  • 39. I tell you I love you, she answered proudly. I, Kara Tokalji. The daughter of my deadly enemy, reiterated Nikka. Oh, he is not my father, she said lightly. No, I think I will go with you, Nikka. And I think you won't, retorted Nikka, gritting his teeth. Here, Jack, catch hold. He cut the rope in two, gave me half, and with the remaining section, approached her. She backed away from him. I'm not going to hurt you, pleaded Nikka. But I must bind you so they will not suspect that you aided us. Don't you see? And we could not run so fast with you. I can run as fast as the Frank, she declared. But— Our enemies will be here in a moment, warned Nikka. She extended her hands, wrists joined together. Bind me, she said wearily. I love you, Nikka Zaranko. If I can help you in no other way, then, I will help you by staying here. He bound her gently, hand and foot, without a word, and laid her on the floor by the bed. I ascended the ladder, and pushed back the trapdoor. You will come again? she asked, looking up at him with mournful eyes. If I do, it will be as an enemy, he returned. Your enemies are my enemies, she cried, struggling to a sitting position. With a woman it is her man who counts. She cares nothing for the tribe—unless it be her man's. Now, you are my man, Nikka Zaranko.
  • 40. Nikka stooped over her, and I scrambled up on the roof. I believe he kissed her. I heard his feet on the ladder-rungs, and his voice calling back: You are a brave girl. We will talk about this some other time, if the stars are kind. Oh, we shall meet again, she replied, her cords creaking as she dropped flat on the floor. I am as sure of it as if Mother Kathene had told me when the sight was on her. To me he merely said: Hurry, Jack! We've lost too much time. Which way? But I reached down first, and hauled up the ladder. The door was shaking under a shower of blows. Kara looked interested as my arm appeared, and her lips shaped themselves for a kiss. Then she saw it was I, and scowled. Next house, I panted, and we set off across the roof. To our left was the inner courtyard, a well of darkness in which tinkled the Fountain of the Lion. To our right lay Sokaki Masyeri. Ahead was a drop of ten feet on to the adjoining roof, the difference in height representing the declining slope of the ground. We made it without any difficulty. The people in this house had been aroused by the shooting, and we could hear their voices and movements. But we shuffled on cautiously, until we came to their courtyard, which ran clear from the street-front to the old sea-wall. No choice, grunted Nikka. Here's a chimney. Knot your rope. It can't be more than twenty-five feet to the ground.' Why not slide directly into the street? I argued. They might catch us coming down. Do as I say, and we can make sure whether the coast is clear before we leave the courtyard. He went down first, and I followed him, scorching my hands, for the rope was thin and had no knots to check one's descent. I was in mid-air
  • 41. when I heard an exclamation beneath me, and a thud. What the devil— I started to whisper. Hsst! came from Nikka. Don't say anything. He was standing over an inert figure lying on the ground beside a half- opened door. Did you— No, only belted him over the head with my pistol. A woman's voice sounded inside the house, aggressively inquisitive. My God! breathed Nikka. She'll be out in a minute, and I can't hit her. We've got to try the street. We stole through the courtyard to the street-door. Behind us Toutou's house was seething with activity. Somebody, apparently, had just gained the roof. The woman inside the house we had invaded became impatient, and a light showed. My fingers fumbled for the latch; it seemed to me I should never find it. The light wavered into the doorway, and a scream rose shrilly. Let me try, said Nikka. Here it is! He pulled the door toward us very slowly, and we peered into the street. Not a figure showed in the direction of Tokalji's house. Ahead of us only a kerosene lantern burned in front of a coffee-shop on the corner where Sokaki Masyeri curved to the north. And the woman in the doorway of the house behind us was shrieking for dear life. We sped out into the street, letting the door slam behind us. The noise distracted the attention of the woman from her unconscious husband, and she left him to run after us. We also made the mistake of taking the middle of the way instead of sticking to the shadows under the walls. And we had not gone fifty feet when we were seen by Gypsies on the roof of Tokalji's house, and they, with the woman to help them, cried the rest of the pack hot on our trail.
  • 42. At the corner by the coffee-shop I looked back and counted six in a tapering string, with more emerging from the courtyard or climbing over the roofs. Luckily for us, however, there was a four-way crossing a hundred yards beyond the coffee-shop, and Nikka turned left, away from Pera, toward which they would expect us to head. We would have been safe then if we had not blundered into a Turkish gendarme. He was naturally suspicious of our haste, and blocked the narrow way; but I gave him a terrific punch in his fat stomach before he could pull his gun. We got by, of course, but his roars put the Tziganes right, and they followed the scent instead of losing it as we reckoned they would. The only thing for Nikka to do in the circumstances was to twist and turn without heed to direction and lose both pursuers and ourselves in the breakneck purlieus of Stamboul. He succeeded in shaking off the Gypsies finally, but we were hopelessly astray, and it was past midnight when we found the Khan of the Georgians and staggered through the gate to thread a precarious path between sleeping men, camels, bullocks, asses and horses. Wasso Mikali awakened with the first knock on his door, and admitted us. Smoking cigarette after cigarette as rapidly as he could roll them, he listened to the story of our adventures with avidity,—although I discovered later that Nikka had suppressed Kara's part—and immediately dispatched his young men to spy around Tokalji's house, and learn the dispositions the enemy were taking. Then he insisted that we should sleep while he kept watch, and the last memory I have of that awful night is of the old Gypsy's figure stretched out on the floor, his back against the bolted door and a cigarette in his mouth. When we awakened the sun was streaming in through the open door along with all the noises of the Khan and many of its smells. Our guardian had coffee ready for us in a pot on the brazier, and his young men had sent in a report. The women and children had left Tokalji's house under escort of several of the men shortly after dawn. A vigilant guard was being maintained on the entrance, and nobody had come or gone—aside from the party of women and children—since observation had been established. Before sunrise our spies had heard the sounds of digging inside the premises.
  • 43. Wasso Mikali looked doubtful as he imparted this last information. Perhaps they, too, have discovered the location of the treasure, he suggested. No, said Nikka, smiling. They are burying their dead. Ha, that is a good thought to hold in the mind, exclaimed the old Gypsy, immensely pleased. What better pleasure could a man ask than to contemplate his enemies burying their brother that he slew! But instead of indulging in this Tzigane pastime we decided to take our European clothing and adjourn to a neighboring Turkish bath where we could remove the evidence of our Gypsy life. Wasso Mikali went with us to carry back to the khan our discarded Gipsy costumes. I urged him to join us in the pool after we had soaked off the top layer of iniquities in a private room; but he shook his head with a grimace of disgust. Tell Jakka, O son of my sister, he said, that I marvel at the way you risk your naked skins. How can a man hope to withstand the cold and heat if he has nothing but clothing to cover him? Too much water is bad for the strongest. It weakens the muscles. CHAPTER XIX FIRST CRUISE OF THE CURLEW So far, Jack, you and Mr. Zaranko seem to have had most of the fun, pronounced my cousin Betty, as we sat at luncheon in the Kings' private sittingroom in the Pera Palace. Watkins for the moment acted as butler, and we were safe from inquisitive ears and could talk with freedom.
  • 44. What interests me, said Hugh thoughtfully, is how many of those Johnnies you scragged last night. Only the one, I think, replied Nikka. You hit another chap, I reminded him. Yes, but two off their strength doesn't mean any great reduction in their fighting force. Still, counting in those two and the men they sent off with their women, as Nikka's pals reported, they'll be a good bit weaker than they were, argued Hugh. Just the same, insisted Betty, we ought not to run any unnecessary risks. Who's we? I inquired. See here, Jack, she flashed, because you're my cousin is no reason why you can bully me. You might as well understand that I am in this, and I am going to have my part in whatever we do. Hear, hear, Hugh applauded servilely. Nikka laughed. How about it, Vernon? I demanded of my uncle. He spread his hands in a gesture of depreciation. My dear Jack, he said, you evidently have small acquaintance with the younger feminine generation. Betty is of legal age—I trust, my dear, you have no objection to the revelation of an intimate detail your sex are supposed to cherish in secret?— Not a particle, dad, Betty responded cheerfully.
  • 45. —and within reasonable limits, her judgment is to be depended upon. Moreover, a not unimportant consideration is that she knows how to run a motor, and in our excursions in the Curlew her aid has been of some value., Don't be stuffy, Jack, urged Hugh. Give the girl a chance. There are lots of things she can do, short of mixing it with your friend Toutou. I gather that Nikka's lady friend in the hostile camp was not averse— That's a different matter, I interrupted, perceiving the embarrassment on Nikka's face. We had slurred over Kara's personal interest in his fortunes, but even so, the incident, to quote Betty's analysis, was romantic to the nth degree. I don't see that it is, asserted Betty stubbornly, and I intend to play my part. You are short-handed— You forget that Nikka has seven men hidden away in Stamboul, I reminded her. On the contrary, I take them into account, she retorted. But you have all been saying that it is advisable not to use them, except in a final emergency. That is true, agreed Nikka. The more we bring into this row, the noisier it will become. Also, as we decided before, we ought to have an ace or two in the hole. Take my advice, and hang on to Wasso Mikali and his young men to the last. I'm not disputing you, said Betty, still belligerent. What you say is only what I've been saying. But would you mind telling me why you are so set against using your Gypsies? If we use them there will be killing on a big scale, said Nikka succinctly. That sort of thing is bound to become known.
  • 46. I met Riley-Gratton, the O.C. of the M.P.s this morning, and he gave me a wad of town gossip, cut in Hugh, but he didn't say anything about our lads' scrap at Tokalji's house. Oh, we can get away with it once or maybe twice, returned Nikka, but if we keep it up we'll run into trouble. No question of it, I said. Then what are we arguing about?' demanded Betty. I laughed. Darn it all, I confessed. You won't let up, will you? Well, have it your own way. What do you want to do? Run you down the Bosphorus after dark for a look at Tokalji's house from the water side, she answered promptly. Hugh intervened. There's no question in the minds of you two chaps but that any attack ought to come from the water front, is there? he asked. It couldn't very well come from the street, replied Nikka. There's a high, windowless wall and a strong door, and even in that lawless quarter publicity would attend an armed invasion of private property. Of course, said Betty, her head in the air, it couldn't be any other way. Now tell us some more about the hiding-place of the treasure. Nikka shrugged his shoulders and looked at me. What more can we say? I answered. There's the courtyard and the red stone. It's not hollow, you said? spoke up King. No.
  • 47. That would indicate a task of some difficulty in prying loose the covering of the treasure chamber, he remarked. We have—or rather, I should say, Betty has—taken precautions to install on board the Curlew an equipment of crowbars, pick-axes, shovels, chisels and other tools— —and a knotted rope with a grapnel on the end to help in going up the sea-wall, reminded Betty. True, my dear. Your forethought has been admirable. What I was about to say, however, was that a certain amount of time—I fear, perhaps, an inordinate amount of time—will be required to pry loose the covering of the vault. How are we to secure ourselves such an opportunity? By choosing a time when the occupants of the house are off-watch and their numbers diminished, declared Hugh. True, agreed Nikka, yet I confess I don't see how— And to make a long story short we hashed it over all afternoon until tea- time, without arriving at any clearer view of the outlook before us. By that time we were sick of the discussion, and voted to suspend. Vernon King and Betty went to a reception at the British High Commissioner's, and the rest of us planned to take a walk on the chance of running into Wasso Mikali, who had promised to come over to Pera in the afternoon if his spies picked up any additional information. The first person we saw in the hotel lobby was Montey Hilyer. He hailed us in front of the booking-office. I say, Chesby, he drawled in tones that reached all the bystanders, I don't know what sort of a lark you fellows were up to last night, but really, you know, you can't take liberties with natives in the East—and especially, with their women. Really, old chap, you ought to be careful. In your place, I think I'd clear out of Constantinople. No knowing what kind of trouble you may get into. Hugh was furious. He looked Hilyer up and down with cold scorn.
  • 48. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com