Reference block searching method, circuit and device, processor and chip
In the IBC prediction mode in the VVC standard, the reciprocating scanning method is used to search the reference blocks of the block to be encoded, which solves the problem of low efficiency of the existing search method, realizes efficient reference block search, and improves coding performance.
Patent Information
- Application Number
- CN202410104689.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-12-13
AI Technical Summary
In the IBC prediction mode in the VVC standard, the reference block search efficiency of the current block to be encoded is low, the existing Pattern search and hash search methods have their own limitations, Pattern search calculation speed is fast but may be locally optimal, and hash search computing resources and storage resources are expensive.
Using a new reference block search method, by performing reciprocating scanning in the first image area with the side length of the smallest encoding block as the step length, the size of the search window is the largest encoding block, and multiple encodings generated by each slide are calculated. The reference index value of the block to determine the reference block of the currently encoded block.
Improves search efficiency, saves computing resources and storage resources, achieves 75% data reuse, improves computing efficiency, and shows high PSNR, SSIM and VMAF performance in compression rate performance tests.
Smart Images

Figure CN119135905A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video coding, and in particular to a reference block search method, circuit, device, processor and chip. Background Art
[0002] The original data volume of video data is large. Before storage or transmission, the video data needs to be compressed. Compression can also be called encoding. During the encoding process, it is necessary to consider using the IBC (Intra Block Copy) prediction mode. The IBC prediction mode needs to search for the reference block of the current coding block from the already coded and reconstructed area in the current coding frame based on block matching.
[0003] In the VVC (Versatile Video Coding) (a new generation video coding standard) standard algorithm model, the IBC prediction mode supports the search methods of Pattern search and Hash search. Summary of the invention
[0004] The present application provides a reference block search method, circuit, device, processor and chip, and the method provides a new reference block search method. The technical solution includes the following contents.
[0005] According to one aspect of the present application, a reference block search method is provided, the method comprising the following steps.
[0006] Acquire a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded;
[0007] Performing a reciprocating scan in the first image region with a first step length through a search window, wherein the first step length is the side length of a minimum coding block, the size of the search window is the size of a maximum coding block, the minimum coding block is a coding block with a minimum size, and the maximum coding block is a coding block with a maximum size;
[0008] Calculate the reference index values of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning process;
[0009] According to the reference index values of the multiple coding blocks generated by each sliding, the reference block of the current block to be coded is determined.
[0010] According to another aspect of the present application, a reference block search circuit 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 through conductive lines.
[0011] A first circuit unit is used to obtain a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded;
[0012] A second circuit unit is used to perform reciprocating scanning in the first image area with a first step length through a search window, where the first 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 minimum size, and the maximum coding block is the coding block with the maximum size;
[0013] The third circuit unit is used to calculate the reference index values of the plurality of coding blocks generated by each sliding of the search window during the reciprocating scanning process;
[0014] The fourth circuit unit is used to determine a reference block of the current block to be encoded according to the reference indicator values of the multiple encoding blocks generated by each sliding.
[0015] According to another aspect of the present application, a reference block search device is provided, and the device includes the following modules.
[0016] An acquisition module, used for acquiring a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded;
[0017] A scanning module, configured to perform reciprocating scanning in a first image region through a search window with a first step length, wherein the first step length is a side length of a minimum coding block, a size of the search window is a size of a maximum coding block, the minimum coding block is a coding block with a minimum size, and the maximum coding block is a coding block with a maximum size;
[0018] A calculation module, used to calculate the reference index values of the multiple coding 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 according to the reference indicator values of the multiple encoding blocks generated by each sliding.
[0020] According to one aspect of the present application, a processor is provided, the processor comprising the above reference block search circuit.
[0021] According to one aspect of the present application, a chip is provided, the chip comprising a processor, the processor comprising a search circuit for the reference block as described above.
[0022] According to one aspect of the present application, a computer device is provided. The computer device includes a processor. The processor includes a search circuit for a reference block as described above.
[0023] According to one aspect of the present application, a computer device is provided, the computer device 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 reference block search method.
[0024] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the above reference block search method.
[0025] According to another aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned reference block search method.
[0026] The beneficial effects brought about by the technical solution provided in the embodiments of the present application include at least the following.
[0027] The search window is used to perform reciprocating scanning in the first image area with a first step length, the first 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, and the reference index values of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning are calculated. The reference index values are used to determine the reference block of the current block to be coded. That is, the present application provides a new reference block search method based on reciprocating scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 is a basic flow chart of a video encoding process exemplarily shown in this application;
[0030] Figure 2 is a schematic diagram of an inter-frame prediction mode provided by an embodiment of the present application;
[0031] Figure 3 is a schematic diagram of candidate motion vectors provided by an embodiment of the present application;
[0032] Figure 4 is a schematic diagram of an intra-frame block copy mode provided by an embodiment of the present application;
[0033] Figure 5 is a schematic diagram of an intra-frame string replication mode provided by an embodiment of the present application;
[0034] Figure 6 is a simplified block diagram of a communication system provided by one embodiment of the present application;
[0035] Figure 7 It is a schematic diagram of a placement method of a video encoder and a video decoder in a streaming transmission environment provided by an embodiment of the present application;
[0036] Figure 8 is a schematic diagram of the principle of a reference block search method provided by an embodiment of the present application;
[0037] Fig. 9 A schematic diagram showing the reference area in the IBC mode specified by the VVC protocol;
[0038] Fig.10 is a flowchart of a reference block search method provided by an embodiment of the present application;
[0039] Fig.11 is a schematic diagram of a search window before and after a slide provided by an embodiment of the present application;
[0040] Fig.12 It is a flowchart of a method for calculating reference index values of multiple coding blocks generated by each sliding of the search window during a reciprocating scanning process provided by an embodiment of the present application;
[0041] Fig.13 It is a schematic diagram of a method for multiplexing reference indicator values of coding blocks in overlapping search areas provided by an embodiment of the present application;
[0042] Fig.14 It is a schematic diagram of a method for multiplexing reference indicator values of coding blocks in overlapping search areas provided by an embodiment of the present application;
[0043] Fig.15 is a schematic diagram of a hardware computing architecture provided by an embodiment of the present application;
[0044] Fig.16 is a flowchart of a reference block search method provided by another embodiment of the present application;
[0045] Fig.17 is a flowchart of a reference block search method provided by yet another embodiment of the present application;
[0046] Fig.18 is a structural block diagram of a reference block search circuit provided by an embodiment of the present application;
[0047] Fig.19is a structural block diagram of a reference block search device provided by an embodiment of the present application;
[0048] Fig. 20 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0050] First, the nouns involved in the embodiments of the present application are briefly introduced.
[0051] Before introducing the embodiments of the present application, Figure 1 A brief introduction to video encoding technology. Figure 1 A basic flow chart of a video encoding process is exemplarily shown.
[0052] Video signal refers to an image sequence consisting of multiple frames. A frame is a representation of the spatial information of a video signal. Taking the YUV mode as an example, a frame includes a brightness sample matrix (Y) and two chrominance sample matrices (Cb and Cr). From the perspective of how the video signal is obtained, it can be divided into two methods: captured by a camera and generated by a computer. Due to different statistical characteristics, the corresponding compression encoding methods may also be different.
[0053] In some mainstream video coding technologies, such as H.265 / HEVC (High Efficient Video Coding), H.266 / VVC (Versatile Video Coding), AVS (Audio Video Coding Standard) (such as AVS3), a hybrid coding framework is used to perform the following operations and processing on the input original video signal:
[0054] 1. Block partition structure: The input image is divided into several non-overlapping processing units, each of which will perform similar compression operations. This processing unit is called CTU (Coding Tree Unit), or LCU. Below CTU, it can be further divided into more refined units to obtain one or more basic coding units, called CU. Each CU is the most basic element in the coding process. The following describes various possible coding methods for each CU.
[0055] 2. Predictive Coding: It includes intra-frame prediction and inter-frame prediction. The original video signal is predicted by the selected reconstructed video signal to obtain the residual video signal. The encoder needs to choose the most suitable one among many possible predictive coding modes for the current CU to be encoded and inform the decoder. Intra-frame prediction means that the predicted signal comes from the area that has been encoded and reconstructed in the same image. Inter-frame prediction means that the predicted signal comes from other images that have been encoded and are different from the current image (called reference images).
[0056] 3. Transform coding and quantization (Transform & Quantization): The residual video signal is transformed into the transform domain through transformation operations such as DFT (Discrete Fourier Transform) and DCT (Discrete Cosine Transform), which are called transform coefficients. The signal in the transform domain is further subjected to lossy quantization operations, which loses certain information, making the quantized signal conducive to compression expression. In some video coding standards, there may be more than one transform mode to choose from, so the encoder also needs to select one of the transforms for the current CU to be encoded and inform the decoder. The degree of quantization is usually determined by the quantization parameter. A larger QP (Quantization Parameter) value means that coefficients with a larger value range will be quantized to the same output, which usually results in greater distortion and a lower bit rate; on the contrary, a smaller QP value means that coefficients with a smaller value range will be quantized to the same output, which usually results in less distortion and a higher bit rate.
[0057] 4. Entropy Coding or Statistical Coding: The quantized transform domain signal will be statistically compressed and encoded according to the frequency of occurrence of each value, and finally output as a binary (0 or 1) compressed bit stream. At the same time, the encoding generates other information, such as the selected mode, motion vector, etc., which also needs to be entropy encoded to reduce the bit rate. Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. Common statistical coding methods include variable length coding (VLC) or context-based binary arithmetic coding (CABAC).
[0058] 5. Loop Filtering: The encoded image can be reconstructed into a decoded image after undergoing inverse quantization, inverse transformation and prediction compensation (the reverse operation of 2 to 4 above). Compared with the original image, the reconstructed image has some information that is different from the original image 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 be used as a reference for subsequent encoded images and used to predict future signals, the above filtering operation is also called loop filtering, that is, filtering operation within the encoding loop.
[0059] According to the above encoding process, it can be seen that at the decoding end, for each CU, after the decoder obtains the compressed code stream, it first performs entropy decoding to obtain various mode information and quantized transform coefficients. Each coefficient is inversely quantized and inversely transformed to obtain a 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 can be obtained. Finally, the reconstructed value of the decoded image needs to undergo a loop filtering operation to generate the final output signal.
[0060] Some mainstream video coding standards, such as HEVC, VVC, AVS3, etc., all adopt a block-based hybrid coding framework. They divide the original video data into a series of coding blocks, and combine video coding methods such as prediction, transform and entropy coding to achieve video data compression. Among them, motion compensation is a commonly used prediction method for video coding. Motion compensation is based on the redundant characteristics of video content in the time domain or spatial domain, and derives the prediction value of the current coding block from the encoded area. This type of prediction method includes: inter-frame prediction, intra-frame block copy prediction, intra-frame string copy prediction, etc. In specific coding implementations, these prediction methods may be used alone or in combination. For coding blocks using these prediction methods, it is usually necessary to explicitly or implicitly encode one or more two-dimensional displacement vectors in the bitstream to indicate the displacement of the current block (or the same-position block of the current block) relative to one or more reference blocks.
[0061] It should be noted that in different prediction modes and different implementations, the displacement vector may have different names. This article uniformly describes them in the following way: 1) The displacement vector in the inter-frame prediction mode is called the motion vector (MV); 2) The displacement vector in the IBC (Intra Block Copy) prediction mode is called the block vector (BV); 3) The displacement vector in the ISC (Intra String Copy) prediction mode is called the string vector (SV). Intra-frame string copy is also called "string prediction" or "string matching".
[0062] MV refers to the displacement vector used in the inter-frame prediction mode, which points from the current image to the reference image, and its value is the coordinate offset between the current block and the reference block, where the current block and the reference block are in two different images. In the 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, and the difference between the predicted motion vector corresponding to the current block and the actual motion vector is encoded and transmitted. Compared with directly encoding and transmitting the actual motion vector corresponding to the current block, it is beneficial to save bit overhead. In the embodiment of the present application, the predicted motion vector refers to the predicted value of the motion vector of the current block obtained by the motion vector prediction technology.
[0063] BV refers to the displacement vector used in the 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 in the current image. In the IBC mode, block vector prediction can be introduced. By predicting the block vector of the current block, the predicted block vector corresponding to the current block is obtained, and the difference between the predicted block vector corresponding to the current block and the actual block vector is encoded and transmitted. Compared with directly encoding and transmitting the actual block vector corresponding to the current block, it is beneficial to save bit overhead. In an embodiment of the present application, the predicted block vector refers to the predicted value of the block vector of the current block obtained by the block vector prediction technology.
[0064] SV refers to the displacement vector used in the 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 in the current image. In the 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, and the difference between the predicted string vector corresponding to the current string and the actual string vector is encoded and transmitted. Compared with directly encoding and transmitting the actual string vector corresponding to the current string, it is beneficial to save bit overhead. In the embodiment of the present application, the predicted string vector refers to the predicted value of the string vector of the current string obtained by the string vector prediction technology.
[0065] Several different prediction modes are introduced below:
[0066] 1. Inter-frame prediction mode
[0067] like Figure 2 As shown in the figure, inter-frame prediction uses the correlation in the video time domain and uses the pixels of the adjacent encoded images to predict the pixels of the current image, so as to effectively remove the redundancy in the video time domain and effectively save the bits of the encoded residual data. Where P is the current frame, Pr is the reference frame, B is the current block to be encoded, and Br is the reference block of B. B' and B have the same coordinate position in the image, Br coordinates are (xr, yr), and B' coordinates are (x, y). The displacement between the current block to be encoded and its reference block is called the motion vector (MV), that is:
[0068] MV=(xr-x,yr-y).
[0069] Considering that adjacent blocks in the temporal or spatial domain have a strong correlation, MV prediction technology can be used to further reduce the bits required for encoding MV. In H.265 / HEVC, inter-frame prediction includes two MV prediction technologies: Merge and AMVP (Advanced Motion Vector Prediction).
[0070] The Merge mode will establish an MV candidate list for the current PU (Prediction Unit), which contains 5 candidate MVs (and their corresponding reference images). It will traverse these 5 candidate MVs and select the one with the lowest rate-distortion cost as the optimal MV. If the codec establishes the candidate list in the same way, the encoder only needs to transmit the index of the optimal MV in the candidate list. It should be noted that HEVC's MV prediction technology also has a skip mode, which is a special case of the Merge mode. After the Merge mode finds the optimal MV, if the current block is basically the same as the reference block, then there is no need to transmit the residual data, only the MV index and a skip flag.
[0071] The MV candidate list established in Merge mode includes two cases: spatial domain and temporal domain. For BSlice (B frame image), it also includes a combined list. Among them, the spatial domain provides up to 4 candidate MVs, which are established as follows: Figure 3 The spatial list is established in the order of A1→B1→B0→A0→B2, where B2 is a substitute, that is, when one or more of A1, B1, B0, A0 does not exist, the motion information of B2 needs to be used; the temporal domain only provides one candidate MV at most, and its establishment is as follows Figure 3 As shown in part (b) of , the MV of the same-position PU is scaled as follows:
[0072] curMV=td*colMV / tb;
[0073] Among them, curMV represents the MV of the current PU, colMV represents the MV of the co-located PU, td represents the distance between the current image and the reference image, and tb represents the distance between the co-located image and the reference image. If the PU at position D0 on the co-located block is not available, it is replaced by the co-located PU at position D1. For the PU in B Slice, since there are two MVs, its MV candidate list also needs to provide two MVPs (Motion Vector Predictor). HEVC generates a combination list for B Slice by combining the first 4 candidate MVs in the MV candidate list in pairs.
[0074] Similarly, the AMVP mode uses the MV correlation of neighboring blocks in the spatial and temporal domains to establish a MV candidate list for the current PU. Unlike the Merge mode, the AMVP mode selects the optimal predicted MV from the MV candidate list, and performs differential encoding with the optimal MV obtained through motion search for the current block to be encoded, that is, encoding MVD = MV-MVP, where MVD is the motion vector residual (Motion Vector Difference); by establishing the same list, the decoding end only needs the sequence number of MVD and MVP in the list to calculate the MV of the current decoding block. The MV candidate list of the AMVP mode also includes both spatial and temporal scenarios. The difference is that the length of the MV candidate list of the AMVP mode is only 2.
[0075] As mentioned above, in the AMVP mode of HEVC, 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 the flag is 0, MVD is encoded at 1 / 4 (brightness) pixel resolution; when the value of the flag is 1, MVD is encoded at an integer (brightness) pixel resolution. An adaptive motion vector precision (Adaptive Motion Vector Resolution, referred to as AMVR) method is used in VVC. This method allows each CU to adaptively select the resolution of the encoded MV. In the normal AMVP mode, the optional 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 the quarter brightness sampling MVD precision is used for the CU. If the flag is 0, the MVD of the current CU is encoded at 1 / 4 pixel resolution. Otherwise, a second flag needs to be encoded to indicate that the CU uses a 1 / 2 pixel resolution or other MVD resolution. Otherwise, a third flag is encoded to indicate whether 1-pixel resolution or 4-pixel resolution is used for the CU.
[0076] 2. IBC Prediction Model
[0077] IBC is an intra-frame coding tool adopted in the HEVC Screen Content Coding (Screen Content Coding, referred to as SCC) extension, which significantly improves the coding efficiency of screen content. In AVS3 and VVC, IBC technology is also adopted to improve the performance of screen content coding. IBC uses the spatial correlation of screen content video and uses the coded image pixels on the current image to predict the pixels of the current block to be coded, which can effectively save the bits required for coding 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 uses 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) with 1 or 4 pixel resolution.
[0078] 3. ISC Forecast Model
[0079] ISC technology divides a coding 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, etc.). Similar to IBC, each string searches for a reference string of the same shape in the encoded area of the current image, derives the predicted value of the current string, and effectively saves bits by encoding the residual between the current string pixel value and the predicted value instead of directly encoding the pixel value. Figure 5 The schematic diagram of intra-frame string replication is given. The dark gray area is the encoded area, the 28 white pixels are string 1, the 35 light gray pixels are string 2, and the 1 black pixel represents the unmatched pixel. The displacement between string 1 and its reference string is Figure 4 The string vector 1 in the equation; the displacement between string 2 and its reference string is Figure 4 The string vector 2 in .
[0080] The intra-frame string replication technology needs to encode the SV corresponding to each string in the current coding block, the string length, and the flag of whether there is a matching string. Among them, SV represents the displacement of the string to be encoded to its reference string. The string length represents the number of pixels contained in the string. In different implementations, there are many ways to encode the string length. The following are several examples (some examples may be used in combination): 1) Encode the length of the string directly in the code stream; 2) Encode the number of pixels to be processed in the code stream, and the decoding end calculates the length of the current string according to the size N of the current block, the number of processed pixels N1, and the number of pixels to be processed obtained by decoding N2, L = N-N1-N2; 3) Encode a flag in the code stream to indicate whether the string is the last string. If it is the last string, the length of the current string L = N-N1 is calculated according to the size N of the current block and the number of processed pixels N1. If a pixel does not find a corresponding reference in the referenceable area, the pixel value of the unmatched pixel will be directly encoded.
[0081] like Figure 6 As shown, it shows a simplified block diagram of a communication system provided by an embodiment of the present application. The communication system 600 includes multiple devices, and the devices can communicate with each other through, for example, a network 650. For example, the communication system 600 includes a first device 610 and a second device 620 interconnected through the network 650. Figure 6 In an 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 picture stream collected by the first device 610, for transmission to the second device 620 via the network 650. The encoded video data is transmitted in the form of one or more encoded video code streams. The second device 620 may receive the encoded video data from the network 650, decode the encoded video data to recover the video data, and display the video picture based on the recovered video data. Unidirectional data transmission is more 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 video picture stream collected by the device) for transmission to the other of the third device 630 and the fourth device 640 via the network 650. Each of the third device 630 and the fourth device 640 may also receive encoded video data transmitted by the other of the third device 630 and the fourth device 640, and may decode the encoded video data to recover the video data, and may display the video pictures on an accessible display device based on the recovered video data.
[0083] exist Figure 6 In the embodiment of, 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 smart phones, but the principles disclosed in the present application may not be limited thereto. The embodiments of the present application are applicable to PCs (Personal Computers), mobile phones, tablet computers, media players and / or dedicated video conferencing devices. The network 650 represents 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 switching and / or packet switching channels. The network may include a telecommunications network, a local area network, a wide area network and / or the Internet. For the purposes of the present application, unless explained below, the architecture and topology of the network 650 may be irrelevant to the operations disclosed in the present application.
[0084] As an example, Figure 7 The video encoder and the video decoder are shown in a streaming environment. The subject matter disclosed in the present application is equally applicable to other video-supported applications, including, for example, video conferencing, digital TV, storing compressed video on digital media including CD (Compact Disc), DVD (Digital Versatile Disc), memory stick, 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 picture stream 702. In an embodiment, the video picture stream 702 includes samples taken by a digital camera. The video picture stream 702 is depicted as a thick line to emphasize the high data volume of the video picture stream compared to the encoded video data 704 (or the encoded video code stream), and the video picture stream 702 can 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 implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream 702, the encoded video data 704 (or the encoded video code stream 704) is depicted as a thin line to emphasize the lower data volume of the encoded video data 704 (or the encoded video code stream 704), which can be stored on the streaming server 705 for future use. One or more streaming client subsystems, such as Figure 7 , client subsystem 706 and client subsystem 708 in the streaming server 705 can access the streaming server 705 to retrieve the copies 707 and 709 of the encoded video data 704. The client subsystem 706 may include, for example, a video decoder 710 in an electronic device 730. The video decoder 710 decodes the incoming copy 707 of the encoded video data and produces an output video picture stream 711 that can be presented on a display 712 (e.g., a display 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 bitstreams) may be encoded according to certain video encoding / compression standards.
[0086] It should be noted that the electronic device 720 and the electronic device 730 may include other components (not shown). For example, the electronic device 720 may include a video decoder (not shown), and the electronic device 730 may further include a video encoder (not shown). The video decoder is used to decode the received encoded video data; the video encoder is used to encode the video data.
[0087] It should be noted that the technical solution provided in the embodiments of the present application can be applied to the H.266 / VVC standard, the H.265 / HEVC standard, AVS (such as AVS3) or the next-generation video coding and decoding standard, and the embodiments of the present application are not limited to this.
[0088] Another point that needs to be explained is that the execution subject of each step of the video encoding method provided in the embodiment of the present application can be an encoding end device. In the video encoding process in the IBC mode, the encoding scheme provided in the embodiment of the present application can be used to encode the block vector of the current block. Both the decoding end device and the encoding end device can be computer devices, which refer to electronic devices with data calculation, processing and storage capabilities, such as PCs, mobile phones, tablet computers, media players, dedicated video conferencing equipment, servers, etc.
[0089] In addition, the method provided in the present application can be used alone or in combination with other methods in any order. The encoder based on the method provided in the present application can be implemented by one or more processors or one or more integrated circuits. Below, the technical solution of the present application is introduced and explained through several embodiments.
[0090] In the related technology, in the VVC standard algorithm model, the IBC mode supports two search methods: Pattern search and hash search. Pattern search has a faster calculation speed, but there is a possibility of local optimality; the reference block obtained by hash search has a high matching degree, but it requires a large amount of computing resources and storage resources.
[0091] Based on this, the present application provides a method for searching a reference block of a current block to be encoded in an IBC mode.
[0092] Figure 8 A schematic diagram showing the principle of a reference block search method provided by an exemplary embodiment of the present application is shown. Figure 8 The reference block search method shown is performed by an encoding device, Figure 8 The search method shown is applied to the IBC prediction mode, which needs to search for a reference block of the current block to be encoded from an already encoded and reconstructed area in the current encoding frame based on block matching.
[0093] Figure 8 In the search process shown, the encoding device executes step 801: obtaining a first image area. The first image area covers a reference area of the current block to be encoded. In one embodiment, the search method of the present application is applied to the IBC prediction mode of the VVC protocol. In the IBC mode specified by the VVC protocol, the reference area of the current block to be encoded is as follows: Fig. 9As shown. The reference area of the current block to be coded is located in the current CTU and the left CTU. The size of a CTU is 128*128. A CTU contains four CUs of size 64*64, and the unit is pixel. The reference area of the current block to be coded includes three complete 64*64 CUs and a coded area in a 64*64 CU. Optionally, the first image area is any one of the four 64*64 CUs where the reference area is located, so the size of the first image area is 64*64. Optionally, the current block to be coded is executed once in each of the four 64*64 CUs. Figure 8 The search process is shown.
[0094] Figure 8 In the search process shown, the encoding device executes step 802: reciprocating scanning is performed in the first image area through the search window with the first step length. During a round of reciprocating scanning, the search window slides from the left side of the first image area to the right, and slides one step length each time. After reaching the right critical position, it slides down one step length again. The search window then slides from right to left, and slides one step length each time. After reaching the left critical position, it slides down one step length again. The above sliding is repeated until the search window reaches the bottom and cannot slide down any further.
[0095] In this application, the first 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. For example, the size of the smallest coding block is 4*4 and the size of the largest coding block is 16*16. Figure 8 The bold solid line in the figure shows the search window before sliding, and the bold dotted line shows the search window after sliding. Schematically, the pixel coordinates of the upper left corner of the search window before sliding are (0, 0). After one sliding, the pixel coordinates of the upper left corner of the search window after sliding are (4, 0).
[0096] In one embodiment, multiple rounds of reciprocating scanning are performed, and the starting points of the search windows of the multiple rounds of reciprocating scanning constitute a pixel matrix, the length and width of the pixel matrix are both the first step length, and the size of the pixel matrix is the size of the minimum coding block. In the first round of reciprocating scanning (ROUND 0), the starting point of the search window is (0, 0), and the search window is scanned along the first step. Figure 8 The search window is slid in the manner shown. In the second round of reciprocating scanning (ROUND 1), the starting point of the search window is (1, 0); in the third round of reciprocating scanning (ROUND 2), the starting point of the search window is (2, 0); in the fourth round of reciprocating scanning (ROUND 3), the starting point of the search window is (3, 0); in the fifth round of reciprocating scanning (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 scanning, and in the sixteenth round of reciprocating scanning (ROUND 15), the starting point of the search window is (3, 3).
[0097] Figure 8 In the search process shown, the encoding device performs step 803: calculating the reference index values of the multiple encoding blocks generated by each sliding of the search window during the reciprocating scanning process. In the reciprocating scanning process, after each sliding of the search window, the sliding search window includes an updated search area and an overlapping search area, such as Figure 8 As shown, the updated search area is an area in the search window after sliding that does not overlap with the search window before sliding, and the overlapping search area is an area in the search window after sliding that overlaps with the search window before sliding.
[0098] After each slide, the updated search area obtained includes four new minimum coding blocks, and the size of the minimum coding block is 4*4. Through four hardware computing units (optionally, SAD (Sum of Absolute Difference) computing unit, SATD (Sum of Absolute Transformed Difference) computing unit, SSE (Sum of Squared Error) computing unit, etc.), the reference index values of the four minimum coding blocks are calculated (optionally, SAD, SATD, SSE, etc.). One hardware computing unit calculates the reference index value of a 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 area, the reference index values of coding blocks of various sizes are obtained.
[0099] Indicatively, the size of the four new minimum coding blocks is 4*4. Combined with the reference index values of the coding blocks in the overlapping search area, reference index values of coding blocks represented as 4*8, 4*16, 8*16, 16*16, 8*4, 16*4, 16*8, and 8*8 can be obtained. The data in the overlapping search area is reusable data. When the next slide is performed, part of the data in the overlapping search area can still participate in the calculation of the reference index values of coding blocks of various sizes corresponding to the next slide. Figure 8 Under the data relationship shown, 75% data reuse can be achieved when calculating the coding blocks of various sizes generated after each slide.
[0100] Figure 8 In the search process shown, the encoding device executes step 804: determining a reference block of the current block to be encoded according to respective reference index values of a plurality of encoding blocks generated by each sliding.
[0101] The encoding device determines the encoding block with the smallest reference indicator value (optionally, SAD) from the multiple encoding blocks generated by each sliding as the reference block of the current block to be encoded.
[0102] In summary, the embodiment of the present application performs reciprocating scanning with a first step length in the first image area 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, so that when calculating the reference index values of multiple coding blocks generated by one sliding, the data in the overlapping search area can be used, and if the size of the minimum coding block is a*a and the size of the maximum coding block is 4a*4a, the above scheme can achieve 75% data reuse, save computing resources and storage resources, and improve computing efficiency.
[0103] Fig.10 A flowchart of a reference block search method provided by an exemplary embodiment of the present application is shown, and the method is illustrated by an example performed by an encoding device. The method includes:
[0104] Step 1020, obtaining a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded;
[0105] In one embodiment, the search method provided by the present application is applied to the IBC mode in the VVC protocol. In the IBC mode, the reference block of the current coding block will be searched from the area that has been coded and reconstructed in the current coding frame based on block matching. Optionally, the search method provided by the present application can be applied to a graph processing unit (GPU), a video processing unit (VPU), etc., and implemented by an integrated circuit in the processor. The VVC protocol stipulates that the reference area is as follows: Fig. 9 As shown. The reference area 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. A CTU contains four CUs of size 64*64, and the unit is pixel. The reference area of the current block to be encoded includes three complete 64*64 CUs and an encoded area in a 64*64 CU. Optionally, the first image area is any one of the four 64*64 CUs where the reference area is located, so the size of the first image area is 64*64.
[0106] Fig. 9 The reference areas in four cases are shown. ① Reference Fig. 9 In the (A) part, if the current block to be coded is located in the 64*64 CU in the upper left corner of the current CTU, the reference area of the current block to be coded includes the 64*64 CUs in the upper right, lower left, and lower right corners of the left CTU, as well as the coded area in the 64*64 CU in the upper left corner of the current CTU. Fig. 9In the (B) part, if the current block to be coded is located in the 64*64 CU in the upper right corner of the current CTU, the reference area of the current block to be coded includes the 64*64 CU in the lower left corner and lower right corner of the left CTU, the 64*64 CU in the upper left corner of the current CTU, and the coded area in the 64*64 CU in the upper right corner of the current CTU. Fig. 9 In the (C) part, if the current block to be coded is located in the 64*64 CU at the lower left corner of the current CTU, the reference area of the current block to be coded includes the 64*64 CU at the lower right corner of the left CTU, the 64*64 CU at the upper left and upper right corners of the current CTU, and the coded area in the 64*64 CU at the lower left corner of the current CTU. Fig. 9 In the (D) part, if the current block to be encoded is located in a 64*64 CU at the lower right corner of the current CTU, 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, and 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 the present application is applied to the IBC mode in the HEVC compression standard protocol. The reference area specified in the HEVC compression standard protocol is the entire frame where the current coding block is located, and the entire frame is used as the first image area to execute the search method provided in the present application.
[0108] Step 1040, reciprocatingly scanning in the first image region with a search window with a first step length, where the first 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 minimum size, and the maximum coding block is the coding block with the maximum size;
[0109] Reciprocating scanning can also be called bow scanning, bow-shaped scanning, snake scanning, etc. The process of reciprocating scanning is as follows: slide the search window from left to right in the first image area by the first step length until the search window reaches the right critical position; move the search window down by the first step length; then slide the search window from right to left in the first image area by the first step length until the search window reaches the left critical position; move the search window down by the first step length; repeat the above steps until the search window traverses the first image area and the starting position of the search window is located at the upper left corner of the first image area.
[0110] In an embodiment of the present application, the size range of the coding block is the size range supported by the coding device in the IBC mode. Optionally, the size range of the coding block is 4*4 to 16*16, that is, the size of the minimum coding block is 4*4, and the size of the maximum coding block is 16*16. Optionally, the size range of the coding block is 8*8 to 32*32, that is, the size of the minimum coding block is 8*8, and the size of the maximum coding block is 32*32, and the units are all pixels. In this application, the size range of the coding block is mainly 4*4 to 16*16 for example, and the size range of 8*8 to 32*32 can also be implemented based on a similar search process.
[0111] Step 1060, calculating reference index values of a plurality of coding 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, 8*8 coding blocks. Fig.11 Shows a slide, Fig.11 The bold solid line in the figure is the search window before sliding, and the bold dotted line is the search window after sliding.
[0113] Combined with reference Fig.11 , the sliding search window generates the following new coding blocks. Coding blocks of size 4*4: coding blocks composed of pixel matrix 17, coding blocks composed of pixel matrix 18, coding blocks composed of pixel matrix 19, and coding blocks composed of pixel matrix 20. Coding blocks of size 4*8: coding blocks composed of pixel matrices 17 and 18, and coding blocks composed of pixel matrices 19 and 20. Coding blocks of size 4*16: coding blocks composed of pixel matrices 17, 18, 19, and 20. Coding blocks of size 8*4: coding blocks composed of pixel matrices 13 and 17, coding blocks composed of pixel matrices 14 and 18, coding blocks composed of pixel matrices 15 and 19, and coding blocks composed of pixel matrices 16 and 20. The coding block with a size of 16*4: the coding block composed of pixel lattices 5, 9, 13, and 17, the coding block composed of pixel lattices 6, 10, 14, and 18, the coding block composed of pixel lattices 7, 11, 15, and 19, and the coding block composed of pixel lattices 8, 12, 16, and 20. The coding block with a size of 8*8: the coding block composed of pixel lattices 13, 17, 14, and 18, and the coding block composed of pixel lattices 15, 19, 16, and 20. The coding block with a size of 16*16: the coding block composed of pixel lattices 5 to 20.
[0114] After one slide, multiple new coding blocks are generated according to the updated pixel matrix 17, 18, 19, 20, and reference index values of the generated multiple new coding blocks are calculated. Optionally, the reference index value is any one of SAD, SATD, and SSE.
[0115] Step 1080, determining a reference block of the current block to be encoded according to the reference index values of the multiple encoding blocks generated by each sliding;
[0116] In one embodiment, the reference indicator value is any one of SAD, SATD, and SSE. From the multiple coding blocks generated by each sliding, the coding block with the smallest reference indicator value is determined as the reference block of the current block to be coded.
[0117] In summary, a search window is used to perform a reciprocating scan in the first image area with a first step length, the first 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, and the reference index values of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning are calculated. The reference index values are used to determine the reference block of the current block to be coded. That is, the present application provides a new reference block search method based on reciprocating scanning.
[0118] based on Fig.10 In the illustrated alternative embodiment, Fig.12 A flow chart of a method for calculating the reference index values of the plurality of coding blocks generated by each sliding of the search window during the reciprocating scanning process (i.e., step 1060) is shown. The method includes the following steps:
[0119] Step 1061, in the process of reciprocating scanning, after each sliding of the search window, calculate the reference index values of the multiple minimum coding blocks in the updated search area, where the updated search area is the area in the search window after sliding that does not overlap with the search window before sliding;
[0120] During the reciprocating scanning process, the search window will slide multiple times, and each slide will generate multiple new coding blocks. For one slide, the search window after sliding will include the updated search area and the overlapping search area. Figure 8 The updated search area is the area in the search window after sliding that does not overlap with the search window before sliding, and the overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.
[0121] The update search area includes multiple minimum coding blocks. In one embodiment, a hardware computing units are used to calculate the reference index values of the a minimum coding blocks in the update search area. The a hardware computing units correspond one-to-one to the a minimum coding blocks, and a is a preset positive integer.
[0122] Figure 8 Taking the minimum coding block size of 4*4 and the maximum coding block size of 16*16 as an example, the updated search area includes 4 minimum coding blocks of size 4*4, and the reference index values of the 4 minimum coding blocks are calculated by 4 hardware computing units. The 4 hardware computing units correspond one-to-one to the 4 minimum coding blocks. Optionally, the reference index value is any one of SAD, SATD, and SSE, and the hardware computing units can be correspondingly called SAD computing units, SATD computing units, and SSE computing units.
[0123] Step 1062, based on the reference index values of each of the multiple minimum 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 the coding blocks of each size generated after the search window slides, and the overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.
[0124] After each slide of the search window, the reference index values of multiple minimum coding blocks in the updated search area will be calculated. In the previous slide, the reference index values of the coding blocks in the overlapping search area have been calculated. Therefore, the combination of the two can obtain the reference index values of coding blocks of various sizes generated after the search window slides.
[0125] In one embodiment, multiple adders are used to update the reference index values of the multiple minimum coding blocks in the search area, and the reference index values of the coding blocks in the overlapping search area are combined along the row and column directions of the first image area to obtain the reference index values of the coding blocks of each size generated after the search window slides. The adder is used to add the reference index values of two coding blocks of the same size to obtain the reference index value of the coding block of the new size. For example, through a 4*8 adder, the reference index values of two coding blocks of size 4*4 are added to obtain the reference index value of a coding block of size 4*8; through an 8*4 adder, the reference index values of two coding blocks of size 4*4 are added to obtain the reference index value of a coding block of size 8*4.
[0126] Combined with reference Fig.13 , 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.
[0127] Based on the reference index values of the four smallest coding blocks, along the row and column directions of the image, the overlapping search area ( Fig.13The reference index values of the overlapping search areas are combined in two dimensions to calculate the reference index values of the newly generated coding blocks of 4*4, 4*8, 4*16, 8*16, 16*16, 8*4, 16*4, 16*8, and 8*8 after the search window slides. For the newly generated coding blocks of each size, refer to the detailed description of step 1060 above. A more detailed data reuse method of overlapping search areas will be introduced in detail below.
[0128] In summary, the above embodiment performs reciprocating scanning in the first image area with a search window with a first step length, 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, so that when calculating the reference index values of multiple coding blocks generated by one slide, the data in the overlapping search area can be used. The overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding, and the data in the overlapping search area is reusable data. Fig.10 Under the data relationship shown (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, save computing resources and storage resources, and improve computing efficiency.
[0129] Furthermore, the above embodiment provides a method for reusing data in overlapping search areas, so that when calculating reference index values of multiple coding blocks generated by one slide, the data in the overlapping search areas can be reused using the above method, saving computing resources and storage resources and improving computing efficiency.
[0130] The data reuse methods of overlapping search areas include the following:
[0131] ① Through the first adder, the reference index values of the two minimum coding blocks in the update search area are added together to obtain a reference index value of a first coding block, the size of the minimum coding block is a*a, and the size of the first coding block is a*2a; through the second adder, the reference index values of the other two minimum coding blocks in the update search area are added together to obtain another reference index value of the first coding block, and the update search area includes four minimum coding blocks.
[0132] Combined with reference Fig.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] Through a 4*8 adder, the reference index value of the coding block composed of pixel matrix 17 is added to the reference index value of the coding block composed of pixel matrix 18, and the reference index value of the coding block composed of pixel matrix 17 and 18 is obtained. Through another 4*8 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 20, and the reference index value of the coding block composed of pixel matrix 19 and 20 is obtained.
[0134] Combined with reference Fig.15 , Fig.15 The hardware computing architecture is shown. Through four 4*4 hardware computing units, the reference index values of four 4*4 minimum coding blocks can be calculated, and the reference index value of a 4*4 minimum coding block corresponds to one 4*4 hardware computing unit. Through two 4*8 adders, each 4*8 adder adds the reference index values of two 4*4 coding blocks, and a total of two reference index values of 4*8 coding blocks are calculated.
[0135] ② The reference index values of the two first coding blocks are added together through the third adder to obtain the reference index value of the second coding block, and the size of the second coding block is a*4a.
[0136] Combined with reference Fig.14 , through a 4*16 adder, the reference index value of the coding block composed of pixel lattices 17 and 18 is added to the reference index value of the coding block composed of pixel lattices 19 and 20 to obtain the reference index value of the coding block composed of pixel lattices 17-20.
[0137] Combined with reference Fig.15 , through a 4*16 adder, the reference index values of two 4*8 coding blocks are added and calculated to obtain a reference index value of a 4*16 coding block.
[0138] ③ Through the fourth adder, the reference index value of the second coding block is added with 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, and the size of the third coding block is 2a*4a.
[0139] Combined with reference Fig.14 , through an 8*16 adder, the reference index value of the coding block composed of pixel lattices 17-20 is added to the reference index value of the coding block composed of pixel lattices 13-16 to obtain the reference index value of the coding block composed of pixel lattices 13-20.
[0140] Combined with reference Fig.15, through an 8*16 adder, the reference index values of two 4*16 coding blocks are added and calculated to obtain a reference index value of an 8*16 coding block.
[0141] ④ Through the fifth adder, the reference index value of the third coding block is added with the reference index value of a coding block of size 2a*4a adjacent to the third coding block in the overlapping search area to obtain the reference index value of the largest coding block, and the size of the largest coding block is 4a*4a.
[0142] Combined with reference Fig.14 , through a 16*16 adder, the reference index value of the coding block composed of pixel lattices 13-20 is added to the reference index value of the coding block composed of pixel lattices 5-16 to obtain the reference index value of the coding block composed of pixel lattices 5-20.
[0143] Combined with reference Fig.15 , through a 16*16 adder, the reference index values of two 8*16 coding blocks are added and calculated to obtain a reference index value of a 16*16 coding block.
[0144] ⑤ Through the sixth adder, the reference index value of the first minimum coding block is added to the reference index value of a coding block with a size of a*a adjacent to the first minimum coding block in the overlapping search area, so as to obtain the reference index value of the first fourth coding block, where the size of the fourth coding block is 2a*a; through the seventh adder, the reference index value of the second minimum coding block is added to the reference index value of a coding block with a size of a*a adjacent to the second minimum coding block in the overlapping search area, so as to obtain the reference index value of the second fourth coding block; through the eighth adder, the reference index value of the third minimum coding block is added to the reference index value of a coding block with a size of a*a adjacent to the third minimum coding block in the overlapping search area, so as to obtain the reference index value of the third fourth coding block; through the ninth adder, the reference index value of the fourth minimum coding block is added to the reference index value of a coding block with a size of a*a adjacent to the fourth minimum coding block in the overlapping search area, so as to obtain the reference index value of the fourth fourth coding block.
[0145] Combined with reference Fig.14 , through an 8*4 adder, the reference index value of the coding block composed of pixel matrix 17 is added to the reference index value of the coding block composed of pixel matrix 13 to obtain the reference index value of the coding block composed of pixel matrices 13 and 17.
[0146] Through 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] Through 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] Through another 8*4 adder, the reference index value of the coding block composed of the pixel matrix 20 is added to the reference index value of the coding block composed of the pixel matrix 16 to obtain the reference index value of the coding block composed of the pixel matrices 16 and 20.
[0149] Combined with reference Fig.15 , through 4 8*4 adders, each 8*4 adder adds the reference index values of two 4*4 coding blocks, and a total of 4 reference index values of 8*4 coding blocks are obtained.
[0150] ⑥ Through 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, and the size of the fifth coding block is 4a*a; through 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; through 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; through 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] Combined with reference Fig.14 , through a 16*4 adder, the reference index value of the coding block composed of pixel lattices 5 and 9 is added to the reference index value of the coding block composed of pixel lattices 13 and 17 to obtain the reference index value of the coding block composed of pixel lattices 5, 9, 13, and 17.
[0152] Through another 16*4 adder, the reference index value of the coding block composed of pixel matrices 6 and 10 is added to the reference index value of the coding block composed of pixel matrices 14 and 18 to obtain the reference index value of the coding block composed of pixel matrices 6, 10, 14, and 18.
[0153] Through another 16*4 adder, the reference index value of the coding block composed of pixel matrices 7 and 11 is added to the reference index value of the coding block composed of pixel matrices 15 and 19 to obtain the reference index value of the coding block composed of pixel matrices 7, 11, 15, and 19.
[0154] Through another 16*4 adder, the reference index value of the coding block composed of pixel matrices 8 and 12 is added to the reference index value of the coding block composed of pixel matrices 16 and 20 to obtain the reference index value of the coding block composed of pixel matrices 8, 12, 16, and 20.
[0155] Combined with reference Fig.15 , through 4 16*4 adders, each 16*4 adder adds the reference index values of two 8*4 coding blocks, and a total of 4 reference index values of 16*4 coding blocks are obtained.
[0156] ⑦ Through the fourteenth adder, the reference index values of the two fifth coding blocks are added together to obtain the reference index value of a sixth coding block, and the size of the sixth coding block is 4a*2a; through the fifteenth adder, the reference index values of the other two fifth coding blocks are added together to obtain the reference index value of another sixth coding block.
[0157] Combined with reference Fig.14 , through a 16*8 adder, the reference index value of the coding block composed of pixel lattices 5, 9, 13, and 17 is added to the reference index value of the coding block composed of pixel lattices 6, 10, 14, and 18 to obtain the reference index value of the coding block composed of pixel lattices 5, 9, 13, 17, 6, 10, 14, and 18.
[0158] Through another 16*8 adder, the reference index value of the coding block composed of pixel lattices 7, 11, 15, and 19 is added to the reference index value of the coding block composed of pixel lattices 8, 12, 16, and 20 to obtain the reference index value of the coding block composed of pixel lattices 7, 11, 15, 19, 8, 12, 16, and 20.
[0159] Combined with reference Fig.15 , through two 16*8 adders, each 16*8 adder adds the reference index values of two 16*4 coding blocks, and obtains the reference index values of two 16*8 coding blocks in total.
[0160] ⑧ Through the sixteenth adder, the reference index value of a first coding block is added to the reference index value of a coding block with a size of a*2a adjacent to the first coding block in the overlapping search area, so as to obtain a reference index value of a seventh coding block, and the size of the eighth coding block is 2a*2a; through the seventeenth adder, the reference index value of another first coding block is added to the reference index value of a coding block with a size of a*2a adjacent to another first coding block in the overlapping search area, so as to obtain another reference index value of the seventh coding block.
[0161] Combined with reference Fig.14 , through an 8*8 adder, the reference index value of the coding block composed of pixel lattices 17 and 18 is added to the reference index value of the coding block composed of pixel lattices 13 and 14 to obtain the reference index value of the coding block composed of pixel lattices 13, 14, 17, and 18.
[0162] Through another 8*8 adder, the reference index value of the coding block composed of pixel matrices 19 and 20 is added to the reference index value of the coding block composed of pixel matrices 15 and 16 to obtain the reference index value of the coding block composed of pixel matrices 15, 16, 19, and 20.
[0163] Combined with reference Fig.15 , through two 8*8 adders, each 8*8 adder adds the reference index values of two 4*4 coding blocks, and obtains the reference index values of two 8*8 coding blocks in total.
[0164] In summary, when the size of the minimum coding block is a*a and the size of the maximum coding block is 4a*4a, through the above data multiplexing method, only 4 hardware computing units and 17 adders are needed, which saves a lot of computing resources and computing time.
[0165] Fig.16 A flowchart of a reference block search method provided by an exemplary embodiment of the present application is shown, and the method is illustrated by an example performed by an encoding device. The method includes:
[0166] Step 1620: for each of the N square areas, for a corresponding to each square area 2 For each search window in the search windows, a round of reciprocating scanning is performed in the first image region with a first step length on each search window;
[0167] The N square areas cover the complete reference area of the current block to be coded as specified by the Versatile Video Coding Protocol (VVC protocol). Fig. 9The VVC protocol stipulates that the reference area of the current block to be encoded includes three complete 64*64 CUs and an encoded area in a 64*64 CU. That is, the reference area of the current block to be encoded is covered by four square areas, and the first image area is any one of the four square areas.
[0168] For each square area, a 2 Reciprocating scanning, a 2 Reciprocating scanning and a 2 There is a one-to-one correspondence between the search windows. 2 The starting points of the reciprocating scans corresponding to the search windows each constitute a pixel matrix, and the length and width of the pixel matrix are both the first step length a. That is, the embodiment of the present application provides a full search solution, through a 2 A search window 2 In a round of reciprocating scanning, each pixel in the first image area will participate in the search as a vertex of the search window (the search window includes four vertices), which ensures the comprehensiveness of the search, and the reference block finally determined has a high matching degree and better quality.
[0169] For example, if a is 4, there are 16 search windows in total. The starting points of the reciprocating scans 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), (3, 3). That is, a 2 The starting points of the reciprocating scans corresponding to the search windows constitute a minimum coding block.
[0170] Step 1640, for N square areas corresponding to N*a 2 In each round of reciprocating scanning, the reference index values of the plurality of coding blocks generated by each sliding of the search window are calculated;
[0171] N square areas correspond to N*a executions in total 2 During a round of reciprocating scanning, the search window will slide multiple times. The calculation method of the reference index values of the multiple coding blocks generated by each sliding has been introduced in detail above and will not be repeated here.
[0172] Step 1660, from N*a 2 In the coding block cluster obtained by the reciprocating scanning, a reference block of the current block to be coded is determined based on the reference indicator value.
[0173] N*a 2The coding blocks obtained by the reciprocating scanning constitute a coding block cluster. Based on the reference index value, a reference block of the current block to be coded can be selected from the coding block cluster. Optionally, the reference index value is SAD, and the coding block with the smallest SAD is selected from the coding block cluster as the reference block.
[0174] In summary, the present application embodiment provides a full search solution, through a 2 A search window 2 In a round of reciprocating scanning, each pixel in the first image area will participate in the search as a vertex of the search window (the search window includes four vertices), which ensures the comprehensiveness of the search, and the reference block finally determined has a high matching degree and better quality.
[0175] Fig.17 A flowchart of a reference block search method provided by an exemplary embodiment of the present application is shown, and the method is illustrated by an example performed by an encoding device. The method includes:
[0176] Step 1701, frame start;
[0177] Start searching for the reference block of 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 started in the current CTU.
[0180] Step 1703, loading original data and reference data;
[0181] In one embodiment, a CTU has a size of 128*128 and includes 1024 4*4CUs. The reference block search method for a 4*4CU is described above, that is, a single-path reference block search process. Optionally, the reference block search process for 256 4*4CUs is performed in parallel through 256 paths.
[0182] In a single-path process, original data refers to pixel data of a current block to be encoded, and reference data refers to pixel data of a reference area of the current block to be encoded.
[0183] Step 1704, reciprocating scanning starts;
[0184] In the embodiment of the present application, a total of 16 rounds of reciprocating scanning are performed.
[0185] The first round of reciprocating scanning is recorded as ROUND 0. The second round of reciprocating scanning is recorded as ROUND 1, and so on, the 16th round of reciprocating scanning is recorded as ROUND 15.
[0186] Step 1705, selecting a starting point according to reciprocating scanning;
[0187] The starting points of the search windows corresponding to the 16 rounds of reciprocating scans are different, and the starting point of the search window of the current round of reciprocating scan is selected.
[0188] Step 1706, performing sliding window calculation in an arc shape starting from the starting point in the current area;
[0189] In the current area, a sliding window calculation is performed in an arc shape from the starting point to obtain reference index values of multiple coding blocks generated by each sliding of the search window in the current round of reciprocating scanning.
[0190] Step 1707, after the sliding window calculation is completed, the round of reciprocating scanning is increased by 1;
[0191] After the sliding window calculation is completed, the round of reciprocating scanning is increased by 1;
[0192] Step 1708, determining whether the number of rounds of reciprocating scanning is greater than 16;
[0193] Determine whether the round of reciprocating scanning is greater than 16. If so, execute step 1709; if not, execute step 1704.
[0194] Step 1709, determine whether encoding has reached the last CTU;
[0195] Determine whether the current encoding is to the last CTU, if so, execute step 1710; if not, execute step 1702.
[0196] Step 1710, frame ends;
[0197] Reference block search has been performed on all CUs to be encoded in the current frame.
[0198] In this application, the compression rate performance of the above scheme was tested. The test results show that although the size of the supported coding blocks is restricted, since the full search method is better than the original hash and Pattern search methods, the PSNR (Peak Signal to Noise Ratio), SSIM (Structural Similarity Index), and VMAF (Video Muiti Method Assessment Fusion) have significantly improved performance (negative values represent positive benefits).
[0199]
[0200] In terms of hardware architecture, this application uses 256-way parallel computing, each of which performs search calculations in the above manner, and can achieve a processing performance of 1080p@144fps at 1GHz.
[0201] Fig.18 A reference block search circuit 1800 provided by an exemplary embodiment of the present application is shown, and 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 through wires.
[0202] The first circuit unit 1801 is used to obtain a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded;
[0203] The second circuit unit 1802 is used to perform reciprocating scanning in the first image area with a first step length through a search window, where the first 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 minimum size, and the maximum coding block is the coding block with the maximum size;
[0204] The third circuit unit 1803 is used to calculate the reference index values of the plurality of coding blocks generated by each sliding of the search window during the reciprocating scanning process;
[0205] The fourth circuit unit 1804 is used to determine a reference block of the current block to be encoded according to the reference indicator values of the multiple encoding blocks generated by each sliding.
[0206] In an optional embodiment, the third circuit unit 1803 is further used to calculate, during the reciprocating scanning process, after each sliding of the search window, respective reference index values of multiple minimum coding blocks in an updated search area, where the updated search area is an area in the search window after sliding that does not overlap with the search window before sliding;
[0207] The third circuit unit 1803 is also 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 multiple minimum coding blocks in the updated search area and in combination with the reference index values of the coding blocks in the overlapping search area. The overlapping search area is an 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 in the search window after sliding, and the a hardware computing units correspond to the a minimum coding blocks one by one, 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 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 the plurality of minimum coding blocks in the update search area, along the row direction and the column direction of the first image area, combined with the reference index values of the coding blocks in the overlapping search area.
[0210] In an optional embodiment, the plurality of adders 1806 include first to seventeenth adders.
[0211] A first adder is used to add the reference index values of the two minimum coding blocks in the update search area to obtain a reference index value of a first coding block, the size of the minimum coding block is a*a, and the size of the first coding block is a*2a; a second adder is used to add the reference index values of the other two minimum coding blocks in the update search area to obtain a reference index value of another first coding block, and the update search area includes four minimum coding blocks;
[0212] A 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, where the size of the second coding block is a*4a;
[0213] a fourth adder, configured to add the reference index value of the second coding block to the reference index value of a coding block of a size of a*4a adjacent to the second coding block in the overlapping search area, to obtain a reference index value of a third coding block, wherein the size of the third coding block is 2a*4a;
[0214] a fifth adder, configured to add the reference index value of the third coding block to the reference index value of a coding block of 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, the size of the largest coding block being 4a*4a;
[0215] a sixth adder, used for adding 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 area, to obtain the reference index value of the first fourth coding block, where the size of the fourth coding block is 2a*a; a seventh adder, used for adding 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 area, to obtain the reference index value of the second fourth coding block; an eighth adder, used for adding 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 area, to obtain the reference index value of the third fourth coding block; a ninth adder, used for adding 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 area, to obtain the reference index value of the fourth fourth coding block;
[0216] a tenth adder, used for adding the reference index value of the first fourth coding block 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, the size of the fifth coding block being 4a*a; an eleventh adder, used for adding the reference index value of the second fourth coding block 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; a twelfth adder, used for adding the reference index value of the third fourth coding block 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; a thirteenth adder, used for adding the reference index value of the fourth fourth coding block 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;
[0217] A fourteenth adder is used to add the reference index values of the two fifth coding blocks to obtain a reference index value of a sixth coding block, where the size of the sixth coding block is 4a*2a; a fifteenth adder is used to add the reference index values of the other two fifth coding blocks to obtain a 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 and the reference index value of a coding block with a size of a*2a adjacent to the first coding block in the overlapping search area to obtain a reference index value of a seventh coding block, and 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 and the reference index value of a coding block with a size of a*2a adjacent to the other first coding block in the overlapping search area to obtain another reference index value of the seventh coding block.
[0219] In an optional embodiment, the size of the first image area 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 area 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.
[0221] In an optional embodiment, the search window is a 2 Any search window among the search windows, a 2 The starting points of the reciprocating scans corresponding to each search window constitute a pixel matrix, and the length and width of the pixel matrix are both the first step length a;
[0222] The second circuit unit 1802 is also used for a 2 For each search window in the search windows, a round of reciprocating scanning is performed in the first image region with a first step length on each search window;
[0223] The third circuit unit 1803 is also used for a 2 A corresponding to the search window 2 In each round of reciprocating scanning, reference index values of multiple coding blocks generated by each sliding of the search window in each round of reciprocating scanning are calculated.
[0224] In an optional embodiment, the first image area is any one of N square areas, and the N square areas cover a complete reference area of the current to-be-encoded block specified by the multifunctional video coding protocol;
[0225] The second circuit unit 1802 is further used for each square area of the N square areas, for each square area corresponding to a 2 For each search window in the search windows, a round of reciprocating scanning is performed in the first image region with a first step length on each search window;
[0226] The third circuit unit 1803 is also used for N*a corresponding to the N square areas. 2In each round of reciprocating scanning, the reference index values of the plurality of coding blocks generated by each sliding of the search window are calculated;
[0227] The fourth circuit unit 1804 is further used to obtain N*a 2 In the coding block cluster obtained by the reciprocating scanning, a reference block of the current block to be coded is determined based on the reference indicator value.
[0228] It should be noted that for a more detailed description of the search circuit of the reference block, please refer to the above method embodiment. The relevant contents introduced in the above method embodiment can be transformed into execution by a corresponding integrated circuit, which can be added to the above reference block search circuit embodiment.
[0229] Fig.19 A structural block diagram of a reference block search device provided by an exemplary embodiment of the present application is shown, and the device includes:
[0230] An acquisition module 1901 is used to acquire a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded;
[0231] A scanning module 1902 is used to perform reciprocating scanning in the first image area through a search window with a first step length, where the first 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 minimum size, and the maximum coding block is the coding block with the maximum size;
[0232] A calculation module 1903, used to calculate the reference index values of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning process;
[0233] The determination module 1904 is used to determine the reference block of the current block to be encoded according to the reference indicator values of the multiple encoding blocks generated by each sliding.
[0234] In an optional embodiment, the calculation module 1903 is also used to calculate the reference index values of multiple minimum coding blocks in the updated search area after each sliding of the search window during the reciprocating scanning process, where 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 the multiple minimum coding blocks in the updated search area, 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 slides are obtained, where the overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.
[0235] In an optional embodiment, the calculation module 1903 is also used to calculate the reference index value of each of the a minimum coding blocks in the updated search area in the search window after sliding through a hardware computing units, and the a hardware computing units correspond one-to-one to the a minimum coding blocks.
[0236] In an optional embodiment, the calculation module 1903 is also used to obtain, through multiple adders, 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 minimum coding blocks in the updated search area, along the row and column directions of the first image area and in combination with the reference index values of the coding blocks in the overlapping search area.
[0237] In an optional embodiment, the calculation module 1903 is further used to add the reference index values of the two minimum coding blocks in the update search area through a first adder to obtain a reference index value of a first coding block, the size of the minimum coding block is a*a, and the size of the first coding block is a*2a; add the reference index values of the other two minimum coding blocks in the update search area through a second adder to obtain a reference index value of another first coding block, and the update search area includes four minimum coding blocks;
[0238] By using a third adder, the reference index values of the two first coding blocks are added together to obtain a reference index value of the second coding block, where the size of the second coding block is a*4a;
[0239] By a fourth adder, the reference index value of the second coding block is added to the reference index value of a coding block of a size of a*4a adjacent to the second coding block in the overlapping search area to obtain a reference index value of a third coding block, where the size of the third coding block is 2a*4a;
[0240] By a fifth adder, the reference index value of the third coding block is added to the reference index value of a coding block of a size of 2a*4a adjacent to the third coding block in the overlapping search area to obtain a reference index value of a maximum coding block, where the size of the maximum coding block is 4a*4a;
[0241] By means of a sixth adder, a reference index value of the first minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the first minimum coding block in the overlapping search area, to obtain a reference index value of a first fourth coding block, where the size of the fourth coding block is 2a*a; By means of a seventh adder, a reference index value of the second minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the second minimum coding block in the overlapping search area, to obtain a reference index value of a second fourth coding block; By means of an eighth adder, a reference index value of the third minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the third minimum coding block in the overlapping search area, to obtain a reference index value of a third fourth coding block; By means of a ninth adder, a reference index value of the fourth minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the fourth minimum coding block in the overlapping search area, to obtain a reference index value of a fourth fourth coding block;
[0242] By means of a tenth adder, the reference index value of the first fourth coding block is added to a coding block of a size of 2a*a adjacent to the first fourth coding block in the overlapping search area, so as to obtain a reference index value of the first fifth coding block, where the size of the fifth coding block is 4a*a; by means of an eleventh adder, the reference index value of the second fourth coding block is added to a coding block of a size of 2a*a adjacent to the second fourth coding block in the overlapping search area, so as to obtain a reference index value of the second fifth coding block; by means of a twelfth adder, the reference index value of the third fourth coding block is added to a coding block of a size of 2a*a adjacent to the third fourth coding block in the overlapping search area, so as to obtain a reference index value of the third fifth coding block; by means of a thirteenth adder, the reference index value of the fourth fourth coding block is added to a coding block of a size of 2a*a adjacent to the fourth fourth coding block in the overlapping search area, so as to obtain a reference index value of the fourth fifth coding block;
[0243] The reference index values of the two fifth coding blocks are added by a fourteenth adder to obtain a reference index value of a sixth coding block, where the size of the sixth coding block is 4a*2a; the reference index values of the other two fifth coding blocks are added by a fifteenth adder to obtain another reference index value of the sixth coding block;
[0244] Through the sixteenth adder, the reference index value of a first coding block is added to the reference index value of a coding block with a size of a*2a adjacent to the first coding block in the overlapping search area, so as to obtain a reference index value of a seventh coding block, and the size of the eighth coding block is 2a*2a; through the seventeenth adder, the reference index value of another first coding block is added to the reference index value of a coding block with a size of a*2a adjacent to another first coding block in the overlapping search area, so as to obtain another reference index value of the seventh coding block.
[0245] In an optional embodiment, the size of the first image area 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 area 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 search window among the search windows, a 2 The starting points of the reciprocating scans corresponding to the search windows form a pixel matrix, and the length and width of the pixel matrix are both the first step length a. The scanning module 1902 is also used for a 2 Each search window in the search windows performs a round of reciprocating scanning in the first image region with the first step length. The calculation module 1903 is also used for a 2 A corresponding to the search window 2 In each round of reciprocating scanning, reference index values of multiple coding blocks generated by each sliding of the search window in each round of reciprocating scanning are calculated.
[0247] In an optional embodiment, the first image area is any one of the N square areas, and the N square areas cover a complete reference area of the current block to be encoded as specified by the multifunctional video encoding protocol. The scanning module 1902 is further configured to, for each square area in the N square areas, for a corresponding to each square area 2 Each search window in the N search windows performs a round of reciprocating scanning in the first image region with the first step length. The calculation module 1903 is also used to calculate N*a corresponding to the N square regions. 2 In each round of reciprocating scanning, reference index values of multiple coding blocks generated by each sliding of the search window in each round of reciprocating scanning are calculated.
[0248] The determination module 1904 is also used to determine the 2 In the coding block cluster obtained by the reciprocating scanning, a reference block of the current block to be coded is determined based on the reference indicator value.
[0249] In summary, a search window is used to perform a reciprocating scan in the first image area with a first step length, the first 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, and the reference index values of the multiple coding blocks generated by each sliding of the search window during the reciprocating scanning are calculated. The reference index values are used to determine the reference block of the current block to be coded. That is, the present application provides a new reference block search method based on reciprocating scanning.
[0250] Fig. 20 The block diagram of the structure of a computer device 2000 provided by an exemplary embodiment of the present application is shown. The computer device 2000 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The computer device 2000 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0251] Typically, the computer device 2000 includes a processor 2001 and a memory 2002 .
[0252] The processor 2001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 2001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2001 may be integrated with a GPU (Graphics Processing Unit, video encoder), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2001 may also include an AI (Artificial Intelligence) processor, which is used to process computing 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 a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2002 is used to store at least one instruction, which is used to be executed by the processor 2001 to implement the reference block search method provided in the method embodiment of the present application.
[0254] In some embodiments, the computer device 2000 may further optionally include: a peripheral device interface 2003 and at least one peripheral device. The processor 2001, the memory 2002 and the peripheral device interface 2003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 2003 via a bus, a signal line or a circuit board. For example, the peripheral device may include: at least one of a radio frequency circuit 2004, a display screen 2005, a camera assembly 2006, an audio circuit 2007 and a power supply 2008.
[0255] The peripheral device interface 2003 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 2001 and the memory 2002. In some embodiments, the processor 2001, the memory 2002, and the peripheral device interface 2003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2001, the memory 2002, and the peripheral device interface 2003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0256] The radio frequency circuit 2004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2004 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 2004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency 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 radio frequency circuit 2004 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 2004 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0257] The display screen 2005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 2005 is a touch display screen, the display screen 2005 also has the ability to collect touch signals on the surface or above the surface of the display screen 2005. The touch signal can be input to the processor 2001 as a control signal for processing. At this time, the display screen 2005 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 2005 can be one, arranged on the front panel of the computer device 2000; in other embodiments, the display screen 2005 can be at least two, respectively arranged on different surfaces of the computer device 2000 or in a folding design; in other embodiments, the display screen 2005 can be a flexible display screen, arranged on a curved surface or a folding surface of the computer device 2000. Even, the display screen 2005 can also be arranged as a non-rectangular irregular figure, that is, a special-shaped 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 capture images or videos. Optionally, the camera assembly 2006 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 2006 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold 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, and convert the sound waves into electrical signals and input them into the processor 2001 for processing, or input them into the radio frequency circuit 2004 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 2000. The microphone may also be an array microphone or an omnidirectional acquisition type microphone. The speaker is used to convert the electrical signal from the processor 2001 or the radio frequency circuit 2004 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 2007 may also include a headphone jack.
[0260] The power supply 2008 is used to power various components in the computer device 2000. The power supply 2008 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the 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 through a wired line, and a wireless rechargeable battery is a battery that is charged through 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 , including but not limited to: an acceleration sensor 2010 , a gyroscope sensor 2011 , a pressure sensor 2012 , an optical sensor 2013 , and a proximity sensor 2014 .
[0262] The acceleration sensor 2010 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the computer device 2000. For example, the acceleration sensor 2010 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 2001 can control the display screen 2005 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 2010. The acceleration sensor 2010 can also be used to collect game or user motion data.
[0263] The gyro sensor 2011 can detect the body direction and rotation angle of the computer device 2000, and the gyro sensor 2011 can cooperate with the acceleration sensor 2010 to collect the user's 3D actions on the computer device 2000. The processor 2001 can implement the following functions based on the data collected by the gyro sensor 2011: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0264] The pressure sensor 2012 can be set on the side frame of the computer device 2000 and / or the lower layer of the display screen 2005. When the pressure sensor 2012 is set on the side frame of the computer device 2000, it can detect the user's grip signal of the computer device 2000, and the processor 2001 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 2012. When the pressure sensor 2012 is set on the lower layer of the display screen 2005, the processor 2001 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 2005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0265] The optical sensor 2013 is used to collect the ambient light intensity. In one embodiment, the processor 2001 can control the display brightness of the display screen 2005 according to 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 the camera assembly 2006 according to the ambient light intensity collected by the optical sensor 2013.
[0266] The proximity sensor 2014, also called a distance sensor, is usually disposed on the front panel of the computer device 2000. The proximity sensor 2014 is used to collect 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 the screen-on state to the 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 the screen-off state to the screen-on state.
[0267] Those skilled in the art will understand that Fig. 20 The structure shown in the figure does not constitute a limitation on the computer device 2000, and the computer device 2000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0268] According to one aspect of the present application, a processor is provided, wherein an integrated circuit in the processor is used to implement the reference block search method provided in the above method embodiment.
[0269] According to one aspect of the present application, a processor is provided, wherein the processor includes the reference block search circuit provided by the above embodiment.
[0270] According to one aspect of the present application, a chip is provided, the chip comprising a processor, the integrated circuit in the processor being used to implement the reference block search method provided in the above method embodiment.
[0271] According to one aspect of the present application, a chip is provided, the chip comprising a processor, the processor comprising the reference block search circuit provided by the above embodiment.
[0272] According to one aspect of the present application, a computer device is provided, the computer device comprising a processor, wherein an integrated circuit in the processor is used to implement a reference block search method as provided in the above method embodiment.
[0273] According to one aspect of the present application, a computer device is provided. The computer device includes a processor. The processor includes the reference block search circuit provided by the above embodiment.
[0274] The present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. 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 embodiment.
[0275] The present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the reference block search method provided by the above method embodiment.
[0276] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0277] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0278] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for searching a reference block, characterized in that: The method comprises: Acquire a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded; Performing a reciprocating scan in the first image area with a first step length through a search window, wherein the first step length is the side length of a minimum coding block, the size of the search window is the size of a maximum coding block, the minimum coding block is a coding block with a minimum size, and the maximum coding block is a coding block with a maximum size; Calculate reference index values of the plurality of coding blocks generated by each sliding of the search window during the reciprocating scanning process; A reference block of the current block to be encoded is determined according to the reference indicator values of the multiple encoding blocks generated by each sliding.
2. The method according to claim 1, characterized in that: The calculation of the reference index values of the plurality of 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, a reference index value of each of the plurality of minimum coding blocks in an updated search area is calculated, wherein the updated search area is an 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 minimum coding blocks in the updated search area and combined with the reference index values of the coding blocks in the overlapping search area, reference index values of coding blocks of various sizes generated after the search window slides are obtained. The overlapping search area is the area in the search window after sliding that overlaps with the search window before sliding.
3. The method according to claim 2, characterized in that The calculating and obtaining reference index values of the plurality of minimum coding blocks in the updated search area in the search window after sliding includes: The reference index values of the a minimum coding blocks in the updated search area in the search window after sliding are calculated by a hardware computing units, the a hardware computing units correspond one-to-one to the a minimum coding blocks, and a is a positive integer.
4. The method according to claim 2, characterized in that: The obtaining, based on the reference index values of the plurality of minimum coding blocks in the updated search area and in combination with the reference index values of the coding blocks in the overlapping search area, reference index values of coding blocks of various sizes generated after the search window slides, includes: Through multiple adders, based on the reference index values of each of the multiple minimum coding blocks in the updated search area, along the row and column directions of the first image area, combined with the reference index values of the coding blocks in the overlapping search area, the reference index values of the coding blocks of each size generated after the search window slides are obtained.
5. The method according to claim 4, characterized in that The method of obtaining reference index values of coding blocks of various sizes generated after the search window slides by using multiple adders based on respective reference index values of the multiple minimum coding blocks in the update search area, along the row direction and the column direction of the first image area, in combination with reference index values of coding blocks in the overlapping search area, comprises: By means of a first adder, the reference index values of the two minimum coding blocks in the update search area are added to obtain a reference index value of a first coding block, wherein the size of the minimum coding block is a*a, and the size of the first coding block is a*2a; By means of a second adder, the reference index values of the other two minimum coding blocks in the update search area are added to obtain a reference index value of another first coding block, wherein the update search area includes four minimum coding blocks; By using a third adder, the reference index values of the two first coding blocks are added together to obtain a reference index value of the second coding block, where the size of the second coding block is a*4a; By a fourth adder, adding the reference index value of the second coding block and the reference index value of a coding block of a size of a*4a adjacent to the second coding block in the overlapping search area to obtain a reference index value of a third coding block, where the size of the third coding block is 2a*4a; By a fifth adder, adding the reference index value of the third coding block and the reference index value of a coding block of a size of 2a*4a adjacent to the third coding block in the overlapping search area, to obtain the reference index value of the maximum coding block, where the size of the maximum coding block is 4a*4a; By means of a sixth adder, a reference index value of the first minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the first minimum coding block in the overlapping search area, to obtain a reference index value of a first fourth coding block, wherein the size of the fourth coding block is 2a*a; By means of a seventh adder, a reference index value of the second minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the second minimum coding block in the overlapping search area, to obtain a reference index value of a second fourth coding block; By means of an eighth adder, a reference index value of the third minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the third minimum coding block in the overlapping search area, to obtain a reference index value of a third fourth coding block; By means of a ninth adder, a reference index value of the fourth minimum coding block is added to a reference index value of a coding block of a size a*a adjacent to the fourth minimum coding block in the overlapping search area, to obtain a reference index value of a fourth fourth coding block; By means of a tenth adder, the reference index value of the first fourth coding block is added to a coding block of a size of 2a*a adjacent to the first fourth coding block in the overlapping search area, so as to obtain a reference index value of the first fifth coding block, where the size of the fifth coding block is 4a*a; by means of an eleventh adder, the reference index value of the second fourth coding block is added to a coding block of a size of 2a*a adjacent to the second fourth coding block in the overlapping search area, so as to obtain a reference index value of the second fifth coding block; by means of a twelfth adder, the reference index value of the third fourth coding block is added to a coding block of a size of 2a*a adjacent to the third fourth coding block in the overlapping search area, so as to obtain a reference index value of the third fifth coding block; by means of a thirteenth adder, the reference index value of the fourth fourth coding block is added to a coding block of a size of 2a*a adjacent to the fourth fourth coding block in the overlapping search area, so as to obtain a reference index value of the fourth fifth coding block; By means of a fourteenth adder, the reference index values of the two fifth coding blocks are added to obtain a reference index value of a sixth coding block, wherein the size of the sixth coding block is 4a*2a; By means of a fifteenth adder, the reference index values of the other two fifth coding blocks are added to obtain a reference index value of another sixth coding block; Through the sixteenth adder, the reference index value of a first coding block is added to the reference index value of a coding block with a size of a*2a adjacent to the first coding block in the overlapping search area, so as to obtain a reference index value of a seventh coding block, and the size of the eighth coding block is 2a*2a; through the seventeenth adder, the reference index value of another first coding block is added to the reference index value of a coding block with a size of a*2a adjacent to the another first coding block in the overlapping search area, so as to obtain a reference index value of another seventh coding block.
6. The method according to any one of claims 1 to 5, characterized in that: The size of the first image area is 64*64, the size of the minimum coding block is 4*4, and the size of the maximum coding block is 16*16; Alternatively, the size of the first image area 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.
7. The method according to claim 1, characterized in that The search window is a 2 Any one of the search windows, the a 2 The starting points of the reciprocating scans corresponding to the search windows respectively constitute a pixel matrix, and the length and width of the pixel matrix are both the first step length a; The scanning is performed reciprocatingly in the first image area with a first step length through the search window; Calculating the reference index values of the plurality of coding blocks generated by each sliding of the search window during the reciprocating scanning process includes: For the a 2 For each of the search windows, performing one round of the reciprocating scanning in the first image area with the first step length; For the a 2 A corresponding to the search window 2 In each round of reciprocating scanning, reference index values of multiple coding blocks generated by each sliding of the search window during each round of reciprocating scanning are calculated.
8. The method according to claim 7, characterized in that The first image area is any one of N square areas, and the N square areas cover a complete reference area of the current block to be encoded as specified by the multifunctional video coding protocol; For the a 2 For each search window of the plurality of search windows, performing a round of the reciprocating scanning in the first image area with the first step length, comprising: For each square area of the N square areas, for a corresponding to each square area 2 For each of the search windows, performing one round of the reciprocating scanning in the first image area with the first step length; For the a 2 A corresponding to the search window 2 In each round of reciprocating scanning, the reference index values of the plurality of coding blocks generated by each sliding of the search window during each round of reciprocating scanning are calculated, including: For the N square areas corresponding to N*a 2 rounds of reciprocating scanning, calculating respective reference index values of a plurality of coding blocks generated by each sliding of the search window during each round of reciprocating scanning; The determining, according to the reference indicator values of the plurality of coding blocks generated by each sliding, a reference block of the current block to be coded comprises: From the N*a 2 In the coding block cluster obtained by the reciprocating scanning, a reference block of the current block to be coded is determined based on the reference indicator value.
9. A reference block search circuit, characterized in that: The circuit comprises 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 through wires; The first circuit unit is used to obtain a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded; The second circuit unit is used to perform reciprocating scanning 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, the size of the search window is the size of the maximum coding block, the minimum coding block is a coding block with a minimum size, and the maximum coding block is a coding block with a maximum size; The third circuit unit is used to calculate the reference index values of the plurality of coding 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 according to the reference indicator values of the multiple encoding blocks generated by each sliding.
10. The circuit according to claim 9, characterized in that The third circuit unit is further used for calculating, during the reciprocating scanning process, after each sliding of the search window, respective reference index values of the plurality of minimum coding blocks in an updated search area, wherein the updated search area is an area in the search window after sliding that does not overlap with the search window before sliding; The third circuit unit is further 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 multiple minimum coding blocks in the updated search area and in combination with the reference index values of the coding blocks in the overlapping search area, wherein the overlapping search area is an area in the search window after sliding that overlaps with the search window before sliding.
11. The circuit according to claim 10, 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 the a minimum coding blocks in the updated search area in the search window after sliding. The a hardware computing units correspond to the a minimum coding blocks one by one, and a is a positive integer.
12. The circuit according to claim 10, characterized in that The third circuit unit includes a plurality of adders; The multiple adders 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 multiple minimum coding blocks in the updated search area, along the row and column directions of the first image area, combined with the reference index values of the coding blocks in the overlapping search area.
13. The circuit according to claim 12, characterized in that The plurality of adders include first to seventeenth adders; A first adder is used to add the reference index values of the two minimum coding blocks in the update search area to obtain a reference index value of a first coding block, the size of the minimum coding block is a*a, and the size of the first coding block is a*2a; a second adder is used to add the reference index values of the other two minimum coding blocks in the update search area to obtain a reference index value of another first coding block, the update search area includes four minimum coding blocks; A third adder, used for adding the reference index values of the two first coding blocks to obtain the reference index value of the second coding block, where the size of the second coding block is a*4a; a fourth adder, configured to add the reference index value of the second coding block to the reference index value of a coding block of a size of a*4a adjacent to the second coding block in the overlapping search area, to obtain a reference index value of a third coding block, wherein the size of the third coding block is 2a*4a; a fifth adder, configured to add the reference index value of the third coding block to the reference index value of a coding block of a size of 2a*4a adjacent to the third coding block in the overlapping search area, to obtain the reference index value of the maximum coding block, wherein the size of the maximum coding block is 4a*4a; a sixth adder, configured to add the reference index value of the first minimum coding block to the reference index value of a coding block of a size a*a adjacent to the first minimum coding block in the overlapping search area, to obtain a reference index value of a first fourth coding block, wherein the size of the fourth coding block is 2a*a; A seventh adder is used to add 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 area to obtain the reference index value of the second fourth coding block; an eighth adder is used to add 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 area to obtain the reference index value of the third fourth coding block; a ninth adder is used to add 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 area to obtain the reference index value of the fourth fourth coding block; a tenth adder, used for adding the reference index value of the first fourth coding block 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, the size of the fifth coding block being 4a*a; an eleventh adder, used for adding the reference index value of the second fourth coding block 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; a twelfth adder, used for adding the reference index value of the third fourth coding block 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; a thirteenth adder, used for adding the reference index value of the fourth fourth coding block 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; A fourteenth adder is used to add the reference index values of the two fifth coding blocks to obtain a reference index value of a sixth coding block, where the size of the sixth coding block is 4a*2a; a fifteenth adder is used to add the reference index values of the other two fifth coding blocks to obtain a reference index value of another sixth coding block; A sixteenth adder is used to add a reference index value of a first coding block and a reference index value of a coding block of size a*2a adjacent to the first coding block in the overlapping search area to obtain a reference index value of a seventh coding block, and the size of the eighth coding block is 2a*2a; a seventeenth adder is used to add a reference index value of another first coding block and a reference index value of a coding block of size a*2a adjacent to the another first coding block in the overlapping search area to obtain a reference index value of another seventh coding block.
14. The circuit according to any one of claims 9 to 13, characterized in that: The size of the first image area is 64*64, the size of the minimum coding block is 4*4, and the size of the maximum coding block is 16*16; Alternatively, the size of the first image area 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.
15. The circuit according to claim 9, characterized in that The search window is a 2 Any one of the search windows, the a 2 The starting points of the reciprocating scans corresponding to the search windows respectively constitute a pixel matrix, and the length and width of the pixel matrix are both the first step length a; The second circuit unit is also used for 2 For each of the search windows, performing one round of the reciprocating scanning in the first image area with the first step length; The third circuit unit is also used for 2 A corresponding to the search window 2 In each round of reciprocating scanning, reference index values of multiple coding blocks generated by each sliding of the search window during each round of reciprocating scanning are calculated.
16. The circuit according to claim 15, characterized in that The first image area is any one of N square areas, and the N square areas cover a complete reference area of the current block to be encoded as specified by the multifunctional video coding protocol; The second circuit unit is further used for each square area of the N square areas, for a corresponding to each square area 2 For each search window of the plurality of search windows, performing one round of the reciprocating scanning in the first image area with the first step length; The third circuit unit is also used for N*a corresponding to the N square areas. 2 rounds of reciprocating scanning, calculating respective reference index values of a plurality of coding blocks generated by each sliding of the search window during each round of reciprocating scanning; The fourth circuit unit is also used to obtain the N*a 2 In the coding block cluster obtained by the reciprocating scanning, a reference block of the current block to be coded is determined based on the reference indicator value.
17. A reference block search device, characterized in that: The device comprises: An acquisition module, configured to acquire a first image area, where the first image area covers a part or all of a reference area of a current block to be encoded; a scanning module, configured to perform reciprocating scanning in the first image area with a first step length through a search window, wherein the first step length is a side length of a minimum coding block, a size of the search window is a size of a maximum coding block, the minimum coding block is a coding block with a minimum size, and the maximum coding block is a coding block with a maximum size; A calculation module, used for calculating the reference index values of the plurality of coding blocks generated by each sliding of the search window during the reciprocating scanning process; The determination module is used to determine the reference block of the current block to be encoded according to the reference indicator values of the multiple encoding blocks generated by each sliding.
18. A processor, characterized in that: The processor comprises a reference block search circuit as claimed in any one of claims 9 to 16.
19. A chip, characterized in that: The chip comprises a processor, and the processor comprises a reference block search circuit as claimed in any one of claims 9 to 16.
20. A computer device, characterized in that: The computer device comprises a processor, wherein the processor comprises a reference block search circuit as claimed in any one of claims 9 to 16.
Citation Information
Patent Citations
Methods and systems for image motion estimation
CN102263947A
Video encoding method and device, encoder and storage device
CN111586415A
Coding method and device based on string coding technology, decoding method and device based on string coding technology,and storage medium
CN113365080A
Video coding method, video decoding method and related equipment
CN114827618A
Cited By
Reference block searching method and circuit, chip, and device
WO2025157062A1
