Encoding method, encoder and storage medium

By combining macropixel-level and conventional pixel-level searches to optimize motion vectors in light field image coding, the problem of poor light field camera image compression is solved and the motion estimation performance and encoder robustness are improved.

WO2024216412A1PCT designated stage expired Publication Date: 2024-10-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/088555
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

The special imaging model of light field cameras causes traditional video compression methods to be ineffective when processing light field images, and the motion estimation effect of light field images is not ideal.

Method used

An encoding method is adopted to determine the first motion vector of the current block, and use this as a starting point to perform macro-pixel level search and conventional pixel-level search, and combine the two to optimize the motion vector to improve the motion estimation effect of light field images and Encoder robustness.

Benefits of technology

By adding conventional pixel-level fine search on the basis of macro-pixel level search, local optimal points are more fully considered, motion estimation performance and encoder robustness are improved, and the compression effect of light field images is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023088555_24102024_PF_FP_ABST
    Figure CN2023088555_24102024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an encoding method, an encoder and a storage medium. The method comprises: determining a first motion vector of a current block; taking a pixel point indicated by the first motion vector as a first starting point, and performing macro-pixel-level searching using a macro-pixel-level search step, to determine a second motion vector of the current block; taking a pixel point indicated by the second motion vector as a second starting point, and performing regular-pixel-level searching by means of using a regular-pixel-level search step, to determine a third motion vector of the current block; determining an optimized motion vector of the current block according to the third motion vector. In this way, regular-pixel-level fine searching is combined with macro-pixel-level searching to perform pixel-level offset correction on positions of candidate reference blocks identified by the macro-pixel-level search, so that correlation with the current block increases to a greater extent, thereby further improving motion estimation performance of an encoded light field image, and improving encoder robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Coding method, encoder and storage medium Technical Field

[0001] The embodiments of the present application relate to the field of video coding and decoding technology, and specifically to an encoding method, an encoder, and a storage medium. Background Art

[0002] The imaging model of a light field camera adds a set of microlens arrays in front of the imaging plane. This allows light from the same point on the object plane to be captured by multiple microlenses at the same time, which is equivalent to photographing the same point from multiple angles at the same time.

[0003] Due to the unique imaging model of light field cameras, the visual effects of light field images differ significantly from those of regular images. This also results in traditional image or video compression methods being ineffective when processing light field images or videos.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide an encoding method, an encoder, and a storage medium, which can improve the motion estimation effect of light field images and improve the robustness of the encoder.

[0006] The technical solution of the embodiment of the present application can be implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:

[0008] determining a first motion vector of the current block;

[0009] Taking the pixel point pointed to by the first motion vector as a first starting point, performing a macro-pixel level search with a macro-pixel level search step to determine a second motion vector of the current block;

[0010] Taking the pixel point pointed to by the second motion vector as a second starting point, performing a regular pixel-level search with a regular pixel-level search step size to determine a third motion vector of the current block;

[0011] An optimal motion vector for the current block is determined according to the third motion vector.

[0012] In a second aspect, an embodiment of the present application provides an encoder, which includes a determination unit and a search unit; wherein,

[0013] The determining unit is configured as a determining unit and a searching unit; wherein:

[0014] The determining unit is configured to determine a first motion vector of the current block;

[0015] The search unit is configured to use the pixel point pointed to by the first motion vector as a first starting point, perform a macro-pixel level search with a macro-pixel level search step, and determine a second motion vector of the current block;

[0016] The search unit is further configured to use the pixel point pointed to by the second motion vector as a second starting point, perform a regular pixel-level search with a regular pixel-level search step size, and determine a third motion vector of the current block;

[0017] The determining unit is further configured to determine an optimal motion vector for the current block according to the third motion vector.

[0018] In a third aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,

[0019] a first memory for storing a computer program capable of running on the first processor;

[0020] The first processor is configured to execute the method according to the first aspect when running a computer program.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method described in the first aspect.

[0022] An embodiment of the present application provides an encoding method, an encoder, and a storage medium. The method includes: determining a first motion vector of a current block; using the pixel pointed to by the first motion vector as a first starting point, performing a macro-pixel-level search with a macro-pixel-level search step to determine a second motion vector of the current block; using the pixel pointed to by the second motion vector as a second starting point, performing a regular pixel-level search with a regular pixel-level search step to determine a third motion vector of the current block; and determining an optimal motion vector for the current block based on the third motion vector. In this manner, a regular pixel-level fine search is added to the macro-pixel-level search, and pixel-level offset correction is performed on the candidate reference block positions found by the macro-pixel-level search to increase their correlation with the current block, thereby further optimizing the motion estimation effect of the encoded light field image and improving the robustness of the encoder. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0024] FIG1 is a schematic diagram of a light field image according to an embodiment of the present application;

[0025] FIG2 is a schematic diagram of an application scenario of an embodiment of the present application;

[0026] FIG3 is a schematic block diagram of an encoder provided in an embodiment of the present application;

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

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

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

[0030] FIG7 is a schematic diagram of a diamond template in a macro-pixel-level fast search process according to an embodiment of the present application;

[0031] FIG8 is a schematic diagram of a square template in a macro-pixel-level fast search process according to an embodiment of the present application;

[0032] FIG9 is a first schematic diagram of a macro-pixel level fine search process according to an embodiment of the present application;

[0033] FIG10 is a second schematic diagram of a macro-pixel-level fine search process according to an embodiment of the present application;

[0034] FIG11 is a schematic diagram of a conventional pixel-level search process in an embodiment of the present application;

[0035] FIG12 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0036] FIG13 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

[0037] FIG14 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0040] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0041] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0042] In video images, a coding block (CB) is generally represented by a first image component, a second image component, and a third image component. These three image components are a luminance component, a blue chrominance component, and a red chrominance component. Specifically, the luminance component is typically represented by the symbol Y, the blue chrominance component is typically represented by the symbols Cb or U, and the red chrominance component is typically represented by the symbols Cr or V. Thus, video images can be represented in either the YCbCr or YUV format.

[0043] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0044] Moving Picture Experts Group (MPEG)

[0045] International Standardization Organization (ISO)

[0046] International Electrotechnical Commission (IEC)

[0047] Joint Video Experts Team (JVET)

[0048] Alliance for Open Media (AOM)

[0049] Lenslet video coding (LVC)

[0050] Next-generation video coding standard H.266 / Versatile Video Coding (VVC)

[0051] VVC Test Model (VTM)

[0052] Audio Video Standard (AVS)

[0053] AVS High-Performance Model (HPM)

[0054] Transform coefficients

[0055] Quantization Parameter

[0056] Motion Vector (MV) is also called motion vector

[0057] Context-based Adaptive Variable-Length code (CAVLC)

[0058] Context-based Adaptive Binary Arithmetic Coding (CABAC)

[0059] Scan Region based Coefficient Coding (SRCC)

[0060] Digital video compression technology is understood to primarily compress massive amounts of digital video data for easier transmission and storage. With the surge in Internet video usage and increasing demand for higher-quality video, while existing digital video compression standards can conserve significant video data, there remains a need for improved digital video compression technologies to reduce bandwidth and traffic pressures associated with digital video transmission.

[0061] Unlike conventional camera imaging models, light field cameras incorporate an array of microlenses 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 traditional images. This also results in poor performance for compression methods used for conventional images or videos. The MPEG LVC working group is researching compression methods more suitable for light field videos.

[0062] Light field images are composed of a series of regularly arranged macropixels, as shown in Figure 1. According to the imaging principle of light field cameras, there is a strong correlation between adjacent macropixels. Therefore, during the motion estimation search process, compared with the conventional pixel-based method, the macropixel-based search method can make more full use of the correlation of light field images, thereby achieving more efficient compression performance. However, searching only in macropixel units may miss some local optimal points. Considering that the matching blocks may move across macropixels between different frames, and there are also differences in parallax and size between adjacent macropixels, the best candidates for matching blocks may not be strictly arranged according to the macropixel spacing.

[0063] Figure 2 is a schematic diagram of an application scenario of an embodiment of the present application. Multiple cameras or a multi-camera array capture light field video and output light field video data. The encoder compresses and transmits the data to the decoder. The decoder decompresses the light field video data and displays it. The codec can use existing video codec tools (e.g., AVC, HEVC, or VVC).

[0064] Referring to Figure 3, which shows a schematic block diagram of the composition of an encoder provided in an embodiment of the present application. As shown in Figure 3, the encoder (specifically, a "video encoder") 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 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 101, 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 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding on the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is the process of generating a motion vector, which can estimate the motion of the video coding block. The motion compensation unit 104 then calculates the motion vector based on the motion vector determined by the motion estimation unit 105. After determining the intra-frame prediction mode, the intra-frame prediction unit 103 is further configured to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block and reconstruct a residual block in the pixel domain. The reconstructed residual block is subjected to the filter control analysis unit 107 and the filtering unit 108 to remove the block effect artifacts. The reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the code stream of the video signal. The decoded image buffer unit 110 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 110 .

[0065] Referring to Figure 4 , which shows a schematic block diagram of a decoder provided in an embodiment of the present application, as shown in Figure 4 , the decoder (specifically, a "video decoder") 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206. The decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal is encoded as shown in FIG3 , a code stream of the video signal is output; the code stream is input to the decoder 200 and first passes through the decoding unit 201 to obtain decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 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 frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses The prediction information is used to generate a predictive block for 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 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove blocking artifacts, thereby improving video quality; the decoded video block is then stored in the decoded image buffer unit 206, which stores reference images used for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal, thereby obtaining the restored original video signal.

[0066] Furthermore, the embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder, wherein FIG5 shows a schematic diagram of a network architecture of a coding and decoding system provided by the embodiment of the present application. As shown in FIG5 , 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 are not specifically limited here. In addition, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.

[0067] It should be noted that the method of the embodiment of the present application is mainly applied to the motion estimation unit 105 part of the inter-frame prediction as shown in Figure 3. The motion estimation unit 105 obtains the motion vector, the motion compensation unit 104 performs motion compensation based on the motion vector determined by the motion estimation unit 105, the encoding unit 109 encodes the motion vector data, and the motion compensation unit 204 of the decoder decodes the motion vector data for motion compensation.

[0068] It should also be noted that, when applied to the motion estimation unit 105, the "current block" specifically refers to the coding block currently to be inter-frame predicted.

[0069] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.

[0070] 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. As shown in FIG6 , the method may include:

[0071] S601: Determine a first motion vector of the current block;

[0072] It should be noted that the pixel point pointed to by the first motion vector is the starting point of a macro-pixel level search, which is used to locate the candidate reference block of the current block.

[0073] In some embodiments, the method further includes: constructing a motion vector candidate list, and determining a first motion vector. The first motion vector may be a motion vector in the motion vector candidate list.

[0074] Exemplarily, the first motion vector may be a motion vector corresponding to a minimum rate-distortion cost value in a motion vector candidate list. Specifically, determining the first motion vector of the current block includes: constructing a motion vector candidate list; searching the motion vector candidate list to determine a rate-distortion cost value corresponding to each motion vector; and determining the motion vector corresponding to the minimum rate-distortion cost value as the first motion vector.

[0075] In some embodiments, the method further includes: before performing the first macro-pixel level search, constructing a motion vector candidate list and determining a first motion vector.

[0076] For example, the initial search point is determined based on the HEVC AMVP technology: among the candidate MVs given by AMVP, the encoder selects the MV with the lowest rate-distortion cost and uses the position pointed by the MV as the initial search point.

[0077] In some embodiments, if the macro-pixel level search is performed twice or more, the first motion vector may be the second motion vector obtained in the previous macro-pixel level search.

[0078] In some embodiments, if the macro-pixel level search and the regular pixel level search are performed more than twice, the first motion vector may be the third motion vector obtained in the last regular pixel level search.

[0079] S602: Using the pixel pointed to by the first motion vector as a first starting point, performing a macro-pixel level search with a macro-pixel level search step to determine a second motion vector of the current block;

[0080] In some embodiments, the macropixel-level search step size includes a macropixel-level horizontal step size and a macropixel-level vertical step size. In practical applications, the macropixel-level horizontal step size is greater than or equal to 0, and the macropixel-level vertical step size is greater than or equal to 0. The macropixel-level horizontal step size can be an integer multiple of the macropixel horizontal size, and the macropixel-level vertical step size can be an integer multiple of the macropixel vertical size. In some embodiments, the macropixel-level horizontal step size can also be expressed as an integer multiple of the macropixel horizontal spacing, and the macropixel-level vertical step size can also be expressed as an integer multiple of the macropixel vertical spacing.

[0081] It should be noted that the macro-pixel level search process with a macro-pixel level search step can be to start from a first starting point, search with a macro-pixel level search step, determine the rate-distortion cost value when predicting using the candidate reference block pointed to by each search point, determine the search point corresponding to the minimum rate-distortion cost value, and use the motion vector of the point as the second motion vector.

[0082] The macro-pixel level search process may be implemented based on any one or more search algorithms, for example, a full search algorithm, a three-step search algorithm, a four-step search algorithm, a diamond search algorithm, a square search algorithm, a regular hexagon search algorithm, a regular octagon search algorithm, and the like.

[0083] In some embodiments, the macro-pixel level search process may include a fast search, which may also be understood as a coarse search. The macro-pixel level search process may include a fine search.

[0084] In some embodiments, the macro-pixel level search process may include a fast search and a fine search. Exemplarily, the macro-pixel level search process includes: starting from a first starting point, performing a macro-pixel level fast search with a first macro-pixel level search step size to determine a first search point; starting from the first search point, performing a macro-pixel level fine search with a second macro-pixel level search step size to determine a second search point; wherein the first macro-pixel level search step size is greater than or equal to the second macro-pixel level search step size; and using the motion vector corresponding to the second search point as the second motion vector.

[0085] It should be noted that during the fast search, the first macropixel-level search step size remains unchanged or changes. During the fine search, the second macropixel-level search step size remains unchanged or changes. In other words, the first macropixel-level search step size and the second macropixel-level search step size are not used to limit a specific macropixel-level search step size.

[0086] For example, the motion vector search step size is set to a multiple of the light field macro pixel spacing, as shown in formula (1):

[0087] Where, d x and d y is the motion vector offset in this iteration, d x is the horizontal motion vector offset, and d y is the vertical motion vector offset, d x , and d y , is the motion vector offset in the previous iteration, ΔstepX and ΔstepY are the search steps added in this iteration, and L x1 and L y1 The step length of each step can also be understood as the step unit. When searching at the macro pixel level, the step unit is set to the size of a light field macro pixel, including the size in the horizontal and vertical directions. It should be noted that when searching at the macro pixel level, the step unit can also be set to the spacing of a light field macro pixel, including the spacing in the horizontal and vertical directions. L x1 ×ΔstepX and L y1 ×ΔstepY is the increase in the motion vector offset in this iteration, which can also be understood as the search step size increased in this iteration.

[0088] In some embodiments, the fast search process may include: starting with a first macro-pixel-level search step size from one macro-pixel, and increasing by an integer power of 2, searching according to a search template, and determining a rate-distortion cost value for each search point; and determining the search point corresponding to the minimum rate-distortion cost value as the first search point.

[0089] Exemplarily, the first macro-pixel level search step starts with a macro-pixel unit (or a macro-pixel spacing), increases by an integer power of 2, and searches within a specified search range according to the search template.

[0090] In some embodiments, the search template includes one of the following: a diamond template, a square template, a regular hexagonal template, a regular octagonal template, etc.

[0091] Figure 7 is a schematic diagram of a diamond template for the macro-pixel-level fast search process in an embodiment of the present application. As shown in Figure 7, the initial search point is the starting point, the search step size starts at 1 unit, and increases in integer powers of 2. The search is performed within the specified search range according to the diamond template, and the search point with the lowest rate-distortion cost is selected as the result of this step. The step size unit here is set to the macro-pixel spacing of the light field image.

[0092] It should be noted that the box corresponding to each search point in Figure 7 can be understood as a candidate reference block of the current block, the search point is the upper left corner pixel of the candidate reference block, and the box is only used to schematically indicate the position of the search point and represent the size of the candidate reference block.

[0093] Figure 8 is a schematic diagram of a square template used in the macro-pixel-level fast search process in an embodiment of the present application. As shown in Figure 8 , the initial search point is the starting point, the search step size starts at 1 unit, and increases in integer powers of 2. The search is performed within the specified search range according to the square template, and the search point with the lowest rate-distortion cost is selected as the result of this step. The step size unit here is set to the macro-pixel spacing of the light field image.

[0094] It should be noted that the shape of the macro pixel is not limited to a circle, but can also be a square, a regular hexagon, a regular octagon, etc.

[0095] In some embodiments, the fine search process includes: in the fast search process, determining the search step corresponding to the first search point; when the search step corresponding to the first search point is less than or equal to the first step threshold, searching the two unsearched points closest to the first search point in the search template with a second macro-pixel level search step, and determining the point corresponding to the minimum rate distortion cost value as the second search point; when the search step corresponding to the first search point is greater than the second step threshold, performing a full search in units of macro-pixels within the first search range with the first search point as the center point, and determining the search point corresponding to the minimum rate distortion cost value as the second search point; wherein the second step threshold is greater than or equal to the first step threshold.

[0096] In some embodiments, the first search range includes the first search point and a plurality of adjacent points therearound. Exemplarily, the first search range is an M×M search range, and the first search range is fully searched to determine the search point corresponding to the minimum rate distortion cost value as the second search point.

[0097] It should be noted that the first step length threshold and the second step length threshold are also at the macropixel level. In some embodiments, the first step length threshold and the second step length threshold are equal, and both are one macropixel unit. In some embodiments, the first step length threshold and the second step length threshold are not equal. For example, the first step length threshold can be one macropixel unit, and the second step length threshold can be two macropixel units.

[0098] In some embodiments, the second macro-pixel level search step size is one macro-pixel unit.

[0099] In some embodiments, the first search range includes an M×M search range centered on the first search point, where M is greater than or equal to 3. It should be noted that the first search range is also determined in units of macropixels, and can also be understood as M×M macropixels centered on the macropixel where the first search point is located.

[0100] Figure 9 is a first schematic diagram of the macro-pixel-level fine search process in an embodiment of the present application. As shown in Figure 9, if the optimal point of the fast search corresponds to a step size of 1, a two-point search is performed around the point, and the search point with the lowest rate-distortion cost is selected as the result of the fine search. The search step size here is in macro-pixels. If a diamond template is used, the optimal point may be the pixel points corresponding to the four boxes in Figure 9. The upper point is the optimal point, and the search for points a and b continues. If a square template is used, the optimal point may be the eight adjacent points around the center point. Assuming that the point in the upper left corner is the optimal point, the search for points a and c continues.

[0101] Figure 10 is a second schematic diagram of the macro-pixel-level fine search process in an embodiment of the present application. As shown in Figure 10, if the step size corresponding to the optimal point of the rapid search is greater than a certain threshold (e.g., 1, 2, 4, etc.), a full search is performed within a certain search range (e.g., an M×M search range) centered on that point, and the search point with the lowest rate-distortion cost is selected as the result of the fine search. The search step size here is also in macro-pixels.

[0102] In some embodiments, the macro-pixel-level search process further includes: when the search step size corresponding to the first search point is greater than the first step size threshold and less than or equal to the second step size threshold, no macro-pixel-level fine search is performed, and the motion vector corresponding to the first search point is used as the second motion vector. It should be noted that in this case, the first step size threshold is less than the second step size threshold. When the search step size corresponding to the first search point is greater than the first step size threshold and less than or equal to the second step size threshold, the first search point is directly used as the result of the macro-pixel-level search without performing a fine search.

[0103] In some embodiments, the macro-pixel level search may also be based on a conventional TZsearch algorithm.

[0104] Furthermore, a conventional pixel-level search is performed with the pixel point determined by the macro-pixel-level search as the second starting point, and a pixel-level offset correction is performed on the search point obtained based on the macro-pixel-level search.

[0105] S603: Using the pixel pointed to by the second motion vector as a second starting point, performing a regular pixel-level search with a regular pixel-level search step to determine a third motion vector of the current block;

[0106] It should be noted that a regular pixel can be understood as a single pixel that makes up a pixel array, while a macropixel includes multiple regular pixels. The pixel point pointed to by the second motion vector is the starting point of a regular pixel-level search, which is used to locate the candidate reference block of the current block. Because a macropixel includes multiple regular pixels in the horizontal and vertical dimensions, the regular pixel-level search step size is smaller than the macropixel-level search step size. Compared with the macropixel-level search, the regular pixel-level search is a fine-grained search.

[0107] In some embodiments, the conventional pixel-level search step size includes a conventional pixel-level horizontal step size and a conventional pixel-level vertical step size. In practical applications, the conventional pixel-level horizontal step size is greater than or equal to 0, and the conventional pixel-level vertical step size is greater than or equal to 0. The conventional pixel-level horizontal step size is an integer multiple of the conventional pixel horizontal size, and the conventional pixel-level vertical step size is an integer multiple of the conventional pixel vertical size. In some embodiments, the conventional pixel-level horizontal step size can also be expressed as an integer multiple of the macropixel horizontal spacing, and the conventional pixel-level vertical step size can also be expressed as an integer multiple of the conventional pixel vertical spacing.

[0108] It should be noted that the regular pixel-level search process with a regular pixel-level search step size can be to start from the second starting point, search with a regular pixel-level search step size, determine the rate-distortion cost value when predicting using the candidate reference block pointed to by each search point, determine the search point corresponding to the minimum rate-distortion cost value, and use the motion vector of the point as the third motion vector.

[0109] For example, the motion vector search step size is set to a multiple of the normal pixel spacing, as shown in formula (2):

[0110] Where, d x and d y is the motion vector offset in this iteration, d x is the horizontal motion vector offset, and d y is the vertical motion vector offset, d x , and d y , is the motion vector offset in the previous iteration, ΔstepX and ΔstepY are the search steps added in this iteration, and L x2 and L y2The step size of each step can also be understood as the step unit. During conventional pixel-level search, the step unit is set to a conventional pixel size, including the size in the horizontal and vertical directions. It should be noted that during conventional pixel-level search, the step unit can also be set to a conventional pixel spacing, including the spacing in the horizontal and vertical directions.

[0111] In some embodiments, the conventional pixel-level search process may include a fast search, which may also be understood as a coarse search. The conventional pixel-level search process may include a fine search. In some embodiments, the conventional pixel-level search process may include a fast search and a fine search.

[0112] That is, during the conventional pixel-level search process, the conventional pixel-level search step may be a fixed value or a variable. For example, the conventional pixel-level search step may be a conventional pixel unit.

[0113] In some embodiments, the conventional pixel-level search process includes: searching for adjacent points within a second search range with the second starting point as the center point, and determining a third search point corresponding to the minimum rate-distortion cost value; searching for adjacent points within the second search range with the third search point as the center point, and determining a fourth search point corresponding to the minimum rate-distortion cost value; when the second starting point and the fourth search point are the same, determining the motion vector of the second starting point as the third motion vector; when the second starting point and the fourth search point are not the same, searching for adjacent points within the second search range with the fourth search point as the center point, until the search point determined for the i-th time and the search point determined for the i+2-th time are the same, and determining the motion vector of the search point determined for the i-th time as the third motion vector.

[0114] It is understood that the second search range includes each search point and multiple adjacent points around it. Exemplarily, the second search range is an N×N search range, and adjacent points within the second search range are searched to determine the search point corresponding to the minimum rate distortion cost value as the second search point.

[0115] In some embodiments, the conventional pixel-level search process further includes: initializing a first search count; after each search, the first search count is incremented by 1; when the first search count is equal to the first count threshold, the motion vector of the search point corresponding to the minimum rate-distortion cost value in the conventional pixel-level search process is used as the third motion vector. It should be noted that a search count threshold can also be set for the conventional pixel-level search. When the search count reaches a certain threshold, the search is terminated early, and the optimal point with the minimum rate-distortion cost is used as the result of the conventional pixel-level search. It should be noted that the search performed each time the center point is moved during the conventional pixel-level search process can be understood as a search process.

[0116] The pixel point pointed to by the second motion vector obtained in S602 is used as the center point, and a multi-step pixel-level fine search is performed in the neighborhood around the point. For example, eight pixel points within the area of ​​the point are searched, and the optimal point with the lowest rate-distortion cost is selected from them. This optimal point is used as the new center point, and the same pixel-level fine search in the neighborhood is performed again. When the optimal point selected in a search is consistent with the previously selected point, the optimal point is used as the result of this step; when the number of searches reaches a certain threshold, the search is terminated early, and the optimal point with the lowest rate-distortion cost is used as the result of this step. Figure 11 is a schematic diagram of the conventional pixel-level search process in an embodiment of the present application. As shown in Figure 11, pixel point "0" is the initial pixel point, and the eight surrounding pixel points are searched with it as the center to obtain the optimal pixel point "1"; the same eight-point search is performed with "1" as the center to obtain "2"; and so on to obtain "3"; finally, with "3" as the center, "2" is obtained, which is consistent with the previously selected point, so the motion vector corresponding to pixel point "2" is the result of this step.

[0117] In other embodiments, the conventional pixel-level search process includes: performing a full search in units of conventional pixels within a second search range with the second starting point as the center point, and determining a third search point corresponding to the minimum rate distortion cost value; when the second starting point and the third search point are the same, determining the motion vector of the second starting point as the third motion vector; when the second starting point and the third search point are not the same, performing a full search in units of conventional pixels within the second search range with the third search point as the center point, until the search point determined for the i-th time is the same as the search point determined for the i+1-th time, and determining the motion vector of the search point determined for the i-th time as the third motion vector.

[0118] It is understood that the second search range includes each search point and its surrounding adjacent points. Exemplarily, the second search range is an N×N search range. A full search is performed within the second search range, and the search point corresponding to the minimum rate-distortion cost value is determined as the second search point. It should be noted that the second search range is determined in units of regular pixels.

[0119] The pixel point pointed by the second motion vector obtained in S602 is used as the center point, and a full search is performed in the neighborhood around this point. For example, a full search is performed within a 3×3 search range, and the optimal point with the lowest rate-distortion cost is selected, and this optimal point is used as the new center point to perform a pixel-level fine search in the same neighborhood again. When the optimal point selected in a certain search is consistent with the previously selected point, the optimal point is used as the result of this step; when the number of searches reaches a certain threshold, the search is terminated early, and the optimal point with the lowest rate-distortion cost is used as the result of this step. For example, taking Figure 11 as an example, pixel point "0" is the initial pixel point, and a full search is performed with it as the center to obtain the optimal pixel point "1"; the same search is performed with "1" as the center to obtain "2"; the same search is performed with "2" as the center to obtain "2"; it is consistent with the previously selected point, so the motion vector corresponding to pixel point "2" is the result of this step.

[0120] S604: Determine the optimal motion vector of the current block according to the third motion vector.

[0121] In some embodiments, the method further includes: after the regular pixel-level search is completed, using the third motion vector obtained in the regular pixel-level search as the new first motion vector, performing the next macro-pixel-level search and the next regular pixel-level search, and determining the third motion vector obtained in the next regular pixel-level search;

[0122] Determining the best motion vector of the current block according to the third motion vector includes: when the third motion vector obtained by the current regular pixel-level search is the same as the third motion vector obtained by the next regular pixel-level search, ending the search and determining the best motion vector of the current block.

[0123] It should be noted that S601 to S603 can be understood as one search process, wherein a third motion vector is determined in each search process. If the points found in two consecutive searches are the same, S601 to S603 are repeated. The search ends when the points found in two consecutive searches are the same, i.e., the third motion vectors are the same, and the third motion vector is used as the optimal motion vector.

[0124] In some embodiments, the method further includes: before performing the first macro-pixel level search, initializing a second search count; after each macro-pixel level search and regular pixel level search, the second search count is incremented by 1;

[0125] Determining the best motion vector of the current block according to the third motion vector includes: when the second search times is equal to the second search times threshold, the search ends, and the third motion vector obtained by the last conventional pixel-level search is used as the best motion vector of the current block.

[0126] It should be noted that a second search times threshold may be set for the entire search process. When the second search times reaches a certain threshold, the search is terminated early, and the last search result is used as the final search result.

[0127] In some embodiments, the method further includes: determining a motion vector prediction value for the current block; determining a motion vector residual value for the current block based on the motion vector prediction value and the optimal motion vector of the current block; encoding the motion vector residual value for the current block and writing the resulting coded bits into a bitstream. The decoder decodes the bitstream to determine the motion vector residual value for the current block, performs motion compensation, determines a motion vector prediction value, and determines the motion vector of the current block based on the motion vector prediction value and the motion vector residual value for the current block.

[0128] Using the above encoding method, a conventional pixel-level fine search is added to the macro-pixel level search, which more fully considers the local optimal point, further refines the search results, and improves the motion estimation performance. The spacing between macro-pixels in the light field image is difficult to ensure strict consistency, and the introduction of pixel-level fine search improves the robustness to this.

[0129] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG12 , which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in FIG12 , the encoder 120 may include a determination unit 1201 and a search unit 1202; wherein,

[0130] A determining unit 1201 is configured to determine a first motion vector of a current block;

[0131] The search unit 1202 is configured to use the pixel pointed to by the first motion vector as a first starting point, perform a macro-pixel-level search with a macro-pixel-level search step, and determine a second motion vector of the current block;

[0132] The search unit 1202 is further configured to use the pixel pointed to by the second motion vector as a second starting point, perform a regular pixel-level search with a regular pixel-level search step size, and determine a third motion vector of the current block;

[0133] The determining unit 1201 is further configured to determine an optimal motion vector of the current block according to the third motion vector.

[0134] In some embodiments, the search unit 1202 is configured to start from a first starting point, perform a macro-pixel level fast search with a first macro-pixel level search step, and determine a first search point; start from the first search point, perform a macro-pixel level fine search with a second macro-pixel level search step, and determine a second search point; wherein the first macro-pixel level search step is greater than or equal to the second macro-pixel level search step; and use the motion vector corresponding to the second search point as the second motion vector.

[0135] In some embodiments, the search unit 1202 is configured to start with a first macropixel-level search step from one macropixel, and the first macropixel-level search step increases by an integer power of 2, search according to the search template, and determine the rate-distortion cost value of each search point; and determine the search point corresponding to the minimum rate-distortion cost value as the first search point.

[0136] In some embodiments, the search unit 1202 is configured to determine the search step corresponding to the first search point during a fast search process; when the search step corresponding to the first search point is less than or equal to the first step threshold, search the two unsearched points closest to the first search point within the search template with a second macro-pixel level search step, and determine the point corresponding to the minimum rate distortion cost value as the second search point; when the search step corresponding to the first search point is greater than the second step threshold, perform a full search in units of macro-pixels within the first search range with the first search point as the center point, and determine the search point corresponding to the minimum rate distortion cost value as the second search point; wherein the second step threshold is greater than or equal to the first step threshold.

[0137] In some embodiments, the search unit 1202 is further configured to not perform macro-pixel level fine search when the search step corresponding to the first search point is greater than the first step threshold and less than or equal to the second step threshold, and to use the motion vector corresponding to the first search point as the second motion vector.

[0138] In some embodiments, the second macro-pixel level search step size is one macro-pixel unit.

[0139] In some embodiments, the first search range includes an M×M search range with the first search point as the center point; wherein the value of M is greater than or equal to 3.

[0140] In some embodiments, the search template includes one of the following: a diamond template, a square template, a regular hexagonal template, and a regular octagonal template.

[0141] In some embodiments, the macro-pixel level search step includes a macro-pixel level horizontal step and a macro-pixel level vertical step; the macro-pixel level horizontal step is an integer multiple of the macro-pixel horizontal size, and the macro-pixel level vertical step is an integer multiple of the macro-pixel vertical size.

[0142] In some embodiments, the search unit 1202 is configured to search for adjacent points within a second search range with the second starting point as the center point, and determine a third search point corresponding to the minimum rate distortion cost value; search for adjacent points within the second search range with the third search point as the center point, and determine a fourth search point corresponding to the minimum rate distortion cost value; when the second starting point and the fourth search point are the same, determine the motion vector of the second starting point as the third motion vector; when the second starting point and the fourth search point are different, search for adjacent points within the second search range with the fourth search point as the center point, until the search point determined for the i-th time is the same as the search point determined for the (i+2)th time, and determine the motion vector of the search point determined for the i-th time as the third motion vector.

[0143] In some embodiments, the search unit 1202 is configured to perform a full search in units of regular pixels within a second search range with the second starting point as the center point, and determine a third search point corresponding to the minimum rate distortion cost value; when the second starting point and the third search point are the same, determine the motion vector of the second starting point as the third motion vector; when the second starting point and the third search point are not the same, perform a full search in units of regular pixels within the second search range with the third search point as the center point, until the search point determined for the i-th time is the same as the search point determined for the i+1-th time, and determine the motion vector of the search point determined for the i-th time as the third motion vector.

[0144] In some embodiments, the search unit 1202 is configured to initialize a first search count; after each search is completed, the first search count is incremented by 1; when the first search count is equal to the first count threshold, the motion vector of the search point corresponding to the minimum rate distortion cost value in the conventional pixel-level search process is set as the third motion vector.

[0145] In some embodiments, the regular pixel-level search step includes a regular pixel-level horizontal step and a regular pixel-level vertical step; the regular pixel-level horizontal step is an integer multiple of the regular pixel horizontal size, and the regular pixel-level vertical step is an integer multiple of the regular pixel vertical size.

[0146] In some embodiments, the determination unit 1201 is configured to construct a motion vector candidate list; search the motion vector candidate list to determine the rate-distortion cost value corresponding to each motion vector; and determine the motion vector corresponding to the minimum rate-distortion cost value as the first motion vector.

[0147] In some embodiments, the determining unit 1201 is configured to, after the regular pixel-level search is completed, use the third motion vector obtained in the regular pixel-level search as the new first motion vector; perform the next macro-pixel-level search and the next regular pixel-level search, and determine the third motion vector obtained in the next regular pixel-level search;

[0148] The determining unit 1201 is configured to end the search and determine the best motion vector for the current block if the third motion vector obtained by the current regular pixel-level search is the same as the third motion vector obtained by the next regular pixel-level search.

[0149] In some embodiments, the determination unit 1201 is configured to initialize the second search count before performing the first macro-pixel level search; after each macro-pixel level search and regular pixel level search, the second search count is incremented by 1; when the second search count is equal to the second count threshold, the search ends, and the third motion vector obtained from the last regular pixel level search is used as the optimal motion vector of the current block.

[0150] In some embodiments, the determination unit 1201 is configured to determine a motion vector prediction value of the current block; determine a motion vector residual value of the current block based on the motion vector prediction value and the optimal motion vector of the current block; the encoder may also include an encoding unit 1203, configured to encode the motion vector residual value of the current block and write the obtained encoding bits into the bitstream.

[0151] It can be understood that each functional unit of the encoder is used to execute the encoding method described in any one of the aforementioned embodiments.

[0152] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

[0153] If the integrated unit is implemented as 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, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0154] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 120. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method of any one of the aforementioned embodiments.

[0155] Based on the composition of the encoder 120 and the computer-readable storage medium, refer to Figure 13, which shows a specific hardware structure diagram of the encoder 120 provided in an embodiment of the present application. As shown in Figure 13, the encoder 120 may include: a first communication interface 1301, a first memory 1302 and a first processor 1303; each component is coupled together through a first bus system 1304. It can be understood that the first bus system 1304 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 1304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 1304 in Figure 13. Among them,

[0156] The first communication interface 1301 is used to receive and send signals when sending and receiving information with other external network elements;

[0157] A first memory 1302 is used to store computer programs that can be run on the first processor 1303;

[0158] The first processor 1303 is configured to, when running the computer program, execute:

[0159] determining a first motion vector of the current block;

[0160] Taking the pixel point pointed to by the first motion vector as a first starting point, performing a macro-pixel level search with a macro-pixel level search step to determine a second motion vector of the current block;

[0161] Taking the pixel point pointed to by the second motion vector as a second starting point, performing a regular pixel-level search with a regular pixel-level search step size to determine a third motion vector of the current block;

[0162] An optimal motion vector for the current block is determined according to the third motion vector.

[0163] It is understood that the first memory 1302 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 1302 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0164] The first processor 1303 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1303. The above-mentioned first processor 1303 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1302 , and the first processor 1303 reads the information in the first memory 1302 and completes the steps of the above method in combination with its hardware.

[0165] It is understood that the embodiments described herein can be implemented with hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP devices, DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of the present application or a combination thereof. For software implementation, the technology of the present application can be implemented by a module (such as a process, a function, etc.) that performs the functions of the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0166] Optionally, as another embodiment, the first processor 1303 is further configured to execute any one of the methods in the foregoing embodiments when running a computer program.

[0167] This embodiment provides an encoder in which, when performing motion estimation, a conventional pixel-level fine search is added to the macro-pixel-level search. A pixel-level offset correction is performed on the candidate reference block positions found by the macro-pixel-level search to increase their correlation with the current block to a greater extent, thereby further optimizing the motion estimation effect of the encoded light field image and improving the robustness of the encoder.

[0168] In yet another embodiment of the present application, referring to FIG14 , a schematic diagram of the structure of a coding and decoding system provided by an embodiment of the present application is shown. As shown in FIG14 , the coding and decoding system 140 may include an encoder 1401 and a decoder 1402 .

[0169] In the embodiment of the present application, the encoder 1401 may be the encoder described in any one of the aforementioned embodiments, and the decoder 1402 may be the decoder described in any one of the aforementioned embodiments.

[0170] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0171] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0172] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new method embodiments. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new product embodiments. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined, if they do not conflict, to obtain new method embodiments or device embodiments.

[0173] The above description is merely a specific 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

[0174] In an embodiment of the present application, a coding method, an encoder, and a storage medium are provided. The method includes: determining a first motion vector of a current block; using the pixel pointed to by the first motion vector as a first starting point, performing a macro-pixel-level search with a macro-pixel-level search step to determine a second motion vector of the current block; using the pixel pointed to by the second motion vector as a second starting point, performing a regular pixel-level search with a regular pixel-level search step to determine a third motion vector of the current block; and determining an optimal motion vector for the current block based on the third motion vector. In this manner, a regular pixel-level fine search is added to the macro-pixel-level search, and pixel-level offset correction is performed on the candidate reference block positions found by the macro-pixel-level search to increase their correlation with the current block, thereby further optimizing the motion estimation effect of the encoded light field image and improving the robustness of the encoder.

Claims

1. A coding method, applied to an encoder, the method include: Determine a first motion vector of the current block; Taking the pixel point pointed to by the first motion vector as a first starting point, performing a macro-pixel level search with a macro-pixel level search step length, and determining a second motion vector of the current block; Taking the pixel point pointed to by the second motion vector as a second starting point, performing a regular pixel-level search with a regular pixel-level search step length to determine a third motion vector of the current block; An optimal motion vector for the current block is determined according to the third motion vector.

2. The method according to claim 1, in, The macro pixel level search process includes: Starting from the first starting point, performing a macro-pixel level fast search with a first macro-pixel level search step length to determine a first search point; Starting from the first search point, performing a macro-pixel-level fine search with a second macro-pixel-level search step length to determine a second search point; wherein the first macro-pixel-level search step length is greater than or equal to the second macro-pixel-level search step length; The motion vector corresponding to the second search point is used as the second motion vector.

3. The method according to claim 2, in, The macro pixel level fast search process includes: The first macro-pixel level search step starts from one macro-pixel, and the first macro-pixel level search step increases by an integer power of 2, searching according to a search template to determine a rate-distortion cost value of each search point; The search point corresponding to the minimum rate distortion cost value is determined as the first search point.

4. The method according to claim 2, in, The macro-pixel level fine search process includes: During the fast search, determining a search step length corresponding to the first search point; When the search step size corresponding to the first search point is less than or equal to the first step size threshold, searching for two unsearched points closest to the first search point in the search template with the second macro-pixel level search step size, and determining the point corresponding to the minimum rate distortion cost value as the second search point; When the search step size corresponding to the first search point is greater than the second step size threshold, a full search is performed in a first search range with the first search point as the center point in units of macro pixels, and a search point corresponding to a minimum rate distortion cost value is determined as the second search point; The second step length threshold is greater than or equal to the first step length threshold.

5. The method according to claim 4, in, The macro pixel level search process further includes: When the search step size corresponding to the first search point is greater than the first step size threshold and less than or equal to the second step size threshold, the macro-pixel level fine search is not performed, and the motion vector corresponding to the first search point is used as the second motion vector.

6. The method according to claim 4, in, The second macro-pixel level search step is one macro-pixel unit.

7. The method according to claim 4, in, The first search range includes an M×M search range with the first search point as the center point; wherein the value of M is greater than or equal to 3.

8. The method according to claim 3 or 4, in, The search template includes one of the following: a rhombus template, a square template, a regular hexagonal template, and a regular octagonal template.

9. The method according to any one of claims 1 to 6, in, The macro-pixel level search step size includes a macro-pixel level horizontal step size and a macro-pixel level vertical step size; The macro-pixel level horizontal step length is an integer multiple of the macro-pixel horizontal size, and the macro-pixel level vertical step length is an integer multiple of the macro-pixel vertical size.

10. The method according to claim 1, in, The conventional pixel-level search process includes: Searching for adjacent points within a second search range with the second starting point as the center point to determine a third search point corresponding to a minimum rate distortion cost value; Searching for adjacent points within a second search range with the third search point as the center point to determine a fourth search point corresponding to the minimum rate distortion cost value; When the second starting point and the fourth search point are the same, determining the motion vector of the second starting point as the third motion vector; When the second starting point and the fourth search point are not the same, adjacent points are searched within a second search range with the fourth search point as the center point until the search point determined for the i-th time is the same as the search point determined for the (i+2)th time, and the motion vector of the search point determined for the i-th time is determined as the third motion vector.

11. The method according to claim 1, in, The conventional pixel-level search process includes: Performing a full search in a second search range with the second starting point as the center point in units of regular pixels to determine a third search point corresponding to a minimum rate distortion cost value; When the second starting point and the third search point are the same, determining the motion vector of the second starting point as the third motion vector; When the second starting point and the third search point are not the same, a full search is performed in units of regular pixels within a second search range with the third search point as the center point until the search point determined for the i-th time is the same as the search point determined for the (i+1)th time, and the motion vector of the search point determined for the i-th time is determined as the third motion vector.

12. The method according to claim 10 or 11, in, The conventional pixel-level search process also includes: Initialize the first search count; After each search is completed, the first search number is incremented by 1; When the first search times is equal to the first search times threshold, the motion vector of the search point corresponding to the minimum rate distortion cost value in the conventional pixel level search process is used as the third motion vector.

13. The method according to any one of claims 10 to 12, in, The conventional pixel-level search step size includes a conventional pixel-level horizontal step size and a conventional pixel-level vertical step size; The conventional pixel-level horizontal step size is an integer multiple of the conventional pixel horizontal size, and the conventional pixel-level vertical step size is an integer multiple of the conventional pixel vertical size.

14. The method according to claim 1, in, The determining a first motion vector of the current block comprises: Constructing a motion vector candidate list; Searching the motion vector candidate list to determine a rate-distortion cost value corresponding to each motion vector; The motion vector corresponding to the minimum rate-distortion cost value is determined to be the first motion vector.

15. The method according to any one of claims 1 to 14, in, The method further comprises: After the conventional pixel-level search is completed, the third motion vector obtained by the conventional pixel-level search is used as a new first motion vector; Performing a next macro pixel level search and a next regular pixel level search to determine a third motion vector obtained by the next regular pixel level search; The step of determining the best motion vector of the current block according to the third motion vector comprises: When the third motion vector obtained by the current regular pixel-level search is the same as the third motion vector obtained by the next regular pixel-level search, the search ends and the best motion vector of the current block is determined.

16. The method according to claim 15, in, The method further comprises: Before performing the first macro-pixel level search, initializing the second search number; After each macro pixel level search and regular pixel level search are completed, the second search number is incremented by 1; The step of determining the best motion vector of the current block according to the third motion vector comprises: When the second search times is equal to the second search times threshold, the search ends and the last conventional pixel-level search is performed. The obtained third motion vector is used as the optimal motion vector of the current block.

17. The method according to claim 1, in, The method further comprises: Determine a motion vector prediction value for a current block; Determine a motion vector residual value of the current block according to the motion vector prediction value of the current block and the optimal motion vector; The motion vector residual value of the current block is encoded, and the obtained encoding bits are written into a bitstream.

18. An encoder comprising a determination unit and a search unit; in: The determining unit is configured to determine a first motion vector of the current block; The search unit is configured to use the pixel point pointed to by the first motion vector as a first starting point, perform a macro-pixel level search with a macro-pixel level search step length, and determine a second motion vector of the current block; The search unit is further configured to use the pixel point pointed to by the second motion vector as a second starting point, perform a regular pixel-level search with a regular pixel-level search step length, and determine a third motion vector of the current block; The determining unit is further configured to determine an optimal motion vector for the current block according to the third motion vector.

19. An encoder comprising a first memory and a first processor; in: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 1 to 17 when running the computer program.

20. A computer-readable storage medium, in, The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 17 is implemented.

Citation Information

Patent Citations

  • Method for intra-frame prediction of light field video based on macro pixels

    CN107483936A

  • Iterative Grid-Pattern Motion Search

    US20120281760A1

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

    US20180131960A1

  • Search region for motion vector refinement

    US20200137415A1

  • Video motion estimation method and apparatus, and storage medium

    US20200322624A1