Video encoding and decoding methods, apparatuses, computer-readable media and electronic devices

By statistically analyzing the quantization coefficient blocks, the reconstruction processing method of the prediction blocks is implicitly derived, which solves the problem of low coding efficiency in SIBC technology and achieves more efficient video encoding and decoding.

CN115209146BActive Publication Date: 2026-03-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110396646.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-13
Publication Date
2026-03-03
Estimated Expiration
2041-04-13

AI Technical Summary

Technical Problem

In existing technologies, SIBC technology uses explicit indexing to indicate the flipping method during the encoding process, which leads to reduced encoding efficiency.

Method used

By statistically analyzing the quantization coefficients within a specified region of the quantization coefficient block, the reconstruction process for generating the prediction block from the reference block is implicitly derived, avoiding explicit indexing encoding in the bitstream.

Benefits of technology

It improves video encoding and decoding efficiency and reduces index encoding overhead during the encoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115209146B_ABST
    Figure CN115209146B_ABST
Patent Text Reader

Abstract

This application provides a video encoding / decoding method, apparatus, computer-readable medium, and electronic device. The video decoding method includes: decoding a coded block using an intra-block copy mode to obtain a quantization coefficient block and a block vector corresponding to the coded block; statistically analyzing the quantization coefficients within a specified region of the quantization coefficient block to obtain quantization coefficient statistical results; implicitly deriving a reconstruction processing method for generating a prediction block from a reference block based on the quantization coefficient statistical results; and processing the reference block pointed to by the block vector according to the reconstruction processing method to obtain the prediction block corresponding to the coded block. The technical solutions of this application can improve the efficiency of video encoding / decoding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer and communication technology, and more specifically, to a video encoding / decoding method, apparatus, computer-readable medium, and electronic device. Background Technology

[0002] Related technologies have proposed SIBC (Symmetrical Intra Block Copy) technology, which involves horizontally or vertically flipping the reference block of the current block during the encoding process to obtain the prediction block (this process can be called the reconstruction process of the prediction block). In this case, explicit indexes need to be encoded in the bitstream to indicate whether SIBC is used, and when SIBC is used, the flipping method is further indicated by explicit indexes. However, this method of encoding explicit indexes obviously reduces encoding efficiency. Summary of the Invention

[0003] The embodiments of this application provide a video encoding / decoding method, apparatus, computer-readable medium, and electronic device, which can at least to some extent improve the efficiency of video encoding / decoding.

[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0005] According to one aspect of the embodiments of this application, a video decoding method is provided, comprising: decoding a coded block using an intra-block copy mode to obtain a quantization coefficient block and a block vector corresponding to the coded block; statistically analyzing the quantization coefficients in a specified region of the quantization coefficient block to obtain a quantization coefficient statistical result; implicitly deriving a reconstruction processing method for generating a prediction block from a reference block based on the quantization coefficient statistical result; and processing the reference block pointed to by the block vector according to the reconstruction processing method to obtain the prediction block corresponding to the coded block.

[0006] According to one aspect of the embodiments of this application, a video coding method is provided, comprising: reconstructing a reference block of a current block to be encoded to obtain a prediction block; calculating residual data based on the current block to be encoded and the prediction block, performing transformation or skip transformation processing on the residual block, and performing quantization processing to obtain a quantization coefficient block; adjusting the quantization coefficients in the quantization coefficient block to implicitly indicate the reconstruction processing method for generating the prediction block from the reference block based on the statistical results of the adjusted quantization coefficients; and encoding the block vector between the current block to be encoded and the reference block, as well as the quantization coefficient block after quantization coefficient adjustment, to obtain an encoded bitstream.

[0007] According to one aspect of the embodiments of this application, a video decoding apparatus is provided, comprising: a decoding unit configured to decode a coded block using an intra-block copy mode to obtain a quantization coefficient block and a block vector corresponding to the coded block; a statistics unit configured to perform statistics on quantization coefficients in a specified region of the quantization coefficient block to obtain quantization coefficient statistics results; a first processing unit configured to implicitly derive a reconstruction processing method for generating a prediction block from a reference block based on the quantization coefficient statistics results; and a second processing unit configured to process the reference block pointed to by the block vector according to the reconstruction processing method to obtain a prediction block corresponding to the coded block.

[0008] In some embodiments of this application, based on the foregoing scheme, the statistical unit is configured to: calculate the sum of the values ​​of the quantization coefficients within the specified region, and use the resulting sum as the statistical result of the quantization coefficients; or

[0009] Calculate the sum of the absolute values ​​of the quantization coefficients within the specified region, and use the sum as the statistical result of the quantization coefficients; or

[0010] Calculate the sum of the quantization coefficients with odd values ​​within the specified region, and use the sum as the statistical result of the quantization coefficients; or

[0011] Calculate the sum of the absolute values ​​of the quantization coefficients with odd values ​​within the specified region, and use the sum as the statistical result of the quantization coefficients; or

[0012] Calculate the sum of the quantization coefficients within the specified region that are even or non-zero even, and use the sum as the statistical result of the quantization coefficients; or

[0013] Calculate the sum of the absolute values ​​of the quantization coefficients within the specified region that are even or non-zero even, and use the sum as the statistical result of the quantization coefficients.

[0014] In some embodiments of this application, based on the foregoing scheme, the statistical unit is configured to: linearly map the values ​​of the quantization coefficients within the specified region, calculate the sum of the values ​​or absolute values ​​of the quantization coefficients within the specified region after the linear mapping, and use the resulting sum as the statistical result of the quantization coefficients, wherein the linear mapping includes:

[0015] Convert the quantization coefficients with odd values ​​within the specified region to a first value, and convert the quantization coefficients with even values ​​to a second value, wherein one of the first value and the second value is odd, and the other is even; or

[0016] Convert the values ​​of non-zero quantization coefficients within the specified region to a third value, and convert the values ​​of quantization coefficients with a value of zero to a fourth value, wherein one of the third value and the fourth value is odd and the other is even; or

[0017] Decrease or increase the value of the quantization coefficient within the specified region by a fifth value; or

[0018] Multiply or divide the value of the quantization coefficient within the specified region by a non-zero sixth value; or

[0019] Multiply or divide the value of the quantization coefficient within the specified region by a non-zero even number.

[0020] In some embodiments of this application, based on the foregoing scheme, the designated region includes at least one of the following regions:

[0021] The entire region within the quantization coefficient block;

[0022] One or more positions specified in the quantization coefficient block;

[0023] At least one row specified in the quantization coefficient block;

[0024] At least one column specified in the quantization coefficient block;

[0025] The quantization coefficient block specifies at least one row and at least one column;

[0026] The quantization coefficient block is located on at least one diagonal line;

[0027] The scan region coefficient encoding SRCC region in the quantization coefficient block;

[0028] One or more locations are specified in the SRCC region;

[0029] At least one row specified in the SRCC area;

[0030] At least one column is specified in the SRCC region;

[0031] The SRCC area specifies at least one row and at least one column;

[0032] The SRCC region is located on at least one diagonal line.

[0033] In some embodiments of this application, based on the foregoing scheme, the one or more positions specified in the SRCC region include: the first N positions in the scanning order or the N positions in the middle of the scanning order, where N is a non-zero natural number.

[0034] In some embodiments of this application, based on the foregoing scheme, the first processing unit is configured to: if the statistical result of the quantization coefficient is odd, then determine the reconstruction processing method as a first processing method; if the statistical result of the quantization coefficient is even, then determine the reconstruction processing method as a second processing method.

[0035] In some embodiments of this application, based on the foregoing scheme, the first processing unit is configured to: calculate the remainder of the statistical result of the quantization coefficient relative to a set value; and select a reconstruction processing method corresponding to the remainder of the statistical result of the quantization coefficient relative to the set value according to the correspondence between the remainder and the reconstruction processing method.

[0036] In some embodiments of this application, based on the foregoing scheme, the correspondence between the remainder and the reconstruction processing method is preset according to the value of the remainder and the optional reconstruction processing method.

[0037] In some embodiments of this application, based on the foregoing scheme, the video decoding device further includes: a third processing unit, configured to, after obtaining the quantization coefficient block, determine whether all quantization coefficients in the quantization coefficient block are 0; if not all quantization coefficients in the quantization coefficient block are 0, then the statistics unit performs a process of statistical analysis on the quantization coefficients in a specified region of the quantization coefficient block; if all quantization coefficients in the quantization coefficient block are 0, then the reconstruction processing method is determined by the explicit index obtained through decoding.

[0038] In some embodiments of this application, based on the foregoing scheme, the reconstruction processing method includes at least one of the following: whether it is an extended intra-block copy mode; horizontal flip processing in the extended intra-block copy mode; vertical flip processing in the extended intra-block copy mode.

[0039] In some embodiments of this application, based on the foregoing scheme, the first processing unit is further configured to: determine whether the corresponding coding block needs to implicitly derive the reconstruction processing method of generating a prediction block from the reference block based on the quantization coefficient statistical results according to at least one of the following methods: the value of the index identifier contained in the sequence header of the coding block corresponding to the video image frame sequence; the value of the index identifier contained in the image header of the coding block corresponding to the video image frame; and the size of the coding block.

[0040] According to one aspect of the embodiments of this application, a video encoding apparatus is provided, comprising: a fourth processing unit configured to reconstruct a reference block of a current block to be encoded to obtain a prediction block; a fifth processing unit configured to calculate residual data based on the current block to be encoded and the prediction block, perform transformation or skip transformation processing on the residual block, and perform quantization processing to obtain a quantization coefficient block; an adjustment unit configured to adjust the quantization coefficients in the quantization coefficient block to implicitly indicate the reconstruction processing method of generating the prediction block from the reference block based on the statistical results of the adjusted quantization coefficients; and an encoding unit configured to encode the block vector between the current block to be encoded and the reference block, and the quantization coefficient block after quantization coefficient adjustment, to obtain an encoded bitstream.

[0041] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the video encoding method or video decoding method as described in the above embodiments.

[0042] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the video encoding method or video decoding method as described in the above embodiments.

[0043] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes 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 executes the computer instructions, causing the computer device to perform the video encoding or video decoding methods provided in the various optional embodiments described above.

[0044] In some embodiments of this application, the technical solutions provided involve decoding a coded block using intra-block copy mode to obtain a quantization coefficient block and a block vector corresponding to the coded block. Then, the quantization coefficients in a specified region within the quantization coefficient block are statistically analyzed to obtain quantization coefficient statistical results. Based on these results, the reconstruction process of generating a prediction block from a reference block is implicitly derived. This allows the quantization coefficients in the quantization coefficient block to implicitly indicate the reconstruction process of generating a prediction block from a reference block, eliminating the need for explicit indexing encoding in the bitstream at the encoding end. This effectively improves video encoding and decoding efficiency.

[0045] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0047] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown;

[0048] Figure 2 A schematic diagram showing the placement of video encoding and decoding devices in a streaming system;

[0049] Figure 3 A basic flowchart of a video encoder is shown;

[0050] Figure 4 The scanned area marked using SRCC technology is shown.

[0051] Figure 5 A schematic diagram showing the sequence of scanning the marked scanning area is provided.

[0052] Figure 6 A schematic diagram of inter-frame prediction is shown;

[0053] Figure 7 A schematic diagram of intra-frame block copying is shown;

[0054] Figure 8 This diagram illustrates the relationship between the reference block and the prediction block in SIBC.

[0055] Figure 9 A flowchart of a video decoding method according to an embodiment of this application is shown;

[0056] Figure 10 A schematic diagram illustrating the division of a designated area according to an embodiment of this application is shown;

[0057] Figure 11 A schematic diagram illustrating the division of a designated area according to an embodiment of this application is shown;

[0058] Figure 12 A schematic diagram illustrating the division of a designated area according to an embodiment of this application is shown;

[0059] Figure 13 A flowchart of a video encoding method according to an embodiment of this application is shown;

[0060] Figure 14 A block diagram of a video decoding apparatus according to an embodiment of this application is shown;

[0061] Figure 15 A block diagram of a video encoding apparatus according to an embodiment of this application is shown;

[0062] Figure 16 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0063] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0064] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0065] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0066] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0067] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0068] Figure 1A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.

[0069] like Figure 1 As shown, system architecture 100 includes multiple terminal devices that can communicate with each other via, for example, a network 150. For instance, system architecture 100 may include a first terminal device 110 and a second terminal device 120 interconnected via network 150. Figure 1 In one embodiment, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.

[0070] For example, the first terminal device 110 can encode video data (e.g., a video image stream captured by the terminal device 110) to transmit it to the second terminal device 120 via the network 150. The encoded video data is transmitted in the form of one or more encoded video streams. The second terminal device 120 can receive the encoded video data from the network 150, decode the encoded video data to recover the video data, and display video images based on the recovered video data.

[0071] In one embodiment of this application, system architecture 100 may include a third terminal device 130 and a fourth terminal device 140 that perform bidirectional transmission of encoded video data, such as during a video conference. For bidirectional data transmission, each of the third terminal device 130 and the fourth terminal device 140 may encode video data (e.g., a video image stream captured by the terminal device) for transmission over network 150 to the other terminal device. Each of the third terminal device 130 and the fourth terminal device 140 may also receive encoded video data transmitted by the other terminal device, decode the encoded video data to recover the video data, and display the video images on an accessible display device based on the recovered video data.

[0072] exist Figure 1In the embodiments disclosed herein, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 may be servers, personal computers, and smartphones, but the principles disclosed herein are not limited to these. The embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and / or dedicated video conferencing equipment. Network 150 refers to any number of networks that transmit encoded video data between the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140, including, for example, wired and / or wireless communication networks. Communication network 150 may exchange data in circuit-switched and / or packet-switched channels. This network may include telecommunications networks, local area networks, wide area networks, and / or the Internet. For the purposes of this application, unless explained below, the architecture and topology of network 150 may be irrelevant to the operation of this application.

[0073] In one embodiment of this application, Figure 2 The illustration shows the placement of video encoding and decoding devices in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital television (television), storing compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0074] The streaming system may include an acquisition subsystem 213, which may include a video source 201 such as a digital camera, which creates an uncompressed video image stream 202. In an embodiment, the video image stream 202 includes samples captured by a digital camera. The video image stream 202 is depicted as a thick line to emphasize the high data volume of the video image stream compared to encoded video data 204 (or encoded video bitstream 204). The video image stream 202 may be processed by an electronic device 220, which includes a video encoding device 203 coupled to the video source 201. The video encoding device 203 may include hardware, software, or a combination of hardware and software to implement or enforce aspects of the disclosed subject matter as described in more detail below. The encoded video data 204 (or encoded video bitstream 204) is depicted as a thin line to emphasize the lower data volume of the encoded video data 204 (or encoded video bitstream 204), which may be stored on a streaming server 205 for future use. One or more streaming client subsystems, such as Figure 2Client subsystems 206 and 208 can access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204. Client subsystem 206 may include, for example, a video decoding device 210 in electronic device 230. Video decoding device 210 decodes the incoming copy 207 of the encoded video data and produces an output video picture stream 211 that can be displayed on display 212 (e.g., a screen) or another presentation device. In some streaming systems, the encoded video data 204, video data 207, and video data 209 (e.g., video stream) may be encoded according to certain video encoding / compression standards.

[0075] It should be noted that electronic devices 220 and 230 may include other components not shown in the figures. For example, electronic device 220 may include a video decoding device, and electronic device 230 may also include a video encoding device.

[0076] In one embodiment of this application, taking the international video coding standards HEVC (High Efficiency Video Coding) and VVC (Versatile Video Coding), as well as the Chinese national video coding standard AVS, as examples, after an input video frame image, the video frame image is divided into several non-overlapping processing units according to a block size. Each processing unit will perform a similar compression operation. This processing unit is called a CTU (Coding Tree Unit) or LCU (Largest Coding Unit). The CTU can be further subdivided into more refined units to obtain one or more basic coding units (CUs). The CU is the most basic element in a coding process.

[0077] The following introduces some concepts used when encoding a CU:

[0078] Predictive coding includes intra-frame prediction and inter-frame prediction. The original video signal is predicted from a selected reconstructed video signal to obtain a residual video signal. The encoder needs to determine which predictive coding mode to choose for the current CU and inform the decoder. Intra-frame prediction refers to predicting a signal from a region within the same image that has already been encoded and reconstructed; inter-frame prediction refers to predicting a signal from another encoded image (called a reference image) that is different from the current image.

[0079] Transform and Quantization: After the residual video signal undergoes transformation operations such as DFT (Discrete Fourier Transform) and DCT (Discrete Cosine Transform), the signal is transformed into the transform domain, and these are called transform coefficients. The transform coefficients are then subjected to lossy quantization, losing some information to make the quantized signal more suitable for compression. In some video coding standards, there may be more than one transform method to choose from; therefore, the encoder needs to select one of the transform methods for the current CU and inform the decoder. The fineness of quantization is usually determined by the quantization parameter (QP). A larger QP value means that coefficients with a wider range of values ​​will be quantized into the same output, which usually results in greater distortion and a lower bit rate; conversely, a smaller QP value means that coefficients with a smaller range of values ​​will be quantized into the same output, which usually results in less distortion and a higher bit rate.

[0080] Entropy coding, or statistical coding, involves statistically compressing the quantized transform-domain signal based on the frequency of each value, ultimately outputting a binary (0 or 1) compressed bitstream. Simultaneously, other information generated during encoding, such as the selected coding mode and motion vector data, also requires entropy coding to reduce the bit rate. Statistical coding is a lossless coding method that effectively reduces the bit rate required to represent the same signal. Common statistical coding methods include Variable Length Coding (VLC) and Content-Adaptive Binary Arithmetic Coding (CABAC).

[0081] Context-Based Binary Arithmetic Coding (CABAC) primarily involves three steps: binarization, context modeling, and binary arithmetic coding. After binarizing the input syntax elements, the binary data can be encoded using either a regular coding mode or a bypass coding mode. The bypass coding mode eliminates the need to assign a specific probability model to each binary bit; the input binary bit bin value is directly encoded using a simple bypass encoder, thus accelerating the overall encoding and decoding speed. Generally, different syntax elements are not completely independent, and even identical syntax elements possess a certain degree of memory. Therefore, according to conditional entropy theory, using other encoded syntax elements for conditional coding can further improve coding performance compared to independent coding or memoryless coding. This encoded symbol information used as conditions is called the context. In the regular coding mode, the binary bits of the syntax elements sequentially enter the context modeler. The encoder assigns an appropriate probability model to each input binary bit based on the values ​​of previously encoded syntax elements or binary bits; this process is called context modeling. The context model corresponding to a syntax element can be located using `ctxIdxInc(context index increment)` and `ctxIdxStart(context index start)`. After the bin value and the assigned probability model are fed into the binary arithmetic encoder for encoding, the context model needs to be updated based on the bin value, which is the adaptive process in encoding.

[0082] Loop Filtering: The transformed and quantized signal undergoes inverse quantization, inverse transform, and prediction compensation to obtain a reconstructed image. Due to the effects of quantization, the reconstructed image differs from the original image in some aspects, resulting in distortion. Therefore, filtering operations can be performed on the reconstructed image, such as deblocking filters (DB), SAO (Sample Adaptive Offset), or ALF (Adaptive Loop Filter), to effectively reduce the distortion caused by quantization. Since these filtered reconstructed images will serve as a reference for subsequent coded images to predict future image signals, the aforementioned filtering operations are also called loop filtering, i.e., filtering operations within the coding loop.

[0083] In one embodiment of this application, Figure 3 A basic flowchart of a video encoder is shown, illustrating the process using intra-frame prediction as an example. The original image signal s...k [x,y] and the predicted image signal Perform the difference operation to obtain the residual signal u. k [x,y], residual signal u k After transformation and quantization, [x,y] is obtained as quantization coefficients. These coefficients are then used to obtain the encoded bitstream through entropy encoding, and to obtain the reconstructed residual signal u' through inverse quantization and inverse transform. k [x,y], predict image signal With the reconstructed residual signal u' k [x,y] superimposed to generate image signals Image signal On one hand, the signal is input to the intra-frame mode decision module and the intra-frame prediction module for intra-frame prediction processing; on the other hand, the reconstructed image signal s' is output through loop filtering. k [x,y], reconstruct the image signal s' k [x,y] can be used as a reference image for the next frame for motion estimation and motion compensation prediction. Then, based on the result s' of the motion compensation prediction... r [x+m x ,y+m y ] and intra-frame prediction results Obtain the predicted image signal for the next frame. And continue repeating the above process until the coding is complete.

[0084] Furthermore, since the non-zero coefficients in the quantized coefficient block after transformation and quantization of the residual signal are more likely to be concentrated in the left and upper regions of the block, while the right and lower regions are often 0, the SRCC technique is introduced. SRCC marks the size SRx×SRy of the upper left region of non-zero coefficients within each quantized coefficient block (size W×H), where SRx is the x-coordinate of the rightmost non-zero coefficient in the block, and SRy is the y-coordinate of the bottommost non-zero coefficient, with 1≤SRx≤W and 1≤SRy≤H. Coefficients outside this region are all 0. SRCC uses (SRx, SRy) to determine the quantized coefficient region to be scanned within a quantized coefficient block. Figure 4 As shown, only the quantization coefficients within the scan region marked (SRx, SRy) need to be encoded, and the encoding scan order is as follows. Figure 5 As shown, it can be a reverse Z-shaped scan from the bottom right corner to the top left corner.

[0085] Based on the above encoding process, at the decoding end, for each CU, after acquiring the compressed bitstream (i.e., bitstream), entropy decoding is performed to obtain various mode information and quantization coefficients. Then, the quantization coefficients undergo inverse quantization and inverse transform processing to obtain the residual signal. On the other hand, based on the known encoding mode information, the prediction signal corresponding to that CU can be obtained. Then, the residual signal and the prediction signal are added together to obtain the reconstructed signal. The reconstructed signal then undergoes loop filtering and other operations to generate the final output signal.

[0086] Currently, mainstream video coding standards (such as HEVC, VVC, and AVS3) all employ a block-based hybrid coding framework. Specifically, the original video data is divided into a series of coded blocks, and video coding methods such as prediction, transform, and entropy coding are combined to achieve video data compression. Motion compensation is a commonly used prediction method in video coding. Based on the redundancy characteristics of video content in the temporal or spatial domains, motion compensation derives the predicted value of the current coded block from the already coded regions. These prediction methods include inter-frame prediction, intra-frame block copy prediction, and intra-frame string copy prediction. In specific coding implementations, these prediction methods may be used individually or in combination. For coded blocks using these prediction methods, one or more two-dimensional displacement vectors are typically explicitly or implicitly encoded in the bitstream to indicate the displacement of the current block (or its sibling blocks) relative to one or more reference blocks.

[0087] It should be noted that the displacement vector may have different names under different prediction modes and different implementations. In the embodiments of this application, it is uniformly described in the following way: 1) The displacement vector in inter-frame prediction is called the motion vector (MV); 2) The displacement vector in intra-frame block copy is called the block vector (BV); 3) The displacement vector in intra-frame string copy is called the string vector.

[0088] like Figure 6 As shown, inter-frame prediction utilizes the temporal correlation of video, using pixels from neighboring encoded images to predict pixels in the current image, effectively removing temporal redundancy and saving bits of encoded residual data. Here, P represents the current frame, Pr represents the reference frame, B represents the current coded block, and Br represents the reference block of B. The coordinates of B' in the reference frame are the same as the coordinates of B in the current frame, and the coordinates of Br are (x...). r ,y r The coordinates of B' are (x, y). The displacement between the current coded block and its reference block is called the motion vector (MV), where MV = (x, y). r -x,y r -y).

[0089] Intra Block Copy (IBC) is an encoding tool adopted in the HEVC Screen Content Coding (SCC) extension, significantly improving the encoding efficiency of screen content. AVS3 and VVC also employ IBC to enhance screen content encoding performance. IBC leverages the spatial correlation of screen content video, using pixels from already encoded images in the current frame to predict the pixels of the current block to be encoded, effectively saving the bits required to encode pixels. Figure 7 As shown, in IBC, the displacement between the current block and its reference block is called the block displacement vector (BV). H.266 / VVC uses a technique similar to inter-frame prediction BV to further save the bits required to encode the BV.

[0090] The SIBC processing procedure is as follows: Figure 8 As shown, during the encoding process, the reference block is horizontally or vertically flipped to obtain the prediction block; this process can be called the prediction block reconstruction process. Furthermore, during encoding, `sibc_flag` and `sibc_dir_flag` need to be encoded. `sibc_flag` indicates whether the encoded block uses SIBC; if SIBC is used, `sibc_dir_flag` indicates the specific flipping method. Obviously, this method of explicitly encoding an index reduces encoding and decoding efficiency. Based on this, the technical solution of this application proposes to implicitly indicate the reconstruction process of generating the prediction block from the reference block using the quantization coefficients in the quantization coefficient block, eliminating the need for explicit index encoding in the bitstream at the encoding end, thereby effectively improving video encoding and decoding efficiency.

[0091] The implementation details of the technical solutions in the embodiments of this application are described in detail below:

[0092] Figure 9 A flowchart of a video decoding method according to an embodiment of this application is shown. This video decoding method can be executed by a device with computing processing capabilities, such as a terminal device or a server. (Refer to...) Figure 9 As shown, this video decoding method includes at least steps S910 to S940, which are described in detail below:

[0093] In step S910, the coded block using the intra-block copy mode is decoded to obtain the quantization coefficient block and block vector corresponding to the coded block.

[0094] In one embodiment of this application, the video image frame sequence includes a series of images, each of which can be further divided into slices, and each slice can be further divided into a series of LCUs (or CTUs), with each LCU containing several CUs. Video image frames are encoded in blocks. In some newer video coding standards, such as H.264, there are macroblocks (MBs), which can be further divided into multiple prediction blocks for predictive coding. In the HEVC standard, basic concepts such as coding units (CUs), prediction units (PUs), and transform units (TUs) are used to functionally divide various block units, and a novel tree-based structure is used for description. For example, a CU can be divided into smaller CUs according to a quadtree, and these smaller CUs can be further divided to form a quadtree structure. In the embodiments of this application, the coding block can be a CU, or a block smaller than a CU, such as a smaller block obtained by dividing a CU.

[0095] In one embodiment of this application, the coded block using intra-block copy mode is decoded to obtain the quantization coefficient block corresponding to the coded block, which is the quantization coefficient block of the residual data. The decoded block vector is the BV between the current coded block and the reference block.

[0096] In step S920, the quantization coefficients within a specified area of ​​the quantization coefficient block are statistically analyzed to obtain the quantization coefficient statistical results.

[0097] In one embodiment of this application, when performing statistical analysis on the quantization coefficients within a specified region of the quantization coefficient block, the statistical results of the quantization coefficients can be calculated in the following manner:

[0098] This function can calculate the sum of the quantization coefficients within a specified region and use the sum as the quantization coefficient statistical result; or it can calculate the sum of the absolute values ​​of the quantization coefficients within a specified region and use the sum as the quantization coefficient statistical result; or it can calculate the sum of the quantization coefficients within a specified region whose values ​​are odd and use the sum as the quantization coefficient statistical result; or it can calculate the sum of the absolute values ​​of the quantization coefficients within a specified region whose values ​​are odd and use the sum as the quantization coefficient statistical result; or it can calculate the sum of the quantization coefficients within a specified region whose values ​​are even or non-zero even and use the sum as the quantization coefficient statistical result; or it can calculate the sum of the absolute values ​​of the quantization coefficients within a specified region whose values ​​are even or non-zero even and use the sum as the quantization coefficient statistical result.

[0099] In one embodiment of this application, when performing statistics on the quantization coefficients within the aforementioned designated area, the values ​​of the quantization coefficients within the designated area can be linearly mapped, and then the sum of the values ​​or absolute values ​​of the quantization coefficients within the designated area after the linear mapping can be calculated, and the resulting sum can be used as the statistical result of the quantization coefficients.

[0100] In one embodiment of this application, the linear mapping described above may be to convert the values ​​of quantization coefficients with odd values ​​within the specified region to a first value, and the values ​​of quantization coefficients with even values ​​to a second value, wherein one of the first value and the second value is odd and the other is even. For example, the values ​​of quantization coefficients with odd values ​​within the specified region may be converted to 1, and the values ​​of quantization coefficients with even values ​​may be converted to 0; or the values ​​of quantization coefficients with odd values ​​within the specified region may be converted to 0, and the values ​​of quantization coefficients with even values ​​may be converted to 1; or the values ​​of quantization coefficients with odd values ​​within the specified region may be converted to 3, and the values ​​of quantization coefficients with even values ​​may be converted to 2; or the values ​​of quantization coefficients with odd values ​​within the specified region may be converted to 2, and the values ​​of quantization coefficients with even values ​​may be converted to 3.

[0101] In one embodiment of this application, the linear mapping described above may be to convert the values ​​of non-zero quantization coefficients within the specified region into a third value, and to convert the values ​​of quantization coefficients with a value of zero into a fourth value, wherein one of the third value and the fourth value is odd and the other is even. For example, converting the values ​​of non-zero quantization coefficients within the specified region into 1 and converting the values ​​of quantization coefficients with a value of zero into 0; or converting the values ​​of non-zero quantization coefficients within the specified region into 0 and converting the values ​​of quantization coefficients with a value of zero into 1; or converting the values ​​of non-zero quantization coefficients within the specified region into 3 and converting the values ​​of quantization coefficients with a value of zero into 2; or converting the values ​​of non-zero quantization coefficients within the specified region into 2 and converting the values ​​of quantization coefficients with a value of zero into 3.

[0102] In one embodiment of this application, the linear mapping described above can be a reduction of the quantization coefficient values ​​within the specified region by a fifth value. For example, the quantization coefficient values ​​within the specified region can be reduced by 1 or 2.

[0103] In one embodiment of this application, the linear mapping described above can be achieved by increasing the value of the quantization coefficients within the specified region by a certain number. For example, the value of all quantization coefficients within the specified region can be increased by 1 or by 2.

[0104] In one embodiment of this application, the aforementioned linear mapping may be multiplying the values ​​of the quantization coefficients within the specified region by a non-zero sixth value. For example, multiplying all the values ​​of the quantization coefficients within the specified region by 1 or by 2. Optionally, the sixth value may be a non-zero even number, such as 2, 4, or 6.

[0105] In one embodiment of this application, the linear mapping described above can be achieved by dividing the values ​​of the quantization coefficients within the specified region by a non-zero value. For example, dividing all the values ​​of the quantization coefficients within the specified region by 1 or by 2. Optionally, the value can be a non-zero even number, such as 2, 4, or 6.

[0106] In one embodiment of this application, the linear mapping described above may be to convert the numerical values ​​of the quantization coefficients within the specified region into their opposites.

[0107] In summary, the embodiments of this application can perform statistical analysis on the quantization coefficients within the aforementioned specified region in the following ways:

[0108] 1. Directly sum the values ​​of the quantization coefficients within a specified area;

[0109] 2. Calculate the sum of the absolute values ​​of the quantization coefficients within a specified area;

[0110] 3. Directly sum the values ​​of quantization coefficients that are odd numbers within a specified area;

[0111] 4. Calculate the sum of the absolute values ​​of the quantization coefficients within a specified region that are odd numbers;

[0112] 5. Directly sum the values ​​of quantization coefficients within a specified region that are even or non-zero even.

[0113] 6. Calculate the sum of the absolute values ​​of the quantization coefficients within a specified region that are even or non-zero even numbers;

[0114] 7. First, convert odd and even numbers according to the parity of the quantization coefficients in the specified area, and then sum all the converted values ​​in the specified area.

[0115] 8. First, convert odd and even numbers according to the parity of the quantization coefficients in the specified area, and then sum the absolute values ​​of all converted numbers in the specified area.

[0116] 9. First, perform numerical conversion based on the non-zero quantization coefficients and zero quantization coefficients within the specified area, and then sum all the converted values ​​within the specified area.

[0117] 10. First, perform numerical conversion based on the non-zero quantization coefficients and zero quantization coefficients within the specified area, and then sum the absolute values ​​of all converted values ​​within the specified area.

[0118] 11. First, perform numerical conversion operations such as increasing, decreasing, multiplying by a non-zero multiple, dividing by a non-zero multiple, or finding the opposite of all quantization coefficients within the specified area, and then sum all the converted values ​​within the specified area.

[0119] 12. First, perform numerical conversion operations such as increasing, decreasing, multiplying by a non-zero multiple, dividing by a non-zero multiple, or finding the opposite number on all quantization coefficients within the specified area. Then, sum the absolute values ​​of all converted values ​​within the specified area.

[0120] Of course, there are other ways, such as first converting the quantization coefficients in the specified area using the conversion methods mentioned in 7 to 12, and then summing only the odd or even numbers after conversion.

[0121] In one embodiment of this application, the designated region mentioned above may be the entire region in the quantization coefficient block.

[0122] In one embodiment of this application, the specified region may be one or more locations specified in the quantization coefficient block.

[0123] In one embodiment of this application, the designated region described above may be at least one row specified in the quantization coefficient block. For example... Figure 10 As shown, assuming the quantization coefficient block is a 4×4 block, with each square representing a quantization coefficient, then it can be done as follows: Figure 10 As shown in (a), the first row of the gray area is used as the specified area; or it can be done as follows: Figure 10 As shown in (b), the two rows of the gray area are used as the specified area. Optionally, this at least one row can be the top row in the quantization coefficient block.

[0124] In one embodiment of this application, the designated region described above may be at least one column specified in the quantization coefficient block. For example... Figure 10 As shown, assuming the quantization coefficient block is a 4×4 block, with each square representing a quantization coefficient, then it can be done as follows: Figure 10 As shown in (c), column 1 of the gray area is used as the specified area; or it can be done as follows: Figure 10 As shown in (d), the two columns of the gray area are designated as the specified region. Optionally, at least one of these columns can be the leftmost column in the quantization coefficient block.

[0125] In one embodiment of this application, the designated region described above may be at least one row and at least one column specified in the quantization coefficient block. For example... Figure 11 As shown, assuming the quantization coefficient block is a 4×4 block, with each square representing a quantization coefficient, then it can be done as follows: Figure 11As shown in (a), the bottom row and the right column (i.e., the gray area) are designated as the area; or it can be as follows: Figure 11 As shown in (b), the bottom two rows and the right two columns (i.e., the gray area) are designated as the area; or it can be done as follows: Figure 11 As shown in (c), the top row and the left column (i.e., the gray area) are designated as the area; or it can be done as follows: Figure 11 As shown in (d), the top two rows and the left two columns (i.e., the gray areas) are designated as the area.

[0126] In one embodiment of this application, the designated region described above may be a position within a quantization coefficient block located on at least one diagonal line. For example... Figure 12 As shown, assuming the quantization coefficient block is a 4×4 coefficient block, with each block representing a quantization coefficient, then as shown in (a) and (b) of 12, the position on one diagonal line can be used as the designated area; or as shown in (c) and (d) of 12, the position on two diagonal lines can be used as the designated area.

[0127] In one embodiment of this application, the designated region mentioned above may be an SRCC region within the quantization coefficient block. The SRCC region is the scan region marked using SRCC technology.

[0128] In one embodiment of this application, the designated region mentioned above may be one or more locations specified in the SRCC region. Optionally, the one or more locations specified in the SRCC region may include: the first N locations in the scanning order, or the middle N locations in the scanning order, or the last N locations in the scanning order, etc., where N is a non-zero natural number.

[0129] In one embodiment of this application, the designated area described above may be at least one row specified in the SRCC area. For example... Figure 10 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then it can be represented as follows: Figure 10 As shown in (a), the first row of the gray area is used as the specified area; or it can be done as follows: Figure 10 As shown in (b), the two rows of the gray area are used as the specified area. Optionally, this at least one row can be the top row in the quantization coefficient block.

[0130] In one embodiment of this application, the designated region described above may be at least one column specified in the SRCC region. For example... Figure 10 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then it can be represented as follows: Figure 10 As shown in (c), column 1 of the gray area is used as the specified area; or it can be done as follows: Figure 10 As shown in (d), the two columns of the gray area are designated as the specified region. Optionally, at least one of these columns can be the leftmost column in the quantization coefficient block.

[0131] In one embodiment of this application, the designated area described above may be at least one row and at least one column specified in the SRCC area. For example... Figure 11 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then it can be represented as follows: Figure 11 As shown in (a), the bottom row and the right column (i.e., the gray area) are designated as the area; or it can be as follows: Figure 11 As shown in (b), the bottom two rows and the right two columns (i.e., the gray area) are designated as the area; or it can be done as follows: Figure 11 As shown in (c), the top row and the left column (i.e., the gray area) are designated as the area; or it can be done as follows: Figure 11 As shown in (d), the top two rows and the left two columns (i.e., the gray areas) are designated as the area.

[0132] In one embodiment of this application, the designated area described above may be located within the SRCC region on at least one diagonal line. For example... Figure 12 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then as shown in (a) and (b) of 12, the position on one diagonal line can be used as the designated region; or as shown in (c) and (d) of 12, the position on two diagonal lines can be used as the designated region.

[0133] In other embodiments of this application, the region division methods described above can be combined to use the combined region as the designated region.

[0134] In step S930, based on the statistical results of the quantization coefficients, the reconstruction processing method for generating prediction blocks from reference blocks is implicitly derived.

[0135] In one embodiment of this application, the reconstruction processing method may include at least one of the following: whether it is an extended intra-block copy mode; horizontal flip processing in the extended intra-block copy mode (i.e., horizontal flip processing of the reference block); vertical flip processing in the extended intra-block copy mode (i.e., vertical flip processing of the reference block); rotation processing of the reference block; mirror processing of the reference block; intra-block filtering processing of the reference block; filtering processing of the reference block in combination with out-of-block reconstructed pixels; rearrangement processing of the coefficients in the reference block, etc.

[0136] It should be noted that if multiple refactoring methods are selected, there is no specific order in which these methods are processed.

[0137] In one embodiment of this application, the reconstruction processing method can be implicitly derived based on the parity of the quantization coefficient statistical results. For example, if the quantization coefficient statistical results are odd, the reconstruction processing method is determined to be the first processing method; if the quantization coefficient statistical results are even, the reconstruction processing method is determined to be the second processing method.

[0138] Specifically, for example, if the quantization coefficient statistics result is odd, the implicit derived reference block uses the extended intra-block copy mode to generate the prediction block; if the quantization coefficient statistics result is even, the implicit derived reference block does not use the extended intra-block copy mode to generate the prediction block.

[0139] For example, if the quantization coefficient statistics result is odd, the implicit derived reference block uses horizontal flipping processing in the extended intra-block copy mode to generate the prediction block; if the quantization coefficient statistics result is even, the implicit derived reference block uses vertical flipping processing in the extended intra-block copy mode to generate the prediction block.

[0140] In one embodiment of this application, the remainder of the quantization coefficient statistical result relative to a set value can be calculated. Then, based on the correspondence between the remainder and the reconstruction processing method, a reconstruction processing method corresponding to the remainder of the quantization coefficient statistical result relative to the set value can be selected. This set value can be any non-zero number, such as 2, 3, 4, 5, etc. Optionally, the correspondence between the remainder and the reconstruction processing method is preset based on the value of the remainder and the selectable reconstruction processing method.

[0141] Specifically, for example, if the value is set to 2, then a remainder of 0 indicates that the reference block generates the prediction block using the extended intra-block copy mode; a remainder of 1 indicates that the reference block generates the prediction block not using the extended intra-block copy mode.

[0142] For example, if the value is set to 3, then a remainder of 0 indicates that the reference block generates the prediction block using the horizontal flip processing in the extended intra-block copy mode; a remainder of 1 indicates that the reference block generates the prediction block using the vertical flip processing in the extended intra-block copy mode; and a remainder of 2 indicates that the reference block generates the prediction block using the clockwise 90° rotation processing in the extended intra-block copy mode.

[0143] In step S940, the reference block pointed to by the block vector is processed according to the reconstruction processing method to obtain the prediction block corresponding to the coded block.

[0144] In one embodiment of this application, after obtaining the prediction block corresponding to the coded block, the prediction block and the reconstructed residual data can be combined to generate reconstructed image data.

[0145] It should be noted that if all quantization coefficients in the decoded quantization coefficient block are 0, the reconstruction processing method cannot be implicitly derived by statistically analyzing the quantization coefficients in the quantization coefficient block. In this case, the reconstruction processing method can be determined by explicit indexing during decoding. However, when not all quantization coefficients in the decoded quantization coefficient block are 0, the quantization coefficients within a specified region of the quantization coefficient block are statistically analyzed using the aforementioned embodiment, and the reconstruction processing method is implicitly derived from the statistical results of the quantization coefficients.

[0146] Based on the technical solutions of the foregoing embodiments, in one embodiment of this application, it can be determined whether the corresponding coded block needs to be reconstructed by generating a prediction block from a reference block based on the statistical results of the quantization coefficients, according to at least one of the following methods:

[0147] The value of the index identifier contained in the sequence header of the coded block corresponding to the video image frame sequence;

[0148] The value of the index identifier contained in the image header of the coded block corresponding to the video image frame;

[0149] Size of the encoded block.

[0150] Specifically, when determining whether the corresponding coded block needs to implicitly derive the reconstruction process of generating the prediction block from the reference block based on the quantization coefficient statistics, the following methods can be used:

[0151] 1. This is indicated by the index identifier in the sequence header of the coded block corresponding to the video image frame sequence. For example, if the index identifier in the sequence header is 1 (the value is only an example), it means that all coded blocks corresponding to the video image frame sequence need to implicitly derive the reconstruction processing method of generating prediction blocks from reference blocks based on the quantization coefficient statistics. Then, based on the technical solution of the aforementioned embodiment, the quantization coefficients in the quantization coefficient block obtained by decoding the coded block can be statistically analyzed, and the reconstruction processing method of generating prediction blocks from reference blocks can be implicitly derived based on the quantization coefficient statistics.

[0152] 2. This is indicated by the index identifier in the image header of the coded block corresponding to the video image frame. For example, if the index identifier in the image header is 1 (the value is only an example), it means that all coded blocks corresponding to the video image frame need to implicitly derive the reconstruction processing method of generating prediction blocks from reference blocks based on the quantization coefficient statistics. Then, based on the technical solution of the aforementioned embodiment, the quantization coefficients in the quantization coefficient block obtained by decoding the coded block can be statistically analyzed, and the reconstruction processing method of generating prediction blocks from reference blocks can be implicitly derived based on the quantization coefficient statistics.

[0153] 3. Indication can be made through the size of the encoded block. For example, if the size of an encoded block is smaller than a set value, it means that the encoded block needs to implicitly derive the reconstruction processing method of generating the prediction block from the reference block based on the statistical results of the quantization coefficients. Then, based on the technical solution of the aforementioned embodiment, the quantization coefficients in the quantization coefficient block obtained by decoding the encoded block can be statistically analyzed, and the reconstruction processing method of generating the prediction block from the reference block can be implicitly derived based on the statistical results of the quantization coefficients.

[0154] 4. Instructions can be given using two or more of the methods 1 to 3 mentioned above.

[0155] For example, the index identifier in the sequence header of the coded block corresponding to the video image frame sequence, the index identifier in the image header of the coded block corresponding to the video image frame, and the size of the coded block can all be used to indicate this. Specifically, if the index identifier in the sequence header is 1 (the value is only an example), the index identifier in the image header is 1 (the value is only an example), and the size of the coded block is smaller than a set size, then it means that the coded block needs to implicitly derive the reconstruction processing method of generating the prediction block from the reference block based on the quantization coefficient statistical results. Then, based on the technical solution of the aforementioned embodiment, the quantization coefficients in the quantization coefficient block obtained by decoding the coded block can be statistically analyzed, and the reconstruction processing method of generating the prediction block from the reference block can be implicitly derived based on the quantization coefficient statistical results.

[0156] In one embodiment of this application, since the existing standard SIBC technology has two flag bits, namely sibc_flag and sibc_dir_flag, in one embodiment of this application, the quantization coefficient statistical results in two specified regions can be used to implicitly derive the value of sibc_flag (i.e. whether it is SIBC) from the quantization coefficient statistical results in one specified region, and the quantization coefficient statistical results in the other specified region can be used to implicitly derive the value of sibc_dir_flag (i.e. which SIBC processing method is used).

[0157] Of course, as described in the previous embodiments, the sibc_flag or sibc_dir_flag can also be implicitly derived through the statistical results of quantization coefficients within a specified region. Specifically, the sibc_dir_flag can be implicitly derived through the parity of the number of even coefficients within a specified region. For example, if the number of even coefficients within the specified region is odd, the implicitly derived value of sibc_dir_flag is 1 (this is just an example; it could also be 0); if the number of even coefficients within the specified region is even, the implicitly derived value of sibc_dir_flag is 0 (this is just an example).

[0158] Figure 13A flowchart of a video encoding method according to an embodiment of this application is shown. This video encoding method can be executed by a device with computing processing capabilities, such as a terminal device or a server. (Refer to...) Figure 13 As shown, the video encoding method includes at least steps S1310 to S1340, which are described in detail below:

[0159] In step S1310, the reference block of the current block to be encoded is reconstructed to obtain the prediction block;

[0160] In step S1320, residual data is calculated based on the current block to be encoded and the prediction block, the residual block is transformed or skipped, and quantization is performed to obtain the quantization coefficient block.

[0161] In step S1330, the quantization coefficients in the quantization coefficient block are adjusted so that the statistical results based on the adjusted quantization coefficients implicitly indicate the reconstruction processing method for generating the prediction block from the reference block.

[0162] In step S1340, the block vector between the current block to be encoded and the reference block, as well as the quantization coefficient block after quantization coefficient adjustment, are encoded to obtain the encoded bitstream.

[0163] It should be noted that the processing at the encoding end is similar to that at the decoding end, such as the reconstruction processing method adopted for the reference block, which will not be elaborated further.

[0164] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments described above.

[0165] Figure 14 A block diagram of a video decoding apparatus according to an embodiment of the present application is shown. The video decoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.

[0166] Reference Figure 14 As shown, a video decoding apparatus 1400 according to an embodiment of this application includes: a decoding unit 1402, a statistics unit 1404, a first processing unit 1406, and a second processing unit 1408.

[0167] The decoding unit 1402 is configured to decode the coded block using the intra-block copy mode to obtain the quantization coefficient block and block vector corresponding to the coded block; the statistics unit 1404 is configured to perform statistics on the quantization coefficients in a specified region of the quantization coefficient block to obtain quantization coefficient statistics results; the first processing unit 1406 is configured to implicitly derive the reconstruction processing method of generating a prediction block from a reference block based on the quantization coefficient statistics results; and the second processing unit 1408 is configured to process the reference block pointed to by the block vector according to the reconstruction processing method to obtain the prediction block corresponding to the coded block.

[0168] In some embodiments of this application, based on the foregoing scheme, the statistical unit 1404 is configured to: calculate the sum of the values ​​of the quantization coefficients within the specified region, and use the resulting sum as the statistical result of the quantization coefficients; or

[0169] Calculate the sum of the absolute values ​​of the quantization coefficients within the specified region, and use the sum as the statistical result of the quantization coefficients; or

[0170] Calculate the sum of the quantization coefficients with odd values ​​within the specified region, and use the sum as the statistical result of the quantization coefficients; or

[0171] Calculate the sum of the absolute values ​​of the quantization coefficients with odd values ​​within the specified region, and use the sum as the statistical result of the quantization coefficients; or

[0172] Calculate the sum of the quantization coefficients within the specified region that are even or non-zero even, and use the sum as the statistical result of the quantization coefficients; or

[0173] Calculate the sum of the absolute values ​​of the quantization coefficients within the specified region that are even or non-zero even, and use the sum as the statistical result of the quantization coefficients.

[0174] In some embodiments of this application, based on the foregoing scheme, the statistical unit 1404 is configured to: linearly map the values ​​of the quantization coefficients within the specified region, calculate the sum of the values ​​or absolute values ​​of the quantization coefficients within the specified region after the linear mapping, and use the resulting sum as the statistical result of the quantization coefficients, wherein the linear mapping includes:

[0175] Convert the quantization coefficients with odd values ​​within the specified region to a first value, and convert the quantization coefficients with even values ​​to a second value, wherein one of the first value and the second value is odd, and the other is even; or

[0176] Convert the values ​​of non-zero quantization coefficients within the specified region to a third value, and convert the values ​​of quantization coefficients with a value of zero to a fourth value, wherein one of the third value and the fourth value is odd and the other is even; or

[0177] Decrease or increase the value of the quantization coefficient within the specified region by a fifth value; or

[0178] Multiply or divide the value of the quantization coefficient within the specified region by a non-zero sixth value; or

[0179] Multiply or divide the value of the quantization coefficient within the specified region by a non-zero even number.

[0180] In some embodiments of this application, based on the foregoing scheme, the designated region includes at least one of the following regions:

[0181] The entire region within the quantization coefficient block;

[0182] One or more positions specified in the quantization coefficient block;

[0183] At least one row specified in the quantization coefficient block;

[0184] At least one column specified in the quantization coefficient block;

[0185] The quantization coefficient block specifies at least one row and at least one column;

[0186] The quantization coefficient block is located on at least one diagonal line;

[0187] The scan region coefficient encoding SRCC region in the quantization coefficient block;

[0188] One or more locations are specified in the SRCC region;

[0189] At least one row specified in the SRCC area;

[0190] At least one column is specified in the SRCC region;

[0191] The SRCC area specifies at least one row and at least one column;

[0192] The SRCC region is located on at least one diagonal line.

[0193] In some embodiments of this application, based on the foregoing scheme, the one or more positions specified in the SRCC region include: the first N positions in the scanning order or the N positions in the middle of the scanning order, where N is a non-zero natural number.

[0194] In some embodiments of this application, based on the foregoing scheme, the first processing unit 1406 is configured to: if the statistical result of the quantization coefficient is odd, then determine the reconstruction processing method as the first processing method; if the statistical result of the quantization coefficient is even, then determine the reconstruction processing method as the second processing method.

[0195] In some embodiments of this application, based on the foregoing scheme, the first processing unit 1406 is configured to: calculate the remainder of the statistical result of the quantization coefficient relative to a set value; and select a reconstruction processing method corresponding to the remainder of the statistical result of the quantization coefficient relative to the set value according to the correspondence between the remainder and the reconstruction processing method.

[0196] In some embodiments of this application, based on the foregoing scheme, the correspondence between the remainder and the reconstruction processing method is preset according to the value of the remainder and the optional reconstruction processing method.

[0197] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1400 further includes: a third processing unit, configured to, after obtaining the quantization coefficient block, determine whether all quantization coefficients in the quantization coefficient block are 0; if not all quantization coefficients in the quantization coefficient block are 0, then the statistics unit performs a process of statistical analysis on the quantization coefficients in a specified region of the quantization coefficient block; if all quantization coefficients in the quantization coefficient block are 0, then the reconstruction processing method is determined by the explicit index obtained through decoding.

[0198] In some embodiments of this application, based on the foregoing scheme, the reconstruction processing method includes at least one of the following: whether it is an extended intra-block copy mode; horizontal flip processing in the extended intra-block copy mode; vertical flip processing in the extended intra-block copy mode.

[0199] In some embodiments of this application, based on the foregoing scheme, the first processing unit 1406 is further configured to: determine whether the corresponding coding block needs to implicitly derive the reconstruction processing method of generating a prediction block from a reference block based on the quantization coefficient statistical results according to at least one of the following methods: the value of the index identifier contained in the sequence header of the coding block corresponding to the video image frame sequence; the value of the index identifier contained in the image header of the coding block corresponding to the video image frame; and the size of the coding block.

[0200] Figure 15 A block diagram of a video encoding apparatus according to an embodiment of the present application is shown. The video encoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.

[0201] Reference Figure 15As shown, a video encoding apparatus 1500 according to an embodiment of this application includes: a fourth processing unit 1502, a fifth processing unit 1504, an adjustment unit 1506, and an encoding unit 1508.

[0202] The fourth processing unit 1502 is configured to reconstruct the reference block of the current block to be encoded to obtain a prediction block; the fifth processing unit 1504 calculates residual data based on the current block to be encoded and the prediction block, performs transformation or skip transformation processing on the residual block, and performs quantization processing to obtain a quantization coefficient block; the adjustment unit 1506 is configured to adjust the quantization coefficients in the quantization coefficient block to implicitly indicate the reconstruction processing method of generating the prediction block from the reference block based on the statistical results of the adjusted quantization coefficients; and the encoding unit 1508 is configured to encode the block vector between the current block to be encoded and the reference block, as well as the quantization coefficient block after quantization coefficient adjustment, to obtain the encoded bitstream.

[0203] Figure 16 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.

[0204] It should be noted that, Figure 16 The computer system 1600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0205] like Figure 16 As shown, the computer system 1600 includes a Central Processing Unit (CPU) 1601, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1602 or programs loaded from storage portion 1608 into Random Access Memory (RAM) 1603, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1603. The CPU 1601, ROM 1602, and RAM 1603 are interconnected via bus 1604. An input / output (I / O) interface 1605 is also connected to bus 1604.

[0206] The following components are connected to I / O interface 1605: an input section 1606 including a keyboard, mouse, etc.; an output section 1607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1608 including a hard disk, etc.; and a communication section 1609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to I / O interface 1605 as needed. Removable media 1611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1610 as needed so that computer programs read from them can be installed into storage section 1608 as needed.

[0207] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1609, and / or installed from removable medium 1611. When the computer program is executed by central processing unit (CPU) 1601, it performs various functions defined in the system of this application.

[0208] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0209] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0210] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0211] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0212] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0213] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0214] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0215] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A video decoding method, characterized in that, include: Decoding is performed on the coded block using intra-block copy mode to obtain the quantization coefficient block and block vector corresponding to the coded block; The quantization coefficients within a specified region of the quantization coefficient block are statistically analyzed to obtain quantization coefficient statistical results; wherein, the specified region includes a first specified region and a second specified region, the quantization coefficient statistical results within the first specified region are the first quantization coefficient statistical results, and the quantization coefficient statistical results within the second specified region are the second quantization coefficient statistical results; The value of the first flag bit is implicitly derived based on the parity of the statistical results of the first quantization coefficients or the remainder with respect to a set value; the value of the second flag bit is implicitly derived based on the parity of the statistical results of the second quantization coefficients or the remainder with respect to a set value; wherein, the value of the first flag bit is used to indicate whether the coding block adopts the extended intra-block copy mode, and the value of the second flag bit is used to indicate the reconstruction processing method corresponding to the coding block, the reconstruction processing method including horizontal flipping or vertical flipping of the reference block of the coding block; If the value of the first flag indicates that the coded block adopts an extended intra-block copy mode, then the reference block pointed to by the block vector is flipped according to the reconstruction processing method indicated by the value of the second flag, so as to obtain the prediction block corresponding to the coded block.

2. The video decoding method according to claim 1, characterized in that, The quantization coefficients within a specified region of the quantization coefficient block are statistically analyzed to obtain the quantization coefficient statistical results, including: Calculate the sum of the quantization coefficients within the specified region, and use the sum as the statistical result of the quantization coefficients; or Calculate the sum of the absolute values ​​of the quantization coefficients within the specified region, and use the sum as the statistical result of the quantization coefficients; or Calculate the sum of the quantization coefficients with odd values ​​within the specified region, and use the sum as the statistical result of the quantization coefficients; or Calculate the sum of the absolute values ​​of the quantization coefficients with odd values ​​within the specified region, and use the sum as the statistical result of the quantization coefficients; or Calculate the sum of the quantization coefficients within the specified region that are even or non-zero even, and use the sum as the statistical result of the quantization coefficients; or Calculate the sum of the absolute values ​​of the quantization coefficients within the specified region that are even or non-zero even, and use the sum as the statistical result of the quantization coefficients.

3. The video decoding method according to claim 1, characterized in that, The quantization coefficients within a specified region of the quantization coefficient block are statistically analyzed to obtain the quantization coefficient statistical results, including: The values ​​of the quantization coefficients within the specified region are linearly mapped, and the sum of the values ​​or absolute values ​​of the quantization coefficients within the specified region after the linear mapping is calculated. The resulting sum is used as the statistical result of the quantization coefficients. The linear mapping includes: Convert the quantization coefficients with odd values ​​within the specified region to a first value, and convert the quantization coefficients with even values ​​to a second value, wherein one of the first value and the second value is odd, and the other is even; or Convert the values ​​of non-zero quantization coefficients within the specified region to a third value, and convert the values ​​of quantization coefficients with a value of zero to a fourth value, wherein one of the third value and the fourth value is odd and the other is even; or Decrease or increase the value of the quantization coefficient within the specified region by a fifth value; or Multiply or divide the value of the quantization coefficient within the specified region by a non-zero sixth value; or Multiply or divide the value of the quantization coefficient within the specified region by a non-zero even number.

4. The video decoding method according to claim 1, characterized in that, The designated region includes at least one of the following regions: The entire region within the quantization coefficient block; One or more positions specified in the quantization coefficient block; At least one row specified in the quantization coefficient block; At least one column specified in the quantization coefficient block; The quantization coefficient block specifies at least one row and at least one column; The quantization coefficient block is located on at least one diagonal line; The scan region coefficient encoding SRCC region in the quantization coefficient block; One or more locations are specified in the SRCC region; At least one row is specified in the SRCC area; At least one column is specified in the SRCC region; The SRCC area specifies at least one row and at least one column; The SRCC region is located on at least one diagonal line.

5. The video decoding method according to claim 4, characterized in that, The one or more positions specified in the SRCC region include: the first N positions in the scan order or the N positions in the middle of the scan order, where N is a non-zero natural number.

6. The video decoding method according to claim 1, characterized in that, Based on the parity of the statistical results of the first quantization coefficient, the value of the first flag bit is implicitly derived, including: If the statistical result of the first quantization coefficient is odd, then the first flag bit is determined to be the first value; If the statistical result of the first quantization coefficient is even, then the first flag bit is determined to be the second value.

7. The video decoding method according to claim 1, characterized in that, Based on the remainder of the statistical result of the first quantization coefficient relative to the set value, the value of the first flag bit is implicitly derived, including: Based on the correspondence between the remainder and the value of the first flag, the value corresponding to the remainder of the statistical result of the first quantization coefficient relative to the set value is taken as the value of the first flag.

8. The video decoding method according to claim 7, characterized in that, The correspondence is preset based on the value of the remainder and the selectable value of the first flag bit.

9. The video decoding method according to claim 1, characterized in that, Based on the parity of the statistical results of the second quantization coefficient, the value of the second flag is implicitly derived, including: If the statistical result of the second quantization coefficient is odd, then the second flag is determined to be the first value; If the statistical result of the second quantization coefficient is even, then the second flag is determined to be the second value.

10. The video decoding method according to claim 1, characterized in that, Based on the remainder of the statistical result of the second quantization coefficient relative to the set value, the value of the second flag is implicitly derived, including: Based on the correspondence between the remainder and the value of the second flag, the value corresponding to the remainder of the statistical result of the second quantization coefficient relative to the set value is used as the value of the second flag.

11. The video decoding method according to claim 10, characterized in that, The correspondence is preset based on the value of the remainder and the selectable value of the second flag bit.

12. The video decoding method according to claim 1, characterized in that, The video decoding method further includes: After obtaining the quantization coefficient block, determine whether all quantization coefficients in the quantization coefficient block are 0; If not all quantization coefficients in the quantization coefficient block are 0, then the process of statistically analyzing the quantization coefficients within a specified region in the quantization coefficient block is executed. If all quantization coefficients in the quantization coefficient block are 0, the reconstruction processing method is determined by the explicit index obtained through decoding.

13. The video decoding method according to any one of claims 1 to 12, characterized in that, The video decoding method further includes: determining whether the corresponding coding block needs to implicitly derive the values ​​of the first flag bit and the second flag bit based on the quantization coefficient statistical results according to at least one of the following methods: The value of the index identifier contained in the sequence header of the coded block corresponding to the video image frame sequence; The value of the index identifier contained in the image header of the coded block corresponding to the video image frame; Size of the encoded block.

14. A video encoding method, characterized in that, include: The reference block of the current block to be encoded is reconstructed to obtain the prediction block; The residual data is calculated based on the current block to be encoded and the prediction block. The residual data is then transformed or skipped, and quantization is performed to obtain a quantization coefficient block. The quantization coefficients in the quantization coefficient block are adjusted to implicitly indicate whether the current block to be encoded adopts an extended intra-block copy mode based on the parity of the statistical results of the first quantization coefficients in the first specified region of the adjusted quantization coefficient block or the remainder with respect to a set value; and based on the parity of the statistical results of the second quantization coefficients in the second specified region of the adjusted quantization coefficient block or the remainder with respect to a set value, the reconstruction processing method corresponding to the current block to be encoded is implicitly indicated, wherein the reconstruction processing method includes horizontally flipping or vertically flipping the reference block; The block vector between the current block to be encoded and the reference block, as well as the quantization coefficient block after quantization coefficient adjustment, are encoded to obtain the encoded bitstream.

15. A video decoding device, characterized in that, include: The decoding unit is configured to decode a coding block using intra-block copy mode to obtain a quantization coefficient block and a block vector corresponding to the coding block. The statistical unit is configured to perform statistics on the quantization coefficients within a specified region in the quantization coefficient block to obtain quantization coefficient statistical results; wherein, the specified region includes a first specified region and a second specified region, the quantization coefficient statistical results within the first specified region are the first quantization coefficient statistical results, and the quantization coefficient statistical results within the second specified region are the second quantization coefficient statistical results; The first processing unit is configured to implicitly derive the value of a first flag bit based on the parity of the statistical result of the first quantization coefficients or the remainder relative to a set value, and to implicitly derive the value of a second flag bit based on the parity of the statistical result of the second quantization coefficients or the remainder relative to a set value; wherein, the value of the first flag bit is used to indicate whether the coding block adopts an extended intra-block copy mode, and the value of the second flag bit is used to indicate the reconstruction processing method corresponding to the coding block, wherein the reconstruction processing method includes horizontally flipping or vertically flipping the reference block of the coding block; The second processing unit is configured to, if the value of the first flag bit indicates that the coded block adopts an extended intra-block copy mode, perform a flipping process on the reference block pointed to by the block vector according to the reconstruction processing method indicated by the value of the second flag bit, to obtain the prediction block corresponding to the coded block.

16. A video encoding device, characterized in that, include: The fourth processing unit is configured to reconstruct the reference block of the current block to be encoded to obtain the prediction block; The fifth processing unit calculates residual data based on the current block to be encoded and the prediction block, performs transformation or skip transformation processing on the residual data, and performs quantization processing to obtain a quantization coefficient block. The adjustment unit is configured to adjust the quantization coefficients in the quantization coefficient block, implicitly indicating whether the current block to be encoded adopts an extended intra-block copy mode based on the parity of the statistical results of the first quantization coefficients in a first specified region of the adjusted quantization coefficient block or the remainder with respect to a set value; and implicitly indicating the reconstruction processing method corresponding to the current block to be encoded based on the parity of the statistical results of the second quantization coefficients in a second specified region of the adjusted quantization coefficient block or the remainder with respect to a set value, wherein the reconstruction processing method includes horizontally flipping or vertically flipping the reference block; The encoding unit is configured to encode the block vector between the current block to be encoded and the reference block, as well as the quantization coefficient block after quantization coefficient adjustment, to obtain the encoded bitstream.

17. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the video decoding method as described in any one of claims 1 to 13, or the video encoding method as described in claim 14.

18. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the video decoding method as described in any one of claims 1 to 13, or to implement the video encoding method as described in claim 14.

19. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, wherein a processor of a computer device reads from the computer-readable storage medium and executes the computer program, causing the computer device to perform the video decoding method of any one of claims 1 to 13, or to perform the video encoding method of claim 14.

20. A method for storing video streams, characterized in that, The video encoding method of claim 14 is used to generate a video stream and the video stream is stored.

Citation Information

Patent Citations

  • Method and device for lossy compress-encoding data and corresponding method and device for reconstructing data

    CN103748876A

  • Method and apparatus for video coding

    CN111989929A

  • Video decoding method and device, computer readable medium and electronic equipment

    CN112565751A

  • Dynamic image coding apparatus, dynamic image coding method and computer program for dynamic image coding

    JP2015226263A

  • Moving image encoder and moving image decoder

    US20100195723A1