Quantization Parameter Adjustment Method, Device, Equipment and Storage Medium

By dynamically adjusting the quantization parameters according to the visual complexity and encoding complexity information of the encoding block during the image encoding process, the problem of subjective loss caused by inability to effectively adjust the quantization parameters in the prior art is solved, and more efficient encoding quality is achieved.

CN116095320BActive Publication Date: 2025-06-24HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD

Patent Information

Application Number
CN202211741038.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-06-24
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

The prior art cannot dynamically adjust the quantization parameters according to the content of the encoding block, resulting in subjective lossy effects.

Method used

The quantization parameters are dynamically adjusted by determining the visual complexity information and/or the encoding complexity information of the current encoding block. Specific methods include adjusting according to parameter thresholds, complexity thresholds, measurement values, etc.

Benefits of technology

The quantitative parameters are dynamically adjusted according to the content of the encoding block, avoiding subjective loss and improving the encoding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116095320B_ABST
    Figure CN116095320B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of image coding, and discloses a quantization parameter adjustment method, device, equipment and storage medium. This application determines the visual complexity information and / or coding complexity information corresponding to the current coding block, where the current coding block is the image coding block currently undergoing coding processing; determines the quantization parameter of the current coding block according to the visual complexity information and / or coding complexity information; and adjusts the quantization parameter of the current coding block. Since the quantization parameter of the current coding block can be determined according to the visual complexity information and / or coding complexity information of the current coding block and the quantization parameter of the current coding block is adjusted, it is ensured that the quantization parameter can be dynamically adjusted along with the content coding of the current coding block, thereby avoiding the subjective lossy effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image coding, and particularly to a quantization parameter adjustment method, device, equipment and storage medium. Background Art

[0002] In the encoding process of performing shallow encoding on image data, existing encoding technologies give smaller quantization parameters for visually simple regions and larger quantization parameters for visually complex regions.

[0003] However, in the case of a tight (nearly full) bitstream buffer, the quantization parameter is generally increased to reduce the risk of overflow in the bitstream buffer. However, if a coding block that is visually simple and easy to encode (such as a completely flat block) needs to be encoded at this time, or if a coding block that is visually complex but easy to encode (such as an IBC block) needs to be encoded at this time, over-intervention of rate control will occur, resulting in a subjective lossy effect.

[0004] Moreover, if a coding block contains both a visually simple region and a visually complex region, the visually simple region thereof often compromises and adopts a larger quantization parameter due to the presence of the visually complex region, resulting in a subjective lossy effect.

[0005] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main purpose of the present invention is to provide a quantization parameter adjustment method, device, equipment and storage medium, aiming to solve the technical problem that the prior art cannot dynamically adjust the quantization parameter according to the content of the coding block, easily resulting in a subjective lossy effect.

[0007] To achieve the above purpose, the present invention provides a quantization parameter adjustment method, and the method includes the following steps:

[0008] Determine the visual complexity information and / or coding complexity information corresponding to the current coding block, where the current coding block is an image coding block currently undergoing coding processing;

[0009] Determine the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information;

[0010] Adjust the quantization parameter of the current coding block.

[0011] In a possible implementation manner of the present application, the adjusting the quantization parameter of the current coding block includes:

[0012] Adjust the quantization parameter of the current coding block according to a parameter threshold.

[0013] In a possible implementation manner of the present application, adjusting the quantization parameter of the current coding block according to the parameter threshold includes:

[0014] If the quantization parameter is greater than the first parameter threshold and less than the second parameter threshold, set the quantization parameter to a preset quantization parameter;

[0015] Or,

[0016] If the quantization parameter is less than the first parameter threshold or greater than the second parameter threshold, do not adjust the quantization parameter of the current coding block;

[0017] Or,

[0018] If the quantization parameter is less than the third parameter threshold, set the quantization parameter to the third parameter threshold or reduce the quantization parameter, where the first parameter threshold is less than the third parameter threshold, and the third parameter threshold is less than the second parameter threshold.

[0019] In a possible implementation manner of the present application, adjusting the quantization parameter of the current coding block includes:

[0020] Adjust the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information, and the complexity threshold.

[0021] In a possible implementation manner of the present application, adjusting the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information, and the complexity threshold includes:

[0022] If the visual complexity information or the coding complexity information is less than the first complexity threshold, do not adjust the quantization parameter of the current coding block;

[0023] Or,

[0024] If the visual complexity information is less than the second complexity threshold and the coding complexity information is greater than the third complexity threshold, do not adjust the quantization parameter of the current coding block, where the second complexity threshold is less than the third complexity threshold.

[0025] In a possible implementation manner of the present application, adjusting the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information, and the complexity threshold includes:

[0026] If the visual complexity information is equal to the fourth complexity threshold, reduce the quantization parameter of the current coding block;

[0027] Or,

[0028] If the visual complexity information is greater than a fifth complexity threshold and the coding complexity information is greater than a sixth complexity threshold, increase the quantization parameter of the current coding block, where the fourth complexity threshold is less than the fifth complexity threshold;

[0029] Or,

[0030] If the visual complexity information is less than a seventh complexity threshold and the coding complexity information is less than an eighth complexity threshold, decrease the quantization parameter of the current coding block, where the fourth complexity threshold is greater than the seventh complexity threshold, the fifth complexity threshold is greater than the seventh complexity threshold, and the sixth complexity threshold is greater than the eighth complexity threshold.

[0031] In a possible implementation manner of the present application, adjusting the quantization parameter of the current coding block includes:

[0032] If the current coding block is at a preset specified position, decrease or increase the quantization parameter of the current coding block;

[0033] Or,

[0034] If the current coding block is at a preset specified position, do not adjust the quantization parameter of the current coding block.

[0035] In a possible implementation manner of the present application, adjusting the quantization parameter of the current coding block includes:

[0036] Determine the measure value of the target sample in the current coding block;

[0037] Adjust the quantization parameter of the current coding block according to the measure value.

[0038] In a possible implementation manner of the present application, the step of determining the measure of the target sample in the current coding block includes:

[0039] Calculate the measure value of the target sample in the current coding block according to the already reconstructed samples around the current coding block.

[0040] In a possible implementation manner of the present application, the step of calculating the measure value of the target sample in the current coding block according to the already reconstructed samples around the current coding block includes:

[0041] Determine the position of the already reconstructed sample corresponding to the target sample in the current coding block according to the prediction mode of the target sample;

[0042] Determine the measure value of the target sample in the current coding block according to the position of the already reconstructed sample.

[0043] In a possible implementation manner of the present application, before the step of determining the measure of the target sample in the current coding block, the method further includes:

[0044] Perform sub-block division on the current coding block, and divide the current coding block into multiple samples according to the sub-block division result. The measure values of the samples belonging to the same sub-block are the same.

[0045] In a possible implementation manner of the present application, the adjustment of the quantization parameter of the current coding block according to the measure value includes:

[0046] Reduce the quantization parameter of the sample whose corresponding measure value is less than the first measure threshold by the first gradient adjustment value;

[0047] Or,

[0048] Increase the quantization parameter of the sample whose corresponding measure value is greater than the second measure threshold by the second gradient adjustment value;

[0049] Or,

[0050] Do not adjust the quantization parameter of the sample whose corresponding measure value is greater than the first measure threshold and less than the second measure threshold, and the second measure threshold is greater than the first measure threshold.

[0051] In a possible implementation manner of the present application, the adjustment of the quantization parameter of the current coding block according to the measure value includes:

[0052] If the measure values corresponding to the target samples are all less than the third measure threshold, then do not adjust the quantization parameter of the current coding block;

[0053] Or,

[0054] If the measure values corresponding to the target samples are all greater than the fourth measure threshold, then do not adjust the quantization parameter of the current coding block, and the fourth measure threshold is greater than the third measure threshold.

[0055] In a possible implementation manner of the present application, the adjustment of the quantization parameter of the current coding block according to the measure value includes:

[0056] Adjust the quantization parameter of the current coding block according to the measure value and the visual complexity information and / or the coding complexity information.

[0057] In a possible implementation manner of the present application, the adjustment of the quantization parameter of the current coding block according to the measure value and the visual complexity information and / or the coding complexity information includes:

[0058] If the visual complexity information is within the first visual complexity range, increase or decrease the quantization parameter of the samples with corresponding measure values greater than the fifth measure threshold by the first sub-block adjustment value;

[0059] Or,

[0060] If the coding complexity information is within the first coding complexity range, adjust the quantization parameter of the samples with corresponding measure values less than the sixth measure threshold according to the second sub-block adjustment value;

[0061] Or,

[0062] If the coding complexity information is within the second coding complexity range and the visual complexity information is within the second visual complexity range, adjust the quantization parameter of the samples with corresponding measure values less than the seventh measure threshold according to the third sub-block adjustment value.

[0063] In a possible implementation manner of the present application, the adjustment of the quantization parameter of the current coding block includes:

[0064] If the current coding block is at a preset specified position and the visual complexity information is less than the preset visual complexity threshold, decrease the quantization parameter of the current coding block by the first adjustment value;

[0065] Or,

[0066] If the current coding block is at a preset specified position and the coding complexity information is less than the preset coding complexity threshold, decrease the quantization parameter of the current coding block by the second adjustment value;

[0067] Or,

[0068] If the current coding block is at a preset specified position, the visual complexity information is less than the preset visual complexity threshold, and the coding complexity information is less than the preset coding complexity threshold, decrease the quantization parameter of the current coding block by the third adjustment value;

[0069] Or,

[0070] If the current coding block is not at a preset specified position, the visual complexity information is less than the preset visual complexity threshold, and the coding complexity information is less than the preset coding complexity threshold, decrease the quantization parameter of the current coding block by the fourth adjustment value.

[0071] In a possible implementation manner of the present application, the adjustment of the quantization parameter of the current coding block includes:

[0072] Adjust the quantization parameters of all regions in the current coding block;

[0073] Or,

[0074] Adjust the quantization parameter of the preset area in the current coding block;

[0075] Or,

[0076] Do not adjust the quantization parameters of all areas in the current coding block.

[0077] In a possible implementation manner of the present application, at least one of the parameter threshold, the complexity threshold, the preset specified position, and the measure threshold is a preset value or a value read from high-level syntax, and the high-level syntax includes sequence level, picture level, or Slice level.

[0078] In a possible implementation manner of the present application, after adjusting the quantization parameter of the current coding block based on the adjustment judgment basis, it further includes:

[0079] Update the rate control parameter according to the adjusted quantization parameter, and the rate control parameter is used to calculate the quantization parameter of the coding block.

[0080] In addition, to achieve the above object, the present invention also proposes a quantization parameter adjustment device, and the quantization parameter adjustment device includes:

[0081] An information acquisition module, configured to determine the visual complexity information and / or the coding complexity information corresponding to the current coding block;

[0082] A parameter determination module, configured to determine the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information;

[0083] A parameter adjustment module, configured to adjust the quantization parameter of the current coding block.

[0084] In addition, to achieve the above object, the present invention also proposes a quantization parameter adjustment device, and the quantization parameter adjustment device includes: a memory, a processor, and a quantization parameter adjustment program stored on the memory and running on the processor, and the quantization parameter adjustment program is configured to implement the quantization parameter adjustment method as described above.

[0085] In addition, to achieve the above object, the present invention also proposes an encoding device, and the encoding device includes: a memory, a processor, and an encoding program stored on the memory and running on the processor, and the encoding program is configured to implement the quantization parameter adjustment method as described above.

[0086] In addition, to achieve the above object, the present invention further provides a decoding device, including: a memory, a processor, and a decoding program stored on the memory and running on the processor, where the decoding program is configured to implement the quantization parameter adjustment method as described above.

[0087] In addition, to achieve the above object, the present invention further provides a storage medium, on which a quantization parameter adjustment program is stored, and when the quantization parameter adjustment program is executed by a processor, it implements the quantization parameter adjustment method as described above.

[0088] The present invention determines the visual complexity information and / or coding complexity information corresponding to the current coding block, where the current coding block is an image coding block currently undergoing coding processing; determines the quantization parameter of the current coding block according to the visual complexity information and / or coding complexity information; and adjusts the quantization parameter of the current coding block. Since the quantization parameter of the current coding block can be determined according to the visual complexity information and / or coding complexity information of the current coding block and the quantization parameter of the current coding block is adjusted, it is ensured that the quantization parameter can be dynamically adjusted along with the content coding of the current coding block, thereby avoiding the subjective lossy effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 is a schematic structural diagram of an electronic device in the hardware operating environment related to the solution of the embodiment of the present invention;

[0090] Figure 2 is a schematic flowchart of the first embodiment of the quantization parameter adjustment method of the present invention;

[0091] Figure 3 is a schematic flowchart of the execution process of the shallow coding framework in an embodiment of the present invention;

[0092] Figure 4 is a schematic flowchart of the second embodiment of the quantization parameter adjustment method of the present invention;

[0093] Figure 5 is a schematic flowchart of the third embodiment of the quantization parameter adjustment method of the present invention;

[0094] Figure 6 is a schematic flowchart of the fourth embodiment of the quantization parameter adjustment method of the present invention;

[0095] Figure 7 is a schematic diagram of sub-block division in an embodiment of the present invention;

[0096] Figure 8 is a schematic diagram of positioning the position of the reconstructed sample in the vertical prediction mode in an embodiment of the present invention;

[0097] Figure 9Schematic diagram of locating the position of the reconstructed sample in the horizontal prediction mode according to an embodiment of the present invention;

[0098] Figure 10 Schematic diagram of locating the position of the reconstructed sample in the upper left to lower right prediction mode according to an embodiment of the present invention;

[0099] Figure 11 Schematic diagram of locating the position of the reconstructed sample in the upper right to lower left prediction mode according to an embodiment of the present invention;

[0100] Figure 12 Flow chart of the fifth embodiment of the quantization parameter adjustment method of the present invention;

[0101] Figure 13 Flow chart of the sixth embodiment of the quantization parameter adjustment method of the present invention;

[0102] Figure 14 Structural block diagram of the first embodiment of the quantization parameter adjustment device of the present invention.

[0103] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0104] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0105] Refer to Figure 1 , Figure 1 Structural diagram of the quantization parameter adjustment device in the hardware operating environment related to the embodiment solution of the present invention.

[0106] As Figure 1As shown in the figure, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (WI-FI) interface). The memory 1005 may be a high-speed Random Access Memory (RAM), or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0107] Those skilled in the art can understand that Figure 1 the structure shown in does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine some components, or have a different component layout.

[0108] As Figure 1 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a quantization parameter adjustment program.

[0109] In Figure 1 the electronic device shown in the figure, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be provided in a quantization parameter adjustment device. The electronic device calls the quantization parameter adjustment program stored in the memory 1005 through the processor 1001 and executes the quantization parameter adjustment method provided by the embodiments of the present invention.

[0110] The embodiments of the present invention provide a quantization parameter adjustment method. Referring to Figure 2 , Figure 2 it is a schematic flowchart of the first embodiment of a quantization parameter adjustment method of the present invention.

[0111] In this embodiment, the quantization parameter adjustment method includes the following steps:

[0112] Step S10: Determine the visual complexity information and / or coding complexity information corresponding to the current coding block, where the current coding block is the image coding block currently undergoing coding processing.

[0113] It should be noted that the execution subject of this embodiment can be the quantization parameter adjustment device, or the coding device or decoding device during the coding process of image data. The quantization parameter adjustment device can be an electronic device such as a personal computer or a server. Of course, it can also be other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the quantization parameter adjustment method of the present application will be described taking the quantization parameter adjustment device as an example.

[0114] It should be noted that when performing shallow coding processing on image data, the shallow coding framework generally includes modules such as block partitioning, rate control, prediction, transformation, quantization, and entropy coding. Among them, the block partitioning module will divide the image data into individual image coding blocks, and then sequentially perform coding processing on the divided image coding blocks. The current coding block can be the image coding block currently being coded.

[0115] The visual complexity information can be the sensitivity of the human eye to the current coding block area. The human eye is generally less sensitive to complex areas and more sensitive to simple areas. The coding complexity information can be the cost required to code the current coding block. Generally, visually complex blocks will cost more because they are difficult to predict, while visually simple blocks will cost less because they are easy to predict. Therefore, in some applications of the present application, the coding complexity information can be made equal to the visual complexity information to simplify the operation because visually simple areas are generally easy to code.

[0116] However, in special cases, such as the absence of a prediction mode or a mismatch in the coefficient coding algorithm, etc., a visually simple block may also cause a large coding cost. At this time, the coding complexity information may not be directly made equal to the visual complexity information, but the coding complexity can be analyzed separately to calculate the coding complexity information.

[0117] In a possible implementation manner of the present application, if the quantization parameter adjustment device is at the coding end during the shallow coding process of image data, then determining the visual complexity information and / or coding complexity information corresponding to the current coding block can be calculating the visual complexity based on the texture complexity to obtain the visual complexity information, calculating the coding complexity of the current coding block according to the pre-coding mode to obtain the coding complexity information, and incorporating the visual complexity information and the coding complexity information into the bitstream.

[0118] Of course, the quantization parameter adjustment device can also be at the decoding end that performs shallow encoding processing on the image data. Since the encoding end will pre-compute the visual complexity information and / or the encoding complexity information and incorporate the visual complexity information and / or the encoding complexity information into the code stream, at this time, determining the visual complexity information and / or the encoding complexity information corresponding to the current encoding block can be to read the visual complexity information and / or the encoding complexity information corresponding to the current encoding block from the code stream. Of course, if necessary, the visual complexity information can also be derived from the reconstructed pixels around the current encoding block.

[0119] Step S20: Determine the quantization parameter of the current encoding block according to the visual complexity information and / or the encoding complexity information.

[0120] It should be noted that determining the quantization parameter of the current encoding block according to the visual complexity information and / or the encoding complexity information can be to directly obtain the quantization parameter of the current encoding block according to at least one of the visual complexity information and the encoding complexity information. For example: if the visual complexity information corresponds to the simplest vision, then directly derive the value of the quantization parameter of the current encoding block as BitDepth - 7, where BitDepth is the bit depth of the encoding channel.

[0121] Of course, when determining the quantization parameter, it can also be adjusted according to the actual quantization design. For example: assuming that the quantization design uses 8-point fractional quantization, at this time, if the visual complexity information corresponds to the simplest vision, then the value of the quantization parameter of the current encoding block is (BitDepth - 7) * 8.

[0122] Step S30: Adjust the quantization parameter of the current encoding block.

[0123] It should be noted that after obtaining the quantization parameter of the current encoding block, in order to ensure that subjective lossy phenomena are avoided as much as possible, the quantization parameter of the current encoding block can be adjusted.

[0124] In actual use, when adjusting the quantization parameter of the current encoding block, there can be various different adjustment methods. For example: adjusting the quantization parameter according to a preset parameter threshold, making different adjustments according to different visual complexity information and / or encoding complexity information, adjusting according to the position of the current encoding block during the encoding process, adjusting the quantization parameter according to surrounding samples, etc.

[0125] In a possible implementation manner of the present application, the management personnel of the quantization parameter adjustment device can preset local indication information, and specify the area in the current encoding block that needs to be adjusted according to the local indication information. Then, step S30 in this embodiment can include:

[0126] Adjust the quantization parameters for all regions in the current coding block; or,

[0127] Adjust the quantization parameters for a preset region in the current coding block; or,

[0128] Do not adjust the quantization parameters for all regions in the current coding block.

[0129] In actual use, the administrator of the quantization parameter adjustment device can preset local indication information. If it is indicated in the local indication information to adjust all, then at this time, the quantization parameters for all regions in the current coding block can be adjusted. If it is indicated in the local indication information not to adjust all, then at this time, the quantization parameters for all regions in the current coding block can be not adjusted.

[0130] If a preset region is specified in the local indication information, then at this time, only the quantization parameters for the preset region in the current coding block can be adjusted. For example: After the administrator of the quantization parameter adjustment device knows the position of the visually simple region of the current coding block, the visually simple region can be used as the preset region, and the local indication information can be set based on the position of the visually simple region. Then, at this time, the quantization parameter adjustment device will only adjust the quantization parameters for the visually simple region in the current coding block.

[0131] In a possible implementation manner of the present application, it can be set that when the current coding block is in a specific position, special processing is performed on the quantization parameters of the current coding block. Then, step S30 described in this embodiment may include:

[0132] If the current coding block is in a preset specified position, decrease or increase the quantization parameter of the current coding block.

[0133] It should be noted that the preset specified position can be preset by the administrator of the quantization parameter adjustment device, and the amplitude of the decrease or increase of the quantization parameter can also be preset by the administrator of the quantization parameter adjustment device.

[0134] For example: If the current coding block is located in the first row of the Slice, decrease or increase the quantization parameter of the current coding block by para1; if the current coding block is located in the first column of the Slice, decrease or increase the quantization parameter of the current coding block by para2, where para1 and para2 are both preset values preset by the administrator of the quantization parameter adjustment device.

[0135] In a possible implementation manner of the present application, it can also be set that when the current coding block is in a specific position, the quantization parameters of the current coding block are not adjusted. Then, step S30 described in this embodiment may include:

[0136] If the current coding block is at a preset specified position, the quantization parameter of the current coding block is not adjusted.

[0137] For example: if the current coding block is located at the first row of the Slice, the quantization parameter of the current coding block is not adjusted; if the current coding block is located at the first column of the Slice, the quantization parameter of the current coding block is not adjusted.

[0138] In a possible implementation manner of the present application, in order to ensure that the quantization parameters of other subsequent coding blocks can also be reasonably adjusted, after the step S30 of this embodiment, the following may further be included:

[0139] Update the rate control parameter according to the adjusted quantization parameter, where the rate control parameter is used to calculate the quantization parameter of the coding block.

[0140] It should be noted that updating the rate control parameter according to the adjusted quantization parameter may be to detect whether the adjusted quantization parameter is within a preset range. If so, call the rate control module in the shallow coding framework to update the rate control parameter. Among them, the rate control parameter is used to calculate the quantization parameter of the coding block. If the rate control parameter is updated, the calculation basis for calculating the quantization parameter of the coding block will also be updated.

[0141] For ease of understanding, now in combination with Figure 3 it is described, but the present solution is not limited. Figure 3 is a schematic diagram of the execution process of the shallow coding framework of this embodiment. As Figure 3 shown, the shallow coding framework is composed of an encoder and a decoder. Among them, the encoder includes: a partitioning module (Slice partitioning and block partitioning), a prediction module, a quantization coefficient coding module, a bitstream interleaving module, and other modules; the decoder includes: an interleaving removal module, a complexity analysis module, other syntax analysis modules, a prediction module, an inverse quantization module, a reconstruction module, etc. Among them, the rate control module in the encoder or the decoder can be used to execute the quantization parameter adjustment method in the embodiments of the present application.

[0142] The prediction pixel (Prediction Signal) refers to the pixel value derived from the already encoded and decoded pixels. The residual is obtained by the difference between the original pixel and the prediction pixel, and then the residual transform quantization and coefficient coding are performed. In particular, the prediction pixel in inter-frame refers to the pixel value derived from the reference frame (reconstructed pixel frame) of the current block. Due to the discrete pixel positions, interpolation operations are required to obtain the final prediction pixel. The closer the prediction pixel is to the original pixel, the smaller the residual energy obtained by subtracting the two, and the higher the coding compression performance.

[0143] There are two major metrics for evaluating coding efficiency: bit rate and PSNR. The smaller the bitstream, the larger the compression ratio; the larger the PSNR, the better the quality of the reconstructed image. When selecting a mode, the discrimination formula is essentially a comprehensive evaluation of the two. The cost corresponding to a mode: J(mode) = D + λ * R. Among them, D represents Distortion, usually measured using the SSE metric. SSE refers to the sum of squared differences between the reconstructed block and the source image; λ is the Lagrange multiplier; R is the actual number of bits required for encoding the image block in this mode, including the total number of bits required for encoding mode information, motion information, residuals, etc. When selecting a mode, if the RDO principle is used to make a comparison decision on the coding mode, the coding performance can usually be guaranteed to be optimal. Intra Prediction means using the reconstructed pixel values of the spatial neighboring blocks (in the same frame image as the current block) of the current block for predictive coding. Rate Control means controlling the smoothness of the bit rate, generally achieving the purpose of bit rate smoothness by adjusting the quantization step size.

[0144] In the shallow compression scenario, there is a bitstream buffer for storing the bits of each coding unit. In the constant bit rate control scenario, after each rate control unit is encoded, the bits of that rate control unit are put into the bitstream buffer, and at the same time, a certain number of bits are removed from the bitstream buffer. The purpose of rate control in shallow compression is to prevent the bitstream buffer from overflowing or underflowing. Among them, overflow means that the bitstream buffer is already full but there are still bits not put into the buffer, and underflow means that there are no bits in the bitstream buffer but the number of bits removed has not reached the required amount.

[0145] The Fallback Mode is mainly to ensure that the bitstream buffer does not overflow. The number of bits obtained by encoding using this mode must be less than or equal to the fixed number of bits that need to be removed from the bitstream buffer. After encoding / decoding the Fallback Mode, the "water level" of the bitstream buffer will not rise, thus preventing overflow.

[0146] Entropy Coding refers to a lossless coding method carried out according to the principle of information entropy. It is in the last processing module of video compression, converting a series of element symbols used to represent a video sequence into a binary bitstream for transmission or storage. The output data of the entropy coding module is the final bitstream after the original video is compressed. Entropy Coding can effectively remove the statistical redundancy of these video element symbols and is one of the important tools to ensure the video coding compression efficiency.

[0147] In this embodiment, by determining the visual complexity information and / or encoding complexity information corresponding to the current coding block, where the current coding block is the image coding block currently undergoing coding processing; determining the quantization parameter of the current coding block according to the visual complexity information and / or encoding complexity information; and adjusting the quantization parameter of the current coding block. Since the quantization parameter of the current coding block can be determined according to the visual complexity information and / or encoding complexity information of the current coding block, and the quantization parameter of the current coding block is adjusted, it is ensured that the quantization parameter can be dynamically adjusted with the content coding of the current coding block, thereby avoiding the subjective lossy effect.

[0148] Reference Figure 4 , Figure 4 is a schematic flowchart of the second embodiment of a quantization parameter adjustment method of the present invention.

[0149] Based on the above first embodiment, step S30 of the quantization parameter adjustment method in this embodiment includes:

[0150] Step S30': Adjust the quantization parameter of the current coding block according to a parameter threshold.

[0151] It should be noted that the parameter threshold can be a preset fixed threshold or a value read from the high-level syntax, where the high-level syntax can at least include sequence level, picture level, or slice level. Adjusting the quantization parameter of the current coding block according to the parameter threshold can be to compare the quantization parameter of the current coding block with the parameter threshold and adjust the quantization parameter of the current coding block according to the comparison result.

[0152] In actual use, when the quantization parameter of the current coding block is within a certain range, the quantization parameter adjustment can be performed. At this time, a first parameter threshold and a second parameter threshold (the first parameter threshold is less than the second parameter threshold) can be preset according to this range. If the quantization parameter of the current coding block is less than the second parameter threshold or greater than the second parameter threshold, it means that the quantization parameter of the current coding block is not within this range, and the quantization parameter of the current coding block can be not adjusted.

[0153] If the quantization parameter of the current coding block is greater than the first parameter threshold and less than the second parameter threshold, the quantization parameter of the current coding block can be adjusted to a preset quantization parameter at this time. Among them, the preset quantization parameter can be a fixed value preset by the administrator of the quantization parameter adjustment device.

[0154] Of course, in order to make the adjustment of quantization parameters more reasonable, a third parameter threshold can also be set. The first parameter threshold is less than the third parameter threshold, and the third parameter threshold is less than the second parameter threshold. After determining that the quantization parameter of the current coding block is greater than the first parameter threshold and less than the second parameter threshold, the quantization parameter of the current coding block can also be compared with the third parameter threshold. If the quantization parameter of the current coding block is less than the third parameter threshold, the quantization parameter can be directly set to the third parameter threshold or decreased. Among them, the decreasing amplitude when decreasing the quantization parameter can be preset by the management personnel of the quantization parameter adjustment device.

[0155] In this embodiment, by comparing the preset parameter threshold with the quantization parameter of the current coding block, the interval where the quantization parameter of the current coding block is located is determined, and then the quantization parameter of the current coding block is adjusted according to the interval. This ensures the freedom and rationality during the adjustment of the quantization parameter.

[0156] Reference Figure 5 , Figure 5 is a schematic flowchart of the third embodiment of a quantization parameter adjustment method according to the present invention.

[0157] Based on the above first embodiment, step S30 of the quantization parameter adjustment method in this embodiment includes:

[0158] Step S30": Adjust the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information, and the complexity threshold.

[0159] It should be noted that the complexity threshold can be a preset fixed threshold or a value read from high-level syntax. Among them, the high-level syntax can at least include sequence level, picture level, or Slice level.

[0160] In actual use, when the visual complexity information or the coding complexity information is too small, it may not be necessary to adjust the quantization parameter of the current coding block. At this time, a first complexity threshold can be set. If the visual complexity information or the coding complexity information is less than the first complexity threshold, the quantization parameter of the current coding block may not be adjusted.

[0161] For example: Assume that the first complexity threshold is para1, the visual complexity information is A1, and the coding complexity information is A2. At this time, if any one of A1 or A2 is equal to 0 or less than para1, it means that the area of the current coding block is the visually simplest area at this time, and the quantization parameter of the current coding block may not be adjusted.

[0162] Of course, if the current coding block is an image coding block with simple visual appearance but complex coding, at this time, overprotection will increase the risk of overflow in the bitstream buffer during the coding process. In this case, the quantization parameter of the current coding block can be not adjusted. At this time, a second complexity threshold and a third complexity threshold (the second complexity threshold is less than the third complexity threshold) can be preset. If the visual complexity information of the current coding block is less than the second complexity threshold and the coding complexity information is greater than the third complexity threshold, it means that the current coding block is an image coding block with simple visual appearance but complex coding. In this case, the quantization parameter of the current coding block can be not adjusted. Since this adjustment method mainly avoids the risk of overflow in the bitstream buffer, it can be used only when the fullness of the bitstream buffer is relatively high.

[0163] In a possible implementation manner of the present application, it can be set that when the visual complexity information is a specific value, a special adjustment method is adopted to adjust the quantization parameter. At this time, a fourth complexity threshold can be set. If the visual complexity information is equal to the fourth complexity threshold, the quantization parameter of the current coding block is decreased. For example: if the visual complexity information is equal to 1, the quantization parameter is decreased by para2, where para2 is a preset decreased value and can be preset by the administrator of the quantization parameter adjustment device in advance.

[0164] In a possible implementation manner of the present application, it can also be set that when the current coding block is visually complex and also complex in coding, the quantization step size is appropriately increased (that is, the quantization parameter is appropriately increased). At this time, a fifth complexity threshold and a sixth complexity threshold can be preset. If the visual complexity information is greater than the fifth complexity threshold and the coding complexity information is greater than the sixth complexity threshold, it means that the current coding block is an image coding block that is visually complex and also complex in coding. In this case, the quantization parameter of the current coding block can be increased. Among them, the increase amplitude of the quantization parameter can be preset by the administrator of the quantization parameter adjustment device in advance, and the fourth complexity threshold is less than the fifth complexity threshold.

[0165] In a possible implementation manner of the present application, it can also be set that when the current coding block is visually simple and also simple in coding, the quantization step size is appropriately decreased. At this time, a seventh complexity threshold and an eighth complexity threshold can be preset. If the visual complexity information is less than the seventh complexity threshold and the coding complexity information is less than the eighth complexity threshold, it means that the current coding block is an image coding block that is visually simple and also simple in coding. In this case, the quantization parameter of the current coding block can be decreased. Among them, the decrease amplitude of the quantization parameter can be preset by the administrator of the quantization parameter adjustment device in advance, the fourth complexity threshold is greater than the seventh complexity threshold, the fifth complexity threshold is greater than the seventh complexity threshold, and the sixth complexity threshold is greater than the eighth complexity threshold.

[0166] In this embodiment, the quantization parameter of the current coding block is adjusted according to the visual complexity information and / or the coding complexity information, and a complexity threshold. Since the quantization parameter of the current coding block is adjusted according to the visual complexity information and / or the coding complexity information, and the complexity threshold, it is ensured that when adjusting the quantization parameter, multiple different adjustment methods can be set, enriching the adjustment mechanism of the quantization parameter and making it more in line with the adjustment requirements in actual use.

[0167] Reference Figure 6 , Figure 6 is a schematic flowchart of the fourth embodiment of a quantization parameter adjustment method according to the present invention.

[0168] Based on the above first embodiment, step S30 of the quantization parameter adjustment method in this embodiment includes:

[0169] Step S301: Determine the measure value of the target sample in the current coding block.

[0170] It should be noted that measure values such as gradient value, variance, and absolute value between the maximum value and the minimum value can be used. Of course, other similar measure values can also be used, and this embodiment does not limit this. In this embodiment, the gradient value is used as the measure value for illustration. The target sample can be the sample in the current coding block that is specified to require adjustment of the quantization parameter.

[0171] In a possible implementation manner of the present application, the current coding block can be divided into multiple samples by using the sub-block division method. At this time, before step S301 of this embodiment, it can further include:

[0172] Perform sub-block division on the current coding block, and divide the current coding block into multiple samples according to the sub-block division result.

[0173] It should be noted that the sub-block division of the current coding block can be a 2x2 specification sub-block division of the current coding block, dividing the current coding block into multiple sub-blocks, and then taking the part of the current coding block that belongs to the same sub-block as a sample, so as to divide the current coding block into multiple samples. Among them, the samples belonging to the same sub-block share a measure value, that is, the measure values of the samples belonging to the same sub-block are the same. Of course, other specification sub-block division methods (such as 3x3 specification) can also be used, and this embodiment does not limit this.

[0174] For easy understanding, now in combination with Figure 7 for illustration, but not limiting the present solution, Figure 7 is a schematic diagram of the sub-block division in this embodiment. As Figure 7As shown, the current coding block is divided into multiple sub-blocks, thus dividing it into multiple samples. Among them, for the samples (BC) formed by 2x2 sub-blocks, the gradient value can be calculated using the already reconstructed samples around it as a measure value, and its gradient value grad 2x2 =(grad B +grad C ) / 2. Among them, grad B =(abc(A - B)+abs(B - C)) / 2, grad C =(abs(B - C)+abs(C - D)) / 2. Here, abs is the absolute value calculation function.

[0175] In a possible implementation manner of the present application, the already reconstructed samples around the current coding block can be used to calculate the measure value of the target sample in the current coding block. Then, the step S301 described in this embodiment may include:

[0176] Calculate the measure value of the target sample in the current coding block according to the already reconstructed samples around the current coding block.

[0177] In actual use, when calculating the measure value, since different prediction modes are used for pixel reconstruction during coding, the positions of the already reconstructed samples around the current coding block may be different. To ensure the rationality of the calculated measure value, the step of calculating the measure value of the target sample in the current coding block according to the already reconstructed samples around the current coding block in this embodiment may include:

[0178] Determine the position of the already reconstructed sample corresponding to the target sample in the current coding block according to the prediction mode of the target sample;

[0179] Determine the measure value of the target sample in the current coding block according to the position of the already reconstructed sample.

[0180] It should be noted that one or more different prediction modes may be applied simultaneously in the same current coding block (for example, the prediction modes of each sub-block of the current coding block may be different), and the sample can select the position of the already reconstructed samples around it according to its own prediction mode. Determining the position of the already reconstructed sample corresponding to the sample according to the prediction mode of the sample may be to determine the position where the already reconstructed samples existing around the sample according to the prediction method of the prediction mode used by the sample.

[0181] After determining the position of the already reconstructed sample corresponding to the target sample in the current coding block according to the prediction mode of the target sample, the measure value of the target sample in the current coding block can be calculated according to the already reconstructed sample.

[0182] For the convenience of understanding, now in combination with Figure 8 and 9 it is described, but the present solution is not limited.Figure 8 and Figure 9 is a schematic diagram for locating the reconstructed sample positions in the vertical prediction mode and the horizontal prediction mode of this embodiment.

[0183] If the prediction mode is the vertical prediction mode and its prediction direction is as shown by the arrow in Figure 8 , for the samples constructed for the 2x2 sub-block (the 2x2 sub-block with the bold shaded part in the figure), at this time, the gradient value can be used as the measure value, and the gradient value of the sample grad2x2 = abs(B - C). If the prediction mode is the horizontal prediction mode, its prediction direction is as shown by the arrow in Figure 9 , and at this time, the gradient value grad2x2 of the samples constructed for the 2x2 sub-block (the 2x2 sub-block with the bold shaded part in the figure) = abs(E - F).

[0184] Similarly, there will be other prediction modes. If the prediction mode from the upper left to the lower right is adopted, its prediction direction is as shown by the arrow in Figure 10 , and at this time, the gradient value grad2x2 of the samples constructed for the 2x2 sub-block (the 2x2 sub-block with the bold shaded part in the figure) = abc(A - B) or grad2x2 = (abc(A - B) + abs(B - C)) / 2, or grad2x2 = (abc(A - B) + 3 * abs(B - C)) / 4.

[0185] If the prediction mode from the upper right to the lower left is adopted, its prediction direction is as shown by the arrow in Figure 11 , and at this time, the gradient value grad2x2 of the samples constructed for the 2x2 sub-block (the 2x2 sub-block with the bold shaded part in the figure) = abc(C - D) or grad2x2 = (abc(C - D) + abs(B - C)) / 2, or grad2x2 = (3 * abc(C - D) + abs(B - C)) / 4.

[0186] Step S302: Adjust the quantization parameter of the current coding block according to the measure value.

[0187] It should be noted that adjusting the quantization parameter of the current coding block according to the measure value can be to adjust the quantization parameter of the current coding block according to the interval to which the corresponding measure value belongs.

[0188] In a possible implementation manner of the present application, the quantization parameters of samples whose corresponding measurement values are within a certain range may not be adjusted, the quantization parameters of samples with too small measurement values are decreased, and the quantization parameters of samples with too large measurement values are increased. At this time, a first measurement threshold and a second measurement threshold (the second measurement threshold is greater than the first measurement threshold) may be set according to this range. If the measurement value corresponding to a sample is greater than the first measurement threshold and less than the second measurement threshold, then the quantization parameters of this sample may not be adjusted at this time; if the measurement value corresponding to a sample is less than the first measurement threshold, it means that the measurement value of this sample is too small, and at this time, the quantization parameters of this sample may be decreased by a first gradient adjustment value; if the measurement value corresponding to a sample is greater than the second measurement threshold, it means that the measurement value of this sample is too large, and at this time, the quantization parameters of this sample may be increased by a second gradient adjustment value.

[0189] In a possible implementation manner of the present application, if the measurement values of the target samples in the current coding block are all small or all large, then the quantization parameters of the current coding block may not be adjusted at this time. At this time, a third measurement threshold and a fourth measurement threshold (the fourth measurement threshold is greater than the third measurement threshold) may be set. If the measurement values corresponding to the target samples in the current coding block are all less than the third measurement threshold, it means that the measurement values of the target samples in the current coding block are all small, and at this time, the quantization parameters of the current coding block may not be adjusted; if the measurement values corresponding to the target samples in the current coding block are all greater than the fourth measurement threshold, it means that the measurement values of the target samples in the current coding block are all large, and at this time, the quantization parameters of the current coding block may not be adjusted.

[0190] In this embodiment, the current coding block is divided into sub-blocks, and the measurement values corresponding to the target samples in the current coding block are determined based on the sub-block division result; the quantization parameters of the current coding block are adjusted according to the measurement values. Since the measurement values are calculated in advance, and then it is determined whether the quantization parameters of the samples need to be adjusted and the adjustment amplitude during adjustment according to the measurement values, the rationality during the adjustment of the quantization parameters is ensured.

[0191] Reference Figure 12 , Figure 12 is a schematic flowchart of the fifth embodiment of a quantization parameter adjustment method of the present invention.

[0192] Based on the above fourth embodiment, step S302 of the quantization parameter adjustment method in this embodiment includes:

[0193] Step S302': Adjust the quantization parameters of the current coding block according to the measurement values and the visual complexity information and / or the coding complexity information.

[0194] It should be noted that when adjusting the quantization parameter of the current coding block, in order to ensure the rationality of the quantization parameter adjustment as much as possible, the quantization parameter of the current coding block can also be adjusted in combination with the measure value, visual complexity information, and / or coding complexity information.

[0195] In a possible implementation manner of the present application, when the visual complexity information of the current coding block is within a certain range, the quantization parameter of some samples with larger measure values can be increased or decreased. At this time, a first visual complexity interval and a fifth measure threshold can be preset. If the visual complexity information of the current coding block is within the first visual complexity interval, the quantization parameter of the samples corresponding to the measure value greater than the fifth measure threshold is increased or decreased by a first sub-block adjustment value, where the first sub-block adjustment value can be preset by the management personnel of the quantization parameter adjustment device.

[0196] For example: Assume that the visual complexity information is A1, the first visual complexity interval is less than 1, and the fifth measure threshold is para11. If A1 of the current coding block is equal to 0 and within the first visual complexity interval, then at this time, the quantization parameter of the samples in the corresponding sub-block of the current coding block with a measure threshold greater than para11 can be increased or decreased by the first sub-block adjustment value.

[0197] Among them, the management personnel of the quantization parameter adjustment device can also preset an adjustable range for the quantization parameter of the target sample. After increasing or decreasing the quantization parameter according to the first sub-block adjustment value, it is detected whether the adjusted value is within the adjustable range. If not, the quantization parameter is automatically corrected to the corresponding range boundary value of the adjustable range. For example: Assume that the adjustable range is [min, max], and the adjusted quantization parameter is Qc. If Qc is greater than max, the quantization parameter will be modified to max; if Qc is less than min, the quantization parameter will be modified to min.

[0198] In a possible implementation manner of the present application, when the coding complexity information of the current coding block is within a certain range, the quantization parameter of some samples with smaller measure values can be increased or decreased. At this time, a first coding complexity interval and a sixth measure threshold can be set. If the coding complexity information is within the first coding complexity interval, the quantization parameter of the samples corresponding to the measure value less than the sixth measure threshold is adjusted according to the second sub-block adjustment value. Among them, adjusting the quantization parameter according to the second sub-block adjustment value can be to decrease or increase the quantization parameter by the second sub-block adjustment value. Similarly, after adjusting the quantization parameter according to the second sub-block adjustment value, it can also be detected whether it is within the adjustable range, which will not be elaborated here.

[0199] In a possible implementation manner of the present application, when the coding complexity information and the visual complexity information of the current coding block are both within a certain range, the quantization parameters of some samples with smaller measure values can be increased or decreased. At this time, a second coding complexity interval, a second visual complexity interval, and a seventh measure threshold can be set. If the coding complexity information is within the second coding complexity interval and the visual complexity information is within the second visual complexity interval, the quantization parameters of the samples corresponding to the measure values less than the seventh measure threshold are adjusted according to the third sub-block adjustment value. Among them, adjusting the quantization parameters according to the third sub-block adjustment value can be reducing or increasing the quantization parameters by the third sub-block adjustment value. Similarly, after adjusting the quantization parameters according to the third sub-block adjustment value, it can also be detected whether it is within the adjustable range, which will not be elaborated here.

[0200] In this embodiment, the quantization parameters of the current coding block are adjusted according to the measure value, the visual complexity information, and / or the coding complexity information. Since during the adjustment of the quantization parameters, it is determined whether the quantization parameters need to be adjusted and how to adjust them based on the measure value in combination with the visual complexity information and / or the coding complexity information, the flexibility and rationality of the adjustment of the quantization parameters are ensured.

[0201] Reference Figure 13 , Figure 13 is a schematic flowchart of the sixth embodiment of a quantization parameter adjustment method of the present invention.

[0202] Based on the above first embodiment, step S30 of the quantization parameter adjustment method in this embodiment includes:

[0203] Step S30''': Adjust the quantization parameters of the current coding block according to the position information, the visual complexity information, and / or the coding complexity information of the current coding block.

[0204] It should be noted that, in order to reasonably adjust the quantization parameters, when adjusting the quantization parameters of the current coding block, the position information, the visual complexity information, and the coding complexity information of the current coding block can be combined to comprehensively adjust the quantization parameters of the current coding block.

[0205] In a possible implementation manner of the present application, when the current coding block is at a specific position and has a low visual complexity, the quantization parameter of the current coding block can be appropriately reduced. At this time, a preset specified position and a preset visual complexity threshold can be preset. If the current coding block is at the preset specified position and the visual complexity information is less than the preset visual complexity threshold, the quantization parameter of the current coding block is reduced by a first adjustment value. Among them, the preset specified position, the preset visual complexity threshold, and the first adjustment value can all be preset by the management personnel of the quantization parameter adjustment device. For example: the preset specified position is set to the first row or the first column of the Slice, the preset visual complexity threshold is set to 1, and the first adjustment value is set to 2.

[0206] In a possible implementation manner of the present application, when the current coding block is at a specific position and has a low coding complexity, the quantization parameter of the current coding block can be appropriately reduced. At this time, a preset specified position and a preset coding complexity threshold can be preset. If the current coding block is at the preset specified position and the coding complexity information is less than the preset coding complexity threshold, the quantization parameter of the current coding block is reduced by a second adjustment value. Among them, the preset specified position, the preset coding complexity threshold, and the second adjustment value can all be preset by the management personnel of the quantization parameter adjustment device.

[0207] In a possible implementation manner of the present application, when the current coding block is at a specific position and both the visual complexity and the coding complexity are low, the quantization parameter of the current coding block can be appropriately reduced. At this time, a preset specified position, a preset visual complexity threshold, and a preset coding complexity threshold can be preset. If the current coding block is at the preset specified position, the visual complexity information is less than the preset visual complexity threshold, and the coding complexity information is less than the preset coding complexity threshold, the quantization parameter of the current coding block is reduced by a third adjustment value. Among them, the preset specified position, the preset visual complexity threshold, the preset coding complexity threshold, and the third adjustment value can all be preset by the management personnel of the quantization parameter adjustment device.

[0208] In a possible implementation manner of the present application, when the current coding block is not at a specific position and both the visual complexity and the coding complexity are low, the quantization parameter of the current coding block can be appropriately reduced. At this time, a preset specified position, a preset visual complexity threshold, and a preset coding complexity threshold can be preset. If the current coding block is not at the preset specified position, the visual complexity information is less than the preset visual complexity threshold, and the coding complexity information is less than the preset coding complexity threshold, the quantization parameter of the current coding block is reduced by a fourth adjustment value. Among them, the preset specified position, the preset visual complexity threshold, the preset coding complexity threshold, and the fourth adjustment value can all be preset by the management personnel of the quantization parameter adjustment device.

[0209] In a possible implementation manner of the present application, at least two of the embodiments of the above quantization parameter adjustment method may also be randomly combined to obtain a new embodiment for execution, and the present application does not limit this.

[0210] In this embodiment, the quantization parameter of the current coding block is adjusted according to the position information of the current coding block, the visual complexity information, and / or the coding complexity information. Since the quantization parameter of the current coding block is adjusted in combination with the position information of the current coding block, the visual complexity information, and / or the coding complexity information, it is ensured that when adjusting the quantization parameter, the adjustment strategy of the quantization parameter can be set from multiple different dimensions, making the adjustment of the quantization parameter more in line with the actual situation and improving the rationality of adjusting the quantization parameter.

[0211] In addition, an embodiment of the present invention also provides a storage medium, on which a quantization parameter adjustment program is stored. When the quantization parameter adjustment program is executed by a processor, the steps of the quantization parameter adjustment method described above are implemented.

[0212] Refer to Figure 14 , Figure 14 which is the structural block diagram of the first embodiment of the quantization parameter adjustment device of the present invention.

[0213] As Figure 14 shown, the quantization parameter adjustment device proposed by the embodiment of the present invention includes:

[0214] An information acquisition module 10, configured to determine the visual complexity information and / or the coding complexity information corresponding to the current coding block;

[0215] A parameter determination module 20, configured to determine the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information;

[0216] A parameter adjustment module 30, configured to adjust the quantization parameter of the current coding block.

[0217] In this embodiment, the visual complexity information and / or the coding complexity information corresponding to the current coding block is determined. The current coding block is an image coding block currently being coded; the quantization parameter of the current coding block is determined according to the visual complexity information and / or the coding complexity information; the quantization parameter of the current coding block is adjusted. Since the quantization parameter of the current coding block can be determined according to the visual complexity information and / or the coding complexity information of the current coding block, and the quantization parameter of the current coding block is adjusted, it is ensured that the quantization parameter can be dynamically adjusted along with the content coding of the current coding block, thereby avoiding the subjective lossy effect.

[0218] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to adjust the quantization parameter of the current coding block according to a parameter threshold.

[0219] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: if the quantization parameter is greater than a first parameter threshold and less than a second parameter threshold, set the quantization parameter to a preset quantization parameter; or, if the quantization parameter is less than the first parameter threshold or greater than the second parameter threshold, do not adjust the quantization parameter of the current coding block; or, if the quantization parameter is less than a third parameter threshold, set the quantization parameter to the third parameter threshold or decrease the quantization parameter, where the first parameter threshold is less than the third parameter threshold, and the third parameter threshold is less than the second parameter threshold.

[0220] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to adjust the quantization parameter of the current coding block according to the visual complexity information and / or the coding complexity information, and a complexity threshold.

[0221] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: if the visual complexity information or the coding complexity information is less than a first complexity threshold, do not adjust the quantization parameter of the current coding block; or, if the visual complexity information is less than a second complexity threshold and the coding complexity information is greater than a third complexity threshold, do not adjust the quantization parameter of the current coding block, where the second complexity threshold is less than the third complexity threshold.

[0222] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: if the visual complexity information is equal to a fourth complexity threshold, decrease the quantization parameter of the current coding block; or, if the visual complexity information is greater than a fifth complexity threshold and the coding complexity information is greater than a sixth complexity threshold, increase the quantization parameter of the current coding block, where the fourth complexity threshold is less than the fifth complexity threshold; or, if the visual complexity information is less than a seventh complexity threshold and the coding complexity information is less than an eighth complexity threshold, decrease the quantization parameter of the current coding block, where the fourth complexity threshold is greater than the seventh complexity threshold, the fifth complexity threshold is greater than the seventh complexity threshold, and the sixth complexity threshold is greater than the eighth complexity threshold.

[0223] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: if the current coding block is at a preset specified position, decrease or increase the quantization parameter of the current coding block; or, if the current coding block is at a preset specified position, do not adjust the quantization parameter of the current coding block.

[0224] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to determine a measure value of a target sample in the current coding block; and adjust the quantization parameter of the current coding block according to the measure value.

[0225] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to calculate the measure value of the target sample in the current coding block according to the reconstructed samples around the current coding block.

[0226] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to determine the position of the reconstructed sample corresponding to the target sample in the current coding block according to the prediction mode of the target sample; and determine the measure value of the target sample in the current coding block according to the position of the reconstructed sample.

[0227] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to divide the current coding block into sub-blocks, and divide the current coding block into multiple samples according to the sub-block division result, and the measure values of the samples belonging to the same sub-block are the same.

[0228] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to reduce the quantization parameter of the sample whose corresponding measure value is less than the first measure threshold by the first gradient adjustment value; or, increase the quantization parameter of the sample whose corresponding measure value is greater than the second measure threshold by the second gradient adjustment value; or, not adjust the quantization parameter of the sample whose corresponding measure value is greater than the first measure threshold and less than the second measure threshold, and the second measure threshold is greater than the first measure threshold.

[0229] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to, if the measure values corresponding to the target samples are all less than the third measure threshold, not adjust the quantization parameter of the current coding block; or, if the measure values corresponding to the target samples are all greater than the fourth measure threshold, not adjust the quantization parameter of the current coding block, and the fourth measure threshold is greater than the third measure threshold.

[0230] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to adjust the quantization parameter of the current coding block according to the measure value and the visual complexity information and / or the coding complexity information.

[0231] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: if the visual complexity information is in the first visual complexity interval, increase or decrease the quantization parameter of the sample whose measure value is greater than the fifth measure threshold by a first sub-block adjustment value; or, if the coding complexity information is in the first coding complexity interval, adjust the quantization parameter of the sample whose measure value is less than the sixth measure threshold according to a second sub-block adjustment value; or, if the coding complexity information is in the second coding complexity interval and the visual complexity information is in the second visual complexity interval, adjust the quantization parameter of the sample whose measure value is less than the seventh measure threshold according to a third sub-block adjustment value.

[0232] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: if the current coding block is at a preset specified position and the visual complexity information is less than a preset visual complexity threshold, decrease the quantization parameter of the current coding block by a first adjustment value; or, if the current coding block is at a preset specified position and the coding complexity information is less than a preset coding complexity threshold, decrease the quantization parameter of the current coding block by a second adjustment value; or, if the current coding block is at a preset specified position, the visual complexity information is less than a preset visual complexity threshold, and the coding complexity information is less than a preset coding complexity threshold, decrease the quantization parameter of the current coding block by a third adjustment value; or, if the current coding block is not at a preset specified position, the visual complexity information is less than a preset visual complexity threshold, and the coding complexity information is less than a preset coding complexity threshold, decrease the quantization parameter of the current coding block by a fourth adjustment value.

[0233] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to: adjust the quantization parameters of all regions in the current coding block; or, adjust the quantization parameters of a preset region in the current coding block; or, not adjust the quantization parameters of all regions in the current coding block.

[0234] In a possible implementation manner of the present application, at least one of the parameter threshold, the complexity threshold, the preset specified position, and the measure threshold is a preset value or a value read from a high-level syntax, and the high-level syntax includes sequence level, picture level, or Slice level.

[0235] In a possible implementation manner of the present application, the parameter adjustment module 30 is further configured to update the rate control parameter according to the adjusted quantization parameter, and the rate control parameter is used to calculate the quantization parameter of the coding block.

[0236] It should be understood that the above is only for illustration and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can make settings according to needs, and the present invention does not limit this.

[0237] It should be noted that the above-described work process is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and there is no limitation here.

[0238] In addition, for the technical details not described in detail in this embodiment, reference can be made to the quantization parameter adjustment method provided in any embodiment of the present invention, and details will not be repeated here.

[0239] In addition, it should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or system including that element.

[0240] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0241] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0242] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied to other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A quantization parameter adjustment method, characterized in that, Applied to the decoding end, including the following steps: Determine the coding complexity information corresponding to the current coding block, where the current coding block is the image coding block currently undergoing decoding processing; the coding complexity information is read from the bitstream or derived from the reconstructed pixels around the current coding block; Determine the quantization parameter of the current coding block according to the coding complexity information; Adjust the quantization parameter of the current coding block; Among them, the adjustment of the quantization parameter of the current coding block includes: Adjust the quantization parameter of the current coding block according to the coding complexity information and the complexity threshold; The complexity threshold is a value read from the high-level syntax, and the high-level syntax includes the picture level.

2. The quantization parameter adjustment method according to claim 1, wherein The adjustment of the quantization parameter of the current coding block includes: Adjust the quantization parameter of the current coding block according to the parameter threshold.

3. The quantization parameter adjustment method according to claim 2, wherein The adjustment of the quantization parameter of the current coding block according to the parameter threshold includes: If the quantization parameter is less than the first parameter threshold or greater than the second parameter threshold, the quantization parameter of the current coding block is not adjusted.

4. The quantization parameter adjustment method according to claim 1, wherein The adjustment of the quantization parameter of the current coding block includes: Determine the measure value of the target sample in the current coding block; Adjust the quantization parameter of the current coding block according to the measure value.

5. The quantization parameter adjustment method according to any one of claims 1-4, characterized in that The adjustment of the quantization parameter of the current coding block includes: Do not adjust the quantization parameters of all regions in the current coding block.

6. The quantization parameter adjustment method according to any one of claims 2-4, characterized in that, The complexity threshold is a preset value or a value read from the high-level syntax, and the high-level syntax includes the picture level.

7. A quantization parameter adjustment device, characterized in that, Applied to the decoding end, the quantization parameter adjustment device includes: An information acquisition module, configured to determine the coding complexity information corresponding to the current coding block, where the current coding block is the image coding block currently undergoing decoding processing; the coding complexity information is read from the bitstream or derived from the reconstructed pixels around the current coding block; A parameter determination module, configured to determine the quantization parameter of the current coding block according to the coding complexity information; A parameter adjustment module, configured to adjust the quantization parameter of the current coding block; Among them, the parameter adjustment module is further configured to adjust the quantization parameter of the current coding block according to the coding complexity information and the complexity threshold; The complexity threshold is a value read from the high-level syntax, and the high-level syntax includes the picture level.

8. A quantization parameter adjustment device, characterized in that, The quantization parameter adjustment device includes: a memory, a processor, and a quantization parameter adjustment program stored on the memory and running on the processor, and the quantization parameter adjustment program is configured to implement the quantization parameter adjustment method according to any one of claims 1 to 6.

9. An encoding device, characterized in that, The coding device includes: a memory, a processor, and a coding program stored on the memory and running on the processor, and the coding program is configured to implement the quantization parameter adjustment method according to any one of claims 1 to 6.

10. A decoding device, characterized in that, The decoding device includes: a memory, a processor, and a decoding program stored on the memory and running on the processor, and the decoding program is configured to implement the quantization parameter adjustment method according to any one of claims 1 to 6.

11. A storage medium, characterized in that, A quantization parameter adjustment program is stored on the storage medium, and when the quantization parameter adjustment program is executed by a processor, the quantization parameter adjustment method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Bounded rate near-lossless and lossless image compression

    CN104704828A

  • Quantization parameter (QP) calculation for display stream compression (DSC) based on complexity measure

    CN107534771A

Cited By

  • Quantization parameter adjustment method, apparatus and device, and storage medium

    EP4645855A1