FPGA implementation of H.264 CAVLC decoder using High-Level Synthesis


  • Sławomir Cichoń
  • Marek Gorgoń


CONTEXT ADAPTIVE VARIABLE LENGTH CODING (CAVLC) is a method designed for coding residual pixel data after transform and quantization, in which different codes with variable length are chosen based on recently coded coefficients. Coded bitstream can be stored or transmitted. This method is optional in widely adopted H.264 video coding standard. The entire algorithm is a complex one, and also difficult to implement efficiently in FPGA, due to data dependency. When the complexity of the RTL implementation rises, it impacts the duration and costs of development. Therefore, usage of High Level Synthesis (HLS) may be beneficial with these types of projects. In this paper first known to authors implementation of CAVLC and Exp-Golomb decoders for H.264 intra decoder in Impulse C language will be presented and compared with other implementations. Proposed solution is able to decode more then 720p@40fps with FPGA module clock at 166MHz.


Damak, T., Bilavarn, S., Masmoudi, N. (2015, March). HLS based design of a mixed architecture for H. 264/AVC CAVLD. In Systems, Signals & Devices (SSD), 2015 12th International MultiConference on (pp. 1-4). IEEE.

FFmpeg GitHub. (2017). https://github.com/FFmpeg

H.264/AVC JM Reference Software. (2017). http://iphome.hhi.de/suehring/tml/download/

Lee, G.G., Xu, S.M., Chen, C.F., & Hsiao, C.J. (2012, December). Architecture of high-throughput context adaptive variable length coding decoder in AVC/H. 264. In Signal & Information Processing Association Annual Summit and Conference (APSIPA ASC), 2012 Asia-Pacific (pp. 1-5). IEEE.

Liu, X., Chen, Y., Nguyen, T., Gurumani, S., Rupnow, K., Chen, D. (2016, February). High level synthesis of complex applications: An H. 264 video decoder. In Proceedings of the 2016 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays (pp. 224-233). ACM.

Moon, Y.H. (2007). A new coeff-token decoding method with efficient memory access in H.

/AVC video coding standard. IEEE transactions on circuits and systems for video technology, 17(6), 729-736

Pellerin, D., Thibault, S. (2005). Practical fpga programming in c. Prentice Hall Press.

PICO M503. (2017). http://picocomputing.com/products/hpc-modules/m-503/

Richardson, I.E. (2011). The H. 264 advanced video compression standard. John Wiley & Sons

Seo, J.H., Jo, H.H., Sim, D.G., Kim, D.H., & Song, J.H. (2013). Fast CAVLD of H. 264/AVC on bitstream decoding processor. EURASIP Journal on Image and Video Processing, 2013(1), 23

Wen, Y.N., Wu, G.L., Chen, S.J., Hu, Y.H. (2006, December). Multiple-symbol parallel CAVLC decoder for H. 264/AVC. In Circuits and Systems, 2006. APCCAS 2006. IEEE Asia Pacific Conference on (pp. 1240-1243). IEEE.

Wiegand, T., Sullivan, G.J., Bjontegaard, G., Luthra, A. (2003). Overview of the H. 264/AVC video coding standard. IEEE Transactions on circuits and systems for video technology, 13(7), 560-576

Zajac, W. (2011). MPEG-4 codec implementation for high bit-rate video, Master Thesis, AGH