CN115550650A - Method and device for effectively adjusting compression rate of reference frame image and electronic equipment - Google Patents

Method and device for effectively adjusting compression rate of reference frame image and electronic equipment Download PDF

Info

Publication number
CN115550650A
CN115550650A CN202211185140.1A CN202211185140A CN115550650A CN 115550650 A CN115550650 A CN 115550650A CN 202211185140 A CN202211185140 A CN 202211185140A CN 115550650 A CN115550650 A CN 115550650A
Authority
CN
China
Prior art keywords
reference frame
target
bit number
frame image
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211185140.1A
Other languages
Chinese (zh)
Inventor
章旭东
胡开云
刘斌
董鹏宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Fullhan Microelectronics Co ltd
Original Assignee
Shanghai Fullhan Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Fullhan Microelectronics Co ltd filed Critical Shanghai Fullhan Microelectronics Co ltd
Priority to CN202211185140.1A priority Critical patent/CN115550650A/en
Publication of CN115550650A publication Critical patent/CN115550650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream

Abstract

The invention discloses a method and a device for effectively adjusting the compression ratio of a reference frame image and electronic equipment, wherein the method comprises the following steps: s1, dividing a reference frame image to be compressed into a plurality of small blocks of n multiplied by n; s2, initializing the target bit number of the n multiplied by n blocks according to the total data volume of the reference frame image to be compressed and the target compression ratio requirement, and obtaining the target bit number occupied by each pixel; s3, calculating a target code rate weight parameter lambda according to the obtained target bit number occupied by each pixel real (ii) a S4, calculating a quantization parameter according to the relation between the quantization parameter and the target code rate weight parameter so as to carry out coding quantization; s5, completing the coding process of the current nxn block to obtain each of the current nxn blocksThe actual number of coded bits for a pixel; s6, calculating an actual code rate weight parameter according to the actual coding bit number; and S7, updating parameters related to the image characteristics of the reference frame and the residual distributable bit number, and returning to the step S2.

Description

Method and device for effectively adjusting compression rate of reference frame image and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for effectively adjusting a compression rate of a reference frame image, and an electronic device.
Background
With the rapid development of computer technology and network communication technology, services such as real-time visual communication, multimedia communication, network television, video monitoring and the like are receiving more and more attention. Thus, the reference frame image compression technique becomes an urgent problem to be solved.
There are different compression methods for different redundancy types of the reference frame image data. The compression method can be classified into lossless compression and lossy compression according to whether the decoded data is completely identical to the original data.
The lossless compression means that the decompressed and restored data is completely the same as the original data. The compression is characterized in that the compression ratio is relatively small, and completely different compression ratios can be obtained along with different data sources; lossy compression means that part of information is lost after compression, that is, the restored data has errors with the original data. The compression is characterized by a large compression ratio and by an adjustable compression ratio.
For many current image compression standards, on one hand, aiming at a compression process, how to obtain the minimum coding performance loss on the premise of fixing a compression ratio does not belong to the category of the image compression standards, because the image compression standards only define the process of data bit stream analysis; on the other hand, due to the diversity and complexity of the original image to be encoded, the compression performance provided by the reference models of various encoding standards, including the prediction performance, the frequency domain coefficient extraction performance, the coefficient quantization performance, the entropy encoding performance, and the like, is also very different, and generally, the encoding performance is evaluated only by fixing the encoding quantization parameter, but in the actual lossy compression application, the compression mode with the fixed compression ratio is the most typical application mode of the reference frame image, so that it is particularly important to customize a method capable of effectively adjusting the compression ratio for the compression of the reference frame image.
Currently, the JPEG joint image group introduced two most representative compression standards: JPEG-LS and JPEG2000. The Chinese patent application with the publication number of CN102088602A discloses a code rate control method for JPEG-LS image compression, which discloses a method for realizing code rate control by adjusting a quantization parameter NEAR through regional local statistical data and through empirical values, and the Chinese patent application with the publication number of CN102695055A discloses a JPEG-LS code rate control method under a high code rate, and the method mainly utilizes a generalized Gaussian distribution model to predict an optimal quantization parameter NEAR to realize code rate control; in the JPEG2000 standard model, it is currently recommended to use a PCRD (post-compression rate distortion) algorithm to perform code rate adjustment, i.e. first perform complete arithmetic coding on all code blocks in each frame of image, and then use a code rate allocation algorithm to truncate the generated code stream.
It can be seen that, the above-mentioned several code rate control methods basically adopt the pre-coding process to extract some image basic coding information (or the number of bits of lossless coding, or Mean Absolute prediction residual MAD (Mean Absolute error), etc.), and then perform code rate adjustment based on this, and then obtain the coding result of fixed compression rate through the formal coding process. However, this implementation not only requires a large amount of extra computational overhead, but also fails to meet the real-time application requirements for reference frame image compression.
Disclosure of Invention
In order to overcome the defects of the prior art, the present invention provides a method, an apparatus, and an 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.
To achieve the above and other objects, the present invention provides a method for effectively adjusting the compression rate of a reference frame image, comprising the following steps.
Step S1, dividing a reference frame image to be compressed into a plurality of small blocks of n multiplied by n;
s2, initializing the target bit number of the n multiplied by n block according to the total data volume of the reference frame image to be compressed and the target compression ratio requirement, and obtaining the target bit number bpp occupied by each pixel targe
Step S3, calculating a target code rate weight parameter lambda according to the target bit number occupied by each pixel obtained in the step S2 real
S4, calculating a quantization parameter QP according to the relationship between the quantization parameter QP and the target code rate weight parameter so as to carry out coding quantization;
s5, completing the coding process of the current n multiplied by n block to obtain the actual coding bit number bpp of each pixel of the current n multiplied by n block real
Step S6, according to the actual coding bit number bpp of the current n multiplied by n block rea l calculating the actual code rate weight parameter lambda comp
And step S7, updating the parameters related to the image characteristics of the reference frame and the residual allocable bit number, returning to the step S2 after updating, and entering the processing process of the next n multiplied by n block.
Optionally, in step S3, the target code rate weight parameter λ real The calculation is as follows:
Figure BDA0003867264000000031
and alpha and beta are parameters related to the image features of the reference frame to be compressed.
Optionally, in step S4, the quantization parameter QP is calculated by using a relation between the quantization parameter QP and a target code rate weight parameter in the HEVC and VVC standard models.
Alternatively, in step S6, the actual code rate weight parameter λ is calculated according to the following formula comp The value:
Figure BDA0003867264000000032
optionally, in step S7, the reference frame image feature related parameter α/β is updated as follows:
Figure BDA0003867264000000041
wherein the content of the first and second substances,
Figure BDA0003867264000000042
optionally, in the process of updating the parameter related to the reference frame image feature, the constraint of the parameter is related to the target compression rate.
Alternatively, for a target compression ratio of 1/2, the parameters are constrained as follows:
α=[0.05,20]
lnbpp real =[-5.0,1.0]。
alternatively, for a target compression ratio of 1/3, the parameters are constrained as follows:
α=[0.05,1024]
lnbpp real =[-5.0,-0.1]。
in order to achieve the above object, the present invention further provides an apparatus for effectively adjusting a compression ratio of a reference frame image, comprising:
the image segmentation unit is used for dividing a reference frame image to be compressed into a plurality of small blocks of n multiplied by n;
a target bit number determining unit, configured to initialize a target bit number of the nxn block according to the total data size of the reference frame image to be compressed and a target compression ratio requirement, and obtain a target bit number bpp occupied by each pixel target
A target code rate weight parameter calculation unit for calculating a target code rate weight parameter lambda according to the target bit number occupied by each pixel obtained by the target bit number determination unit real A value;
the quantization parameter calculation unit is used for calculating a quantization parameter QP according to the relation between the quantization parameter QP and the target code rate weight parameter so as to carry out coding quantization;
a coding unit for completing the coding process of the current nxn block to obtain the actual coding bit number bpp of the current nxn block real
An actual code rate weight parameter calculation unit for calculating an actual code rate weight parameter according to the actual coding bit number bpp of each pixel of the current n × n block rea l calculating the actual code rate weight parameter lambda comp
And the updating unit is used for updating the parameters related to the image characteristics of the reference frame and the residual allocable bit number, and returning to the target bit number determining unit after updating so as to enter the processing process of the next n multiplied by n block.
In order to achieve the above object, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above step of effectively adjusting the reference frame image compression ratio when executing the computer program.
Compared with the prior art, the method, the device and the electronic equipment for effectively adjusting the compression rate of the reference frame image have the following beneficial effects:
1. in the invention, the parameter alpha/beta related to the reference frame image characteristics is only related to the reference frame image information and is irrelevant to the encoding compression process, so that no correlation or tight coupling exists, and the whole code rate control process cannot cause interference to the prime quality of an encoder;
2. in the invention, the parameter alpha/beta calculation related to the reference frame image characteristics is updated in real time, the calculation process is simple, complex preprocessing and pre-coding processes are not needed, and the real-time requirement of reference frame image compression is met;
3. the invention finally shows that the invention has obvious performance improvement on objective indexes and subjective quality of reference frame image compression.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for efficiently adjusting the compression rate of a reference frame image according to an exemplary embodiment of the present invention;
fig. 2 is a block diagram of an apparatus for efficiently adjusting the compression rate of a reference frame picture according to an exemplary embodiment of the present invention;
fig. 3 is a structure of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
Exemplary method
FIG. 1 is a flowchart illustrating steps of a method for efficiently adjusting the compression ratio of a reference frame image according to the present invention. As shown in fig. 1, a method for effectively adjusting the compression rate of a reference frame image according to the present invention comprises the following steps:
step S1, equally dividing a reference frame image to be compressed into a plurality of n multiplied by n small blocks.
In the invention, the reference frame image is cut into a plurality of small blocks of n × n, and it can be considered that, as long as the cut blocks are small enough, in the coding process of block by block, the use and update of the parameter α/β related to the feature of the coded frame image can effectively reflect the related information of the image. Taking an M × N reference frame image to be compressed as an example, it can be equally divided into M × N/(N × N) N × N small blocks.
S2, initializing the target bit number of the n multiplied by n block according to the total data volume of the reference frame image to be compressed and the target compression ratio requirement, and obtaining the target bit number bpp occupied by each pixel targe
In this embodiment, the target number of bits of the n × n block is determined according to the compression rate, and in the specific determination process, the target number of bits of the n × n block is calculated as follows: the target number of bits may be reasonably allocated by various methods, such as a method based on block MAD (Mean Absolute error) information, block-based gradient information, or block-based texture information, and the invention is not limited thereto.
bpp (bits per pixel) refers to the number of effective bits (neglecting channel) occupied by each pixel, and takes a format 1920 × 1080, 12-bit mono monochrome image as a reference frame image to be compressed, and the total data volume is 1920 × 1080 × 12=24883200bit, that is, the total effective bits is 24883200bit, and the total number of pixels is 1920 × 1080, then each pixel occupiesTarget number of bits bpp to use target =24883200/1920 × 1080=12. The target number of bits per n × n block is determined by the target compression rate, which is 1/2, so that bpp target For example, if the target compression ratio is 1/2, the simplest allocation method is uniform allocation, i.e. the bpp of each pixel is half the original position width, if a nonlinear method is adopted, the allocation can be made according to the MAD or the gradient in a certain proportion, because the MAD or the block with larger gradient has more texture or motion, more bits need to be allocated, the smaller block has more flat or single texture, and the less bits need to be allocated
Step S3, calculating a target code rate weight parameter lambda according to the target bit number occupied by each pixel obtained in the step S2 real The value is obtained.
In this embodiment, the target code rate weight parameter λ real Values were calculated as follows:
Figure BDA0003867264000000071
where α/β is a parameter related to the image feature of the reference frame to be compressed, and is not related to the encoding parameter, the initial value of α/β may be obtained by experimental tests, and in this embodiment, the initial value of α is 3.2003, and the initial value of β is 1.367.
Here, the principle of the formula (1) is explained as follows:
in this embodiment, a hyperbolic function modeling Rate-Distortion model (Rate-Distortion model) can be applied to the present invention:
D(R)=CR -K
according to the lagrange cost function:
j (D, R) = D + λ × R, where λ is a bitrate weight value;
aiming at solving the minimum value of the rate-distortion cost to obtain a formula:
Figure BDA0003867264000000081
wherein, the alpha/beta is a parameter related to the image characteristic of the reference frame, and is not related to the coding parameter.
And S4, calculating a quantization parameter QP according to the relationship between the quantization parameter QP and the target code rate weight parameter, and carrying out coding quantization.
In this embodiment, a relation between a quantization parameter QP and a target code rate weight parameter in an HEVC (High Efficiency Video Coding) and VVC (universal Video Coding) standard model is used to calculate the quantization parameter QP, which is specifically as follows:
QP=4.2005×ln(λ)+13.7122
it should be noted that the relationship between the quantization parameter QP and the target rate weight parameter is not unique, and the present invention is not limited thereto.
S5, completing the coding process of the current n multiplied by n block to obtain the actual coding bit number bpp of each pixel of the current n multiplied by n block real
The actual number of coded bits is the actual number of coded bits after the coded compression, and is determined by the actual coding compression ratio, specifically, the relationship is as follows: pixel actual coded bit number/pixel original bit number = actual coding compression rate.
In addition, in this embodiment, a corresponding encoding method may be adopted for encoding the current n × n block as needed, and a specific encoding process is the prior art and is not described herein again.
Step S6, according to the actual coding bit number bpp of the current nxn block real Calculating the actual code rate weight parameter lambda comp
In this embodiment, the actual code rate weight parameter λ can be calculated according to the following formula comp The value:
Figure BDA0003867264000000091
and S7, updating the parameters related to the image characteristics of the reference frame and the residual distributable bit number, returning to the step S2 after updating, and entering the processing process of the next n multiplied by n block.
In this embodiment, the reference frame image feature-related parameter α/β is updated as follows:
Figure BDA0003867264000000092
wherein the content of the first and second substances,
Figure BDA0003867264000000093
parameter delta α And delta β The invention is named as a chinese patent application of HEVC rate control model parameter update algorithm based on distortion measure, which is referred to by the application number 201510191967, and the invention is not limited thereto.
Then a = a new And β = β new The flow advances to step S2 to the processing of the next n × n block.
That is, each time the encoding of an n × n block is completed, the actual number of encoding bits of the n × n block can be obtained, and the bpp of the next n × n block can be obtained by updating the remaining allocatable number of bits target Value up to bpp target ==0。
In the embodiment, for the constraint of the parameter α/β related to the reference frame image feature, experimental tests show that the constraint of the parameter related to the reference frame image feature is affected by the target compression rate. Optionally, in this embodiment, the constraint is as follows:
1/2 compression ratio:
Figure BDA0003867264000000094
1/3 compression ratio and above:
Figure BDA0003867264000000095
exemplary devices
Fig. 2 is a system configuration diagram of an apparatus for effectively adjusting the compression ratio of a reference frame image according to the present invention. As shown in fig. 2, an apparatus for efficiently adjusting the compression rate of a reference frame image according to the present invention comprises:
an image segmentation unit 201, configured to equally divide the reference frame image to be compressed into a number of n × n small blocks.
In the invention, the reference frame image is cut into a plurality of small blocks of n × n, and it can be considered that, as long as the cut blocks are small enough, in the block-by-block encoding process, the use and update of the parameter α/β related to the features of the encoded frame image can effectively reflect the related information of the image. Taking an mxn reference frame image to be compressed as an example, it can be equally divided into mxn/(N × N) nxn small blocks.
A target bit number determining unit 202, configured to initialize a target bit number of an n × n block according to the total data size of the reference frame image to be compressed and a target compression ratio requirement, and obtain a target bit number bpp occupied by each pixel target
A target code rate weight parameter calculating unit 203, configured to calculate a target code rate weight parameter λ according to the target bit number occupied by each pixel obtained by the target bit number determining unit 202 real The value is obtained.
And a quantization parameter calculation unit 204, configured to calculate a quantization parameter QP according to a relationship between the quantization parameter QP and the target code rate weight parameter, so as to perform coding quantization.
An encoding unit 205 for completing the encoding process of the current nxn block to obtain the actual encoding bit number bpp of each pixel of the current nxn block real
An actual rate weight parameter calculating unit 206, configured to calculate the actual coding bit number bpp according to the current n × n block real Calculating the actual code rate weight parameter lambda comp
An updating unit 207, configured to update the parameter related to the image feature of the reference frame and update the remaining assignable bit numbers, and return to the target bit number determining unit 202 after updating, so as to enter the processing procedure of the next n × n block.
Examples
In this embodiment, a detailed description is given to a compression process of a fixed compression ratio (exemplified by a format 1920 × 1080, 12bit mono monochrome image, 1/2 compression ratio) of a reference frame image, and the whole process is divided into two parts, namely rate allocation and parameter updating:
code rate allocation procedure
1. The 1920 x 1080 reference frame image is equally divided into 4x4 small blocks, the whole code rate control process is processed by the 4x4 small blocks, and the 4x4 small blocks can be considered to have good inheritance and maintenance on the correlation of image adjacent information and are also suitable for a native coding algorithm to perform block-based prediction and frequency domain transformation processing;
2. a monochrome image of 1920 × 1080 format, 12bit mono, a common data amount of 1920 × 1080 × 12=24883200bit, and a target bit number of 12441600bit compressed at a compression rate of 1/2. After the breadth is divided by 4x4 blocks, 129600 4x4 block processing units are in total;
3. the bit number of each processing unit is pre-allocated in a uniform distribution mode, namely the first 4 multiplied by 4 unit, wherein, bpp target A target number of bits of 4 × 4 processing units of =6 bits, and 4 × 4 × bpp target
4. The actual coding bit number of the unit can be obtained every time the coding of one processing unit is completed, and the bpp of the next processing unit can be obtained by updating the residual distributable bit number targe Value up to bpp target =0, the pre-allocation process ends.
The updating process of the parameter alpha/beta related to the reference frame image features is as follows:
1) Completing the coding process of 4x4 blocks to obtain the actual number of coded bits bpp real
2) Calculating the actual code rate weight parameter lambda comp The value:
Figure BDA0003867264000000111
3) Updating the parameter alpha/beta related to the image characteristic of the reference frame:
α new =α oldα ·(lnλ real -lnλ comp )·α old δ α =0.1
β new =β oldβ ·(lnλ real -lnλ comp )·lnbpp real wherein, in the step (A),δ β =0.05
wherein the parameters constrain:
Figure BDA0003867264000000121
exemplary electronic device
Fig. 3 is a structure of an electronic device according to an exemplary embodiment of the present invention. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom. Fig. 3 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 3, the electronic device includes one or more processors 31 and memory 32.
The processor 31 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
Memory 32 may include one or more computer program products that 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), cache memory (cache), and/or the like. 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 executed by the processor 31 to implement the method for effectively adjusting the reference frame image compression ratio of the software program of the various embodiments of the present disclosure described above and/or other desired functions. In one example, the electronic device may further include: an input device 33 and an output device 34, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The input device 33 may also include, for example, a keyboard, a mouse, and the like.
The output device 34 can output various information to the outside. The output devices 34 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 3, omitting components such as buses, input/output interfaces, and so forth. In addition, the electronic device may include any other suitable components, depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method of efficiently adjusting the compression rate of a reference frame image according to various embodiments of the present disclosure described in the "exemplary methods" section of this specification, above.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a method of efficiently adjusting a reference frame image compression ratio according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present disclosure have been described above in connection with specific embodiments, but it should be noted that advantages, effects, and the like, mentioned in the present disclosure are only examples and not limitations, and should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The method and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the apparatus, devices, and methods of the present disclosure, various components or steps may be broken down and/or re-combined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure. The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A method for effectively adjusting the compression ratio of a reference frame image comprises the following steps:
step S1, dividing a reference frame image to be compressed into a plurality of small blocks of n multiplied by n;
s2, initializing the target bit number of the n multiplied by n block according to the total data volume of the reference frame image to be compressed and the target compression ratio requirement, and obtaining the target bit number bpp occupied by each pixel target
Step S3, calculating a target code rate weight parameter lambda according to the target bit number occupied by each pixel obtained in the step S2 real
S4, calculating a quantization parameter QP according to the relationship between the quantization parameter QP and the target code rate weight parameter so as to carry out coding quantization;
s5, completing the encoding process of the current nxn block to obtain the actual encoding bit number bpp of each pixel of the current nxn block real
Step S6, according to the actual coding bit number bpp of the current n multiplied by n block real Calculating the actual code rate weight parameter lambda comp
And S7, updating the parameters related to the image characteristics of the reference frame and the residual distributable bit number, returning to the step S2 after updating, and entering the processing process of the next n multiplied by n block.
2. The method of claim 1, wherein in step S3, the target rate weight parameter λ real The calculation is as follows:
Figure FDA0003867263990000011
and the alpha and the beta are parameters related to the image characteristics of the reference frame to be compressed.
3. The method as claimed in claim 2, wherein in step S4, the quantization parameter QP is calculated by using a relation between the quantization parameter QP and the target rate weight parameter in the HEVC and VVC standard model.
4. The method for effectively adjusting the compression rate of a reference frame picture as claimed in claim 2, wherein in step S6, the actual bitrate weight parameter λ is calculated according to the following formula comp The value:
Figure FDA0003867263990000021
5. the method as claimed in claim 4, wherein in step S7, the parameters α and β related to the reference frame image features are updated as follows:
α new =α+δ α ·(lnλ real -lnλ comp )·α
β new =β+δ β ·(lnλ real -lnλ comp )·lnbpp real
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003867263990000022
6. a method for efficiently adjusting a compression rate of a reference frame picture as claimed in claim 5, wherein: in the process of updating the parameters related to the image characteristics of the reference frame, the constraint of the parameters is related to the target compression rate.
7. A method for effectively adjusting the compression rate of a reference frame picture as claimed in claim 6, wherein for a target compression rate of 1/2, the parameters are constrained as follows:
α=[0.05,20]
lnbpp real =[-5.0,1.0]。
8. a method for efficiently adjusting a compression rate of a reference frame picture as claimed in claim 6, wherein: for a target compression ratio of 1/3, the parameters are constrained as follows:
α=[0.05,1024]
lnbpp real =[-5.0,-0.1]。
9. an apparatus for efficiently adjusting a compression ratio of a reference frame image, comprising:
the image segmentation unit is used for dividing a reference frame image to be compressed into a plurality of small blocks of n multiplied by n;
a target bit number determining unit, configured to initialize a target bit number of the nxn block according to the total data size of the reference frame image to be compressed and a target compression ratio requirement, and obtain a target bit number bpp occupied by each pixel target
A target code rate weight parameter calculation unit for calculating a target code rate weight parameter lambda according to the target bit number occupied by each pixel obtained by the target bit number determination unit real A value;
the quantization parameter calculation unit is used for calculating a quantization parameter QP according to the relationship between the quantization parameter QP and the target code rate weight parameter so as to carry out coding quantization;
a coding unit for completing the coding process of the current nxn block to obtain the actual coding bit number bpp of the current nxn block real
An actual code rate weight parameter calculation unit for calculating an actual code rate weight parameter according to the actual coding bit number bpp of each pixel of the current n × n block real Calculating the actual code rate weight parameter lambda comp
And the updating unit is used for updating the parameters related to the image characteristics of the reference frame and the residual allocable bit number, and returning to the target bit number determining unit after updating so as to enter the processing process of the next n multiplied by n block.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the step of efficiently adjusting the compression rate of a reference frame image according to any one of claims 1 to 8.
CN202211185140.1A 2022-09-27 2022-09-27 Method and device for effectively adjusting compression rate of reference frame image and electronic equipment Pending CN115550650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211185140.1A CN115550650A (en) 2022-09-27 2022-09-27 Method and device for effectively adjusting compression rate of reference frame image and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211185140.1A CN115550650A (en) 2022-09-27 2022-09-27 Method and device for effectively adjusting compression rate of reference frame image and electronic equipment

Publications (1)

Publication Number Publication Date
CN115550650A true CN115550650A (en) 2022-12-30

Family

ID=84729267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211185140.1A Pending CN115550650A (en) 2022-09-27 2022-09-27 Method and device for effectively adjusting compression rate of reference frame image and electronic equipment

Country Status (1)

Country Link
CN (1) CN115550650A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116506617A (en) * 2023-06-28 2023-07-28 鹏城实验室 Image shallow compression code rate control method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116506617A (en) * 2023-06-28 2023-07-28 鹏城实验室 Image shallow compression code rate control method and device
CN116506617B (en) * 2023-06-28 2023-09-12 鹏城实验室 Image shallow compression code rate control method and device

Similar Documents

Publication Publication Date Title
US6654419B1 (en) Block-based, adaptive, lossless video coder
US8255444B2 (en) Method and device for filtering a multidemensional digital signal and associated methods and devices for encoding and decoding
US8588297B2 (en) Quantization parameter prediction
JPH10327403A (en) Method for optimizing compression of image data accompanying automatic selection of compression condition
WO2020150942A1 (en) Method and device for encoding and decoding images
US11012718B2 (en) Systems and methods for generating a latent space residual
KR100922510B1 (en) Image coding and decoding method, corresponding devices and applications
CN103188494A (en) Apparatus and method for encoding depth image by skipping discrete cosine transform (DCT), and apparatus and method for decoding depth image by skipping DCT
US8249372B2 (en) Methods and devices for coding and decoding multidimensional digital signals
US7778468B2 (en) Decoding apparatus, dequantizing method, and program thereof
CN115550650A (en) Method and device for effectively adjusting compression rate of reference frame image and electronic equipment
WO2022062369A1 (en) Point cloud encoding and decoding method and system, and point cloud encoder and point cloud decoder
CN107820084B (en) Video perception coding method and device
US6362753B1 (en) Video data encoder and method of encoding video data
WO2018109455A1 (en) Motion compensation techniques for video
WO2004006188A2 (en) Iterative compression parameters control for a sequence of images
WO2018014301A1 (en) Video coding method and device
KR100624404B1 (en) Adaptive coding method and apparatus considering human visual characteristics
CN112715029A (en) AI encoding apparatus and operating method thereof, and AI decoding apparatus and operating method thereof
CN112106365A (en) Method and apparatus for adaptive context modeling in video encoding and decoding
CN111163320A (en) Video compression method and system
JP5468383B2 (en) Method and apparatus for optimizing compression of a video stream
CN112543324B (en) Video decoding method, encoding method, codec and storage medium
KR20160065860A (en) Method for encoding and decoding a media signal and apparatus using the same
CN114189684A (en) JND algorithm-based video coding method, device, medium and computing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination