APP下载

基于HLS的HEIF图像预测编码模块设计

2025-08-06胡锦黄明帅毕晓猛

计算技术与自动化 2025年2期

摘 要:设计使用高层次综合语言HLS(High Level Synthesize)来实现图像预测帧内编码模块的功能。帧内预测编码是指利用视频空间域的相关性,使用当前图像已编码的像素预测当前像素,然后将预测残差(当前像素真实值与预测值之间的差值)作为后续编码模块的输入,进行下一步编码处理。HLS实现相比与直接使用verilog和其他的语言来实现,HLS具有开发周期短,可以极大地节省人力成本和时间成本、平台可移植性强以及更便捷的代码迭代等的优势。设计使用HLS实现的对HEIF编码IP中图像预测编码模块,主要用于FPGA中,优化后的IP总占用10795个FIFO和30705个LUT,并且设计在后续优化代码之后缩短了1/3原有编码所需时间,大大提升了编码速率。

关键词:图像帧内预测编码;预测残差;HEIF编码;HLS

中图分类号:TN46 文献标识码:A

Design of HEIF Image Prediction Coding Module Based on HLS

HU Jin1,HUANG Mingshuai1,BI Xiaomeng2

(1.School of Physics amp; Electronics, Hunan University,Changsha,Hunan 410082,China;

2. Zhongda Intelligent Technology Co., Ltd., Changsha,Hunan 410082,China)

Abstract:The design uses high level synthesize(HLS) language to realize the function of image prediction in frame coding module. Intra frame predictive coding refers to using the correlation of the video spatial domain to predict the current pixel using the encoded pixel of the current image, and then using the predicted residual (the difference between the real value of the current pixel and the predicted value) as the input of the subsequent coding module for the next encoding process. Compared with the implementation of verilog and other languages directly, HLS has the advantages of short development cycle, great savings in labor cost and time cost, strong platform portability and more convenient code iteration. The image prediction coding module of HEIF encoded IP implemented by HLS is designed, which is mainly used in FPGA. The optimized IP occupies 10795 FIFO, 30705 and LUT, and the design reduces the time required for original coding by 1/3 after the subsequent optimization of the code, greatly improving the coding rate.

Key words:image intra frame prediction coding;prediction residual;HEIF encoding;HLS

HEIF图像编码方法包括:获取HEIF图像数据;对图像数据进行计算,获得图像数据分量;对所述图像数据分量进行编程处理,获得所述HEIF图像数据的编码数据[1]。视频序列中的第一帧图像以及其他I帧的图像,在编码时没有可供参考的图像,只能利用自身的局部像素信息来降低空间冗余,该过程即为帧内编码。帧内预测技术是消除视频空间冗余的主要技术之一[2],因此帧内编码是HEVC编码中不可或缺的技术[3]。HLS具备很多其他高级语言所不具备的特点,比如任意精度数据库、HLS串流库以及HLS预处理指示等。基于 C/C++语言的原生数据类型都位于 8 位边界(8 位、16 位、32 位和 64 位)上。RTL总线(对应于硬件)支持任意数据长度。使用标准 C/C++ 语言数据类型可能导致硬件实现效率低下。……

登录APP查看全文