Video encoding method, video decoding method, decoder, encoder and computer-readable storage medium

By using pixel-level search points in inter-frame prediction for motion vector prediction and fine search, the problem of insufficient motion estimation accuracy in light field images is solved and the encoding and decoding performance is improved.

WO2024216415A1PCT designated stage expired Publication Date: 2024-10-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
PCT/CN2023/088558
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-16
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

When processing light field images, the optimal point of inter-frame prediction motion estimation is lost, resulting in reduced motion estimation accuracy, thereby reducing encoding and decoding performance.

Method used

By using pixel-level search points for motion vector prediction in inter-frame prediction, determining the initial search points, and performing macro-pixel-level and pixel-level searches based on the initial search points to finely determine the motion vector, thereby improving the accuracy of motion estimation.

Benefits of technology

It adds pixel-level fine search, reduces the loss of local optimal points, and improves motion estimation performance and encoding and decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023088558_24102024_PF_FP_ABST
    Figure CN2023088558_24102024_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a video encoding method, a video decoding method, a decoder, an encoder and a computer-readable storage medium, which can improve the motion estimation accuracy, thereby improving the encoding and decoding performance. The video encoding method comprises: performing motion vector prediction on the current block to determine an initial search point; on the basis of the initial search point, performing a macro-pixel-level search to determine a macro-pixel-level search point; on the basis of the macro-pixel-level search point, performing a pixel-level search to determine a pixel-level search point; and on the basis of the pixel-level search point, determining a motion vector corresponding to the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding and decoding method, decoder, encoder and computer-readable storage medium Technical Field

[0001] The embodiments of the present application relate to video coding and decoding technology, and relate to but are not limited to a video coding and decoding method, a decoder, an encoder, and a computer-readable storage medium. Background Art

[0002] Inter-frame prediction is the primary method used in hybrid coding frameworks to remove temporal redundancy in video. Inter-frame prediction uses a reconstructed image of an already coded image as a reference image, and through motion estimation and compensation techniques, predicts and encodes the pixels of the current image to be coded. Motion estimation involves finding the best matching reference block for the current block in the reference image based on specific matching criteria. The displacement between the reference block and the current block is the motion vector.

[0003] When using motion estimation technology to process light field images, since light field images are composed of a series of regularly arranged macropixels with strong correlations between adjacent macropixels, motion estimation is currently typically performed by using algorithms such as TZSearch to search for macropixels based on the macropixel arrangement patterns in light field images. However, this approach can cause the optimal point for motion estimation to be lost, thereby reducing motion estimation accuracy and, in turn, codec performance.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a video encoding and decoding method, a decoder, an encoder, and a computer-readable storage medium, which can improve the accuracy of inter-frame prediction motion estimation and thereby enhance encoding and decoding performance.

[0006] In a first aspect, an embodiment of the present application provides a video decoding method, the method comprising:

[0007] Parsing a bitstream to determine a current block and a motion vector corresponding to the current block; the motion vector corresponding to the current block is determined by an encoder based on a pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by performing motion vector prediction on the current block, determining a macro-pixel-level search point, and performing a pixel-level search based on the macro-pixel-level search point;

[0008] Determining a reference block corresponding to the current block based on the motion vector;

[0009] Pixel value prediction and motion compensation are performed based on the reference block to determine a predicted image block corresponding to the current block.

[0010] In a second aspect, an embodiment of the present application provides a video encoding method, the method comprising:

[0011] Perform motion vector prediction on the current block and determine the initial search point;

[0012] Performing a macro-pixel level search based on the initial search point to determine a macro-pixel level search point;

[0013] Perform pixel-level search based on the macro-pixel-level search point to determine the pixel-level search point;

[0014] Based on the pixel-level search point, a motion vector corresponding to the current block is determined.

[0015] In a third aspect, an embodiment of the present application provides a decoder, including:

[0016] a parsing portion configured to parse a bitstream and determine a current block and a motion vector corresponding to the current block; the motion vector corresponding to the current block is determined by an encoder based on a pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by performing motion vector prediction on the current block, determining a macro-pixel-level search point, and performing a pixel-level search based on the macro-pixel-level search point;

[0017] A first determining part is configured to determine a reference block corresponding to the current block based on the motion vector;

[0018] The prediction part is configured to perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block.

[0019] In a fourth aspect, an embodiment of the present application provides an encoder, including:

[0020] An initial motion estimation part, configured to perform motion vector prediction on the current block and determine an initial search point;

[0021] A search section configured to perform a macro-pixel level search based on the initial search point to determine a macro-pixel level search point; and perform a pixel level search based on the macro-pixel level search point to determine a pixel level search point;

[0022] The second determining part is configured to determine the motion vector corresponding to the current block based on the pixel-level search point.

[0023] In a fifth aspect, an embodiment of the present application provides a decoder, including:

[0024] A first memory, configured to store executable instructions;

[0025] The first processor is configured to implement the video decoding method in the embodiment of the present application when executing the executable instructions stored in the first memory.

[0026] In a sixth aspect, an embodiment of the present application provides an encoder, including:

[0027] a second memory for storing executable instructions;

[0028] The second processor is configured to implement the video encoding method provided in the embodiment of the present application when executing the executable instructions stored in the second memory.

[0029] In a seventh aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded is determined based on a motion vector corresponding to a current block; the motion vector corresponding to the current block is determined based on a pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by motion vector prediction of the current block, and the macro-pixel-level search point is determined by performing a pixel-level search based on the macro-pixel-level search point.

[0030] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a first processor, it implements the video decoding method provided by the embodiment of the present application; or, when the computer program is executed by a second processor, it implements the video encoding method provided by the embodiment of the present application.

[0031] The embodiments of the present application provide a video encoding and decoding method, a decoder, an encoder, and a computer-readable storage medium. The decoder determines the motion vector corresponding to the current block by parsing the code stream, and then can use the motion vector to predict the pixel value and perform motion compensation on the current block, determine the predicted image block corresponding to the current block, and implement the decoding process of the current block. Here, the motion vector corresponding to the current block is determined by the encoder based on the pixel-level search point corresponding to the current block. Among them, the pixel-level search point is determined by performing a macro-pixel-level search on the initial search point determined by performing motion vector prediction on the current block, determining the macro-pixel-level search point, and then performing a pixel-level search based on the macro-pixel-level search point. It can be seen that the embodiment of the present application adds a pixel-level fine search based on the macro-pixel-level search determined by the macro-pixel-level search, which can reduce the loss of local optimal points, further refine the search results, improve the motion estimation performance, and thus improve the decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG1 is a schematic diagram of an optional effect of a light field image provided by an embodiment of the present application;

[0033] FIG2 is a block diagram of an encoder according to an embodiment of the present application;

[0034] FIG3 is a schematic block diagram of a decoder according to an embodiment of the present application;

[0035] FIG4 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application;

[0036] FIG5 is a schematic diagram of an optional process from acquisition to display of a light field video provided in an embodiment of the present application;

[0037] FIG6 is a schematic diagram of an optional flow chart of an encoding method provided in an embodiment of the present application;

[0038] FIG7 is a schematic diagram of an optional flow chart of an encoding method provided in an embodiment of the present application;

[0039] FIG8 is a schematic diagram of an optional process of pixel-level search according to an embodiment of the present application;

[0040] FIG9 is a schematic diagram of an optional flow chart of an encoding method provided in an embodiment of the present application;

[0041] FIG10 is a schematic diagram of an optional process of performing a macro-pixel-level search based on an initial modified search point and performing a pixel-level search based on the macro-pixel-level search results, provided by an embodiment of the present application;

[0042] FIG11 is a schematic diagram of an optional process of performing a macro-pixel-level search in a macro-pixel-level search range based on a pixel-level modified search point according to an embodiment of the present application;

[0043] FIG12 is a schematic diagram of another optional process for performing a macro-pixel-level search within a macro-pixel-level search range based on a pixel-level modified search point according to an embodiment of the present application;

[0044] FIG13 is a schematic diagram of an optional flow chart of an encoding method provided in an embodiment of the present application;

[0045] FIG14 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application;

[0046] FIG15 is a structural diagram of a decoder provided in an embodiment of the present application;

[0047] FIG16 is a second structural diagram of a decoder provided in an embodiment of the present application;

[0048] FIG17 is a structural diagram 1 of an encoder provided in an embodiment of the present application;

[0049] FIG18 is a second structural diagram of an encoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to explain the related applications and are not intended to limit the applications. It should also be noted that for ease of description, only the parts relevant to the related applications are shown in the drawings.

[0051] It should be noted that the terms “first”, “second”, “third”, etc. mentioned throughout the specification are only used to distinguish different features and do not have the function of limiting priority, sequence, size relationship, etc.

[0052] The nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0053] Inter-frame prediction: Inter-frame prediction is the primary method used in hybrid coding frameworks to remove temporal redundancy in video. Inter-frame prediction uses a reconstructed image of an already coded image as a reference image, and through motion estimation and compensation techniques, predicts and encodes the pixels of the current image to be coded. Motion estimation involves finding the best matching reference block for the current block in the reference image based on specific matching criteria. The displacement between the reference block and the current block is the motion vector (MV).

[0054] Light field video is captured by multiple cameras or camera arrays. Unlike conventional camera imaging models, light field cameras incorporate a microlens array in front of the imaging plane. This allows light from the same point on the object plane to be captured simultaneously by multiple microlenses, effectively capturing the same point from multiple angles. Due to this unique imaging model, the visual quality of light field images differs significantly from that of traditional images. This also results in poor performance of compression methods used for conventional images or videos when processing light field images or videos.

[0055] As shown in Figure 1, a light field image is composed of a series of regularly arranged macropixels. According to the imaging principle of a light field camera, there is a strong correlation between adjacent macropixels. Therefore, when searching for light field images using inter-frame prediction motion estimation technology, in order to make more full use of the correlation of light field images and improve coding compression performance, the arrangement pattern of macropixels in light field images is usually used to improve motion estimation. For example, based on the TZSearch algorithm of traditional motion estimation, the motion vector search step size is set to a multiple of the light field macropixel spacing, as shown in formula (1):

[0056] In formula (1), d x The horizontal motion vector offset corresponding to the current search; d yThe vertical motion vector offset corresponding to the current search; d x , The horizontal motion vector offset corresponding to the previous search; d y , is the vertical motion vector offset corresponding to the previous search, ΔstepX and ΔstepY are the number of search steps increased in the horizontal and vertical directions respectively for the current search, L x and L y They are the search step units in the horizontal and vertical directions, respectively, and are usually set to the spacing size of each light field macro pixel.

[0057] However, current technical solutions take into account the macropixel arrangement patterns of light field images, but searching solely in macropixel units can miss some local optima. Furthermore, matching blocks can move across macropixels between different images, and adjacent macropixels can have parallax and size differences. Therefore, the optimal candidate matching blocks may not be arranged strictly according to macropixel spacing. Therefore, current technical solutions can lead to inaccurate reference block determination during motion estimation, reducing motion estimation accuracy and encoding performance, and ultimately, codec performance.

[0058] The embodiments of the present application provide a video encoding and decoding method, a decoder, an encoder, and a computer-readable storage medium, which can improve the accuracy of motion estimation and thus improve video encoding and decoding performance. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0059] Referring to Figure 2, which shows a schematic block diagram of the composition of an encoder provided in an embodiment of the present application. As shown in Figure 2, the encoder (specifically, a "video encoder") 50 may include a transform and quantization unit 501, an intra-frame estimation unit 502, an intra-frame prediction unit 503, an inter-frame prediction unit 504, a motion estimation unit 505, an inverse transform and inverse quantization unit 506, a filter control analysis unit 507, a filtering unit 508, an encoding unit 509, and a decoded image cache unit 510, etc., wherein the filtering unit 508 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 509 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input original video signal, a video coding block can be obtained by dividing the coding tree unit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 501, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-frame estimation unit 502 and the intra-frame prediction unit 503 are used to perform intra-frame prediction on the video coding block; specifically, the intra-frame estimation unit 502 and the intra-frame prediction unit 503 are used to determine the intra-frame prediction mode to be used to encode the video coding block; the inter-frame prediction unit 504 and the motion estimation unit 505 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference images to provide temporal prediction information; the motion estimation performed by the motion estimation unit 505 is a process of generating a motion vector, which can estimate the motion of the video coding block, and then the inter-frame prediction unit 504 performs motion compensation based on the motion vector determined by the motion estimation unit 505, so that the frame The inter-prediction unit 504 may also be referred to as a motion compensation unit. After determining the intra-prediction mode, the intra-prediction unit 503 is further configured to provide the selected intra-prediction data to the encoding unit 509, and the motion estimation unit 505 also sends the calculated motion vector data to the encoding unit 509. Furthermore, the inverse transform and inverse quantization unit 506 is configured to reconstruct the video coding block by reconstructing a residual block in the pixel domain. This reconstructed residual block is subjected to a filter control analysis unit 507 and a filter unit 508 to remove blocking artifacts. The reconstructed residual block is then added to a prediction block in an image stored in the decoded image buffer unit 510 to generate a reconstructed video coding block. The encoding unit 509 is configured to encode various coding parameters and quantized transform coefficients. In a CABAC-based coding algorithm, context may be based on adjacent coding blocks and may be used to encode information indicating the determined intra-prediction mode, thereby outputting a bitstream of the video signal. The decoded image buffer unit 510 is configured to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 510 .

[0060] Referring to FIG3 , which shows a block diagram of a decoder provided in an embodiment of the present application, the decoder (specifically, a “video decoder”) 60 includes a decoding unit 601, an inverse transform and inverse quantization unit 602, an intra-frame prediction unit 603, an inter-frame prediction unit 604, a filtering unit 605, and a decoded image buffer unit 606. The decoding unit 601 can implement header information decoding and CABAC decoding, and the filtering unit 605 can implement deblocking filtering and SAO filtering. After the input video signal is coded as shown in FIG2 , a code stream of the video signal is output; the code stream is input to the decoder 60 and first passes through the decoding unit 601 to obtain decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 602 to generate a residual block in the pixel domain; the intra-frame prediction unit 603 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from the previously decoded block of the current image; the inter-frame prediction unit 604 determines prediction information for the video decoding block by parsing the motion vector and other associated syntax elements, and uses the prediction information to generate the prediction data for the current video decoding block. The prediction information is used to generate a prediction block of the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 602 with the corresponding prediction block generated by the intra-frame prediction unit 603 or the inter-frame prediction unit 604; the decoded video signal is passed through the filtering unit 605 to remove blocking artifacts, thereby improving the video quality; the decoded video block is then stored in the decoded image buffer unit 606, which stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal, that is, the restored original video signal is obtained.

[0061] Furthermore, an embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder. FIG4 is a schematic diagram of a network architecture of a coding and decoding system provided by an embodiment of the present application. As shown in FIG4 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic device can be various types of devices with video coding and decoding functions. For example, the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensing device, a server, etc., which is not specifically limited in the embodiment of the present application. Here, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.

[0062] In some embodiments, the process of capturing / shooting a light field video to displaying it may be as shown in FIG. 5 .

[0063] It should be noted that the method of the embodiment of the present application is mainly applied to the inter-frame prediction unit 504 shown in Figure 2. For the decoder 60, the motion vector obtained by the analysis of the inter-frame prediction unit 604 shown in Figure 3 can be determined by the inter-frame prediction unit 504 using the method of the embodiment of the present application.

[0064] It should also be noted that, when applied to the inter-frame prediction unit 504, the "current block" specifically refers to the coding block currently to be inter-frame predicted.

[0065] In one embodiment of the present application, referring to FIG6 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. The method may include:

[0066] S101: Perform motion vector prediction on the current block and determine an initial search point.

[0067] In an embodiment of the present application, when the encoder performs motion estimation on the current block in the current image, it searches in the encoded reference image corresponding to the current image to determine the initial reference block in the reference image that best matches the current block. In this way, the displacement from the initial reference block to the current block is the initial motion vector.

[0068] In some embodiments, the encoder may perform motion vector prediction on the current block using Advanced Motion Vector Prediction (AMVP) technology based on High Efficiency Video Coding (HEVC) to determine at least one candidate motion vector. The encoder determines an initial motion vector based on the rate-distortion cost of each candidate motion vector in the at least one candidate motion vector; illustratively, the motion vector with the smallest rate-distortion cost is selected from the at least one candidate predicted motion vector as the initial motion vector. The encoder determines an initial search point based on the position corresponding to the initial motion vector, that is, the position pointed to by the initial motion vector is used as the initial search point. The encoder continuously corrects or updates the initial search point through subsequent steps to ultimately determine the motion vector corresponding to the current block.

[0069] In some embodiments, the initial search point may be the position or coordinates of the upper left corner of the reference block, or other positions in the reference block. The specific selection is made based on actual conditions and is not limited in the embodiments of the present application.

[0070] S102: Perform a macro-pixel level search based on the initial search point to determine a macro-pixel level search point.

[0071] In an embodiment of the present application, the encoder searches in units of macropixels based on an initial search point determined by motion vector prediction, determines at least one initial macropixel-level search point, and determines a macropixel-level search point from the at least one initial macropixel-level search point based on a rate-distortion cost.

[0072] In the embodiment of the present application, the macro-pixel level search can be performed based on the macro-pixel arrangement rule of the light field image and utilize the strong correlation between adjacent macro-pixels to improve the coding compression performance.

[0073] S103 : Perform pixel-level search based on the macro-pixel-level search point to determine the pixel-level search point.

[0074] Because macro-pixel-level search may miss or eliminate certain local optima, in the embodiments of the present application, a more refined pixel-level search is added to the macro-pixel-level search. A further refined search is performed on a pixel-by-pixel basis in the neighborhood of the macro-pixel-level search point. This allows pixel-level offset corrections to be made to the candidate reference block positions derived from the macro-pixel-level search, increasing their relevance to the current block to further optimize the motion estimation effect of light field video compression.

[0075] S104: Determine the motion vector corresponding to the current block based on the pixel-level search point.

[0076] In the embodiment of the present application, the encoder can determine the motion vector corresponding to the current block based on the position pointed to by the pixel-level search point.

[0077] In some embodiments, after determining the motion vector corresponding to the current block, the encoder can determine the reference block corresponding to the current block based on the motion vector corresponding to the current block, thereby updating the initial reference block searched through AMVP to a reference block with a higher correlation with the current block. The encoder performs pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block; then it continues processing the next block in the current image to obtain the motion vector and predicted image block corresponding to each block in the current image; based on the motion vector and predicted image block corresponding to each block in the current image, it determines the encoding information corresponding to the current image and writes it into the bitstream.

[0078] It is understandable that the encoder performs a macropixel-level search based on the initial search point determined by motion vector prediction for the current block to determine the macropixel-level search point, and then performs a pixel-level search based on the macropixel-level search point to determine the pixel-level search point. This adds a pixel-level fine search to the macropixel-level search, which can reduce the loss of local optimal points, further refine the search results, improve motion estimation performance, and thus improve decoding performance. In addition, because the spacing between macropixels in a light field image is difficult to ensure strict consistency, the embodiments of the present application introduce a pixel-level fine search on the macropixel-level search results to further improve the robustness of the encoding.

[0079] In some embodiments, based on FIG. 6 , as shown in FIG. 7 , the above S102 may be implemented by executing S1021 - S1022 as follows:

[0080] S1021 . Perform pixel-level search based on the initial search point to determine an initial revised search point.

[0081] In the embodiment of the present application, the encoder takes the initial search point as the center and performs at least one search in units of pixels within the neighborhood of the initial search point to fine-tune the initial search point.

[0082] In an embodiment of the present application, the encoder performs a pixel-level search using the initial search point as the second center point, and determines an optimal point at which the rate-distortion cost is minimized based on the rate-distortion cost of each pixel in a first number of pixels determined from a neighborhood of the second center point. In some embodiments, the encoder may directly use the optimal point determined through a pixel-level search based on the initial search point as the initial revised search point, or may use the optimal point determined through the pixel-level search to update the second center point, continue to perform at least one pixel-level search, and continuously update the second center point during each pixel-level search of the at least one pixel-level search until the initial revised search point is determined.

[0083] Exemplarily, the first number can be 8. The encoder can search for 8 pixels in the area of ​​the initial search point with the initial search point as the center, and select the pixel with the lowest rate-distortion cost, that is, the optimal pixel. The encoder uses the optimal pixel as the new second center point, that is, updates the second center point. The encoder continues to perform the next pixel-level search in the neighborhood of the second center point, and uses the same process to search for pixels and update the second center point in the next pixel-level search. Here, the first number can also be set to other values ​​according to actual needs, and the embodiments of the present application are not limited thereto.

[0084] In some embodiments, the encoder may continue to perform at least one pixel-level search based on the second center point, updating the second center point through each pixel-level search until the number of searches reaches a first preset search number threshold, and then determining an initial revised search point from the searched pixel points based on the rate-distortion cost, or until the second center point updated by the current sub-pixel-level search is the same as the second center point of the previous pixel-level search, and then determining the second center point updated by the current sub-pixel-level search as the initial revised search point.

[0085] In some embodiments, the encoder continues to perform at least one pixel-level search based on the second center point. In each pixel-level search, the encoder selects an optimal point from the searched pixel points based on the rate-distortion cost, and uses the optimal point to update the second center point, which serves as the second center point for the next pixel-level search. In this manner, the second center point is continuously updated through each pixel-level search in the at least one pixel-level search until the optimal point selected in a particular pixel-level search is consistent with the previously selected point. In other words, if the second center point updated in the current pixel-level search is the same as the second center point based on the previous pixel-level search, the second center point updated in the current pixel-level search is used as the initial revised search point.

[0086] For example, as shown in FIG8 , pixel "0" is the initial search point. With pixel "0" as the second center point, the surrounding 8 pixels are searched to determine pixel "1" with the lowest rate-distortion cost. The second center point is then updated to pixel "1." The same 8-point search is then performed with pixel "1" as the center to determine pixel "2" with the lowest rate-distortion cost. The second center point is then updated to pixel "2." Similarly, an 8-point search is performed with pixel "2" as the center, and the second center point is updated to pixel "3." An 8-point search is continued with the second center point "3" as the center, and the second center point is updated to pixel "2." Since the second center point updated by the current sub-pixel-level search is consistent with the second center point based on the previous pixel-level search, both being pixel "2," the second center point updated by the current sub-pixel-level search, i.e., pixel "2," is determined as the initial revised search point.

[0087] In some embodiments, the encoder continues to perform at least one pixel-level search based on the second center point, updating the second center point with each pixel-level search until the number of searches reaches a first preset search number threshold, whereupon the encoder determines an initial revised search point from the pixels found in the at least one pixel-level search based on the rate-distortion cost. Here, when the first preset search number threshold is reached, the encoder determines the pixel with the lowest rate-distortion cost among all pixels found in the at least one pixel-level search as the initial revised search point. The first preset search number threshold is an integer greater than 1.

[0088] S1022: Perform a macro-pixel level search based on the initial modified search point to determine a macro-pixel level search point.

[0089] In an embodiment of the present application, the encoder searches in units of macropixels based on an initial corrected search point determined by a pixel-level search, and determines a macropixel-level search point among the searched macropixels according to a rate-distortion cost to determine the motion vector of the current block based on the macropixel-level search point.

[0090] It is understandable that fine-tuning the initial search point through pixel-level search can improve the search accuracy, thereby improving the accuracy of motion estimation and further improving the encoding and decoding performance.

[0091] In some embodiments, based on FIG. 7 , as shown in FIG. 9 , S1022 may include S201 - S203 as follows:

[0092] S201 : Perform a macro-pixel level search based on an initial revised search point, and perform a pixel level search based on at least one initial macro-pixel level search point determined by the macro-pixel level search to determine a pixel-level revised search point.

[0093] In this embodiment of the present application, the encoder uses an initial search point as the center point and performs a search in units of macropixels within the neighborhood of the initial search point to determine at least one initial macropixel-level search point. The encoder then performs a pixel-level search based on each of the at least one initial macropixel-level search point to perform pixel-level fine correction on each initial macropixel-level search point, and determines a pixel-level correction search point for the at least one corrected pixel point based on a rate-distortion cost.

[0094] In some embodiments, the encoder performs at least one macro-pixel-level search within a preset template range with an increasing step size based on the initial correction search point, and determines at least one initial macro-pixel-level search point corresponding to the at least one macro-pixel-level search; performs a pixel-level search based on each initial macro-pixel-level search point in the at least one initial macro-pixel-level search point, and determines the initial pixel-level correction search point corresponding to each initial macro-pixel-level search point, thereby determining at least one initial pixel-level correction search point corresponding to the at least one initial macro-pixel-level search point; and determines the pixel-level correction search point based on the rate-distortion cost of each initial pixel-level correction search point in the at least one initial pixel-level correction search point.

[0095] In an embodiment of the present application, the encoder may perform at least one macropixel-level search within a preset template range with the initial corrected search point as the center, and determine at least one initial macropixel-level search point corresponding to the at least one macropixel-level search. For the first macropixel-level search in the at least one macropixel-level search, the encoder searches within the range corresponding to the initial step size and determines one or more initial macropixel-level search points corresponding to the first macropixel-level search. The encoder increases the initial step size by a preset increment and performs the second macropixel-level search in the at least one macropixel-level search with the increased step size and determines one or more initial macropixel-level search points corresponding to the second macropixel-level search. Similarly, at least one macropixel-level search within the preset template range with an increasing step size is performed to determine at least one initial macropixel-level search point.

[0096] In an embodiment of the present application, for each of the at least one initial macro-pixel-level search points, the encoder performs at least one pixel-level search in its neighborhood to fine-tune each initial macro-pixel-level search point. Similar to S1021, the encoder performs at least one pixel-level search in the neighborhood of each initial macro-pixel-level search point, with each initial macro-pixel-level search point as the center. The encoder determines the optimal point for each pixel-level search based on the rate-distortion cost of the pixel point found in each pixel-level search, and updates the center point using the optimal point of each pixel-level search until the optimal point determined by a pixel-level search, i.e., the center point updated by a pixel-level search, is the same as the center point based on the previous search, and the center point is determined as the initial pixel-level correction point corresponding to each initial macro-pixel-level search point. Alternatively, until the number of searches reaches a first preset search number threshold, the initial pixel-level correction point corresponding to each initial macro-pixel-level search point is determined from the pixel points found in the at least one pixel-level search based on the rate-distortion cost. In this manner, at least one initial pixel-level correction point corresponding to at least one initial macro-pixel-level search point can be determined using the initial pixel-level correction point corresponding to each initial macro-pixel-level search point. The encoder determines the pixel-level correction search point from the at least one initial pixel-level correction point based on the rate-distortion cost. For example, the initial pixel-level correction point with the minimum rate-distortion cost among the at least one initial pixel-level correction point can be determined as the pixel-level correction search point.

[0097] Exemplarily, the preset template range can be a preset diamond or square template. Taking the diamond template as an example, as shown in FIG10 , the encoder takes the initial correction search point as the center, starts with a step size of 1 unit, and increases in the form of an integer power of 2. The encoder searches within the search range corresponding to the diamond template to determine multiple initial macro-pixel-level search points as shown in FIG10 . Here, the step size unit can be set to the macro-pixel spacing of the light field image. In order to improve the search fineness, the encoder performs a multi-step pixel-level search in the neighborhood of each initial macro-pixel-level search point (as shown in the dotted box in FIG10 ) to fine-tune each initial macro-pixel-level search point to obtain the initial pixel-level correction point corresponding to each initial macro-pixel-level search point. Here, the pixel-level search process is similar to the process in FIG8 and will not be repeated here. The encoder selects the pixel point with the smallest rate-distortion cost from all the initial pixel-level correction points as the pixel-level correction search point.

[0098] S202: Determine a macro-pixel-level search range according to the step size corresponding to the pixel-level corrected search point.

[0099] In the embodiment of the present application, when a pixel-level correction search point is determined, the encoder can determine a macro-pixel-level search range based on the step size corresponding to the pixel-level correction search point, so as to perform further macro-pixel-level search based on the pixel-level correction search point. Here, the step size corresponding to the pixel-level correction search point refers to the initial macro-pixel-level search point determined by the macro-pixel-level search based on which step size the pixel-level correction search point is determined by performing a further pixel-level search.

[0100] In some embodiments, when the step size corresponding to the pixel-level corrected search point is less than or equal to a preset step size threshold, a second number of macro pixels are determined in the neighborhood of the pixel-level corrected search point as the macro pixel-level search range; the second number of macro pixels are macro pixels that have not been searched.

[0101] In an embodiment of the present application, when the step size corresponding to the pixel-level correction search point is less than the preset step size threshold, it means that the pixel-level correction search point is close to the initial correction search point. In order to balance the search efficiency and accuracy, a second number of unsearched macro pixels can be determined in the neighborhood of the pixel-level correction search point as the macro pixel-level search range.

[0102] In some embodiments, when the step size corresponding to the pixel-level correction search point is greater than or equal to a preset step size threshold, a third number of macropixels is determined as the macropixel-level search range within a preset full search range centered on the pixel-level correction search point, where the second number is smaller than the third number.

[0103] In an embodiment of the present application, when the step size corresponding to the pixel-level correction search point is greater than the preset step size threshold, it means that the pixel-level correction search point is far away from the initial correction search point. To ensure the accuracy of the search, the encoder determines a third number of macro pixels as the macro pixel level search range within the preset full search range centered on the pixel-level correction search point.

[0104] S203 , performing a macro-pixel-level search in a macro-pixel-level search range with the pixel-level correction search point as the center, and determining a macro-pixel-level search point.

[0105] In some embodiments, the encoder searches in units of macro pixels within a macro pixel level search range determined according to a step size corresponding to the pixel level correction search point, with the pixel level correction search point as the center, to determine the macro pixel level search point.

[0106] Exemplarily, the preset step size threshold may be a step size of one unit. In the case where the step size corresponding to the pixel-level correction search point is 1, as shown in FIG11 , the second number may be 2. The encoder performs a two-point search in the neighborhood of the pixel-level correction search point in units of macropixels, and selects the macropixel with the smallest rate-distortion cost from the two searched macropixels as the macropixel-level search point. Here, the two searched macropixels are macropixels that have not been searched during the macropixel-level search process of S201. In the case where the step size corresponding to the pixel-level correction search point is greater than 1, as shown in FIG12 , the third number may be 8. The encoder performs a full macropixel-level search on the 8 pixels in the neighborhood of the pixel-level correction search point, and selects the macropixel with the smallest rate-distortion cost as the macropixel-level search point.

[0107] It is understandable that performing a macro-pixel level search based on the initial modified search point and performing pixel-level fine correction on the search point determined by the macro-pixel level search can further improve the search accuracy, thereby improving the motion estimation accuracy and encoding and decoding performance.

[0108] In some embodiments, based on either FIG. 7 or FIG. 9 , as shown in FIG. 13 , S103 includes: S1031 - S1032 as follows:

[0109] S1031 : Perform pixel-level search with the macro-pixel-level search point as the first center point, and update the first center point according to rate-distortion costs of a first number of pixel points determined from a neighborhood of the first center point.

[0110] In an embodiment of the present application, the encoder uses a macro-pixel-level search point as the first center point, performs a pixel-level search in the neighborhood of the macro-pixel-level search point on a pixel-by-pixel basis, determines a first number of pixels in the neighborhood of the first center point, and determines the pixel with the lowest rate-distortion cost as the optimal point based on the rate-distortion cost of each pixel in the first number of pixels. In some embodiments, the encoder may directly use the optimal point determined by performing a pixel-level search based on the macro-pixel-level search point as the pixel-level search point, or may use the optimal point determined by the pixel-level search to update the first center point, continue performing at least one pixel-level search, and continuously update the first center point in each pixel-level search of the at least one pixel-level search until the pixel-level search point is determined.

[0111] S1032. Continue to perform at least one pixel-level search based on the first center point, and update the first center point through each pixel-level search until the number of searches reaches a first preset search number threshold, and then determine the pixel-level search point from the searched pixel points according to the rate-distortion cost, or until the first center point updated by the current sub-pixel-level search is the same as the first center point of the previous pixel-level search, and then determine the first center point updated by the current sub-pixel-level search as the pixel-level search point.

[0112] In some embodiments, the encoder continues to perform at least one pixel search with the first center point as the center. Among the pixels obtained in each pixel-level search, the pixel with the lowest rate-distortion cost is selected as the new first center point, that is, the first center point is updated, and the next pixel-level search is performed based on the first center point. In this way, the first center point is continuously updated through each pixel-level search in the at least one pixel-level search until the optimal point selected in a pixel-level search is consistent with the previously selected point, that is, when the first center point updated in the current pixel-level search is the same as the first center point based on the previous pixel-level search, the first center point updated in the current pixel-level search is used as the pixel-level search point.

[0113] In some embodiments, the encoder continues to perform at least one pixel-level search based on the first center point, updates the first center point through each pixel-level search, and determines the pixel point with the smallest rate-distortion cost as the pixel-level search point from all pixel points searched through at least one pixel-level search based on the rate-distortion cost.

[0114] It can be understood that in the embodiment of the present application, pixel-level fine search is added on the basis of macro-pixel-level search, which more fully considers the local optimum point, further refines the search results, improves motion estimation performance, and thus improves encoding and decoding performance.

[0115] In some embodiments, based on the above-mentioned process of obtaining a pixel-level search point from an initial search point, in order to improve search accuracy, the encoder may further use the pixel-level search point as an updated initial search point, and perform at least one search based on the updated initial search point until the number of searches of at least one search reaches a second preset search number threshold, or, when the updated pixel-level search points determined by two adjacent searches are the same, use the motion vector corresponding to the updated pixel-level search point as the motion vector corresponding to the current block; wherein each search in the at least one search includes: a macro-pixel-level search and a pixel-level search; the macro-pixel-level search is used to determine an updated macro-pixel-level search point based on the updated initial search point; and the pixel-level search is used to determine an updated pixel-level search point based on the updated macro-pixel-level search point.

[0116] In an embodiment of the present application, the encoder may use the pixel-level search point determined by the above-mentioned process of S101-S103 as a new initial search point, i.e., an updated initial search point, and perform at least one search by repeating the method of S102-S1013. In each search, an updated macro-pixel-level search point is determined by the macro-pixel-level search process, and then an updated pixel-level search point is determined based on the updated macro-pixel-level search point by the pixel-level search process to further refine the search results. The search is stopped until the updated pixel-level search points obtained from two adjacent searches are the same, or the number of searches reaches a second preset search number threshold, and the motion vector corresponding to the finally obtained updated pixel-level search point is used as the motion vector corresponding to the current block.

[0117] It is understandable that continuing the macro-pixel-level preliminary search and pixel-level search correction based on the pixel-level search points can further refine the search results and improve the motion estimation performance and encoding and decoding performance.

[0118] In one embodiment of the present application, referring to FIG14 , a flowchart of a decoding method provided by an embodiment of the present application is shown. The method may include:

[0119] S301. Parse the code stream to determine the current block and the motion vector corresponding to the current block; the motion vector corresponding to the current block is determined by the encoder based on the pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on the initial search point determined by predicting the motion vector of the current block, and the macro-pixel-level search point is determined by performing a pixel-level search based on the macro-pixel-level search point.

[0120] S302: Determine a reference block corresponding to the current block based on the motion vector.

[0121] S303 : Perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.

[0122] In this embodiment of the present application, the decoder receives the code stream sent by the encoder and parses the code stream to determine the current block and the motion vector corresponding to the current block. Here, "current block" specifically refers to the decoded block currently undergoing inter-frame prediction. The motion vector corresponding to the current block is determined by the encoder through the macropixel-level search and pixel-level search processes described in the encoder embodiment, which will not be further described here.

[0123] It is understandable that the motion vector parsed by the decoder is determined by the encoder based on the pixel-level search point corresponding to the current block. The pixel-level search point is determined by performing a macro-pixel-level search based on the initial search point determined by motion vector prediction for the current block, determining the macro-pixel-level search point, and then performing a pixel-level search based on the macro-pixel-level search point. In other words, the embodiment of the present application adds a pixel-level refinement search based on the macro-pixel-level search determined by the macro-pixel-level search. This fully considers the local optimum, reduces the loss of the local optimum point, further refines the search results, improves motion estimation performance, and thus improves decoding performance.

[0124] Based on the implementation basis of the aforementioned embodiment, as shown in FIG15 , the embodiment of the present application provides a decoder 1, comprising:

[0125] The parsing section 10 is configured to parse the bitstream and determine a current block and a motion vector corresponding to the current block; the motion vector corresponding to the current block is determined by the encoder based on a pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by performing motion vector prediction on the current block, and performing a pixel-level search based on the macro-pixel-level search point.

[0126] A first determining part 11 is configured to determine a reference block corresponding to the current block based on the motion vector;

[0127] The prediction part 12 is configured to perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.

[0128] In the actual application of the present application, as shown in FIG16 , the embodiment of the present application further provides a decoder, including:

[0129] A first memory 14 and a first processor 15;

[0130] The first memory 14 stores a computer program that can be run on the first processor 15. When the first processor 15 executes the program, the video decoding method provided in the embodiment of the present application is implemented.

[0131] Among them, the first processor 15 can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application specific integrated circuits (ASICs), single or multiple general-purpose integrated circuits, single or multiple microprocessors, single or multiple programmable logic devices, or a combination of the aforementioned circuits or devices, or other suitable circuits or devices, so that the first processor 15 can execute the corresponding steps of the video decoding method provided in the embodiment of the present application.

[0132] It should be noted that the description of the above decoder embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the decoder embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.

[0133] Based on the implementation basis of the aforementioned embodiment, as shown in FIG17 , the embodiment of the present application provides an encoder 2, including:

[0134] The initial motion estimation section 20 is configured to perform motion vector prediction on the current block and determine an initial search point;

[0135] The search section 21 is configured to perform a macro-pixel level search based on the initial search point to determine a macro-pixel level search point; and perform a pixel level search based on the macro-pixel level search point to determine a pixel level search point;

[0136] The second determining part 22 is configured to determine the motion vector corresponding to the current block based on the pixel-level search point.

[0137] In some embodiments of the present application, the search part 21 is further configured to perform a pixel-level search based on the initial search point to determine an initial revised search point; and perform a macro-pixel-level search based on the initial revised search point to determine the macro-pixel-level search point.

[0138] In some embodiments of the present application, the search part 21 is further configured to perform a pixel-level search with the macro-pixel-level search point as the first center point, and update the first center point according to the rate-distortion cost of a first number of pixel points determined from the neighborhood of the first center point; continue to perform at least one pixel-level search based on the first center point, and update the first center point through each pixel-level search until the number of searches reaches a first preset search number threshold, and then determine the pixel-level search point from the searched pixel points according to the rate-distortion cost, or until the first center point updated by the current sub-pixel-level search is the same as the first center point of the previous pixel-level search, then determine the first center point updated by the current sub-pixel-level search as the pixel-level search point.

[0139] In some embodiments of the present application, the search part 21 is further configured to use the pixel-level search point as the updated initial search point, and perform at least one search based on the updated initial search point until the number of searches of the at least one search reaches a second preset search number threshold, or, when the updated pixel-level search points determined by two adjacent searches are the same, use the motion vector corresponding to the updated pixel-level search point as the motion vector corresponding to the current block; wherein each search in the at least one search includes: a macro-pixel level search and a pixel-level search; the macro-pixel level search is used to determine the updated macro-pixel level search point based on the updated initial search point; and the pixel-level search is used to determine the updated pixel-level search point based on the updated macro-pixel level search point.

[0140] In some embodiments of the present application, the search part 21 is further configured to perform a pixel-level search with the initial search point as the second center point, and update the second center point according to the rate-distortion cost of each pixel point in the first number of pixel points determined from the neighborhood of the second center point; continue to perform at least one pixel-level search based on the second center point, and update the second center point through each pixel-level search until the number of searches reaches a first preset search number threshold, and then determine the initial revised search point from the searched pixel points according to the rate-distortion cost, or until the second center point updated by the current sub-pixel level search is the same as the second center point of the previous pixel-level search, then determine the second center point determined by the current sub-pixel level search as the initial revised search point.

[0141] In some embodiments of the present application, the search part 21 is further configured to perform a macro-pixel level search based on the initial correction search point, and perform a pixel-level search based on at least one initial macro-pixel level search point determined by the macro-pixel level search to determine a pixel-level correction search point; determine a macro-pixel level search range based on a step size corresponding to the pixel-level correction search point; and perform a macro-pixel level search within the macro-pixel level search range with the pixel-level correction search point as the center to determine the macro-pixel level search point.

[0142] In some embodiments of the present application, the search part 21 is further configured to perform at least one macro-pixel level search within a preset template range with an increasing step size based on the initial correction search point, and determine at least one initial macro-pixel level search point corresponding to the at least one macro-pixel level search; perform a pixel-level search based on each initial macro-pixel level search point in the at least one initial macro-pixel level search point, and determine the initial pixel-level correction search point corresponding to each initial macro-pixel level search point, thereby determining at least one initial pixel-level correction search point corresponding to the at least one initial macro-pixel level search point; and determine the pixel-level correction search point according to the rate-distortion cost of each initial pixel-level correction search point in the at least one initial pixel-level correction search point.

[0143] In some embodiments of the present application, the search part 21 is further configured to determine a second number of macro pixels in the neighborhood of the pixel-level correction search point as the macro pixel-level search range when the step size corresponding to the pixel-level correction search point is less than or equal to a preset step size threshold; the second number of macro pixels are macro pixels that have not been searched; when the step size corresponding to the pixel-level correction search point is greater than the preset step size threshold, determine a third number of macro pixels within a preset full search range centered on the pixel-level correction search point as the macro pixel-level search range; the second number is less than the third number.

[0144] In some embodiments of the present application, the initial motion estimation part 20 is further configured to perform motion vector prediction on the current block to determine at least one candidate motion vector; determine the initial motion vector based on the rate-distortion cost of each candidate motion vector in the at least one candidate motion vector; and determine the initial search point based on the position corresponding to the initial motion vector.

[0145] In some embodiments of the present application, the encoder 2 also includes an encoding part, which is configured to determine the motion vector corresponding to the current block based on the pixel-level search point, and then determine the reference block corresponding to the current block based on the motion vector corresponding to the current block; perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block; continue to process the next block in the current image to obtain the motion vector and predicted image block corresponding to each block in the current image; determine the encoding information corresponding to the current image based on the motion vector and predicted image block corresponding to each block in the current image and write it into the code stream.

[0146] In practical applications, as shown in FIG18 , an embodiment of the present application further provides an encoder, including:

[0147] a second memory 25 and a second processor 26;

[0148] The second memory 25 stores a computer program that can be run on the second processor 26. When the second processor 26 executes the program, the video encoding method provided in the embodiment of the present application is implemented.

[0149] It should be noted that the description of the above encoder embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the encoder embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.

[0150] An embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded is determined based on a motion vector corresponding to a current block; the motion vector corresponding to the current block is determined based on a pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by motion vector prediction of the current block, and a pixel-level search is performed based on the macro-pixel-level search point to determine the macro-pixel-level search point.

[0151] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a first processor, the video decoding method provided by the embodiment of the present application is implemented; or, when the computer program is executed by a second processor, the video encoding method provided by the embodiment of the present application is implemented.

[0152] The various components in the embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of software functional modules.

[0153] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned computer-readable storage medium includes: ferromagnetic random access memory (FRAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface storage, optical disk, or compact disc read-only memory (CD-ROM), etc. Various media that can store program codes are not limited in the embodiments of the present disclosure.

[0154] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability

[0155] Embodiments of the present application provide a video encoding and decoding method, decoder, encoder, and computer-readable storage medium. The decoder parses the bitstream to determine the motion vector corresponding to the current block and the current block. The decoder then uses the motion vector to perform pixel value prediction and motion compensation on the current block, determining the predicted image block corresponding to the current block and implementing the decoding process for the current block. Here, the motion vector corresponding to the current block is determined by the encoder based on the pixel-level search points corresponding to the current block. The pixel-level search points are determined by performing a macro-pixel-level search based on the initial search points determined by motion vector prediction for the current block, determining the macro-pixel-level search points, and then performing a pixel-level search based on the macro-pixel-level search points. It can be seen that the embodiments of the present application add a pixel-level fine search to the macro-pixel-level search points determined based on the macro-pixel-level search, which can reduce the loss of local optimal points, further refine the search results, improve motion estimation performance, and thus improve decoding performance. Furthermore, since the spacing between macropixels in a light field image is difficult to ensure strict consistency, the embodiments of the present application introduce a pixel-level fine search based on the macro-pixel-level search results to further improve the robustness of the encoding.

Claims

1. A video decoding method, applied to a decoder, comprising: Parse the bitstream to determine a current block and a motion vector corresponding to the current block; The motion vector corresponding to the current block is determined by the encoder based on the pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by predicting the motion vector of the current block, determining the macro-pixel-level search point, and performing a pixel-level search based on the macro-pixel-level search point; Based on the motion vector, determining a reference block corresponding to the current block; Pixel value prediction and motion compensation are performed based on the reference block to determine a predicted image block corresponding to the current block.

2. A video encoding method, applied to an encoder, comprising: Perform motion vector prediction on the current block and determine the initial search point; Performing a macro-pixel level search based on the initial search point to determine a macro-pixel level search point; Perform pixel-level search based on the macro-pixel-level search point to determine the pixel-level search point; Based on the pixel-level search point, a motion vector corresponding to the current block is determined.

3. The method according to claim 2, wherein: The performing a macro-pixel level search based on the initial search point to determine the macro-pixel level search point includes: Perform pixel-level search based on the initial search point to determine an initial revised search point; A macro-pixel level search is performed based on the initial modified search point to determine the macro-pixel level search point.

4. The method according to claim 2 or 3, wherein: The performing pixel-level search based on the macro-pixel-level search point to determine the pixel-level search point includes: Performing a pixel-level search with the macro-pixel-level search point as a first center point, and updating the first center point according to rate-distortion costs of a first number of pixel points determined from a neighborhood of the first center point; Continue to perform at least one pixel-level search based on the first center point, and update the first center point through each pixel-level search until the number of searches reaches a first preset search number threshold, and then determine the pixel-level search point from the searched pixel points according to the rate-distortion cost, or, until the first center point updated by the current sub-pixel level search is the same as the first center point of the previous pixel-level search, determine the first center point updated by the current sub-pixel level search as the pixel-level search point.

5. The method according to claim 2, wherein: The determining, based on the pixel-level search point, a motion vector corresponding to the current block comprises: The pixel-level search point is used as an updated initial search point, and at least one search is performed based on the updated initial search point until the number of searches of the at least one search reaches a second preset search number threshold, or, when the updated pixel-level search points determined by two adjacent searches are the same, the motion vector corresponding to the updated pixel-level search point is used as the motion vector corresponding to the current block; wherein, Each search in the at least one search includes: a macro-pixel level search and a pixel level search; the macro-pixel level search is used to determine an updated macro-pixel level search point based on the updated initial search point; the pixel level search is used to determine an updated pixel level search point based on the updated macro-pixel level search point.

6. The method according to claim 3, wherein: The performing pixel-level search based on the initial search point to determine the initial modified search point includes: Performing a pixel-level search with the initial search point as a second center point, and updating the second center point according to a rate-distortion cost of each pixel point in a first number of pixel points determined from a neighborhood of the second center point; Continue to perform at least one pixel-level search based on the second center point, and update the second center point through each pixel-level search until the number of searches reaches a first preset search number threshold, and then determine the initial revised search point from the searched pixel points according to the rate-distortion cost, or until the second center point updated by the current sub-pixel level search is the same as the second center point of the previous pixel-level search, and then determine the second center point updated by the current sub-pixel level search as the initial revised search point.

7. The method according to claim 3 or 6, wherein: The performing a macro-pixel level search based on the initial modified search point to determine the macro-pixel level search point includes: Performing a macro-pixel level search based on the initial revised search point, and performing a pixel-level search based on at least one initial macro-pixel level search point determined by the macro-pixel level search to determine a pixel-level revised search point; Determining a macro pixel level search range according to the step size corresponding to the pixel level correction search point; Taking the pixel-level correction search point as the center, a macro-pixel-level search is performed in the macro-pixel-level search range to determine the macro-pixel-level search point.

8. The method according to claim 7, wherein: The performing of a macro-pixel level search based on the initial revised search point, and performing a pixel-level search based on at least one initial macro-pixel level search point determined by the macro-pixel level search, to determine a pixel-level revised search point, comprises: Based on the initial modified search point, perform at least one macro-pixel level search within a preset template range with an increasing step size to determine at least one initial macro-pixel level search point corresponding to the at least one macro-pixel level search; Performing a pixel-level search based on each of the at least one initial macro-pixel-level search points to determine an initial pixel-level correction search point corresponding to each of the initial macro-pixel-level search points, thereby determining at least one initial pixel-level correction search point corresponding to the at least one initial macro-pixel-level search point; The pixel-level correction search point is determined according to the rate-distortion cost of each initial pixel-level correction search point in the at least one initial pixel-level correction search point.

9. The method according to claim 7, wherein: The step of determining the macro pixel level search range according to the step size corresponding to the pixel level corrected search point includes: When the step size corresponding to the pixel-level correction search point is less than or equal to the preset step size threshold, a second number of macro pixels is determined in the neighborhood of the pixel-level correction search point as the macro pixel level search range; the second number of macro pixels are macro pixels that have not been searched; When the step size corresponding to the pixel-level correction search point is greater than the preset step size threshold, a third number of macro pixels is determined within the preset full search range centered on the pixel-level correction search point as the macro pixel level search range; the second number is smaller than the third number.

10. The method according to claim 4, wherein: The step of performing motion vector prediction on the current block and determining an initial search point includes: Performing motion vector prediction on the current block to determine at least one candidate motion vector; determining an initial motion vector according to a rate-distortion cost of each candidate motion vector among the at least one candidate motion vector; The initial search point is determined according to a position corresponding to the initial motion vector.

11. The method according to any one of claims 2, 3, or 10, wherein: After determining the motion vector corresponding to the current block based on the pixel-level search point, the method further includes: Determine a reference block corresponding to the current block based on a motion vector corresponding to the current block; Perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block; Continue to process the next block in the current image to obtain the motion vector and predicted image block corresponding to each block in the current image; According to the motion vector corresponding to each block in the current image and the predicted image block, the encoding information corresponding to the current image is determined and written into the bitstream.

12. A decoder comprising: A parsing part, configured to parse the bitstream to determine a current block and a motion vector corresponding to the current block; The motion vector corresponding to the current block is determined by the encoder based on the pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by predicting the motion vector of the current block, determining the macro-pixel-level search point, and performing a pixel-level search based on the macro-pixel-level search point; A first determining part is configured to determine a reference block corresponding to the current block based on the motion vector; The prediction part is configured to perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block.

13. An encoder, comprising: An initial motion estimation part, configured to perform motion vector prediction on the current block and determine an initial search point; A searching part configured to perform a macro-pixel level search based on the initial search point to determine a macro-pixel level search point; Perform pixel-level search based on the macro-pixel-level search point to determine the pixel-level search point; The second determining part is configured to determine the motion vector corresponding to the current block based on the pixel-level search point.

14. A decoder comprising: a first memory and a first processor; The first memory stores a computer program that can be run on the first processor, and the first processor executes the program The method of claim 1 is implemented in sequence.

15. An encoder comprising: a second memory and a second processor; The second memory stores a computer program that can be run on the second processor, and the second processor implements the method according to any one of claims 2 to 11 when executing the program.

16. A code stream, the code stream being generated by bit encoding according to information to be encoded; wherein, The information to be encoded is determined based on a motion vector corresponding to a current block; the motion vector corresponding to the current block is determined based on a pixel-level search point corresponding to the current block; the pixel-level search point is determined by performing a macro-pixel-level search based on an initial search point determined by predicting the motion vector of the current block, and a pixel-level search is performed based on the macro-pixel-level search point to determine the macro-pixel-level search point.

17. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a first processor, the method described in claim 1 is implemented; or when the computer program is executed by a second processor, the method described in any one of claims 2 to 11 is implemented.

Citation Information

Patent Citations

  • Image decoding device, image decoding method, and program

    JP2022103308A

  • Iterative Grid-Pattern Motion Search

    US20120281760A1

  • Video coding method, video decoding method, video coding apparatus, and video decoding apparatus

    US20180131960A1

  • Method and device for video signal processing

    US20200154135A1

  • Image encoding / decoding method and device, and recording medium in which bitstream is stored

    US20210195227A1

Cited By

  • Motion estimation method, device, equipment, medium and product

    CN119520819A

  • Motion estimation method, electronic device, and storage medium

    US12804187B2