This paper presents a high-throughput and low-cost context adaptive binary arithmetic coding (CABAC) codec for
H.264/AVC High and Main Profile. We analyze the similarities between CABAC encoding and decoding algorithms and
propose an efficient pipeline architecture to accelerate their operations. A binary arithmetic unit is designed elaborately
which integrates the three engines regular, bypass and terminate for the encoder and decoder by taking advantage of
hardware sharing. The proposed CABAC codec is already integrated in a H.264 hardware core and is able to achieve
real-time decoding for H.264/AVC High Profile HD level 4.1. The implemented design can operate at 265MHz with
39.2k gate count under 0.18μm silicon technology.