0 Introduction
With the continuous development of multimedia and network technology, how to effectively use channel bandwidth when transmitting image or video information has become one of the main topics of discussion today. Rate control is a method that must be used to control the bit rate in image or video encoding. Its ultimate goal is to reasonably distribute the target bit rate to the image or video in order to obtain the minimum distortion.
JPEG2000 is a new international standard for compression coding of still images. As it adopts a new structure different from other image compression standards, JPEG2000 has the advantages of high compression ratio, support for lossy and lossless compression, random access and processing of code streams, etc. The coding algorithm of JPEG2000 includes discrete wavelet transform (DWT) and bit plane entropy coding. In JPEG2000, rate control can be performed by trying different quantization step sizes: and through the bit plane MQ encoder, JPEG2000 can accurately and simply control the bit rate to achieve the required bit rate. The core coding method of JPEG2000 is embedded code block coding (EBCOT). Its optimal truncation is a rate control method that minimizes image distortion. This process is after the wavelet coefficients are entropy coded (compressed), so it is also called post-compression rate distortion optimization (PCRD).
According to the actual rate-distortion information of all compressed data, PCRD technology can calculate the image distortion minimization of the target bitstream. However, this also requires all the bitstream data of the image. In fact, a lot of data will not be output, and this process will also take up a lot of memory and calculation. Therefore, this paper proposes a new rate control method that can effectively reduce the amount of calculation and memory usage, while achieving similar results.
1 Introduction to JPEG2000
As a new international compression standard, JPEG2000 can usually be regarded as six parts: wavelet transform (DWT), scalar quantization, bit coefficient modeling, arithmetic coding, post-compression rate-distortion optimization and code stream organization.
Wavelet transform can decompose an image into four sub-bands: LL, HL, LH and HH, and can be decomposed at multiple levels. LL is where the low-frequency information of the image is located, and the other three sub-bands contain the high-frequency information of the image. After these wavelet coefficients are quantized, they can enter the EBCOT encoding process.
1.1 Entropy Coding
The entropy coding process generally includes coefficient modeling and arithmetic coding. It is essentially a bit plane coding process. In this process, each coding block is encoded independently and passes through three coding channels, namely the importance channel, the amplitude refinement channel, and the zeroing channel. These coding channels will find the context of each bit coefficient according to the bit coefficient model, and then perform context-based arithmetic coding (MQ) on the bit coefficient.
1.2 Bit rate control
Bit rate control involves three parts: quantization, entropy coding and bitstream organization. Quantization is the process of repeatedly adjusting the quantization step size according to the required compression rate to achieve the target bitrate. This is an interactive control method. Another method of using post-compression processing is to set a truncation point for each coding block in the bitstream data. This truncation point can determine the amount of data encoded by the coding channel of each code block. This is the post-compression rate-distortion optimization of JPEG2000. The specific algorithm is as follows:
First, set the bitrate of the coding block Bi to be
, the distortion to be
, and the target bitrate of the final compressed data to be Rmax. Then the truncation point of each coding block can be freely selected. It only needs the final bitrate to satisfy the following formula:
If the distortion of the reconstructed image is represented by the sum of the distortions of each coding block, the distortion of the reconstructed image is:
Thus, at the intercept point ni, the rate-distortion slope is:
Then, using the Lagrange multiplier method, the optimal truncation point λ can be found, thereby achieving optimal truncation coding.
2 New rate control method
The optimal truncation point λ can only be obtained through the actual rate-distortion slope of all truncation points, which requires that all bit plane data encoded by the entropy coding process and all encoded bit streams are stored in the memory, and even those bit streams that do not need to be transmitted after bit stream control must be encoded and stored. However, through research, it is found that if the rate-distortion slope of each truncation point is arranged in a descending manner, the arrangement order is related to the number of bit plane layers. In general, the rate-distortion slope of a high bit plane is greater than that of a low bit plane; secondly, the rate-distortion slope of the first encoded channel is greater than that of the later encoded channel.
Based on the above two points, the bit plane information of the image can be scanned first, and then those bits with large rate distortion slope can be encoded. The unimportant bits can be left unencoded. The process of this method is to first calculate the highest bit plane number Pi of each code block Bi according to the following formula:
Where is the maximum coefficient in the code block Bi. Then, find the maximum number of planes:
The sequence diagram for scanning each code block is shown in Figure 1. For each scanned code block, there are generally the following three conditions:
(1) First, determine whether Pi = Pmax. If so, encode the unencoded bit plane channels of this coding block, then reduce Pi by 1, and then check condition (2). Otherwise, check condition (3);
(2) If the accumulated bit rate is greater than the target bit rate, exit encoding immediately. Otherwise, check condition (3);
(3) If this is the last coding block, then Pmax is reduced by 1, and then the coding of the next layer is started. Otherwise, the next coding block is scanned.
Since the above condition (2) is satisfied
, the bit rate will not exceed the compression rate limit. Conditions (1) and (3) fully consider the importance of bit planes and coding channels, thus ensuring the best image quality.
3 Experimental Results
Here, we use the 512x512 lena image for testing. Table 1 records the comparison between PCRD and the new method in terms of computation and memory usage. Table 2 lists the comparison of the two methods in terms of PSNR. The decompressed image effects of the two methods are shown in Figure 2.
4 Conclusion
Through the analysis of JPEG2000, this paper proposes a method to control the bit rate by estimating rate-distortion information. Since this method does not need to encode all the data, it can effectively reduce the amount of redundant calculation and memory usage while maintaining the image quality.
Previous article:Design of AC Motor Servo Controller Based on DSP
Next article:Design and implementation of a frequency sweeper based on FPGA and single chip microcomputer
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Many netizens recommend: Yatli AT-START-F403A, you deserve it! The event will be online soon, so stay tuned~
- The mobile station adds a new board, the STM32F723 Discovery Kit
- [Teardown of the car wireless charger] - Disassembling the Deli wireless car charger
- TTP250-S001 dimming solution and capacitive touch switch chip
- [Fudan Micro FM33LG0 Series Development Board Review] A Preliminary Study on the Rubik's Cube Development Environment
- BOOST Circuit Simulation
- Bluetooth (cc2540) protocol stack learning 1
- XMC4800 Review (Part 4) - Data Sharing
- 【DIY Creative LED】WS2812 Effect Display File
- One watt of GaN is less than one yuan, and it is free shipping by SF Express? Lenovo has launched a price war on GaN.