Loop filtering method
Embodiments of the present disclosure provide a loop filtering method, including: determining a reference image block corresponding to a to-be-processed image block in an adjacent reference frame in a time domain, and predicting the loop filtering enabling probability of the to-be-processed image block based on the result of loop filtering of the reference image block; determining spatial coding information of the to-be-processed image block, the spatial coding information being used to characterize texture complexity of the to-be-processed image block; and making a loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions.
1 . A loop filtering method, comprising:
determining a reference image block corresponding to a to-be-processed image block in an adjacent reference frame in a time domain, and predicting a loop filtering enabling probability of the to-be-processed image block based on a result of loop filtering of the reference image block;
determining spatial coding information of the to-be-processed image block, the spatial coding information being used to characterize texture complexity of the to-be-processed image block; and
making a loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions.
2 . The method according to claim 1 , wherein making the loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions comprises:
updating the loop filtering enabling probability based on the spatial coding information; and
making the loop filtering decision for the to-be-processed image block in response to the updated loop filtering enabling probability meeting a preset probability condition; or
determining not to perform loop filtering on the to-be-processed image block in response to the updated loop filtering enabling probability does not meet the preset probability condition.
3 . The method according to claim 2 , wherein updating the loop filtering enabling probability based on the spatial coding information comprises:
updating the loop filtering enabling probability based on a time domain level of a video frame where the to-be-processed image block is located and the spatial coding information.
4 . The method according to claim 2 , wherein updating the loop filtering enabling probability based on the spatial coding information comprises:
inputting the spatial coding information and the loop filtering enabling probability to a pre-trained machine learning model, and outputting the updated loop filtering enabling probability through the machine learning model.
5 . The method according to claim 2 , wherein the spatial coding information comprises at least one of: division depth of the to-be-processed image block, coding bit number of the to-be-processed image block, boundary strength information of the to-be-processed image block, image gradient information of the to-be-processed image block, boundary strength information of the reference block adjacent to the to-be-processed image block in a space domain, or image gradient information of the reference block adjacent to the to-be-processed image block in the space domain.
6 . The method according to claim 5 , wherein if the spatial coding information comprises at least two types, then updating the loop filtering enabling probability based on the spatial coding information comprises:
performing cascade comparison based on preset parameter thresholds corresponding to the at least two types of spatial coding information; and
updating the loop filtering enabling probability based on the result of cascade comparison.
7 . An electronic device, comprising: one or more processors, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface communicate with each other via the communication bus; and
the memory is configured to store instructions that are executable by the one or more processors to causes the electronic device to perform operations comprising:
determining a reference image block corresponding to a to-be-processed image block in an adjacent reference frame in a time domain, and predicting a loop filtering enabling probability of the to-be-processed image block based on a result of loop filtering of the reference image block;
determining spatial coding information of the to-be-processed image block, the spatial coding information being used to characterize texture complexity of the to-be-processed image block; and
making a loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions.
8 . The device according to claim 7 , wherein making the loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions comprises:
updating the loop filtering enabling probability based on the spatial coding information; and
making the loop filtering decision for the to-be-processed image block in response to the updated loop filtering enabling probability meeting a preset probability condition; and
determining not to perform loop filtering on the to-be-processed image block in response to the updated loop filtering enabling probability does not meet the preset probability condition.
9 . The device according to claim 8 , wherein updating the loop filtering enabling probability based on the spatial coding information comprises:
updating the loop filtering enabling probability based on a time domain level of a video frame where the to-be-processed image block is located and the spatial coding information.
10 . The device according to claim 8 , wherein updating the loop filtering enabling probability based on the spatial coding information comprises:
inputting the spatial coding information and the loop filtering enabling probability to a pre-trained machine learning model, and outputting the updated loop filtering enabling probability through the machine learning model.
11 . The device according to claim 8 , wherein the spatial coding information comprises at least one of: division depth of the to-be-processed image block, coding bit number of the to-be-processed image block, boundary strength information of the to-be-processed image block, image gradient information of the to-be-processed image block, boundary strength information of the reference block adjacent to the to-be-processed image block in a space domain, or image gradient information of the reference block adjacent to the to-be-processed image block in the space domain.
12 . The device according to claim 11 , wherein if the spatial coding information comprises at least two types, then updating the loop filtering enabling probability based on the spatial coding information comprises:
performing cascade comparison based on preset parameter thresholds corresponding to the at least two types of spatial coding information; and
updating the loop filtering enabling probability based on the result of cascade comparison.
13 . A non-transitory computer-readable storage medium, storing instructions that are executable by one or more processors of a device to cause the device to perform operations for loop filtering, the operations comprising:
determining a reference image block corresponding to a to-be-processed image block in an adjacent reference frame in a time domain, and predicting a loop filtering enabling probability of the to-be-processed image block based on a result of loop filtering of the reference image block;
determining spatial coding information of the to-be-processed image block, the spatial coding information being used to characterize texture complexity of the to-be-processed image block; and
making a loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions.
14 . The non-transitory computer-readable storage medium according to claim 13 , wherein making the loop filtering decision for the to-be-processed image block in response to the spatial coding information and the loop filtering enabling probability meeting preset filtering conditions comprises:
updating the loop filtering enabling probability based on the spatial coding information; and
making the loop filtering decision for the to-be-processed image block in response to the updated loop filtering enabling probability meeting a preset probability condition; and
determining not to perform loop filtering on the to-be-processed image block in response to the updated loop filtering enabling probability does not meet the preset probability condition.
15 . The non-transitory computer-readable storage medium according to claim 14 , wherein updating the loop filtering enabling probability based on the spatial coding information comprises:
updating the loop filtering enabling probability based on a time domain level of a video frame where the to-be-processed image block is located and the spatial coding information.
16 . The non-transitory computer-readable storage medium according to claim 14 , wherein updating the loop filtering enabling probability based on the spatial coding information comprises:
inputting the spatial coding information and the loop filtering enabling probability to a pre-trained machine learning model, and outputting the updated loop filtering enabling probability through the machine learning model.
17 . The non-transitory computer-readable storage medium according to claim 14 , wherein the spatial coding information comprises at least one of: division depth of the to-be-processed image block, coding bit number of the to-be-processed image block, boundary strength information of the to-be-processed image block, image gradient information of the to-be-processed image block, boundary strength information of the reference block adjacent to the to-be-processed image block in a space domain, or image gradient information of the reference block adjacent to the to-be-processed image block in the space domain.
18 . The non-transitory computer-readable storage medium according to claim 17 , wherein if the spatial coding information comprises at least two types, then updating the loop filtering enabling probability based on the spatial coding information comprises:
performing cascade comparison based on preset parameter thresholds corresponding to the at least two types of spatial coding information; and
updating the loop filtering enabling probability based on the result of cascade comparison.