基于龙芯2k1000 SoC芯片JPEG图像处理优化设计

 2022-05-18 08:05

论文总字数:24493字

摘 要

学生签名:       导师签名:      日期:        

摘要

JPEG是一种图像文件格式,以其极高的压缩率和极强灵活性成为如今广泛应用的图像格式。Libjpeg是基于JPEG文件标准的C语言库,广泛应用于嵌入式领域和移动终端领域的JPEG文件的读写操作。但是,受制于嵌入式设备的计算能力,JPEG在嵌入式设备的解码速度受到很大限制。

本文基于龙芯2k1000 SoC芯片,对JPEG解码进行研究和优化。龙芯2k1000 SoC芯片集成了VPU硬件解码器,本文在Libjpeg库的基础上,实现龙芯平台的JPEG解码,并利用VPU的硬件特性实现对于JPEG解码的优化,实现解码速度的一定提升。同时,对软件解码及VPU解码的代码进行分析比较,分析二者在实现解码上的差异,并分析VPU解码对于CPU占用率的优化。最后,本文比较了不同分辨率的JPEG图像的软件解码和VPU解码速度的差异。

最后的结果表明,硬件解码在整体性能上确实优于软件解码。对分辨率大于128×149的6张测试图像均实现了对软解码20%以上的优化。而在CPU占用率方面,硬件解码在每个测试图像的解码上,都占用了更少的CPU运算资源。

关键词:JPEG;VPU解码;图像解码;龙芯2k1000 SoC芯片

Abstract

JPEG is an image file format that has become the most widely used image format with its extremely high compression ratio and flexibility. Libjpeg is a C library based on the JPEG file standard, which is widely used for reading and writing JPEG files in the embedded field and mobile terminal field. However, subject to the computing power of embedded devices, the decoding speed of JPEG in embedded devices is greatly limited.

Based on the Loongson 2k1000 SoC chip, this paper studies and optimizes JPEG decoding. The Loongson 2k1000 SoC chip integrates the VPU hardware decoder. Based on the Libjpeg library, this paper implements the JPEG decoding of the Loongson platform, and uses the hardware features of the VPU to optimize the JPEG decoding and achieve a certain improvement in decoding speed. At the same time, the software decoding and VPU decoding code are analyzed and compared, the difference between the two in decoding is analyzed, and the optimization of CPU usage by VPU decoding is analyzed. Finally, this paper compares the difference between software decoding and VPU decoding speed of JPEG images with different resolutions.

The final results show that hardware decoding is indeed superior to software decoding in overall performance. For 6 test images with resolution greater than 128×149, more than 20% optimization for soft decoding is achieved. In terms of CPU usage, hardware decoding occupies less CPU computing resources in decoding every test image.

Keywords:JPEG; VPU decoding; image decoding; Loongson 2k1000 SoC chip

目 录

摘要 II

Abstract III

目 录 IV

第一章 绪论 1

1.1课题背景和意义 1

1.2国内外研究现状 1

1.2.1基于其他平台的JPEG图像编解码的研究 1

1.2.2基于龙芯平台的JPEG实现 2

1.2.3VPU硬件优化方面的研究 2

1.3研究内容与设计指标 4

1.4论文组织 4

第二章 龙芯平台JPEG软件解码算法分析 5

2.1 JPEG算法简述 5

2.1.1JPEG文件编码 5

2.1.2JPEG解码过程 6

2.2龙芯平台基于Libjpeg的解码 7

2.3JPEG软件解码测试与分析 9

2.4本章小结 11

第三章 龙芯VPU解码单元的JPEG解码分析 12

3.1龙芯VPU解码单元 12

3.2基于龙芯VPU的图像解码 14

3.3硬件解码测试与分析 16

3.4本章小结 17

第四章 软硬件解码比较与分析 18

4.1软硬件解码性能测试方案 18

4.2解码性能测试结果分析与比较 19

4.2.1解码速度测试 19

4.2.2解码资源占用测试 23

4.3本章小结 24

第五章 总结与展望 25

5.1总结 25

5.2展望 26

参考文献 27

致 谢 28

第一章 绪论

1.1课题背景和意义

自20世纪80年代中期以来,国际电联和国际标准化组织的成员一直致力于在灰度和彩色静止图像的压缩方面出台一个国际标准。这项努力被称为JPEG[1],即Joint Photographic Experts Group。从1988年到1990年,JPEG小组经过模拟,测试和记录算法,使JPEG于1991年成为国际标准草案(DIS),1992年成为国际标准(IS)。

Libjpeg[2]是一个免费的库,具有处理JPEG图像数据格式的功能。它实现了一个jpeg编解码器(编码和解码)以及处理JPEG数据的各种实用程序。它是用C语言编写的,并以自由软件的形式与源代码一起根据自定义许可(类似于BSD)的自由软件许可证(需要属性)进行分发。原始变体由独立的JPEG组(IJG)维护和发布。同时,还有几个具有附加功能的分叉。

剩余内容已隐藏,请支付后下载全文,论文总字数:24493字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;