Methods, circuits, devices, processors, and chips for searching reference blocks

By employing a reciprocating scanning reference block search method in the IBC prediction mode of the VVC standard, the problem of high computational resource consumption in the prior art is solved, achieving more efficient reference block matching and improving computational efficiency and resource utilization.

CN119135905BActive Publication Date: 2026-11-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410104689.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2026-11-10
Estimated Expiration
2044-01-24

AI Technical Summary

Technical Problem

In the VVC standard algorithm model, the reference block search method of the IBC prediction mode suffers from local optima and high computational resource consumption, making it difficult for existing technologies to efficiently perform reference block matching and search.

Method used

A novel reference block search method is adopted, which calculates the reference index values ​​of multiple coding blocks generated by each sliding of the search window by performing a reciprocating scan in the first image region with a step length, and uses the data of the overlapping search region for reuse to determine the reference block of the current block to be encoded.

Benefits of technology

It improves computational efficiency, saves computational and storage resources, and enables more efficient reference block matching search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135905B_ABST
    Figure CN119135905B_ABST
Patent Text Reader

Abstract

This application discloses a method, circuit, apparatus, processor, and chip for searching reference blocks, belonging to the field of video coding. The method includes: acquiring a first image region, the first image region covering part or all of the referenceable region of the current block to be encoded; performing a reciprocating scan of the first image region with a search window at a step length, the step length being the side length of the smallest coding block, and the size of the search window being the size of the largest coding block, the smallest coding block being the coding block with the smallest size, and the largest coding block being the coding block with the largest size; calculating the reference index values ​​of multiple coding blocks generated by each sliding of the search window during the reciprocating scan; and determining the reference block of the current block to be encoded based on the reference index values ​​of the multiple coding blocks generated by each sliding. The above provides a novel method for searching reference blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video coding, and in particular to a method, circuit, apparatus, processor, and chip for searching reference blocks. Background Technology

[0002] The raw video data is quite large, so it needs to be compressed before storage or transmission. Compression can also be called encoding. During the encoding process, IBC (Intra Block Copy) prediction mode needs to be considered. IBC prediction mode needs to search for the reference block of the current coded block from the already coded and reconstructed region in the current coded frame based on block matching.

[0003] In the VVC (Versatile Video Coding) standard algorithm model, the IBC prediction mode supports both pattern search and hash search search methods. Summary of the Invention

[0004] This application provides a method, circuit, apparatus, processor, and chip for searching reference blocks. The method described above provides a novel approach to searching reference blocks. The technical solution includes the following:

[0005] According to one aspect of this application, a method for searching a reference block is provided, the method comprising the following steps.

[0006] Obtain a first image region, which covers part or all of the reference region of the current block to be encoded;

[0007] The search window performs a reciprocating scan in the first image area with a step length, where the step length is the side length of the minimum coding block and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size.

[0008] Calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process;

[0009] The reference block for the current block to be encoded is determined based on the reference index values ​​of the multiple encoded blocks generated in each slide.

[0010] According to another aspect of this application, a search circuit for a reference block is provided, the circuit comprising a first circuit unit, a second circuit unit, a third circuit unit, and a fourth circuit unit; the four circuit units are connected in series by wires.

[0011] The first circuit unit is used to acquire a first image region, which covers part or all of the reference region of the current block to be encoded.

[0012] The second circuit unit is used to perform a reciprocating scan in the first image area by a search window with a step length, where the step length is the side length of the minimum coding block and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size and the maximum coding block is the coding block with the largest size.

[0013] The third circuit unit is used to calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process.

[0014] The fourth circuit unit is used to determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated each time the sliding occurs.

[0015] According to another aspect of this application, a reference block search device is provided, the device comprising the following modules.

[0016] The acquisition module is used to acquire a first image region, which covers part or all of the reference region of the current block to be encoded.

[0017] The scanning module is used to perform reciprocating scanning in the first image area with a step length through the search window. The step length is the side length of the minimum coding block, and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size.

[0018] The calculation module is used to calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process.

[0019] The determination module is used to determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated in each slide.

[0020] According to one aspect of this application, a processor is provided that includes a search circuit for the reference block as described above.

[0021] According to one aspect of this application, a chip is provided, the chip including a processor, the processor including a search circuit for the reference block as described above.

[0022] According to one aspect of this application, a computer device is provided, the computer device including a processor, the processor including a search circuit for the reference block as described above.

[0023] According to one aspect of this application, a computer device is provided, comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described method for searching reference blocks.

[0024] According to another aspect of this application, a computer-readable storage medium is provided, which stores a computer program that is loaded and executed by a processor to implement the above-described method for searching reference blocks.

[0025] According to another aspect of this application, a computer program product or computer program is provided, comprising 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 search method for the reference block described above.

[0026] The beneficial effects of the technical solutions provided in this application include at least the following:

[0027] A reciprocating scan is performed in the first image region using a search window, with each step length equal to the side length of the smallest coded block. The size of the search window is equal to the size of the largest coded block. Reference index values ​​are calculated for each coded block generated by each slide of the search window during the reciprocating scan. These reference index values ​​are used to determine the reference block for the current block to be encoded. In other words, this application provides a novel reference block search method based on reciprocating scanning. Attached Figure Description

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

[0029] Figure 1 This application exemplarily illustrates a basic flowchart of a video encoding process;

[0030] Figure 2 This is a schematic diagram of an inter-frame prediction mode provided in one embodiment of this application;

[0031] Figure 3 This is a schematic diagram of a candidate motion vector provided in one embodiment of this application;

[0032] Figure 4 This is a schematic diagram of an intra-block copying mode provided in one embodiment of this application;

[0033] Figure 5 This is a schematic diagram of an intra-frame string copying mode provided in one embodiment of this application;

[0034] Figure 6 This is a simplified block diagram of a communication system provided in one embodiment of this application;

[0035] Figure 7 This is a schematic diagram illustrating the placement of a video encoder and a video decoder in a streaming environment according to an embodiment of this application.

[0036] Figure 8 This is a schematic diagram illustrating the principle of a reference block search method provided in one embodiment of this application;

[0037] Figure 9 This diagram illustrates the reference area under the IBC mode specified by the VVC protocol.

[0038] Figure 10 This is a flowchart of a reference block search method provided in one embodiment of this application;

[0039] Figure 11 This is a schematic diagram of the search window before and after a single swipe, provided in one embodiment of this application;

[0040] Figure 12 This is a flowchart illustrating a method for calculating the reference index values ​​of multiple coded blocks generated each time the search window slides during a reciprocating scan, according to one embodiment of this application.

[0041] Figure 13 This is a schematic diagram of a method for reusing reference index values ​​of coded blocks in an overlapping search region according to an embodiment of this application;

[0042] Figure 14 This is a schematic diagram of a method for reusing reference index values ​​of coded blocks in an overlapping search region according to an embodiment of this application;

[0043] Figure 15 This is a schematic diagram of a hardware computing architecture provided in one embodiment of this application;

[0044] Figure 16 This is a flowchart of a reference block search method provided in another embodiment of this application;

[0045] Figure 17 This is a flowchart of a method for searching reference blocks provided in another embodiment of this application;

[0046] Figure 18 This is a structural block diagram of the search circuit of a reference block provided in one embodiment of this application;

[0047] Figure 19This is a structural block diagram of a reference block search device provided in one embodiment of this application;

[0048] Figure 20 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0050] First, a brief introduction to the terms used in the embodiments of this application will be given.

[0051] Before describing the embodiments of this application, firstly, in conjunction with Figure 1 A brief introduction to video coding technology. Figure 1 An example is shown in a basic flowchart of a video encoding process.

[0052] A video signal is a sequence of images consisting of multiple frames. A frame represents the spatial information of a video signal. Taking YUV mode as an example, a frame includes a luminance sample matrix (Y) and two chrominance sample matrices (Cb and Cr). From the perspective of how video signals are acquired, they can be divided into two types: those captured by a camera and those generated by a computer. Due to differences in statistical characteristics, the corresponding compression coding methods may also differ.

[0053] In some mainstream video coding technologies, such as H.265 / HEVC (High Efficient Video Coding), H.266 / VVC (Versatile Video Coding), and AVS (Audio Video Coding Standard) (e.g., AVS3), a hybrid coding framework is used to perform a series of operations and processes on the input raw video signal:

[0054] 1. Block Partition Structure: The input image is divided into several non-overlapping processing units, each of which undergoes a similar compression operation. This processing unit is called a CTU (Coding Tree Unit) or LCU. Further subdivisions can be made below the CTU to obtain one or more basic coding units, called CUs. Each CU is the most basic element in a coding process. The following describes the various coding methods that can be used for each CU.

[0055] 2. Predictive Coding: This 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 select the most suitable predictive coding mode from among many possible modes for the current CU to be encoded and inform the decoder. Intra-frame prediction refers to predicting signals from already encoded and reconstructed regions within the same image. Inter-frame prediction refers to predicting signals from other encoded images (called reference images) that are different from the current image.

[0056] 3. Transform Coding and Quantization: The residual video signal undergoes transformation operations such as DFT (Discrete Fourier Transform) and DCT (Discrete Cosine Transform) to convert the signal into the transform domain, where the coefficients are called transform coefficients. In the transform domain, the signal undergoes further lossy quantization, losing some information to make the quantized signal more suitable for compression. Some video coding standards may offer more than one transform option; therefore, the encoder needs to select one transform for the current CU and inform the decoder. The fineness of quantization is usually determined by the quantization parameter. A larger QP (Quantization Parameter) 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 bitrate. 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 bitrate.

[0057] 4. Entropy Coding or Statistical Coding: The quantized transform domain signal is statistically compressed and encoded 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 mode and motion vectors, 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) or Content-Adaptive Binary Arithmetic Coding (CABAC).

[0058] 5. Loop Filtering: After the encoded image undergoes inverse quantization, inverse transform, and prediction compensation (the reverse operations of steps 2-4 above), a reconstructed decoded image is obtained. Compared to the original image, the reconstructed image differs in some information due to the influence of quantization, resulting in distortion. Filtering the reconstructed image, such as deblocking, SAO (Sample Adaptive Offset), or ALF (Adaptive Lattice Filter), can effectively reduce the distortion caused by quantization. Since these filtered reconstructed images will serve as a reference for subsequent encoded images to predict future signals, the above filtering operations are also called loop filtering, i.e., filtering operations within the encoding loop.

[0059] As can be seen from the above encoding process, at the decoding end, for each CU, after obtaining the compressed bitstream, the decoder first performs entropy decoding to obtain various mode information and quantized transform coefficients. Each coefficient undergoes inverse quantization and inverse transform to obtain the residual signal. On the other hand, based on the known encoding mode information, the prediction signal corresponding to the current CU to be encoded can be obtained. After adding the two, the reconstructed signal is obtained. Finally, the reconstructed value of the decoded image needs to undergo a loop filtering operation to generate the final output signal.

[0060] Many mainstream video coding standards, such as HEVC, VVC, and AVS3, employ block-based hybrid coding frameworks. They divide the raw video data into a series of coded blocks and combine prediction, transform, and entropy coding methods 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.

[0061] It is important to note that the displacement vector may have different names depending on the prediction mode and implementation. This article will consistently describe them as follows: 1) The displacement vector in inter-frame prediction mode is called the motion vector (MV); 2) The displacement vector in IBC (Intra Block Copy) prediction mode is called the block vector (BV); 3) The displacement vector in ISC (Intra String Copy) prediction mode is called the string vector (SV). Intra-frame string copy is also known as "string prediction" or "string matching," etc.

[0062] MV refers to the displacement vector used in inter-frame prediction mode, pointing from the current image to the reference image. Its value is the coordinate offset between the current block and the reference block, which are located in two different images. In inter-frame prediction mode, motion vector prediction can be introduced. By predicting the motion vector of the current block, the predicted motion vector corresponding to the current block is obtained. The difference between the predicted motion vector and the actual motion vector corresponding to the current block is encoded and transmitted. Compared with directly encoding and transmitting the actual motion vector corresponding to the current block, this saves bit overhead. In the embodiments of this application, the predicted motion vector refers to the predicted value of the motion vector of the current block obtained through motion vector prediction technology.

[0063] BV refers to the displacement vector used in IBC prediction mode, and its value is the coordinate offset between the current block and the reference block, where both the current block and the reference block are within the current image. In IBC mode, block vector prediction can be introduced. By predicting the block vector of the current block, a predicted block vector corresponding to the current block is obtained. The difference between the predicted block vector and the actual block vector is encoded and transmitted. Compared to directly encoding and transmitting the actual block vector corresponding to the current block, this saves bit overhead. In the embodiments of this application, the predicted block vector refers to the predicted value of the block vector of the current block obtained through block vector prediction technology.

[0064] SV refers to the displacement vector used in ISC prediction mode, and its value is the coordinate offset between the current string and the reference string, where both the current string and the reference string are within the current image. In ISC mode, string vector prediction can be introduced. By predicting the string vector of the current string, a predicted string vector corresponding to the current string is obtained. The difference between the predicted string vector and the actual string vector is encoded and transmitted. Compared to directly encoding and transmitting the actual string vector corresponding to the current string, this saves bit overhead. In the embodiments of this application, the predicted string vector refers to the predicted value of the string vector of the current string obtained through string vector prediction technology.

[0065] The following section introduces several different prediction models:

[0066] I. Inter-frame prediction mode

[0067] like Figure 2 As shown, inter-frame prediction utilizes the correlation in the video's temporal domain, using pixels from neighboring encoded images to predict pixels in the current image. This effectively removes temporal redundancy and saves bits of encoded residual data. Here, P is the current frame, Pr is the reference frame, B is the current block to be encoded, and Br is the reference block for B. B' and B have the same coordinates in the image; Br's coordinates are (xr, yr), and B''s coordinates are (x, y). The displacement between the current block to be encoded and its reference block is called the motion vector (MV), i.e.:

[0068] MV = (xr-x, yr-y).

[0069] Considering the strong correlation between neighboring blocks in the temporal or spatial domains, MV prediction techniques can be used to further reduce the bits required to encode MVs. In H.265 / HEVC, inter-frame prediction includes two MV prediction techniques: Merge and AMVP (Advanced Motion Vector Prediction).

[0070] The Merge mode creates a candidate MV list for the current Prediction Unit (PU), containing five candidate MVs (and their corresponding reference images). It iterates through these five candidate MVs, selecting the one with the lowest rate-distortion cost as the optimal MV. If the codec creates the candidate list in the same way, the encoder only needs to transmit the index of the optimal MV in the candidate list. It's important to note that HEVC's MV prediction technique also has a Skip mode, a special case of the Merge mode. After finding the optimal MV in the Merge mode, if the current block and the reference block are essentially identical, then residual data does not need to be transmitted; only the MV index and a skip flag need to be sent.

[0071] The Merge mode generates a candidate MV list that includes both spatial and temporal domains. For B-frames, it also includes a combined list approach. The spatial domain provides a maximum of four candidate MVs, and its generation is as follows: Figure 3 As shown in section (a) of the diagram. The spatial domain list is established in the order A1→B1→B0→A0→B2, where B2 is a substitute; that is, if one or more of A1, B1, B0, and A0 are missing, the motion information of B2 must be used. The temporal domain provides at most one candidate MV, and its establishment is as follows: Figure 3 As shown in part (b), the MV of the isotopic PU is obtained by stretching and contracting according to the following formula:

[0072] curMV = td * colMV / tb;

[0073] Where `curMV` represents the current PU's MV, `colMV` represents the MV of the corresponding PU, `td` represents the distance between the current image and the reference image, and `tb` represents the distance between the corresponding image and the reference image. If the PU at position D0 in the corresponding block is unavailable, it is replaced by the corresponding PU at position D1. For a PU in a B-slice, since there are two MVs, its MV candidate list also needs to provide two MVPs (Motion Vector Predictors). HEVC generates a combination list for the B-slice by pairwise combining the first four candidate MVs in the MV candidate list.

[0074] Similarly, the AMVP mode utilizes the correlation of MVs (Motion Vector Differences) between neighboring blocks in the spatial and temporal domains to build a candidate MV list for the current PU. Unlike the Merge mode, the AMVP mode selects the optimal predicted MV from the candidate MV list and performs differential coding with the optimal MV obtained through motion search for the current block to be encoded, i.e., encoded MVD = MV - MVP, where MVD is the Motion Vector Difference. The decoder builds the same list and only needs the MVD and MVP's index in the list to calculate the MV of the current decoded block. The AMVP mode's MV candidate list also includes both spatial and temporal domain cases, but the difference is that the length of the AMVP mode's MV candidate list is only 2.

[0075] As mentioned above, in HEVC's AMVP mode, MVD (Motion Vector Difference) needs to be encoded. In HEVC, the resolution of MVD is controlled by the `use_integer_mv_flag` in the `slice_header`. When the value of this flag is 0, the MVD is encoded at 1 / 4 (luminance) pixel resolution; when the value of this flag is 1, the MVD is encoded at an integer (luminance) pixel resolution. VVC uses an Adaptive Motion Vector Resolution (AMVR) method. This method allows each CU to adaptively select the resolution for encoding MVD. In normal AMVP mode, the available resolutions include 1 / 4, 1 / 2, 1, and 4 pixel resolutions. For a CU with at least one non-zero MVD component, a flag is first encoded to indicate whether quarter-luminance sampling MVD precision is used for the CU. If the flag is 0, the current CU's MVD is encoded at 1 / 4 pixel resolution. Otherwise, a second flag is encoded to indicate that the CU uses 1 / 2 pixel resolution or another MVD resolution. Otherwise, encode a third flag to indicate whether a 1-pixel resolution or a 4-pixel resolution is used for the CU.

[0076] II. IBC Prediction Model

[0077] IBC is an intra-frame coding tool adopted in the HEVC Screen Content Coding (SCC) extension, which significantly improves the coding efficiency of screen content. AVS3 and VVC also employ IBC technology to enhance the performance of screen content coding. IBC utilizes the spatial correlation of screen content video, using already encoded image pixels in the current image to predict the pixels of the current block to be encoded, effectively saving the bits required to encode pixels. Figure 4 As shown, the displacement between the current block and its reference block in IBC is called BV (Block Vector). H.266 / VVC employs a BV prediction technique similar to inter-frame prediction to further save the bits required to encode BV and allows encoding BVD (Block Vector Difference) at 1 or 4 pixel resolution.

[0078] III. ISC Prediction Model

[0079] ISC technology divides a coded block into a series of pixel strings or unmatched pixels according to a certain scanning order (such as raster scanning, round-trip scanning, and Zig-Zag scanning). Similar to IBC, each string searches for a reference string of the same shape in the currently coded region of the image, derives the predicted value of the current string, and effectively saves bits by encoding the residual between the pixel value of the current string and the predicted value instead of directly encoding the pixel value. Figure 5 A schematic diagram of intra-frame string copying is given. The dark gray area represents the encoded area, the white 28 pixels represent string 1, the light gray 35 pixels represent string 2, and the black 1 pixel represents an unmatched pixel. The displacement between string 1 and its reference string is... Figure 4 The displacement between string vector 1 and string 2 and their reference string is... Figure 4 String vector 2 in the string vector.

[0080] Intra-frame string copying technology requires encoding the SV (Structured Value), string length, and a flag indicating whether a matching string exists for each string in the current coding block. Here, SV represents the offset of the string to be encoded from its reference string. String length represents the number of pixels contained in the string. Different implementations use various methods to encode the string length; the following are some examples (some examples may be combined): 1) Encode the string length directly in the bitstream; 2) Encode the number of pixels to be processed after processing the string in the bitstream, and the decoder calculates the current string length L = N - N1 - N2 based on the current block size N, the number of processed pixels N1, and the number of pixels to be processed N2 obtained from decoding; 3) Encode a flag in the bitstream indicating whether the string is the last string. If it is the last string, the current string length L = N - N1 is calculated based on the current block size N and the number of processed pixels N1. If a pixel does not find a corresponding reference in the referable area, the pixel value of the unmatched pixel will be directly encoded.

[0081] like Figure 6 The diagram illustrates a simplified block diagram of a communication system provided in one embodiment of this application. The communication system 600 includes a plurality of devices that can communicate with each other via, for example, a network 650. For example, the communication system 600 includes a first device 610 and a second device 620 interconnected via the network 650. Figure 6 In this embodiment, the first device 610 and the second device 620 perform unidirectional data transmission. For example, the first device 610 may encode video data, such as a video image stream captured by the first device 610, for transmission to the second device 620 via network 650. The encoded video data is transmitted in the form of one or more encoded video streams. The second device 620 may receive the encoded video data from network 650, decode the encoded video data to recover the video data, and display video images based on the recovered video data. Unidirectional data transmission is common in applications such as media services.

[0082] In another embodiment, the communication system 600 includes a third device 630 and a fourth device 640 that perform bidirectional transmission of encoded video data, which may occur, for example, during a video conference. For bidirectional data transmission, each of the third device 630 and the fourth device 640 may encode video data (e.g., a stream of video images captured by the device) for transmission over a network 650 to the other device. Each of the third device 630 and the fourth device 640 may also receive encoded video data transmitted by the other 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.

[0083] exist Figure 6 In the embodiments described herein, the first device 610, the second device 620, the third device 630, and the fourth device 640 may be computer devices such as servers, personal computers, and smartphones, but the principles disclosed in this application are not limited to these. The embodiments of this application are applicable to PCs (Personal Computers), mobile phones, tablets, media players, and / or dedicated video conferencing equipment. Network 650 refers to any number of networks that transmit encoded video data between the first device 610, the second device 620, the third device 630, and the fourth device 640, including, for example, wired and / or wireless communication networks. The communication network 650 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 650 may be irrelevant to the operation of the disclosures herein.

[0084] As an example, Figure 7 The diagram illustrates the placement of a video encoder and a video decoder 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 TV, storing compressed video on digital media including CDs (Compact Discs), DVDs (Digital Versatile Discs), memory sticks, etc.

[0085] The streaming system may include an acquisition subsystem 713, which may include a video source 701 such as a digital camera, which creates an uncompressed video image stream 702. In an embodiment, the video image stream 702 includes samples captured by a digital camera. The video image stream 702 is depicted as a thick line to emphasize the high data volume of the video image stream compared to encoded video data 704 (or encoded video bitstream). The video image stream 702 may be processed by an electronic device 720, which includes a video encoder 703 coupled to the video source 701. The video encoder 703 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 704 (or encoded video bitstream 704) is depicted as a thin line to emphasize the lower data volume of the encoded video data 704 (or encoded video bitstream 704), which may be stored on a streaming server 705 for future use. One or more streaming client subsystems, such as Figure 7 Client subsystems 706 and 708 can access streaming server 705 to retrieve copies 707 and 709 of encoded video data 704. Client subsystem 706 may include, for example, a video decoder 710 in electronic device 730. Video decoder 710 decodes the incoming copy 707 of encoded video data and produces an output video picture stream 711 that can be displayed on display 712 (e.g., a screen) or another presentation device (not depicted). In some streaming systems, the encoded video data 704, video data 707, and video data 709 (e.g., video stream) may be encoded according to certain video encoding / compression standards.

[0086] It should be noted that electronic devices 720 and 730 may include other components (not shown). For example, electronic device 720 may include a video decoder (not shown), and electronic device 730 may also include a video encoder (not shown). The video decoder is used to decode received encoded video data; the video encoder is used to encode the video data.

[0087] It should be noted that the technical solutions provided in this application can be applied to H.266 / VVC standards, H.265 / HEVC standards, AVS (such as AVS3), or next-generation video codec standards, and this application does not limit them.

[0088] It should also be noted that in the video encoding method provided in this application, the executing entity for each step can be an encoding device. During video encoding in IBC mode, the encoding scheme provided in this application can be used to encode the block vector of the current block. Both the decoding device and the encoding device can be computer devices, which refer to electronic devices with data computing, processing, and storage capabilities, such as PCs, mobile phones, tablets, media players, dedicated video conferencing equipment, servers, etc.

[0089] Furthermore, the method provided in this application can be used alone or in combination with other methods in any order. The encoder based on the method provided in this application can be implemented by one or more processors or one or more integrated circuits. The technical solution of this application will be described below through several embodiments.

[0090] In related technologies, within the VVC standard algorithm model, the IBC mode supports two search methods: Pattern search and Hash search. Pattern search is computationally faster, but it may result in local optima; Hash search yields reference blocks with high matching accuracy, but it requires significant computational and storage resources.

[0091] Based on this, this application provides a method for searching the reference block of the current block to be encoded in IBC mode.

[0092] Figure 8 This illustration shows a schematic diagram of the principle of a reference block search method provided in an exemplary embodiment of this application. Figure 8 The method for searching the reference block shown is performed by the encoding device. Figure 8 The search method shown is applied to the IBC prediction mode, which requires searching for the reference block of the current block to be encoded from the already encoded and reconstructed region based on block matching in the current encoded frame.

[0093] Figure 8 In the illustrated search process, the encoding device performs step 801: acquiring a first image region. The first image region covers the referenceable region of the current block to be encoded. In one embodiment, the search method of this application is applied to the IBC prediction mode of the VVC protocol. Under the IBC mode specified by the VVC protocol, the referenceable region of the current block to be encoded is as follows: Figure 9As shown. The reference region of the current block to be encoded is located in the current CTU and the left CTU. A CTU is 128*128 pixels in size and contains four CUs (Color, Color, and Cube) of size 64*64 pixels each. The reference region of the current block to be encoded includes three complete 64*64 CUs and the encoded region within one 64*64 CU. Optionally, the first image region is any one of the four 64*64 CUs containing the reference region; therefore, the size of the first image region is 64*64 pixels. Optionally, the current block to be encoded is executed once in each of the four 64*64 CUs. Figure 8 The search process is shown.

[0094] Figure 8 In the illustrated search process, the encoding device performs step 802: a reciprocating scan is performed in the first image area using a search window, with each scan incrementing by one step. During one round of reciprocating scanning, the search window slides from left to right in the first image area, each time sliding by one step. After reaching the right-side critical position, it slides down by one step. The search window then slides from right to left, each time sliding by one step. After reaching the left-side critical position, it slides down by one step. This process is repeated until the search window reaches the bottom and can no longer slide down.

[0095] In this application, the first step length is the side length of the minimum coding block, and the search window size is the size of the maximum coding block. For example, the minimum coding block size is 4*4, and the maximum coding block size is 16*16. Figure 8 The bold solid line in the image shows the search window before sliding, and the bold dashed line shows the search window after sliding. Schematic, the top left pixel coordinate of the search window before sliding is (0, 0), and after one slide, the top left pixel coordinate of the search window after sliding is (4, 0).

[0096] In one embodiment, multiple rounds of reciprocating scanning are performed. The starting points of the search window in these multiple rounds of reciprocating scanning form a pixel array. The length and width of the pixel array are both the length of the first step, and the size of the pixel array is the size of the smallest coding block. In the first round of reciprocating scanning (ROUND 0), the starting point of the search window is (0, 0), and along... Figure 8 The search window slides as shown. In the second round of reciprocating scan (ROUND 1), the starting point of the search window is (1, 0); in the third round of reciprocating scan (ROUND 2), the starting point of the search window is (2, 0); in the fourth round of reciprocating scan (ROUND 3), the starting point of the search window is (3, 0); in the fifth round of reciprocating scan (ROUND 4), the starting point of the search window is (0, 1); and so on, until the search window performs the sixteenth round of reciprocating scan. In the sixteenth round of reciprocating scan (ROUND 15), the starting point of the search window is (3, 3).

[0097] Figure 8 In the illustrated search process, the encoding device performs step 803: calculating the reference index values ​​for each of the multiple encoded blocks generated by each slide of the search window during the reciprocating scan. During the reciprocating scan, after each slide of the search window, the updated search window includes an updated search area and an overlapping search area, such as... Figure 8 As shown, the updated search area is the region in the search window that does not overlap with the search window before the slide, while the overlapping search area is the region in the search window that overlaps with the search window before the slide.

[0098] After each slide, the resulting updated search region includes four new minimum coding blocks, each with a size of 4x4. Four hardware computing units (optionally SAD (Sum of Absolute Difference), SATD (Sum of Absolute Transformed Difference), SSE (Sum of Squared Error), etc.) calculate reference index values ​​(optionally SAD, SATD, SSE, etc.) for the four minimum coding blocks. One hardware computing unit calculates the reference index value for one minimum coding block. Based on the reference index values ​​of the four minimum coding blocks, combined with the reference index values ​​of the coding blocks in the overlapping search region, the reference index values ​​for coding blocks of various sizes are obtained.

[0099] Schematic illustration: the four new minimum coding blocks are 4x4 in size. Combined with the reference index values ​​of the coding blocks in the overlapping search region, we can obtain reference index values ​​for coding blocks represented as 4x8, 4x16, 8x16, 16x16, 8x4, 16x4, 16x8, and 8x8. The data in the overlapping search region is reusable; when performing the next slide, some data from the overlapping search region can still be used to calculate the reference index values ​​for the coding blocks of each size corresponding to the next slide. Figure 8 Under the data relationships shown, 75% data reuse can be achieved when calculating the coded blocks of various sizes generated after each slide.

[0100] Figure 8 In the search process shown, the encoding device performs step 804: determining the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoding blocks generated by each slide.

[0101] The encoding device selects the encoding block with the smallest reference index value (optionally SAD) from the multiple encoding blocks generated in each slide as the reference block for the current block to be encoded.

[0102] In summary, the embodiments of this application perform a reciprocating scan in the first image area using a search window with a step length, where the step length is the side length of the smallest coding block and the size of the search window is the size of the largest coding block. This allows the use of data from the overlapping search area when calculating the reference index values ​​of multiple coding blocks generated by one slide. Furthermore, if the size of the smallest coding block is a*a and the size of the largest coding block is 4a*4a, the above scheme can achieve 75% data reuse, saving computational and storage resources and improving computational efficiency.

[0103] Figure 10 A flowchart illustrating a method for searching a reference block provided in an exemplary embodiment of this application is shown, illustratively described by way of an encoding device, the method comprising:

[0104] Step 1020: Obtain the first image region, which covers part or all of the reference region of the current block to be encoded;

[0105] In one embodiment, the search method provided in this application is applied to the IBC mode of the VVC protocol. In the IBC mode, the reference block of the current coded block is searched from the already coded and reconstructed region based on block matching in the current coded frame. Optionally, the search method provided in this application can be applied to a graph processing unit (GPU), a video processing unit (VPU), etc., and is implemented by an integrated circuit in the processor. The VVC protocol specifies the reference region as follows: Figure 9 As shown. The reference region of the current block to be encoded is located in the current CTU and the left CTU. The size of a CTU is 128*128, and a CTU contains four CUs of size 64*64, all in pixels. The reference region of the current block to be encoded includes three complete 64*64 CUs, and the encoded region in one 64*64 CU. Optionally, the first image region is any one of the four 64*64 CUs containing the reference region, therefore the size of the first image region is 64*64.

[0106] Figure 9 The reference area is shown in four cases. ① Reference Figure 9 In part (A), if the current block to be encoded is located in the upper left corner of the current CTU and is a 64*64 CU, then the reference area for the current block to be encoded includes the upper right, lower left, and lower right corners of the left CTU and the 64*64 CU in the upper left corner of the current CTU, as well as the encoded area in the 64*64 CU in the upper left corner of the current CTU. ② Reference Figure 9In part (B), if the current block to be encoded is located in the upper right corner of the current CTU and is a 64*64 CU, then the reference area for the current block to be encoded includes the lower left and lower right corners of the left CTU and is a 64*64 CU, the upper left corner of the current CTU is a 64*64 CU, and the encoded area in the upper right corner of the current CTU is a 64*64 CU. ③ Reference Figure 9 In part (C), if the current block to be encoded is located in the lower left corner of the current CTU and is a 64*64 CU, then the reference area for the current block to be encoded includes the lower right corner of the left CTU and is a 64*64 CU, the upper left and upper right corners of the current CTU and the already encoded area in the lower left corner of the current CTU. ④ Reference Figure 9 In part (D), if the current block to be encoded is located in the 64*64 CU at the lower right corner of the current CTU, then the reference area of ​​the current block to be encoded includes the 64*64 CUs at the upper left, upper right, and lower left corners of the current CTU, as well as the encoded area in the 64*64 CU at the lower right corner of the current CTU.

[0107] In one embodiment, the search method provided in this application is applied to the IBC mode in the HEVC compression standard protocol. The reference area specified by the HEVC compression standard protocol is the entire frame where the current coding block is located. The entire frame is used as the first image area to execute the search method provided in this application.

[0108] Step 1040: Perform a reciprocating scan in the first image area using a search window with a step length of one step. The step length is the side length of the minimum coding block, and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size.

[0109] Reciprocating scanning, also known as bow scanning, zigzag scanning, or snake scanning, involves the following steps: The search window is slid from left to right in the first image area in steps of one unit length until it reaches the right edge; the search window is then moved down by one unit length; next, the search window is slid from right to left in the first image area in steps of one unit length until it reaches the left edge; the search window is then moved down by one unit length; these steps are repeated until the search window has traversed the entire first image area, with its initial position at the upper left corner of the first image area.

[0110] In this embodiment, the size range of the encoding block is the size range supported by the encoding device in IBC mode. Optionally, the size range of the encoding block is 4*4 to 16*16, that is, the smallest encoding block size is 4*4 and the largest encoding block size is 16*16. Optionally, the size range of the encoding block is 8*8 to 32*32, that is, the smallest encoding block size is 8*8 and the largest encoding block size is 32*32, with units of pixels. In this application, the size range of the encoding block is mainly 4*4 to 16*16 as an example, but the size range of 8*8 to 32*32 can also be implemented based on a similar search process.

[0111] Step 1060: Calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process;

[0112] During the reciprocating scanning process, the search window will slide multiple times, and each slide will generate new 4*4, 4*8, 4*16, 8*16, 16*16, 8*4, 16*4, 16*8, and 8*8 encoded blocks. Figure 11 This shows a slide. Figure 11 The bold solid line represents the search window before sliding, and the bold dashed line represents the search window after sliding.

[0113] Reference Figure 11 The slid-down search window generates the following new encoded blocks: 4x4 encoded blocks: composed of pixel array 17, pixel array 18, pixel array 19, and pixel array 20. 4x8 encoded blocks: composed of pixel arrays 17 and 18, and pixel arrays 19 and 20. 4x16 encoded blocks: composed of pixel arrays 17, 18, 19, and 20. 8x4 encoded blocks: composed of pixel arrays 13 and 17, pixel arrays 14 and 18, pixel arrays 15 and 19, and pixel arrays 16 and 20. The following are encoding blocks with different sizes: 16*4: blocks composed of pixels 5, 9, 13, and 17; blocks composed of pixels 6, 10, 14, and 18; blocks composed of pixels 7, 11, 15, and 19; and blocks composed of pixels 8, 12, 16, and 20. 8*8: blocks composed of pixels 13, 17, 14, and 18; and blocks composed of pixels 15, 19, 16, and 20. 16*16: blocks composed of pixels 5 through 20.

[0114] After one slide, multiple new coding blocks will be generated based on the updated pixel matrix 17, 18, 19, and 20, and reference index values ​​for the generated multiple coding blocks will be calculated. Optionally, the reference index value can be any one of SAD, SATD, and SSE.

[0115] Step 1080: Determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated in each slide.

[0116] In one embodiment, the reference index value is any one of SAD, SATD, and SSE. From the multiple coded blocks generated in each slide, the coded block with the smallest reference index value is determined as the reference block for the current block to be encoded.

[0117] In summary, a reciprocating scan is performed in the first image region using a search window with a step length equal to the side length of the smallest coded block. The size of the search window is equal to the size of the largest coded block. Reference index values ​​are calculated for each coded block generated by each slide of the search window during the reciprocating scan. These reference index values ​​are used to determine the reference block for the current block to be encoded. Therefore, this application provides a novel reference block search method based on reciprocating scanning.

[0118] based on Figure 10 In the alternative embodiments shown, Figure 12 A flowchart illustrating a method for calculating reference index values ​​for each of the multiple coded blocks generated during each slide of the search window in a reciprocating scan process (i.e., step 1060) is shown. This method includes the following steps:

[0119] Step 1061: During the reciprocating scanning process, after each slide of the search window, the reference index values ​​of each of the multiple smallest coding blocks in the updated search area are calculated. The updated search area is the area in the search window after the slide that does not overlap with the search window before the slide.

[0120] During the reciprocating scan, the search window will slide multiple times, generating multiple new encoded blocks with each slide. For each slide, the resulting search window will include the updated search area and the overlapping search area, combined with reference... Figure 8 The updated search area is the region in the search window that does not overlap with the search window before the slide, while the overlapping search area is the region in the search window that overlaps with the search window before the slide.

[0121] The updated search region includes multiple minimum coding blocks. In one embodiment, reference index values ​​for each of the a minimum coding blocks in the updated search region are calculated by a hardware computing units. The a hardware computing units correspond one-to-one with the a minimum coding blocks, and a is a preset positive integer.

[0122] Figure 8 Taking a minimum coding block size of 4*4 and a maximum coding block size of 16*16 as an example, the update search area includes four minimum coding blocks of size 4*4. The reference index values ​​of the four minimum coding blocks are calculated by four hardware computing units. The four hardware computing units correspond one-to-one with the four minimum coding blocks. Optionally, the reference index value can be any one of SAD, SATD, and SSE. The corresponding hardware computing units can be called SAD computing unit, SATD computing unit, and SSE computing unit.

[0123] Step 1062: Based on the reference index values ​​of the multiple smallest coding blocks in the updated search area, and combined with the reference index values ​​of the coding blocks in the overlapping search area, the reference index values ​​of the coding blocks of various sizes generated after the search window is slid are obtained. The overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.

[0124] Each time the search window slides, it calculates the reference index values ​​for each of the multiple smallest coded blocks in the updated search area. In the previous slide, the reference index values ​​for the coded blocks in the overlapping search area have been calculated. Therefore, by combining the two, the reference index values ​​for coded blocks of various sizes generated after the search window slides can be obtained.

[0125] In one embodiment, multiple adders are used to obtain the reference index values ​​of coding blocks of various sizes generated after the search window slides, based on the reference index values ​​of the respective smallest coding blocks in the updated search region, along the row and column directions of the first image region, and combined with the reference index values ​​of coding blocks in the overlapping search region. The adders are used to add the reference index values ​​of two coding blocks of the same size to obtain the reference index value of a coding block of a new size. For example, a 4*8 adder adds the reference index values ​​of two 4*4 coding blocks to obtain the reference index value of a 4*8 coding block; an 8*4 adder adds the reference index values ​​of two 4*4 coding blocks to obtain the reference index value of an 8*4 coding block.

[0126] Reference Figure 13 The updated search area contains four minimum coding blocks: a coding block consisting of pixel array 17, a coding block consisting of pixel array 18, a coding block consisting of pixel array 19, and a coding block consisting of pixel array 20.

[0127] Based on the reference index values ​​of the four minimum coding blocks, along the row and column directions of the image, and the overlapping search region ( Figure 13The reference index values ​​of the shaded area are combined in two dimensions to calculate the reference index values ​​of the newly generated 4*4, 4*8, 4*16, 8*16, 16*16, 8*4, 16*4, 16*8, and 8*8 coded blocks after the search window slides. Refer to the detailed description of step 1060 above for the newly generated coded blocks of each size. A more detailed explanation of the data reuse method for overlapping search areas will be provided below.

[0128] In summary, the above embodiments utilize a search window to perform a reciprocating scan in the first image region with a step length, where the step length is the side length of the smallest coding block and the size of the search window is the size of the largest coding block. This allows the use of data from the overlapping search region when calculating reference index values ​​for multiple coding blocks generated in a single slide. The overlapping search region is the area in the search window after the slide that overlaps with the search window before the slide, and the data in the overlapping search region is reusable. Figure 10 Given the data relationships shown (the smallest coding block size is a*a, and the largest coding block size is 4a*4a), the above scheme can achieve 75% data reuse, saving computing and storage resources and improving computing efficiency.

[0129] Furthermore, the above embodiments provide a way to reuse data in the overlapping search region, so that when calculating the reference index values ​​of multiple coding blocks generated by one sliding, the data in the overlapping search region can be reused in the above way, saving computing and storage resources and improving computing efficiency.

[0130] Data reuse methods for overlapping search regions include the following:

[0131] ① The first adder adds the reference index values ​​of the two smallest coding blocks in the update search region to obtain the reference index value of the first coding block. The size of the smallest coding block is a*a, and the size of the first coding block is a*2a. The second adder adds the reference index values ​​of the other two smallest coding blocks in the update search region to obtain the reference index value of the other first coding block. The update search region includes four smallest coding blocks.

[0132] Reference Figure 14 The size of the minimum coding block is 4*4, and the update search area includes four minimum coding blocks: a coding block composed of pixel matrix 17, a coding block composed of pixel matrix 18, a coding block composed of pixel matrix 19, and a coding block composed of pixel matrix 20.

[0133] A 4x8 adder is used to add the reference index value of the coding block composed of pixel array 17 to the reference index value of the coding block composed of pixel array 18, resulting in the reference index value of the coding block composed of pixel arrays 17 and 18. Another 4x8 adder is used to add the reference index value of the coding block composed of pixel array 19 to the reference index value of the coding block composed of pixel array 20, resulting in the reference index value of the coding block composed of pixel arrays 19 and 20.

[0134] Reference Figure 15 , Figure 15 The hardware computing architecture is illustrated. Four 4x4 hardware computing units can calculate the reference index values ​​for four 4x4 minimum coding blocks, with one 4x4 hardware computing unit corresponding to the reference index value of each 4x4 minimum coding block. Two 4x8 adders are used; each 4x8 adder performs the addition calculation on the reference index values ​​of two 4x4 coding blocks, resulting in a total of two 4x8 coding block reference index values.

[0135] ②The reference index values ​​of the two first coding blocks are added together by the third adder to obtain the reference index value of the second coding block. The size of the second coding block is a*4a.

[0136] Reference Figure 14 By using a 4*16 adder, the reference index value of the coding block composed of pixel arrays 17 and 18 is added to the reference index value of the coding block composed of pixel arrays 19 and 20 to obtain the reference index value of the coding block composed of pixel arrays 17-20.

[0137] Reference Figure 15 By using a 4*16 adder, the reference index values ​​of two 4*8 coding blocks are added together to obtain the reference index value of one 4*16 coding block.

[0138] ③ The reference index value of the second coding block is added to the reference index value of a coding block with a size of a*4a adjacent to the second coding block in the overlapping search area by the fourth adder to obtain the reference index value of the third coding block, which has a size of 2a*4a.

[0139] Reference Figure 14 By using an 8*16 adder, the reference index value of the coding block composed of pixel array 17-20 is added to the reference index value of the coding block composed of pixel array 13-16 to obtain the reference index value of the coding block composed of pixel array 13-20.

[0140] Reference Figure 15By using an 8*16 adder, the reference index values ​​of two 4*16 coded blocks are added together to obtain the reference index value of one 8*16 coded block.

[0141] ④ Using the fifth adder, the reference index value of the third coding block is added to the reference index value of a coding block with a size of 2a*4a adjacent to the third coding block in the overlapping search area to obtain the reference index value of the largest coding block, which has a size of 4a*4a.

[0142] Reference Figure 14 By using a 16*16 adder, the reference index value of the coding block composed of pixel array 13-20 is added to the reference index value of the coding block composed of pixel array 5-16 to obtain the reference index value of the coding block composed of pixel array 5-20.

[0143] Reference Figure 15 By using a 16*16 adder, the reference index values ​​of two 8*16 coded blocks are added together to obtain the reference index value of one 16*16 coded block.

[0144] ⑤ Using the sixth adder, the reference index value of the first minimum coding block is added to the reference index value of a coding block of size a*a adjacent to the first minimum coding block in the overlapping search region to obtain the reference index value of the first fourth coding block, the size of which is 2a*a; using the seventh adder, the reference index value of the second minimum coding block is added to the reference index value of a coding block of size a*a adjacent to the second minimum coding block in the overlapping search region to obtain the reference index value of the second fourth coding block; using the eighth adder, the reference index value of the third minimum coding block is added to the reference index value of a coding block of size a*a adjacent to the third minimum coding block in the overlapping search region to obtain the reference index value of the third fourth coding block; using the ninth adder, the reference index value of the fourth minimum coding block is added to the reference index value of a coding block of size a*a adjacent to the fourth minimum coding block in the overlapping search region to obtain the reference index value of the fourth fourth coding block.

[0145] Reference Figure 14 By using an 8*4 adder, the reference index value of the coding block composed of pixel array 17 is added to the reference index value of the coding block composed of pixel array 13 to obtain the reference index value of the coding block composed of pixel arrays 13 and 17.

[0146] By using another 8*4 adder, the reference index value of the coding block composed of pixel matrix 18 is added to the reference index value of the coding block composed of pixel matrix 14 to obtain the reference index value of the coding block composed of pixel matrices 14 and 18.

[0147] By using another 8*4 adder, the reference index value of the coding block composed of pixel matrix 19 is added to the reference index value of the coding block composed of pixel matrix 15 to obtain the reference index value of the coding block composed of pixel matrices 15 and 19.

[0148] By using another 8*4 adder, the reference index value of the coding block composed of pixel matrix 20 is added to the reference index value of the coding block composed of pixel matrix 16 to obtain the reference index value of the coding block composed of pixel matrices 16 and 20.

[0149] Reference Figure 15 By using four 8*4 adders, each 8*4 adder performs addition calculations on the reference index values ​​of two 4*4 coded blocks, resulting in a total of four 8*4 coded block reference index values.

[0150] ⑥ Using the tenth adder, the reference index value of the first fourth coding block is added to a coding block of size 2a*a adjacent to the first fourth coding block in the overlapping search area to obtain the reference index value of the first fifth coding block, which has a size of 4a*a. Using the eleventh adder, the reference index value of the second fourth coding block is added to a coding block of size 2a*a adjacent to the second fourth coding block in the overlapping search area to obtain the reference index value of the second fifth coding block. Using the twelfth adder, the reference index value of the third fourth coding block is added to a coding block of size 2a*a adjacent to the third fourth coding block in the overlapping search area to obtain the reference index value of the third fifth coding block. Using the thirteenth adder, the reference index value of the fourth fourth coding block is added to a coding block of size 2a*a adjacent to the fourth fourth coding block in the overlapping search area to obtain the reference index value of the fourth fifth coding block.

[0151] Reference Figure 14 By using a 16*4 adder, the reference index value of the coding block composed of pixel arrays 5 and 9 is added to the reference index value of the coding block composed of pixel arrays 13 and 17 to obtain the reference index value of the coding block composed of pixel arrays 5, 9, 13 and 17.

[0152] By using another 16*4 adder, the reference index value of the coding block composed of pixel arrays 6 and 10 is added to the reference index value of the coding block composed of pixel arrays 14 and 18 to obtain the reference index value of the coding block composed of pixel arrays 6, 10, 14 and 18.

[0153] By using another 16*4 adder, the reference index value of the coding block composed of pixel arrays 7 and 11 is added to the reference index value of the coding block composed of pixel arrays 15 and 19 to obtain the reference index value of the coding block composed of pixel arrays 7, 11, 15 and 19.

[0154] By using another 16*4 adder, the reference index value of the coding block composed of pixel arrays 8 and 12 is added to the reference index value of the coding block composed of pixel arrays 16 and 20 to obtain the reference index value of the coding block composed of pixel arrays 8, 12, 16 and 20.

[0155] Reference Figure 15 By using four 16*4 adders, each 16*4 adder performs addition calculations on the reference index values ​​of two 8*4 coded blocks, resulting in a total of four 16*4 coded block reference index values.

[0156] ⑦ The fourteenth adder adds the reference index values ​​of the two fifth coding blocks to obtain the reference index value of a sixth coding block, the size of which is 4a*2a; the fifteenth adder adds the reference index values ​​of the other two fifth coding blocks to obtain the reference index value of another sixth coding block.

[0157] Reference Figure 14 By using a 16*8 adder, the reference index values ​​of the coding block composed of pixel arrays 5, 9, 13, and 17 are added to the reference index values ​​of the coding block composed of pixel arrays 6, 10, 14, and 18 to obtain the reference index values ​​of the coding block composed of pixel arrays 5, 9, 13, 17, 6, 10, 14, and 18.

[0158] By using another 16*8 adder, the reference index value of the coding block composed of pixel arrays 7, 11, 15, and 19 is added to the reference index value of the coding block composed of pixel arrays 8, 12, 16, and 20 to obtain the reference index value of the coding block composed of pixel arrays 7, 11, 15, 19, 8, 12, 16, and 20.

[0159] Reference Figure 15 By using two 16*8 adders, each 16*8 adder performs addition calculations on the reference index values ​​of the two 16*4 coding blocks, resulting in a total of two 16*8 coding block reference index values.

[0160] ⑧ Using the sixteenth adder, the reference index value of a first coding block is added to the reference index value of a coding block of size a*2a adjacent to the first coding block in the overlapping search region to obtain the reference index value of a seventh coding block. The size of the eighth coding block is 2a*2a. Using the seventeenth adder, the reference index value of another first coding block is added to the reference index value of a coding block of size a*2a adjacent to another first coding block in the overlapping search region to obtain the reference index value of another seventh coding block.

[0161] Reference Figure 14 By using an 8*8 adder, the reference index value of the coding block composed of pixel arrays 17 and 18 is added to the reference index value of the coding block composed of pixel arrays 13 and 14, to obtain the reference index value of the coding block composed of pixel arrays 13, 14, 17 and 18.

[0162] By using another 8*8 adder, the reference index value of the coding block composed of pixel arrays 19 and 20 is added to the reference index value of the coding block composed of pixel arrays 15 and 16 to obtain the reference index value of the coding block composed of pixel arrays 15, 16, 19 and 20.

[0163] Reference Figure 15 By using two 8*8 adders, each 8*8 adder performs addition calculations on the reference index values ​​of the two 4*4 coded blocks, resulting in a total of two 8*8 coded block reference index values.

[0164] In summary, with the smallest coding block size being a*a and the largest coding block size being 4a*4a, the above data reuse method requires only 4 hardware computing units and 17 adders, saving a significant amount of computing resources and time.

[0165] Figure 16 A flowchart illustrating a method for searching a reference block provided in an exemplary embodiment of this application is shown, illustratively described by way of an encoding device, the method comprising:

[0166] Step 1620: For each of the N square regions, for the corresponding a... 2 Each of the search windows in the search window performs a reciprocating scan of the first image area with a step length in one round;

[0167] N square regions cover the complete referenceable area of ​​the current block to be encoded as defined by the Multi-Functional Video Coding Protocol (VVC). (Combined with reference...) Figure 9The VVC protocol specifies that the reference area of ​​the current block to be encoded includes three complete 64*64 CUs, as well as the encoded area within one 64*64 CU. That is, the reference area of ​​the current block to be encoded is covered by four square regions, and the first image region is any one of these four square regions.

[0168] For each square region, a total of a 2 Reciprocating scanning, a 2 Reciprocating scanning and a 2 Each search window corresponds to one other. 2 Each search window's starting point for its reciprocating scan forms a pixel array, with both its length and width being the first step length 'a'. That is, this application embodiment provides a full search scheme, using 'a'... 2 A search window performed an a 2 The reciprocating scanning method ensures that each pixel in the first image region is used as a vertex of the search window (the search window consists of four vertices), which guarantees the comprehensiveness of the search and results in a high degree of matching and superior quality of the final reference block.

[0169] Taking a value of 4 as an example, there are 16 search windows. The starting points of the reciprocating scan corresponding to the 16 search windows are (0,0), (1,0), (2,0), (3,0), (0,1), (1,1), (2,1), (3,1), (0,2), (1,2), (2,2), (3,2), (0,3), (1,3), (2,3), and (3,3). That is, a 2 The starting point of the reciprocating scan corresponding to each search window constitutes a minimum coding block.

[0170] Step 1640, for N square regions corresponding to N*a 2 The reciprocating scan is performed round by round, and the reference index values ​​of each of the multiple coding blocks generated by each sliding of the search window during each round of reciprocating scan are calculated.

[0171] N square regions correspond to N*a operations. 2 In a reciprocating scan, the search window will slide multiple times during one reciprocating scan. The calculation method for the reference index values ​​of the multiple coding blocks generated by each slide has been described in detail above and will not be repeated here.

[0172] Step 1660, from N*a 2 In the cluster of encoded blocks obtained by reciprocating scanning, the reference block for the current block to be encoded is determined based on the reference index value.

[0173] N*a 2The coded blocks obtained by the reciprocating scanning process constitute a coded block cluster. Based on the reference index value, a reference block for the current block to be encoded can be selected from the coded block cluster. Optionally, the reference index value is SAD, and the coded block with the smallest SAD value is selected from the coded block cluster as the reference block.

[0174] In summary, the embodiments of this application provide a full search solution, through a 2 A search window performed an a 2 The reciprocating scanning method ensures that each pixel in the first image region is used as a vertex of the search window (the search window consists of four vertices), which guarantees the comprehensiveness of the search and results in a high degree of matching and superior quality of the final reference block.

[0175] Figure 17 A flowchart illustrating a method for searching a reference block provided in an exemplary embodiment of this application is shown, illustratively described by way of an encoding device, the method comprising:

[0176] Step 1701, frame start;

[0177] Begin the reference block search for the current frame to be encoded.

[0178] Step 1702, CTU starts;

[0179] The current frame to be encoded includes multiple CTUs, and a reference block search is initiated within the current CTU.

[0180] Step 1703: Load the original data and reference data;

[0181] In one embodiment, a CTU has a size of 128*128 and contains 1024 4*4 CUs. The reference block search method for a single 4*4 CU, i.e., a single-path reference block search process, was described above. Optionally, the reference block search process for 256 4*4 CUs can be executed in parallel using 256 paths.

[0182] In a single-path flow, raw data refers to the pixel data of the current block to be encoded, while reference data refers to the pixel data of the reference area of ​​the current block to be encoded.

[0183] Step 1704, reciprocating scan initiated;

[0184] In this embodiment of the application, a total of 16 rounds of reciprocating scanning are performed.

[0185] The first round of reciprocating scanning is ROUND 0. The second round of reciprocating scanning is ROUND 1, and so on, with the 16th round of reciprocating scanning being ROUND 15.

[0186] Step 1705: Select the starting point based on the reciprocating scan;

[0187] The starting point of the search window corresponding to each of the 16 reciprocating scans is different. Select the starting point of the search window for the current reciprocating scan.

[0188] Step 1706: Perform sliding window calculations in the current region starting from the starting point, following an arc shape.

[0189] Starting from the starting point in the current region, a sliding window calculation is performed in an arc shape to obtain the reference index values ​​of multiple coded blocks generated by each sliding of the search window during the reciprocating scan.

[0190] Step 1707: After the sliding window calculation is completed, increment the number of reciprocating scan cycles by 1;

[0191] After the sliding window calculation is completed, the number of reciprocating scan cycles is incremented by 1;

[0192] Step 1708: Determine whether the number of reciprocating scan cycles is greater than 16;

[0193] Determine if the number of reciprocating scan cycles is greater than 16. If yes, proceed to step 1709; otherwise, proceed to step 1704.

[0194] Step 1709: Determine whether the encoding has reached the last CTU;

[0195] Determine if the current encoding has reached the last CTU. If yes, proceed to step 1710; otherwise, proceed to step 1702.

[0196] Step 1710, end of frame;

[0197] Reference block search has been performed on all CUs to be encoded in the current frame.

[0198] In this application, compression performance tests were conducted on the above scheme. The test results show that although the size of the supported coding blocks is limited, the full search method is superior to the original hash and pattern search methods. Therefore, PSNR (Peak Signal to Noise Ratio), SSIM (Structural Similarity Index), and VMAF (Video Multi-Method Evaluation Fusion) all show significant performance improvements (negative values ​​represent positive gains).

[0199]

[0200] In terms of hardware architecture, this application adopts 256-way parallel computing, with each way performing search calculations in the manner described above, achieving a processing performance of 1080p@144fps at 1GHz.

[0201] Figure 18 The present application illustrates a search circuit 1800 for a reference block provided in an exemplary embodiment. The circuit includes a first circuit unit 1801, a second circuit unit 1802, a third circuit unit 1803, and a fourth circuit unit 1804; the four circuit units are connected in series by wires.

[0202] The first circuit unit 1801 is used to acquire a first image region, which covers part or all of the reference region of the current block to be encoded.

[0203] The second circuit unit 1802 is used to perform a reciprocating scan in the first image area with a step length through a search window. The step length is the side length of the minimum coding block, and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size.

[0204] The third circuit unit 1803 is used to calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process.

[0205] The fourth circuit unit 1804 is used to determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated each time the sliding occurs.

[0206] In an optional embodiment, the third circuit unit 1803 is further configured to calculate, during the reciprocating scanning process, after each slide of the search window, the reference index values ​​of each of the multiple minimum coding blocks in the updated search area, wherein the updated search area is the area in the search window after the slide that does not overlap with the search window before the slide.

[0207] The third circuit unit 1803 is also used to obtain the reference index values ​​of the coding blocks of various sizes generated after the search window is slid, based on the reference index values ​​of the respective reference index values ​​of the multiple smallest coding blocks in the updated search area and combined with the reference index values ​​of the coding blocks in the overlapping search area. The overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.

[0208] In an optional embodiment, the third circuit unit 1803 includes a hardware computing units 1805. The a hardware computing units 1805 are used to calculate the reference index values ​​of the a minimum coding blocks in the updated search area of ​​the slid-out search window. The a hardware computing units correspond one-to-one with the a minimum coding blocks, and a is a positive integer.

[0209] In an optional embodiment, the third circuit unit includes a plurality of adders 1806. The plurality of adders 1806 are used to obtain reference index values ​​of coding blocks of various sizes generated after the search window slides, based on the reference index values ​​of each of the plurality of minimum coding blocks in the updated search region, along the row and column directions of the first image region and in combination with the reference index values ​​of the coding blocks in the overlapping search region.

[0210] In an optional embodiment, the plurality of adders 1806 include a first to a seventeenth adder.

[0211] The first adder is used to add the reference index values ​​of the two smallest coding blocks in the update search region to obtain the reference index value of a first coding block. The size of the smallest coding block is a*a, and the size of the first coding block is a*2a. The second adder is used to add the reference index values ​​of the other two smallest coding blocks in the update search region to obtain the reference index value of another first coding block. The update search region includes four smallest coding blocks.

[0212] The third adder is used to add the reference index values ​​of the two first coding blocks to obtain the reference index value of the second coding block, the size of which is a*4a.

[0213] The fourth adder is used to add the reference index value of the second coding block to the reference index value of a coding block of size a*4a adjacent to the second coding block in the overlapping search area to obtain the reference index value of the third coding block, the size of which is 2a*4a.

[0214] The fifth adder is used to add the reference index value of the third coding block to the reference index value of a coding block with a size of 2a*4a adjacent to the third coding block in the overlapping search area, so as to obtain the reference index value of the largest coding block, which has a size of 4a*4a.

[0215] The sixth adder adds the reference index value of the first minimum coding block to the reference index value of a coding block of size a*a adjacent to the first minimum coding block in the overlapping search region, to obtain the reference index value of the first fourth coding block, the size of which is 2a*a. The seventh adder adds the reference index value of the second minimum coding block to the reference index value of a coding block of size a*a adjacent to the second minimum coding block in the overlapping search region, to obtain the reference index value of the second fourth coding block. The eighth adder adds the reference index value of the third minimum coding block to the reference index value of a coding block of size a*a adjacent to the third minimum coding block in the overlapping search region, to obtain the reference index value of the third fourth coding block. The ninth adder adds the reference index value of the fourth minimum coding block to the reference index value of a coding block of size a*a adjacent to the fourth minimum coding block in the overlapping search region, to obtain the reference index value of the fourth fourth coding block.

[0216] The tenth adder adds the reference index value of the first fourth coding block to a 2a*a coding block adjacent to the first fourth coding block in the overlapping search region to obtain the reference index value of the first fifth coding block, which has a size of 4a*a. The eleventh adder adds the reference index value of the second fourth coding block to a 2a*a coding block adjacent to the second fourth coding block in the overlapping search region to obtain the reference index value of the second fifth coding block. The twelfth adder adds the reference index value of the third fourth coding block to a 2a*a coding block adjacent to the third fourth coding block in the overlapping search region to obtain the reference index value of the third fifth coding block. The thirteenth adder adds the reference index value of the fourth fourth coding block to a 2a*a coding block adjacent to the fourth fourth coding block in the overlapping search region to obtain the reference index value of the fourth fifth coding block.

[0217] The fourteenth adder is used to add the reference index values ​​of the two fifth coding blocks to obtain the reference index value of a sixth coding block, the size of which is 4a*2a; the fifteenth adder is used to add the reference index values ​​of the other two fifth coding blocks to obtain the reference index value of another sixth coding block.

[0218] The sixteenth adder is used to add the reference index value of a first coding block to the reference index value of a coding block of size a*2a adjacent to the first coding block in the overlapping search region to obtain the reference index value of a seventh coding block. The size of the eighth coding block is 2a*2a. The seventeenth adder is used to add the reference index value of another first coding block to the reference index value of a coding block of size a*2a adjacent to another first coding block in the overlapping search region to obtain the reference index value of another seventh coding block.

[0219] In an optional embodiment, the size of the first image region is 64*64, the size of the minimum coding block is 4*4, and the size of the maximum coding block is 16*16.

[0220] Alternatively, the size of the first image region is 64*64, the size of the smallest coding block is 8*8, and the size of the largest coding block is 32*32, all in pixels.

[0221] In an optional embodiment, the search window is a 2 any one of the search windows, a 2 The starting points of the reciprocating scan corresponding to each search window form a pixel array, and the length and width of the pixel array are both the first step length 'a'.

[0222] The second circuit unit 1802 is also used for a 2 Each of the search windows in the search window performs a reciprocating scan of the first image area with a step length in one round;

[0223] The third circuit unit 1803 is also used for a 2 Each search window corresponds to a 2 The process involves reciprocating scans and calculating the reference index values ​​for each of the multiple encoded blocks generated by each sliding of the search window during each reciprocating scan.

[0224] In an optional embodiment, the first image region is any one of N square regions, which cover the complete referenceable area of ​​the current block to be encoded as defined by the Multifunction Video Coding Protocol.

[0225] The second circuit unit 1802 is also used for each of the N square regions, for each square region corresponding to a 2 Each of the search windows in the search window performs a reciprocating scan of the first image area with a step length in one round;

[0226] The third circuit unit 1803 is also used for N*a corresponding to N square regions. 2The reciprocating scan is performed round by round, and the reference index values ​​of each of the multiple coding blocks generated by each sliding of the search window during each round of reciprocating scan are calculated.

[0227] The fourth circuit unit 1804 is also used to obtain N*a 2 In the cluster of encoded blocks obtained by reciprocating scanning, the reference block for the current block to be encoded is determined based on the reference index value.

[0228] It should be noted that for a more detailed description of the search circuit of the reference block described above, please refer to the method embodiments above. The relevant content described in the method embodiments above can be modified to be executed by corresponding integrated circuits, and corresponding integrated circuits can be added to the embodiments of the search circuit of the reference block described above.

[0229] Figure 19 This application shows a structural block diagram of a reference block search apparatus provided in an exemplary embodiment, the apparatus comprising:

[0230] The acquisition module 1901 is used to acquire a first image region, which covers part or all of the reference region of the current block to be encoded.

[0231] The scanning module 1902 is used to perform reciprocating scanning in the first image area with a step length through the search window. The step length is the side length of the minimum coding block, and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size.

[0232] Calculation module 1903 is used to calculate the reference index values ​​of each of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning process;

[0233] The determining module 1904 is used to determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated in each sliding.

[0234] In an optional embodiment, the calculation module 1903 is further configured to, during the reciprocating scanning process, calculate the reference index values ​​of each of the multiple smallest coding blocks in the updated search area after each slide of the search window, wherein the updated search area is the region in the search window after the slide that does not overlap with the search window before the slide; based on the reference index values ​​of each of the multiple smallest coding blocks in the updated search area, and combined with the reference index values ​​of the coding blocks in the overlapping search area, obtain the reference index values ​​of coding blocks of various sizes generated after the search window slides, wherein the overlapping search area is the region in the search window after the slide that overlaps with the search window before the slide.

[0235] In an optional embodiment, the calculation module 1903 is further configured to calculate, through a hardware calculation units, the reference index values ​​of a minimum coding blocks in the updated search area of ​​the slid-out search window, wherein the a hardware calculation units correspond one-to-one with the a minimum coding blocks.

[0236] In an optional embodiment, the calculation module 1903 is further configured to obtain reference index values ​​of coding blocks of various sizes generated after the search window slides, based on the reference index values ​​of each of the multiple smallest coding blocks in the updated search region, along the row and column directions of the first image region, and in combination with the reference index values ​​of the coding blocks in the overlapping search region, using multiple adders.

[0237] In an optional embodiment, the calculation module 1903 is further configured to add the reference index values ​​of the two smallest coding blocks in the update search region using a first adder to obtain a reference index value of a first coding block, wherein the size of the smallest coding block is a*a and the size of the first coding block is a*2a; and to add the reference index values ​​of the other two smallest coding blocks in the update search region using a second adder to obtain a reference index value of another first coding block, wherein the update search region includes four smallest coding blocks;

[0238] The reference index values ​​of the two first coding blocks are added together by the third adder to obtain the reference index value of the second coding block. The size of the second coding block is a*4a.

[0239] The reference index value of the second coding block is added to the reference index value of a coding block of size a*4a adjacent to the second coding block in the overlapping search area by the fourth adder to obtain the reference index value of the third coding block, which has a size of 2a*4a.

[0240] The reference index value of the third coding block is added to the reference index value of a coding block with a size of 2a*4a adjacent to the third coding block in the overlapping search area by the fifth adder to obtain the reference index value of the largest coding block, which has a size of 4a*4a.

[0241] The sixth adder adds the reference index value of the first minimum coding block to the reference index value of a coding block of size a*a adjacent to the first minimum coding block in the overlapping search region, resulting in the reference index value of the first fourth coding block, which has a size of 2a*a. The seventh adder adds the reference index value of the second minimum coding block to the reference index value of a coding block of size a*a adjacent to the second minimum coding block in the overlapping search region, resulting in the reference index value of the second fourth coding block. The eighth adder adds the reference index value of the third minimum coding block to the reference index value of a coding block of size a*a adjacent to the third minimum coding block in the overlapping search region, resulting in the reference index value of the third fourth coding block. The ninth adder adds the reference index value of the fourth minimum coding block to the reference index value of a coding block of size a*a adjacent to the fourth minimum coding block in the overlapping search region, resulting in the reference index value of the fourth fourth coding block.

[0242] The tenth adder adds the reference index value of the first fourth coding block to a 2a*a coding block adjacent to the first fourth coding block in the overlapping search region, resulting in the reference index value of the first fifth coding block, which has a size of 4a*a. The eleventh adder adds the reference index value of the second fourth coding block to a 2a*a coding block adjacent to the second fourth coding block in the overlapping search region, resulting in the reference index value of the second fifth coding block. The twelfth adder adds the reference index value of the third fourth coding block to a 2a*a coding block adjacent to the third fourth coding block in the overlapping search region, resulting in the reference index value of the third fifth coding block. The thirteenth adder adds the reference index value of the fourth fourth coding block to a 2a*a coding block adjacent to the fourth fourth coding block in the overlapping search region, resulting in the reference index value of the fourth fifth coding block.

[0243] The fourteenth adder adds the reference index values ​​of the two fifth coding blocks to obtain the reference index value of a sixth coding block, the size of which is 4a*2a; the fifteenth adder adds the reference index values ​​of the other two fifth coding blocks to obtain the reference index value of another sixth coding block.

[0244] The sixteenth adder adds the reference index value of a first coding block to the reference index value of a coding block of size a*2a adjacent to the first coding block in the overlapping search region, resulting in the reference index value of a seventh coding block. The size of the eighth coding block is 2a*2a. The seventeenth adder adds the reference index value of another first coding block to the reference index value of a coding block of size a*2a adjacent to another first coding block in the overlapping search region, resulting in the reference index value of another seventh coding block.

[0245] In one optional embodiment, the size of the first image region is 64*64, the size of the minimum coding block is 4*4, and the size of the maximum coding block is 16*16; or, the size of the first image region is 64*64, the size of the minimum coding block is 8*8, and the size of the maximum coding block is 32*32, all in pixels.

[0246] In an optional embodiment, the search window is a 2 any one of the search windows, a 2 Each search window's corresponding reciprocating scan starting point forms a pixel array, with both its length and width being the first step length 'a'. The scanning module 1902 is also used for 'a'... 2 Each of the search windows performs a reciprocating scan of the first image region in one step length. The calculation module 1903 is also used for a... 2 Each search window corresponds to a 2 The process involves reciprocating scans and calculating the reference index values ​​for each of the multiple encoded blocks generated by each sliding of the search window during each reciprocating scan.

[0247] In an optional embodiment, the first image region is any one of N square regions, which cover the complete referenceable area of ​​the current block to be encoded as defined by the Multifunction Video Coding Protocol. The scanning module 1902 is further configured to, for each of the N square regions, for each square region corresponding to a... 2 Each search window in the N search windows performs a reciprocating scan of the first image region with a step length in one pass. The calculation module 1903 is also used to calculate N*a corresponding to the N square regions. 2 The process involves reciprocating scans and calculating the reference index values ​​for each of the multiple encoded blocks generated by each sliding of the search window during each reciprocating scan.

[0248] Module 1904 is also used to determine N*a 2 In the cluster of encoded blocks obtained by reciprocating scanning, the reference block for the current block to be encoded is determined based on the reference index value.

[0249] In summary, a reciprocating scan is performed in the first image region using a search window with a step length equal to the side length of the smallest coded block. The size of the search window is equal to the size of the largest coded block. Reference index values ​​are calculated for each coded block generated by each slide of the search window during the reciprocating scan. These reference index values ​​are used to determine the reference block for the current block to be encoded. Therefore, this application provides a novel reference block search method based on reciprocating scanning.

[0250] Figure 20 A structural block diagram of a computer device 2000 provided in an exemplary embodiment of this application is shown. The computer device 2000 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The computer device 2000 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.

[0251] Typically, a computer device 2000 includes a processor 2001 and a memory 2002.

[0252] Processor 2001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 2001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 2001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 2001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 2001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0253] The memory 2002 may include one or more computer-readable storage media, which may be non-transitory. The memory 2002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2002 are used to store at least one instruction, which is executed by the processor 2001 to implement the reference block search method provided in the method embodiments of this application.

[0254] In some embodiments, the computer device 2000 may also optionally include a peripheral device interface 2003 and at least one peripheral device. The processor 2001, memory 2002, and peripheral device interface 2003 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 2003 via a bus, signal line, or circuit board. For example, the peripheral device may include at least one of the following: radio frequency circuitry 2004, display screen 2005, camera assembly 2006, audio circuitry 2007, and power supply 2008.

[0255] Peripheral device interface 2003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 2001 and memory 2002. In some embodiments, processor 2001, memory 2002 and peripheral device interface 2003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 2001, memory 2002 and peripheral device interface 2003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0256] The radio frequency (RF) circuit 2004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 2004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 2004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 2004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 2004 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 2004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0257] Display screen 2005 is used to display a UI (User Interface). This UI may include graphics, text, icons, video, and any combination thereof. When display screen 2005 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 2001 for processing. In this case, display screen 2005 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, display screen 2005 may be a single screen disposed on the front panel of computer device 2000; in other embodiments, display screen 2005 may be at least two screens, disposed on different surfaces of computer device 2000 or in a folded design; in still other embodiments, display screen 2005 may be a flexible display screen disposed on a curved or folded surface of computer device 2000. Furthermore, display screen 2005 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 2005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0258] The camera assembly 2006 is used to acquire images or videos. Optionally, the camera assembly 2006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 2006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0259] The audio circuit 2007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 2001 for processing, or input to the radio frequency circuit 2004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the computer device 2000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 2001 or the radio frequency circuit 2004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 2007 may also include a headphone jack.

[0260] Power supply 2008 is used to supply power to the various components in computer device 2000. Power supply 2008 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 2008 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0261] In some embodiments, the computer device 2000 further includes one or more sensors 2009. The one or more sensors 2009 include, but are not limited to, an accelerometer 2010, a gyroscope 2011, a pressure sensor 2012, an optical sensor 2013, and a proximity sensor 2014.

[0262] Accelerometer 2010 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 2000. For example, accelerometer 2010 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 2001 can control display screen 2005 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 2010. Accelerometer 2010 can also be used for games or for acquiring user motion data.

[0263] The gyroscope sensor 2011 can detect the orientation and rotation angle of the computer device 2000. The gyroscope sensor 2011 can work in conjunction with the accelerometer sensor 2010 to collect the user's 3D movements on the computer device 2000. Based on the data collected by the gyroscope sensor 2011, the processor 2001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0264] The pressure sensor 2012 can be installed on the side bezel of the computer device 2000 and / or on the lower layer of the display screen 2005. When the pressure sensor 2012 is installed on the side bezel of the computer device 2000, it can detect the user's grip signal on the computer device 2000, and the processor 2001 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 2012. When the pressure sensor 2012 is installed on the lower layer of the display screen 2005, the processor 2001 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 2005. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0265] An optical sensor 2013 is used to collect ambient light intensity. In one embodiment, a processor 2001 can control the display brightness of a display screen 2005 based on the ambient light intensity collected by the optical sensor 2013. For example, when the ambient light intensity is high, the display brightness of the display screen 2005 is increased; when the ambient light intensity is low, the display brightness of the display screen 2005 is decreased. In another embodiment, the processor 2001 can also dynamically adjust the shooting parameters of a camera assembly 2006 based on the ambient light intensity collected by the optical sensor 2013.

[0266] The proximity sensor 2014, also known as a distance sensor, is typically installed on the front panel of the computer device 2000. The proximity sensor 2014 is used to detect the distance between the user and the front of the computer device 2000. In one embodiment, when the proximity sensor 2014 detects that the distance between the user and the front of the computer device 2000 is gradually decreasing, the processor 2001 controls the display screen 2005 to switch from a screen-on state to a screen-off state; when the proximity sensor 2014 detects that the distance between the user and the front of the computer device 2000 is gradually increasing, the processor 2001 controls the display screen 2005 to switch from a screen-off state to a screen-on state.

[0267] Those skilled in the art will understand that Figure 20 The structure shown does not constitute a limitation on the computer device 2000, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0268] According to one aspect of this application, a processor is provided, wherein an integrated circuit in the processor is used to implement a method for searching reference blocks as provided in the above method embodiments.

[0269] According to one aspect of this application, a processor is provided that includes a search circuit for a reference block as described in the above embodiments.

[0270] According to one aspect of this application, a chip is provided, the chip including a processor, wherein an integrated circuit in the processor is used to implement a search method for reference blocks as provided in the above method embodiments.

[0271] According to one aspect of this application, a chip is provided, the chip including a processor, the processor including a search circuit for the reference block provided in the above embodiments.

[0272] According to one aspect of this application, a computer device is provided, the computer device including a processor, wherein an integrated circuit in the processor is used to implement the reference block search method as provided in the above method embodiments.

[0273] According to one aspect of this application, a computer device is provided, the computer device including a processor, the processor including a search circuit for the reference block provided in the above embodiments.

[0274] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the reference block search method provided in the above method embodiments.

[0275] This application provides a computer program product or computer program that 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 reference block search method provided in the above-described method embodiments.

[0276] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0277] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0278] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for searching a reference block, characterized in that, The method includes: Obtain a first image region, which covers part or all of the reference region of the current block to be encoded; The first image region is scanned reciprocally in a step length using a search window. The step length is the side length of the minimum coding block. The size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size. Calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process; The reference block for the current block to be encoded is determined based on the reference index values ​​of the multiple encoded blocks generated in each slide. The calculation of the reference index values ​​of each of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning process includes: during the reciprocating scanning process, after each sliding of the search window, calculating the reference index values ​​of each of the multiple smallest coding blocks in the updated search area, wherein the updated search area is the area in the search window after sliding that does not overlap with the search window before sliding. Based on the reference index values ​​of each of the multiple smallest coding blocks in the updated search area, and combined with the reference index values ​​of the coding blocks in the overlapping search area, the reference index values ​​of coding blocks of various sizes generated after the search window is slid are obtained. The overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.

2. The method according to claim 1, characterized in that, The calculation yields reference index values ​​for each of the multiple minimum coded blocks in the updated search region, including: Using a hardware computing units, the reference index values ​​of a minimum coding blocks in the updated search area of ​​the slid-out search window are calculated. The a hardware computing units correspond one-to-one with the a minimum coding blocks, where a is a positive integer.

3. The method according to claim 1, characterized in that, The reference index values ​​for each size of the coding block generated after the search window slides are obtained by combining the reference index values ​​of the respective minimum coding blocks in the updated search region with the reference index values ​​of the coding blocks in the overlapping search region, including: By using multiple adders, based on the reference index values ​​of each of the multiple smallest coding blocks in the updated search region, and along the row and column directions of the first image region, combined with the reference index values ​​of the coding blocks in the overlapping search region, the reference index values ​​of the coding blocks of each size generated after the search window slides are obtained.

4. The method according to claim 3, characterized in that, The process involves using multiple adders to obtain the reference index values ​​of the coding blocks of various sizes generated after the search window slides, based on the reference index values ​​of the respective minimum coding blocks in the updated search region, along the row and column directions of the first image region, and combining the reference index values ​​of the coding blocks in the overlapping search region. The first adder adds the reference index values ​​of the two smallest coding blocks in the updated search region to obtain a reference index value for a first coding block, wherein the size of the smallest coding block is a. a, the size of the first coded block is a 2a; The reference index values ​​of the other two minimum coding blocks in the updated search region are added together by the second adder to obtain the reference index value of another first coding block. The updated search region includes four minimum coding blocks. The reference index values ​​of the two first coding blocks are added together using a third adder to obtain the reference index value of the second coding block, where the size of the second coding block is a. 4a; The fourth adder combines the reference index value of the second coded block with a value of size a adjacent to the second coded block in the overlapping search region. The reference index values ​​of the 4a coded blocks are added together to obtain the reference index value of the third coded block, the size of which is 2a. 4a; The fifth adder combines the reference index value of the third coded block with a value of 2a adjacent to the third coded block in the overlapping search region. The reference index values ​​of the 4a-sized coded blocks are added together to obtain the reference index value of the largest coded block, and the size of the largest coded block is 4a. 4a; The sixth adder combines the reference index value of the first minimum coding block with a value of size a in the overlapping search region adjacent to the first minimum coding block. The reference index values ​​of the coded blocks 'a' are added together to obtain the reference index value of the first fourth coded block, wherein the size of the fourth coded block is 2a. a; Using the seventh adder, the reference index value of the second minimum coding block is combined with a value of size a in the overlapping search region adjacent to the second minimum coding block. The reference index values ​​of the coded block 'a' are added together to obtain the reference index value of the second fourth coded block; then, through the eighth adder, the reference index value of the third minimum coded block is added to a reference index value of size 'a' adjacent to the third minimum coded block in the overlapping search region. The reference index values ​​of the coded block 'a' are added together to obtain the reference index value of the third fourth coded block; then, using the ninth adder, the reference index value of the fourth smallest coded block is added to a reference index value of size 'a' adjacent to the fourth smallest coded block in the overlapping search region. The reference index values ​​of the coded blocks of a are added together to obtain the reference index value of the fourth coded block. The tenth adder combines the reference index value of the first fourth coding block with a value of 2a adjacent to the first fourth coding block in the overlapping search region. The coded blocks of size 'a' are added together to obtain the reference index value of the first fifth coded block, wherein the size of the fifth coded block is 4a. a; Using the eleventh adder, the reference index value of the second fourth coding block is compared with a value of 2a adjacent to the second fourth coding block in the overlapping search region. The reference index value of the second fifth coding block is obtained by adding the coding blocks of size 'a'. Then, the reference index value of the third fourth coding block is added to a value of size 2a adjacent to the third fourth coding block in the overlapping search region using the twelfth adder. The reference index value of the third fifth coding block is obtained by adding the coding blocks of size 'a'. Then, using the thirteenth adder, the reference index value of the fourth fourth coding block is added to a value of size 2a adjacent to the fourth fourth coding block in the overlapping search region. The coded blocks of 'a' are added together to obtain the reference index value of the fourth and fifth coded blocks; The fourteenth adder adds the reference index values ​​of the two fifth coding blocks to obtain the reference index value of a sixth coding block, the size of which is 4a. 2a; The reference index values ​​of the other two fifth coding blocks are added together by the fifteenth adder to obtain the reference index value of the other sixth coding block; The sixteenth adder combines a reference index value of a first coded block with a value of size a adjacent to the first coded block in the overlapping search region. The reference index values ​​of the 2a-sized coded blocks are added together to obtain a reference index value for a seventh coded block, the seventh coded block having a size of 2a. 2a; Using the seventeenth adder, the reference index value of another first coding block is compared with a value of size a in the overlapping search region adjacent to the other first coding block. The reference index values ​​of the coded blocks 2a are added together to obtain the reference index value of another seventh coded block.

5. The method according to any one of claims 1 to 4, characterized in that, The size of the first image region is 64 64, the size of the minimum coded block is 4 4. The size of the maximum coded block is 16. 16; Alternatively, the size of the first image region is 64. 64, the size of the minimum coded block is 8 8. The size of the maximum coded block is 32. 32, all units are pixels.

6. The method according to claim 1, characterized in that, The search window is a 2 any one of the search windows, namely a 2 Each search window's corresponding reciprocating scan starting point forms a pixel array, the length and width of which are both the first step length a; The search window performs a reciprocating scan in the first image area with a step length; The calculation of reference index values ​​for each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process includes: For the a 2 Each of the search windows performs one round of reciprocating scanning in the first image area with the first step length; For the a 2 Each search window corresponds to a 2 The process involves reciprocating scans and calculating the reference index values ​​for each of the multiple encoded blocks generated by each sliding of the search window during each reciprocating scan.

7. The method according to claim 6, characterized in that, The first image region is any one of N square regions, and the N square regions cover the complete reference area of ​​the current block to be encoded as specified by the Multifunctional Video Coding Protocol. The for the a 2 Each of the search windows performs one round of the reciprocating scan in the first image region with the first step length, including: For each of the N square regions, for the corresponding a of each square region 2 Each of the search windows performs one round of reciprocating scanning in the first image area with the first step length; The for the a 2 Each search window corresponds to a 2 The process involves reciprocating scans, calculating reference index values ​​for each of the multiple encoded blocks generated by each slide of the search window during each reciprocating scan, including: For the N square regions corresponding to N a 2 The reciprocating scan is performed in rounds, and the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during each round of reciprocating scan are calculated. The step of determining the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated in each slide includes: From the N a 2 In the coded block cluster obtained by reciprocating scanning, the reference block of the current block to be encoded is determined based on the reference index value.

8. A search circuit for a reference block, characterized in that, The circuit includes a first circuit unit, a second circuit unit, a third circuit unit, and a fourth circuit unit; the four circuit units are connected in series by wires. The first circuit unit is used to acquire a first image region, which covers part or all of the reference region of the current block to be encoded. The second circuit unit is used to perform a reciprocating scan in the first image area with a first step length through a search window. The first step length is the side length of the minimum coding block, and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size. The third circuit unit is used to calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process. The fourth circuit unit is used to determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated in each slide. The third circuit unit is also used to calculate the reference index values ​​of each of the multiple smallest coding blocks in the updated search area after each slide of the search window during the reciprocating scanning process. The updated search area is the area in the search window after the slide that does not overlap with the search window before the slide. The third circuit unit is further configured to obtain reference index values ​​for each size of the coding block generated after the search window is slid, based on the reference index values ​​of each of the multiple smallest coding blocks in the updated search area and combined with the reference index values ​​of the coding blocks in the overlapping search area, wherein the overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.

9. The circuit according to claim 8, characterized in that, The third circuit unit includes a hardware computing unit; The a hardware computing units are used to calculate the reference index values ​​of each of the a minimum coding blocks in the updated search area of ​​the slid-out search window. The a hardware computing units correspond one-to-one with the a minimum coding blocks, where a is a positive integer.

10. The circuit according to claim 8, characterized in that, The third circuit unit includes multiple adders; The multiple adders are used to obtain the reference index values ​​of the coding blocks of various sizes generated after the search window slides, based on the reference index values ​​of the respective minimum coding blocks in the updated search region, along the row and column directions of the first image region, and in combination with the reference index values ​​of the coding blocks in the overlapping search region.

11. The circuit according to claim 10, characterized in that, The plurality of adders includes the first to the seventeenth adders; The first adder is used to add the reference index values ​​of the two smallest coding blocks in the updated search region to obtain a reference index value of a first coding block, wherein the size of the smallest coding block is a. a, the size of the first coded block is a 2a; A second adder is used to add the reference index values ​​of the other two minimum coding blocks in the updated search region to obtain the reference index value of another first coding block, wherein the updated search region includes four minimum coding blocks; The third adder is used to add the reference index values ​​of the two first coding blocks to obtain the reference index value of the second coding block, the size of which is a. 4a; A fourth adder is used to add the reference index value of the second coded block to a value of size a in the overlapping search region adjacent to the second coded block. The reference index values ​​of the 4a coded blocks are added together to obtain the reference index value of the third coded block, the size of which is 2a. 4a; The fifth adder is used to add the reference index value of the third coded block to a value of size 2a in the overlapping search region adjacent to the third coded block. The reference index values ​​of the 4a-sized coded blocks are added together to obtain the reference index value of the largest coded block, and the size of the largest coded block is 4a. 4a; The sixth adder is used to add the reference index value of the first minimum coding block to a value of size a in the overlapping search region adjacent to the first minimum coding block. The reference index values ​​of the coded blocks 'a' are added together to obtain the reference index value of the first fourth coded block, wherein the size of the fourth coded block is 2a. a; The seventh adder is used to combine the reference index value of the second minimum coding block with a value of size a in the overlapping search region adjacent to the second minimum coding block. The reference index values ​​of the coded block 'a' are added together to obtain the reference index value of the second fourth coded block; the eighth adder is used to add the reference index value of the third minimum coded block to a block of size 'a' adjacent to the third minimum coded block in the overlapping search region. The reference index values ​​of the coded blocks of a are added together to obtain the reference index values ​​of the third and fourth coded blocks. The ninth adder is used to add the reference index value of the fourth minimum coding block to a value of size a in the overlapping search region adjacent to the fourth minimum coding block. The reference index values ​​of the coded blocks of a are added together to obtain the reference index value of the fourth coded block. The tenth adder is used to add the reference index value of the first fourth coding block to a value of size 2a in the overlapping search region adjacent to the first fourth coding block. The coded blocks of size 'a' are added together to obtain the reference index value of the first fifth coded block, wherein the size of the fifth coded block is 4a. a; Eleventh adder, used to add the reference index value of the second fourth coding block to a value of size 2a in the overlapping search region adjacent to the second fourth coding block. The 12th adder is used to add the reference index value of the third fourth coding block to a block of size 2a adjacent to the third fourth coding block in the overlapping search region. The 13th adder is used to add the reference index value of the fourth fourth coding block to a block of size 2a in the overlapping search region. The coded blocks of 'a' are added together to obtain the reference index value of the fourth and fifth coded blocks; The fourteenth adder is used to add the reference index values ​​of the two fifth coding blocks to obtain the reference index value of a sixth coding block, the size of which is 4a. 2a; The fifteenth adder is used to add the reference index values ​​of the other two fifth coding blocks to obtain the reference index value of another sixth coding block; The sixteenth adder is used to add a reference index value of a first coded block to a value of size a in the overlapping search region adjacent to the first coded block. The reference index values ​​of the 2a-sized coded blocks are added together to obtain a reference index value for a seventh coded block, the seventh coded block having a size of 2a. 2a; The seventeenth adder, used to add the reference index value of another first coded block to a value of size a in the overlapping search region adjacent to the other first coded block. The reference index values ​​of the coded blocks 2a are added together to obtain the reference index value of another seventh coded block.

12. The circuit according to any one of claims 8 to 11, characterized in that, The size of the first image region is 64 64, the size of the minimum coded block is 4 4. The size of the maximum coded block is 16. 16; Alternatively, the size of the first image region is 64. 64, the size of the minimum coded block is 8 8. The size of the maximum coded block is 32. 32, all units are pixels.

13. The circuit according to claim 8, characterized in that, The search window is a 2 any one of the search windows, namely a 2 Each search window's corresponding reciprocating scan starting point forms a pixel array, the length and width of which are both the first step length a; The second circuit unit is further configured to, for the a 2 Each of the search windows performs one round of reciprocating scanning in the first image area with the first step length; The third circuit unit is also used for the a 2 Each search window corresponds to a 2 The process involves reciprocating scans and calculating the reference index values ​​for each of the multiple encoded blocks generated by each sliding of the search window during each reciprocating scan.

14. The circuit according to claim 13, characterized in that, The first image region is any one of N square regions, and the N square regions cover the complete reference area of ​​the current block to be encoded as specified by the Multifunctional Video Coding Protocol. The second circuit unit is further configured to, for each of the N square regions, specify a for each square region corresponding to a 2 Each of the search windows performs one round of reciprocating scanning in the first image area with the first step length; The third circuit unit is also used for N square regions corresponding to N a 2 The reciprocating scan is performed in rounds, and the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during each round of reciprocating scan are calculated. The fourth circuit unit is also used to obtain from the N a 2 In the coded block cluster obtained by reciprocating scanning, the reference block of the current block to be encoded is determined based on the reference index value.

15. A reference block search device, characterized in that, The device includes: The acquisition module is used to acquire a first image region, which covers part or all of the reference region of the current block to be encoded. The scanning module is used to perform a reciprocating scan in the first image area with a step length through a search window. The step length is the side length of the minimum coding block, and the size of the search window is the size of the maximum coding block. The minimum coding block is the coding block with the smallest size, and the maximum coding block is the coding block with the largest size. The calculation module is used to calculate the reference index values ​​of each of the multiple coded blocks generated by each sliding of the search window during the reciprocating scanning process. The determining module is used to determine the reference block of the current block to be encoded based on the reference index values ​​of the multiple encoded blocks generated in each slide; The calculation of the reference index values ​​of each of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning process includes: during the reciprocating scanning process, after each sliding of the search window, calculating the reference index values ​​of each of the multiple smallest coding blocks in the updated search area, wherein the updated search area is the area in the search window after sliding that does not overlap with the search window before sliding. Based on the reference index values ​​of each of the multiple smallest coding blocks in the updated search area, and combined with the reference index values ​​of the coding blocks in the overlapping search area, the reference index values ​​of coding blocks of various sizes generated after the search window is slid are obtained. The overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.

16. A processor, characterized in that, The processor includes a search circuit for the reference block as described in any one of claims 8 to 14.

17. A chip, characterized in that, The chip includes a processor, the processor including a search circuit for a reference block as described in any one of claims 8 to 14.

18. A computer device, characterized in that, The computer device includes a processor, the processor including a search circuit for the reference block as described in any one of claims 8 to 14.