Video coding method and device, electronic equipment and non-transient computer readable storage medium

By calculating the block error between the current block and the expansion block of the motion compensation block in the video encoding method and determining the filter weight based on this, the problem that the existing MCTF does not consider the motion relationship between the current block and the surrounding block is solved, and more efficient is achieved time domain filtering and encoding efficiency.

CN119402653AActive Publication Date: 2025-02-07BEIJING DAJIA INTERNET INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411563178.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-07
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The existing time domain filtering method (MCTF) based on motion estimation compensation does not consider the motion relationship between the current block and the surrounding block, resulting in poor time domain filtering effect and affecting coding efficiency.

Method used

In the video encoding method, by performing motion estimation and motion compensation on the current block, the block error between the current block and the expansion block of the motion compensation block is calculated, based on this, the filter weight is determined, and the current block is time domained by weight summing Filter.

Benefits of technology

By considering the spatial correlation between the current block and adjacent blocks, the time domain filtering effect is improved and the encoding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402653A_ABST
    Figure CN119402653A_ABST
Patent Text Reader

Abstract

The invention provides a video encoding method and device, electronic equipment and a non-transient computer readable storage medium. The video encoding method comprises the steps of performing motion estimation and motion compensation on a current block; calculating a block error between the expanded block of the current block and the expanded block of the motion compensation block; determining a filtering weight based on the block error; performing time domain filtering on the current block by performing weighted summation on the current block and the motion compensation block based on the determined filtering weight; and encoding the current block based on the time domain filtering result. According to the invention, the relation between the block-level filtering weight factor and the surrounding pixels can be considered in the time domain filtering process based on motion compensation, and the surrounding pixels are utilized to correct the result of the block-level error term in the time domain filtering weight, so that the time domain filtering effect is improved, and the coding efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to video coding and compression, and more particularly to a video coding method and apparatus thereof, an electronic device and a non-transitory computer-readable storage medium. Background Art

[0002] Various electronic devices (e.g., digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc.) support digital video. Electronic devices send and receive or otherwise transmit digital video data through a communication network, and / or store digital video data on a storage device. Due to the limited bandwidth capacity of the communication network and the limited storage resources of the storage device, before the video data is transmitted or stored, the video data can be compressed using a video codec according to one or more video codec standards. For example, video codec standards include general video codec (VVC), joint exploration test model (JEM), high efficiency video codec (HEVC / H.265), advanced video codec (AVC / H.264), moving picture expert group (MPEG) codec, etc. Video codecs generally use prediction methods (e.g., inter-frame prediction, intra-frame prediction, etc.) that utilize the inherent redundancy in video data. Video codecs are intended to compress video data into a form that uses a lower bit rate while avoiding or minimizing the degradation of video quality.

[0003] Motion Compensated Temporal Filter (MCTF) is an encoder-only video filtering technology that uses the temporal correlation of the video and the inter-block reference relationship to perform temporal filtering on the reference frame to reduce the temporal redundant information generated in the video block reference process, thereby improving the overall coding efficiency.

[0004] However, MCTF does not consider the motion relationship between the current block and the surrounding blocks, which makes the temporal filtering effect poor and affects the coding efficiency. Summary of the invention

[0005] Examples of the present disclosure provide a video encoding method and apparatus thereof, an electronic device, and a non-transitory computer-readable storage medium.

[0006] According to a first aspect of the present disclosure, a video encoding method is provided, comprising: performing motion estimation and motion compensation on a current block to obtain a motion compensation block of the current block; calculating a block error between an extended block of the current block and an extended block of the motion compensation block, wherein the extended block of the current block is a block obtained by extending a surrounding pixel area with the current block as the center, and the extended block of the motion compensation block is a block obtained by extending a surrounding pixel area with the motion compensation block as the center; determining a filtering weight based on the calculated block error; performing time domain filtering on the current block by weighted summing the current block and the motion compensation block based on the determined filtering weight; and encoding the current block based on the time domain filtering result.

[0007] Optionally, the calculating the block error between the extended block of the current block and the extended block of the motion compensation block includes: calculating the sum of squares of errors between the extended block of the current block and the extended block of the motion compensation block; calculating the variance between the extended block of the current block and the extended block of the motion compensation block; and calculating the block error based on the calculated sum of squares of errors and the calculated variance.

[0008] Optionally, the calculating the sum of squared errors between the extended block of the current block and the extended block of the motion compensation block further includes: scaling the sum of squared errors and using the scaled sum of squared errors as a final sum of squared errors for calculating the block error.

[0009] Optionally, scaling the sum of squared errors includes scaling the sum of squared errors based on a ratio of an area of ​​the current block to an extended block of the current block.

[0010] Optionally, scaling the sum of squared errors based on the ratio of the areas of the current block to the extended block of the current block includes scaling the sum of squared errors based on the ratio of the areas of the current block to the extended block of the current block and a preset scaling factor.

[0011] Optionally, scaling the sum of squared errors includes scaling the sum of squared errors based on content characteristics of surrounding pixel areas of the current block in the current block and an extended block of the current block.

[0012] Optionally, the expanded block of the current block is obtained by expanding a predetermined number of pixels around the current block, and the expanded block of the motion compensation block is obtained by expanding the predetermined number of pixels around the motion compensation block.

[0013] According to a second aspect of the present disclosure, a video encoding device is provided, comprising: a motion estimation and compensation module, configured to perform motion estimation and motion compensation on a current block to obtain a motion compensation block of the current block; a block error calculation module, configured to calculate a block error between an extended block of the current block and an extended block of the motion compensation block, wherein the extended block of the current block is a block obtained by extending the current block to a surrounding pixel area, and the extended block of the motion compensation block is a block obtained by extending the motion compensation block to a surrounding pixel area; a filtering weight determination module, configured to determine a filtering weight based on the calculated block error; a time domain filtering module, configured to perform time domain filtering on the current block by weighted summing the current block and the motion compensation block based on the determined filtering weight; and an encoding module, configured to encode the current block based on the time domain filtering result.

[0014] Optionally, the block error calculation module is configured to: calculate the sum of square errors between the extended block of the current block and the extended block of the motion compensation block; calculate the variance between the extended block of the current block and the extended block of the motion compensation block; and calculate the block error based on the calculated sum of square errors and the calculated variance.

[0015] Optionally, the block error calculation module is configured to: scale the error sum of squares, and use the scaled error sum of squares as a final error sum of squares for calculating the block error.

[0016] Optionally, the block error calculation module is configured to: scale the error sum of squares based on a ratio of an area of ​​the current block to an extended block of the current block.

[0017] Optionally, the block error calculation module is configured to: scale the error sum of squares based on a ratio of an area of ​​the current block to an extended block of the current block and a preset scaling factor.

[0018] Optionally, the block error calculation module is configured to: scale the error sum of squares based on content characteristics of surrounding pixel areas of the current block in the current block and an extended block of the current block.

[0019] Optionally, the expanded block of the current block is obtained by expanding a predetermined number of pixels around the current block, and the expanded block of the motion compensation block is obtained by expanding the predetermined number of pixels around the motion compensation block.

[0020] According to a third aspect of the present disclosure, a device for video encoding is provided, comprising: one or more processors; and a memory, coupled to the one or more processors and configured to store instructions that can be executed by the one or more processors, wherein the one or more processors are configured to execute the video encoding method according to the present disclosure when executing the instructions.

[0021] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium for storing computer-executable instructions is provided, wherein the computer-executable instructions, when executed by one or more computer processors, cause the one or more computer processors to perform the video encoding method according to the present disclosure.

[0022] According to a fifth aspect of the present disclosure, a computer program product is provided, having instructions for storing a bit stream, wherein the bit stream includes: video data generated by the video encoding method of the present disclosure.

[0023] According to a sixth aspect of the present disclosure, a computer program product is provided, comprising computer instructions, which implement the video encoding method according to the present disclosure when executed by at least one processor.

[0024] According to a seventh aspect of the present disclosure, a method for generating a bit stream is provided, comprising: generating a bit stream according to the video encoding method described in the present disclosure.

[0025] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0026] According to the video encoding method disclosed in the present invention, in the temporal filtering process based on motion compensation, when calculating the block-level error, the current block used to calculate the block-level error is expanded to a larger block around it for calculating the block-level error, based on which the relationship between the block-level filtering weight factor and the surrounding pixels is considered, and the result of the block-level error term in the temporal filtering weight is corrected using the surrounding pixels. In other words, the present invention considers the spatial correlation between the current block and the adjacent blocks in the temporal filtering process based on motion compensation, and uses the overlapping block idea to calculate the block-level error in the MCTF filtering weight, which can ensure the improvement of the temporal filtering effect and the improvement of the coding efficiency.

[0027] It is to be understood that both the foregoing general description and the following detailed description are examples only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate examples according to the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0029] Figure 1is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.

[0030] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0031] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0032] Figure 4 is a schematic diagram showing a spatial domain filtering method using a Gaussian filter kernel in the related art.

[0033] Figure 5 is a flowchart illustrating a video encoding method according to an exemplary embodiment of the present disclosure.

[0034] Figure 6 is a schematic diagram illustrating motion estimation and motion compensation according to an exemplary embodiment of the present disclosure.

[0035] Figure 7 FIG. 4 is a schematic diagram showing how to expand a block to obtain an expanded block according to an exemplary embodiment of the present disclosure.

[0036] Figure 8 is a block diagram illustrating a video encoding apparatus according to an exemplary embodiment of the present disclosure.

[0037] Fig. 9 is a diagram illustrating a computing environment coupled with a user interface according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0038] Reference will now be made in detail to specific embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, a number of non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, various alternatives may be used without departing from the scope of the claims, and the subject matter may be practiced without these specific details. For example, the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the drawings are used to distinguish objects, but not to describe any specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those shown in the drawings or described in the present disclosure.

[0040] Figure 1is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a target device 14. Source device 12 and target device 14 may include any of a wide variety of electronic devices, including cloud servers, server computers, desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and target device 14 are equipped with wireless communication capabilities.

[0041] In some implementations, target device 14 may receive the encoded video data to be decoded via link 16. Link 16 may include any type of communication medium or device capable of moving the encoded video data from source device 12 to target device 14.

[0042] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. The encoded video data in the storage device 32 may then be accessed by the target device 14 via the input interface 28.

[0043] like Figure 1 , source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include sources such as, or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video.

[0044] The captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be sent directly to target device 14 via output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and / or playback.

[0045] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.

[0046] The video encoder 20 and the video decoder 30 can operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, Part 10 of MPEG-4, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current standards or future standards.

[0047] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic devices, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0048] Figure 2 is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding on video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding and decoding, the term "frame" can be used as a synonym for the term "image" or "picture".

[0049] like Figure 2As shown in , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundary to remove the block effect from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (SAO) filter, a cross-component sample adaptive offset (CCSAO) filter, and / or an adaptive loop filter (ALF)) can also be used to filter the output of the adder 62. In some examples, the loop filter may be omitted, and the decoded video blocks may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.

[0050] Video data memory 40 may store video data to be encoded by components of video encoder 20. Figure 1 Video source 18 is shown obtaining video data in video data memory 40. DPB 64 is a buffer that stores reference video data (eg, reference frames or pictures) for use by video encoder 20 in encoding the video data (eg, in intra or inter prediction coding modes).

[0051] like Figure 2 As shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into strips, tiles (e.g., a set of video blocks), or other larger coding units (CUs) according to a predefined splitting structure associated with the video data, such as a quadtree (QT) structure. It should be noted that the terms "block" or "video block" used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU), or a transform unit (TU) and / or may be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB), or a transform block (TB)) and / or a sub-block.

[0052] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (e.g., motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.

[0053] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.

[0054] In some embodiments, motion estimation unit 42 determines an inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion of a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame associated with a current block being encoded within the current frame. The predetermined pattern may designate a video frame in a sequence as a P frame or a B frame. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vector determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine a block vector.

[0055] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0056] Intra-prediction processing unit 46 may encode the current block using various intra-prediction modes, for example, during separate encoding passes, and intra-prediction processing unit 46 (or, in some examples, mode selection unit) may select an appropriate intra-prediction mode to use from the tested intra-prediction modes. Intra-prediction processing unit 46 may provide information indicating the intra-prediction mode selected for the block to entropy encoding unit 56. Entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode into the bitstream.

[0057] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform (e.g., a discrete cosine transform (DCT) or a conceptually similar transform).

[0058] The transform processing unit 52 may send the resulting transform coefficients to a quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, the quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Alternatively, the entropy coding unit 56 may perform the scan.

[0059] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to a video bitstream such as a Figure 1 The video decoder 30 shown, or archived as Figure 1 The video frame may be stored in storage device 32 as shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

[0060] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0061] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0062] Figure 3 1 is a block diagram showing an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned Figure 2 The encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0063] In some examples, embodiments of the present disclosure may be dispersed in one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80. In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.

[0064] Video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of video decoder 30. Video data stored in video data memory 79 may be obtained, for example, from storage device 32, from a local video source (e.g., a camera), via wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk).

[0065] See

[0066] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators, and other syntax elements to the prediction processing unit 81.

[0067] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, the intra-prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.

[0068] When the video frame is encoded as an inter-frame prediction coding (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0069] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0070] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for a video block of the current video frame by parsing motion vectors and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded.

[0071] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video blocks to calculate interpolated values ​​for sub-integer pixels of reference blocks. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 based on the received syntax elements and use these interpolation filters to produce the prediction blocks.

[0072] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0073] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (e.g., a deblocking filter, an SAO filter, a CCSAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1 on a display device 34).

[0074] As mentioned above, the motion estimation compensated temporal filtering method (Motion Compensated Temporal Filter, MCTF) is an encoder-only video filtering technology. This technology uses the temporal correlation of the video and the inter-block reference relationship to perform temporal filtering on the reference frame to reduce the temporal redundant information generated in the video block reference process, thereby improving the overall coding efficiency.

[0075] MCTF technology can be mainly divided into two parts, namely the "motion estimation and compensation part" and the "filtering part". In the "motion estimation and compensation part", MCTF will first perform block-level motion estimation (Motion Estimation, ME). Specifically, the current image can be evenly divided into multiple blocks of m×m size, for example, multiple blocks of 8×8, and each block can be searched to obtain a motion vector (Motion Vector, MV). Then, MV can be used to perform classic block-based motion compensation on each 8×8 block, and then all 8×8 motion compensated image blocks can be directly spliced ​​to obtain a motion frame. In this way, this motion compensation process can be performed for each adjacent frame of the current frame, and then multiple motion compensated frames corresponding to multiple adjacent frames of the current frame can be obtained. In the "filtering part", each block of the current frame and the multiple motion compensated blocks corresponding to the adjacent frames are weighted according to a certain proportion and bilateral filtering is performed to generate the final time domain filtering result.

[0076] Among them, for the "filtering part", the bilateral filtering weight of each pixel can be generated according to the motion compensation frame, wherein the bilateral filtering weight of each pixel can be composed of three parts: frame-level weight factor, block-level weight factor, and pixel-level weight factor, that is, the final weight of each pixel can be determined by the three together. Specifically, the "frame-level weight factor" can be a basic weight set according to the attributes of the current frame, such as the reference level, frame type, etc.; the "block-level weight factor" is to calculate the error and variance information between the compensated image block and the original image block for each 8×8 block, and then obtain the "block-level weight factor" based on the calculated error and variance; the "pixel-level weight factor" can be the error of each pixel, and then the "pixel-level weight factor" can be obtained based on the error of each pixel. Next, each pixel in the current frame and the corresponding motion compensation pixel in the adjacent frame can be weighted and bilaterally filtered to obtain the final time domain filtering result.

[0077] Specifically, for the filtering part of MCTF, a bilateral filter is used. Luminance is filtered in units of 8×8 blocks, and chrominance is filtered in units of 4×4 blocks. n Represents the pixel value after filtering, I o is the original pixel value, I r (i) is the pixel value of the best matching block obtained by motion compensation in a reference frame, that is, the pixel value of the motion compensated block, w r (i, a) is the weight corresponding to each reference frame. Therefore, the filtering process is actually the process of weighted summation of each reference block and the original block, that is, the filtering process is actually the process of weighted summation of each motion compensation block and the current block.

[0078] Filtering is done in blocks: 8×8 blocks for luma and 4×4 blocks for chroma (YUV420)

[0079] The pixel value of the current frame after temporal filtering;

[0080] I o , the original pixel value of the current frame;

[0081] I r (i) The pixel value of the best matching block in the i-th reference frame, i.e., the pixel value of the motion compensation block;

[0082] w r (i, a), the weight of the i-th reference frame, where a reference frames are available;

[0083]

[0084] ΔI(i)=I r (i)-I o

[0085] Among them, s o (n) represents the overall filtering strength of the nth frame (i.e., the current frame), s r (i, a) represents the reference frame weight, which depends on the distance between the reference frame and the original frame, σ w , σ c , σ l The parameter is related to the quantization parameter (QP), where σ l represents the σ parameter for the luminance component (luma), σ c Represents the σ parameter for the chroma component. ΔI(i) 2 To compensate for the square of the difference between the pixel and the original pixel, it is related to each pixel. The coefficient 0.4 corresponds to the weight parameter of the brightness component, and the coefficient 0.55 corresponds to the weight parameter of the chrominance component.

[0086] It can be seen that the weight value w r (i, a) is related to multiple indicators, including: sequence frame level parameters (e.g., s o (n), s r (i, a)), block-level parameters (e.g., w a , σ w , σ c , σ l ), pixel-level parameters (e.g., ΔI(i) 2 )etc.

[0087] For the 8×8 block-level parameter w a and σ w , using block frequency F and block error E to calculate:

[0088]

[0089] in,

[0090]

[0091] SSD represents the sum of squared errors between the current block and the motion compensation block, V represents the variance between the current block and the motion compensation block, S 2 Indicates the size of the current block. For example, for a 8×8 current block, the size of the current block is: S 2 =8×8=64.

[0092] However, the block error E in the existing algorithm is only calculated using the internal pixels of the current 8×8 block, and does not consider the surrounding information. It can be seen that the existing MCTF does not consider the motion relationship between the current block and the surrounding blocks, resulting in poor filtering weights, which in turn affects the coding efficiency.

[0093] In addition, in the related art, a temporal filtering technology based on overlapping block motion compensation is proposed. This technology takes into account the spatial correlation in the motion estimation, motion compensation, and filtering process in the temporal filtering. That is, the idea of ​​overlapping blocks with spatial correlation is considered to improve the traditional motion estimation, motion compensation, and filtering process to reduce the block effect of the frame after temporal filtering, thereby improving the encoding performance of the MCTF tool. Specifically, the temporal filtering technology of overlapping block motion compensation can first perform a spatial filtering on the filter weights of the block edge. For example, the spatial filtering method of the Gaussian filter kernel can be used to perform spatial filtering on the filter weights of the block edge.

[0094] Figure 4 is a schematic diagram showing a spatial domain filtering method using a Gaussian filter kernel in the related art. Figure 4 For the weight of each edge pixel above the current block, the weight information of the adjacent block above can be used to perform spatial filtering using a Gaussian filter kernel to obtain a new filter weight for each edge pixel above. For example, a Gaussian filter kernel of size 3×3 can be used for spatial filtering. Then, the weights of the left edge, bottom edge, and right edge can be spatially filtered respectively to obtain the final time domain filter weight. Next, the final time domain filter weight can be used to perform time domain bilateral filtering to obtain the final filtered frame.

[0095] However, during the filtering process, the time domain filtering technology of overlapping block motion compensation only considers the filtering weights of surrounding pixels for the filtering weights of each pixel in the block, and does not consider the information of surrounding blocks at the block-level weight parameter level, resulting in limited improvement in filtering performance.

[0096] In order to solve the above-mentioned problems existing in the related art, the video encoding method and its device, electronic device and non-transitory computer-readable storage medium provided by the present disclosure, in the process of temporal filtering based on motion compensation, when calculating the block-level error, the current block used to calculate the block-level error is expanded to a larger block around to calculate the block-level error, based on which the relationship between the block-level filtering weight factor and the surrounding pixels is considered, and the result of the block-level error term in the temporal filtering weight is corrected using the surrounding pixels. That is to say, the present disclosure considers the spatial correlation between the current block and the adjacent blocks in the process of temporal filtering based on motion compensation, and uses the overlapping block idea to calculate the block-level error in the MCTF filtering weight, which can ensure the improvement of the temporal filtering effect and the improvement of the coding efficiency.

[0097] Next, we will combine Figures 5 to 9 The implementation process of the video encoding method in the present disclosure is described in detail.

[0098] Reference Figure 5 In step 501, motion estimation and motion compensation may be performed on the current block to obtain a motion compensated block of the current block.

[0099] For the "motion estimation" part: Assume that the current frame is I t , that is, for the current frame I t To filter, several frames before and after the current frame are needed. For example, four frames before and after the current frame are filtered in sequence. t Perform block-level motion estimation. Assuming the number of adjacent frames N = 8, it can be recorded as: I t-4 ,I t-3 ,I t-2 ,I t-1 ,I t+1 ,I t+2 ,I t+3 ,I t+4 .like Figure 6 As shown, Figure 6 is a schematic diagram illustrating motion estimation and motion compensation according to an exemplary embodiment of the present disclosure, wherein the current frame I t The first four frames are: t-4 ,I t-3 ,I t-2 ,I t-1 , current frame I t The last four frames are: t+1 ,I t+2 ,I t+3 ,I t+4 In this way, the current frame I can be searched t Each 8×8 block in the image corresponds to a most similar block in each of the 8 adjacent frames, and the position offset of the similar block relative to the current block can be represented by a motion vector MV.

[0100] Exemplarily, in order to speed up the motion estimation process, a pyramid motion estimation form may be used, that is, a fast estimation may be performed on the downsampled image first, and then the original resolution ME may be performed based on the downsampled motion estimation ME result. Specifically, integer pixel ME may be performed first for the original resolution, and then sub-pixel ME may be performed based on the integer pixel result, and finally an MV corresponding to each block may be obtained.

[0101] Regarding the "motion compensation" part: for the current 8×8 block, in each adjacent frame, the corresponding MV searched can be directly used to perform classic block-level motion compensation to obtain the motion compensated image block corresponding to the adjacent frame. In this way, by performing motion compensation in 8 adjacent frames respectively, 8 image blocks with the best match corresponding to 8 adjacent frames can be obtained, that is, 8 motion compensated blocks.

[0102] In step 502, a block error between an extended block of the current block and an extended block of the motion compensation block may be calculated, wherein the extended block of the current block may be a block obtained by extending the current block to a surrounding pixel region; and the extended block of the motion compensation block may be a block obtained by extending the motion compensation block to a surrounding pixel region.

[0103] According to an exemplary embodiment of the present disclosure, the expanded block of the current block can be obtained by expanding a predetermined number a of pixels around the current block; the expanded block of the motion compensation block can also be obtained by expanding a predetermined number a of pixels around the motion compensation block.

[0104] For example, a may be, but is not limited to, 2, that is, 2 pixels may be filled around the current block 8×8 to obtain a 12×12 expanded block of the current block. In this case, the obtained expanded block is a square block. Of course, the expansion number a is variable, and the obtained expanded block may also be non-square. Figure 7 FIG. 2 is a schematic diagram showing a method of expanding a block to obtain an expanded block according to an exemplary embodiment of the present disclosure. Figure 7 , the current block of the original size of m×m can be expanded around it, and then an expanded block of the size of n×n can be obtained.

[0105] It should be noted that the number of pixels filled around a block can be the same or different. And if the number of pixels filled around a block is the same, the obtained expanded block is a square block; if the number of pixels filled around a block is different, the obtained expanded block is a non-square block. For example, 1 pixel can be filled at the left edge of the 8×8 block, 3 pixels can be filled at the right edge of the block, 2 pixels can be filled at the upper edge of the block, and 4 pixels can be filled at the lower edge of the block. In this case, a 12×14 non-square expanded block is obtained.

[0106] According to an exemplary embodiment of the present disclosure, the sum of squared differences (SSD) between the extended block of the current block and the extended block of the motion compensation block may be calculated, and the variance (Variance, V) between the extended block of the current block and the extended block of the motion compensation block may be calculated. Then, based on the calculated sum of squared differences SSD and the calculated variance V, the block error E may be calculated:

[0107]

[0108] It should be noted that in the related art, when calculating the block error E, only the internal pixels contained in the current block 8×8 are used to calculate the SSD and the variance V, and then the block error E is calculated based on the calculated SSD and the variance V.

[0109] In the present disclosure, when calculating the block-level error E, the surrounding pixel area of ​​the current block is further considered. That is, the current block m×m can be expanded to the surrounding area to obtain an expanded block n×n, and then the error square sum SSD_pad and variance V_pad can be calculated based on the pixels in the expanded block n×n.

[0110] According to an exemplary embodiment of the present disclosure, the square error sum of the expanded block may be scaled, and the scaled square error sum may be used as the final square error sum for calculating the block error E.

[0111] According to an exemplary embodiment of the present disclosure, the error sum of squares may be scaled based on the area ratio of the current block to the expanded block of the current block. That is, the scaled error sum of squares SSD′ may be expressed by the following formula:

[0112] SSD′=SSD_pad*(m*m) / (n*n)

[0113] Among them, SSD_pad represents the sum of squared errors calculated using pixels in the expanded block n×n, m*m represents the size of the block before expansion, and n*n represents the size of the expanded block obtained after expansion.

[0114] In addition, the variance V_pad of the expanded block may be used directly when calculating the block error E. Then, based on the scaled error sum of squares SSD′ and the variance V_pad of the expanded block, the filter weight may be calculated.

[0115] According to an exemplary embodiment of the present disclosure, the error sum of squares may also be scaled based on the area ratio of the current block to the expanded block of the current block and a preset scaling factor. The preset scaling factor may be flexibly set according to actual needs, and the present disclosure does not limit the specific value of the preset scaling factor. At this time, the scaled error sum of squares SSD′ may be expressed by the following formula:

[0116] SSD′=α*SSD_pad*(m*m) / (n*n)

[0117] Wherein, α is the above-mentioned preset scaling factor.

[0118] According to an exemplary embodiment of the present disclosure, the error sum of squares may also be scaled based on content characteristics of surrounding pixel regions of the current block in the current block and an extended block of the current block.

[0119] For example, the content contained in the current block may be relatively complex, for example, the texture may be relatively complex; while the filling content of the surrounding area of ​​the current block may be relatively simple, for example, it may be only a single background content. At this time, the feature value of the content between the current block and the surrounding area of ​​the current block can be calculated, that is, the feature value of the content between the central block and the surrounding blocks can be calculated, and then the scaling weight of the error sum of squares can be adjusted based on the calculated feature value of the content. Among them, the content features can include but are not limited to: mean, variance, etc.

[0120] In step 503, the filtering weight may be determined based on the calculated block error E. Exemplarily, as described above, the weight w corresponding to each reference frame may be determined based on the calculated block error E. r (i, a).

[0121] In step 504, the current block can be subjected to time domain filtering by weighted summing the current block and the motion compensation block based on the determined filtering weights. r (i, a), weighted sum is performed on the current block and the motion compensation block to perform time domain filtering on the current block. Exemplarily, as mentioned above, the current block can be filtered in the time domain by the following formula:

[0122]

[0123] In step 505, the current block may be encoded based on the time domain filtering result. For example, information related to the time domain filtering result may be encoded into a bit stream, and then sent to a decoder by a signal, so that the decoder may decode the current block based on parsing the information related to the time domain filtering result from the bit stream.

[0124] Figure 8 is a block diagram illustrating a video encoding apparatus 800 according to an exemplary embodiment of the present disclosure.

[0125] Reference Figure 8 The video encoding device 800 may include a motion estimation and compensation module 801, a block error calculation module 802, a filtering weight determination module 803, a time domain filtering module 804 and an encoding module 805.

[0126] The motion estimation and compensation module 801 may perform motion estimation and motion compensation on the current block to obtain a motion compensated block of the current block.

[0127] The block error calculation module 802 can calculate the block error between the extended block of the current block and the extended block of the motion compensation block, wherein the extended block of the current block can be a block obtained by extending the surrounding pixel area with the current block as the center; the extended block of the motion compensation block can be a block obtained by extending the surrounding pixel area with the motion compensation block as the center.

[0128] According to an exemplary embodiment of the present disclosure, the expanded block of the current block can be obtained by expanding a predetermined number a of pixels around the current block; the expanded block of the motion compensation block can also be obtained by expanding a predetermined number a of pixels around the motion compensation block.

[0129] According to an exemplary embodiment of the present disclosure, the block error calculation module 802 may calculate the error sum of squares SSD between the extended block of the current block and the extended block of the motion compensation block, and the block error calculation module 802 may calculate the variance (Variance, V) between the extended block of the current block and the extended block of the motion compensation block. Then, the block error calculation module 802 may calculate the block error E based on the calculated error sum of squares SSD and the calculated variance V.

[0130] According to an exemplary embodiment of the present disclosure, the block error calculation module 802 may scale the error sum of squares of the expanded block, and may use the scaled error sum of squares as the final error sum of squares for calculating the block error E.

[0131] According to an exemplary embodiment of the present disclosure, the block error calculation module 802 may scale the error sum of squares based on the ratio of the area of ​​the current block to the area of ​​the extended block of the current block to obtain the scaled error sum of squares SSD′

[0132] The variance V_pad of the expanded block can be used directly when calculating the block error E. Then, based on the scaled error sum of squares SSD′ and the variance V_pad of the expanded block, the filter weight can be calculated.

[0133] According to an exemplary embodiment of the present disclosure, the block error calculation module 802 can also scale the error sum of squares based on the area ratio of the current block to the expanded block of the current block and a preset scaling factor. The preset scaling factor can be flexibly set according to actual needs, and the present disclosure does not limit the specific value of the preset scaling factor.

[0134] According to an exemplary embodiment of the present disclosure, the block error calculation module 802 may further scale the error sum squares based on content characteristics of the surrounding pixel regions of the current block in the current block and an extended block of the current block.

[0135] The filter weight determination module 803 may determine the filter weight based on the calculated block error E. For example, as described above, the weight w corresponding to each reference frame may be determined based on the calculated block error E. r (i, a).

[0136] The temporal filtering module 804 can perform temporal filtering on the current block by weighted summing the current block and the motion compensation block based on the determined filtering weight. r (i, a), weighted sum is performed on the current block and the motion compensation block to perform time domain filtering on the current block.

[0137] The encoding module 805 may encode the current block based on the time domain filtering result. For example, the encoding module 805 may encode information related to the time domain filtering result into a bit stream, thereby sending a signal to a decoder, so that the decoder can decode the current block based on parsing the information related to the time domain filtering result from the bit stream.

[0138] Fig. 9 A computing environment 910 is shown coupled to a user interface 950. The computing environment 910 may be part of a data processing server. The computing environment 910 includes a processor 920, a memory 930, and an input / output (I / O) interface 940.

[0139] The processor 920 generally controls the overall operation of the computing environment 910, such as operations associated with display, data acquisition, data communication, and image processing. The processor 920 may include one or more processors for executing instructions to perform all or some steps in the above method. In addition, the processor 920 may include one or more modules that facilitate the interaction between the processor 920 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.

[0140] The memory 930 is configured to store various types of data to support the operation of the computing environment 910. The memory 930 may include predetermined software 932. Examples of such data include instructions for any application or method operating on the computing environment 910, video data sets, image data, etc. The memory 930 may be implemented by using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0141] The I / O interface 940 provides an interface between the processor 920 and peripheral interface modules (e.g., keyboard, click wheel, buttons, etc.). The buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. The I / O interface 940 may be coupled to an encoder and a decoder.

[0142] In an embodiment, a non-transitory computer-readable storage medium including, for example, a plurality of programs in a memory 930 and / or storing a bit stream generated by the above encoding method or a bit stream to be decoded by the above decoding method is also provided, wherein the plurality of programs can be executed by a processor 920 in a computing environment 910 to perform the above method. In one example, the plurality of programs can be executed by a processor 920 in a computing environment 910 to (for example, from Figure 2 The video encoder 20 in the computing environment 910 receives a bit stream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by the processor 920 in the computing environment 910 to perform the above-mentioned decoding method according to the received bit stream or data stream. In another example, the multiple programs can be executed by the processor 920 in the computing environment 910 to perform the above-mentioned encoding method to encode the video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bit stream or data stream, and can also be executed by the processor 920 in the computing environment 910 to (e.g., to Figure 3Alternatively, a non-transitory computer-readable storage medium may store the bit stream or data stream generated by the encoder (e.g., Figure 2 The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 3 A bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) used by the video decoder 30 in the video decoder 30 when decoding video data. The non-transitory computer-readable storage medium can be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0143] In an embodiment, a bit stream generated by the above encoding method or a bit stream to be decoded by the above decoding method is provided. In an embodiment, a bit stream including encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method is provided.

[0144] In an embodiment, a computing device is also provided, which includes: one or more processors (e.g., processor 920); and a non-transitory computer-readable storage medium or memory 930 in which multiple programs that can be executed by the one or more processors are stored, wherein the one or more processors are configured to perform the above-mentioned method when executing the multiple programs.

[0145] In an embodiment, a computer program product having instructions for storing or transmitting a bitstream is also provided, wherein the bitstream includes encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method. In an embodiment, a computer program product including, for example, a plurality of programs in a memory 930 is also provided, wherein the plurality of programs can be executed by a processor 920 in a computing environment 910 for performing the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.

[0146] In an embodiment, the computing environment 910 may be implemented by one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for performing the above methods.

[0147] In an embodiment, a method for storing a bit stream is also provided, comprising: storing the bit stream on a digital storage medium, wherein the bit stream comprises encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method.

[0148] In an embodiment, a method for transmitting a bit stream generated by the above encoder is also provided. In an embodiment, a method for receiving a bit stream to be decoded by the above decoder is also provided.

[0149] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.

[0150] Unless otherwise specifically stated, the order of steps of the method according to the present disclosure is intended to be illustrative only, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but can be changed according to actual conditions. In addition, at least one of the steps of the method according to the present disclosure can be adjusted, combined or deleted according to actual needs.

[0151] The examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the specific use contemplated. Therefore, it will be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.

Claims

1. A video encoding method, characterized in that: include: Performing motion estimation and motion compensation on the current block to obtain a motion compensated block of the current block; Calculating a block error between an extended block of the current block and an extended block of the motion compensation block, wherein the extended block of the current block is a block obtained by extending a surrounding pixel region with the current block as the center, and the extended block of the motion compensation block is a block obtained by extending a surrounding pixel region with the motion compensation block as the center; Determining a filter weight based on the calculated block error; Performing time-domain filtering on the current block by performing weighted summation on the current block and the motion compensation block based on the determined filtering weight; Based on the time domain filtering result, the current block is encoded.

2. The encoding method according to claim 1, characterized in that The calculating a block error between the extended block of the current block and the extended block of the motion compensation block comprises: Calculating a sum of squares of errors between an extended block of the current block and an extended block of the motion compensation block; Calculating a variance between an extended block of the current block and an extended block of the motion compensation block; The block error is calculated based on the calculated error sum of squares and the calculated variance.

3. The encoding method according to claim 2, characterized in that The calculating the sum of square errors between the extended block of the current block and the extended block of the motion compensation block further includes: The error sum of squares is scaled, and the scaled error sum of squares is used as a final error sum of squares for calculating the block error.

4. The encoding method according to claim 3, characterized in that The step of scaling the error sum of squares comprises: The error sum of squares is scaled based on a ratio of an area of ​​the current block to an extended block of the current block.

5. The encoding method according to claim 4, characterized in that: The step of scaling the error sum of squares based on the ratio of the area of ​​the current block to the area of ​​the extended block of the current block comprises: The error sum of squares is scaled based on a ratio of an area of ​​the current block to an extended block of the current block and a preset scaling factor.

6. The encoding method according to claim 3, characterized in that: The step of scaling the error sum of squares comprises: The error sum of squares is scaled based on content characteristics of surrounding pixel areas of the current block in the current block and an extended block of the current block.

7. The encoding method according to claim 1, characterized in that: The expanded block of the current block is obtained by expanding a predetermined number of pixels around the current block, and the expanded block of the motion compensation block is obtained by expanding the predetermined number of pixels around the motion compensation block.

8. A video encoding device, characterized in that: include: A motion estimation and compensation module, configured to perform motion estimation and motion compensation on a current block to obtain a motion compensation block of the current block; a block error calculation module, configured to calculate a block error between an extended block of a current block and an extended block of the motion compensation block, wherein the extended block of the current block is a block obtained by extending a surrounding pixel region with the current block as the center, and the extended block of the motion compensation block is a block obtained by extending a surrounding pixel region with the motion compensation block as the center; A filter weight determination module configured to determine a filter weight based on the calculated block error; A time domain filtering module, configured to perform time domain filtering on the current block by performing weighted summation on the current block and the motion compensation block based on a determined filtering weight; The encoding module is configured to encode the current block based on the time domain filtering result.

9. An apparatus for video encoding, comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein, when executing the instructions, the one or more processors are configured to perform the video encoding method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the video encoding method according to any one of claims 1-7.

11. A computer program product having instructions for storing a bitstream, wherein: The bitstream includes: Video data generated by the video encoding method according to any one of claims 1 to 7.

12. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by at least one processor, the video encoding method according to any one of claims 1 to 7 is implemented.

13. A method for generating a bitstream, comprising: A bit stream is generated according to the video encoding method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Deblocking filtering method considering intra-BL mode and multilayer video encoder / decoder using the same

    CN101233756A

  • Video time-space domain collaborative preprocessing method and related device

    CN116156186A

  • Filtering of fill samples on boundaries in image / video coding

    CN117063470A

  • Video frame filtering method, video frame coding method and video frame filtering device

    CN117834881A

  • Method and apparatus of video processign

    TW202005393A

Cited By

  • Time domain filtering method and device based on video block error, equipment and medium

    CN120075472A

  • Time-domain Filtering Method, Device, Equipment and Medium Based on Video Block Error

    CN120075472B