A temporal perceptual coding method based on transform block motion
By optimizing video coding through a time-domain perceptual coding method based on transform block motion, combined with human visual characteristics, the problem of difficulty in balancing coding efficiency and image quality in the existing technology is solved, and more efficient video coding is achieved.
Patent Information
- Application Number
- CN202210248448.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-03-14
AI Technical Summary
Existing video coding technology fails to fully consider the visual characteristics of the human eye, making it difficult to balance coding efficiency and image quality, especially in high-brightness areas and high-frequency content.
A time-domain perceptual coding method based on transform block motion is used to obtain the target transform block parameters in the video encoding process, calculate the motion coefficient and retinal speed, determine the maximum perceptible frequency, and determine the target number of bits and square error based on this, optimizing Encoding patterns to reduce redundant information.
It reduces the overall bit rate of video encoding while improving image quality, especially the encoding efficiency in high-brightness and high-frequency areas.
Smart Images

Figure CN114666586B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video coding, and in particular to a time-domain perceptual coding method based on transform block motion. Background Art
[0002] The AVS3 video coding standard is a new generation of video coding standard. It is suitable for a variety of application scenarios such as ultra-high-definition television broadcasting, VR, and video surveillance. AVS3 saves about 30% of the bit rate compared to AVS2 in terms of 4K ultra-high-resolution video. In addition, the second phase of AVS3 aims to develop more effective coding tools to improve performance, especially for surveillance video and screen content video, with the target coding performance doubled compared to AVS2. The AVS3 standard reference software HPM can achieve an average BD-rate reduction of about 20% compared to the HEVC reference software HM. AVS3 uses many novel coding tools to improve coding efficiency, such as: QTBT+EQT division, Ultimate Motion Vector Expression (UMVE), Position Based Transform (PBT), Intra Derived Tree (Intra DT), etc. However, these technologies are all objectively pursuing a better coding effect without considering the subjective influence of the human eye. As the final recipient of information, the subjective quality of people is very important, so more and more subjective quality optimization technologies are introduced into video coding and decoding.
[0003] In recent years, with the continuous deepening of research in brain science, neuroscience and cognitive psychology, the research results in related fields have provided new ideas for the development of video coding technology, and video coding technology based on visual perception has emerged. Studies have shown that for humans, in addition to time redundancy, spatial redundancy, and information entropy redundancy, there is also visual redundancy in video information. This is because humans obtain and process visual information through the human visual system (HVS). The HVS system is a nonlinear system with many perceptual characteristics. The main characteristics are manifested in three aspects: brightness characteristics, frequency domain characteristics, and image type characteristics. Among them, brightness characteristics are the most basic characteristics of the human visual system, mainly about the sensitivity of the human eye to brightness changes. Generally speaking, the human eye is less sensitive to the noise added to the high-brightness area, which means that if the background brightness of the image is higher, the more additional information it can contain. For the frequency domain characteristics, if the image is transformed from the spatial domain to the frequency domain, the higher the frequency, the lower the resolution of the human eye. The lower the frequency, the higher the resolution of the human eye. The frequency domain characteristics of the human visual system show that the human eye is less sensitive to high-frequency content. In terms of image type characteristics, images can be divided into large smooth areas and dense texture areas. The human visual system is much more sensitive to smooth areas than to dense texture areas. Because the human visual system has different abilities to distinguish images with different characteristics, there is a lot of visual redundancy in video coding. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a time-domain perceptual coding method based on transform block motion to reduce the overall bit rate of video coding while taking into account image quality.
[0005] An aspect of the present invention provides a time-domain perceptual coding method based on transform block motion, comprising:
[0006] Acquire target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution;
[0007] Calculating the motion coefficient of the target transform block according to the target parameter;
[0008] determining retinal velocities in horizontal and vertical directions according to the motion vector and the mobility coefficient;
[0009] determining a maximum perceptible frequency in the horizontal direction and the vertical direction based on the retinal velocity;
[0010] Determining a target number of bits and a target sum of square errors according to the maximum perceptible frequency;
[0011] Determining an optimal coding mode according to the target number of bits and the target sum of square errors;
[0012] The optimal encoding mode is used for video encoding.
[0013] Optionally, the size of the target transform block is 4×4 or 8×8, and the calculation formula of the motion coefficient is:
[0014]
[0015] Among them, M represents the motion coefficient; QP represents the quantization parameter; fps represents the video frame rate; p_w_log2 represents the logarithmic value of the video width with base 2; p_h_log2 represents the logarithmic value of the video height with base 2; tu_w_log2 represents the logarithmic value of the target transform block width with base 2; tu_h_log2 represents the logarithmic value of the target transform block height with base 2; c represents an adjustable parameter.
[0016] Optionally, the calculation formula of the retinal velocity is:
[0017]
[0018]
[0019] in, represents the horizontal retinal velocity; M represents the motility coefficient; MV x is the horizontal component of the motion vector; Represents the vertical retinal velocity; MV y is the vertical component of the motion vector.
[0020] Optionally, the calculation formula of the maximum perceptible frequency is:
[0021]
[0022] Among them, K i represents the maximum perceptible frequency, i represents the horizontal or vertical component; K max Represents the highest perceptible frequency of the human eye; v c represents angular velocity; V r Retina velocity representing object motion.
[0023] Optionally, determining a target number of bits and a target sum of square errors according to the maximum perceptible frequency includes:
[0024] According to the maximum perceptible frequencies in the horizontal direction and the vertical direction, high-frequency coefficients of the target transform block are set to zero;
[0025] Calculating the target number of bits required for the current coding mode after the high frequency coefficients are set to zero;
[0026] The original transform coefficients are obtained, and inverse transform and inverse quantization are performed according to the original transform coefficients to obtain the target sum of square errors.
[0027] Optionally, the step of determining the optimal coding mode according to the target number of bits and the target sum of square errors includes determining an expression for rate-distortion optimization based on Lagrangian according to the target number of bits and the target sum of square errors;
[0028] The expression of rate distortion optimization is:
[0029] minJ J=D(Motion) ori +λ Mode R (Motion) new
[0030] Among them, D (Motion) ori Represents the sum of square errors calculated using the original transform coefficients after inverse transform and inverse quantization, R (Motion) new Indicates the target number of bits required to use the current coding mode after the high-frequency coefficients are set to zero.
[0031] Another aspect of the embodiment of the present invention further provides a time-domain perceptual coding apparatus based on transform block motion, comprising:
[0032] The first module is used to obtain target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution;
[0033] A second module is used to calculate the motion coefficient of the target transformation block according to the target parameter;
[0034] A third module is used to determine the retinal velocity in the horizontal direction and the vertical direction according to the motion vector and the mobility coefficient;
[0035] A fourth module is used to determine the maximum perceptible frequency in the horizontal direction and the vertical direction according to the retinal velocity;
[0036] A fifth module is used to determine a target number of bits and a target sum of square errors according to the maximum perceptible frequency;
[0037] A sixth module is used to determine an optimal coding mode according to the target number of bits and the target sum of square errors;
[0038] The optimal encoding mode is used for video encoding.
[0039] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0040] The memory is used to store programs;
[0041] The processor executes the program to implement the method described above.
[0042] Another aspect of the embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program.
[0043] The program is executed by a processor to implement the above-mentioned method.
[0044] Another aspect of an embodiment of the present invention provides a computer program product, including a computer program, which implements the above-mentioned method when executed by a processor.
[0045] The embodiment of the present invention obtains target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution; according to the target parameters, the mobility coefficient of the target transform block is calculated; according to the motion vector and the mobility coefficient, the retinal velocity in the horizontal direction and the vertical direction is determined; according to the retinal velocity, the maximum perceptible frequency in the horizontal direction and the vertical direction is determined; according to the maximum perceptible frequency, the target number of bits and the target sum of square errors are determined; according to the target number of bits and the target sum of square errors, the optimal encoding mode is determined; wherein the optimal encoding mode is used for video encoding. The present invention can reduce the overall bit rate of video encoding while taking into account image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 This is a diagram showing the curve of the human eye's perceptible frequency changing with retinal speed;
[0048] Figure 2 Schematic diagram of perceptible frequency distribution corresponding to the transformation block;
[0049] Figure 3 A flowchart of the overall method steps provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] In view of the problems existing in the prior art, the embodiment of the present invention provides a temporal perceptual coding method based on transform block motion, referring to Figure 3 , the method of the present invention comprises the following steps:
[0052] Acquire target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution;
[0053] Calculating the motion coefficient of the target transform block according to the target parameter;
[0054] determining retinal velocities in horizontal and vertical directions according to the motion vector and the mobility coefficient;
[0055] determining a maximum perceptible frequency in the horizontal direction and the vertical direction based on the retinal velocity;
[0056] Determining a target number of bits and a target sum of square errors according to the maximum perceptible frequency;
[0057] Determining an optimal coding mode according to the target number of bits and the target sum of square errors;
[0058] The optimal encoding mode is used for video encoding.
[0059] Optionally, the size of the target transform block is 4×4 or 8×8, and the calculation formula of the motion coefficient is:
[0060]
[0061] Among them, M represents the motion coefficient; QP represents the quantization parameter; fps represents the video frame rate; p_w_log2 represents the logarithmic value of the video width with base 2; p_h_log2 represents the logarithmic value of the video height with base 2; tu_w_log2 represents the logarithmic value of the target transform block width with base 2; tu_h_log2 represents the logarithmic value of the target transform block height with base 2; c represents an adjustable parameter.
[0062] Optionally, the calculation formula of the retinal velocity is:
[0063]
[0064]
[0065] in, represents the horizontal retinal velocity; M represents the motility coefficient; MV x is the horizontal component of the motion vector; Represents the vertical retinal velocity; MV y is the vertical component of the motion vector.
[0066] Optionally, the calculation formula of the maximum perceptible frequency is:
[0067]
[0068] Among them, K i represents the maximum perceptible frequency, i represents the horizontal or vertical component; K max Represents the highest perceptible frequency of the human eye; v c represents angular velocity; V r Retina velocity representing object motion.
[0069] Optionally, determining a target number of bits and a target sum of square errors according to the maximum perceptible frequency includes:
[0070] According to the maximum perceptible frequencies in the horizontal direction and the vertical direction, high-frequency coefficients of the target transform block are set to zero;
[0071] Calculating the target number of bits required for the current coding mode after the high frequency coefficients are set to zero;
[0072] The original transform coefficients are obtained, and inverse transform and inverse quantization are performed according to the original transform coefficients to obtain the target sum of square errors.
[0073] Optionally, the step of determining the optimal coding mode according to the target number of bits and the target sum of square errors includes determining an expression for rate-distortion optimization based on Lagrangian according to the target number of bits and the target sum of square errors;
[0074] The expression of rate distortion optimization is:
[0075] minJ J=D(Motion) ori +λ Mode R (Motion) new
[0076] Among them, D (Motion) ori Represents the sum of square errors calculated using the original transform coefficients after inverse transform and inverse quantization, R (Motion) new Indicates the target number of bits required to use the current coding mode after the high-frequency coefficients are set to zero.
[0077] Another aspect of the embodiment of the present invention further provides a time-domain perceptual coding apparatus based on transform block motion, comprising:
[0078] The first module is used to obtain target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution;
[0079] A second module is used to calculate the motion coefficient of the target transformation block according to the target parameter;
[0080] A third module is used to determine the retinal velocity in the horizontal direction and the vertical direction according to the motion vector and the mobility coefficient;
[0081] A fourth module is used to determine the maximum perceptible frequency in the horizontal direction and the vertical direction according to the retinal velocity;
[0082] A fifth module is used to determine a target number of bits and a target sum of square errors according to the maximum perceptible frequency;
[0083] A sixth module is used to determine an optimal coding mode according to the target number of bits and the target sum of square errors;
[0084] The optimal encoding mode is used for video encoding.
[0085] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0086] The memory is used to store programs;
[0087] The processor executes the program to implement the method described above.
[0088] Another aspect of the embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program.
[0089] The program is executed by a processor to implement the above-mentioned method.
[0090] Another aspect of an embodiment of the present invention provides a computer program product, including a computer program, which implements the above-mentioned method when executed by a processor.
[0091] The implementation principle of the present invention is described in detail below in conjunction with the accompanying drawings:
[0092] First, let’s introduce the visual sensitivity model:
[0093] For the visual sensitivity model, it is assumed that the highest perceptible frequency of a stationary object is 32 cycles / deg. When the image moves at high speed, the perceptible frequency will be significantly reduced. Figure 1As shown in Figure 1, the perceptible frequency of the human eye decreases significantly as the retinal velocity of the object increases. According to this rule, the highest perceptible frequency can be obtained using formula (1).
[0094]
[0095] Among them, K max The highest perceptible frequency for human eyes (32 cycles / deg), v c is the angular velocity (2deg / s), V r is the retinal velocity of the object's motion.
[0096] The following introduces the time-domain perceptual coding algorithm based on transform block motion:
[0097] In AVS3 video coding, the transform block size can be 4x4, 8x8, 16x16, 64x64. The present invention is mainly aimed at 4x4, 8x8 transform blocks, and obtains the motion vector MV of the transform block, as well as the video frame rate fps and quantization parameter QP and video resolution (video width and height), so as to determine the retinal velocity V of the current transform block. r . Specifically, when the MV of the transform block is larger, it means that the current block moves faster. The larger the video fps, the faster the video playback speed, and the faster the transform block moves. The smaller the quantization parameter QP, the more high-frequency coefficients the transform block will contain. The larger the resolution of the video frame, the more high-frequency coefficients the transform block can remove. Since the boundary effect of large blocks will be more obvious, the larger the transform block, the fewer high-frequency coefficients can be removed.
[0098] Based on the above principle, the present invention substitutes these parameters into equation (2) to calculate the motion coefficient M of the transform block, and then substitutes it into (3) and (4) to obtain V r , MV is divided into horizontal and vertical directions, so the calculated V r It is also divided into horizontal and vertical directions.
[0099]
[0100]
[0101]
[0102] Parameter description: fps is the video frame rate, p_w_log2 and p_h_log2 are the logarithmic values of the video width and height with base 2, QP is the quantization parameter value, tu_w_log2 and tu_h_log2 are the logarithmic values of the transform block width and height with base 2, c is an adjustable parameter, MV x is the horizontal component of the motion vector, MV yis the vertical component of the motion vector, is the horizontal retinal velocity of the transform block, is the vertical retinal velocity of the transform block.
[0103] Calculate and Then, substitute it into formula (1) to calculate the horizontal and vertical directions respectively. and For 4x4 and 8x8 transform blocks, the high-frequency transform coefficients are distributed in the lower right corner. In other words, the larger the number of columns and rows, the more the corresponding coefficients are in line with the high-frequency coefficients to be removed in this design. According to formula (1), K can be calculated i and V r The corresponding relationship is shown in Table 1:
[0104] Table 1
[0105] <![CDATA[K i (cycles / deg)]]> 4 8 12 16 20 24 28 <![CDATA[V r (deg / sec)]]> 14.0 6.0 3.34 2.0 1.2 0.67 0.29
[0106] Table 1 describes the K i and V r According to Table 1, the present invention sets the perceptible frequencies of the rows and columns of the transform blocks as follows: Figure 2 shown, specifically, Figure 2 It shows that the perceptible frequency corresponding to each row and column is mapped to the transform block according to the results of Table 1. Since the highest perceptible frequency is 32, the frequency change step size is 4 for 8x8 blocks and 8 for 4x4 blocks, the following is obtained: Figure 2 After the mapping relationship, the maximum perceptible frequency in the horizontal and vertical directions is determined according to the Vr of the transform block in the horizontal and vertical directions. The high-frequency coefficients of the rows and columns exceeding this frequency need to be set to zero. The red x indicates that the high-frequency coefficients are set to zero.
[0107] For 4x4 and 8x8 transform blocks, calculate and After that, it will be greater than or equal to and The high-frequency coefficients on the rows and columns are set to zero, thereby reducing the transform coefficients and ultimately achieving the goal of reducing the encoding bit rate.
[0108] The principle of modifying the rate-distortion optimization (RDO) function is described in further detail below:
[0109] One of the main tasks of a video encoder is to select the optimal coding parameters with a certain strategy to achieve the best coding performance. The coding parameter optimization method based on rate-distortion theory is called rate-distortion optimization, which is the main means to ensure the coding efficiency of the encoder.
[0110] Inter-frame prediction uses the pixels of other coded images to predict the current coding block, which adopts the Lagrangian-based rate-distortion optimization method, as shown in formula (5).
[0111] minJ J=D(Motion)+λ Mode R(Motion) (5)
[0112] Where D (Motion) and R (Motion) represent the distortion and number of bits when using different motion modes (including motion vectors, reference images, prediction weights, etc.), λ Mode is the Lagrangian factor, and the optimal prediction mode is the motion mode with the minimum rate distortion cost.
[0113] The main goal of the time-domain perceptual coding algorithm is to set the high-frequency coefficients of the transform block with high motion to zero, but after this processing, the high-frequency coefficients of the transform block are eliminated. In the RDO process, D (Motion) is generally calculated using the sum of squared differences (SSD). When the high-frequency coefficients of the transform block are eliminated, the SSD obtained after inverse transformation and inverse quantization will be much larger than the original one, which will largely change the encoder's selection of other encoding parameters, resulting in a decrease in encoding efficiency.
[0114] In order not to have too much impact on the process of selecting the optimal coding parameters of the encoder RDO, the present invention first copies the transform coefficients of the original transform block before removing the high-frequency coefficients of the transform block, and uses them to perform inverse transformation and inverse quantization to obtain SSD. The SSD obtained in this way will not become very large due to the deletion of high-frequency coefficients, so the Lagrangian-based rate-distortion optimization method can be expressed by formula (6).
[0115] minJ J=D(Motion) ori +λ Mode R (Motion) new (6)
[0116] Among them, D (Motion) ori Indicates the SSD calculated by inverse transformation and dequantization of the original transform coefficients, R (Motion) new Indicates the number of bits used in this mode after removing high-frequency coefficients.
[0117] After modifying the rate-distortion optimization calculation method, the problem of the encoder making misjudgment when selecting the optimal mode due to the SSD being too large, which results in a decrease in coding efficiency, is avoided.
[0118] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0119] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0120] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0122] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0123] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0124] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0125] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0126] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A temporal perceptual coding method based on transform block motion, characterized in that: include: Acquire target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution; Calculating the motion coefficient of the target transform block according to the target parameter; determining retinal velocities in horizontal and vertical directions according to the motion vector and the mobility coefficient; determining a maximum perceptible frequency in the horizontal direction and the vertical direction based on the retinal velocity; Determining a target number of bits and a target sum of square errors according to the maximum perceptible frequency; Determining an optimal coding mode according to the target number of bits and the target sum of square errors; Wherein, the optimal encoding mode is used for video encoding; The size of the target transform block is 4×4 or 8×8, and the calculation formula of the motion coefficient is: Wherein, M represents the motion coefficient; QP represents the quantization parameter; fps represents the video frame rate; p_w_log2 represents the logarithmic value of the video width with base 2; p_h_log2 represents the logarithmic value of the video height with base 2; tu_w_log2 represents the logarithmic value of the target transform block width with base 2; tu_h_log2 represents the logarithmic value of the target transform block height with base 2; c represents an adjustable parameter; The calculation formula of the maximum perceptible frequency is: Among them, K i represents the maximum perceptible frequency, i represents the horizontal or vertical component; K max Represents the highest perceptible frequency of the human eye; v c represents angular velocity; V r Retinal velocity representing object motion; The step of determining a target number of bits and a target sum of square errors according to the maximum perceptible frequency includes: According to the maximum perceptible frequency in the horizontal direction and the vertical direction, high frequency coefficients of the rows and columns exceeding the maximum perceptible frequency are set to zero; Calculating the target number of bits required for the current coding mode after the high frequency coefficients are set to zero; The original transform coefficients are obtained, and inverse transform and inverse quantization are performed according to the original transform coefficients to obtain the target sum of square errors.
2. The temporal perceptual coding method based on transform block motion according to claim 1, characterized in that: The calculation formula of the retinal velocity is: in, represents the horizontal retinal velocity; M represents the motility coefficient; MV x is the horizontal component of the motion vector; Represents the vertical retinal velocity; MV y is the vertical component of the motion vector.
3. The temporal perceptual coding method based on transform block motion according to claim 1, characterized in that: The step of determining the optimal coding mode according to the target number of bits and the target sum of square errors includes determining an expression for rate-distortion optimization based on Lagrangian according to the target number of bits and the target sum of square errors; The expression of rate distortion optimization is: minJ J=D(Motion) ori +λ Mode R(Motion) new Among them, D (Motion) ori Represents the sum of square errors calculated using the original transform coefficients after inverse transform and inverse quantization, r(Motion) new Indicates the target number of bits required for the current coding mode after the high-frequency coefficients are set to zero; Mode is the Lagrangian factor.
4. A device for implementing the temporal perceptual coding method based on transform block motion according to any one of claims 1 to 3, characterized in that: include: The first module is used to obtain target parameters of a target transform block in a video encoding process, wherein the target parameters include a motion vector, a video frame rate, a quantization parameter, and a video resolution; A second module is used to calculate the motion coefficient of the target transformation block according to the target parameter; A third module is used to determine the retinal velocity in the horizontal direction and the vertical direction according to the motion vector and the mobility coefficient; A fourth module is used to determine the maximum perceptible frequency in the horizontal direction and the vertical direction according to the retinal velocity; A fifth module is used to determine a target number of bits and a target sum of square errors according to the maximum perceptible frequency; A sixth module is used to determine an optimal coding mode according to the target number of bits and the target sum of square errors; The optimal encoding mode is used for video encoding.
5. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 3.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
