Coding processing method, device and equipment and computer readable storage medium
By dynamically adjusting the search range in AVS3 video encoding and combining temporal distance and historical motion vector information, the problem of computational resource waste caused by a fixed search range is solved, efficient encoding processing is achieved, and encoding efficiency and performance are improved.
Patent Information
- Application Number
- CN202511001914.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, the motion estimation algorithm of the AVS3 video coding standard adopts a fixed search range method, which leads to a waste of computing resources in static or slow-motion scenes. The number of search points is proportional to the square of the search range, resulting in exponential growth in complexity and low coding processing efficiency.
By determining the time distance and image group size between the current frame and the reference frame, combined with the historical motion vector information of the reference block, the search range is dynamically adjusted, the search is limited to the adaptive basic search range, and the optimal reference block is determined for encoding.
It significantly reduces motion search time, improves encoding efficiency and performance, has a high overall cost-effectiveness, and improves AVS3 encoding efficiency.
Smart Images

Figure CN120676143A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video coding technology, and in particular to a coding processing method, apparatus, device and readable storage medium. Background Art
[0002] The traditional motion estimation algorithm in AVS3 (a new generation of domestic video coding standard) usually adopts a fixed search range method, using a preset fixed search window, such as ±32 pixels or ±64 pixels. The fixed search range cannot adapt to the motion characteristics of the video content. Performing a large-scale search in static or slow-motion scenes results in a waste of computing resources. The number of search points is proportional to the square of the search range. An excessively large range leads to exponential growth in complexity, resulting in low encoding processing efficiency.
[0003] Therefore, how to improve coding efficiency is a technical problem that those skilled in the art urgently need to solve. Summary of the Invention
[0004] In view of this, an object of the present invention is to provide a coding processing method, apparatus, device and readable storage medium to solve the technical problem of low search efficiency in the prior art.
[0005] To solve the above technical problems, the present invention provides a coding processing method, comprising:
[0006] Determine the temporal distance between the current frame and the reference frame, and the group of pictures size corresponding to the coding mode;
[0007] determining a basic search range based on the temporal distance and the image group size;
[0008] Based on historical motion vector information corresponding to the reference block, and determining a history-based search range based on the historical motion vector information;
[0009] Using the history-based search range to constrain the basic search range to determine a final search range;
[0010] An optimal reference block is determined by searching based on the final search range, and encoding is performed based on the optimal reference block.
[0011] Optionally, determining a basic search range based on the temporal distance and the image group size includes:
[0012] determining an initial basic search range based on the temporal distance and the image group size;
[0013] determining an initial maximum search range based on a motion vector accuracy level of a reference block, and determining an initial minimum search range based on the initial maximum search range;
[0014] The initial basic search range is limited to between an initial maximum search range and an initial minimum search range to obtain the basic search range.
[0015] Optionally, determining a history-based search range based on historical motion vector information corresponding to a reference block includes:
[0016] determining a history-based initial search range based on the historical motion vector information;
[0017] The history-based search range is obtained by constraining the history-based initial search range based on the initial maximum search range; wherein the history-based search range is determined to be larger than a ratio of the initial maximum search range to a preset value.
[0018] Optionally, after determining a history-based initial search range based on the historical motion vector information, the method further includes:
[0019] The history-based initial search range is expanded according to the search steps in the horizontal direction and the vertical direction to obtain the history-based search range.
[0020] Optionally, using the history-based search scope to constrain the basic search scope to determine a final search scope includes:
[0021] A minimum search range value between the history-based search range and the basic search range is determined, and the minimum search range value is used as the final search range.
[0022] Optionally, determining a history-based search range based on historical motion vector information corresponding to a reference block includes:
[0023] Determine a difference between a historical motion vector corresponding to the reference block and a motion vector of a starting search point corresponding to the reference block;
[0024] The motion vector difference is set to expand its range in the horizontal direction and the vertical direction to obtain the history-based search range.
[0025] Optionally, after the basic search range is constrained by using the history-based search range to determine a final search range, the method further includes:
[0026] Determining a search range boundary based on a maximum image area corresponding to the current block;
[0027] The final search range is constrained based on the search range boundary.
[0028] An embodiment of the present invention further provides a coding processing device, including:
[0029] a parameter determination module for determining a temporal distance between a current frame and a reference frame, and a group of pictures size corresponding to a coding mode;
[0030] a basic search range determining module, configured to determine a basic search range based on the temporal distance and the size of the group of images;
[0031] a history-based search range determination module, configured to determine a history-based search range based on historical motion vector information corresponding to a reference block and based on the historical motion vector information;
[0032] a final search range determining module, configured to constrain the basic search range by utilizing the history-based search range to determine a final search range;
[0033] The search module is configured to search based on the final search range to determine an optimal reference block, and perform encoding based on the optimal reference block.
[0034] An embodiment of the present invention further provides a coding processing device, including:
[0035] Memory for storing computer programs;
[0036] A processor is used to execute the computer program to implement the steps of the above encoding processing method.
[0037] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned encoding processing method are implemented.
[0038] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above encoding processing method when executed by a processor.
[0039] It can be seen that the present invention determines the time distance between the current frame and the reference frame, and the image group size corresponding to the encoding mode; determines the basic search range based on the time distance and the image group size; determines the history-based search range based on the historical motion vector information corresponding to the reference block and the historical motion vector information; determines the history-based search range to constrain the basic search range and determine the final search range; searches based on the final search range to determine the optimal reference block, and encodes based on the optimal reference block. The present invention determines the basic search range based on the time distance and the image group size, and then obtains the history-based search range based on the historical motion vector information. The basic search range can be compressed from the history-based search range to the adaptive search range, so that the search time for the optimal reference block can be significantly reduced, and the performance impact is small, the overall cost-effectiveness is high, and the encoding efficiency and performance of AVS3 are significantly improved.
[0040] In addition, the present invention also provides a coding processing device, equipment and readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0042] Figure 1 A process of a coding processing method provided by an embodiment of the present invention;
[0043] Figure 2 An example flow chart of a reference block search method provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a basic range determination method provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of a history-based reference block search method provided by an embodiment of the present invention;
[0046] Figure 5 A schematic structural diagram of a coding processing device provided by an embodiment of the present invention;
[0047] Figure 6 A schematic structural diagram of an encoding processing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0049] Please refer to Figure 1 , Figure 1 This is a flowchart of a coding processing method provided by an embodiment of the present invention. The method may include:
[0050] S101 , determining a temporal distance between a current frame and a reference frame, and a group of pictures size corresponding to a coding mode.
[0051] This embodiment determines the temporal distance between the current frame and the reference frame, as well as the GOP (Group of Pictures) size corresponding to the encoder's encoding mode. In this embodiment, the current block is within the current frame, the reference block is within the reference frame, and the frame referenced by the current frame is the reference frame. This is a predefined rule. The motion between the reference block corresponding to the current block and the current block is called a motion vector.
[0052] It should be further explained that, based on any of the above embodiments, determining the basic search range based on the time distance and the image group size may include:
[0053] S1011, determining an initial basic search range based on the time distance and the image group size;
[0054] S1012, determining an initial maximum search range based on the motion vector accuracy level of the reference block, and determining an initial minimum search range based on the initial maximum search range;
[0055] S1013: Limit the initial basic search range to between the initial maximum search range and the initial minimum search range to obtain a basic search range.
[0056] In this embodiment, an initial base search range is first determined based on temporal distance and GOP size. Furthermore, the initial base search range is limited to an initial maximum search range and an initial minimum search range. The initial maximum search range is determined based on the reference block's MVR (motion vector precision level), and the initial minimum search range is a preset reduction ratio (e.g., 1 / 4) of the initial maximum search range. The initial maximum search range in this embodiment ensures that the final search range obtained by the algorithm does not exceed the initial maximum search range, resulting in a significant speed improvement compared to the original solution (initial maximum search range).
[0057] It should be further explained that, based on any of the above embodiments, determining the history-based search range based on the historical motion vector information corresponding to the reference block and the historical motion vector information may include:
[0058] An initial history-based search range is determined based on historical motion vector information; the initial history-based search range is constrained based on the initial maximum search range to obtain a history-based search range; wherein the history-based search range is determined to be greater than the ratio of the initial maximum search range to a preset value. The preset value in this embodiment is a value greater than 1, for example, the preset value may be 4. This embodiment constrains the initial history-based search range to prevent the history-based search range from being too small, thereby improving the accuracy of determining the history-based search range.
[0059] It should be further explained that, based on any of the above embodiments, after determining the history-based initial search range based on historical motion vector information, the method may further include: expanding the history-based initial search range according to the search step size in the horizontal and vertical directions to obtain a history-based search range. This embodiment does not limit the specific search step size. For example, the search step size in the horizontal direction is 8 times, and the search step size in the vertical direction is 4 times. The horizontal search step size must be greater than the vertical search step size. This embodiment expands the history-based search range through the search step size, which can prevent the history-based search range from being too small and improve the accuracy of the search range determination.
[0060] S102: Determine a basic search range based on the time distance and the image group size.
[0061] The process of determining the basic search range in this embodiment may include: determining the maximum search range of the current block based on the MVR level, and the determination process is to divide the maximum search range of the entire frame by the set value of the corresponding level. For example, the current frame has a maximum search range, which is reduced by dividing by 2, 4, or 8. When the MVR is equal to 0, it is divided by 8, when it is equal to 1, it is divided by 4, when it is equal to 2, it is divided by 2, and when the MVR is equal to 3, it is not divided. This maximum search range is the maximum search range of the current block. The maximum search range of the current block is multiplied by the time distance + (image group size divided by 2), and the result obtained is divided by the image group size to obtain a range. This range is limited to the interval between the maximum search range of the current block and (maximum search range of the current block / 4) to obtain the basic search range.
[0062] This embodiment determines the initial basic search range based on both temporal distance and GOP size. Alternatively, this embodiment may adjust the basic search range based on temporal distance, GOP size, GOP structure, and frame type. It will be appreciated that the present invention determines the basic search range based on temporal distance and GOP size because it ensures accurate determination of the basic search range while using a small number of parameters.
[0063] S103 : Determine a history-based search range based on the historical motion vector information corresponding to the reference block.
[0064] The reference block in this embodiment is the starting reference block found. It is understandable that the reference block determination process may include: obtaining all reference blocks through MV (motion vector), comparing the reference block with the current coding block to obtain a loss value, and using the reference block with the smallest loss value as the reference block. Each reference block is reflected in the encoder through the MV motion vector. The motion vectors of adjacent blocks are the rules established by the encoder. The optimal motion vector is selected as the starting reference block. The historical motion vector in this embodiment refers to the motion vector information of the adjacent blocks that have been encoded before. This embodiment does not limit the specific historical motion vector information corresponding to the reference block. For example, the historical motion vector information of this embodiment can be the motion vector directly corresponding to the reference block, or it can also be the motion vector information after the range is expanded based on the motion vector.
[0065] It should be further explained that, based on any of the above embodiments, the above-mentioned determination of the history-based search range based on the historical motion vector information corresponding to the reference block and the historical motion vector information may include:
[0066] S1031, determining a difference between a historical motion vector corresponding to a reference block and a motion vector of a starting search point corresponding to the reference block;
[0067] S1032: Expand the set range of the motion vector difference in the horizontal direction and the vertical direction to obtain a history-based search range.
[0068] This embodiment can expand the history-based search range in the horizontal and vertical directions based on the search step size to ensure the minimum coverage range, so that the final search range will not be too small.
[0069] S104: Constrain the basic search range using the history-based search range to determine a final search range.
[0070] This embodiment uses a history-based search range to constrain the basic search range, which means that the basic search range is narrowed by using the history-based search range, thereby further narrowing the search range and improving the efficiency of subsequently finding the area in the reference frame that best matches the current coding block.
[0071] It should be further explained that, based on any of the above embodiments, using the history-based search range to constrain the basic search range and determine the final search range may include: determining the minimum search range between the history-based search range and the basic search range, and using the minimum search range as the final search range. In this embodiment, the final search range will be the minimum of the two. Since the basic search range is always smaller than the initial maximum search range, the final search range will also be smaller than the initial maximum search range. Therefore, the final search range will be smaller, thereby improving the efficiency of subsequent searches.
[0072] It should be further noted that, based on any of the above embodiments, after constraining the basic search range using the historical search range to determine the final search range, the following steps may also be performed: determining a search range boundary based on the maximum image area corresponding to the current block; and constraining the final search range based on the search range boundary. This embodiment determines the search range boundary to prevent the search range from exceeding the maximum image area, thereby determining the optimal reference block by searching the final search range based on the range constraint.
[0073] S105 , searching based on the final search range to determine an optimal reference block, and encoding based on the optimal reference block.
[0074] In this embodiment, the motion estimation algorithm can efficiently locate the optimal reference block within this window (the final search range) without traversing the entire reference frame.
[0075] An encoding processing method provided by an embodiment of the present invention may include: S101, determining the temporal distance between the current frame and the reference frame, and the image group size corresponding to the encoding mode; S102, determining a basic search range based on the temporal distance and the image group size; S103, determining a history-based search range based on the historical motion vector information corresponding to the reference block and the historical motion vector information; S104, determining to constrain the basic search range using the history-based search range, and determining a final search range; S105, searching based on the final search range to determine the optimal reference block, and encoding based on the optimal reference block. The present invention determines the basic search range based on the temporal distance and the image group size, and then obtains the history-based search range based on the historical motion vector information. The basic search range can be compressed from the history-based search range to an adaptive search range, thereby significantly reducing the motion search time, having little impact on performance, and having a high overall cost-effectiveness ratio, significantly improving encoding efficiency.
[0076] Currently, the main method used to determine the search range is a fixed search range method, using a preset fixed search window, such as ±32 pixels or ±64 pixels. This fixed search range cannot adapt to the motion characteristics of video content. Searching a large area in still or slow-motion scenes wastes computing resources. The number of search points is proportional to the square of the search range. Excessively large search ranges lead to exponentially increased complexity and low search efficiency.
[0077] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 An example flow chart of a reference block search method provided in an embodiment of the present invention may specifically include:
[0078] S201: Determine a current coding block and a current frame corresponding to the coding block, and determine a temporal distance between the current frame and a corresponding reference frame.
[0079] The coding block in this embodiment is the current block.
[0080] S202: Determine a group of pictures size corresponding to the coding mode of the current encoder.
[0081] S203. Determine a basic search range based on the temporal distance and the image group size, and limit the basic search range to between an initial maximum search range and an initial minimum search range; determine the initial maximum search range based on the MVR of the reference block, and set 1 / 4 of the initial maximum search range as the initial minimum search range.
[0082] For easier understanding, please refer to Figure 3 , Figure 3This diagram illustrates a method for determining a basic search range according to an embodiment of the present invention. Input parameters include temporal distance, GOP size (Group of Picture size), maximum search range (i.e., the initial maximum search range for the current block), minimum search range (i.e., the initial minimum search range for the current block), and the MVR (Motion Vector Refinement Level) value. max_sr is adjusted. The maximum search range is determined based on the MVR value. The basic search range can be determined using these parameters.
[0083] S204. Determine the reference block corresponding to the coding block, determine the motion vector difference between the historical motion vector information corresponding to the reference block and the starting search point corresponding to the reference block, expand the set range of the motion vector difference in the horizontal and vertical directions, and obtain a history-based search range.
[0084] The motion vector information in this embodiment is MV information. For ease of understanding, please refer to Figure 4 . Figure 4 A schematic diagram of a history-based reference block search method provided in an embodiment of the present invention, wherein a historical motion vector is obtained from inter-frame reference information, a motion vector difference is calculated based on the difference between the historical mv and the current search center, and an adaptive range is expanded in the horizontal and vertical directions to finally obtain a history-based search range (adaptive range).
[0085] S205: Determine whether the history-based search range is larger than the initial maximum search range / 4.
[0086] This embodiment ensures that the search range is not too small, and the history-based search range obtained above is always larger than max_sr >> 2. This embodiment implements a minimum range constraint.
[0087] S206 : Expand the history-based search range in the horizontal direction and the vertical direction according to the search step size to obtain an expanded history-based search range.
[0088] This embodiment ensures minimum coverage based on the search step size. For a search range based on historical information, the horizontal search range will always be greater than 8 times the search step size, and the vertical search range will always be greater than 4 times the search step size. This embodiment implements search step size constraints.
[0089] S207: The minimum value of the basic search range and the expanded history-based search range is used as the final search range.
[0090] This embodiment prevents the information-based search range from exceeding the basic search range, ensuring a significant advantage in time complexity. This embodiment is equivalent to performing a maximum range constraint.
[0091] S208 : Constraining the final search range based on the search range boundary, and searching based on the constrained final search range to determine the optimal reference block.
[0092] This embodiment determines the search range boundary to prevent the integer pixel search range from exceeding the maximum image area. This embodiment is equivalent to performing MVR alignment constraints.
[0093] The core idea of the encoding processing method provided by the embodiment of the present invention is to utilize the motion vector information (MVR of the reference block) previously encoded in the same reference frame and prediction direction, and compress the basic search range to an adaptive search range scheme. The motion search time can be significantly reduced, and the impact on performance is small, the overall cost-effectiveness is high, and the encoding efficiency and performance of AVS3 are significantly improved.
[0094] The following is an introduction to an encoding processing device provided by an embodiment of the present invention. The encoding processing device described below and the encoding processing method described above can be referenced to each other.
[0095] Please refer to Figure 5 , Figure 5 A schematic structural diagram of a coding processing device provided in an embodiment of the present invention may include:
[0096] a parameter determination module 100 for determining a temporal distance between a current frame and a reference frame, and a GOP size corresponding to a coding mode;
[0097] A basic search range determination module 200, configured to determine a basic search range based on the temporal distance and the image group size;
[0098] A history-based search range determination module 300 is configured to determine a history-based search range based on historical motion vector information corresponding to a reference block and based on the historical motion vector information;
[0099] A final search range determination module 400 is configured to constrain the basic search range using the history-based search range to determine a final search range;
[0100] The search module 500 is configured to search based on the final search range to determine an optimal reference block, and perform encoding based on the optimal reference block.
[0101] Further, based on any of the above embodiments, the basic search range determination module 200 may include:
[0102] an initial basic search range determining unit, configured to determine an initial basic search range based on the temporal distance and the size of the group of images;
[0103] an initial minimum search range determining unit, configured to determine an initial maximum search range based on a motion vector accuracy level of a reference block, and determine an initial minimum search range based on the initial maximum search range;
[0104] The basic search range determining unit is configured to limit the initial basic search range to between an initial maximum search range and an initial minimum search range to obtain the basic search range.
[0105] Further, based on any of the above embodiments, the history-based search range determination module 300 may include:
[0106] a history-based initial search range determining unit, configured to determine a history-based initial search range based on the historical motion vector information;
[0107] The first history-based search range determining unit is configured to constrain the history-based initial search range based on the initial maximum search range to obtain the history-based search range; wherein the history-based search range is determined to be greater than a ratio of the initial maximum search range to a preset value.
[0108] Furthermore, based on any of the above embodiments, the encoding processing device may further include:
[0109] The second history-based search range determining unit is configured to expand the history-based initial search range according to the search steps in the horizontal direction and the vertical direction to obtain the history-based search range.
[0110] Further, based on any of the above embodiments, the final search range determination module 400 may include:
[0111] The final search range determining unit is configured to determine a minimum search range value between the history-based search range and the basic search range, and use the minimum search range value as the final search range.
[0112] Further, based on any of the above embodiments, the history-based search range determination module 300 may include:
[0113] a motion vector difference determination unit, configured to determine a difference between a historical motion vector corresponding to the reference block and a motion vector of a starting search point corresponding to the reference block;
[0114] The third history-based search range determination unit is configured to expand the set range of the motion vector difference in the horizontal direction and the vertical direction to obtain the history-based search range.
[0115] Furthermore, based on any of the above embodiments, the encoding processing device may further include:
[0116] A search range boundary determination module, configured to determine a search range boundary based on a maximum image area corresponding to a current block;
[0117] A range constraint module, configured to constrain the final search range based on the search range boundary to obtain a final search range after range constraint;
[0118] Accordingly, the search module 500 includes:
[0119] A search unit is configured to search based on a final search range after the range constraint to determine the optimal reference block.
[0120] It should be noted that the order of the modules and units in the above-mentioned encoding processing device can be changed without affecting the logic.
[0121] An embodiment of the present invention provides an encoding processing device, which may include: a parameter determination module 100 for determining the temporal distance between a current frame and a reference frame, and a group of pictures size corresponding to a coding mode; a basic search range determination module 200 for determining a basic search range based on the temporal distance and the group of pictures size; a history-based search range determination module 300 for determining a history-based search range based on historical motion vector information corresponding to a reference block and the historical motion vector information; a final search range determination module 400 for constraining the basic search range using the history-based search range to determine a final search range; and a search module 500 for searching and determining an optimal reference block based on the final search range, and encoding based on the optimal reference block. The present invention determines the basic search range based on the temporal distance and the group of pictures size, and then obtains the history-based search range based on the historical motion vector information. The history-based search range can be used to compress the basic search range into an adaptive search range, significantly reducing motion search time while minimizing performance impact, resulting in a high overall cost-effectiveness and significantly improving encoding efficiency and performance.
[0122] A coding processing device provided by an embodiment of the present invention is introduced below. The coding processing device described below and the coding processing method described above can refer to each other.
[0123] Please refer to Figure 6 , Figure 6 A schematic structural diagram of a coding processing device provided in an embodiment of the present invention may include:
[0124] Memory 10, for storing computer programs;
[0125] The processor 20 is configured to execute a computer program to implement the above encoding processing method.
[0126] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .
[0127] In the embodiment of the present invention, the memory 10 is used to store one or more programs. The program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
[0128] Determine the temporal distance between the current frame and the reference frame, and the group of pictures size corresponding to the coding mode;
[0129] Determine the basic search range based on the time distance and the image group size;
[0130] Based on historical motion vector information corresponding to the reference block, and determining a history-based search range based on the historical motion vector information;
[0131] Determine the final search range by using the history-based search range to constrain the basic search range;
[0132] A search is performed based on the final search range to determine the optimal reference block, and encoding is performed based on the optimal reference block.
[0133] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function, etc.; the data storage area may store data created during use.
[0134] In addition, the memory 10 may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset or an extended set thereof. The operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0135] The processor 20 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field programmable gate array, or other programmable logic device. The processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10 .
[0136] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.
[0137] Of course, it needs to be explained that Figure 6 The structure shown does not constitute a limitation on the encoding processing device in the embodiment of the present invention. In actual applications, the encoding processing device may include Figure 6 More or fewer components than shown, or combinations of certain components.
[0138] The computer-readable storage medium provided by an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the encoding processing method described above can be referenced to each other.
[0139] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned encoding processing method are implemented.
[0140] The computer-readable storage medium may include: 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, etc., which can store program codes.
[0141] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0142] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0143] Finally, it should be noted that, in this document, relationships such as first and second, etc., are used solely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0144] The above is a detailed introduction to the encoding processing method, device, equipment and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A coding processing method, characterized in that: include: Determine the temporal distance between the current frame and the reference frame, and the group of pictures size corresponding to the coding mode; determining a basic search range based on the temporal distance and the image group size; Based on historical motion vector information corresponding to the reference block, and determining a history-based search range based on the historical motion vector information; Using the history-based search range to constrain the basic search range to determine a final search range; An optimal reference block is determined by searching based on the final search range, and encoding is performed based on the optimal reference block.
2. The encoding processing method according to claim 1, wherein: Determining a basic search range based on the temporal distance and the image group size includes: determining an initial basic search range based on the temporal distance and the image group size; determining an initial maximum search range based on a motion vector accuracy level of a reference block, and determining an initial minimum search range based on the initial maximum search range; The initial basic search range is limited to between an initial maximum search range and an initial minimum search range to obtain the basic search range.
3. The encoding processing method according to claim 2, wherein: Based on historical motion vector information corresponding to the reference block, and based on the historical motion vector information, determining a history-based search range, including: determining a history-based initial search range based on the historical motion vector information; The history-based search range is obtained by constraining the history-based initial search range based on the initial maximum search range; wherein the history-based search range is determined to be larger than a ratio of the initial maximum search range to a preset value.
4. The encoding processing method according to claim 3, wherein: After determining the history-based initial search range based on the historical motion vector information, the method further includes: The history-based initial search range is expanded according to the search steps in the horizontal direction and the vertical direction to obtain the history-based search range.
5. The encoding processing method according to claim 1, wherein: Utilizing the history-based search scope to constrain the basic search scope to determine a final search scope includes: A minimum search range value between the history-based search range and the basic search range is determined, and the minimum search range value is used as the final search range.
6. The encoding processing method according to any one of claims 1 to 5, characterized in that: Based on historical motion vector information corresponding to the reference block, and based on the historical motion vector information, determining a history-based search range, including: Determine a difference between a historical motion vector corresponding to the reference block and a motion vector of a starting search point corresponding to the reference block; The motion vector difference is set to expand its range in the horizontal direction and the vertical direction to obtain the history-based search range.
7. The encoding processing method according to claim 1, wherein: After the basic search range is constrained by using the history-based search range to determine a final search range, the method further includes: Determining a search range boundary based on a maximum image area corresponding to the current block; Performing range constraints on the final search range based on the search range boundary to obtain a final search range after range constraints; Accordingly, searching based on the final search range to determine an optimal reference block, and encoding based on the optimal reference block, includes: The optimal reference block is determined by searching based on the final search range after the range constraint.
8. A coding processing device, characterized in that: include: a parameter determination module for determining a temporal distance between a current frame and a reference frame, and a group of pictures size corresponding to a coding mode; a basic search range determining module, configured to determine a basic search range based on the temporal distance and the size of the group of images; a history-based search range determination module, configured to determine a history-based search range based on historical motion vector information corresponding to a reference block and based on the historical motion vector information; a final search range determining module, configured to constrain the basic search range by utilizing the history-based search range to determine a final search range; The search module is configured to search based on the final search range to determine an optimal reference block, and perform encoding based on the optimal reference block.
9. A coding processing device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the encoding processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the encoding processing method according to any one of claims 1 to 7 are implemented.