Video coding method and apparatus, video decoding method and apparatus, and device and medium

By generating and applying residual correction information during video encoding and decoding to correct the residual value of the current block, the problem of uneven quantization loss caused by the different correlation between the residual value and the reference area is solved, which improves the accuracy and efficiency of the reconstruction of the current block and ensures the reliability of video encoding and decoding.

WO2026026369A1PCT designated stage Publication Date: 2026-02-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/104438
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-30
Filing Date
2025-06-27
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

In existing technologies, the different correlations between the residual values ​​of the current block and the reference area lead to uneven quantization loss, which reduces the accuracy and efficiency of the current block reconstruction and results in low reliability of video encoding and decoding.

Method used

The encoder generates and sends residual correction information to correct the residual values ​​to be corrected in the current block. The decoder then corrects the residual values ​​based on the residual correction information to improve reconstruction accuracy and efficiency.

Benefits of technology

By applying residual correction information, the uneven quantization loss phenomenon is avoided, the accuracy and efficiency of current block reconstruction are improved, and the reliability of video encoding and decoding is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025104438_05022026_PF_FP_ABST
    Figure CN2025104438_05022026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a video coding method and apparatus, a video decoding method and apparatus, and a device and a medium. The video decoding method comprises: acquiring, from a bitstream, residual correction information corresponding to a current block, wherein the current block is an intra-coded image block in the bitstream; decoding the residual correction information to obtain a correction value; using the correction value to correct at least one residual value of the current block, so as to obtain a corrected residual value; and on the basis of the corrected residual value, reconstructing the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video coding method, device, apparatus and medium

[0001] This application claims priority to the Chinese patent application No. 202411031303.X, filed on July 30, 2024, and entitled "Video coding method, device, apparatus and medium", the entire content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of video processing, in particular to a video coding method, a video coding device, an electronic device, and a computer readable medium.

[0003] BACKGROUND

[0004] In order to adapt to large-scale data transmission of video data, it is usually necessary to perform encoding processing on the original video data at the data sending end to form a compressed data code stream, and then perform decoding on the data code stream after transmitting the data code stream to the data receiving end to obtain the predicted reconstructed video data. SUMMARY

[0005] Embodiments of the present application provide a video coding method, a video coding device, an electronic device, a computer readable storage medium, and a computer program product, which can improve the accuracy and efficiency of current block reconstruction, and the reliability of video coding is high.

[0006] The embodiments of the present application provide a video decoding method, which comprises: obtaining residual correction information corresponding to a current block from a code stream, the current block being an image block in the code stream that has been intra-coded; decoding the residual correction information into a correction value; correcting at least one residual value of the current block using the correction value to obtain a corrected residual value; and reconstructing the current block based on the corrected residual value.

[0007] The embodiments of the present application also provide a video encoding method, which comprises: in response to determining that a prediction coding mode corresponding to a current block to be encoded in a video image is intra prediction, generating a correction value corresponding to the current block; encoding the correction value into residual correction information; and encoding the residual information into an encoded video code stream corresponding to the video image.

[0008] The embodiment of the present application provides a video decoding device, the device comprises: an acquisition module configured to acquire residual correction information corresponding to a current block from a code stream, the current block being an image block in the code stream which is intra-coded; a decoding module configured to decode the residual correction information into a correction value; a correction module configured to correct at least one residual value of the current block by using the correction value to obtain a corrected residual value; and a reconstruction module configured to reconstruct the current block based on the corrected residual value.

[0009] The embodiment of the present application also provides a video encoding device, the device comprises: a generation module configured to generate a correction value corresponding to a current block to be encoded in a video image in response to determining that a prediction coding mode corresponding to the current block is intra prediction; an encoding module configured to encode the correction value into residual correction information; and a code stream generation module configured to encode the residual information into an encoded video code stream corresponding to the video image.

[0010] The embodiment of the present application also provides an electronic device, comprising: one or more processors; a memory configured to store one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the video coding method of each embodiment.

[0011] The embodiment of the present application also provides a computer readable storage medium, and a video code stream is stored on the computer readable storage medium, the video code stream is decoded by the video decoding method of each embodiment, or is generated by the encoding method of each embodiment.

[0012] The embodiment of the present application provides a computer program product, comprising a computer program, when the computer program is executed by a processor, the video coding method of each embodiment is implemented.

[0013] The embodiment of the present application corrects some residual values of the current block, and reconstructs the current block by using the corrected residual values, thereby avoiding the phenomenon that the quantization loss is not uniform due to the different correlation between the residual values and the reference region, so that the accuracy and efficiency of the current block reconstruction are higher, that is, the accuracy and efficiency of the current block reconstruction are improved, and the reliability of the video coding is high.

[0014] BRIEF DESCRIPTION OF DRAWINGS

[0015] Fig. 1 shows a system architecture schematic diagram to which the technical solution of the embodiment of the present application can be applied;

[0016] Fig. 2 shows a placement mode of an exemplary video encoding device and video decoding device in a streaming environment;

[0017] Fig. 3 shows a basic flowchart of an encoding process performed by an exemplary video encoder;

[0018] FIG. 4 shows a diagram of an example intra-prediction-derived residual value;

[0019] FIG. 5 shows a flowchart of an example video decoding method;

[0020] FIG. 6 shows a flowchart of another example video decoding method;

[0021] FIG. 7A shows a diagram of an example pre-corrected residual value;

[0022] FIG. 7B shows a diagram of an example post-corrected residual value;

[0023] FIG. 8 shows a flowchart of another example video decoding method;

[0024] FIG. 9 shows a diagram of an example image block encoding order;

[0025] FIG. 10A shows a diagram of an example correction;

[0026] FIG. 10B shows a diagram of another example correction;

[0027] FIG. 10C shows a diagram of another example correction;

[0028] FIG. 11 shows a flowchart of another example video decoding method;

[0029] FIG. 12 shows a flowchart of an example video encoding method;

[0030] FIG. 13 shows a flowchart of another example video encoding method;

[0031] FIG. 14 shows a block diagram of an example video decoding apparatus;

[0032] FIG. 15 shows a block diagram of an example video encoding apparatus;

[0033] FIG. 16 shows a structural diagram of a computer system of an electronic device suitable for implementing embodiments of the present application.

[0034] Manner of implementing the present application

[0035] The example embodiments will be described in detail herein below with reference to the drawings. In the following description, the same numbers are used to denote the same elements, and the description of the same elements is not repeated. The embodiments described in the following example embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims.

[0036] The block diagrams illustrated in the drawings are merely functional entities, and do not necessarily have to correspond to physically independent entities. That is, the functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0037] The flowcharts illustrated in the drawings are merely exemplary illustrations, and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further decomposed, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to actual conditions.

[0038] In the present application, "multiple" refers to two or more. "And / or" describes the association between the associated objects, indicating that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.

[0039] The terms "first", "second", "third", and "fourth" and the like in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not used to describe a specific order. The terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.

[0040] "Embodiments of the present application" hereinafter refers to various embodiments of the present application, including all embodiments explicitly described in the specification and claims, and all embodiments that can be derived without doubt from these descriptions.

[0041] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.

[0042] In order to facilitate understanding of the technical solutions proposed in the embodiments of the present application, first, the video coding process is introduced.

[0043] Video coding generally refers to the processing of a sequence of pictures forming a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" can be used synonymously. Video coding as used in the embodiments of the present application means video encoding or video decoding. Video coding is performed at the source side, typically including processing (e.g., by compression) of original video images to reduce the amount of data needed to represent that video image, for more efficient storage and / or transmission. Video decoding is performed at the destination side, typically including inverse processing with respect to the encoder, to reconstruct the video images. Embodiments relating to the "coding" of video frames are to be understood as relating to the "encoding" or "decoding" of a sequence of video images. The combination of the encoding part and the decoding part is also referred to as coding (encoding and decoding).

[0044] Each image in a sequence of video images is typically partitioned into a set of non-overlapping blocks, which are typically encoded at the block level. In other words, the encoder side typically processes, i.e., encodes, video at the block (also referred to as image block, or video block) level, e.g., by generating a prediction block through spatial (intra-image) and temporal (inter-image) prediction, subtracting the prediction block from a current block (block currently processed or to be processed) to obtain a residual block, transforming the residual block in a transform domain and quantizing the residual block to reduce the amount of data to be transmitted (compressed). The decoder side applies inverse processes of the encoder processes to an encoded or compressed block to reconstruct the current block. In addition, the encoder replicates the processing loop of the decoder, such that the encoder and the decoder generate the same predictions (e.g., intra and inter predictions) and / or reconstructions for processing, i.e., encoding, a subsequent block.

[0045] The term "block" is a portion of an image or frame. In the embodiments of the present application, a current block refers to a block currently processed. For example, in encoding, it refers to a block currently encoded; in decoding, it refers to a block currently decoded.

[0046] FIG. 1 illustrates a system architecture diagram to which the technical solutions of the embodiments of the present application can be applied. As shown in FIG. 1, the system architecture 100 includes a plurality of terminal devices which can communicate with each other via, for example, a network 150. For instance, the system architecture 100 can include a first terminal device 110 and a second terminal device 120 interconnected via the network 150. In the embodiment of FIG. 1, the first terminal device 110 and the second terminal device 120 perform one-way data transmission.

[0047] For example, the first terminal device 110 can encode video data, such as a stream of video pictures that are captured by the terminal device 110, for transmission to the second terminal device 120 by the network 150. The encoded video data can be transmitted in the form of one or more coded video bitstreams. The second terminal device 120 can receive the encoded video data from the network 150, decode the encoded video data to recover the video pictures, and display video pictures according to the recovered video data.

[0048] In embodiments of the application, the system architecture 100 can include a third terminal device 130 and a fourth terminal device 140 that perform bidirectional transmission of encoded video data, which can occur, for example, during a video conference. For bidirectional transmission of data, each terminal device of the third and fourth terminal devices 130, 140 can code video data, such as a stream of video pictures that are captured by the terminal device, for transmission to the other terminal device of the third and fourth terminal devices 130, 140 by the network 150. Each terminal device of the third and fourth terminal devices 130, 140 also can receive encoded video data transmitted by the other terminal device of the third and fourth terminal devices 130, 140, and can decode the encoded video data to recover the video pictures, and can display video pictures according to the recovered video data on an accessible display.

[0049] In the example of FIG. 1, the first, second, third and fourth terminal devices 110, 120, 130, 140 can be servers, personal computers and smartphones, but the principles of the present application can not be limited thereto. Embodiments of the present application find application with laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. The network 150 represents any number of networks that convey encoded video data among the first, second, third and fourth terminal devices 110, 120, 130, 140, including for example wire- line and / or wireless communication networks. The network 150 can exchange data in circuit- switched and / or packet-switched channels. The network 150 can include telecommunication networks, local area and / or wide area networks, and / or the Internet. For the purposes of the present application, the architecture and topology of the network 150 can be immaterial to the operation of the disclosed subject matter unless explained herein below.

[0050] FIG. 2 shows the placement of video encoding and video decoding devices in a streaming environment. The disclosed subject matter can be equally applicable to other video enabled applications, including, for example, video conferencing, digital television, storing of compressed video on digital media including CD, DVD, memory stick and the like.

[0051] A streaming system can include a capture subsystem 213, that can include a video source 201, for example a digital camera, creating a stream of video pictures 202 that are uncompressed. In an embodiment, the stream of video pictures 202 includes samples as they are taken by the digital camera. In contrast to encoded video data 204 (or coded video bitstreams 204), the stream of video pictures 202 is depicted as a bold line to emphasize the high data volume of the stream of video pictures 202 that can be processed by the electronic device 220, which includes a video encoding device 203 coupled to the video source 201. The video encoding device 203 can include hardware, software, or a combination thereof to enable or implement aspects of the disclosed subject matter as described in more detail below. In contrast to the stream of video pictures 202, the encoded video data 204 (or coded video bitstream 204) is depicted as a thin line to emphasize the lower data volume of the encoded video data 204 (or coded video bitstream 204) that can be stored on a streaming server 205 for future use. One or more streaming client subsystems, such as client subsystem 206 and client subsystem 208 in FIG. 2, can access the streaming server 205 to retrieve copies 207 and 209, respectively, of the encoded video data 204. The client subsystem 206 can include a video decoding device 210, for example, in an electronic device 230. The video decoding device 210 decodes the incoming copy 207 of encoded video data and creates an outgoing stream of video pictures 211 that can be rendered on a display 212, such as a display screen, or other rendering device. In some streaming systems, the encoded video data 204, 207, and 209 (e.g., video bitstreams) can be encoded according to certain video

[0052] It is expressly contemplated that the electronic devices 220 and 230 can include other components not shown in the figures. For example, the electronic device 220 can include a video decoding device, and the electronic device 230 can include a video encoding device as well.

[0053] In an embodiment of the present application, taking the international video coding standards HEVC (High Efficiency Video Coding, H.265), VVC (Versatile Video Coding, H.266), and the Chinese national video coding standard AVS (Audio Video Coding Standard) as examples, after an input of a video frame image, the video frame image is divided into a plurality of non-overlapping processing units according to a block size, and each processing unit will perform similar compression operations. This processing unit is referred to as a CTU (Coding Tree Unit, coding tree unit), or referred to as an LCU (Largest Coding Unit, largest coding unit). The CTU can be further divided into one or more basic coding units CU, which is the most basic element in the coding link.

[0054] FIG. 3 shows a basic flowchart of the encoding process performed by the video encoder, in which intra prediction is taken as an example for illustration.

[0055] wherein the original image signal s k [x,y] and the prediction image signal Difference value operation is performed to obtain a residual signal u k [x,y]. The residual signal u k [x,y] is obtained after transformation and quantization processing. The quantized coefficient is used to obtain the encoded bit stream through entropy coding on one hand, and is used to obtain the reconstructed residual signal u′ k [x,y] through inverse quantization and inverse transformation processing on the other hand. The prediction image signal is superimposed with the reconstructed residual signal u′ k [x,y] to generate the image signal The image signal is input to the intra mode decision module and the intra prediction module for intra prediction processing on one hand, and is output as the reconstructed image signal s′ k [x,y] through loop filtering on the other hand. k [x,y] can be used as a reference image for motion estimation and motion compensation prediction for the next frame. Then, based on the result s′ r [x+m x ,y+m y ] of the motion compensation prediction, the prediction image signal of the next frame is obtained. The above process is repeated until the encoding is completed.

[0056] The encoding operation for each CU involved in the above video encoding process is described in detail as follows.

[0057] Predictive Coding: Predictive coding includes intra prediction and inter prediction, etc. After the original video signal is predicted by the selected reconstructed video signal, a residual video signal is obtained. The encoding end needs to determine which prediction coding mode is selected for the current CU and inform the decoding end. Intra prediction (Intra Prediction) refers to the predicted signal coming from the already encoded and reconstructed region within the same image; Inter prediction (Inter Prediction) refers to the predicted signal coming from other images (referred to as reference images) that have been encoded and different from the current image.

[0058] Transform&Quantization: After the residual video signal is subjected to Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT) and other transform operations, the signal is converted into the transform domain, referred to as transform coefficients. The transform coefficients are further subjected to lossy quantization operation, losing certain information, so that the quantized signal is conducive to compressed expression. In some video coding standards, more than one transform method can be selected, so the encoding end also needs to select one of the transform methods for the current CU and inform the decoding end. The quantization precision is usually determined by the quantization parameter (Quantization Parameter, QP). A larger QP value indicates that coefficients with a larger value range will be quantized to the same output, so it usually brings greater distortion and lower code rate. Conversely, a smaller QP value indicates that coefficients with a smaller value range will be quantized to the same output, so it usually brings smaller distortion and corresponds to higher code rate.

[0059] Entropy Coding or Statistical Coding: The quantized transform domain signal will be statistically compressed and coded according to the frequency of each value, and finally output the binary (0 or 1) compressed code stream. At the same time, other information generated by encoding, such as the selected encoding mode, motion vector data, etc., also needs to be entropy coded to reduce the code rate. Statistical coding is a lossless coding method that can effectively reduce the code rate required to express the same signal. Common statistical coding methods include variable length coding (Variable Length Coding, VLC) or context-based adaptive binary arithmetic coding (Content Adaptive Binary Arithmetic Coding, CABAC).

[0060] Context-based adaptive binary arithmetic coding (CABAC) process mainly contains three steps: binarization, context modeling and binary arithmetic coding. After the input syntax elements are binarized, the binary data can be encoded by regular coding mode and bypass coding mode. Bypass coding mode, which does not need to assign a specific probability model for each binary bit, directly encodes the input binary bit bin value with a simple bypass encoder to speed up the entire encoding and decoding speed. Generally, different syntax elements are not completely independent, and the same syntax element itself also has certain memory. Therefore, according to the conditional entropy theory, using other coded syntax elements for conditional coding can further improve the coding performance compared with independent coding or non-memory coding. These coded symbol information used as conditions are called contexts. In the regular coding mode, the binary bits of the syntax elements enter the context modeler in order. The encoder assigns an appropriate probability model for each input binary bit according to the value of the previously coded syntax element or binary bit. This process is called context modeling. The context model corresponding to the syntax element can be located through the context index increment (ctxIdxInc) and the context index start (ctxIdxStart). After the bin value and the assigned probability model are sent to the binary arithmetic encoder for coding, the context model needs to be updated according to the bin value, that is, the adaptive process in coding.

[0061] Loop filtering: The signal after transformation and quantization will obtain the reconstructed image through the operation of inverse quantization, inverse transformation and prediction compensation. Compared with the original image, the reconstructed image will be different due to the influence of quantization, that is, the reconstructed image will produce distortion. Therefore, the reconstructed image can be filtered, for example, the deblocking filter (DB), the sample adaptive offset (SAO) or the adaptive loop filter (ALF) filter, which can effectively reduce the distortion degree caused by quantization. Since these filtered reconstructed images will be used as references for subsequent encoded images to predict future image signals, the above filtering operation is also called loop filtering, that is, the filtering operation within the coding loop.

[0062] Based on the above encoding process, at the decoding end, for each CU, after obtaining the compressed code stream (i.e. bit stream), entropy decoding is performed to obtain various mode information and quantized coefficients. Then the quantized coefficients are subjected to inverse quantization and inverse transform processing to obtain a residual signal. On the other hand, according to the known encoding mode information, a prediction signal corresponding to the CU can be obtained, and then the residual signal is added to the prediction signal to obtain a reconstructed signal. The reconstructed signal is then subjected to loop filtering and other operations to generate a final output signal.

[0063] In the related art, the correlation between the predicted residual values of the current block and the reference region can be different. Generally, when the original value (i.e. original pixel value) position of the current block is closer to the reference region, the correlation between the predicted residual value and the reference region is higher. When the original value position of the current block is farther away from the reference region, the correlation between the predicted residual value and the reference region is lower. This leads to non-uniform distribution of the loss caused by quantization, thereby reducing the accuracy and efficiency of the reconstruction of the current block, and the reliability of video coding and decoding is low.

[0064] As shown in FIG. 4, the current block is the shaded area, and the reference region is the image region above and to the left of the current block. The image region above and to the left of the current block is closer to the reference region, and the absolute value of the residual generated by prediction is relatively small. The image region below and to the right of the current block is farther away from the reference region, and the absolute value of the residual generated by prediction is relatively large (the maximum is 4 in the lower right corner). In the subsequent quantization process, the loss for the image region above and to the left of the current block is small, and the loss for the image region below and to the right of the current block is large.

[0065] Therefore, in order to improve the accuracy and efficiency of the reconstruction of the current block and ensure the reliability of video coding and decoding, the present application provides a video coding and decoding scheme. The encoding end can obtain a prediction encoding mode corresponding to the current block, and the current block is an image block to be decoded in the current video frame. If the prediction encoding mode is intra prediction, residual correction information corresponding to the current block is generated, and the residual correction information corresponding to the current block is sent to the decoding end. Correspondingly, the decoding end receives the residual correction information corresponding to the current block, determines the residual value to be corrected corresponding to the current block, and then corrects the residual value to be corrected according to the residual correction information to obtain a corrected residual value. Then the reconstructed value of the current block is obtained according to the corrected residual value.

[0066] In this way, by implementing the present application, when it is detected that the current block is intra predicted, the residual correction information corresponding to the current block is generated, and the residual value to be corrected corresponding to the current block is corrected using the residual correction information. This avoids the phenomenon of non-uniform loss caused by quantization due to different correlations between the residual value and the reference region, improves the accuracy and efficiency of the reconstruction of the current block, and the reliability of video coding and decoding is high.

[0067] FIG. 5 shows a flowchart of a video decoding method according to an embodiment of the present application. The video decoding method can be performed by an electronic device, such as a terminal device or a server that transmits or receives video coding data. Embodiments of the present application are described by taking a method performed by a terminal device as an example. The terminal device can be, for example, the video decoding apparatus 210 or the video encoding apparatus 203 shown in FIG. 2. As shown in FIG. 5, the video decoding method includes at least S510 to S540.

[0068] S510, obtaining residual modification information corresponding to a current block from a bitstream.

[0069] The current block is an image block in a current video frame that is intra-coded, and the residual modification information is generated by an encoding end and encoded into a video bitstream corresponding to the current video frame when a prediction coding mode corresponding to the current block is intra prediction.

[0070] In embodiments of the present application, an image block refers to a basic unit for decoding processing, including but not limited to at least one of a coding unit, a luma coding unit, a chroma coding unit, a coding block, a luma coding block, a chroma coding block, a prediction unit, a luma prediction unit, a chroma prediction unit, a luma prediction block, and a chroma prediction block.

[0071] In embodiments of the present application, the residual modification information is used to modify a residual value to be modified corresponding to the current block, and a reconstructed value of the current block is obtained according to the modified residual value. In other words, the residual modification information is used to modify the residual value to be modified corresponding to the current block, and the current block is reconstructed according to the modified residual value. The reconstructed current block can be performed by a decoding end or an encoding end (such as a local decoder in an encoder). Meanwhile, the residual modification information can be generated by an encoding end when a prediction coding mode corresponding to the current block is intra prediction. For details of the generation process of the residual modification information, please refer to the following description.

[0072] S520, determining a residual value to be modified corresponding to the current block.

[0073] Not all residual values in the current block need to be adjusted. In embodiments of the present application, after the residual modification information corresponding to the current block is obtained, the residual value to be modified can be determined from the current block.

[0074] In embodiments of the present application, the residual value to be modified refers to a residual value that needs to be modified, and there can be one or more residual values to be modified.

[0075] S522, decoding a modification value from the residual modification information.

[0076] In the embodiments of the present application, the residual correction information in the code stream is not the correction value itself used to correct the residual value, but the result of the correction value after encoding. The residual correction information needs to be decoded to recover the actual correction value. The encoding method used by the correction value can be any feasible mapping method or encoding algorithm, which reduces the data amount of the encoded correction value to reduce the data amount of the video code stream and improve the transmission efficiency.

[0077] In the embodiments of the present application, when the correction value is decoded from the residual correction information, a bit string can be decoded from the residual correction information; and the value corresponding to the bit string in the preset mapping relationship is determined. In some embodiments, the value corresponding to the bit string in the preset mapping relationship is the correction value. In other embodiments, when the sign and the absolute value of the correction value are encoded respectively, the value corresponding to the bit string in the preset mapping relationship can be determined as the absolute value of the correction value.

[0078] In the embodiments of the present application, the sign and the absolute value of the correction value can be encoded and transmitted respectively. When the residual correction information is decoded, the sign of the correction value can be decoded from the sign information in the residual correction information; and the absolute value of the correction value can be decoded from the value information in the residual correction information. For example, a bit string can be decoded from the value information in the residual correction information, and the value corresponding to the bit string is determined as the absolute value of the correction value.

[0079] In the embodiments of the present application, the bit string corresponding to the correction value can be encoded by using a context-based encoding algorithm to further reduce the number of bits required to transmit the correction value. When the bit string is decoded from the residual correction information, context information can be generated by using the bit string corresponding to the adjustment value of at least one previously decoded block; and the bit string can be decoded from the residual correction information by using a preset context-based encoding algorithm based on the context information.

[0080] S530, at least one residual value of the current block is corrected by using the correction value to obtain a corrected residual value.

[0081] In this step, the residual value to be corrected is corrected according to the residual correction information to obtain a corrected residual value.

[0082] In the embodiments of the present application, the residual value to be corrected corresponding to the current block is determined, and then the residual value to be corrected is corrected by using the residual correction information to obtain a corrected residual value.

[0083] In the embodiments of the present application, one correction value can be decoded from the code stream, and a plurality of different correction values can be derived by a preset manner, which are used to correct the residual values corresponding to different positions in the current block. For example, the residual value corresponding to a first preset position in the current block can be corrected by using the correction value; a plurality of second correction values corresponding to a plurality of second preset positions in the current block can be derived by using the correction value, and the residual values corresponding to the plurality of second preset positions can be corrected by using the plurality of second correction values.

[0084] In the embodiments of the present application, the manner of deriving the plurality of second correction values by using the correction value can be that the product of the correction value and the correction coefficient corresponding to each of the plurality of second preset positions is calculated as a second correction value.

[0085] In some embodiments, the correction coefficient can be pre-stored in an accessible storage device, and the pre-stored correction coefficient can be acquired when the second correction value is generated.

[0086] In some embodiments, the correction coefficient can be determined by an encoding device and encoded into a code stream. The correction coefficient can be decoded from the code stream when the second correction value is generated.

[0087] When the intra prediction mode is used and the quantization step is large (corresponding to a large quantization parameter), the loss caused by quantization at each position in the current block is related to the distance between the position and the reference region. In the embodiments of the present application, the correction coefficient corresponding to the second preset position is positively correlated with the distance between the second preset position and the reference region, and the reference region is a decoded image region used for intra prediction of the current block. In this way, according to the difference in distance between each position in the current block and the reference region, different correction coefficients are set, and the second correction values corresponding to each position are derived, so that the residual values of different positions can be corrected in a targeted manner, the distortion caused by quantization can be reduced, the reconstructed image is more natural in vision, and the accuracy of video decoding is improved.

[0088] In some embodiments, the absolute value of the corrected residual value is smaller than the absolute value of the uncorrected residual value. For example, the uncorrected residual value is R, and the corrected residual value R' is obtained by correcting the residual value R to be corrected according to the residual correction information, and |R'|<|R| at this time.

[0089] In this way, the residual value participating in the reconstruction of the current block is smaller, and the accuracy and efficiency of the reconstruction of the current block are higher, so that the accuracy and efficiency of decoding are improved.

[0090] In the embodiments of the present application, if the plurality of residual values to be corrected include a plurality of residual values, the distribution consistency of the plurality of corrected residual values is greater than the distribution consistency of the plurality of residual values before correction. For example, the distribution consistency of the plurality of residual values before correction is Rc, the plurality of residual values to be corrected are corrected according to the residual correction information to obtain the plurality of corrected residual values, and the distribution consistency of the plurality of corrected residual values is Rc', and at this time Rc'> Rc. It can be understood that the distribution consistency is directly proportional to the regularity, that is, the higher the distribution consistency, the higher the regularity, and vice versa, the lower the distribution consistency, the lower the regularity.

[0091] In this way, the residual value distribution consistency participating in the current block reconstruction is higher, the accuracy and efficiency of the current block reconstruction are higher, and thus the accuracy and efficiency of the decoding are improved.

[0092] S540, reconstructing the current block by using the corrected residual value, that is, obtaining the reconstructed value of the current block.

[0093] In the embodiments of the present application, the corrected residual value is obtained, and then the reconstructed value of the current block can be obtained by using the corrected residual value to realize the reconstruction of the current block.

[0094] In the embodiments of the present application, the process of obtaining the reconstructed value of the current block according to the corrected residual value in S540 can include:

[0095] Obtaining the prediction value of the current block;

[0096] According to the prediction value and the corrected residual value, the reconstructed value of the current block is calculated.

[0097] That is, the prediction value of the current block and the corrected residual value are used to calculate the reconstructed value of the current block.

[0098] For example, Pred(i,j) represents the prediction value of the position (i,j) in the current block, Res(i,j) represents the residual value of the position (i,j) in the current block after inverse transformation, and Adj represents the correction value, then the reconstructed value Rec(i,j) of the position (i,j) in the current block is Rec(i,j)=Pred(i,j)+Res(i,j)+Adj.

[0099] In this way, the reconstructed value of each position in the current block can be obtained simply and accurately.

[0100] In the embodiments of the present application, the residual value to be corrected corresponding to the current block is corrected by using the residual correction information, the phenomenon of uneven quantization loss caused by different correlations between the residual value and the reference region is avoided, the accuracy and efficiency of the current block reconstruction are improved, and the reliability of the video coding and decoding is high.

[0101] In the embodiments of the present application, another video decoding method is provided. The video decoding method can be executed by an electronic device, for example, a terminal device or a server that transmits or receives video coding data. The embodiments of the present application take the method executed by a terminal device as an example for illustration. The terminal device can be, for example, the video decoding apparatus 210 or the video encoding apparatus 203 shown in FIG. 2. As shown in FIG. 6, the video decoding method at least includes S610-S620, S510, S522, S530-S540.

[0102] S610, a to-be-corrected region is selected from the current block. The to-be-corrected region is agreed by the encoding end and the decoding end, and the to-be-corrected region includes at least one of the image region below in the current block and the image region right in the current block.

[0103] In the embodiments of the present application, the to-be-corrected region refers to the image region that needs to be corrected in residual value, and the to-be-corrected region is agreed by the encoding end and the decoding end.

[0104] As introduced in the foregoing embodiments, the image region above and left in the current block is relatively close to the reference region, and the absolute value of the residual generated by prediction is relatively small, while the image region below and right in the current block is relatively far from the reference region, and the absolute value of the residual generated by prediction is relatively large. Therefore, the to-be-corrected region in each embodiment can be the image region below and / or right in the current block. As shown in FIG. 7A, the to-be-corrected region is the image region below and right in the current block shown by the dashed box.

[0105] S620, a to-be-corrected residual value is determined from the plurality of residual values contained in the to-be-corrected region.

[0106] In the embodiments of the present application, the to-be-corrected region is selected from the current block, and then the to-be-corrected residual value can be determined from the plurality of residual values contained in the to-be-corrected region.

[0107] In the embodiments of the present application, the process of determining the to-be-corrected residual value from the plurality of residual values contained in the to-be-corrected region in S620 can include:

[0108] selecting a non-zero residual value from the plurality of residual values contained in the to-be-corrected region;

[0109] taking the non-zero residual value as the to-be-corrected residual value.

[0110] That is, a non-zero residual value is selected from the plurality of residual values contained in the to-be-corrected region, and at this time the non-zero residual value is the to-be-corrected residual value. As shown in FIG. 7A, the residual values 1, 2, 4, -2, -1 in the image region below and right in the current block shown by the dashed box are the to-be-corrected residual values.

[0111] In this way, the residual value to be corrected in the region to be corrected is the non-zero residual value, and the phenomenon of correcting the zero residual value is avoided, and the accuracy of the residual value correction is improved.

[0112] It should be noted that the detailed description of S510, S522, S530 to S540 in FIG. 6 can refer to S510, S522, S530 to S540 in FIG. 5, which will not be repeated here.

[0113] In the embodiment of the present application, the residual value to be corrected is obtained simply and accurately by selecting the region to be corrected from the current block and determining the residual value to be corrected from the plurality of residual values contained in the region to be corrected, thereby providing strong support for the correction of the residual value.

[0114] In an embodiment of the present application, another video decoding method is provided. The video decoding method can be executed by an electronic device, such as a terminal device or a server that transmits or receives video encoding data. The embodiment of the present application takes the method executed by the terminal device as an example for description. The terminal device can be, for example, the video decoding apparatus 210 or the video encoding apparatus 203 shown in FIG. 2. As shown in FIG. 8, the video decoding method at least includes S810 to S820, S510 to S520, and S540.

[0115] S810, extracting a correction coding result from the residual correction information, and decoding the correction coding result to obtain a correction value.

[0116] In the embodiment of the present application, the residual correction information corresponding to the current block is obtained, and then the correction coding result can be extracted from the residual correction information, wherein the correction coding result can be one or more, and the correction coding result is decoded to obtain the correction value.

[0117] In the embodiment of the present application, the correction value includes a correction sign and a correction absolute value. The correction sign is positive or negative, and the correction absolute value is usually an integer, and the value range of the correction absolute value can be [0, N]. For example, the correction coding result can be obtained by using M bits to perform fixed-length coding on the correction absolute value, such as N = 2 M .

[0118] In the embodiment of the present application, the extracted correction coding result is multiple. Correspondingly, the process of decoding the correction coding result to obtain the correction value in S810 can include:

[0119] Obtaining a mapping relationship between the correction value and the correction coding result, wherein the mapping relationship between the correction value and the correction coding result includes a plurality of correction values and correction coding results corresponding to the plurality of correction values, and the coding length of the correction coding result corresponding to different correction values is different.

[0120] According to the mapping relationship between the correction value and the correction coding result, the correction value corresponding to each of the extracted correction coding results is obtained.

[0121] That is, after the multiple correction coding results are extracted, the mapping relationship between the correction value and the correction coding result can be obtained, and the correction value corresponding to each of the correction coding results is obtained by querying the mapping relationship between the correction value and the correction coding result.

[0122] The mapping relationship between the correction value and the correction coding result stored in the specified storage area of the decoding end is obtained by the encoding end and the decoding end.

[0123] The mapping relationship between the correction value and the correction coding result includes multiple correction values and correction coding results corresponding to the multiple correction values, and the coding length of the correction coding result corresponding to different correction values is different. The correction value includes a correction sign and a correction absolute value, and the mapping relationship between the correction value and the correction coding result can be a mapping relationship between the correction absolute value and the correction coding result (i.e., the value information in the residual correction information described above), that is, the mapping relationship between the correction absolute value and the correction coding result includes multiple correction absolute values and correction coding results corresponding to the multiple correction absolute values, and the coding length of the correction coding result corresponding to different correction absolute values is different.

[0124] As shown in Table 1, an example table of the mapping relationship between the correction absolute value and the correction coding result is shown.

[0125] Table 1

[0126] It should be noted that in actual applications, the mapping relationship between the correction absolute value and the correction coding result can be flexibly adjusted according to specific application scenarios.

[0127] In this way, according to the mapping relationship between the correction value and the correction coding result, the correction value corresponding to each of the correction coding results can be obtained simply and accurately.

[0128] In the embodiments of the present application, before the encoding device or the decoding device obtains the mapping relationship between the correction value and the correction coding result, the encoding device or the decoding device can also:

[0129] According to the variable-length coding strategy, the multiple correction values generated are coded to generate the correction coding result corresponding to each of the correction values.

[0130] The mapping relationship between the correction value and the correction coding result is generated by associating each of the correction values with the correction coding result corresponding to each of the correction values.

[0131] That is, the generated multiple correction values are encoded according to the variable-length coding strategy, a correction coding result corresponding to each correction value is generated, and each correction value is associated with the correction coding result corresponding to the correction value, thereby generating a mapping relationship between the correction value and the correction coding result.

[0132] In this way, the correction value is encoded by using the variable-length coding strategy, which is beneficial to reduce the signaling overhead.

[0133] In the embodiments of the present application, the process that the encoding device or the decoding device encodes the generated multiple correction values according to the variable-length coding strategy to generate a correction coding result corresponding to each correction value can include:

[0134] The multiple correction values generated for the history block are counted to obtain the occurrence number of the same correction value;

[0135] The coding length of each correction value is determined according to the occurrence number, and the occurrence number is inversely proportional to the coding length;

[0136] Each correction value is encoded according to the coding length of each correction value to obtain a correction coding result corresponding to each correction value, or the correction coding result is decoded to obtain the corresponding correction value.

[0137] That is, the occurrence number of the same correction value generated for the history block can be counted in advance, and the coding length of each correction value is determined according to the occurrence number, and then each correction value is encoded according to the coding length of each correction value, thereby obtaining a correction coding result corresponding to each correction value.

[0138] The history block refers to a decoded image block in the current video frame, which includes but is not limited to the most adjacent and / or second adjacent decoded image block of the current block. In actual application, the history block can be flexibly selected according to specific application scenarios.

[0139] The occurrence number of the same correction value is inversely proportional to the coding length of the correction value, that is, the more the occurrence number, the shorter the coding length, and vice versa, the less the occurrence number, the longer the coding length.

[0140] As shown in Table 2, an example table of the mapping relationship between the occurrence number and the coding length.

[0141] Table 2

[0142] It should be noted that in actual application, the mapping relationship between the occurrence number and the coding length can be flexibly adjusted according to specific application scenarios.

[0143] In this way, the coding length of the correction value is determined by using the occurrence number, and the corresponding coding is performed, and the rationality and flexibility of the correction value coding are higher, and the signaling overhead is reduced.

[0144] In the embodiments of the present application, the CABAC can be used to obtain the modified coding result corresponding to the absolute value of the modified value (referred to as modified absolute value). For example, the wth bit of the modified coding result corresponding to the modified absolute value of a certain position of the current block is determined by using the wth bit of the modified coding result corresponding to the modified absolute value of each of the historical block positions.

[0145] As shown in FIG. 9, the coding order of each image block is indicated, for example, for the image block 3, the wth bit of the modified coding result corresponding to the modified absolute value of a certain position is determined according to the wth bit of the modified coding result corresponding to the modified absolute value of the same position of the image block 1 and the wth bit of the modified coding result corresponding to the modified absolute value of the same position of the image block 2; wherein the CABAC of the wth bit of the modified coding result corresponding to the modified absolute value of the certain position can be represented as z=x+y (z=0, 1, 2). Case 1, when z=0, the wth bit of the modified coding result corresponding to the modified absolute value of the image block 1 and the image block 2 is 0. Case 2, when z=1, the wth bit of the modified coding result corresponding to the modified absolute value of the image block 1 and the image block 2 is 0 or 1. Case 3, when z=2, the wth bit of the modified coding result corresponding to the modified absolute value of the image block 1 and the image block 2 is 1.

[0146] In this way, the rationality and flexibility of the modified value coding are higher by using the CABAC for corresponding coding.

[0147] In the embodiments of the present application, the process of obtaining the modified value corresponding to each of the extracted modified coding results according to the mapping relationship between the modified value and the modified coding result can include:

[0148] obtaining the modified identification corresponding to each of the extracted modified coding results according to the mapping relationship between the modified identification and the modified coding result;

[0149] obtaining the modified value corresponding to each of the modified identifications according to the mapping relationship between the modified identification and the modified value.

[0150] That is, the modified identification corresponding to each of the modified coding results is obtained by querying the mapping relationship between the modified identification and the modified coding result, and then the modified value corresponding to each of the modified identifications is obtained by querying the mapping relationship between the modified identification and the modified value, thereby obtaining the modified value corresponding to each of the modified coding results.

[0151] The mapping relationship between the modified value and the modified coding result can include the mapping relationship between the modified identification and the modified value, and the mapping relationship between the modified identification and the modified coding result.

[0152] For example, the mapping relationship between the correction identifier and the correction value includes a plurality of correction identifiers, and correction values corresponding to the plurality of correction identifiers respectively. Similarly, since the correction value includes a correction sign and a correction absolute value, the mapping relationship between the correction identifier and the correction value is essentially the mapping relationship between the correction identifier and the correction absolute value, that is, the mapping relationship between the correction identifier and the correction absolute value includes a plurality of correction identifiers, and correction absolute values corresponding to the plurality of correction identifiers respectively. It can be understood that the correction identifier is used to uniquely identify the correction value.

[0153] As shown in Table 3, an example table of the mapping relationship between the correction identifier and the correction absolute value is shown.

[0154] Table 3

[0155] It should be noted that in actual application, the mapping relationship between the correction identifier and the correction absolute value can be flexibly adjusted according to specific application scenarios.

[0156] The mapping relationship between the correction identifier and the correction encoding result includes a plurality of correction identifiers, and correction encoding results corresponding to the plurality of correction identifiers respectively, and the encoding length of the correction encoding result corresponding to different correction identifiers is different.

[0157] As shown in Table 4, an example table of the mapping relationship between the correction identifier and the correction encoding result is shown.

[0158] Table 4

[0159] It should be noted that in actual application, the mapping relationship between the correction identifier and the correction encoding result can be flexibly adjusted according to specific application scenarios.

[0160] It can be understood that the mapping relationship between the correction identifier and the correction value, and the mapping relationship between the correction identifier and the correction encoding result can be in the same table, and in actual application, the same can be flexibly adjusted according to specific application scenarios.

[0161] In this way, by introducing the correction identifier, more accurate and ordered correction encoding results can be obtained, so that the encoding of the correction value can be better implemented.

[0162] S820, respectively correcting a plurality of residual values to be corrected according to the correction value to obtain a plurality of residual values after correction.

[0163] In the embodiment of the present application, the correction value is obtained, and then the plurality of residual values to be corrected can be respectively corrected by using the correction value to obtain the plurality of residual values after correction.

[0164] In the foregoing example of FIG. 7A, the residual values 1, 2, 4, -2, -1 in the image region below and to the right of the current block shown by the dashed box in the current block are modified, specifically, 1 is modified to 0, 2 is modified to 1, 4 is modified to 2, -2 is modified to -1, and -1 is modified to 0, to obtain the modified residual values shown in FIG. 7B.

[0165] In an embodiment of the present application, the process of modifying the plurality of residual values to be modified according to the modification value in S820 to obtain the plurality of modified residual values can include at least two cases.

[0166] In case 1, the modification value is summed with each residual value to obtain the plurality of modified residual values.

[0167] That is, in the case where one modification value is obtained by decoding the modified encoding result, the modification value is summed with each residual value to obtain each modified residual value. As shown in FIG. 10A, the modification value 2 in the dashed box is summed with each residual value 1, 2, 4, -2, -1 to obtain each modified residual value.

[0168] In an embodiment of the present application, the process of modifying the plurality of residual values to be modified according to the modification value to obtain the plurality of modified residual values includes:

[0169] According to the position corresponding to each residual value, a modification coefficient corresponding to each residual value is obtained.

[0170] The modification value is multiplied by the modification coefficient corresponding to each residual value to obtain a multiplication result corresponding to each residual value, and each residual value is summed with the multiplication result corresponding to each residual value to obtain the plurality of modified residual values.

[0171] That is, according to the foregoing case 1, the modification coefficient corresponding to each residual value is obtained according to the position corresponding to each residual value, then the modification value is multiplied by the modification coefficient corresponding to each residual value to obtain a multiplication result corresponding to each residual value, and then each residual value is summed with the multiplication result corresponding to each residual value to obtain the plurality of modified residual values. As shown in FIG. 10B, the plurality of modification coefficients 1 / 8, 1 / 4, 1, 1 / 4, 1 / 8 and the plurality of residual values 1, 2, 4, -2, -1 to be modified in the dashed box are multiplied by the modification value and the modification coefficient at the same position to obtain a multiplication result at each position, and the multiplication result at the same position is summed with the residual value to obtain the plurality of modified residual values.

[0172] For example, as described in the foregoing example, let alpha(i, j) represent the correction coefficient corresponding to the current block position (i, j), then the reconstructed value Rec(i, j) of the current block position (i, j) is Rec(i, j) = Pred(i, j) + Res(i, j) + Adj x alpha(i, j).

[0173] In this way, when there is only one correction value, the residual value is corrected by means of the correction coefficient, the correction granularity is small, and the correction accuracy is improved.

[0174] The specified storage area at the decoding end stores a plurality of correction coefficients, and the plurality of stored correction coefficients are agreed by the encoding end and the decoding end; therefore, the correction coefficient corresponding to the position of each residual value can be obtained from the specified storage area.

[0175] For example, as shown in FIG. 10B, the correction coefficient is proportional to the target distance. The larger the target distance, the larger the correction coefficient, and vice versa. The target distance refers to the distance between the position of the residual value to be corrected in the current block and the reference region. The reference region includes the decoded image region adjacent to the current block, for example, the image region above and / or to the left of the current block.

[0176] In this way, the correction coefficient can be obtained simply and accurately, and the correction coefficient is proportional to the target distance. The accuracy of the correction coefficient setting is high, and the correction accuracy is further improved.

[0177] In case 2, if a plurality of correction values are obtained by decoding, each correction value and the residual value corresponding to each correction value are summed to obtain a plurality of corrected residual values.

[0178] In the case where a plurality of correction values are obtained by decoding the corrected encoding result, each correction value and the residual value corresponding to each correction value can be summed to obtain each corrected residual value. As shown in the dashed box in FIG. 10C, the plurality of correction values -1, -1, 2, 1, 1 and the plurality of residual values 1, 2, 4, -2, -1 to be corrected are summed at the same position to obtain each corrected residual value.

[0179] The same position referred to in the embodiments of the present application refers to the position with the same position coordinates in the current block.

[0180] For details of S510 to S520 and S540 shown in FIG. 8, please refer to S510 to S520 and S540 shown in FIG. 5, which will not be repeated here.

[0181] In the embodiments of the present application, the modified coding result contained in the residual correction information is decoded to obtain the correction value simply and accurately, and the correction value is used to correct the residual value to be corrected, thereby improving the accuracy of the current block reconstruction.

[0182] In the embodiments of the present application, another video decoding method is provided. The video decoding method can be executed by an electronic device, such as a terminal device or a server that transmits or receives video coding data. The embodiments of the present application take the method executed by the terminal device as an example for description. The terminal device can be the video decoding apparatus 210 or the video encoding apparatus 203 shown in FIG. 2, for example. As shown in FIG. 11, the video decoding method at least includes S1110 to S1120, S510 to S530.

[0183] S1110, determining other residual values except the corrected residual value from the current block.

[0184] In the embodiments of the present application, the other residual values except the corrected residual value are determined from the current block, and the other residual values can be one or more.

[0185] S1120, obtaining the reconstruction value of the current block according to the other residual values, the corrected residual value, and the prediction value corresponding to the current block.

[0186] In the embodiments of the present application, the other residual values are obtained, and then the reconstruction value of the current block is calculated according to the other residual values, the corrected residual value, and the prediction value corresponding to the current block.

[0187] In the embodiments of the present application, the process of obtaining the reconstruction value of the current block according to the other residual values, the corrected residual value, and the prediction value corresponding to the current block in S1120 can include:

[0188] Summing the prediction value and the other residual value at the same position, and summing the prediction value and the corrected residual value at the same position to obtain the reconstruction value of each position of the current block.

[0189] That is, the prediction value and the other residual value at the same position are summed, and the prediction value and the corrected residual value at the same position are summed to obtain the reconstruction value of each position of the current block.

[0190] In this way, the reconstruction value of each position of the current block can be obtained simply and accurately.

[0191] It should be noted that the detailed introduction of S510 to S530 shown in FIG. 11 can refer to S510 to S530 shown in FIG. 5, which will not be described herein.

[0192] The reconstructed value of the current block can be calculated simply and accurately by using the modified residual value, the prediction value, and other residual values except the modified residual value, so that the reconstruction of the current block is realized.

[0193] FIG. 12 shows a flowchart of a video encoding method according to an embodiment of the present application. The video encoding method can be performed by an electronic device, such as a terminal device or a server that transmits video encoding data. An embodiment of the present application takes a method performed by a terminal device as an example for description. The terminal device can be, for example, the video encoding apparatus 203 shown in FIG. 2. As shown in FIG. 12, the video encoding method includes at least S1210 to S1230.

[0194] S1210, in response to determining that a prediction encoding mode corresponding to a current block to be encoded in a video image is intra prediction, generating a correction value corresponding to the current block.

[0195] In this step, the prediction encoding mode corresponding to the current block can be obtained. The current block is an image block to be decoded in a current video frame.

[0196] In an embodiment of the present application, the prediction encoding mode corresponding to the current block can be obtained to detect whether the prediction encoding mode corresponding to the current block is intra prediction or inter prediction.

[0197] The encoding device can generate the correction value of the current block according to a preset rule. In an embodiment of the present application, the correction value can be determined according to various encoding parameters and information of the current image or the current block. For example, the correction value can be determined according to at least one of the following: a quantization parameter of the current block, a residual value in the current block, a residual value of an already encoded block in the current image, and the like.

[0198] S1220, encoding the correction value as residual correction information.

[0199] If the prediction encoding mode is intra prediction, the residual correction information corresponding to the current block is generated, and the residual correction information is used to correct the residual value to be corrected corresponding to the current block, and the reconstructed value of the current block is obtained according to the corrected residual value.

[0200] S1230, encoding the residual information into an already encoded video bitstream corresponding to the video image.

[0201] In an embodiment of the present application, the way of encoding the correction value as residual correction information can include: determining a bit string corresponding to the correction value in a preset mapping relationship; and encoding the bit string into the residual correction information.

[0202] In the embodiments of the present application, the manner of encoding the correction value as residual correction information can include: encoding the sign of the correction value as sign information in the residual correction information; and encoding the absolute value of the correction value as value information in the residual correction information. For example, the absolute value of the correction value can be determined to correspond to a bit string in a preset mapping relationship; and the bit string can be encoded as the value information in the residual correction information.

[0203] In the embodiments of the present application, the manner of encoding the bit string into the residual correction information includes: generating context information by using a bit string corresponding to an adjustment value of at least one previously encoded block; and encoding the bit string as the value information based on the context information by using a preset coding algorithm based on a context model.

[0204] In the embodiments of the present application, when it is detected that the prediction coding mode corresponding to the current block is intra prediction, the residual correction information corresponding to the current block can be generated; wherein the residual correction information is used to correct the residual value to be corrected corresponding to the current block, and the reconstructed value of the current block is obtained according to the corrected residual value. The residual correction information is used to correct the residual value to be corrected corresponding to the current block, and the current block is reconstructed according to the corrected residual value. The reconstructed current block can be performed by the decoding end or the encoding end, and the reconstruction process of the current block is described above.

[0205] In the embodiments of the present application, when it is detected that the current block is intra predicted, the residual correction information corresponding to the current block is generated, so that the residual correction information can be used to correct the residual value to be corrected corresponding to the current block, and the phenomenon of uneven quantization loss caused by different correlations between the residual value and the reference region is avoided, the accuracy and efficiency of the reconstruction of the current block are improved, and the reliability of the video coding and decoding is high.

[0206] In the embodiments of the present application, another video coding method is provided. The video coding method can be executed by an electronic device, for example, a terminal device or a server that transmits video coding data. The embodiments of the present application take the method executed by the terminal device as an example, and the terminal device can be, for example, the video coding apparatus 203 shown in FIG. 2. As shown in FIG. 13, the video coding method at least includes S1310 to S1320, S1230.

[0207] S1310, determining a residual value to be corrected corresponding to a current block, and generating a correction value corresponding to the residual value to be corrected.

[0208] In the embodiments of the present application, the residual value to be corrected corresponding to the current block can be determined first, wherein the residual value to be corrected can be one or more, and then the correction value corresponding to the residual value to be corrected is generated.

[0209] The correction value in the embodiments of the present application includes a correction sign and a correction absolute value. The correction sign is positive or negative, and the correction absolute value is usually an integer, and the value range of the correction absolute value can be [0, N]. For example, the correction coding result can be obtained by using M bits to perform fixed-length coding on the correction absolute value, such as N=2 M .

[0210] In the embodiments of the present application, the process of determining the to-be-corrected residual value corresponding to the current block in S1310 can include:

[0211] The to-be-corrected region is selected from the current block, and the to-be-corrected region is agreed by the encoding end and the decoding end, and the to-be-corrected region includes at least one of the image region below in the current block and the image region on the right in the current block.

[0212] The to-be-corrected residual value is determined from the plurality of residual values contained in the to-be-corrected region.

[0213] That is, the to-be-corrected residual value is determined from the plurality of residual values contained in the to-be-corrected region of the current block.

[0214] The to-be-corrected region refers to the image region that needs to be corrected, and the to-be-corrected region is agreed by the encoding end and the decoding end.

[0215] As described in the foregoing embodiments, the image region above and on the left in the current block is relatively close to the reference region, and the absolute value of the residual generated by prediction is relatively small, and the image region below and on the right in the current block is relatively far from the reference region, and the absolute value of the residual generated by prediction is relatively large. Therefore, the to-be-corrected region can be the image region below and / or on the right in the current block, for example, refer to 7A again.

[0216] In this way, the to-be-corrected region is selected from the current block, and the to-be-corrected residual value is determined from the plurality of residual values contained in the to-be-corrected region, so that the to-be-corrected residual value can be obtained simply and accurately, and strong support is provided for the correction of the residual value.

[0217] In the embodiments of the present application, the process of determining the to-be-corrected residual value from the plurality of residual values contained in the to-be-corrected region can include:

[0218] The non-zero residual value is selected from the plurality of residual values contained in the to-be-corrected region.

[0219] The non-zero residual value is selected as the to-be-corrected residual value.

[0220] That is, the non-zero residual value is selected from the plurality of residual values contained in the to-be-corrected region, and the non-zero residual value is the to-be-corrected residual value at this time, for example, refer to 7A again.

[0221] In this way, the non-zero residual value in the to-be-corrected region is taken as the to-be-corrected residual value, the phenomenon of correcting the residual value of zero is avoided, and the accuracy of residual value correction is improved.

[0222] In the embodiment of the present application, there are multiple to-be-corrected residual values; accordingly, the process of generating the correction value corresponding to the to-be-corrected residual value in S1310 can include one of at least two ways.

[0223] Way 1: one correction value is generated for the multiple to-be-corrected residual values.

[0224] That is, one correction value can be generated for the multiple to-be-corrected residual values, for example, referring to FIG. 10A again.

[0225] In the process of generating one correction value for the multiple to-be-corrected residual values in way 1, the following process can be included: for the multiple to-be-corrected residual values, one correction value that makes the multiple residual values reduce the most or have the highest consistency in distribution is selected from the multiple candidate correction values.

[0226] In this way, one correction value is generated for the multiple to-be-corrected residual values, which can generate the correction value more quickly and improve the efficiency of correction value generation.

[0227] Way 2: the correction value corresponding to each residual value is generated for each to-be-corrected residual value.

[0228] That is, the correction value corresponding to each to-be-corrected residual value can be generated for the multiple to-be-corrected residual values, that is, multiple correction values are generated, for example, referring to FIG. 10C again.

[0229] In the process of generating the correction value corresponding to each residual value for each to-be-corrected residual value in way 2, the following process can be included: for each to-be-corrected residual value, the correction value corresponding to each residual value is selected from the multiple candidate correction values according to the original value corresponding to each residual value.

[0230] In this way, multiple correction values are generated for the multiple to-be-corrected residual values, the granularity of the correction value is higher, and the accuracy of correction value generation is improved.

[0231] It can be understood that the multiple candidate correction values involved in way 1 and way 2 can be obtained by statistical analysis of historical correction values, or can be set or calculated according to experience.

[0232] S1320: encode the correction value to obtain a correction encoding result, and obtain residual correction information according to the correction encoding result.

[0233] The application embodiment generates a correction value corresponding to the to-be-corrected residual value, then encodes the correction value to obtain a correction encoding result, and obtains residual correction information according to the correction encoding result.

[0234] In the application embodiment, the generated correction values are multiple; accordingly, the process of encoding the correction values in S1320 to obtain a correction encoding result, and obtaining residual correction information according to the correction encoding result, can include:

[0235] obtaining a mapping relationship between the correction values and the correction encoding results, the mapping relationship between the correction values and the correction encoding results including multiple correction values and correction encoding results corresponding to the multiple correction values respectively, and the coding lengths of the correction encoding results corresponding to different correction values being different;

[0236] obtaining the correction encoding result corresponding to each generated correction value according to the mapping relationship between the correction values and the correction encoding results;

[0237] combining the multiple correction encoding results to obtain the residual correction information.

[0238] That is, the mapping relationship between the correction values and the correction encoding results is obtained, and the correction encoding result corresponding to each correction value is obtained by querying the mapping relationship between the correction values and the correction encoding results, and then the multiple correction encoding results are combined to obtain the residual correction information.

[0239] The mapping relationship between the correction values and the correction encoding results is stored in the specified storage area of the encoding end, and the stored mapping relationship is obtained by the encoding end and the decoding end; therefore, the mapping relationship between the correction values and the correction encoding results can be obtained from the specified storage area.

[0240] The mapping relationship between the correction values and the correction encoding results includes multiple correction values and correction encoding results corresponding to the multiple correction values respectively, and the coding lengths of the correction encoding results corresponding to different correction values are different; since the correction values include correction signs and correction absolute values, the mapping relationship between the correction values and the correction encoding results is essentially the mapping relationship between the correction absolute values and the correction encoding results, that is, the mapping relationship between the correction absolute values and the correction encoding results includes correction absolute values and correction encoding results corresponding to the multiple correction absolute values respectively, and the coding lengths of the correction encoding results corresponding to different correction absolute values are different, for example, refer to Table 1 again.

[0241] In this way, according to the mapping relationship between the correction values and the correction encoding results, the correction encoding result corresponding to each correction value can be obtained simply and accurately, so as to obtain the residual correction information.

[0242] In the embodiment of the present application, before the process of obtaining the mapping relationship between the correction value and the correction encoding result, the process can further include:

[0243] According to the variable-length coding strategy, the generated multiple correction values are encoded to generate a correction encoding result corresponding to each correction value.

[0244] Each correction value is associated with the correction encoding result corresponding to each correction value to generate a mapping relationship between the correction value and the correction encoding result.

[0245] That is, according to the variable-length coding strategy, the generated multiple correction values are encoded to generate a correction encoding result corresponding to each correction value, and each correction value is associated with the correction encoding result corresponding to each correction value, thereby generating a mapping relationship between the correction value and the correction encoding result.

[0246] In this way, the variable-length coding strategy is used to encode the correction value, which can simply and accurately obtain the mapping relationship between the correction value and the correction encoding result, thereby providing strong support for obtaining the correction encoding result.

[0247] In the embodiment of the present application, the process of encoding the generated multiple correction values according to the variable-length coding strategy to generate a correction encoding result corresponding to each correction value can include:

[0248] The multiple correction values generated for the historical block are counted to obtain the number of occurrences of the same correction value.

[0249] The coding length of each correction value is determined according to the number of occurrences, and the number of occurrences is inversely proportional to the coding length.

[0250] Each correction value is encoded according to the coding length of each correction value to obtain a correction encoding result corresponding to each correction value.

[0251] That is, the number of occurrences of the same correction value generated for the historical block is counted in advance, and the coding length of each correction value is determined according to the number of occurrences, and then each correction value is encoded according to the coding length of each correction value, thereby obtaining a correction encoding result corresponding to each correction value.

[0252] The historical block refers to a decoded image block in the current video frame, which includes but is not limited to the most adjacent and / or second adjacent decoded image block of the current block.

[0253] The number of occurrences of the same correction value is inversely proportional to the coding length of the correction value, that is, the more the number of occurrences, the shorter the coding length, and vice versa, the less the number of occurrences, the longer the coding length, for example, see Table 2.

[0254] In this way, the coding length of the correction value is determined according to the occurrence frequency, and the coding of the correction value is performed, and the rationality and flexibility of the correction value coding are higher.

[0255] In the embodiment of the present application, the process of obtaining the correction coding result corresponding to each generated correction value according to the mapping relationship between the correction value and the correction coding result can include:

[0256] According to the mapping relationship between the correction identifier and the correction value, the correction identifier corresponding to each generated correction value is obtained.

[0257] According to the mapping relationship between the correction identifier and the correction coding result, the correction coding result corresponding to each correction identifier is obtained.

[0258] That is, the correction identifier corresponding to each correction value is obtained by querying the mapping relationship between the mapping relationship between the correction identifier and the correction value, and then the correction coding result corresponding to each correction identifier is obtained by querying the mapping relationship between the correction identifier and the correction coding result, thereby obtaining the correction coding result corresponding to each correction identifier.

[0259] The mapping relationship between the correction value and the correction coding result specifically includes the mapping relationship between the correction identifier and the correction value, and the mapping relationship between the correction identifier and the correction coding result. Specifically:

[0260] The mapping relationship between the correction identifier and the correction value includes a plurality of correction identifiers and correction values corresponding to the plurality of correction identifiers, respectively. Similarly, since the correction value includes the correction sign and the correction absolute value, the mapping relationship between the correction identifier and the correction value is essentially the mapping relationship between the correction identifier and the correction absolute value, that is, the mapping relationship between the correction identifier and the correction absolute value includes the correction identifier and the correction absolute value corresponding to the plurality of correction identifiers, respectively, for example, see Table 3 again. It can be understood that the correction identifier is used to uniquely identify the correction value.

[0261] The mapping relationship between the correction identifier and the correction coding result includes a plurality of correction identifiers and correction coding results corresponding to the plurality of correction identifiers, respectively, and the coding length of the correction coding result corresponding to different correction identifiers is different, for example, see Table 4 again.

[0262] In this way, the introduction of the correction identifier can obtain more ordered correction coding results, thereby better realizing the coding of the correction value.

[0263] It should be noted that the detailed introduction of S1230 shown in FIG. 13 can be referred to S1230 shown in FIG. 12, which will not be repeated here.

[0264] In the embodiments of the present application, the generated correction value is encoded to obtain a correction encoding result, and residual correction information is generated according to the correction encoding result, thereby providing strong support for the correction of the to-be-corrected residual value.

[0265] FIG. 14 is a block diagram of a video decoding apparatus according to an embodiment of the present application. As shown in FIG. 14, the apparatus includes:

[0266] The obtaining module 1401 is configured to obtain residual correction information corresponding to a current block, the current block being a to-be-decoded image block in a current video frame, and the residual correction information being generated by an encoding end when a prediction encoding mode corresponding to the current block is intra prediction;

[0267] The decoding module 1402 is configured to decode a correction value from the residual correction information;

[0268] The determining module (not shown) is configured to determine at least one to-be-corrected residual value corresponding to the current block;

[0269] The correction module 1403 is configured to correct the to-be-corrected residual value by using the correction value, to obtain a corrected residual value;

[0270] The reconstruction module 1404 is configured to reconstruct the current block based on the corrected residual value.

[0271] The modules in the video decoding apparatus are used to perform corresponding steps of the decoding method according to the embodiments of the present application. Therefore, the specific functions of the modules will not be described again, and can be referred to the descriptions of the corresponding steps in the embodiments.

[0272] In the embodiments of the present application, based on the foregoing scheme, the to-be-corrected residual value includes a plurality of residual values; and the correction module 1403 is specifically configured to:

[0273] extract a correction encoding result from the residual correction information, and decode the correction encoding result to obtain a correction value;

[0274] correct the plurality of to-be-corrected residual values respectively according to the correction value, to obtain a plurality of corrected residual values.

[0275] In the embodiments of the present application, based on the foregoing scheme, the correction module 1403 is further specifically configured to:

[0276] if one correction value is decoded, then the correction value is summed with each residual value respectively, to obtain the plurality of corrected residual values;

[0277] if a plurality of correction values are decoded, then each correction value is summed with a residual value corresponding to the correction value, to obtain the plurality of corrected residual values.

[0278] In the embodiments of the present application, based on the foregoing scheme, the correction module 1403 is further specifically configured to:

[0279] According to the position corresponding to each residual value, a correction coefficient corresponding to each residual value is obtained.

[0280] The correction value is multiplied by the correction coefficient corresponding to each residual value respectively to obtain a multiplication result corresponding to each residual value, and the sum of each residual value and the multiplication result corresponding to each residual value is calculated to obtain a plurality of corrected residual values.

[0281] In the embodiments of the present application, based on the foregoing scheme, the correction module 1403 is further specifically configured to:

[0282] The correction coefficient corresponding to the position of each residual value is obtained from the specified storage area, and the stored correction coefficient is obtained by the encoding end and the decoding end, and the stored correction coefficient is proportional to the target distance, and the target distance is the distance between the position of the residual value to be corrected in the current block and the reference region, and the reference region includes the decoded image region adjacent to the current block.

[0283] In the embodiments of the present application, based on the foregoing scheme, the extracted correction encoding result includes a plurality of; the correction module 1403 is further specifically configured to:

[0284] The mapping relationship between the correction value and the correction encoding result is obtained, and the mapping relationship between the correction value and the correction encoding result includes a plurality of correction values, and the correction encoding result corresponding to each of the plurality of correction values, and the encoding length of the correction encoding result corresponding to different correction values is different;

[0285] According to the mapping relationship between the correction value and the correction encoding result, the correction value corresponding to each of the extracted correction encoding results is obtained.

[0286] In the embodiments of the present application, based on the foregoing scheme, the correction module 1403 is further specifically configured to:

[0287] According to the mapping relationship between the correction identifier and the correction encoding result, the correction identifier corresponding to each of the extracted correction encoding results is obtained;

[0288] According to the mapping relationship between the correction identifier and the correction value, the correction value corresponding to each correction identifier is obtained.

[0289] In the embodiments of the present application, based on the foregoing scheme, the absolute value of the corrected residual value is less than the absolute value of the residual value before correction; or if the residual value to be corrected includes a plurality of, the distribution consistency of the plurality of corrected residual values is greater than the distribution consistency of the plurality of residual values before correction.

[0290] In the embodiments of the present application, based on the foregoing scheme, the determining module 1402 is specifically configured to:

[0291] selecting a to-be-corrected region from the current block, wherein the to-be-corrected region is agreed upon by the encoding end and the decoding end, and the to-be-corrected region includes at least one of a lower image region in the current block and a right image region in the current block;

[0292] determining a to-be-corrected residual value from a plurality of residual values included in the to-be-corrected region.

[0293] In the embodiments of the present application, based on the foregoing scheme, the determining module 1402 is further specifically configured to:

[0294] selecting a non-zero residual value from a plurality of residual values included in the to-be-corrected region;

[0295] taking the non-zero residual value as the to-be-corrected residual value.

[0296] In the embodiments of the present application, based on the foregoing scheme, the reconstructing module 1404 is specifically configured to:

[0297] determining other residual values except the corrected residual value from the current block;

[0298] obtaining a reconstructed value of the current block according to the other residual values, the corrected residual value, and a prediction value corresponding to the current block.

[0299] FIG. 15 is a block diagram of a video encoding apparatus according to an embodiment of the present application. As shown in FIG. 15, the apparatus includes:

[0300] The obtaining module 1501 is configured to obtain a prediction encoding mode corresponding to a current block, wherein the current block is an image block to be decoded in a current video frame.

[0301] The generating module 1502 is configured to, in response to determining that the prediction encoding mode corresponding to the current block to be encoded in the video image is an intra prediction, generate residual correction information corresponding to the current block. The residual correction information is used to correct a to-be-corrected residual value corresponding to the current block, and obtain a reconstructed value of the current block according to the corrected residual value.

[0302] The encoding module 1503 is configured to encode the correction value into residual correction information.

[0303] The bitstream generating module 1504 is configured to encode the residual information into an encoded video bitstream corresponding to the video image.

[0304] The modules in the video encoding device are configured to perform the corresponding steps of the encoding method of the embodiments of the present application. Therefore, the specific functions of the modules will not be described again, and the descriptions of the corresponding steps in the embodiments can be referred to.

[0305] In the embodiments of the present application, based on the foregoing scheme, the generating module 1502 is specifically configured to:

[0306] determine a to-be-corrected residual value corresponding to the current block, and generate a correction value corresponding to the to-be-corrected residual value;

[0307] encode the correction value to obtain a correction encoding result, and obtain residual correction information according to the correction encoding result.

[0308] In the embodiments of the present application, based on the foregoing scheme, the to-be-corrected residual value includes a plurality of to-be-corrected residual values; and the generating module 1502 is further specifically configured to:

[0309] generate one correction value for the plurality of to-be-corrected residual values; or

[0310] generate a correction value corresponding to each to-be-corrected residual value.

[0311] In the embodiments of the present application, based on the foregoing scheme, the generating module 1502 is further specifically configured to:

[0312] select, for the plurality of to-be-corrected residual values, a correction value from the plurality of candidate correction values, which makes the plurality of to-be-corrected residual values have the most overall reduction or the highest overall distribution consistency; or

[0313] for each to-be-corrected residual value, select a correction value corresponding to the to-be-corrected residual value from the plurality of candidate correction values according to an original value corresponding to the to-be-corrected residual value.

[0314] In the embodiments of the present application, based on the foregoing scheme, the generated correction value includes a plurality of correction values; and the generating module 1502 is further specifically configured to:

[0315] obtain a mapping relationship between the correction value and the correction encoding result, the mapping relationship between the correction value and the correction encoding result including a plurality of correction values and correction encoding results corresponding to the plurality of correction values respectively, and the correction encoding results corresponding to different correction values having different encoding lengths;

[0316] obtain a correction encoding result corresponding to each generated correction value according to the mapping relationship between the correction value and the correction encoding result;

[0317] combine the plurality of correction encoding results to obtain the residual correction information.

[0318] In the embodiments of the present application, based on the foregoing scheme, the apparatus further comprises an association module configured to:

[0319] According to the variable-length coding strategy, the generated plurality of correction values are coded to generate a correction coding result corresponding to each correction value;

[0320] The mapping relationship between the correction value and the correction coding result is generated by associating each correction value with the correction coding result corresponding to the correction value.

[0321] In the embodiments of the present application, based on the foregoing scheme, the association module is specifically configured to:

[0322] The plurality of correction values generated for the history block are counted to obtain the number of occurrences of the same correction value;

[0323] The coding length of each correction value is determined according to the number of occurrences, and the number of occurrences is inversely proportional to the coding length;

[0324] According to the coding length of each correction value, each correction value is coded to obtain a correction coding result corresponding to each correction value.

[0325] In the embodiments of the present application, based on the foregoing scheme, the generation module 1502 is further specifically configured to:

[0326] According to the mapping relationship between the correction identifier and the correction value, a correction identifier corresponding to each generated correction value is obtained;

[0327] According to the mapping relationship between the correction identifier and the correction coding result, a correction coding result corresponding to each correction identifier is obtained.

[0328] In the embodiments of the present application, based on the foregoing scheme, the generation module 1502 is further specifically configured to:

[0329] The to-be-corrected region is selected from the current block, the to-be-corrected region is obtained by agreement between the encoding end and the decoding end, and the to-be-corrected region includes at least one of the image region below in the current block and the image region on the right in the current block;

[0330] The to-be-corrected residual value is determined from the plurality of residual values contained in the to-be-corrected region.

[0331] In the embodiments of the present application, based on the foregoing scheme, the generation module 1502 is further specifically configured to:

[0332] The non-zero residual value is selected from the plurality of residual values contained in the to-be-corrected region;

[0333] The non-zero residual value is selected from the plurality of residual values contained in the to-be-corrected region;

[0334] It should be noted that the video coding device provided by the above embodiments and the video coding method provided by the above embodiments belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the method embodiments, which will not be described here. The video coding device provided by the above embodiments can be divided into different functional modules to complete all or part of the above-described functions according to the actual application, i.e., the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions, and this is not limited here.

[0335] Embodiments of the present application also provide an electronic device, comprising: one or more processors; a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the video coding method provided in each of the above embodiments.

[0336] FIG. 16 is a structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application. It should be noted that the computer system 1600 of the electronic device shown in FIG. 16 is only an example, and should not limit the functions and use range of the embodiments of the present application.

[0337] As shown in FIG. 16, the computer system 1600 includes a central processing unit (CPU) 1601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1602 or programs loaded from a storage portion 1608 into a random access memory (RAM) 1603, such as performing the methods described in the above embodiments. In the RAM 1603, various programs and data required for system operation are also stored. The CPU 1601, the ROM 1602, and the RAM 1603 are connected to each other through a bus 1604. An input / output (I / O) interface 1605 is also connected to the bus 1604.

[0338] The following components are connected to the I / O interface 1605: an input part 1606 including a keyboard, a mouse, etc.; an output part 1607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage part 1608 including a hard disk, etc.; and a communication part 1609 including a network interface card such as a Local Area Network (LAN) card, a modem, etc. The communication part 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to the I / O interface 1605 as necessary. A removable media 1611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1610 as necessary, so that a computer program read out therefrom is installed in the storage part 1608 as necessary.

[0339] In particular, the processes described above with reference to the flow charts can be implemented as computer software programs in accordance with embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing computer programs for executing the methods illustrated by the flow charts. In such embodiments, the computer program can be downloaded and installed from a network via the communication part 1609, and / or installed from the removable media 1611. When the computer program is executed by the Central Processing Unit (CPU) 1601, various functions defined in the system of the present application are performed.

[0340] Some embodiments can relate to systems, methods, and / or computer readable media at any possible level of integration. The computer readable medium can include computer readable non-transitory storage media (or media) having computer readable program instructions stored therein to cause a processor to carry out operations, and can also include a bitstream (or video bitstream) generated according to the above-mentioned encoding method. The computer program / instructions are executed by the processor to implement the steps of the video encoding method to generate the bitstream (or video bitstream), or to implement the steps of the video decoding method to decode the bitstream (or video bitstream).

[0341] It should be noted that the computer readable medium shown in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. More specific examples of computer readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above. The computer program contained in the computer readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, etc., or any appropriate combination of the above.

[0342] The flowcharts and block diagrams in the drawings illustrate the possible implementation architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In the flowcharts or block diagrams, each block can represent a module, a program segment or a part of code containing one or more executable instructions for implementing a specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two blocks represented in succession can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the function involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0343] The units involved in the embodiments of the present application can be implemented in software or in hardware, and the described units can also be arranged in a processor. In some cases, the names of these units do not constitute a limitation on the units themselves.

[0344] Another aspect of the present application also provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the video coding method as described above. The computer readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device.

[0345] Another aspect of the present application also provides a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device performs the video coding method provided in each of the above embodiments.

[0346] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present disclosure.

[0347] The above description is only the preferred exemplary embodiments of the present application, and is not intended to limit the implementation of the present application. Based on the main concept and spirit of the present application, a person of ordinary skill in the art can easily make corresponding modifications or changes. Therefore, the protection scope of the present application should be subject to the protection scope required by the claims.

[0348] It can be understood that in the specific embodiments of the present application, the input data required for the execution of the local model and other related data are involved. When the above embodiments of the present application are applied to specific products or technologies, the user's permission or consent is required, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.

Claims

1. A method of video decoding, performed by an electronic device, comprising: obtaining, from a bitstream, residual modification information corresponding to a current block, the current block being an intra coded image block in the bitstream; decoding a modification value from the residual modification information; modifying at least one residual value of the current block using the modification value to obtain a modified residual value; and reconstructing the current block based on the modified residual value. The decoding of the modification value from the residual modification information comprises:

2. The method of claim 1, wherein, decoding a bit string from the residual modification information; and determining a value corresponding to the bit string in a preset mapping relationship. The decoding of the modification value from the residual modification information comprises:

3. The method of claim 1 or 2, wherein, decoding a sign of the modification value from sign information in the residual modification information; and decoding an absolute value of the modification value from value information in the residual modification information. The decoding of the bit string from the residual modification information comprises:

4. The method of claim 2, wherein, generating context information using a bit string corresponding to an adjustment value of at least one previously decoded block; and decoding the bit string from the residual modification information based on the context information using a preset coding algorithm based on a context model. The modification of the at least one residual value of the current block using the modification value comprises:

5. The method of claim 1, wherein, modifying a residual value corresponding to a first preset position in the current block using the modification value; and deriving a plurality of second modification values corresponding to a plurality of second preset positions in the current block using the modification value, and modifying residual values corresponding to the plurality of second preset positions using the plurality of second modification values. The derivation of the plurality of second modification values corresponding to the plurality of second preset positions in the current block using the modification value comprises:

6. The method of claim 5, wherein, respectively calculating a product of the modification value and a modification coefficient corresponding to each of the plurality of second preset positions as the second modification value.

7. The method of claim 6, further comprising one of: obtaining the modification coefficient pre-stored; and decoding the modification coefficient from the bitstream. The modification coefficient corresponding to the second preset position is positively correlated with a distance between the second preset position and a reference region, the reference region being a decoded image region used for intra prediction of the current block.

8. The method of claim 6, wherein, The residual modification information comprises information of at least two modification values.

9. The method of claim 1, wherein, The decoding of the residual modification information into the modification value comprises: decoding information of at least two modification values in the residual modification information into the at least two modification values.

10. The method of claim 1, wherein: an absolute value of the modified residual value is smaller than an absolute value of the residual value before modification; or a distribution consistency of at least two modified residual values is greater than a distribution consistency of the at least two residual values before modification. The method further comprises:

11. The method of claim 1, wherein, selecting a to-be-modified region from the current block, the to-be-modified region being an image region agreed by an encoding end and a decoding end in advance, and the to-be-modified region comprising at least one of a lower image region in the current block and a right image region in the current block; and determining the at least one residual value from a plurality of residual values in the to-be-modified region. ​ 12. The method of claim 11, wherein, The determining the at least one residual value from the plurality of residual values in the to-be-corrected region comprises: determining a non-zero residual value in the plurality of residual values in the to-be-corrected region as the at least one residual value.

13. A method of video encoding, wherein, comprises: in response to determining that a prediction coding mode corresponding to a current block to be encoded in a video image is intra prediction, generating a correction value corresponding to the current block; encoding the correction value as residual correction information; and encoding the residual information into a coded video bitstream corresponding to the video image.

14. The method of claim 13, wherein, The encoding the correction value as residual correction information comprises: determining a bit string corresponding to the correction value in a preset mapping relationship; encoding the bit string into the residual correction information.

15. The method of claim 13 or 14, wherein, The encoding the correction value as residual correction information comprises: encoding a sign of the correction value as sign information in the residual correction information; and encoding an absolute value of the correction value as value information in the residual correction information.

16. The method of claim 14, wherein, The encoding the bit string into the residual correction information comprises: generating context information using a bit string corresponding to an adjustment value of at least one previously encoded block; encoding the bit string as the value information based on the context information using a preset coding algorithm based on a context model.

17. A video decoding apparatus, comprising: comprises: an obtaining module configured to obtain residual correction information corresponding to a current block from a bitstream, the current block being an image block in the bitstream that has been intra coded; a decoding module configured to decode the residual correction information into a correction value; a correction module configured to correct at least one residual value of the current block using the correction value to obtain a corrected residual value; a reconstruction module configured to reconstruct the current block based on the corrected residual value.

18. A video encoding apparatus, wherein, comprises: a generating module configured to, in response to determining that a prediction coding mode corresponding to a current block to be encoded in a video image is intra prediction, generate a correction value corresponding to the current block; an encoding module configured to encode the correction value as residual correction information; and a bitstream generating module configured to encode the residual information into a coded video bitstream corresponding to the video image.

19. An electronic device, comprising: comprises: one or more processors; a memory for storing one or more programs, which, when executed by the electronic device, cause the electronic device to implement the method of any one of claims 1-16.

20. A computer readable medium having stored thereon a video bitstream, wherein, The video bitstream is decoded by the method of any one of claims 1-12, or generated by the method of any one of claims 13-16.

21. A computer program product comprising computer instructions, wherein, The computer instructions, when executed by the processor, implement the method of any one of claims 1-16.

Citation Information

Patent Citations

  • Residual prediction for intra block copying

    CN105493507A

  • Encoding method, decoding method and device thereof

    CN108028942A

  • Image decoding device using differential coding

    CN113892261A

  • Decoding and coding method, device and equipment

    CN118214875A

  • Adjustment of intra-frame encoding distortion metrics for video encoding

    US20160065962A1