Video coding method, device and equipment based on adaptive loop filtering

By determining whether the image frame is a still image frame in the video encoding and skipping the adaptive loop filtering process, the problem of excessive utilization of adaptive loop filtering calculation is solved, and the efficiency of video encoding is improved.

CN119996713APending Publication Date: 2025-05-13BIGO TECH PTE LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510137501.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Adaptive loop filtering accounts for too high a calculation time during video encoding, resulting in waste of computing resources and inefficient encoding efficiency.

Method used

By determining the absolute value and information of the transform residual of the image block in the image frame to be encoded, it is determined whether the image frame is a still image frame, and the adaptive loop filtering process is skipped in the case of the still image frame.

Benefits of technology

The computing resource consumption of adaptive loop filtering processing is reduced and the efficiency of video encoding is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996713A_ABST
    Figure CN119996713A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video coding method, device and equipment based on adaptive loop filtering. According to the technical scheme provided by the embodiment of the invention, by determining the transform residual absolute value and information and / or motion vector information of the plurality of image blocks in the to-be-coded image frame, when the time domain layering level of the to-be-coded image frame is greater than the preset level, the to-be-coded image frame is coded; and determining whether the to-be-coded image frame is a still image frame or not according to the transform residual absolute value sum information and / or the motion vector information, and when the to-be-coded image frame is the still image frame, performing coding processing without adaptive loop filtering on the to-be-coded image frame, skipping partial adaptive loop filtering processing with poor effect, and performing coding processing without adaptive loop filtering on the to-be-coded image frame. Computing resources consumed by self-adaptive loop filtering processing are reduced, and the video coding efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video encoding technology, and in particular to a video encoding method, apparatus and device based on adaptive loop filtering. Background Art

[0002] Adaptive loop filtering (ALF) technology is used in video coding. This technology is based on the principle of Wiener filtering. It establishes the Wienerhof equation through the original image and reconstructed image information to solve the filter coefficient with the minimum mean square error, thereby reducing the reconstruction error and improving the image quality.

[0003] Adaptive filtering is based on the statistical characteristics of images and the minimum mean square error criterion. It assumes that the input image consists of the desired image and noise, and then minimizes the mean square error between the desired image and the output image by adjusting the filter parameters. By continuously adjusting the filter parameters, the output image is made close to the desired image, thereby achieving the effect of denoising, enhancement or restoration. However, the calculation of adaptive loop filtering accounts for a very high proportion of the entire encoding process. The adaptive loop filtering process consumes a lot of computing resources, which seriously affects the efficiency of video encoding. Summary of the invention

[0004] The embodiments of the present application provide a video encoding method, apparatus and device based on adaptive loop filtering to solve the technical problems in the related art that the calculation of adaptive loop filtering accounts for a very high proportion of the time in the entire encoding process, the adaptive loop filtering processing consumes a large amount of computing resources, and the efficiency of video encoding is low. Part of the adaptive loop filtering processing can be skipped to reduce the computing resources consumed by the adaptive loop filtering processing, thereby effectively improving the efficiency of video encoding.

[0005] In a first aspect, an embodiment of the present application provides a video encoding method based on adaptive loop filtering, comprising:

[0006] Determine transformation residual absolute values ​​and information and / or motion vector information of a plurality of image blocks in an image frame to be encoded;

[0007] In a case where the temporal hierarchical level of the image frame to be encoded is greater than a preset level, determining whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information;

[0008] In the case that the image frame to be encoded is a still image frame, encoding processing without using adaptive loop filtering is performed on the image frame to be encoded.

[0009] In a second aspect, an embodiment of the present application provides a video encoding device based on adaptive loop filtering, including an information determination module, a stillness judgment module and an encoding processing module, wherein:

[0010] The information determination module is configured to determine the transformation residual absolute value sum information and / or motion vector information of multiple image blocks in the image frame to be encoded;

[0011] The still judgment module is configured to determine whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information when the temporal hierarchical level of the image frame to be encoded is greater than a preset level;

[0012] The encoding processing module is configured to perform encoding processing on the image frame to be encoded without using adaptive loop filtering when the image frame to be encoded is a still image frame.

[0013] In a third aspect, an embodiment of the present application provides a video encoding device based on adaptive loop filtering, including: a memory and one or more processors;

[0014] The memory is used to store one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the video encoding method based on adaptive loop filtering as described in the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the video encoding method based on adaptive loop filtering as described in the first aspect.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium, and at least one processor of a device reads and executes the computer program from the computer-readable storage medium, so that the device performs the video encoding method based on adaptive loop filtering as described in the first aspect.

[0018] The embodiment of the present application determines the absolute values ​​and information of the transformation residuals and / or the motion vector information of multiple image blocks in the image frame to be encoded. When the time domain stratification level of the image frame to be encoded is greater than a preset level, it determines whether the image frame to be encoded is a still image frame according to the absolute values ​​and information of the transformation residuals and / or the motion vector information. When the image frame to be encoded is a still image frame, the image frame to be encoded is encoded without using adaptive loop filtering, and some adaptive loop filtering processes with poor effects are skipped, thereby reducing the computing resources consumed by the adaptive loop filtering process and effectively improving the efficiency of video encoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of a video encoding method based on adaptive loop filtering provided in an embodiment of the present application;

[0020] Figure 2 It is a schematic diagram of hierarchical division in the time domain;

[0021] Figure 3 is a flowchart of another video encoding method based on adaptive loop filtering provided in an embodiment of the present application;

[0022] Figure 4 is a structural schematic diagram of a video encoding device based on adaptive loop filtering provided in an embodiment of the present application;

[0023] Figure 5 It is a structural schematic diagram of a video encoding device based on adaptive loop filtering provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0025] The video coding method based on adaptive loop filtering provided in the present application can be applied to video coding scenarios, and aims to determine whether to skip some adaptive loop filtering processing with poor effects based on the absolute values ​​and information of the transformation residuals of multiple image blocks in the image frame to be encoded and / or the motion vector information, thereby reducing the computing resources consumed by the adaptive loop filtering processing and improving the efficiency of video coding.

[0026] In existing video coding schemes, adaptive filtering is often performed on the image to be coded so that the output image is close to the desired image, thereby achieving the effect of denoising, enhancement or restoration. However, the calculation of adaptive loop filtering accounts for a very high proportion of the time in the entire coding process, and the adaptive loop filtering process consumes a large amount of computing resources, which seriously affects the efficiency of video coding. Based on this, a video coding method based on adaptive loop filtering according to an embodiment of the present application is provided to solve the technical problem that the calculation of the existing adaptive loop filtering accounts for a very high proportion of the time in the entire coding process, the adaptive loop filtering process consumes a large amount of computing resources, and the efficiency of video coding is low.

[0027] Figure 1 A flowchart of a video encoding method based on adaptive loop filtering provided in an embodiment of the present application is given. The video encoding method based on adaptive loop filtering provided in an embodiment of the present application can be executed by a video encoding device based on adaptive loop filtering. The video encoding device based on adaptive loop filtering can be implemented in hardware and / or software and integrated in a video encoding device based on adaptive loop filtering.

[0028] The following description is made by taking an adaptive loop filter-based video encoding device performing an adaptive loop filter-based video encoding method as an example. Figure 1 , the video encoding method based on adaptive loop filtering includes:

[0029] S110: Determine transformation residual absolute value sum information and / or motion vector information of multiple image blocks in the image frame to be encoded.

[0030] Exemplarily, each image frame in the to-be-encoded video is obtained in sequence for encoding processing. For the to-be-encoded image frame that currently needs to be encoded, the to-be-encoded image frame is divided into multiple image blocks, and the transformation residual absolute value and information (SATD, sum of absolute transformed differences, the sum of the residual absolute values ​​between the original image and the transformed image after encoding or pre-encoding the image) and / or motion vector information (MV, Motion Vecto, i.e., the motion distance of a certain image block of the current frame relative to the reference frame) corresponding to each image block are determined.

[0031] Optionally, the transform residual absolute value and information and / or motion vector information may be determined based on the pre-encoding results of multiple image blocks in the image frame to be encoded, or the formal encoding results. The encoder may perform a pre-encoding process on the video before the formal encoding begins. The process buffers multiple continuous image frames of the input video, divides the image frame (for example, the image frame obtained by downsampling the original image frame) into multiple image blocks of the same size, simulates the prediction mode in the formal encoding (for example, motion estimation), and obtains the encoding information of the image block (for example, the transform residual absolute value and information and / or motion vector information), wherein the generated encoding information will be saved to assist the subsequent formal encoding process.

[0032] S120: When the temporal hierarchical level of the image frame to be encoded is greater than a preset level, determining whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information.

[0033] Exemplarily, the time domain hierarchical level of the image frame to be encoded is determined (for example, different positions of the image frame to be encoded in the image group correspond to different time domain hierarchical levels, and the corresponding time domain hierarchical level can be determined according to the position of the image frame to be encoded in the image group), and it is determined whether the time domain hierarchical level of the image frame to be encoded is greater than a preset level (for example, the preset level can be 0 layer, 1 layer, etc.).

[0034] In one embodiment, when the time domain stratification level of the image frame to be encoded is less than or equal to a preset level, in order to ensure the encoding quality, the image frame to be encoded is encoded using adaptive loop filtering, and the rate-distortion cost information (RDCost, Rate-Distortion Cost) corresponding to the encoding process using adaptive loop filtering for the image frame to be encoded and the rate-distortion cost information of the encoding process not using adaptive loop filtering for the image frame to be encoded are recorded.

[0035] When the temporal hierarchical level of the image frame to be encoded is greater than the preset level, it can be determined whether the image frame to be encoded is a still image frame based on the transform residual absolute value and information and / or motion vector information. Among them, a still image can be understood as an image frame with a smaller picture change relative to the encoded image frame at the previous level. Since the picture change of a still image frame is small, the residuals of each image block of the image frame before and after the transformation are small, and the corresponding transform residual absolute value and information and / or motion vector information will be less than the preset threshold, which can be used to determine whether the image frame to be encoded is a still image frame.

[0036] like Figure 2As shown in the schematic diagram of temporal hierarchical division, it is assumed that the size of a picture group is 8 (the picture group includes the picture frames numbered 1-8 in the figure), where the I frame is a key frame and its corresponding number is 0, and each subsequent picture frame is a non-key frame (such as a B frame, a P frame), and the corresponding numbers are 1-8. The digital numbering can represent the playback order of the picture frames. The encoding order and playback order of the temporal hierarchical pictures are not the same. Figure 2 For example, the playback order is 0, 1, 2, 3, 4, 5, 6, 7, 8. The encoding order is 0, 8, 4, 2, 1, 3, 6, 5, 7. Images numbered 0 and 8 are on layer 0, images numbered 4 are on layer 1, images numbered 2 and 6 are on layer 2, and images numbered 1, 3, 5, 7 are on layer 3. Since images at higher levels need to refer to images at lower levels, it is usually necessary to allocate more bitrate to images at lower levels to ensure quality. The arrows can be understood as image frames that need to be referenced for encoding, for example Figure 2 The image frame numbered 8 in the image refers to the image frame numbered 0, which can be understood as the encoding of the image frame numbered 8 refers to the image frame numbered 0. Optionally, different sizes of image groups may correspond to different numbers of frame levels, the number of image frames included in each frame level, and the encoding of image frames corresponding to each frame level in the image group, and the frame level corresponding to the image frame may be determined according to the size of the image group (the number of image frames included).

[0037] For example, suppose Figure 2 The corresponding preset level is 1, and the image frame in which the temporal stratification level is 0 or 1 ( Figure 2 The image frames numbered 0, 4, and 8 in the image are less than or equal to the preset level, and the image frames with frame levels of 2 or 3 ( Figure 2 The frame level corresponding to the image frames numbered 1-3, 5-7 in the above) is greater than the preset level. For example, when the current frame to be encoded is numbered 5, its frame level is 3, which is greater than the preset level, and it can be further determined whether the image frame to be encoded is a still image frame. When the current frame to be encoded is numbered 4, its frame level is 1, which is equal to the preset level, the image frame to be encoded is encoded using adaptive loop filtering.

[0038] S130: When the image frame to be encoded is a still image frame, encoding processing without using adaptive loop filtering is performed on the image frame to be encoded.

[0039] Exemplarily, when it is determined that the image frame to be encoded is a still image frame, since the encoding of the image frame to be encoded will refer to the encoded image frame of the previous level, and the picture change of the image frame to be encoded is small relative to the encoded image frame of the previous level, when the encoded image frame has already undergone adaptive loop filtering, encoding processing with reference to the adaptive loop filtering can also achieve an ideal adaptive loop filtering effect, and the image frame to be encoded can be encoded without using adaptive loop filtering (i.e., skipping adaptive loop filtering), thereby reducing the data processing amount of adaptive loop filtering and improving video coding efficiency.

[0040] For example Figure 2 If the image frame to be encoded numbered 3 is a continuous still image, since image 3 refers to images 2 and 4, a lot of information of image 3 can be inherited from images 2 and 4, and no unnecessary filtering processing is required, which can effectively improve the video encoding efficiency.

[0041] In the above, by determining the absolute values ​​and information of the transform residuals and / or the motion vector information of multiple image blocks in the image frame to be encoded, when the time domain stratification level of the image frame to be encoded is greater than the preset level, it is determined whether the image frame to be encoded is a still image frame according to the absolute values ​​and information of the transform residuals and / or the motion vector information, and when the image frame to be encoded is a still image frame, the image frame to be encoded is encoded without using adaptive loop filtering, and some adaptive loop filtering processes with poor effects are skipped, thereby reducing the computing resources consumed by the adaptive loop filtering process, and effectively improving the efficiency of video encoding.

[0042] Based on the above embodiments, Figure 3 A flowchart of another video encoding method based on adaptive loop filtering provided in an embodiment of the present application is given. The video encoding method based on adaptive loop filtering is a specific embodiment of the above-mentioned video encoding method based on adaptive loop filtering. Figure 3 , the video encoding method based on adaptive loop filtering includes:

[0043] S210: Down-sample the image frame to be encoded to obtain a down-sampled image frame, and divide the down-sampled image frame into a plurality of image blocks.

[0044] S220: Pre-encode multiple image blocks to obtain transformation residual absolute value and information and / or motion vector information of each image block.

[0045] Exemplarily, before encoding the video, the encoder will first perform pre-encoding on the video. During the pre-encoding process, multiple continuous image frames of the input video are buffered, and these image frames are down-sampled, and each down-sampled image frame is divided into multiple image blocks of a preset size. The intra-frame prediction and inter-frame prediction in the formal encoding are simulated for these image blocks, that is, multiple image blocks are pre-encoded to obtain the optimal transform residual absolute value and information and / or motion vector information of each image block. This scheme determines the transform residual absolute value and information and / or motion vector information of each image block based on the pre-encoding result of the image frame to be encoded, and can accurately determine whether the image frame to be encoded is a still image frame, accurately skip part of the adaptive loop filtering, and effectively improve the video encoding efficiency while ensuring the video encoding quality.

[0046] S230: When the temporal hierarchical level of the image frame to be encoded is greater than a preset level, determining whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information.

[0047] In a possible embodiment, the video encoding method based on adaptive loop filtering provided by the present scheme determines whether the image frame to be encoded is a still image frame based on the absolute value and information of the transform residual and / or the motion vector information. It can be determined that the image frame to be encoded is a still image frame when the average value of the absolute value and information of the transform residual is less than a preset transform residual absolute value and threshold, and / or the average value of the motion vector information is less than a preset motion vector threshold.

[0048] Exemplarily, when the time domain hierarchical level of the image frame to be encoded is greater than a preset level, the average value of the transform residual absolute value and information of each image block and / or the average value of the motion vector information of each image block are calculated, and it is determined whether the average value of the transform residual absolute value and information is less than a preset transform residual absolute value and threshold, and / or it is determined whether the average value of the motion vector information is less than a preset motion vector threshold.

[0049] In one embodiment, when the average value of the transform residual absolute value and information is less than a preset transform residual absolute value and threshold, and / or the average value of the motion vector information is less than a preset motion vector threshold, the image frame to be encoded can be determined to be a still image frame. For example, when the average value of the transform residual absolute value and information is less than a preset transform residual absolute value and threshold, and the average value of the motion vector information is less than a preset motion vector threshold, the image frame to be encoded can be determined to be a still image frame, and when the average value of the transform residual absolute value and information is greater than or equal to the preset transform residual absolute value and threshold, or the average value of the motion vector information is greater than or equal to the preset motion vector threshold, the image frame to be encoded can be determined to be a non-still image frame. For example, the average value of the transform residual absolute value and information and the average value of the motion vector information can be determined by the following formula:

[0050]

[0051] Among them, avgSatd is the average value of the absolute value and information of the transformation residual, avgMv is the average value of the motion vector information, N is the number of image blocks in the image frame to be encoded, and statd i is the absolute value and information of the transformation residual of the i-th image block, MV i is the motion vector information of the i-th image block.

[0052] When the following conditions are met, the image frame to be encoded is a still image frame:

[0053] avgSatd <satdTH,avgMv<MvTh,picLayer> layerTh

[0054] Among them, pocLayer is the time domain layering level of the image frame to be encoded, and layerTh is the preset level. That is, when avgSatd and avgMv are less than the corresponding thresholds, the image frame to be encoded is determined to be static, and when the time domain layering level of the image frame to be encoded is greater than the preset level, the calculation of the adaptive loop filter is skipped. This solution determines whether the image frame to be encoded is a static image frame based on the average value of the absolute value of the transform residual and the information, and / or the average value of the motion vector information, accurately judges the overall motion of the image frame to be encoded, and accurately determines whether to skip the adaptive loop filtering processing of the image frame to be encoded, thereby improving the video encoding efficiency.

[0055] S240: When the image frame to be encoded is a still image frame, encoding processing without using adaptive loop filtering is performed on the image frame to be encoded.

[0056] S250: When the image frame to be encoded is a non-static image frame, determine filtering effect information of an encoded image frame using adaptive loop filtering at a level before the image frame to be encoded.

[0057] S260: When the filtering effect information does not meet the preset filtering effect condition, encoding processing is performed on the image frame to be encoded without using adaptive loop filtering.

[0058] Exemplarily, when the temporal hierarchical level of the image frame to be encoded is greater than the preset level, and the image frame to be encoded is a non-static image frame, it is necessary to further determine the filtering effect information of the image frame that has been encoded using adaptive loop filtering at the level before the image frame to be encoded, and determine whether the current image frame to be encoded uses adaptive loop filtering according to the filtering effect of the encoded image frame. Figure 2As shown, assuming that the image frame to be encoded is numbered 3, and the corresponding encoded image frames it refers to are numbered 2 and 4, and the images numbered 2 and 4 refer to the encoded images numbered 0 and 8 respectively, the filtering effect information of the encoding processing using adaptive loop filtering in the images numbered 0, 2, 4, and 8 can be determined (if the encoding processing using adaptive loop filtering is not used for the image numbered 2, the filtering effect information of the image can be ignored), and whether to skip the adaptive loop filtering processing of the current image frame to be encoded is determined based on the filtering effect information.

[0059] In one embodiment, it is determined whether the filtering effect information of the encoded image frame using adaptive loop filtering at a level before the image frame to be encoded meets the preset filtering effect condition. Optionally, whether the filtering effect information meets the preset filtering effect condition can be determined based on the comparison result of the average value corresponding to the filtering effect information of the encoded image frame using adaptive loop filtering at the previous level and the preset average threshold, or the comparison result of the cumulative value corresponding to the filtering effect information of the encoded image frame using adaptive loop filtering at the previous level and the preset cumulative threshold. For example, when the average value corresponding to the filtering effect information is less than the preset average threshold, or the cumulative value corresponding to the filtering effect information is less than the preset cumulative threshold, it is considered that the filtering effect information meets the preset filtering effect condition.

[0060] In a possible embodiment, the video encoding method based on adaptive loop filtering provided by the present solution is characterized in that determining the filtering effect information of the encoded image frame using adaptive loop filtering at a level before the image frame to be encoded includes:

[0061] S261: Determine first rate-distortion cost information of an image frame at a layer before the image frame to be encoded using adaptive loop filtering, and second rate-distortion cost information of an image frame not to be encoded using adaptive loop filtering.

[0062] S262: Accumulate the difference between each second rate-distortion cost information and the corresponding first rate-distortion cost information to obtain filtering effect information.

[0063] Optionally, when encoding each image frame using adaptive loop filtering, rate-distortion cost information for encoding using adaptive loop filtering and rate-distortion cost information for encoding the same image frame without using adaptive loop filtering can be determined, which is used for subsequent determination of whether to skip adaptive loop filtering.

[0064] Exemplarily, when the temporal hierarchical level of the image frame to be encoded is greater than the preset level, and the image frame to be encoded is a non-static image frame, the image frames encoded by using adaptive loop filtering in the level before the image frame to be encoded are determined. The rate-distortion cost information of these image frames encoded by using adaptive loop filtering is determined, and the rate-distortion cost information is used as the first rate-distortion cost information, and the rate-distortion cost information encoded without using adaptive loop filtering is determined, and the rate-distortion cost information is used as the second rate-distortion cost information. Wherein, when the adaptive loop filtering effect of an image frame is poor, the second rate-distortion cost information is less than the first rate-distortion cost information.

[0065] In one embodiment, the difference between the second rate-distortion cost information of each image frame and the first rate-distortion cost information corresponding to the same image frame is determined, and the difference between the rate-distortion cost information corresponding to these image frames is accumulated, and the accumulated result is used as the filtering effect information of the encoded image frame using adaptive loop filtering at the level before the image frame to be encoded. Optionally, the average value of the difference between each second rate-distortion cost information and the corresponding first rate-distortion cost information can also be used as the filtering effect information. Among them, the filtering effect information is inversely proportional to the filtering effect, that is, the larger the corresponding value of the filtering effect information, the worse the filtering effect.

[0066] like Figure 2 As shown, assuming that the image frame to be encoded is numbered 3, and the corresponding encoded image frames it refers to are numbered 2 and 4, and numbers 2 and 4 refer to the encoded images numbered 0 and 8 respectively, and the image frame numbered 2 does not adopt the encoding processing of adaptive loop filtering, and the image frames numbered 0, 4, and 8 adopt the encoding processing of adaptive loop filtering, then the first rate distortion cost information and the second rate distortion cost information corresponding to the image frames numbered 0, 4, and 8 are determined, and the difference between the second rate distortion cost information and the first rate distortion cost information of the image frame numbered 0, the difference between the second rate distortion cost information and the first rate distortion cost information of the image frame numbered 4, and the difference between the second rate distortion cost information and the first rate distortion cost information of the image frame numbered 8 are determined, and the above three differences are added to obtain the filtering effect information of the layer before the image frame to be encoded using adaptive loop filtering. This scheme determines the filtering effect information by accumulating the first rate-distortion cost information of the image frames of the layer before the image frame to be encoded using adaptive loop filtering, and the difference between the second rate-distortion cost information encoded without adaptive loop filtering, accurately judges the adaptive loop filtering effect of the low-level image frames, and accurately judges whether it is necessary to skip the adaptive loop filtering with poor cumulative filtering effect, so as to achieve a balance between video encoding quality and efficiency.

[0067] In one embodiment, the filtering effect information provided by the present solution does not meet the preset filtering effect condition, which may be that the filtering effect information is less than a preset rate distortion cost change threshold. For example, the filtering effect information is compared with the preset rate distortion cost change threshold. When the filtering effect information is less than the preset rate distortion cost change threshold, it can be considered that the filtering effect information does not meet the preset filtering effect condition, that is, the cumulative filtering effect before the image frame to be encoded is poor, and when the filtering effect information is greater than or equal to the preset rate distortion cost change threshold, it can be considered that the filtering effect information meets the preset filtering effect condition, that is, the cumulative filtering effect before the image frame to be encoded is good.

[0068] In one embodiment, the preset rate-distortion cost change threshold value may be determined according to a combination of one or more of the image resolution of the image frame to be encoded, the temporal hierarchical level of the image frame to be encoded, and the quantization parameter (QP, QuantizerParameter) configured for the image frame to be encoded. For example, the preset rate-distortion cost change threshold value is positively correlated with the image resolution, the temporal hierarchical level, and the quantization parameter, that is, the larger the image resolution, the temporal hierarchical level, and the quantization parameter, the larger the corresponding preset rate-distortion cost change threshold value.

[0069] In one embodiment, in video encoding, low-level image frames will be encoded first, and the information obtained by encoding has a strong reference significance for high-level image frames. When the adaptive loop filtering has limited effect on improving the quality of low-level images, this solution turns off the adaptive loop filtering of high-level image frames to reduce unnecessary adaptive loop filtering calculations. For time-domain layered image frames, low-level image frames will be used as references by high-level image frames. Therefore, the more low-level image frames that are referenced, the more important they are. Since there will be problems of erroneous transmission of references, for example, if the adaptive loop filtering is turned off on the low-level image frames, then the high-level image frames also need to turn off the adaptive loop filtering. In order to reduce the impact on quality, the frame-level adaptive loop filtering skipping algorithm is not used for low-level image frames, and only the adaptive loop filtering data is saved. First, determine whether the temporal hierarchical level of the current image frame to be encoded is greater than the preset level. If it is less than or equal to the preset level, record the rate-distortion cost rdcost of the image after adaptive loop filtering, compare it with the rate-distortion cost rdcost before adaptive loop filtering, and record the difference between the two. When the filtering effect of adaptive loop filtering is not good, rdcost before <rdcost after , the high-level adaptive loop filter is turned off. Optionally, the filtering effect information can be determined by the following formula:

[0070]

[0071] Among them, ΔALFCost is the filtering effect information, rdcost before is the second rate-distortion cost information of the i-th image frame, rdcost after is the first rate-distortion cost information of the i-th image frame, and M is the number of encoded image frames using adaptive loop filtering at a level before the image frame to be encoded.

[0072] When the following relationship is met, the filtering effect information does not meet the preset filtering effect conditions:

[0073] ΔALF Cost <th(picResolution,picLayer,pq)

[0074] Among them, th(picResolution,picLayer,qp) is a preset rate-distortion cost change threshold determined based on the image resolution picResolution, the temporal layer level picLayer and the quantization parameter qp. This scheme determines whether the filtering effect information meets the preset filtering effect condition by comparing the filtering effect information with the preset rate-distortion cost change threshold, accurately determines whether it is necessary to skip the adaptive loop filtering with poor cumulative filtering effect, and achieves a balance between video encoding quality and efficiency.

[0075] In one embodiment, when the filtering effect information reaches the preset filtering effect condition (adaptive loop filtering is good), it can be considered that the adaptive loop filtering of the image frame can achieve a good filtering effect, and the current image frame to be encoded can continue to use adaptive loop filtering, that is, the image frame to be encoded is encoded using adaptive loop filtering to ensure the quality of video encoding. When the filtering effect information does not reach the preset filtering effect condition (adaptive loop filtering is poor), it can be considered that the filtering effect of the adaptive loop filtering of the image frame is poor, and the adaptive loop filtering can be skipped, that is, the image frame to be encoded is encoded without using adaptive loop filtering, thereby reducing unnecessary adaptive loop filtering calculations and improving video encoding efficiency.

[0076] In the above, by determining the absolute values ​​and information of the transformation residuals and / or the motion vector information of multiple image blocks in the image frame to be encoded, when the temporal hierarchical level of the image frame to be encoded is greater than the preset level, it is determined whether the image frame to be encoded is a still image frame according to the absolute values ​​and information of the transformation residuals and / or the motion vector information, and when the image frame to be encoded is a still image frame, the image frame to be encoded is encoded without using adaptive loop filtering, and some adaptive loop filtering processes with poor effects are skipped, thereby reducing the computational resources consumed by the adaptive loop filtering process, and effectively improving the efficiency of video encoding. At the same time, when the temporal hierarchical level of the image frame to be encoded is greater than the preset level, and the image frame to be encoded is a non-still image frame, the filtering effect information of the encoded image frame using adaptive loop filtering at the level before the image frame to be encoded is determined, and when the filtering effect information does not meet the preset filtering effect condition, the image frame to be encoded is encoded without using adaptive loop filtering, thereby reducing unnecessary adaptive loop filtering calculations, and further improving the efficiency of video encoding.

[0077] Figure 4 is a schematic diagram of the structure of a video encoding device based on adaptive loop filtering provided by an embodiment of the present application. Figure 4 The video encoding device based on adaptive loop filtering includes an information determination module 41, a stillness judgment module 42 and an encoding processing module 43.

[0078] The information determination module 41 is configured to determine the transformation residual absolute value sum information and / or motion vector information of multiple image blocks in the image frame to be encoded;

[0079] A still judgment module 42 is configured to determine whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information when the temporal hierarchical level of the image frame to be encoded is greater than a preset level;

[0080] The encoding processing module 43 is configured to perform encoding processing on the image frame to be encoded without using adaptive loop filtering when the image frame to be encoded is a still image frame.

[0081] In the above, by determining the absolute values ​​and information of the transform residuals and / or the motion vector information of multiple image blocks in the image frame to be encoded, when the time domain stratification level of the image frame to be encoded is greater than the preset level, it is determined whether the image frame to be encoded is a still image frame according to the absolute values ​​and information of the transform residuals and / or the motion vector information, and when the image frame to be encoded is a still image frame, the image frame to be encoded is encoded without using adaptive loop filtering, and some adaptive loop filtering processes with poor effects are skipped, thereby reducing the computing resources consumed by the adaptive loop filtering process, and effectively improving the efficiency of video encoding.

[0082] In a possible embodiment, the video encoding device based on adaptive loop filtering further includes an effect determination module, which is configured to: when the image frame to be encoded is a non-static image frame, determine the filtering effect information of an encoded image frame using adaptive loop filtering at a level before the image frame to be encoded;

[0083] The encoding processing module 43 is further configured to: when the filtering effect information does not meet the preset filtering effect condition, perform encoding processing on the image frame to be encoded without using adaptive loop filtering.

[0084] In a possible embodiment, the information determination module 41 determines the transformation residual absolute value sum information and / or motion vector information of multiple image blocks in the image frame to be encoded, and is configured as follows:

[0085] Downsampling the image frame to be encoded to obtain a downsampled image frame, and dividing the downsampled image frame into a plurality of image blocks;

[0086] Pre-encoding is performed on multiple image blocks to obtain transformation residual absolute value sum information and / or motion vector information of each image block.

[0087] In a possible embodiment, the still judgment module 42 determines whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information, and is configured as follows:

[0088] When the average value of the transform residual absolute value and information is less than a preset transform residual absolute value and threshold, and / or the average value of the motion vector information is less than a preset motion vector threshold, it is determined that the image frame to be encoded is a still image frame.

[0089] In a possible embodiment, the effect determination module determines the filtering effect information of the encoded image frame using adaptive loop filtering at a level before the image frame to be encoded, and is configured as follows:

[0090] Determine first rate-distortion cost information of an image frame at a layer before the image frame to be encoded using adaptive loop filtering, and second rate-distortion cost information of an image frame not to be encoded using adaptive loop filtering;

[0091] The difference between each second rate-distortion cost information and the corresponding first rate-distortion cost information is accumulated to obtain the filtering effect information.

[0092] In a possible embodiment, the filtering effect information does not meet a preset filtering effect condition, which is configured as: the filtering effect information is less than a preset rate-distortion cost change threshold.

[0093] In a possible embodiment, the encoding processing module 43 is further configured to: when the filtering effect information reaches a preset filtering effect condition, perform encoding processing using adaptive loop filtering on the image frame to be encoded.

[0094] It is worth noting that in the above-mentioned embodiment of the video encoding device based on adaptive loop filtering, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0095] The embodiment of the present application further provides a video encoding device based on adaptive loop filtering, and the video encoding device based on adaptive loop filtering can integrate the video encoding apparatus based on adaptive loop filtering provided in the embodiment of the present application. Figure 5 is a schematic diagram of the structure of a video encoding device based on adaptive loop filtering provided by an embodiment of the present application. Figure 5 The video encoding device based on adaptive loop filtering includes: an input device 53, an output device 54, a memory 52 and one or more processors 51; the memory 52 is used to store one or more programs; when the one or more programs are executed by the one or more processors 51, the one or more processors 51 implement the video encoding method based on adaptive loop filtering as provided in the above embodiment. The video encoding device, equipment and computer based on adaptive loop filtering provided above can be used to execute the video encoding method based on adaptive loop filtering provided in any of the above embodiments, and have corresponding functions and beneficial effects.

[0096] The embodiment of the present application also provides a non-volatile storage medium storing computer executable instructions, which are used to execute the video encoding method based on adaptive loop filtering as provided in the above embodiment when executed by a computer processor. Of course, the non-volatile storage medium storing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the video encoding method based on adaptive loop filtering provided above, can also execute the related operations in the video encoding method based on adaptive loop filtering provided in any embodiment of the present application. The video encoding apparatus, device and storage medium based on adaptive loop filtering provided in the above embodiment can execute the video encoding method based on adaptive loop filtering provided in any embodiment of the present application. For technical details not described in detail in the above embodiment, please refer to the video encoding method based on adaptive loop filtering provided in any embodiment of the present application.

[0097] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the video encoding method based on adaptive loop filtering provided in each embodiment of the present application.

Claims

1. A video encoding method based on adaptive loop filtering, characterized in that: include: Determine transformation residual absolute values ​​and information and / or motion vector information of a plurality of image blocks in an image frame to be encoded; In a case where the temporal hierarchical level of the image frame to be encoded is greater than a preset level, determining whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information; In the case that the image frame to be encoded is a still image frame, encoding processing without using adaptive loop filtering is performed on the image frame to be encoded.

2. The video encoding method based on adaptive loop filtering according to claim 1, characterized in that: After determining whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information, the method further includes: In the case where the image frame to be encoded is a non-static image frame, determining filtering effect information of an encoded image frame using adaptive loop filtering at a level before the image frame to be encoded; When the filtering effect information does not meet the preset filtering effect condition, the image frame to be encoded is encoded without using adaptive loop filtering.

3. The video encoding method based on adaptive loop filtering according to claim 1, characterized in that: The step of determining the transformation residual absolute values ​​and information and / or motion vector information of a plurality of image blocks in the image frame to be encoded includes: Downsampling the image frame to be encoded to obtain a downsampled image frame, and dividing the downsampled image frame into a plurality of image blocks; Pre-encoding the plurality of image blocks obtains transformation residual absolute value sum information and / or motion vector information of each image block.

4. The video encoding method based on adaptive loop filtering according to claim 1, characterized in that: The determining whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information comprises: When the average value of the transform residual absolute value and information is less than a preset transform residual absolute value and threshold, and / or the average value of the motion vector information is less than a preset motion vector threshold, it is determined that the image frame to be encoded is a still image frame.

5. The video encoding method based on adaptive loop filtering according to claim 2, characterized in that: The determining of filtering effect information of an already encoded image frame using adaptive loop filtering at a level before the image frame to be encoded includes: Determine first rate-distortion cost information of an image frame at a level before the image frame to be encoded using adaptive loop filtering, and second rate-distortion cost information of an image frame not to be encoded using adaptive loop filtering; Differences between each piece of the second rate-distortion cost information and the corresponding first rate-distortion cost information are accumulated to obtain filtering effect information.

6. The video encoding method based on adaptive loop filtering according to claim 5, characterized in that: The filtering effect information does not meet the preset filtering effect condition, including: The filtering effect information is less than a preset rate-distortion cost change threshold.

7. The video encoding method based on adaptive loop filtering according to claim 2, characterized in that: After determining the filtering effect information of the encoded image frame using adaptive loop filtering at a level before the image frame to be encoded, the method further includes: When the filtering effect information meets a preset filtering effect condition, the image frame to be encoded is encoded using adaptive loop filtering.

8. A video encoding device based on adaptive loop filtering, characterized in that: It includes an information determination module, a stationary judgment module and a coding processing module, wherein: The information determination module is configured to determine the transformation residual absolute value sum information and / or motion vector information of multiple image blocks in the image frame to be encoded; The still judgment module is configured to determine whether the image frame to be encoded is a still image frame according to the transform residual absolute value and information and / or the motion vector information when the temporal hierarchical level of the image frame to be encoded is greater than a preset level; The encoding processing module is configured to perform encoding processing on the image frame to be encoded without using adaptive loop filtering when the image frame to be encoded is a still image frame.

9. A video encoding device based on adaptive loop filtering, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the video encoding method based on adaptive loop filtering as described in any one of claims 1 to 7.

10. A non-volatile storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the video encoding method based on adaptive loop filtering as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the video encoding method based on adaptive loop filtering according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Adaptive loop filtering-based video encoding method, apparatus and device

    WO2026166360A1