A method, apparatus, and electronic device for effectively adjusting the compression rate of a reference frame image.
By dividing the reference frame image into blocks and updating the bitrate weight parameters in real time, the problem of high computational overhead in existing technologies is solved, enabling flexible compression rate adjustment and meeting real-time requirements, thereby improving image compression quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI FULLHAN MICROELECTRONICS
- Filing Date
- 2022-09-27
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies suffer from high computational overhead in reference frame image compression, failing to meet real-time requirements.
By dividing the reference frame image into several small blocks, initializing the target bit count for each pixel, calculating the target and actual bit rate weight parameters, using the HEVC and VVC standard models to calculate quantization parameters, and updating image feature-related parameters in real time, flexible compression rate adjustment is achieved.
This approach simplifies the calculation process, meets real-time requirements, and improves the objective and subjective quality of reference frame image compression without compromising encoder quality.
Smart Images

Figure CN115550650B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, and electronic device for effectively adjusting the compression rate of a reference frame image. Background Technology
[0002] With the rapid development of computer and network communication technologies, real-time visual communication, multimedia communication, IPTV, and video surveillance are attracting increasing attention. Therefore, reference frame image compression technology has become an urgent problem to be solved.
[0003] Different compression methods exist depending on the type of redundancy in the reference frame image data. Based on whether the decoded data is completely identical to the original data, compression methods can be classified into lossless compression and lossy compression.
[0004] Lossless compression means that the decompressed data is exactly the same as the original data. This type of compression is characterized by a relatively low compression ratio, and the compression ratio can vary significantly depending on the data source. Lossy compression, on the other hand, results in the loss of some information after compression, meaning that the decompressed data differs from the original data. This type of compression is characterized by a high compression ratio, and the compression ratio is adjustable.
[0005] For many current image compression standards, on the one hand, how to obtain the minimum coding performance loss under the premise of a fixed compression ratio is not within the scope of image compression standards, because image compression standards only define the process of data bitstream parsing; on the other hand, due to the diversity and complexity of the original images being encoded, the compression performance provided by the reference models of various coding standards, including prediction performance, frequency domain coefficient extraction performance, coefficient quantization performance, and entropy coding performance, varies greatly. Generally, coding performance is only evaluated by fixing coding quantization parameters. However, in practical lossy compression applications, the fixed compression ratio compression method is the most typical application method for reference frame images. Therefore, it is particularly important to customize a method that can effectively adjust the compression ratio for reference frame image compression.
[0006] Currently, the JPEG Joint Image Processing Group has released two of the most representative compression standards: JPEG-LS and JPEG2000. For the JPEG-LS compression standard, Chinese patent application CN102088602A proposes a bitrate control method for JPEG-LS image compression, which discloses a method to achieve bitrate control by adjusting the quantization parameter NEAR through empirical values using local statistical data from partitions. Chinese patent application CN102695055A discloses a JPEG-LS bitrate control method under high bitrate conditions, which mainly utilizes a generalized Gaussian distribution model to predict the optimal quantization parameter NEAR to achieve bitrate control. In the JPEG2000 standard model, the currently recommended approach is to use the PCRD (Proportion-Based Distortion) algorithm for bitrate adjustment. This involves first performing complete arithmetic encoding on all code blocks in each frame, and then using a bitrate allocation algorithm to truncate the generated bitstream.
[0007] As can be seen, the aforementioned rate control methods generally employ a pre-coding process to extract basic image coding information (such as the number of bits for lossless coding or the mean absolute prediction residual (MAD)). Based on this, the rate is adjusted, and then a fixed compression rate is obtained through the formal coding process. However, this approach requires significant additional computational overhead and cannot meet the real-time application requirements of compressing reference frame images. Summary of the Invention
[0008] To overcome the shortcomings of the existing technology, the present invention aims to provide a method, apparatus, and electronic device for effectively adjusting the compression rate of a reference frame image, so as to achieve the purpose of effectively adjusting the compression rate of the reference frame image.
[0009] To achieve the above and other objectives, the present invention proposes a method for effectively adjusting the compression rate of a reference frame image, comprising the following steps.
[0010] Step S1: Divide the reference frame image to be compressed into several n×n small blocks;
[0011] Step S2: Based on the total data volume of the reference frame image to be compressed and the target compression ratio requirement, initialize the target bit count of n×n blocks and obtain the target bit count (bpp) occupied by each pixel. targe ;
[0012] Step S3: Calculate the target bit rate weight parameter λ based on the number of target bits occupied by each pixel obtained in step S2. real ;
[0013] Step S4: Calculate the quantization parameter QP based on the relationship between the quantization parameter QP and the target bit rate weight parameter, in order to perform encoding quantization;
[0014] Step S5: Complete the encoding process of the current n×n block and obtain the actual number of encoded bits (bpp) for each pixel of the current n×n block. real ;
[0015] Step S6, based on the actual number of encoded bits (bpp) of the current n×n block. rea Calculate the actual bitrate weight parameter λ comp ;
[0016] Step S7: Update the parameters related to the features of the reference frame image and update the remaining number of allocable bits. After the update, return to step S2 and proceed to the processing of the next n×n block.
[0017] Optionally, in step S3, the target bit rate weight parameter λ real The calculation is as follows:
[0018]
[0019] Wherein, α and β are parameters related to the features of the reference frame image to be compressed.
[0020] Optionally, in step S4, the quantization parameter QP is calculated using the relationship between the quantization parameter QP and the target bit rate weight parameter in the HEVC and VVC standard models.
[0021] Optionally, in step S6, the actual bitrate weight parameter λ is calculated according to the following formula. comp value:
[0022]
[0023] Optionally, in step S7, the parameters α / β related to the features of the reference frame image are updated as follows:
[0024]
[0025] in,
[0026] Optionally, during the process of updating the parameters related to the features of the reference frame image, the constraints of the parameters are related to the target compression ratio.
[0027] Alternatively, for a target compression ratio of 1 / 2, the parameter constraints are as follows:
[0028] α = [0.05, 20]
[0029] lnbpp real = [-5.0, 1.0].
[0030] Optionally, for a target compression ratio of 1 / 3, the parameter constraints are as follows:
[0031] α = [0.05, 1024]
[0032] lnbpp real =[-5.0,-0.1].
[0033] To achieve the above objectives, the present invention also provides an apparatus for effectively adjusting the compression rate of a reference frame image, comprising:
[0034] The image segmentation unit is used to divide the reference frame image to be compressed into several n×n small blocks;
[0035] The target bit count determination unit is used to initialize the target bit count of n×n blocks based on the total data volume of the reference frame image to be compressed and the target compression ratio requirement, and to obtain the target bit count (bpp) occupied by each pixel. target ;
[0036] The target bitrate weight parameter calculation unit is used to calculate the target bitrate weight parameter λ based on the target bitrate number occupied by each pixel obtained by the target bitrate determination unit. real value;
[0037] The quantization parameter calculation unit is used to calculate the quantization parameter QP based on the relationship between the quantization parameter QP and the target bit rate weight parameter, so as to perform encoding quantization;
[0038] The encoding unit is used to complete the encoding process of the current n×n block and obtain the actual number of encoded bits (bpp) of the current n×n block. real ;
[0039] The actual bitrate weight parameter calculation unit is used to calculate the actual number of encoded bits (bpp) for each pixel in the current n×n block. rea Calculate the actual bitrate weight parameter λ comp ;
[0040] The update unit is used to update the parameters related to the features of the reference frame image and update the remaining allocable bits, and then return to the target bit number determination unit after the update to enter the processing of the next n×n block.
[0041] To achieve the above objectives, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the above-described steps of effectively adjusting the compression rate of the reference frame image.
[0042] Compared with the prior art, the present invention provides a method, apparatus, and electronic device for effectively adjusting the compression rate of a reference frame image, which has the following advantages:
[0043] 1. In this invention, the parameters α / β related to the features of the reference frame image are only related to the information of the reference frame image and are not related to the encoding and compression process. Therefore, there is no correlation or tight coupling, and the entire bit rate control process will not interfere with the quality of the encoder itself.
[0044] 2. In this invention, the parameters α / β related to the features of the reference frame image are updated in real time. The calculation process is simple and does not require complicated preprocessing and precoding processes, thus meeting the real-time requirements of reference frame image compression.
[0045] 3. The present invention ultimately demonstrates a significant performance improvement in both the objective indicators and subjective quality of reference frame image compression. Attached Figure Description
[0046] Figure 1 A flowchart illustrating the steps of a method for effectively adjusting the compression ratio of a reference frame image, as provided in an exemplary embodiment of the present invention.
[0047] Figure 2 A structural diagram of an apparatus for effectively adjusting the compression rate of a reference frame image, provided as an exemplary embodiment of the present invention;
[0048] Figure 3 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation
[0049] The following describes the embodiments of the present invention through specific examples and in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0050] Exemplary methods
[0051] Figure 1 This is a flowchart illustrating the steps of a method for effectively adjusting the compression rate of a reference frame image according to the present invention. Figure 1 As shown, the present invention provides a method for effectively adjusting the compression ratio of a reference frame image, comprising the following steps:
[0052] Step S1: Divide the reference frame image to be compressed into several n×n small blocks.
[0053] In this invention, the reference frame image is divided into several n×n small blocks. It can be assumed that as long as the blocks are small enough, the use and updating of the parameters α / β related to the features of the encoded frame image can effectively reflect the relevant information of the image during the block-by-block encoding process. Taking an M×N reference frame image to be compressed as an example, it can be divided into M×N / (n*n) n×n small blocks.
[0054] Step S2: Based on the total data volume of the reference frame image to be compressed and the target compression ratio requirement, initialize the target bit count of n×n blocks and obtain the target bit count (bpp) occupied by each pixel. targe .
[0055] In this embodiment, the target number of bits for an n×n block is determined based on the compression ratio. In the specific determination process, for the calculation of the target number of bits for an n×n block, various methods can be used to reasonably allocate the target number of bits, such as methods based on block MAD (Mean Absolute Deviation) information, block gradient information, or block texture information, etc. This invention is not limited to these methods.
[0056] bpp (bits per pixel) refers to the number of effective bits occupied by each pixel (ignoring channels). Taking a 1920×1080, 12-bit mono monochrome image as the reference frame image to be compressed, its total data volume is 1920×1080×12=24883200 bits, that is, the total number of effective bits is 24883200 bits. The total number of pixels is 1920×1080. Therefore, the target number of bits occupied by each pixel is bpp. target =24883200 / 1920×1080=12. The target number of bits in each n×n block is determined by the target compression ratio. If the target compression ratio is 1 / 2, then the bpp... target = n*n*12*1 / 2. For example, if the target compression ratio is 1 / 2, the simplest allocation method is uniform allocation, meaning the bpp of each pixel is half of its original width. If a non-linear method is used, the allocation can be based on the MAD or gradient in a certain proportion. This is because blocks with larger MAD or gradients can be considered to have more texture or motion, requiring more bits, while smaller blocks are flatter or have simpler textures, requiring fewer bits.
[0057] Step S3: Calculate the target bit rate weight parameter λ based on the number of target bits occupied by each pixel obtained in step S2. real value.
[0058] In this embodiment, the target bitrate weighting parameter λ real The value is calculated as follows:
[0059]
[0060] Wherein, α / β are parameters related to the features of the reference frame image to be compressed, but not to the coding parameters. The initial values of α / β can be obtained by experimental testing. In this embodiment, the initial value of α is 3.2003 and the initial value of β is 1.367.
[0061] Here, the principle of formula (1) is explained as follows:
[0062] In this embodiment, the rate-distortion model of the hyperbolic function can be applied to the present invention:
[0063] D(R) = CR -K
[0064] Based on the Lagrange cost function:
[0065] J(D,R)=D+λ×R, where λ is the code rate weight value;
[0066] The aim is to find the minimum rate-distortion cost, resulting in the following formula:
[0067]
[0068] Here, α / β are parameters related to the features of the reference frame image, and are independent of the coding parameters.
[0069] Step S4: Calculate the quantization parameter QP based on the relationship between the quantization parameter QP and the target bit rate weight parameter, and then perform encoding quantization.
[0070] In this embodiment, the quantization parameter QP is calculated using the relationship between the quantization parameter QP and the target bitrate weight parameter in the HEVC (High Efficiency Video Coding) and VVC (Versatile Video Coding) standard models, as follows:
[0071] QP = 4.2005 × ln(λ) + 13.7122
[0072] It should be noted that the relationship between the quantization parameter QP and the target bitrate weight parameter is not unique, and this invention is not limited to this.
[0073] Step S5: Complete the encoding process of the current n×n block and obtain the actual number of encoded bits (bpp) for each pixel of the current n×n block. real .
[0074] The actual number of encoded bits is the actual number of encoded bits after encoding and compression, which is determined by the actual encoding compression ratio. Specifically, the relationship is as follows: Actual number of encoded bits per pixel / Original number of bits per pixel = Actual encoding compression ratio.
[0075] In addition, in this embodiment, the encoding of the current n×n block can be carried out by the corresponding encoding method as needed. The specific encoding process is existing technology and will not be described in detail here.
[0076] Step S6, based on the actual number of encoded bits (bpp) of the current n×n block. real Calculate the actual bitrate weight parameter λ comp .
[0077] In this embodiment, the actual bitrate weight parameter λ can be calculated according to the following formula. comp value:
[0078]
[0079] Step S7: Update the parameters related to the features of the reference frame image and update the remaining number of allocable bits. After the update, return to step S2 and proceed to the processing of the next n×n block.
[0080] In this embodiment, the parameters α / β related to the features of the reference frame image are updated as follows:
[0081]
[0082] in, Parameter δ α With δ β The calculation can be referred to in Chinese patent application No. 201510191967, entitled "An Algorithm for Updating HEVC Rate Control Model Parameters Based on Distortion Measurement", but this invention is not limited thereto.
[0083] Then α = α new and β = β new Then proceed to step S2 to begin processing the next n×n block.
[0084] In other words, after encoding an n×n block, the actual number of encoded bits for that n×n block can be obtained. By updating the remaining allocable bits, the bpp of the next n×n block can be obtained. target Value, up to bpp target == 0.
[0085] In this embodiment, the constraint on the parameter α / β related to the features of the reference frame image is shown through experimental testing to be affected by the target compression ratio. Optionally, in this embodiment, the constraint is as follows:
[0086] 1 / 2 compression ratio:
[0087] Compression ratio of 1 / 3 or higher:
[0088] Exemplary device
[0089] Figure 2 This is a system structure diagram of a device for effectively adjusting the compression rate of a reference frame image according to the present invention. Figure 2 As shown, the present invention provides an apparatus for effectively adjusting the compression rate of a reference frame image, comprising:
[0090] The image segmentation unit 201 is used to divide the reference frame image to be compressed into several n×n small blocks.
[0091] In this invention, the reference frame image is divided into several n×n small blocks. It can be assumed that as long as the blocks are small enough, the use and updating of the parameters α / β related to the features of the encoded frame image can effectively reflect the relevant information of the image during the block-by-block encoding process. Taking an M×N reference frame image to be compressed as an example, it can be divided into M×N / (n*n) n×n small blocks.
[0092] The target bit count determination unit 202 is used to initialize the target bit count of n×n blocks based on the total data volume of the reference frame image to be compressed and the target compression ratio requirement, and to obtain the target bit count (bpp) occupied by each pixel. target .
[0093] The target bitrate weight parameter calculation unit 203 is used to calculate the target bitrate weight parameter λ based on the target bitrate number occupied by each pixel obtained by the target bitrate determination unit 202. real value.
[0094] The quantization parameter calculation unit 204 is used to calculate the quantization parameter QP according to the relationship between the quantization parameter QP and the target bit rate weight parameter, so as to perform encoding quantization.
[0095] Encoding unit 205 is used to complete the encoding process of the current n×n block and obtain the actual number of encoded bits (bpp) for each pixel of the current n×n block. real .
[0096] Actual bit rate weight parameter calculation unit 206 is used to calculate the actual bit rate weight parameter based on the actual number of encoded bits (bpp) of the current n×n block. real Calculate the actual bitrate weight parameter λ comp .
[0097] The update unit 207 is used to update the parameters related to the features of the reference frame image and update the remaining allocable bits, and after the update, it returns to the target bit number determination unit 202 to enter the processing of the next n×n block.
[0098] Example
[0099] In this embodiment, the compression process of the reference frame image with a fixed compression ratio (taking a 1920*1080, 12-bit mono monochrome image with a 1 / 2 compression ratio as an example) is described in detail. The entire process is divided into two parts: bitrate allocation and parameter update.
[0100] Bitrate allocation process
[0101] 1. First, the 1920×1080 reference frame image is divided into 4×4 blocks. The entire bit rate control process is processed in 4×4 blocks. The 4×4 blocks can be considered to have a good inheritance and preservation of the correlation of adjacent information in the image. They are also suitable for the native coding algorithm to perform block-based prediction and frequency domain transformation processing.
[0102] 2. A 1920×1080, 12-bit mono monochrome image has a total data volume of 1920×1080×12=24,883,200 bits. The target number of bits to compress at a 1 / 2 compression ratio is 12,441,600 bits. After dividing the image into 4×4 blocks, there are 129,600 4x4 block processing units.
[0103] 3. The number of bits in each processing unit is pre-allocated using a uniform distribution method, i.e., in the first 4×4 unit, where bpp target =6 bits, so the target number of bits for this 4×4 processing unit is 4×4×bpp. target ;
[0104] 4. After each processing unit is encoded, the actual number of encoded bits for that unit can be obtained. By updating the remaining allocable bits, the bpp for the next processing unit can be obtained. targe Value, up to bpp target == 0, the pre-allocation process ends.
[0105] The update process for the parameters α / β related to the features of the reference frame image is as follows:
[0106] 1) Complete the encoding process of 4×4 blocks to obtain the actual number of encoded bits (bpp). real ;
[0107] 2) Calculate the actual bitrate weight parameter λ comp value:
[0108] 3) Update of parameters α / β related to the features of the reference frame image:
[0109] α new =α old +δ α ·(lnλ real -lnλ comp )·α old δ α =0.1
[0110] β new =β old +δ β ·(lnλ real -lnλ comp )·lnbpp real , where δ β =0.05
[0111] Among them, parameter constraints:
[0112] Exemplary electronic devices
[0113] Figure 3 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them. Figure 3 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 3 As shown, the electronic device includes one or more processors 31 and memory 32.
[0114] The processor 31 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0115] The memory 32 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 31 may execute the program instructions to implement the methods for effectively adjusting the compression rate of reference frame images and / or other desired functions of the software programs of the various embodiments of this disclosure described above. In one example, the electronic device may also include an input device 33 and an output device 34, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0116] In addition, the input device 33 may also include, for example, a keyboard, a mouse, etc.
[0117] The output device 34 can output various information to the outside. The output device 34 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0118] Of course, for the sake of simplicity, Figure 3 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0119] Exemplary computer program products and computer-readable storage media
[0120] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps of the methods for effectively adjusting the compression rate of a reference frame image according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.
[0121] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0122] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform steps in the methods for effectively adjusting the compression rate of a reference frame image according to various embodiments of this disclosure as described in the "Exemplary Methods" section above.
[0123] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0124] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0126] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0127] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0128] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps are decomposable and / or recombinable. Such decomposition and / or recombination should be considered equivalent to the present disclosure. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0129] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A method for effectively adjusting the compression ratio of a reference frame image, comprising the following steps: Step S1: Divide the reference frame image to be compressed into several... Small pieces; Step S2, initializing the target bit number of the block according to the total data amount of the reference frame image to be compressed and the target compression rate requirement and obtaining the target bit number occupied by each pixel ; Step S3, calculating the target bit number occupied by each pixel according to the target bit number occupied by each pixel obtained in step S2 ; Step S4, based on quantization parameters Quantization parameters are calculated in relation to the target bitrate weight parameters. , in order to perform encoding quantization; Step S5, complete the current step. The encoding process of the block yields the current... Actual number of encoded bits per pixel in the block ; Step S6, based on the current Actual number of encoded bits in the block Calculate the actual bitrate weight parameter ; Step S7: Update the parameters related to the features of the reference frame image and update the remaining allocable bits. After the update, return to step S2 and proceed to the next step. The block processing procedure; In step S3, the target bitrate weight parameter The calculation is as follows: in, These are parameters related to the features of the reference frame image to be compressed.
2. The method for effectively adjusting the compression rate of a reference frame image as described in claim 1, characterized in that, In step S4, the quantization parameters in the HEVC and VVC standard models are used. The quantization parameter is calculated based on the relationship between the target bitrate weight parameter and the quantization parameter. .
3. The method for effectively adjusting the compression rate of a reference frame image as described in claim 1, characterized in that, In step S6, the actual bitrate weight parameter is calculated according to the following formula. value: 。 4. The method for effectively adjusting the compression rate of a reference frame image as described in claim 3, characterized in that, In step S7, the parameters related to the features of the reference frame image are... The update is as follows: , in, .
5. The method for effectively adjusting the compression rate of a reference frame image as described in claim 4, characterized in that: During the process of updating the parameters related to the features of the reference frame image, the constraints of the parameters are related to the target compression ratio.
6. The method for effectively adjusting the compression rate of a reference frame image as described in claim 5, characterized in that, For a target compression ratio of 1 / 2, the parameter constraints are as follows: 。 7. The method for effectively adjusting the compression rate of a reference frame image as described in claim 5, characterized in that: For a target compression ratio of 1 / 3, the parameter constraints are as follows: 。 8. An apparatus for effectively adjusting the compression rate of a reference frame image, comprising: The image segmentation unit is used to divide the reference frame image to be compressed into several segments. Small pieces; The target bit count determination unit is used to initialize the target bit count determination unit based on the total data volume of the reference frame image to be compressed and the target compression ratio requirement. The target number of bits for the block, and the target number of bits occupied by each pixel. ; The target bitrate weight parameter calculation unit is used to calculate the target bitrate weight parameter based on the target bitrate number occupied by each pixel obtained by the target bitrate determination unit. value; Quantization parameter calculation unit, used to calculate based on quantization parameters Quantization parameters are calculated in relation to the target bitrate weight parameters. , in order to perform encoding quantization; Encoding unit, used to complete the current The encoding process of the block yields the current... Actual number of encoded bits in the block ; The actual bitrate weight parameter calculation unit is used to calculate the actual bitrate weight parameter based on the current bitrate weight parameter. Actual number of encoded bits per pixel in the block Calculate the actual bitrate weight parameter ; The update unit is used to update the parameters related to the features of the reference frame image and update the remaining allocable bits, and then return to the target bit count determination unit to proceed to the next step. The block processing procedure; Among them, the target bitrate weight parameter The calculation is as follows: in, These are parameters related to the features of the reference frame image to be compressed.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the step of effectively adjusting the compression rate of the reference frame image as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Code rate control method for JPEG-LS (joint photographic experts group-lossless standard) image compression
CN102088602A
JPEG_LS (Joint Pho-tographic Experts Group-Lossless Standard) bit rate control method under high bit rate
CN102695055A
A Distortion Measurement Based Parameter Update Algorithm for Hevc Code Rate Control Model
CN104767999B
Code rate control method and device for video coding
CN110225343A
Reference frame cache data compression method, computer device and computer readable storage medium
CN112887725A