Transmission method, device, and equipment for coding parameters, storage medium, and program product

By determining the target rate-distortion coefficient and cost function in video encoding, selecting the encoding mode, and transmitting only a portion of the quantization coefficients, the problem of high encoding overhead for quantization parameters is solved, achieving more efficient encoding compression.

CN116527909BActive Publication Date: 2026-02-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310416726.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2026-02-10
Estimated Expiration
2043-04-11

AI Technical Summary

Technical Problem

In existing video coding technologies, the coding overhead of quantization parameters (QP) is relatively large, resulting in low coding efficiency and making it difficult to reduce coding overhead while ensuring compression effect.

Method used

By obtaining the quantization coefficient increment of the image coding unit, the target rate-distortion coefficient is determined, and the target cost function is determined based on the target rate-distortion coefficient, thereby selecting the coding mode and transmitting only the quantization coefficients and the quantization coefficients of some coding units that are greater than the threshold, avoiding the transmission of the quantization parameters of all coding units.

Benefits of technology

While ensuring compression performance, the transmission overhead of encoding parameters is reduced, and the compression ratio at the encoding unit level is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527909B_ABST
    Figure CN116527909B_ABST
Patent Text Reader

Abstract

The application provides a transmission method and device of coding parameters, equipment, a storage medium and a program product, and the method comprises the following steps: obtaining a quantization coefficient increment of a target image coding unit in an image; determining a target rate-distortion coefficient according to the association relationship between the quantization coefficient increment and the rate-distortion coefficient and the quantization coefficient increment of the target image coding unit; determining a target cost function of the target image coding unit according to the target rate-distortion coefficient; determining a coding mode of the target image coding unit from multiple coding modes according to the target cost function; and transmitting the coding parameters indicated by the coding mode and the quantization coefficients of the image to a decoding end, so that the decoding end performs decoding processing based on the coding parameters and the quantization coefficients of the image to obtain an image block corresponding to the target image coding unit. By adopting the embodiments of the application, the compression effect can be ensured while reducing the overhead of transmitting the coding parameters, and the compression rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to video encoding and decoding technology, specifically to methods for transmitting encoding parameters, devices for transmitting encoding parameters, equipment for transmitting encoding parameters, computer-readable storage media, and computer program products. Background Technology

[0002] With the development of internet technology, video services such as short videos, online conferencing, and live streaming are gradually increasing. Video, with its intuitive and content-rich characteristics, is increasingly being used in all aspects of people's daily lives, becoming one of the main ways people obtain information. Video signals consist of multiple frames of images. Because multiple frames contain a large amount of data, they require significant storage space for storage and substantial bandwidth for transmission. Therefore, before transmission and storage, electronic devices typically compress video signals to reduce the amount of data needed to represent them.

[0003] Currently, video coding achieves compression encoding of video signals through steps such as prediction, transform, quantization, and entropy coding. During quantization, different quantization parameters (QPs) are used for different image regions to achieve better compression, taking into account their relative importance. However, at lower video bitrates, the amount of data transmitted for each QP region is substantial, increasing coding overhead.

[0004] Therefore, how to reduce the encoding overhead of QP while ensuring compression effect has become an urgent technical problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, storage medium, and program product for transmitting encoding parameters, which can reduce the overhead of transmitting encoding parameters and improve the compression ratio while ensuring compression effect.

[0006] In a first aspect, embodiments of this application provide a method for transmitting encoded parameters, the method comprising:

[0007] Obtain the quantization coefficient increment of the target image coding unit in the image, wherein the target image coding unit is any one of the multiple image coding units in the image division.

[0008] Based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, the target rate-distortion coefficient corresponding to the target image coding unit is determined.

[0009] The target cost function of the target image coding unit is determined based on the target rate-distortion coefficient; wherein the target cost function is the cost function for replacing the initial rate-distortion coefficient with the target rate-distortion coefficient;

[0010] The coding mode of the target image coding unit is determined from multiple coding modes based on the above objective cost function;

[0011] The encoding parameters indicated by the above encoding mode and the quantization coefficients of the above image are transmitted to the decoding end, so that the decoding end performs decoding processing based on the above encoding parameters and the quantization coefficients of the above image to obtain the image block corresponding to the above target image encoding unit.

[0012] Secondly, embodiments of this application provide a method for transmitting encoded parameters, the method comprising:

[0013] The encoding parameters and quantization coefficients of the image are received from the encoding end. The encoding parameters are encoding parameters indicating the encoding mode of the target image encoding unit in the image. The target image encoding unit is any one of the multiple image encoding units divided in the image.

[0014] Based on the above encoding parameters and the above image quantization coefficients, the decoding process is performed to obtain the image block corresponding to the above target image encoding unit.

[0015] Thirdly, embodiments of this application provide a transmission apparatus for encoded parameters, the apparatus comprising:

[0016] The acquisition unit is used to acquire the quantization coefficient increment of the target image coding unit in the image, wherein the target image coding unit is any one of the multiple image coding units in the image.

[0017] The determining unit is used to determine the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit.

[0018] The aforementioned determining unit is further configured to determine the target cost function of the target image coding unit based on the aforementioned target rate-distortion coefficient; wherein the aforementioned target cost function is a cost function for replacing the initial rate-distortion coefficient with the aforementioned target rate-distortion coefficient;

[0019] The aforementioned determining unit is further configured to determine the encoding mode of the aforementioned target image encoding unit from multiple encoding modes based on the aforementioned target cost function;

[0020] The transmission unit is used to transmit the encoding parameters indicated by the encoding mode and the quantization coefficients of the image to the decoding end, so that the decoding end can perform decoding processing based on the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit.

[0021] Fourthly, embodiments of this application provide a transmission apparatus for encoded parameters, the apparatus comprising:

[0022] The receiving unit is used to receive encoding parameters and quantization coefficients of the image from the encoding end. The encoding parameters are encoding parameters indicating the encoding mode of the target image encoding unit in the image. The target image encoding unit is any one of the multiple image encoding units divided in the image.

[0023] The decoding unit is used to perform decoding processing based on the above encoding parameters and the quantization coefficients of the above image to obtain the image block corresponding to the above target image encoding unit.

[0024] Fifthly, this application provides a device for transmitting encoded parameters, including a processor, a communication interface, and a memory. The processor, the communication interface, and the memory are interconnected. The memory stores executable program code, and the processor is used to call the executable program code to implement the method for transmitting encoded parameters provided in the first or second aspect.

[0025] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for transmitting encoded parameters provided in the first or second aspect.

[0026] In a seventh aspect, embodiments of this application also provide a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the method for transmitting encoded parameters provided in the first or second aspect.

[0027] In this embodiment, the encoding end can determine the target rate-distortion coefficient of the image coding unit by obtaining the quantization coefficient increment of the image coding unit in the image, and then determine the target cost function of the image coding unit. Based on the target cost function, the encoding unit can determine the encoding mode of the image coding unit, and transmit the encoding parameters of the encoding mode and the quantization coefficient of the image to the decoding end so that the decoding end can perform decoding processing to obtain the image block corresponding to the image coding unit. It can be seen that, on the one hand, the encoding end can reselect the encoding mode by determining the target cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient, which can ensure that the effect of adaptive quantization at the image coding unit level can be achieved based on the quantization coefficient of the image. On the other hand, only the quantization coefficient of the image and the quantization coefficient of some coding units larger than a set size threshold are transmitted, without transmitting the quantization coefficient of all coding units, which can save the bit rate required for encoding the quantization coefficient and improve the compression ratio gain at the coding unit level. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of the architecture of a transmission system for encoded parameters provided in an embodiment of this application;

[0030] Figure 2 This is a flowchart illustrating a method for transmitting encoded parameters provided in an embodiment of this application;

[0031] Figure 3 This is a schematic diagram illustrating a method for transmitting encoded parameters according to an embodiment of this application.

[0032] Figure 4 This is a flowchart illustrating another method for transmitting encoded parameters provided in an embodiment of this application;

[0033] Figure 5 This is a timing diagram illustrating a method for transmitting encoded parameters provided in an embodiment of this application;

[0034] Figure 6 This is a timing diagram of another method for transmitting encoded parameters provided in an embodiment of this application;

[0035] Figure 7 This is a flowchart illustrating another method for transmitting encoded parameters provided in an embodiment of this application;

[0036] Figure 8This is a schematic diagram of the structure of a transmission device for encoded parameters provided in an embodiment of this application;

[0037] Figure 9 This is a schematic diagram of the structure of another encoding parameter transmission device provided in an embodiment of this application;

[0038] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0039] Figure 11 This is a schematic diagram of the structure of another electronic device provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0041] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0042] 1. Coding Unit (CU)

[0043] A CU (Computer Unit) refers to the non-overlapping image region into which each image in a video sequence is divided during the video coding process. The CU is the smallest coding unit in the Versatile Video Coding (VVC) standard; it can be the basic unit for encoding images.

[0044] In the embodiments of this application, a CU can also be called an image coding unit, and the target image coding unit is any CU in a video. The encoding end can process and encode on a CU-by-CU basis and obtain the bitstream of each CU. Based on the bitstream of each CU in the image, the bitstream of the image can be obtained. Furthermore, based on the bitstream of each image in the image sequence included in the video, the bitstream of the video can be obtained.

[0045] 2. Quantization Parameter (QP)

[0046] QP, also known as quantization parameter, is a parameter that determines quantization. Quantization processing can be used to remove high-frequency information. QP can correspond to frames, meaning each image frame in a video corresponds to a unique QP. Alternatively, QP can correspond to CUs, with each CU corresponding to a unique QP. The QP values ​​for each CU can be the same or different. The size of the QP determines the fineness of the quantization; a larger QP results in coarser quantization, and vice versa.

[0047] In the embodiments of this application, adaptive quantization technology can be used to obtain the QP corresponding to each CU, that is, one CU corresponds to one QP, thereby introducing a finer-grained adaptive quantization selection, and also taking into account the importance distribution of CUs.

[0048] 3. Delta Quant Parameter (DQP)

[0049] DQP refers to the difference between the QP used by the CU and the predicted QP in the CU-level QP. The predicted QP is calculated based on a certain algorithm that combines the value of the frame-level QP (image QP) with the QPs of one or more CUs preceding the current CU.

[0050] In the embodiments of this application, the predicted QP can be referred to as the QP of the reference image coding unit. The encoder can determine the target cost function corresponding to the CU based on the DQP, select the coding mode of the CU based on the target cost function, and further determine the coding parameters indicated by the coding mode.

[0051] 4. Rate-distortion coefficient (Lambda, λ)

[0052] The rate-distortion coefficient is a weight in the cost function, determining the proportion of the distortion value D to the number of bits R required for encoding. The rate-distortion function, also known as the cost function, includes the mapping relationship between the encoding cost, the distortion value D, and the number of bits R required for encoding. The distortion value D can be calculated as the difference between the original CU image and the CU reconstructed based on a certain encoding mode. The number of bits R required for encoding can be the actual bitstream encoded under that encoding mode, i.e., the number of code characters. An encoding mode can be selected from multiple encoding modes based on the cost function.

[0053] In the embodiments of this application, during the encoding process of CU in video, in order to determine the encoding mode of each CU, the encoding end can determine the encoding mode with the minimum cost based on the cost function as the encoding mode of that CU.

[0054] 5. Rate-distortion coefficient weight (Delta Lambda)

[0055] Rate-distortion coefficient weights, also known as variable rate-distortion coefficients, are an intermediate parameter among the rate-distortion coefficients corresponding to the CU determined at the encoding end.

[0056] In the embodiments of this application, the encoding end can determine the rate-distortion coefficient weight based on the quantization coefficient increment, and then determine the cost function based on the rate-distortion coefficient weight and the initial rate-distortion coefficient. The cost function is the cost function of a certain CU, and the encoding end can select a coding mode from multiple coding modes based on the cost function.

[0057] 6. Video encoding

[0058] Video coding refers to compressing video signals to reduce the amount of data required to represent them, thereby reducing the amount of data to be transmitted and stored, saving storage space, and improving transmission efficiency. Video coding is performed by the encoding end, and the object of video coding is the video signal or the image sequence included in the video signal. In the field of video encoding and decoding, the images in the video signal sequence can be called pictures or frames. The encoding end encodes the images and sends the encoded parameters to the decoding end, which then performs decoding based on the encoded parameters to obtain the decoded video. Specifically, the encoding of the video signal by the encoding end includes image partitioning, prediction, transform, quantization, loop filtering, and entropy coding.

[0059] In the embodiments of this application, the encoding end can encode the images in the video, and then transmit the encoding parameters corresponding to the video to the decoding end so that the decoding end can perform decoding based on the encoding parameters.

[0060] (1) Image partitioning

[0061] Image partitioning refers to dividing each image in a video signal sequence into multiple non-overlapping image regions. Images in a video signal can be divided into slices, and slices can be further divided into blocks. Video coding can be performed on a block-by-block basis. In different video coding standards, the concept of a block can be further extended. Taking the High Efficiency Video Coding (HEVC) and VVC standards as examples, the concept of a block can be extended to a Coding Tree Unit (CTU). A CTU can be further divided according to a quadtree to obtain one or more CUs. A CU is the most basic element in a coding process and can be the basic unit for dividing and encoding the image. Optionally, a CU can be square or rectangular in shape. Video coding refers to encoding CUs one by one, organizing them into a continuous video bitstream.

[0062] In the embodiments of this application, CU refers to a specific image region within a certain image frame of a video. CU can be called an image coding unit, and the target image coding unit is any image coding unit within that image frame (image). The encoding end can perform prediction, transformation, quantization, and entropy coding based on the CU. The coding unit can have various sizes, such as 16×16 or 64×64; this application does not limit the size of the coding unit.

[0063] (2) Prediction

[0064] Prediction refers to the encoding method of predicting the next signal based on the correlation between discrete signals and using one or more preceding signals. Prediction methods include intra-frame prediction and inter-frame prediction. Intra-frame prediction utilizes pixel values ​​within the same frame to predict signals, reducing spatial redundancy, since a single image frame contains many regions with similar or identical colors. Inter-frame prediction utilizes pixel values ​​from adjacent frames (e.g., the previous frame) to predict motion trajectories, such as predicting motion trajectories in a series of images or a continuous video sequence, reducing temporal redundancy. Both intra-frame and inter-frame prediction include multiple coding modes. The encoder calculates the coding cost required for each intra-frame prediction mode and / or each inter-frame prediction mode based on a cost function for the control unit (CU), thus determining the coding mode corresponding to the minimum coding cost—the coding mode for that CU.

[0065] In the embodiments of this application, for each CU, an encoding mode can be selected from multiple different encoding modes based on a cost function, thereby obtaining the encoding parameters indicated for that encoding mode. These encoding parameters may include encoding mode information and residual information. The encoding end or decoding end can construct image encoding units based on the encoding mode information, called constructed image units, which are equivalent to the recovered image of the CU (video encoding is a lossy encoding process). From this, the residual information can be determined; this residual information represents the difference between the original CU image and the constructed image unit. Furthermore, the encoding parameters of each CU can be summarized to obtain the video encoding parameters.

[0066] (3) Transformation

[0067] Because the human eye is more sensitive to low-frequency information and relatively less sensitive to high-frequency information, an image can be transformed from the spatial domain to the frequency domain, thus separating the high-frequency and low-frequency components. Specifically, the transformation can be a Discrete Fourier Transform (DFT) or a Discrete Cosine Transform (DCT). For the CU (Computer Unit), the transformation object is the residual information between the original image and the constructed image units. This is because the encoder only transmits the residual information, allowing for further compression, i.e., transformation processing. After the transformation, each element in the transformation matrix can be called a transformation coefficient. The transformation coefficients in the upper left part of the transformation matrix represent the low-frequency components, and the transformation coefficients in the lower right part represent the high-frequency components. Furthermore, the transformed rectangle can be scanned in a "Z" shape, resulting in a pixel string where the first part represents the lower-frequency components with larger values, and the latter part represents the higher-frequency components with smaller values.

[0068] In the embodiments of this application, the encoding end can perform transformation processing on the residual information, such as DCT transformation processing, to obtain the transformed transformation matrix, and can then perform further compression processing. The decoding end can, after obtaining the transformation matrix, perform inverse transformation processing on the transformation matrix to obtain the residual information, thereby enabling further decoding processing.

[0069] (4) Quantization

[0070] After obtaining the transform matrix, the encoder can remove high-frequency information that is less sensitive to the human eye through quantization. Quantization involves dividing each element of the transform matrix by a value called the quantization step (QStep). The QStep is determined by the QP, and there is a one-to-one correspondence between QP and QStep. After determining the value of QP, the value of QStep can be determined by looking up a table. For the encoder, a smaller QP corresponds to a smaller QStep, resulting in finer quantization, preserving more detail, lower distortion, and a higher bit rate. Conversely, a larger QP corresponds to a larger QStep, resulting in coarser quantization, higher distortion, and a lower bit rate. It is understandable that quantization is a lossy compression process.

[0071] In the embodiments of this application, the encoder can quantize the transform matrix. Specifically, the encoder can use adaptive quantization techniques to determine that each CU corresponds to a QP value. The QP values ​​for each CU can be different or the same. Therefore, the QStep for each CU can be determined based on its QP. Then, based on the residual information corresponding to each element in the transform matrix and the QStep for each CU's QP, the quantization result is determined. The decoder can determine the QStep based on the QP, thus enabling inverse quantization.

[0072] (5) Loop Filtering

[0073] Loop filtering refers to the process of reconstructing an image by inverse quantization and inverse transform of a signal that has undergone transform and quantization during inter-frame prediction. The reconstructed image, compared to the original image, suffers from lossy compression due to quantization processing, resulting in some differences in image information. This distortion arises from the reconstructed image. To reduce the impact of using the reconstructed image as a reference image on subsequent predictions, filtering can be applied. Since this filtering operation occurs within the coding loop, it is called loop filtering. Specifically, filters can be used to filter the reconstructed image. Examples of filters include deblocking filters, Sample-Adaptive Offset (SAO) filters, bilateral filters, Adaptive Loop Filter (ALF), sharpening or smoothing filters, and collaborative filters. In essence, filtering the reconstructed image before using it as a reference frame for subsequent coded image predictions reduces the distortion caused by quantization.

[0074] In the embodiments of this application, the encoding end can perform inverse quantization and inverse transform processing on the image that has been transformed and quantized during prediction, especially during inter-frame prediction, to obtain a reconstructed image. The reconstructed image can then be filtered, and the filtered image can be used as a reference frame image to predict the image signal after that image.

[0075] (6) Entropy Coding

[0076] Entropy coding refers to transforming the symbols used to represent a video sequence into a compressed bitstream for transmission or storage, thereby removing information entropy redundancy and achieving compression. The input symbols are the coding parameters, which may include quantized transform coefficients (residual information), motion vector data (coding mode information), and other additional information, such as marker bits for correct decoding and header information. Entropy coding methods mainly include Variable Length Coding (VLC) and Arithmetic Coding. VLC can include, for example, Huffman coding and Shannon-Fano coding. Arithmetic coding includes Content Adaptive Binary Arithmetic Coding (CABAC) and exponential coding. Essentially, the entropy coding method used at the encoder informs the decoder, allowing the decoder to perform decoding based on the encoder's coding method.

[0077] In the embodiments of this application, the encoding end can perform entropy encoding on the encoding parameters corresponding to each CU in a video, and then transmit the encoded information to the decoding end. The decoding end can then perform decoding based on the encoding information to obtain the encoding parameters, and then reconstruct the image block corresponding to each CU to obtain the video.

[0078] This application proposes a transmission scheme for encoding parameters, applicable to video encoding and decoding, video transmission, video storage, and other scenarios or fields. Specifically, it can be used in video encoding tasks. A video encoding task involves the encoding end converting a video signal into a digital signal and removing redundant data to reduce the amount of data used to represent the video. The encoded data used to represent the video is then stored or transmitted to the video decoding end, allowing the decoding end to obtain the data representing the video and decode it. Specifically, the encoding end can obtain the quantization coefficient increment of a target image coding unit in a specific image frame of the video image sequence. Based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, it determines the target rate-distortion coefficient of the target image coding unit, determines the target cost function of the target image coding unit based on the target rate-distortion coefficient, and selects the encoding mode of the target image coding unit according to the target cost function. The encoding end can then transmit the encoding parameters indicated by the encoding mode and the QP of the image frame to the decoding end, enabling the decoding end to perform decoding processing based on the encoding parameters and QP to obtain the image block corresponding to the target image coding unit. The encoder can perform this operation on multiple control units (CUs) in the video to obtain the encoding parameters of the entire video. The encoder can then transmit these encoding parameters to the decoder. Therefore, in a scenario where each CU corresponds to a QP (Quadrant Position), the encoder can directly use the predicted QP for the target image coding unit without transmitting the QP information (i.e., DQP) of the current coding unit (target image coding unit). It uses a determined target rate-distortion coefficient to determine the target cost function and selects the encoding mode suitable for the image frame QP. This eliminates the need to transmit the target image coding unit's QP, saving the bitrate required for encoding quantization coefficients and reducing the compression rate gains at the coding unit level.

[0079] The transmission scheme for the encoded parameters proposed in this application involves technologies such as cloud computing and cloud storage, wherein:

[0080] Cloud computing is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" appear infinitely scalable, readily available, on-demand, and expandable, with payment based on usage.

[0081] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.

[0082] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.

[0083] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.

[0084] Currently, the storage method of storage systems is as follows: Logical volumes are created. During the creation of a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.

[0085] The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.

[0086] Based on the above description, please refer to Figure 1 , Figure 1 This is a schematic diagram of the architecture of a transmission system for encoded parameters provided in an embodiment of this application, such as... Figure 1 As shown, the transmission system for this encoding parameter may include a video encoding device 101 and a video decoding device 102. The video encoding device 101 is the encoding end for video data, and the video decoding device 102 is the decoding end for video data. The video encoding device 101 can be directly or indirectly connected to the video decoding device 102 via wired or wireless means. It should be noted that... Figure 1 The number and configuration of devices shown are for illustrative purposes only and do not constitute a limitation on the embodiments of this application. In practical applications, the transmission system for this encoding parameter may include only multiple electronic devices, such as multiple video encoding devices and multiple video decoding devices. This application embodiment uses one video encoding device 101 and one video decoding device 102 as examples for illustration and explanation.

[0087] Optionally, the video encoding device 101 and the video decoding device 102 can be the same electronic device or two different electronic devices; this application does not limit this. It is understood that in the embodiments of this application, "encoding end" and "decoding end" are simply terms used in the embodiments of this application. "Encoding end" refers to the video encoding device, and "decoding end" refers to the video decoding device; their names do not constitute any limitation on this embodiment.

[0088] like Figure 1 As shown, the video encoding device 101 can acquire video signals and then compress and encode the video. To achieve better compression capabilities, a QP can be determined for each CU in each image frame of the video. The video encoding device 101 can acquire the QP of each CU in each image frame of the video. If the QP of each CU needs to be transmitted to the video decoding device 102, a large amount of data needs to be transmitted, which increases the encoding overhead.

[0089] Specifically, the video encoding device 101 can acquire the DQP of any CU in the video image, i.e., the DQP of the target image coding unit, and determine the target rate-distortion coefficient of the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient. Then, the video encoding device 101 can determine the target cost function based on the target rate-distortion coefficient, and determine the encoding mode of the target image coding unit from multiple encoding modes according to the target cost function. Thus, the video encoding device 101 can transmit the encoding parameters indicated by the encoding mode and the QP of the image to the video decoding device 102. For the target image coding unit, the video decoding device 102 can perform decoding processing based on the encoding parameters and the QP of the image to obtain the image block corresponding to the target image coding unit. The video decoding device 102 can receive the encoding parameters and the QP of the image transmitted from the video encoding device 101, and then the video decoding device 102 can perform decoding processing based on the encoding parameters and the QP of the image to obtain the image block corresponding to the target image coding unit. For video, video encoding device 101 can transmit the video encoding parameters and the QP of each image frame to video decoding device 102. Video decoding device 102 can perform decoding processing based on the encoding parameters and the QP of the image to obtain the video.

[0090] The aforementioned electronic devices, such as video encoding device 101 and video decoding device 102, can be smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, etc., but are not limited to these. The video encoding device 101 and video decoding device 102 can also be servers, such as independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Optionally, the video encoding device 101 can be a device capable of acquiring video signals, such as a camera that can capture video. Furthermore, the video encoding device 101 can also be a device with display capabilities, capable of displaying the video footage. Optionally, the video decoding device 102 can also be a device with display capabilities, capable of decoding the video based on the parameters transmitted by the video encoding device 101, and then playing the video and displaying the images included in the video.

[0091] Through the aforementioned transmission system of encoding parameters, video encoding devices can determine the target rate-distortion coefficient of an image coding unit by acquiring the quantization coefficient increment of the image coding unit in the image, and then determine the target cost function of the image coding unit. Based on the target cost function, the encoding unit can determine the encoding mode of the image coding unit, and transmit the encoding parameters of the encoding mode and the quantization coefficient of the image to the video decoding device, so that the video decoding device can perform decoding processing to obtain the image block corresponding to the image coding unit. It can be seen that, on the one hand, video encoding devices can reselect the encoding mode by determining the target cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient, ensuring that the effect of adaptive quantization at the image coding unit level can be achieved based on the quantization coefficient of the image. On the other hand, transmitting only the quantization coefficient of the image, rather than the quantization coefficients of each coding unit in the image, can save the bit rate required for encoding the quantization coefficients, reducing the compression rate gain at the coding unit level.

[0092] In one implementation, the aforementioned video, the QP of each CU in each image frame of the video, the quantization coefficient increment of the CU, the target cost function, the encoding parameters indicated by the encoding mode, the QP of the image, and the video signal can all be stored in the blockchain. This prevents tampering with the QP of each CU in each image frame of the video, the quantization coefficient increment of the CU, the target cost function, the encoding parameters indicated by the encoding mode, the QP of the image, and the video signal. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, it is a decentralized database, a chain of data blocks linked using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block.

[0093] It is understood that the transmission system of encoded parameters described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0094] Based on the above-mentioned transmission scheme and system for encoded parameters, embodiments of this application provide a method for transmitting encoded parameters. This method can be implemented through interaction between an encoding end and a decoding end. The encoding end can be... Figure 1 The video encoding device 101 in the transmission system with the encoding parameters shown can be the decoding end. Figure 1The video decoding device 102 in the transmission system of the encoded parameters shown. If one or more of the video encoding device and video decoding device are servers, they can be dedicated servers or certain Internet application servers. These Internet application servers can not only execute the relevant steps of the embodiments of this application, but also provide other services. Please refer to... Figure 2 , Figure 2 This is a flowchart illustrating a method for transmitting encoded parameters according to an embodiment of this application. The method for transmitting encoded parameters includes the following steps S201-S205:

[0095] S201. The encoding end obtains the quantization coefficient increment of the target image coding unit in the image.

[0096] In this embodiment, the encoding end can acquire video signals (video), such as by shooting video or acquiring network video, such as network video conferencing. Before encoding the video, the encoding end can perform pre-analysis processing. Specifically, the pre-analysis processing can include the encoding end performing image partitioning processing on the image sequence included in the video to obtain multiple CUs included in each image frame (image) of the video. The target image coding unit is any one of the multiple CUs included in the multiple image frames of the video. Furthermore, the encoding end can acquire the QP of each image frame in the video, and determine the QP of each CU based on the importance of each CU among the multiple CUs included in each image frame. This is because QP represents the fineness of quantization; if the CU is more important, its QP is smaller, allowing for finer quantization; if the CU is less important, its QP is larger, allowing for coarser quantization, thereby saving code symbols.

[0097] In order for the decoding end to achieve the optimal reconstruction effect, the encoding end needs to transmit the QP of each CU included in each image frame (image) to the decoding end for decoding processing. This method results in a large number of code characters that the encoding end needs to encode and a large amount of data to be transmitted. Therefore, the encoding parameter transmission method proposed in this application can determine the cost function of the CU by predicting the QP of the CU, and then determine the encoding mode of the CU to approximately achieve the effect of the QP corresponding to the CU. Moreover, it is not necessary to transmit the QP information of the CU, but only the QP of the image frame (image) where the CU is located. This can save the amount of data transmitted while ensuring that the image quality decoded by the decoding end remains unchanged.

[0098] In this embodiment, a CU (i.e., target image coding unit) is used as an example for explanation. The encoding end can obtain the QP of the target image coding unit and then determine the DQP of the target image coding unit based on the QP of the target image coding unit and the QP of the reference image coding unit. The DQP can represent the offset of the QP of the target coding unit. Subsequently, other parameters (rate-distortion coefficient weights) can be used to achieve an effect similar to this offset, which can reduce the amount of data transmitted while ensuring the reconstruction effect of the decoding end.

[0099] The QP of the reference image coding unit can be the predicted QP of the target image coding unit. This predicted QP can be determined based on the QPs of one or more neighboring CUs, or it can be determined based on the QP of the image in which the target image coding unit is located. Specifically, the DQP of the target image coding unit can be the difference between the QP of the target image coding unit and the QP of the reference image coding unit. Therefore, after determining the DQP of the target image coding unit, the encoder can determine the cost function of the target image coding unit based on its DQP to determine the coding mode.

[0100] S202. The encoding end determines the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, as well as the quantization coefficient increment of the target image coding unit.

[0101] In this embodiment, the encoder can obtain the correlation between DQP and Lambda(λ). This correlation can be stored or obtained by the encoder, and this application does not limit this. Therefore, based on the DQP of the target image coding unit and this correlation, the Lambda(λ) of the target image coding unit can be determined. The Lambda(λ) of the target image coding unit can be used to determine the cost function of the target image coding unit, and the Lambda(λ) of the target image coding unit can be called the target rate-distortion coefficient. It should be noted that, for the target image coding unit, the DQP of the target image coding unit can represent the offset of the target image coding unit. Therefore, the encoder can determine a target rate-distortion coefficient using a baseline Lambda(λ) and a rate-distortion coefficient weight, and this target rate-distortion coefficient is the Lambda(λ) of the target image coding unit. Here, the baseline Lambda(λ) represents the effect of QP based on the image frame, and the rate-distortion coefficient weights represent the effect of DQP based on the target image coding unit. This is equivalent to determining the target rate-distortion coefficients by replacing the target image coding unit's DQP with the rate-distortion coefficient weights. The target rate-distortion coefficients can be used to replace Lambda(λ) in the initial cost function, thereby obtaining the target cost function for the target image coding unit.

[0102] In one possible implementation, since the DQP of the target image coding unit can represent the offset of the QP of the target coding unit, a similar effect to DQP can be achieved through rate-distortion coefficient weights. That is, the effect of this offset is simulated using rate-distortion coefficient weights, thus the target rate-distortion coefficient can be determined using the rate-distortion coefficient weights to replace Lambda(λ) in the cost function. Specifically, the encoder can first determine the initial rate-distortion coefficient of the target image coding unit based on the correspondence between QP and Lambda(λ) and the QP of the image frame. This initial rate-distortion coefficient is the aforementioned baseline Lambda(λ). Then, the encoder can determine the rate-distortion coefficient weight of the target image coding unit based on the correspondence between DQP and rate-distortion coefficient weights and the DQP of the target image coding unit. Finally, the encoder can determine the target rate-distortion coefficient based on the initial rate-distortion coefficient and the rate-distortion coefficient weights.

[0103] S203. The encoding end determines the target cost function of the target image encoding unit based on the target rate-distortion coefficient.

[0104] In this embodiment, the cost function may include the correspondence between the encoding cost of the encoding mode and the distortion value D and the number of bits R required for encoding. The cost function represents the required encoding cost for a specific CU, such as when the target image encoding unit uses encoding mode A. This cost consists of the distortion value obtained from the difference between the original image of the target image encoding unit and the reconstructed image encoding unit based on the encoding mode, and the number of bits required under encoding mode A. Lambda(λ) determines the weighting of D and R in the cost function, and its mathematical definition is the negative derivative of D and R. Lambda(λ) represents the decrease in distortion per unit bit rate when the target image encoding unit uses encoding mode A. It can be understood that when the number of bits used to encode the target image encoding unit increases (i.e., the number of code characters used to encode the target image encoding unit increases), the difference between the reconstructed image encoding unit and the original image of the target image encoding unit is smaller. Conversely, if the bit stream decreases, the distortion value is larger.

[0105] The initial rate-distortion coefficient in the cost function can be determined by the encoder based on the correspondence between QP and Lambda(λ). When QP is offset, according to the correspondence between QP and Lambda(λ), when QP changes, Lambda(λ) will also change. Therefore, the encoder can replace the initial rate-distortion coefficient with a new rate-distortion coefficient to achieve the effect of the offset QP. This new rate-distortion coefficient is the target rate-distortion coefficient determined above. Furthermore, the encoder can determine the target cost function based on the target rate-distortion coefficient; that is, the target cost function is the cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient. Then, the encoder determines the coding mode of the CU (such as the target image coding unit) based on the target cost function.

[0106] S204. The encoding end determines the encoding mode of the target image encoding unit from multiple encoding modes based on the target cost function.

[0107] In this embodiment, the encoding end can determine the encoding mode of the target image coding unit based on the target cost function during the encoding process. Specifically, the encoding end can traverse multiple encoding modes to determine the reference encoding parameters obtained by encoding the target image coding unit according to the currently traversed encoding mode. Then, the encoding end can reconstruct the target image coding unit according to the reference encoding parameters to obtain the reconstructed image coding unit. Based on the difference between the original image of the target image coding unit (i.e., the target image coding unit itself) and the reconstructed image coding unit, the distortion value of the target image coding unit can be determined. Thus, according to the correspondence between the encoding cost of the encoding mode included in the target cost function, the distortion value D, and the number of bits R required for encoding, as well as the distortion value of the currently traversed encoding mode and the number of code characters included in the reference encoding parameters, the encoding cost of the currently traversed encoding mode is obtained. After the encoding modes are traversed, the encoding mode with the lowest encoding cost can be determined as the encoding mode of the target image coding unit.

[0108] It should be noted that since a target cost function, rather than a cost function, is used for the target image coding unit, the coding mode determined by the encoder based on the target cost function may differ from the coding mode determined based on the cost function. The coding mode determined by the encoder based on the target cost function can simulate the effect of QP offset (i.e., the QP of the target image coding unit). Therefore, while ensuring the quality of quantization processing, the QP of the image frame can be used instead of the QP of the target image coding unit for transmission to the decoder, saving the bitrate of encoding the QP of the target image coding unit, thereby saving transmission bandwidth and improving the compression ratio.

[0109] S205. The encoding end transmits the encoding parameters indicated by the above encoding mode and the quantization coefficients of the above image to the decoding end, and the decoding end receives the encoding parameters and the quantization coefficients of the image from the encoding end.

[0110] In one possible implementation, for a target image coding unit, after the encoding end determines the encoding parameters of the target image coding unit, it can transmit the encoding parameters indicated by the encoding mode and the QP of the image containing the target image coding unit to the decoding end. This allows the decoding end to perform decoding based on the encoding parameters and the QP of the image to obtain the image block corresponding to the target image coding unit. For video, after obtaining the encoding parameters of each image coding unit in each image frame of the video, the encoding end can send the video's encoding parameters to the decoding end. These video encoding parameters include the encoding parameters of each image coding unit in each image frame and the QP of each image frame. This allows the decoding end to perform decoding based on the video's encoding parameters to obtain the decoded video.

[0111] Correspondingly, the decoding end can receive encoding parameters and the QP of the image, as well as QP information of some CUs, from the encoding end. The encoding parameters are the encoding parameters indicating the encoding mode of the target coding unit in the image. The target coding unit is any one of the multiple image coding units divided in the image, and the image is any image frame in the video. For a CU, such as a target image coding unit, the decoding end can perform decoding processing based on the encoding parameters of the target image coding unit and the QP of the image containing the target image coding unit to obtain the image block corresponding to the target image coding unit. For video, the decoding end can obtain the image blocks corresponding to each image coding unit based on the video's decoding parameters, i.e., obtain each image frame, i.e., obtain the decoded video corresponding to the video. The encoding end needs to transmit the QP information of some CUs because these CUs are relatively large. This is because the encoding end's method of quantizing the CUs using their QPs achieves a higher compression rate. Therefore, for smaller CUs, such as the target image coding unit, it is not necessary to transmit the QP of the target image coding unit; for larger CUs, it is necessary to transmit the QP information of each CU.

[0112] S206. The decoding end performs decoding processing based on the above encoding parameters and the above image quantization coefficients to obtain the image block corresponding to the above target image encoding unit.

[0113] In this embodiment, the example of decoding an image block corresponding to a target image coding unit is used for explanation. The coding parameters received by the decoding end may include residual information and coding mode information of the target image coding unit. The residual information is obtained by quantizing the difference between the target image coding unit and the constructed image coding unit. The constructed image coding unit is the image coding unit constructed by the encoding end based on the coding mode information. The quantization parameter is the prediction QP, which can be determined based on the image's QP. The reason for transmitting the residual information by the encoding end is that the decoding end can construct an image coding unit based on the coding mode, i.e., construct the image coding unit, and then construct the sum of the image coding unit and the residual information to determine the image block corresponding to the target image coding unit. Furthermore, compared to the information of the target image coding unit, the amount of data transmitted for transmitting the residual information is smaller.

[0114] In one possible implementation, the decoder can follow the reverse process of encoding, first performing inverse quantization on the residual information based on the prediction QP to obtain the target residual information. Further, the decoder can perform prediction processing based on the encoding mode information in the encoding parameters to obtain the constructed image coding units (ICOs). Then, the decoder can determine the image block corresponding to the target ICO based on the target residual information and the constructed ICOs. It should be noted that the encoder, based on the original images of the constructed and target ICOs, determines the residual information through transformation and quantization, and then entropy-encodes it before transmitting it to the decoder. The entropy-decoded residual information obtained by the decoder, after transformation and quantization by the encoder, undergoes inverse quantization to obtain the target residual information. This residual information then undergoes inverse transformation by the decoder to obtain a residual that can be summed with the constructed ICOs. The sum of the constructed ICOs and the residual is then used to determine the image block corresponding to the target ICO. Furthermore, after determining the image block of each CU in each image frame of the video, the decoder can obtain the decoded video.

[0115] Please refer to the following: Figure 3 , Figure 3 This is a schematic diagram illustrating a scenario of a method for transmitting encoded parameters provided in an embodiment of this application, such as... Figure 3 As shown, the video being encoded at the encoding end includes water droplets. Taking a 1-second video consisting of 24 frames as an example, the video can be partitioned to obtain multiple control units (CUs) for each image. The target image encoding unit is one of these CUs. Figure 3Taking a region of an image within a water droplet as the target image coding unit (CU), the encoder can obtain the QP (Quality Points) of each CU in the image. The QP of each CU includes the QP of the target image coding unit, thus determining the DQP (Direction-Level Quality Point) of the target image coding unit. Based on the DQP, the encoder can determine the target rate-distortion coefficient (RDC) of the target image coding unit and, based on the DC, determine the target cost function of the target image coding unit. Further, the encoder can determine the coding mode of the target image coding unit based on the target cost function and use the coding parameters indicated by the coding mode and the QP of the image as the code characters that the target image coding unit needs to transmit.

[0116] After the encoding end determines the code symbols that each CU in the image needs to transmit, since some or all CUs in the image can be predicted using the same QP, the encoding end only needs to transmit the image's QP and the QPs of coding units exceeding a set size threshold once. Then, the encoding end transmits the code symbols that need to be transmitted for each image in the image sequence included in the video to the decoding end. For some CUs in the image, such as the target image coding unit, the decoding end can reconstruct the image block corresponding to the target image coding unit based on the encoding parameters indicated by the encoding mode and the predicted QP. Then, the encoding end can determine the decoded image based on the image blocks corresponding to each CU in the image, and obtain the decoded video from each decoded image. It is understandable that, since the encoding process is lossy, the decoded image is different from the images in the image sequence in the video, and the video is also different from the decoded video, resulting in some distortion. Therefore, the encoding end directly uses the predicted QP for some CUs, without transmitting the quantization coefficients of these CUs, reducing the amount of data required to transmit QP while ensuring that the reconstruction effect remains basically unchanged (one CU corresponds to one QP).

[0117] In this embodiment, the encoder can determine the target rate-distortion coefficient of the image coding unit by obtaining the quantization coefficient increment of the image coding unit in the image, and then determine the target cost function of the image coding unit. Based on the target cost function, the coding unit can determine the coding mode of the image coding unit, and transmit the coding parameters of the coding mode and the quantization coefficient of the image to the decoder so that the decoder can perform decoding processing to obtain the image block corresponding to the image coding unit. It can be seen that, on the one hand, the encoder can reselect the coding mode by determining the target cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient, which can ensure that the effect of adaptive quantization at the image coding unit level can be achieved based on the quantization coefficient of the image. On the other hand, for some image coding units, prediction QP is directly used, and there is no need to transmit the quantization coefficient of these image coding units instead of the quantization coefficient of each coding unit in the image, which can save the bit rate required for encoding quantization coefficients and improve the compression rate gain at the coding unit level.

[0118] Based on the above description, please refer to Figure 4 , Figure 4 The illustration shows a flowchart of a method for transmitting encoded parameters according to an exemplary embodiment of this application. This method for transmitting encoded parameters can be performed by... Figure 1 In the illustrated embodiment, the video encoding device 101 performs the transmission of the encoding parameters, which may include the following steps S401-S405:

[0119] S401. Obtain the quantization coefficient increment of the target image coding unit in the image.

[0120] In this embodiment, the image is any image in the video to be encoded, and the image can be divided into multiple control units (CUs). The target image coding unit is any CU among the multiple CUs into which the image is divided. The DQP of the target image coding unit is the difference between the QP of the target image coding unit and the QP of the reference image coding unit. The QP of the reference image coding unit is the predicted QP for the target image coding unit. The methods for determining the predicted QP of the target image coding unit can be different, and the determination of the QP of the reference image coding unit can be based on different video coding standards.

[0121] In one possible implementation, the encoder can first determine the QP of each CU in the image and the QP of the reference image coding unit. The target image coding unit is any CU among the CUs in the image. Then, the DQP of the target image coding unit can be determined based on the QP of the target image coding unit and the QP of the reference image coding unit. Before encoding the video, the encoder can perform pre-analysis to determine the QP of the CUs included in each image sequence of the video. It should be noted that QP can be divided into different levels, such as image-level QP and CU-level QP. Image-level QP is also called frame-level QP. The techniques described above for determining the corresponding QP for different image units, such as determining CU-level QP and frame-level QP, can be called adaptive quantization techniques.

[0122] Specifically, frame-level QP refers to the QP of an image determined based on the importance of each image in a video image sequence. The importance of an image can be determined by frame reference relationships in video coding; the higher the frequency of reference to an image, the more important it is, and the smaller its QP. Conversely, the lower the frequency of reference, the less important it is, and the larger its QP. CU-level QP refers to the QP of a CU determined based on its importance. The importance of a CU can also be evaluated based on its reference frequency. A higher frequency of reference indicates a more important CU, resulting in a smaller QP and finer quantization; conversely, a lower frequency of reference indicates a less important CU, resulting in a larger QP and coarser quantization.

[0123] It's important to note that since QP determines the coefficients used to quantize the residual values ​​of the current video (CU in the video), and thus determines the compressed video quality, QP information needs to be stored in the video bitstream (i.e., QP information is transmitted) for unified QP processing during encoding and decoding, such as quantization at the encoding end and dequantization at the decoding end. A smaller QP results in a higher number of transmitted code symbols, while a larger QP for the CU results in a lower number of transmitted code symbols.

[0124] This application uses CU-level QP as an example for explanation. The encoder performs pre-analysis processing on the video through built-in pre-processing and adaptive quantization units. Tools included in the encoder can complete the pre-analysis processing of the video. For example, x264, an industrial-grade encoder used for encoding H.264 compliant video, can use the mbtree tool in x264 to perform pre-analysis processing of the video to obtain the QP of each CU in the video. Similarly, the cu tree tool in the x265 encoder used for encoding HEVC compliant video can also be used to perform pre-analysis processing of the video to obtain the QP of each CU in the video. It should be noted that this application, using CU-level QP as an example, introduces a more fine-grained adaptive quantization selection, which can increase compression ratio gains. Above CU-level QP, frame-level QP also exists, but this method can achieve better quantization results, while frame-level QP can be used to reduce the number of transmitted code symbols.

[0125] For example, if an image has a frame-level QP of 30, and the image includes 10 CUs, their QPs would be 31, 30, 32, 37, 24, 33, 27, 28, 29, and 30 respectively. Directly transmitting the code symbols required for these 10 CUs would require 31, 30, 32, 30, 29, 33, 27, 28, 29, and 30, which would require transmitting a large amount of data. Taking the predicted QP as the frame-level QP as an example (different video compression standards use different algorithms for calculating predicted QP), the encoder can transmit the difference between the QP of each CU and the frame-level QP of the image, such as 1, 0, 2, 0, -1, 3, -3, -2, -1, and 0. The decoder can calculate the QP of each CU based on the frame-level QP and the difference between the QP of each CU and the frame-level QP, thereby reducing the amount of information transmitted.

[0126] Even so, although transmitting only the difference between the QP of each CU and the QP of the image can reduce the amount of data transmitted, it is still necessary to transmit the corresponding QP information for each CU. To further reduce the amount of data transmitted, the encoder can use a parameter to replace the effect of DQP, requiring only one transmission of the frame-level QP for each image. This can achieve a certain degree of effect close to the CU-level QP determined by adaptive quantization technology, without transmitting the QP of each CU. That is, there is no need to encode the numerical information of the QP of each CU in the bitstream. Thus, in actual product use, the compression rate improvement brought by CU-level adaptive quantization technology can be effectively preserved, saving the bitrate required for QP encoding and the bandwidth required for data transmission, balancing the compression rate benefits of CU-level adaptive quantization and the encoding overhead of QP. Therefore, the encoder can first determine the DQP of each CU. This application uses the target image coding unit as an example for explanation.

[0127] In one possible implementation, the QP of the reference image coding unit (i.e., the predicted QP of the target image coding unit) can be the QP of the preceding CU adjacent to the target image coding unit. Then, the DQP of the target image coding unit can be the difference between the QP of the target image coding unit and the QP of the preceding CU. Since the encoder knows the QP of each CU, it can determine the DQP of each CU in the image based on the QP values ​​of two adjacent CUs. Where the QP of the first CU in the image has no adjacent QP, the QP of the image (frame-level QP) can be used as the predicted QP of that CU.

[0128] In another possible implementation, the QP of the reference image coding unit (i.e., the predicted QP of the target image coding unit) can be a frame-level QP, and the DQP of the target image coding unit can be the difference between the QP of the target image coding unit and the QP of the image in which the target image coding unit is located. Since the encoder knows the QP of each CU and the QP of the image in which each CU is located, the encoder can determine the DQP of each CU based on the difference between the QP of each CU and the QP of the image in which the CU is located.

[0129] In another possible implementation, the QP of the reference image coding unit (i.e., the predicted QP of the target image coding unit) can be calculated based on a certain algorithm and the QPs of one or more CUs surrounding the target image coding unit. Since the pixels in the image are correlated, the predicted QP of the target image coding unit can be determined based on the surrounding CUs. For example, the predicted QP of the target image coding unit can be determined by the QPs of the CUs adjacent to the left and the CUs adjacent to the top of the target image coding unit. The predicted QP of the target image coding unit can be the average of the QPs of the CUs adjacent to the left and the CUs adjacent to the top. As another example, the encoder can also determine the predicted QP of the target image coding unit based on the average of the QPs of the CUs adjacent to the left and the CUs adjacent to the top; this application does not limit this. Furthermore, given the QPs of each CU and the QP of the image, the encoder can determine the DQP of the target image coding unit based on the difference between the QP of the target image coding unit and the predicted QP of the target image coding unit. If a CU at the boundary has no adjacent CU to its left or top, its QP can be determined based on the QP of an existing CU. For the first CU, the encoder can also use the QP of that image as the predicted QP for that CU.

[0130] Furthermore, after determining the DQP of the target image coding unit, the encoding end can determine the target rate-distortion coefficient of the target head coding unit according to the correlation between DQP and Lambda(λ). The target rate-distortion coefficient is the parameter used to replace the effect brought by DQP.

[0131] S402. Based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, determine the target rate-distortion coefficient corresponding to the target image coding unit.

[0132] In this embodiment, the relationship between DQP and Lambda(λ) can be built into the encoder at the encoding end. This relationship can include the correspondence between DQP and other parameters, which correspond to Lambda(λ). These other parameters can be used as intermediate parameters, corresponding to both DQP and Lambda(λ). The target rate-distortion coefficient corresponding to the target image coding unit is Lambda(λ) in the target cost function of the target image coding unit. This cost function can include the coding cost, which is mapped to the distortion value D and the number of bits R required in the coding mode. Lambda(λ) is a weight that determines the proportion of D and R in the cost function. The mathematical definition of Lambda(λ) is the negative of the derivative of D and R, which can represent the distortion reduction brought about by a unit increase in bit rate.

[0133] In the prediction process, the encoder uses a cost function to decide the coding mode for the CU. In most encoders, the value of Lambda(λ) depends on the value of QP, meaning the encoder employs a correspondence between QP and Lambda(λ). This correspondence can differ between encoders. For example, the encoder in the VVC video coding standard is the VTM encoder, and its QP-λ correspondence is shown in Equation 1:

[0134] λ = 0.57 * 2 (QP / 3) Formula 1

[0135] In Equation 1, λ is the rate-distortion coefficient, and QP is the quantization coefficient. QP can be either frame-level or CU-level QP. Since Lambda(λ) is only used by the encoder and does not need to be written into the bitstream for transmission to the decoder, it represents information that does not need to be provided to the decoder for decoding. Therefore, if only frame-level QP is transmitted, a baseline Lambda(λ) can be calculated based on Equation 1 and the frame-level QP. This baseline Lambda(λ) can be called the initial rate-distortion coefficient. A rate-distortion coefficient weight can then be determined based on the DQP. Based on the initial rate-distortion coefficient and the rate-distortion coefficient weight, the target rate-distortion coefficient can be determined. The rate-distortion coefficient weight is a parameter used to compensate for the effects of the DQP.

[0136] Specifically, the encoder can determine the relationship between DQP and rate-distortion coefficient weights, as well as the DQP of the target image coding unit (such as the difference between the QP of the target image coding unit and the predicted QP mentioned above). The relationship between DQP and rate-distortion coefficient weights can be built into the encoder or obtained by the encoder; this application does not limit this. For example, the relationship between rate-distortion coefficient weights and DQP can be as shown in Formula 2:

[0137] DLambda=2 DQP / C Formula 2

[0138] In Formula 2, DLAmbda is the rate-distortion coefficient weight, C is a constant, and the value of C can be, for example, 3-6. In this embodiment, the value of C is 4.5. The constant C determines the adjustment intensity of DLAmbda, and DQP is the quantization coefficient increment.

[0139] It should be noted that during the encoding process, in the prediction step, the selection criterion for choosing an encoding mode as the target image encoding unit from various encoding modes is a cost function. This cost function includes the mapping relationship between the encoding cost, the distortion value, and the number of bits required for encoding. The number of bits required for encoding is preceded by Lambda(λ). The cost function can be expressed as shown in Equation 3:

[0140] J=D+λ*R Formula 3

[0141] In Formula 3, J represents the encoding cost, D represents the distortion value of the current encoding mode, R represents the number of bits required for encoding, and λ represents the rate-distortion coefficient. Taking the cost function as an example, λ can be the initial rate-distortion coefficient in this embodiment. The encoding end can iterate through various encoding modes and select the encoding mode with the lowest calculated encoding cost as the encoding mode of the target image coding unit (current CU). As shown in Formula 2, in the cost function, λ determines the weighting of D and R, and its mathematical definition is the negative of the derivative of D and R, which can be used to characterize the decrease in distortion caused by the increase in unit bit rate (the amount of data in a code character). Since the cost function is a smooth continuous function, it can be assumed that the cost function is an Nth-order differentiable function. Based on this assumption, within a certain range, a linear approximation residual can be taken for the CU-level DQP. Optionally, a Taylor series expansion can also be introduced into the CU's DQP. Thus, while keeping the QP unchanged (using frame-level QP), a similar effect to DQP can be achieved through the rate-distortion coefficient weighting.

[0142] Specifically, the method for obtaining a linear approximation residual for DQP can be to obtain a cutoff function that includes a reference numerical range. This reference numerical range is the maximum allowable offset of QP, DQPmax, which can be in the range of 2-6, depending on the specific setting. Limiting DQP to a finite range can also ensure the accuracy of the linear approximation residual. If the reference numerical range is (-DQPmax, DQPmax), then the cutoff function can be as shown in Equation 4.

[0143] DQPclip = Clip(DQP, -DQPmax, DQPmax) Formula 4

[0144] In Equation 4, DQPclip is the result of the linear approximation residual of DQP, DQPmax is the maximum offset of QP, and Clip is the truncation function, which is a double-ended truncation function.

[0145] Specifically, if the DQP of the target image coding unit is greater than the maximum value of the reference value interval, then the DQP of the target image coding unit is updated to the maximum value of the reference value interval, resulting in a linear approximation residual of DQP. Similarly, if the DQP of the target image coding unit is less than the minimum value of the reference value interval, then the DQP of the target image coding unit is updated to the minimum value of the reference value interval, resulting in a linear approximation residual of DQP. For example, if the value of DQPmax is 3, then the reference value interval is (-3, 3). If DQP is 6, which is greater than the maximum value of the reference value interval, then the linear approximation residual of DQP is obtained as DQPclip = 3. Therefore, DQPclip is used as DQP to determine the rate-distortion coefficient weight, as shown in Formula 5:

[0146] DLambda=2 DQPclip / C Formula 5

[0147] In Equation 5, DLAmbda represents the rate-distortion coefficient weights, C is a constant, and DQPclip is the result of the linear approximation residual of DQP, which is used as the updated DQP to calculate the rate-distortion coefficient weights. After obtaining the rate-distortion coefficient weights, the target rate-distortion coefficient can be determined based on the initial rate-distortion coefficients and their weights. This target rate-distortion coefficient is the Lambda(λ) of the target image coding unit. Specifically, the method for determining the target rate-distortion coefficient is shown in Equation 6:

[0148] λ=λ(QP)*DLambda Formula 6

[0149] In Formula 6, λ is the target rate-distortion coefficient, λ(QP) is the reference value of Lambda(λ), which can be the Lambda(λ) calculated by the encoder according to Formula 1 (i.e., the fixed relationship between QP and λ), and DLAmbda is the rate-distortion coefficient weight, which can be the DLAmbda calculated by the encoder according to Formula 5. Thus, Formula 6 yields the target rate-distortion coefficient of the target image coding unit.

[0150] Furthermore, the encoding end can determine the target cost function based on the target rate-distortion coefficient, which is the cost function of the target image coding unit.

[0151] S403. Determine the target cost function of the target image coding unit based on the target rate-distortion coefficient.

[0152] In this embodiment, the cost function for each CU can be the cost function shown in Equation 3. Since adaptive quantization determines the QP of each CU, a Lambda(λ) can be determined for each CU, and then the cost function for each CU can be determined based on the Lambda(λ). Specifically, the target cost function for the target image coding unit is the cost function that replaces the initial rate-distortion coefficients with the target rate-distortion coefficients. That is, λ in Equation 3 is not λ(QP) in Equation 6, but λ in Equation 6. Thus, the target cost function for the target image coding unit is obtained. It can be understood that each CU can be determined in this way.

[0153] It is understandable that the target cost function is the cost function of the target image coding unit, which is only used to select the coding mode for the target image coding unit. For each CU in an image, after determining the rate-distortion coefficients of each CU, the cost function of each CU is obtained, and then the coding mode of the corresponding CU can be determined based on the cost function of each CU. The process of determining the coding mode of the CU based on the cost function at the encoding end can be called Rate-Distortion Optimized (RDO). After determining the coding mode of each CU, the coding parameters of the video can be determined based on the coding parameters indicated by the coding mode of each CU, and then transmitted.

[0154] S404. Determine the encoding mode of the target image encoding unit from multiple encoding modes based on the above objective cost function.

[0155] In the embodiments of this application, the RDO process based on the determined Lambda(λ) at the encoding end can be called RDO correction. This process can be the prediction stage of the encoding end for encoding processing. After the RDO correction process, subsequent encoding processing can be performed, such as transform processing, quantization processing, and entropy encoding processing.

[0156] Specifically, the encoder can determine the distortion value D and the number of bits R required for each encoding mode. For the number of bits required, the encoder can iterate through multiple encoding modes, such as various inter-frame coding modes and intra-frame coding modes, to determine reference encoding parameters obtained by processing the target image coding unit according to the currently iterated encoding mode. The number of code characters in these reference encoding parameters is the number of bits R required for encoding. For the distortion value D of the encoding mode, the encoder can reconstruct the target image coding unit based on the reference encoding parameters, obtaining the reconstructed image coding unit corresponding to the target image coding unit. Based on the difference between the target image coding unit (the original image of the target image coding unit) and the reconstructed image coding unit, the distortion value of the target image coding unit is determined. Therefore, the encoder can use the distortion value of the target image coding unit as D and the data volume R of the code characters in the reference encoding parameters as the input to the target cost function, i.e., substitute it into Formula 6 above to obtain the encoding cost of the currently iterated encoding mode, i.e., obtain J.

[0157] Furthermore, after the traversal is complete, the encoding end determines the encoding mode with the lowest encoding cost as the encoding mode of the target image coding unit. That is, the encoding mode corresponding to the minimum encoding cost J among all encoding modes is determined as the encoding mode of the target image coding unit. Similarly, the encoding mode can be determined for each CU in this way. After obtaining the encoding modes of each CU, subsequent encoding processing can continue, such as calculating the residual information between the original image and the constructed image unit of the CU, and performing transform processing, quantization processing, and entropy coding processing.

[0158] Please refer to the following: Figure 5 , Figure 5 This is a timing diagram illustrating a method for transmitting encoded parameters provided in an embodiment of this application. For example... Figure 5As shown, firstly, the encoder can determine the QP of each CU based on the CU-level adaptive quantization algorithm, and then determine the DQP of each CU based on the QP and the predicted QP. Further, the encoder can determine the constraint range of the DQP, which is the reference numerical range of the truncation function, used to determine the linear approximate residual of the DQP, resulting in DQPclip. Further, the encoder can determine the rate-distortion coefficient weight of each CU based on the correspondence between DQPclip and the rate-distortion coefficient weight Dlambda. After determining the rate-distortion coefficient weight of each CU, the encoder can determine the Lambda(λ) of each CU, and determine the rate-distortion coefficient of each CU based on the baseline Lambda(λ) determined based on the QP of the image in which the CU is located, thereby determining the cost function of each CU, that is, replacing the initial rate-distortion coefficient of the cost function with the determined Lambda(λ). Furthermore, the encoder can perform RDO correction based on a defined cost function, determine the encoding mode of the CU, and further perform encoding processing, such as determining residual information based on the defined encoding mode, and performing DCT transform, quantization processing, and entropy coding processing on the residual information. It can be understood that the QP of the quantization process is the QP of the image containing the CU, thus completing the encoding processing, and transmitting the entropy-coded parameters to the decoder.

[0159] In this embodiment, according to the scheme for determining the encoding parameters, for a target image encoding unit, the encoding end needs to transmit the encoding parameters indicated by the encoding mode of the target image encoding unit and the QP of the image in which the target image encoding unit is located to the decoding end. The encoding parameters indicated by the encoding mode of the target image encoding unit may include residual information and encoding mode information of the target image encoding unit. The residual information is information obtained by quantizing the difference between the target image encoding unit and the constructed image encoding unit. The constructed image encoding unit is an image encoding unit constructed based on the above-mentioned encoding mode information. The parameter for quantization is the above-mentioned predicted QP, which can be determined based on the QP of the image. That is, after receiving the encoding parameters, the decoding end can perform decoding processing based on the encoding parameters to obtain the image block corresponding to the target image encoding unit.

[0160] S405. Transmit the encoding parameters indicated by the above encoding mode and the quantization coefficients of the above image to the decoding end.

[0161] In this embodiment, the transmission process described herein is performed after encoding processing, that is, after entropy encoding of the parameters to be transmitted, transmission is performed. Here, it is only to illustrate that the transmitted content includes the encoding parameters indicated by the encoding mode and the QP of the image. Specifically, for the encoding end, the parameters to be transmitted for the target image encoding unit (0, i.e., for a CU) include the encoding parameters indicated by the encoding mode of the target image encoding unit and the QP (frame-level QP) of the image in which the target image encoding unit is located. For video, after obtaining the encoding parameters of each CU in each image frame of the video, the video encoding parameters are sent to the decoding end. The video encoding parameters include the encoding parameters of each CU in each image and the QP of each image. Therefore, the QP of some CUs can be replaced by predicted QP, which can be determined based on the frame-level QP of the image and the QP of one or more CUs preceding that CU. The frame-level QP of an image only needs to be transmitted once. The method of using rate-distortion coefficient weights to replace DQP can take advantage of the effect of the continuously differentiable function of the rate-distortion curve in the cost function to convert the DQP obtained based on the adaptive quantization algorithm into rate-distortion coefficient weights. This weights can be combined with the QP value of the CU adaptive quantization and the QP value of the image. Within a certain range, this can achieve an effect close to that of encoding based on the adaptive quantization algorithm at the encoder, while taking into account the improved compression capability brought by adaptive quantization technology and the reduction of DQP bitrate overhead.

[0162] It should be noted that since the rate-distortion coefficient weighting is only an approximation of DQP, it can reduce the codeword overhead of the encoding QP. However, its effect on improving the compression ratio should be weaker than directly using the CU's QP (DQP). Furthermore, this method allows for complete independence from directly using the CU's QP, with the encoding ends not affecting each other during the encoding process. Therefore, the encoding end can determine the size of the current CU before determining the target rate-distortion coefficient. For larger CUs, the encoding end uses the DQP method, i.e., transmitting the QP of each CU to the decoding end. For smaller CUs, it approximates the size using the rate-distortion coefficient weighting.

[0163] Specifically, before determining the rate-distortion coefficient based on DQP, the encoder can determine whether the size of the CU is less than or equal to a set size threshold. If it is less than or equal to the threshold, the encoder can determine the rate-distortion coefficient of the CU based on the correlation between the CU's QP, the quantization coefficient increment, and the rate-distortion coefficient (e.g., based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, determine the target rate-distortion coefficient corresponding to the target image coding unit). This size can be determined by the user or be a default setting by the encoder; this application does not limit this. For example, the set size threshold could be 64×64. For CUs smaller than or equal to 64×64, the rate-distortion coefficient weighting algorithm is used instead of DQP; conversely, for CUs larger than 64×64, the DQP algorithm for directly encoding the CU is used.

[0164] Please refer to the following: Figure 6 , Figure 6 This is a timing diagram illustrating another method for transmitting encoded parameters provided in an embodiment of this application, as shown below. Figure 6 As shown, firstly, the encoder can determine the QP of each CU in each image frame of the video based on the CU-level adaptive quantization algorithm, and then determine the DQP based on the CU's QP and its predicted QP. Next, the encoder can traverse each CU, determining whether the CU's size is less than or equal to a set size threshold, and select different branches based on the determination result. If it is less than or equal to, the encoder determines that the currently traversed CU will execute the Dlambda branch; otherwise, if it is greater than, the encoder determines that the currently traversed CU will execute the DQP branch.

[0165] For each CU in the Dlambda branch, the encoder can first determine the limitation range of the DQP for that CU, i.e., call the truncation function containing the reference value interval to determine the result DQPclip of the linear approximate residual of the DQP. Further, the encoder can determine the rate-distortion coefficient weight Dlambda based on the correspondence between DQPclip and the DQP and the quantization coefficient weights. Then, based on the rate-distortion coefficient weight Dlambda, the cost function of the CU is determined, and RDO correction is performed based on the determined cost to obtain the coding mode. After RDO correction, subsequent coding processing can be performed, such as determining residual information based on the result of prediction processing of the selected coding mode and performing transform and quantization processing. During quantization processing, the quantization step size can be determined based on the frame-level QP, and then entropy coding processing is performed. Therefore, for each CU in the Dlambda branch, the encoder can directly use the predicted QP without transmitting the QP of this part of the image coding unit.

[0166] For each CU in the DQP branch, the encoder does not need to perform additional processing. The QP information of each CU is used as the encoding parameter, encoded in subsequent entropy coding processing, and transmitted to the decoder. For each CU, the encoder can select the CU's encoding mode based on the cost function determined by the CU's QP, thereby determining the residual information from the prediction processing result and performing transform and quantization processing. During quantization, the corresponding quantization step size can be determined based on the QP of each CU determined by the adaptive quantization algorithm, followed by entropy coding processing. Therefore, for each CU in the DQP branch, the encoder needs to transmit the encoding parameters indicating the encoding mode, as well as the QP information of each CU, such as a reference QP. This reference QP can be the frame-level QP of the CU, and the difference between the QP of each CU and this reference QP (i.e., the DQP). It should be noted that the above description of "directly using the predicted QP" only applies to CUs with a size smaller than or equal to a set size threshold. For CUs with a size larger than the set size threshold, their QP information, i.e., the DQP of that CU, still needs to be transmitted.

[0167] For CUs smaller than or equal to a set size threshold, the Dlambda branch algorithm was used. In actual test results, the BD-Rate (Peak Signal-Noise Rate, PSNR) was -0.67%, the BDRate (Structural Similarity, SSIM) was -0.77%, and the BDRate (Video Multi-method Assessment Fusion, VMAF) was -1.19%. BD-rate represents the bitrate increase of the optimized algorithm compared to the original algorithm while maintaining the same objective video quality. PSNR is the ratio of the maximum signal power to the background noise power. SSIM is a metric for measuring the similarity between two images, determined based on the brightness and contrast of individual images in the video sequence, reflecting attributes that reflect the structure of objects in the scene. VMAF is a machine learning-based tool used to predict users' subjective perception of video quality. The three measured values ​​above indicate that the bitrate required to encode to the same PSNR / SSIM / VMAF quality using this algorithm can be reduced by 0.67% / 0.77% / 1.19%. Furthermore, during the testing, it was found that the encoding time of the encoder at the encoding end remained unchanged. Therefore, the method for determining encoding parameters provided in this application embodiment can be used in conjunction with any coding unit-level adaptive quantization algorithm to effectively improve the compression efficiency of the encoder without affecting the encoding speed.

[0168] Therefore, after the encoding end completes the encoding process of the video, it can send the video encoding parameters to the decoding end, which can then perform decoding based on the video encoding parameters.

[0169] In this embodiment, the encoder can determine the target rate-distortion coefficient of the image coding unit by obtaining the quantization coefficient increment of the image coding unit in the image, and then determine the target cost function of the image coding unit. Based on the target cost function, the encoding unit can determine the encoding mode of the image coding unit, and transmit the encoding parameters of the encoding mode and the quantization coefficient of the image to the decoder so that the decoder can perform decoding processing to obtain the image block corresponding to the image coding unit. It can be seen that, on the one hand, the encoder can reselect the encoding mode by determining the target cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient, which can ensure that the effect of adaptive quantization at the image coding unit level can be achieved based on the quantization coefficient of the image. On the other hand, for some image coding units, prediction QP can be used directly without transmitting the quantization coefficient of these image coding units, which can save the bit rate required for encoding quantization coefficients and improve the compression ratio gain at the coding unit level.

[0170] Based on the above description, please refer to Figure 7 , Figure 7 This illustration shows a flowchart of a method for transmitting encoded parameters according to an exemplary embodiment of this application. The speech processing method can be... Figure 1 In the illustrated embodiment, the video decoding device 102 performs the transmission method of the encoding parameters, which may include the following steps S701-S702:

[0171] S701: Receives encoding parameters and image quantization coefficients from the encoding end.

[0172] In one possible implementation, the encoding and decoding ends can be distributed in different electronic devices, such as the electronic device for the encoding end (e.g., ...). Figure 1 The video encoding device 101 shown and the electronic devices at the decoding end (such as...) Figure 1 The video decoding device 102 shown can be connected directly or indirectly via wired or wireless means. The electronic device at the encoding end can communicate with the electronic device at the decoding end to transmit the video encoding parameters to the decoding end.

[0173] In another possible implementation, the encoding and decoding ends can be located in the same electronic device, such as the encoding end's electronic device (e.g., Figure 1 The video encoding device 101 shown and the electronic devices at the decoding end (such as...) Figure 1The video decoding device 102 shown can be the same electronic device. This electronic device has an encoder and a decoder. The encoder is used to implement the function of the encoding end, and the decoder is used to implement the function of the decoding end. The encoder of the electronic device can transmit the video encoding parameters to the decoder.

[0174] The video coding parameters are illustrated using a single CU (Computer-In-Card) within the image sequence (image frames) of the video as an example. This CU is, for instance, a target image coding unit with a size less than or equal to a set size threshold. The target image coding unit can be any CU among multiple CUs divided in the video. The video coding parameters include the coding parameters of the target image coding unit and the QP (Quality-Plotting Point) of the image containing the target image coding unit. The residual information of the target image coding unit is obtained by quantizing the difference between the target image coding unit and the constructed image coding unit. The constructed image coding unit is an image coding unit constructed based on coding mode information. The quantization parameters are the predicted QP determined based on the QP of the image containing the target image coding unit. It should be noted that this application describes the QP as the predicted QP of the image containing the target image coding unit; that is, the QP used for quantization at the encoding end is the QP of the image.

[0175] Furthermore, the decoding end can perform decoding processing based on the encoding parameters and the QP of the image to obtain the image block corresponding to the target image encoding unit. Based on the image blocks corresponding to each CU in the video, the decoding end can obtain the decoded video.

[0176] S702. Decode the image according to the above encoding parameters and the quantization coefficients of the above image to obtain the image block corresponding to the above target image encoding unit.

[0177] In this embodiment, the encoding end performs encoding processing on the target image coding unit by first performing prediction processing based on the coding mode of the target image coding unit to obtain the constructed image coding unit. Then, residual information is determined based on the original image of the target image coding unit and the constructed image coding unit. The residual information is then further compressed, i.e., transformed, such as DCT transform, and the result of the transform is quantized. After quantization, entropy coding is performed for transmission. The decoding end performs video decoding processing in the reverse of the encoding end. The decoding end can first perform inverse quantization based on the quantized residual information, and then perform inverse transform processing based on the result of inverse quantization to obtain the residual information between the target image coding unit and the constructed image coding unit. This residual information is used to represent the difference between the target image coding unit and the constructed image coding unit. Then, the decoding end can perform prediction processing based on the coding mode to determine the constructed image coding unit. Based on the sum of the constructed image unit and the residual information, the representation information of the image block corresponding to the target image coding unit can be obtained, i.e., the image block is obtained.

[0178] Specifically, for a target image coding unit, the coding parameters include residual information and coding mode information. The residual information is obtained by quantizing the difference between the target image coding unit and the constructed image coding unit. The constructed image coding unit is an image coding unit built based on the coding mode information. The quantization parameter is the QP of the image containing the target image coding unit. Therefore, the decoder can perform inverse quantization based on the QP of the image containing the target image coding unit and the residual information. This quantization process involves dividing each element of the transform matrix by the quantization step size. Inverse quantization then involves multiplying each element of the residual information by the quantization step size, which is determined based on the QP of the image containing the target image coding unit, to obtain the target residual information.

[0179] Furthermore, the decoder can perform prediction processing based on the encoding mode information in the encoding parameters to obtain constructed image coding units (CUs), and then determine the image block corresponding to the target image coding unit based on the target residual information and the constructed CUs. Since the encoding end includes transform processing before quantization, the decoder can perform inverse transform processing on the target residual information. The decoder can know the transform processing method used by the encoding end, such as DCT transform or DFT transform processing, and can then use inverse DCT transform or inverse DFT transform processing to obtain representation information indicating the difference between the target image coding unit and the constructed CU. Then, based on this representation information of the difference between the target image coding unit and the constructed CU, and the target residual information, the image block corresponding to the target image coding unit is determined. Thus, the decoder performs decoding processing on each CU to obtain the image block corresponding to each CU, thereby obtaining the decoded video.

[0180] It should be noted that if only frame-level QPs are transmitted, the CU size is less than or equal to a set size threshold, and the dequantization processing for that CU is performed solely based on the dequantization step size determined by the frame QP. If the CU's QP information is transmitted, the CU size is greater than the set size threshold, and the dequantization processing for that CU is performed solely based on the dequantization step size determined by the CU's QP information. The decoding end differs only in the dequantization processing parameters; other processing methods are identical.

[0181] In this embodiment, the encoder can determine the target rate-distortion coefficient of the image coding unit by obtaining the quantization coefficient increment of the image coding unit in the image, and then determine the target cost function of the image coding unit. Based on the target cost function, the encoding unit can determine the encoding mode of the image coding unit, and transmit the encoding parameters of the encoding mode and the quantization coefficient of the image to the decoder so that the decoder can perform decoding processing to obtain the image block corresponding to the image coding unit. It can be seen that, on the one hand, the encoder can reselect the encoding mode by determining the target cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient, which can ensure that the effect of adaptive quantization at the image coding unit level can be achieved based on the quantization coefficient of the image. On the other hand, for some image coding units, prediction QP can be used directly without transmitting the quantization coefficient of these image coding units, which can save the bit rate required for encoding quantization coefficients and improve the compression ratio gain at the coding unit level.

[0182] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a transmission device for encoded parameters provided in an embodiment of this application. The transmission device 80 for encoded parameters in this embodiment can be disposed on an electronic device, which can be the aforementioned Figure 1The video encoding device in the image. The transmission device 80 for the above encoding parameters includes the following units:

[0183] The acquisition unit 801 is used to acquire the quantization coefficient increment of the target image coding unit in the image, wherein the target image coding unit is any one of the multiple image coding units in the image.

[0184] The determining unit 802 is used to determine the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit.

[0185] The aforementioned determining unit 802 is further configured to determine the target cost function of the target image coding unit based on the aforementioned target rate-distortion coefficient; wherein the aforementioned target cost function is a cost function for replacing the initial rate-distortion coefficient with the aforementioned target rate-distortion coefficient;

[0186] The aforementioned determining unit 802 is further configured to determine the encoding mode of the aforementioned target image encoding unit from multiple encoding modes based on the aforementioned target cost function;

[0187] The transmission unit 803 is used to transmit the encoding parameters indicated by the encoding mode and the quantization coefficients of the image to the decoding end, so that the decoding end can perform decoding processing based on the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit.

[0188] In one possible implementation, the determining unit 802 is used to determine the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit. Specifically, it is used to:

[0189] Based on the correspondence between quantization coefficients and rate-distortion coefficients, and the quantization coefficients of the aforementioned image, the initial rate-distortion coefficients of the aforementioned target image coding unit are determined.

[0190] Based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the quantization coefficient increment of the target image coding unit, the rate-distortion coefficient weight of the target image coding unit is determined.

[0191] Based on the initial rate-distortion coefficient and the rate-distortion coefficient weights mentioned above, the target rate-distortion coefficient is determined.

[0192] In one possible implementation, the determining unit 802 is used to determine the rate-distortion coefficient weight of the target image coding unit based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the quantization coefficient increment of the target image coding unit. Specifically, it is used to:

[0193] Obtain the truncation function, which includes the reference numerical range;

[0194] If the quantization coefficient increment of the target image coding unit is greater than the maximum value of the reference value range, then the quantization coefficient increment of the target image coding unit is updated to the maximum value of the reference value range.

[0195] If the quantization coefficient increment of the target image coding unit is less than the minimum value of the reference value range, then the quantization coefficient increment of the target image coding unit is updated to the minimum value of the reference value range.

[0196] Based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the updated quantization coefficient increment of the target image coding unit, the rate-distortion coefficient weight is determined.

[0197] In one possible implementation, the determining unit 802 is used to determine the encoding mode of the target image encoding unit from multiple encoding modes according to the target cost function, specifically for:

[0198] By traversing the above multiple encoding modes, the reference encoding parameters obtained by encoding the target image encoding unit according to the currently traversed encoding mode are determined.

[0199] The target image coding unit is reconstructed according to the above reference coding parameters to obtain the reconstructed image coding unit corresponding to the target image coding unit.

[0200] Based on the difference between the target image coding unit and the reconstructed image coding unit, the distortion value of the target image coding unit is determined.

[0201] The distortion value of the target image coding unit and the reference coding parameters are used as inputs to the target cost function to obtain the coding cost of the current traversed coding mode.

[0202] After the traversal is completed, the encoding mode with the lowest encoding cost is determined as the encoding mode of the target image encoding unit.

[0203] In one possible implementation, the aforementioned image refers to any image frame in the video; the aforementioned transmission unit 803 is used to transmit the encoding parameters indicated by the aforementioned encoding mode to the decoding end, specifically for:

[0204] After obtaining the encoding parameters of each image encoding unit of each image frame of the video, the encoding parameters of the video are sent to the decoding end; wherein, the encoding parameters of the video include the encoding parameters of each image encoding unit of each image frame of the video.

[0205] In one possible implementation, the above-mentioned device further includes: a triggering unit 804, configured to trigger the execution of determining the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, if the size of the target image coding unit is less than or equal to a set size threshold.

[0206] In one possible implementation, the acquisition unit 801 is used to acquire the quantization coefficient increment of the target image coding unit in the image, specifically for:

[0207] Acquire the video and divide it into multiple image encoding units;

[0208] Obtain the quantization coefficients of each image coding unit in the divided image coding units;

[0209] The quantization coefficient increment of the target image coding unit is determined based on the quantization coefficients of the target image coding unit and the quantization coefficients of the reference image coding unit in the quantization coefficients of each image coding unit.

[0210] According to one embodiment of this application, Figure 2 , Figure 4 Each step involved in the method shown can be performed by... Figure 8 The encoding parameters shown are executed by each unit in the transmission device. For example, Figure 2 Steps S201 and S401 shown are by Figure 8 The acquisition unit 801 shown is used to execute steps S202-S204 and S402-S404 by... Figure 8 The determination unit 802 shown is responsible for executing steps S205 and S405. Figure 8 The transmission unit 803 shown is used to perform this.

[0211] Please refer to the following: Figure 9 , Figure 9 This is a schematic diagram of the structure of a transmission device for encoded parameters provided in an embodiment of this application. The transmission device 90 for encoded parameters in this embodiment can be disposed on an electronic device, which can be the aforementioned Figure 1 The video decoding device in the image. The transmission device 90 for the above-mentioned encoding parameters includes the following units:

[0212] The receiving unit 901 is used to receive encoding parameters and quantization coefficients of the image from the encoding end. The encoding parameters are encoding parameters indicating the encoding mode of the target image encoding unit in the image. The target image encoding unit is any one of the multiple image encoding units divided in the image.

[0213] The decoding unit 902 is used to perform decoding processing according to the above encoding parameters and the quantization coefficients of the above image to obtain the image block corresponding to the above target image encoding unit.

[0214] In one possible implementation, the encoding parameters include residual information and encoding mode information of the target image encoding unit; the residual information is information obtained by quantization processing of the difference between the target image encoding unit and the constructed image encoding unit; the constructed image encoding unit is an image encoding unit constructed based on the encoding mode information, and the quantization processing parameters are the quantization coefficients of the image; the decoding unit 902 is used to perform decoding processing according to the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit, specifically for:

[0215] Based on the above quantization coefficients, the above residual information is inversely quantized to obtain the target residual information;

[0216] Based on the coding mode information in the above coding parameters, prediction processing is performed to obtain the above-mentioned constructed image coding unit;

[0217] Based on the target residual information and the constructed image coding unit, the image block corresponding to the target image coding unit is determined.

[0218] According to one embodiment of this application, Figure 2 , Figure 7 Each step involved in the method shown can be performed by... Figure 9 The encoding parameters shown are executed by each unit in the transmission device. For example, Figure 2 Steps S206 and S701 shown are by Figure 8 The receiving unit 901 shown is responsible for executing step S702. Figure 9 The decoding unit 902 shown is used to perform this operation.

[0219] According to another embodiment of this application, Figure 8 and Figure 9 The units in the transmission device for the encoded parameters shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the transmission device based on encoded parameters may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0220] In this embodiment, the encoding end can determine the target rate-distortion coefficient of the image coding unit by obtaining the quantization coefficient increment of the image coding unit in the image, and then determine the target cost function of the image coding unit. Based on the target cost function, the encoding unit can determine the encoding mode of the image coding unit, and transmit the encoding parameters of the encoding mode and the quantization coefficient of the image to the decoding end so that the decoding end can perform decoding processing to obtain the image block corresponding to the image coding unit. It can be seen that, on the one hand, the encoding end can reselect the encoding mode by determining the target cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient, which can ensure that the effect of adaptive quantization at the image coding unit level can be achieved based on the quantization coefficient of the image. On the other hand, transmitting only the quantization coefficient of the image, rather than the quantization coefficient of each coding unit in the image, can save the bit rate required for encoding the quantization coefficient and reduce the compression rate gain at the coding unit level.

[0221] Based on the description of the transmission method embodiment using the above-described encoding parameters, this application also discloses an electronic device; please refer to [link to relevant documentation]. Figure 10 The electronic device may include at least a processor 1001, a communication interface 1002, and a computer storage medium 1003. The processor 1001, communication interface 1002, and computer storage medium 1003 within the electronic device may be connected via a bus or other means. The electronic device may be as described above. Figure 1 Video encoding devices in the field.

[0222] The aforementioned computer storage medium 1003 is a memory device in an electronic device used to store programs and data. It is understood that the computer storage medium 1003 here can include the built-in storage medium of the electronic device, or it can include extended storage media supported by the electronic device. The computer storage medium 1003 provides storage space that stores the operating system of the electronic device. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by the processor 1001. These instructions can be one or more computer programs (including program code). It should be noted that the computer storage medium here can be a high-speed RAM memory; optionally, it can also be at least one computer storage medium located remotely from the aforementioned processor. The processor can be called a Central Processing Unit (CPU), which is the core and control center of the electronic device, suitable for implementing one or more instructions, specifically loading and executing one or more instructions to achieve the corresponding method flow or function.

[0223] In one implementation, the processor 1001 can load and execute one or more first instructions stored in the computer storage medium to implement the corresponding steps of the method in the above-described embodiment of the method for transmitting encoded parameters; specifically, the processor 1001 loads and executes one or more first instructions in the computer storage medium as follows:

[0224] Obtain the quantization coefficient increment of the target image coding unit in the image, wherein the target image coding unit is any one of the multiple image coding units in the image division.

[0225] Based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, the target rate-distortion coefficient corresponding to the target image coding unit is determined.

[0226] The target cost function of the target image coding unit is determined based on the target rate-distortion coefficient; wherein the target cost function is the cost function for replacing the initial rate-distortion coefficient with the target rate-distortion coefficient;

[0227] The coding mode of the target image coding unit is determined from multiple coding modes based on the above objective cost function;

[0228] The encoding parameters indicated by the above encoding mode and the quantization coefficients of the above image are transmitted to the decoding end, so that the decoding end performs decoding processing based on the above encoding parameters and the quantization coefficients of the above image to obtain the image block corresponding to the above target image encoding unit.

[0229] In one possible implementation, when one or more first instructions in the aforementioned computer storage medium are loaded and executed by processor 1001 to determine the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, the instruction is specifically used to perform the following operations:

[0230] Based on the correspondence between quantization coefficients and rate-distortion coefficients, and the quantization coefficients of the aforementioned image, the initial rate-distortion coefficients of the aforementioned target image coding unit are determined.

[0231] Based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the quantization coefficient increment of the target image coding unit, the rate-distortion coefficient weight of the target image coding unit is determined.

[0232] Based on the initial rate-distortion coefficient and the rate-distortion coefficient weights mentioned above, the target rate-distortion coefficient is determined.

[0233] In one possible implementation, when one or more first instructions in the aforementioned computer storage medium are loaded and executed by processor 1001 to determine the rate-distortion coefficient weight of the target image coding unit based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the quantization coefficient increment of the target image coding unit, the specific operation performed is as follows:

[0234] Obtain the truncation function, which includes the reference numerical range;

[0235] If the quantization coefficient increment of the target image coding unit is greater than the maximum value of the reference value range, then the quantization coefficient increment of the target image coding unit is updated to the maximum value of the reference value range.

[0236] If the quantization coefficient increment of the target image coding unit is less than the minimum value of the reference value range, then the quantization coefficient increment of the target image coding unit is updated to the minimum value of the reference value range.

[0237] Based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the updated quantization coefficient increment of the target image coding unit, the rate-distortion coefficient weight is determined.

[0238] In one possible implementation, when one or more first instructions in the aforementioned computer storage medium are loaded by processor 1001 and executed to determine the encoding mode of the target image encoding unit from multiple encoding modes according to the aforementioned target cost function, they are specifically used to perform the following operations:

[0239] By traversing the above multiple encoding modes, the reference encoding parameters obtained by encoding the target image encoding unit according to the currently traversed encoding mode are determined.

[0240] The target image coding unit is reconstructed according to the above reference coding parameters to obtain the reconstructed image coding unit corresponding to the target image coding unit.

[0241] Based on the difference between the target image coding unit and the reconstructed image coding unit, the distortion value of the target image coding unit is determined.

[0242] The distortion value of the target image coding unit and the reference coding parameters are used as inputs to the target cost function to obtain the coding cost of the current traversed coding mode.

[0243] After the traversal is completed, the encoding mode with the lowest encoding cost is determined as the encoding mode of the target image encoding unit.

[0244] In one possible implementation, the aforementioned image refers to any image frame in the video; when one or more first instructions in the aforementioned computer storage medium are loaded by the processor 1001 and executed to transmit the encoding parameters indicated by the aforementioned encoding mode to the decoding end, they are specifically used to perform the following operations:

[0245] After obtaining the encoding parameters of each image encoding unit of each image frame of the video, the encoding parameters of the video are sent to the decoding end; wherein, the encoding parameters of the video include the encoding parameters of each image encoding unit of each image frame of the video.

[0246] In one possible implementation, one or more first instructions in the aforementioned computer storage medium are loaded by processor 1001 and are also used to perform the following operations:

[0247] If the size of the target image coding unit is less than or equal to a set size threshold, the above-mentioned method of determining the target rate-distortion coefficient corresponding to the target image coding unit is triggered based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, as well as the quantization coefficient increment of the target image coding unit.

[0248] In one possible implementation, one or more first instructions in the aforementioned computer storage medium are loaded and executed by processor 1001 to obtain the quantization coefficient increment of the target image coding unit in the image, specifically for performing the following operations:

[0249] Acquire the video and divide it into multiple image encoding units;

[0250] Obtain the quantization coefficients of each image coding unit in the divided image coding units;

[0251] The quantization coefficient increment of the target image coding unit is determined based on the quantization coefficients of the target image coding unit and the quantization coefficients of the reference image coding unit in the quantization coefficients of each image coding unit.

[0252] The specific implementation of each step executed by the processor 1001 in the embodiments of this application can be referred to the description of the relevant content in the foregoing embodiments, and the same technical effect can be achieved. It will not be repeated here.

[0253] This application also discloses an electronic device; please refer to [link / reference needed]. Figure 11 The electronic device may include at least a processor 1101, a communication interface 1102, and a computer storage medium 1103. The processor 1101, communication interface 1102, and computer storage medium 1103 within the electronic device may be connected via a bus or other means. The electronic device may be as described above. Figure 1 Video decoding devices in the middle.

[0254] The aforementioned computer storage medium 1103 is a memory device in an electronic device used to store programs and data. It is understood that the computer storage medium 1103 here can include the built-in storage medium of the electronic device, or it can include extended storage media supported by the electronic device. The computer storage medium 1103 provides storage space that stores the operating system of the electronic device. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by the processor 1101. These instructions can be one or more computer programs (including program code). It should be noted that the computer storage medium here can be a high-speed RAM memory; optionally, it can also be at least one computer storage medium located remotely from the aforementioned processor. The processor can be called a Central Processing Unit (CPU), which is the core and control center of the electronic device, suitable for implementing one or more instructions, specifically loading and executing one or more instructions to achieve the corresponding method flow or function.

[0255] In one implementation, processor 1101 can load and execute one or more first instructions stored in the computer storage medium to implement the corresponding steps of the method in the above-described embodiment of the method for transmitting encoded parameters; specifically, one or more first instructions in the computer storage medium are loaded by processor 1101 and executed as follows:

[0256] The encoding parameters and quantization coefficients of the image are received from the encoding end. The encoding parameters are encoding parameters indicating the encoding mode of the target image encoding unit in the image. The target image encoding unit is any one of the multiple image encoding units divided in the image.

[0257] Based on the above encoding parameters and the above image quantization coefficients, the decoding process is performed to obtain the image block corresponding to the above target image encoding unit.

[0258] In one possible implementation, the encoding parameters include residual information and encoding mode information of the target image encoding unit; the residual information is information obtained by quantization processing of the difference between the target image encoding unit and the constructed image encoding unit; the constructed image encoding unit is an image encoding unit constructed based on the encoding mode information, and the quantization processing parameters are the quantization coefficients of the image; when one or more first instructions in the computer storage medium are loaded and executed by the processor 1101 to perform decoding processing according to the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit, the specific operations performed are as follows:

[0259] Based on the above quantization coefficients, the above residual information is inversely quantized to obtain the target residual information;

[0260] Based on the coding mode information in the above coding parameters, prediction processing is performed to obtain the above-mentioned constructed image coding unit;

[0261] Based on the target residual information and the constructed image coding unit, the image block corresponding to the target image coding unit is determined.

[0262] The specific implementation of each step executed by the processor 1101 in the embodiments of this application can be referred to the description of the relevant content in the foregoing embodiments, and the same technical effect can be achieved. It will not be repeated here.

[0263] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method provided in the foregoing embodiments.

[0264] This application also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the method for transmitting encoded parameters provided in the foregoing embodiments.

[0265] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0266] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0267] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that implementing all or part of the processes of the above embodiments and making equivalent changes in accordance with the claims of this application are still within the scope of the invention.

Claims

1. A method for transmitting encoded parameters, characterized in that, include: Obtain the quantization coefficient increment of a target image coding unit in the image, wherein the target image coding unit is any one of the multiple image coding units in the image. Based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, the target rate-distortion coefficient corresponding to the target image coding unit is determined; The target cost function of the target image coding unit is determined based on the target rate-distortion coefficient; wherein the target cost function is a cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient; The encoding mode of the target image encoding unit is determined from multiple encoding modes based on the target cost function; The encoding parameters indicated by the encoding mode and the quantization coefficients of the image are transmitted to the decoding end, so that the decoding end performs decoding processing based on the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit; the quantization coefficients of the image refer to the quantization parameters of the image in which the target image encoding unit is located.

2. The method according to claim 1, characterized in that, The step of determining the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit, includes: Based on the correspondence between the quantization coefficient and the rate-distortion coefficient, and the quantization coefficient of the image, the initial rate-distortion coefficient of the target image coding unit is determined; Based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the quantization coefficient increment of the target image coding unit, the rate-distortion coefficient weight of the target image coding unit is determined. The target rate distortion coefficient is determined based on the initial rate distortion coefficient and the rate distortion coefficient weight.

3. The method according to claim 2, characterized in that, The step of determining the rate-distortion coefficient weight of the target image coding unit based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the quantization coefficient increment of the target image coding unit, includes: Obtain the truncation function, which includes a reference numerical range; If the quantization coefficient increment of the target image coding unit is greater than the maximum value of the reference value range, then the quantization coefficient increment of the target image coding unit is updated to the maximum value of the reference value range. If the quantization coefficient increment of the target image coding unit is less than the minimum value of the reference value interval, then the quantization coefficient increment of the target image coding unit is updated to the minimum value of the reference value interval. The rate-distortion coefficient weight is determined based on the correspondence between the quantization coefficient increment and the rate-distortion coefficient weight, and the updated quantization coefficient increment of the target image coding unit.

4. The method according to claim 1, characterized in that, The step of determining the coding mode of the target image coding unit from multiple coding modes based on the target cost function includes: By traversing the various encoding modes, a reference encoding parameter is determined for the target image encoding unit to be encoded according to the currently traversed encoding mode. The target image coding unit is reconstructed according to the reference coding parameters to obtain the reconstructed image coding unit corresponding to the target image coding unit; The distortion value of the target image coding unit is determined based on the difference between the target image coding unit and the reconstructed image coding unit. The distortion value of the target image coding unit and the reference coding parameters are used as inputs to the target cost function to obtain the coding cost of the currently traversed coding mode; After the traversal is completed, the encoding mode with the lowest encoding cost is determined as the encoding mode of the target image encoding unit.

5. The method according to claim 1, characterized in that, The image refers to any image frame in the video; the transmission of the encoding parameters indicated by the encoding mode to the decoding end includes: After obtaining the encoding parameters of each image encoding unit of each image frame of the video, the encoding parameters of the video are sent to the decoding end; wherein, the encoding parameters of the video include the encoding parameters of each image encoding unit of each image frame of the video.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: If the size of the target image coding unit is less than or equal to a set size threshold, then the process of determining the target rate-distortion coefficient corresponding to the target image coding unit is triggered based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit.

7. The method according to any one of claims 1-3, characterized in that, The step of obtaining the quantization coefficient increment of the target image coding unit in the image includes: Acquire the video and divide the video into multiple image encoding units; Obtain the quantization coefficients of each image coding unit in the divided image coding units; The quantization coefficient increment of the target image coding unit is determined based on the quantization coefficients of the target image coding unit and the quantization coefficients of the reference image coding unit in the quantization coefficients of each image coding unit.

8. A method for transmitting encoded parameters, characterized in that, include: The system receives encoding parameters and quantization coefficients of the image from the encoding end. The encoding parameters are encoding parameters indicating the encoding mode of the target image encoding unit in the image. The target image encoding unit is any one of the multiple image encoding units divided in the image. The encoding mode is determined based on a target cost function, which is determined based on a target rate-distortion coefficient. The target rate-distortion coefficient is determined based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, as well as the quantization coefficient increment of the target image encoding unit. The target cost function is a cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient. The quantization coefficient of the image refers to the quantization parameter of the image where the target image encoding unit is located. Decoding is performed based on the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit.

9. The method according to claim 8, characterized in that, The encoding parameters include residual information and encoding mode information of the target image encoding unit; the residual information is information obtained by quantizing the difference between the target image encoding unit and the constructed image encoding unit. The constructed image coding unit is an image coding unit constructed based on the coding mode information, and the parameters of the quantization processing are the quantization coefficients of the image; The step of decoding according to the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit includes: The residual information is dequantized according to the quantization coefficient to obtain the target residual information; The image coding unit is obtained by performing prediction processing based on the coding mode information in the coding parameters; Based on the target residual information and the constructed image coding unit, the image block corresponding to the target image coding unit is determined.

10. A device for transmitting encoded parameters, characterized in that, include: The acquisition unit is used to acquire the quantization coefficient increment of a target image coding unit in the image, wherein the target image coding unit is any one of the multiple image coding units divided in the image; The determining unit is used to determine the target rate-distortion coefficient corresponding to the target image coding unit based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, and the quantization coefficient increment of the target image coding unit. The determining unit is further configured to determine the target cost function of the target image coding unit based on the target rate-distortion coefficient; wherein the target cost function is a cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient; The determining unit is further configured to determine the encoding mode of the target image encoding unit from multiple encoding modes according to the target cost function; The transmission unit is used to transmit the encoding parameters indicated by the encoding mode and the quantization coefficients of the image to the decoding end, so that the decoding end can perform decoding processing based on the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit; the quantization coefficients of the image refer to the quantization parameters of the image in which the target image encoding unit is located.

11. A device for transmitting encoded parameters, characterized in that, include: The receiving unit is used to receive encoding parameters and quantization coefficients of the image from the encoding end. The encoding parameters are encoding parameters indicated by the encoding mode of the target image encoding unit in the image. The target image encoding unit is any one of the multiple image encoding units divided in the image. The encoding mode is determined based on a target cost function, which is determined based on a target rate-distortion coefficient. The target rate-distortion coefficient is determined based on the correlation between the quantization coefficient increment and the rate-distortion coefficient, as well as the quantization coefficient increment of the target image encoding unit. The target cost function is a cost function that replaces the initial rate-distortion coefficient with the target rate-distortion coefficient. The quantization coefficient of the image refers to the quantization parameter of the image where the target image encoding unit is located. The decoding unit is used to perform decoding processing based on the encoding parameters and the quantization coefficients of the image to obtain the image block corresponding to the target image encoding unit.

12. A device for transmitting encoded parameters, characterized in that, The device includes a processor, a communication interface, and a memory, which are interconnected. The memory stores executable program code, and the processor is used to call the executable program code to implement the method for transmitting encoded parameters as described in any one of claims 1-7 or 8-9.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for transmitting encoded parameters as described in any one of claims 1-7 or 8-9.

14. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, implement the method for transmitting encoded parameters as described in any one of claims 1-7 or 8-9.

Citation Information

Patent Citations

  • Apparatuses and methods for performing video quantization rate distortion calculations

    US20150256832A1

  • Method and system of video coding with content adaptive quantization

    US20210144377A1