WO2020172902A1 - 一种去块效应滤波方法、系统、设备及计算机可读介质 - Google Patents

一种去块效应滤波方法、系统、设备及计算机可读介质 Download PDF

Info

Publication number
WO2020172902A1
WO2020172902A1 PCT/CN2019/077151 CN2019077151W WO2020172902A1 WO 2020172902 A1 WO2020172902 A1 WO 2020172902A1 CN 2019077151 W CN2019077151 W CN 2019077151W WO 2020172902 A1 WO2020172902 A1 WO 2020172902A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
boundary
pixel group
strength
filtering
Prior art date
Application number
PCT/CN2019/077151
Other languages
English (en)
French (fr)
Inventor
王荣刚
王振宇
谢熙
高文
Original Assignee
北京大学深圳研究生院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京大学深圳研究生院 filed Critical 北京大学深圳研究生院
Priority to US16/768,377 priority Critical patent/US11206399B2/en
Publication of WO2020172902A1 publication Critical patent/WO2020172902A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • H04N19/865Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness with detection of the former encoding block subdivision in decompressed video

Definitions

  • This specification relates to the field of computer technology, in particular to a deblocking filtering method, system, equipment and computer readable medium.
  • Deblocking filtering is a basic tool in the field of video coding and decoding, which can eliminate or reduce the blocking effects of image blocks due to quantization distortion.
  • Deblocking filtering usually takes the boundaries of the coding unit image block, the prediction unit image block, and the transformation unit image block as the filter boundary, and performs filtering processing on the pixels on both sides of the filter boundary.
  • a square represents a pixel
  • 100 is the vertical filtering boundary
  • 200 is the horizontal filtering boundary.
  • Multiple consecutive pixels located in the same row or column on both sides of the filtering boundary constitute a filtering pixel group.
  • a group of pixels circled by the dotted line 101 or 201 is called a filter pixel group.
  • Deblocking filtering is to perform deblocking filtering processing for the filtered pixel group.
  • the embodiments of this specification provide a deblocking filtering method, system, device, and computer readable medium, which are used to improve the problem that the deblocking filtering cannot achieve the expected effect in the prior art.
  • the embodiment of this specification provides a deblocking filtering method, and the method includes:
  • Determining the filter strength of the filter pixel group includes a calculation step, and the calculation step includes:
  • the filter pixel group includes at least consecutively arranged pixel points P2, P1, P0, Q0, Q1, and Q2, and the pixel values are p2, p1, p0, q0, q1, and q2, respectively.
  • the boundary passes between the two pixels P0 and Q0;
  • calculating the thresholds A and B according to the average quantization parameter includes:
  • the initial values of thresholds A and B are obtained by querying according to the average quantization parameter
  • the initial values of the thresholds A and B are adjusted according to the pixel value bit width, wherein the initial value is adjusted based on the following formula:
  • BD is the pixel value bit width.
  • the filter pixel group includes at least consecutively arranged pixel points P3, P2, P1, P0, Q0, Q1, Q2, and Q3, and the pixel values are p3, p2, p1, p0, q0, q1, respectively , Q2 and q3, the filtering boundary passes between the two pixels P0 and Q0;
  • p0’ (p2*3+p1*8+p0*10+q0*8+q1*3+16)>>5;
  • q0’ (q2*3+q1*8+q0*10+p0*8+p1*3+16)>>5;
  • p1’ (p2*4+p1*5+p0*4+q0*3+8)>>4;
  • p2’ (p3*2+p2*2+p1*2+p0+q0+4)>>3;
  • q2’ (q3*2+q2*2+q1*2+q0+p0+4)>>3;
  • p2', p1', p0', q0', q1', and q2' correspond to the new pixel values obtained after the filtering calculation of pixels P2, P1, P0, Q0, Q1, and Q2, respectively.
  • the filter pixel group includes at least consecutively arranged pixel points P1, P0, Q0, Q1, the pixel values are respectively p1, p0, q0, q1, and the filter boundary starts from the two pixels P0 and Q0. Pass through
  • p0’ (p2+p1*4+p0*6+q0*4+q1+8)>>4;
  • p1’ (p2*3+p1*8+p0*4+q0*1+8)>>4;
  • p1', p0', q0', and q1' respectively correspond to the new pixel values obtained by filtering the pixels of P1, P0, Q0, and Q1.
  • the filter pixel group includes at least consecutively arranged pixel points P0 and Q0, the pixel values are respectively p0 and q0, and the filter boundary passes between the two pixels P0 and Q0;
  • p0’ (p1*3+p0*10+q0*3+8)>>4;
  • p0' and q0' respectively correspond to the new pixel values obtained after P0 and Q0 pixels are filtered.
  • the filter pixel group includes at least consecutively arranged pixel points P0 and Q0, the pixel values are respectively p0 and q0, and the filter boundary passes between the two pixels P0 and Q0;
  • p0’ (p0*3+q0+2)>>2;
  • p0' and q0' respectively correspond to the new pixel values obtained after P0 and Q0 pixels are filtered.
  • calculating the filtering strength further includes:
  • the filter boundary is a chrominance block boundary
  • the filter calculated in the step of calculating the filter strength according to the FS is not zero, then the filter calculated in the step of calculating the filter strength according to the FS is The intensity is reduced by 1, as the final filter intensity calculation result.
  • the filter pixel group includes at least consecutively arranged pixel points P1, P0, Q0, Q1, the pixel values are respectively p1, p0, q0, q1, and the filter boundary starts from the two pixels P0 and Q0. Pass through
  • p0’ (p1*3+p0*10+q0*3+8)>>4;
  • p0' and q0' respectively correspond to the new pixel values obtained after P0 and Q0 pixels are filtered.
  • the filter pixel group includes at least consecutively arranged pixel points P2, P1, P0, Q0, Q1, Q2, and the pixel values are respectively p2, p1, p0, q0, q1, q2, and the filter
  • the boundary passes between the two pixels P0 and Q0;
  • p1’ (p2*3+p1*8+p0*3+q0*2+8)>>4;
  • p1' and q1' respectively correspond to the new pixel values obtained after P1 and Q1 pixels are filtered.
  • determining the filter strength of the filter pixel group further includes:
  • the calculation step is executed when the filter strength should not be directly set to 0.
  • the filter intensity should be directly set to 0, wherein the pixels adjacent to the filter boundary in the filter pixel group are defined as P0 and Q0, respectively, according to the coding unit where P0 and Q0 are located Or the coding information of the prediction unit judges whether the filter strength should be directly set to 0.
  • the filter strength should be directly set to 0 according to the coding information of the coding unit or prediction unit where P0 and Q0 are located, wherein the determining factors include:
  • All quantization blocks of the coding unit where P0 and Q0 are located are all 0 blocks;
  • the prediction mode of the coding unit where P0 and Q0 are located is not intra prediction
  • the first reference image of the prediction unit where P0 and Q0 are located does not exist, or the first reference index value of the two is the same and the difference of all components of the first motion vector is less than one whole pixel;
  • the first reference image of the prediction unit where Q0 is located and the second reference image of the prediction unit where P0 is located do not exist, or the same frame and the first motion vector of the prediction unit where Q0 is located and the second motion vector of the prediction unit where P0 is located are all The difference of the components is less than an entire pixel.
  • This application also proposes a video encoding method, which includes:
  • transform and quantize to generate a quantized block for writing into a bitstream
  • the method described in the embodiment of this specification is used to perform deblocking filtering on the reconstructed image formed by the reconstructed image blocks to obtain a reference image for reference in subsequent frames.
  • This application also proposes a video decoding method, which includes:
  • Deblocking filtering is performed on the reconstructed image composed of the reconstructed image blocks by the method described in the embodiment of this specification, and the reference image used for reference of the subsequent frame is obtained.
  • This application also proposes a deblocking filtering system, which includes:
  • a filtering boundary determination module which is configured to determine the filtering boundary
  • a filter pixel group determination module configured to determine a filter pixel group according to the filter boundary
  • a filter strength determination module configured to determine the filter strength of the filter pixel group, the filter strength determination module includes a calculation module, and the calculation module includes:
  • a single-sided flatness calculation unit configured to analyze the pixel value difference states of pixels located on both sides of the filter boundary in the filter pixel group to obtain two single-sided flatness FL and FR;
  • a filter strength calculation unit configured to calculate the filter strength according to FS
  • the filter calculation module is configured to perform filter calculation on the pixels included in the filter pixel group according to the filter strength.
  • This application also proposes a computer-readable medium on which computer-readable instructions are stored, and the computer-readable instructions can be executed by a processor to implement the method described in the embodiments of this specification.
  • This application also proposes a device for information processing on the user equipment side.
  • the device includes a memory for storing computer program instructions and a processor for executing the program instructions.
  • the device executes, the device is triggered to execute the method described in the embodiment of this specification.
  • the method of the embodiment of the present invention fully considers the pixel value change state of the pixel points on both sides of the filter boundary, so as to determine the filter
  • the filter strength of the pixel group adopts more reasonable filter strength judgment conditions, and finally obtains a deblocking filter result that is more in line with the expectation.
  • Figure 1 and Figure 2 are schematic diagrams of the definition of filter pixel groups
  • FIGS 3 and 5 are flowcharts of methods according to embodiments of this specification.
  • FIG. 4 is a schematic diagram of the definition of a filter pixel group according to an embodiment of the present specification.
  • FIG 6 and 7 are block diagrams of the system structure according to the embodiment of this specification.
  • the present invention proposes a deblocking filtering method.
  • the pixel value difference states of the pixels located on both sides of the filter boundary in the filter pixel group are analyzed separately to obtain two unilateral flatnesses, and then the filtered pixels are calculated according to the two unilateral flatnesses The comprehensive flatness of the group, and finally the filter strength is calculated according to the comprehensive flatness.
  • the method of the embodiment of the present invention fully considers the pixel value change state of the pixels on both sides of the filter boundary, so that more reasonable filter intensity judgment conditions are adopted when determining the filter intensity of the filter pixel group, and finally Obtain deblocking filtering results that are more in line with expectations.
  • the method includes the following steps.
  • S320 Determine a filter pixel group according to the filter boundary
  • Determining the filter strength of the filter pixel group includes a calculation step S300, and the calculation step S300 includes:
  • S331 Analyze the pixel value difference states of the pixels on both sides of the filter boundary in the filter pixel group respectively, and obtain two unilateral flatness FL and FR;
  • S340 Perform filter calculation on the pixels included in the filter pixel group according to the filter intensity.
  • the filter boundary satisfies the following conditions at the same time: (1) not located at the image boundary or the strip boundary; (2) is the coding unit boundary, or the prediction unit boundary, or Is the transformation unit boundary.
  • the plane image is first divided into n ⁇ n filter blocks (n is a natural number.
  • n is the smallest coding unit (or smallest prediction, transform).
  • the size of the unit), or an integer multiple thereof) the boundary of each filter block is defined as a candidate filter boundary. For each of the candidate filtering boundaries, if this boundary is located at the image boundary or the strip boundary, it is removed from the candidate filtering boundary; if the boundary is neither a coding unit boundary nor a prediction unit boundary, If it is not the boundary of the transform unit, it is removed from the candidate filtering boundary; the remaining candidate filtering boundary is the boundary to be filtered.
  • the filter pixel group includes at least continuously arranged pixel points P2, P1, P0, Q0, Q1, and Q2, and the pixel values are p2, p1, p0, q0, q1 and q2, the filter boundary passes between the two pixels P0 and Q0.
  • a square represents a pixel
  • 400 is a filter boundary
  • a group of pixels circled by a dotted line 401 is a filter pixel group, which includes at least pixel points P2, P1, P0, Q0, Q1 And Q2.
  • step S331 calculate the average quantization parameter (QP avg ) according to the quantization parameter of the coding unit where P0 and Q0 are located, calculate the thresholds A and B according to the average quantization parameter QP avg , initialize FL and FR to 0, calculate FL and FR respectively ,among them:
  • step S333
  • the function abs(x) is defined as taking the absolute value of x.
  • the initial values of the thresholds A and B are obtained by querying the average quantization parameter based on a preset table;
  • the value bit width adjusts the initial values of the thresholds A and B, and obtains the final values of the thresholds A and B.
  • querying and acquiring the initial values of the thresholds A and B according to the average quantization parameter includes calculating the indexes IndexA and IndexB:
  • BD is the pixel width
  • OffsetA and OffsetB are the preset table lookup offsets. According to IndexA and IndexB to query Table 1, the initial values of A and B can be obtained.
  • the adjustment is made based on the following formula:
  • BD is the pixel value bit width. Specifically, in an embodiment, BD is the bit width (BitDepth) of the pixel value used for encoding or decoding.
  • filtering calculation steps are proposed for different filtering strengths.
  • the filtering strength can be determined according to the method proposed in the embodiment of this specification, and then the deblocking filtering calculation can be performed according to the specific filtering calculation steps proposed in the embodiment of this specification.
  • deblocking can be performed according to other filtering calculation steps (not the specific filtering calculation steps proposed in the embodiment of this specification). Effect filter calculation.
  • the specific filtering calculation steps proposed in the embodiment of this specification can be used to proceed. Block filter calculation.
  • the objects of deblocking filtering include the luminance plane and the chrominance plane.
  • the luminance plane and the chrominance plane are constructed respectively. Different calculation steps for deblocking filtering.
  • the filter pixel group includes at least continuously arranged pixel points P3, P2, P1, P0, Q0, Q1, Q2, and Q3, and the pixel values are p3, p2, p1, p0, and q0, respectively. , Q1, q2, and q3, the filter boundary passes between the two pixels P0 and Q0.
  • the filter boundary is the brightness block boundary, if the filter strength is 4, the filter calculation is performed based on the following formula:
  • p0’ (p2*3+p1*8+p0*10+q0*8+q1*3+16)>>5;
  • p2’ (p3*2+p2*2+p1*2+p0+q0+4)>>3; (7)
  • Equations 3 to 8 p2', p1', p0', q0', q1', and q2' correspond to the new pixel values obtained after the filtering calculation of pixels P2, P1, P0, Q0, Q1, and Q2, respectively.
  • the filter pixel group includes at least consecutively arranged pixel points P1, P0, Q0, and Q1.
  • the pixel values are respectively p1, p0, q0, and q1, and the filter boundary starts from P0 and Q0. Pass through between pixels.
  • the filter boundary is the brightness block boundary, if the filter strength is 3, the filter calculation is performed based on the following formula:
  • p1', p0', q0', and q1' correspond to the new pixel values obtained after filtering the pixels of P1, P0, Q0, and Q1, respectively.
  • the filter pixel group includes at least consecutively arranged pixel points P0 and Q0, the pixel values are respectively p0 and q0, and the filter boundary passes between the two pixels P0 and Q0.
  • the filtering boundary is the brightness block boundary, if the filtering strength is 2, the filtering calculation is performed based on the following formula:
  • Equations 13 and 14 respectively correspond to the new pixel values obtained after P0 and Q0 pixel points are filtered.
  • the filter pixel group includes at least consecutively arranged pixel points P0 and Q0, the pixel values are respectively p0 and q0, and the filter boundary passes between the two pixels P0 and Q0.
  • the filtering boundary is the brightness block boundary, if the filtering strength is 1, the filtering calculation is performed based on the following formula:
  • Equations 15 and 16 p0' and q0' correspond to the new pixel values obtained after P0 and Q0 pixel points are filtered, respectively.
  • the filter boundary is a chroma block boundary
  • the filter strength calculated according to the FS is not zero (the calculation in step S333 shown in FIG. 3 The result is not 0)
  • the filter intensity calculated according to FS is subtracted by 1 as the final filter intensity calculation result.
  • the filter pixel group includes at least consecutively arranged pixel points P1, P0, Q0, and Q1.
  • the pixel values are respectively p1, p0, q0, and q1.
  • the filter boundary is from two pixels P0 and Q0. Pass through the dots.
  • Equations 17 and 18 respectively correspond to the new pixel values obtained after filtering the P0 and Q0 pixels.
  • the filter pixel group includes at least consecutively arranged pixel points P2, P1, P0, Q0, Q1, Q2, and the pixel values are p2, p1, p0, q0, q1, q2, respectively.
  • the boundary passes between the two pixels P0 and Q0.
  • Equations 19 and 20 respectively correspond to the new pixel values obtained after P1 and Q1 pixels are filtered.
  • the filter pixel group when determining the filter pixel group, only the pixels that the filter pixel group must include are limited, but it does not mean that the filter pixel group only includes those pixels.
  • the number of pixels in the filter pixel group can be determined according to actual needs. For example, in an embodiment of this specification, only 6 pixels (on both sides of the filter boundary, 3 pixels on each side) in the filter pixel group that are close to the filter boundary can complete the filtering for FR, FL, FS and filtering. Calculation of intensity. Therefore, the filter pixel group includes at least successively arranged pixel points P2, P1, P0, Q0, Q1, and Q26 pixel points. However, this does not mean that the filter pixel group only includes these 6 pixels in all embodiments.
  • the filter intensity when determining the filter intensity of the filtered pixel group, the filter intensity is not calculated immediately, but firstly it is determined whether the filter intensity needs to be calculated. Specifically, as shown in FIG. 5, in the process of determining the filter intensity of the filter pixel group (step S530):
  • S500 Calculate the filter strength when the filter strength should not be directly set to 0, that is, use steps 531 to 533 to calculate the filter strength.
  • the pixels adjacent to the filter boundary in the filter pixel group are defined as P0 and Q0, respectively, according to the coding unit or Q0 where P0 and Q0 are located.
  • the coding information of the prediction unit judges whether the filter strength should be set to 0 directly.
  • the judgment factors include:
  • the filter in the process of judging whether the filter strength should be directly set to 0 according to the coding information of the coding unit or prediction unit where P0 and Q0 are located, when all the following conditions are met, the filter is determined
  • the intensity should be directly set to 0:
  • All quantization blocks of the coding unit where P0 and Q0 are located are all 0 blocks;
  • the prediction mode of the coding unit where P0 and Q0 are located is not intra prediction
  • the first reference image of the prediction unit where P0 and Q0 are located does not exist, or the first reference index value of the two is the same and the difference of all components of the first motion vector is less than one whole pixel;
  • the first reference image of the prediction unit where Q0 is located and the second reference image of the prediction unit where P0 is located do not exist, or the same frame and the first motion vector of the prediction unit where Q0 is located and the second motion vector of the prediction unit where P0 is located are all The difference of the components is less than an entire pixel.
  • the embodiment of this specification also proposes a video encoding method.
  • the video encoding method includes:
  • the deblocking filtering method as described in the embodiment of this specification is used to perform deblocking filtering on the reconstructed image formed by the reconstructed image blocks, to obtain a reference image for reference in subsequent frames.
  • the image is first divided into coding units of different sizes, and the coding process is performed on each coding unit.
  • the coding unit is used as the prediction unit for prediction, and the prediction mode can select the optimal mode from the intra prediction mode and the inter prediction mode. If it is an inter-frame prediction mode, it is also necessary to obtain the first and (or) second reference frame index of the prediction unit, and the first and (or) second motion vector, and generate the predicted image block PRED according to the above prediction information.
  • the coding unit is used as the transformation unit, and the predicted image block PRED is subtracted from the original image block ORG to generate the residual image block RESI. Transform and quantize the residual image block to obtain the quantized block.
  • the quantization block performs inverse quantization and inverse transformation operations to obtain the residual image block RESI'.
  • the residual image block RESI' is added to the predicted image block PRED to obtain the reconstructed image block RECO.
  • a deblocking filtering operation is performed on the reconstructed image block RECO to obtain a reference image used as a reference for subsequent frame encoding.
  • the embodiment of this specification also proposes a video decoding method.
  • the video decoding method includes:
  • the deblocking filtering method as described in the embodiment of this specification is used to perform deblocking filtering on the reconstructed image formed by the reconstructed image blocks, to obtain a reference image for reference in subsequent frames.
  • the code stream is analyzed to obtain the prediction mode, reference frame index, motion vector, quantization block and other information of each coding unit.
  • the prediction image block PRED is generated.
  • the residual image block RESI' is added to the predicted image block PRED to obtain the reconstructed image block RECO.
  • a deblocking filtering operation is performed on a reconstructed image composed of reconstructed image blocks to obtain a reference image used as a reference for subsequent frame decoding.
  • the embodiment of this specification also proposes a deblocking filtering system. Specifically, as shown in Figure 6, the system includes:
  • a filtering boundary determination module 610 which is configured to determine a filtering boundary
  • a filter pixel group determination module 620 which is configured to determine a filter pixel group according to the filter boundary
  • the filter strength determination module 630 is configured to determine the filter strength of the filter pixel group, the filter strength determination module 630 includes a calculation module 631, and the calculation module 631 includes:
  • the one-sided flatness calculation unit 632 is configured to respectively analyze the pixel value difference states of the pixel points located on both sides of the filter boundary in the filter pixel group to obtain two one-sided flatness FL and FR;
  • the filter strength calculation unit 634 is configured to calculate the filter strength according to FS;
  • the filter calculation module 640 is configured to perform filter calculation on the pixels included in the filter pixel group according to the filter strength.
  • the filter intensity determination module 730 further includes a zero-setting determination module 735, and the zero-setting determination module 735 is configured to determine whether the filter intensity should be directly set to zero.
  • the filter strength determination module 730 is configured to directly set the filter strength to 0 when the 0 determination module 735 determines that the filter strength should be directly set to 0; when the 0 determination module 735 determines that the filter strength should not be directly set to 0, the calculation module 731 is used Calculate the filter strength.
  • the embodiment of this specification also proposes a computer-readable medium on which computer-readable instructions are stored, and the computer-readable instructions can be executed by a processor to implement the method described in the embodiment of this specification .
  • the embodiment of this specification also proposes a device for information processing on the user equipment side.
  • the device includes a memory for storing computer program instructions and a processor for executing the program instructions, Wherein, when the computer program instruction is executed by the processor, the device is triggered to execute the method described in the embodiment of this specification.
  • a programmable logic device Programmable Logic Device, PLD
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner.
  • the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers.
  • controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as a part of the memory control logic.
  • controller in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for implementing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
  • the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • This application can also be practiced in distributed computing environments. In these distributed computing environments, remote processing devices connected through a communication network perform tasks.
  • program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请公开了一种去块效应滤波方法、系统、设备及计算机可读介质。本申请实施例的方法包括:确定滤波边界,根据滤波边界确定滤波像素组;确定滤波像素组的滤波强度,包括:分别解析所述滤波像素组中位于所述滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;计算所述滤波像素组的综合平坦度FS,FS=FL+FR;根据FS计算所述滤波强度;根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算。相较于现有技术,本发明实施例的方法充分考虑了滤波边界两侧的像素点的像素值变化状态,从而在确定滤波像素组的滤波强度时采用更加合理的滤波强度判断条件,进而最终获取更为符合预期的去块效应滤波结果。

Description

一种去块效应滤波方法、系统、设备及计算机可读介质
本申请要求享有2019年2月26日提交的名称为“一种去块效应滤波方法、系统、设备及计算机可读介质”的中国专利申请CN201910141512.2的优先权,其全部内容通过引用并入本文中。
技术领域
本说明书涉及计算机技术领域,尤其涉及一种去块效应滤波方法、系统、设备及计算机可读介质。
背景技术
去块效应滤波是视频编解码领域一个基本工具,可以消除或减弱图像块因量化失真产生的块效应。
去块效应滤波通常以编码单元图像块、预测单元图像块、变换单元图像块的边界为滤波边界,针对滤波边界两侧的像素进行滤波处理。如图1和图2所示,在应用场景中,一个方格表示一个像素,100为纵向滤波边界,200为横向滤波边界。位于滤波边界两侧同一行或同一列的多个连续像素构成一个滤波像素组。例如,虚线101或201圈出的一组像素称为一个滤波像素组。去块效应滤波即是针对滤波像素组进行去块效应滤波处理。
在进行去块效应滤波时,通常是首先确定滤波强度和滤波器,然后根据确定好的滤波强度和滤波器对滤波像素组中的像素进行滤波计算,获取新的像素值。然而,在现有技术中,由于用于确定滤波强度和滤波器的判断条件设计得不够合理,这就造成了应该滤波的边界没有滤波或滤波强度不足,或者不应该滤波的边界进行了滤波,从而导致去块效应滤波无法达到预期效果,最终使得画面主观质量和客观质量的下降。
发明内容
有鉴于此,本说明书实施例提供了一种去块效应滤波方法、系统、设备及计算机可读介质,用于改善现有技术中去块效应滤波无法达到预期效果的问题。
本说明书实施例采用下述技术方案:
本说明书实施例提供一去块效应滤波方法,所述方法包括:
确定滤波边界,根据所述滤波边界确定滤波像素组;
确定所述滤波像素组的滤波强度,包括,计算步骤,所述计算步骤包括:
分别解析所述滤波像素组中位于所述滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;
计算所述滤波像素组的综合平坦度FS,其中,FS=FL+FR;
根据FS计算所述滤波强度;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1以及Q2,像素值分别为p2、p1、p0、q0、q1以及q2,所述滤波边界从P0、Q0两个像素点间穿过;
获取两个单侧平坦度FL和FR,包括,根据P0和Q0所在的编码单元的量化参数计算平均量化参数,根据所述平均量化参数计算阈值A和B,将FL和FR初始化为0,分别计算FL和FR,其中:
如果abs(p0-p1)<B,则FL的值增加2;
如果abs(q0-q1)<B,则FR的值增加2;
如果abs(p0-p2)<B,则FL的值增加1;
如果abs(q0-q2)<B,则FR的值增加1;
根据FS计算所述滤波强度,其中:
当FS为6时,如果abs(p0-p1)≤B/4,且abs(q0-q1)≤B/4,且 abs(p0-q0)<A,那么滤波强度为4,否则为3;
当FS为5时,如果p0等于p1,且q0等于q1,则滤波强度为3,否则为2;
当FS为4时,如果FL的值为2,则滤波强度BS为2,否则为1;
当FS为3时,如果abs(p1-q1)<B,则滤波强度为1,否则为0;
当FS为3~6以外的其他值时,滤波强度为0。
在一实施例中,根据所述平均量化参数计算阈值A和B,包括:
基于预设表格,根据所述平均量化参数查询获取阈值A和B的初始值;
根据像素值位宽调整阈值A和B的初始值,获取阈值A和B的最终值。
在一实施例中,根据像素值位宽调整阈值A和B的初始值,其中,基于以下公式进行初始值的调整:
A=A<<(BD-8);
B=B<<(BD-8);
上式中,BD为像素值位宽。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P3、P2、P1、P0、Q0、Q1、Q2以及Q3,像素值分别为p3、p2、p1、p0、q0、q1、q2以及q3,所述滤波边界从P0、Q0两个像素点间穿过;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为4,基于以下公式进行滤波计算:
p0’=(p2*3+p1*8+p0*10+q0*8+q1*3+16)>>5;
q0’=(q2*3+q1*8+q0*10+p0*8+p1*3+16)>>5;
p1’=(p2*4+p1*5+p0*4+q0*3+8)>>4;
q1’=(q2*4+q1*5+q0*4+p0*3+8)>>4;
p2’=(p3*2+p2*2+p1*2+p0+q0+4)>>3;
q2’=(q3*2+q2*2+q1*2+q0+p0+4)>>3;
上式中,p2’、p1’、p0’、q0’、q1’、q2’分别对应P2、P1、P0、Q0、Q1以及Q2像素点滤波计算之后得到的新的像素值。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P1、P0、Q0、Q1,像素值分别为p1、p0、q0、q1,所述滤波边界从P0、Q0两个像素点间穿过;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为3,基于以下公式进行滤波计算:
p0’=(p2+p1*4+p0*6+q0*4+q1+8)>>4;
q0’=(q2+q1*4+q0*6+p0*4+p1+8)>>4;
p1’=(p2*3+p1*8+p0*4+q0*1+8)>>4;
q1’=(q2*3+q1*8+q0*4+p0*1+8)>>4;
上式中,p1’、p0’、q0’、q1’分别对应P1、P0、Q0、Q1像素点滤波之后得到的新的像素值。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P0、Q0,像素值分别为p0、q0,所述滤波边界从P0、Q0两个像素点间穿过;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为2,基于以下公式进行滤波计算:
p0’=(p1*3+p0*10+q0*3+8)>>4;
q0’=(q1*3+q0*10+p0*3+8)>>4;
上式中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P0、Q0,像素值分别为p0、q0,所述滤波边界从P0、Q0两个像素点间穿过;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为1,基于以下公式进行滤波计算:
p0’=(p0*3+q0+2)>>2;
q0’=(q0*3+p0+2)>>2;
上式中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
在一实施例中,计算所述滤波强度,还包括:
当所述滤波边界为色度块边界时,如果所述根据FS计算所述滤波强度步骤中计算得到的滤波强度不为零,则将所述根据FS计算所述滤波强度步骤中计算得到的滤波强度减1,作为最终的滤波强度计算结果。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P1、P0、Q0、Q1,像素值分别为p1、p0、q0、q1,所述滤波边界从P0、Q0两个像素点间穿过;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是色度块边界时,如果滤波强度不为0,基于以下公式进行滤波计算:
p0’=(p1*3+p0*10+q0*3+8)>>4;
q0’=(q1*3+q0*10+p0*3+8)>>4;
上式中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
在一实施例中:
确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1、Q2,像素值分别为p2、p1、p0、q0、q1、q2,所述滤波 边界从P0、Q0两个像素点间穿过;
根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是色度块边界时,如果滤波强度为3,基于以下公式进行滤波计算:
p1’=(p2*3+p1*8+p0*3+q0*2+8)>>4;
q1’=(q2*3+q1*8+q0*3+p0*2+8)>>4;
上式中,p1’、q1’分别对应P1、Q1像素点滤波之后得到的新的像素值。
在一实施例中,确定所述滤波像素组的滤波强度,还包括:
判断所述滤波强度是否应该直接置0;
当所述滤波强度不应该直接置0时执行所述计算步骤。
在一实施例中,判断所述滤波强度是否应该直接置0,其中,定义所述滤波像素组中与所述滤波边界相邻的像素点分别为P0以及Q0,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断所述滤波强度是否应该直接置0。
在一实施例中,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断所述滤波强度是否应该直接置0,其中,判断因素包括:
P0和Q0所在的编码单元所有量化块是否是全0块;
P0和Q0所在的编码单元的编码模式;
P0和Q0所在的帧间预测单元的参考索引和参考帧;
P0和Q0所在的帧间预测单元的运动矢量。
在一实施例中,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断所述滤波强度是否应该直接置0,其中,当满足以下所有条件时,判定所述滤波强度应该直接置0:
P0和Q0所在的编码单元所有量化块均为全0块;
P0和Q0所在的编码单元的预测模式不是帧内预测;
P0和Q0所在预测单元的运动一致。
在一实施例中,当同时满足下述条件a)和b)或者同时满足下述条件c)和d)时,则视为P0和Q0所在预测单元的运动一致:
a)P0和Q0所在预测单元的第一参考图像均不存在,或者两者第一参考索引值相同并且第一运动矢量的所有分量的差均小于一个整像素点;
b)P0和Q0所在预测单元的第二参考图像均不存在,或者两者第二参考索引值相同并且第二运动矢量的所有分量的差均小于一个整像素点;
c)P0所在预测单元的第一参考图像和Q0所在预测单元的第二参考图像均不存在,或者是同一帧并且P0所在预测单元的第一运动矢量和Q0所在预测单元的第二运动矢量所有分量的差均小于一个整像素点;
d)Q0所在预测单元的第一参考图像和P0所在预测单元的第二参考图像均不存在,或者是同一帧并且Q0所在预测单元的第一运动矢量和P0所在预测单元的第二运动矢量所有分量的差均小于一个整像素点。
本申请还提出了一种视频编码方法,所述方法包括:
获取预测图像块;
根据所述预测图像块以及原始图像块获取第一残差图像块;
根据所述第一残差图像块,经过变换和量化生成用于写入码流的量化块;
根据所述量化块经反量化和反变换生成第二残差图像块;
根据所述第二残差图像块以及所述预测图像块获取重建图像块;
采用如本说明书实施例所述的方法对所述重建图像块构成的重建图像进行去块效应滤波,获取用于后续帧参考的参考图像。
本申请还提出了一种视频解码方法,所述方法包括:
解析码流获取量化块以及预测信息;
根据所述预测信息获取预测图像块;
根据所述量化块获取残差图像块;
根据所述残差图像块以及所述预测图像块获取重建图像块;
采用如本说明书实施例所述的方法对所述重建图像块构成的重建图像进 行去块效应滤波,获取用于后续帧参考的参考图像。
本申请还提出了一种去块效应滤波系统,所述系统包括:
滤波边界确定模块,其配置为确定滤波边界;
滤波像素组确定模块,其配置为根据所述滤波边界确定滤波像素组;
滤波强度确定模块,其配置为确定所述滤波像素组的滤波强度,所述滤波强度确定模块包括计算模块,所述计算模块包括:
单侧平坦度计算单元,其配置为分别解析所述滤波像素组中位于所述滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;
综合平坦度计算单元,其配置为计算所述滤波像素组的综合平坦度FS,其中,FS=FL+FR;
滤波强度计算单元,其配置为根据FS计算所述滤波强度;
滤波计算模块,其配置为根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算。
本申请还提出了一种计算机可读介质,其上存储有计算机可读指令,所述计算机可读指令可被处理器执行以实现本说明书实施例所述的方法。
本申请还提出了一种用于在用户设备端进行信息处理的设备,该设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该设备执行本说明书实施例所述的方法。
本说明书实施例采用的上述至少一个技术方案能够达到以下有益效果:相较于现有技术,本发明实施例的方法充分考虑了滤波边界两侧的像素点的像素值变化状态,从而在确定滤波像素组的滤波强度时采用更加合理的滤波强度判断条件,进而最终获取更为符合预期的去块效应滤波结果。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部 分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1以及图2为滤波像素组定义示意图;
图3以及图5为根据本说明书实施例的方法流程图;
图4为根据本说明书一实施例的滤波像素组定义示意图;
图6以及图7为根据本说明书实施例的系统结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在进行去块效应滤波时,通常是首先确定滤波强度和滤波器,然后根据确定好的滤波强度和滤波器对滤波像素组中的像素进行滤波计算,获取新的像素值。然而,在现有技术中,由于用于确定滤波强度和滤波器的判断条件设计得不够合理,这就造成了应该滤波的边界没有滤波或滤波强度不足,或者不应该滤波的边界进行了滤波,从而导致去块效应滤波无法达到预期效果,最终使得画面主观质量和客观质量的下降。
针对上述问题,本发明提出了一种去块效应滤波方法。在本说明书实施例的方法中,首先分别解析滤波像素组中位于滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度,然后根据两个单侧平坦度计算滤波像素组的综合平坦度,最后根据综合平坦度计算滤波强度。相较于现有技术,本发明实施例的方法充分考虑了滤波边界两侧的像素点的像素值变化状态,从而在确定滤波像素组的滤波强度时采用更加合理的滤波强度判断条件,进而最终获取更为符合预期的去块效应滤波结果。
以下结合附图,详细说明本说明书各实施例提供的技术方案。如图3所示,在一实施例中,方法包括以下步骤。
S310,确定滤波边界;
S320,根据滤波边界确定滤波像素组;
S330,确定滤波像素组的滤波强度,包括,计算步骤S300,计算步骤S300包括:
S331,分别解析滤波像素组中位于滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;
S332,计算滤波像素组的综合平坦度FS,其中,FS=FL+FR;
S333,根据FS计算滤波强度;
S340,根据滤波强度对滤波像素组包含的像素点进行滤波计算。
具体的,在本说明书一实施例中,在步骤S310中,滤波边界同时满足以下条件:(1)不位于图像边界或条带边界;(2)是编码单元边界,或者是预测单元边界,或者是变换单元边界。
具体的,在一实施例中,对一个平面滤波时,首先将平面图像分为n×n滤波块(n为自然数,在一实施例中,n的大小是最小编码单元(或最小预测、变换单元)的尺寸,或者是其整数倍数),每个滤波块的边界定义为备选滤波边界。对于备选滤波边界中的每一条边界,如果这条边界位于图像边界或条带边界,则将其从备选滤波边界中去除;如果这条边界既不是编码单元边界,也不是预测单元边界,也不是变换单元边界,则将其从备选滤波边界中去除;剩余的备选滤波边界则是待滤波边界。
进一步的,在本说明书一实施例中,在步骤S320中,滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1以及Q2,像素值分别为p2、p1、p0、q0、q1以及q2,滤波边界从P0、Q0两个像素点间穿过。如图4所示,一个方格表示一个像素,400为一滤波边界,虚线401圈出的一组像素为一个滤波像素组,该滤波像素组至少包括像素点P2、P1、P0、Q0、Q1以及Q2。
在步骤S331中,根据P0和Q0所在的编码单元的量化参数计算平均量化参数(QP avg),根据平均量化参数QP avg计算阈值A和B,将FL和FR初始化为0,分别计算FL和FR,其中:
如果abs(p0-p1)<B,则FL的值增加2;
如果abs(q0-q1)<B,则FR的值增加2;
如果abs(p0-p2)<B,则FL的值增加1;
如果abs(q0-q2)<B,则FR的值增加1;
在步骤S333中:
当FS为6时,如果abs(p0-p1)≤B/4,且abs(q0-q1)≤B/4,且abs(p0-q0)<A,那么滤波强度为4,否则为3;
当FS为5时,如果p0等于p1,且q0等于q1,则滤波强度为3,否则为2;
当FS为4时,如果FL的值为2,则滤波强度BS为2,否则为1;
当FS为3时,如果abs(p1-q1)<B,则滤波强度为1,否则为0;
当FS为3~6以外的其他值时,滤波强度为0。
上述步骤中,函数abs(x)定义为取x的绝对值。
进一步的,在本说明书一实施例中,在根据平均量化参数QP avg计算阈值A和B的过程中,首先基于预设表格,根据平均量化参数查询获取阈值A和B的初始值;然后根据像素值位宽调整阈值A和B的初始值,获取阈值A和B的最终值。
具体的,在本说明书一实施例中,根据平均量化参数查询获取阈值A和B的初始值,包括,计算索引IndexA和IndexB:
IndexA=Clip3(0,63,QP avg–8×(BD-8)+OffsetA)
IndexB=Clip3(0,63,QP avg–8×(BD-8)+OffsetB)
其中,BD为像素位宽,OffsetA和OffsetB为预设的查表偏移量。跟据 IndexA和IndexB查询表1,可以得到A和B的初始值。
Figure PCTCN2019077151-appb-000001
表1
具体的,在本说明书一实施例中,在根据像素值位宽调整阈值A和B的初始值的过程中,基于下述公式进行调整:
A=A<<(BD-8);(1)
B=B<<(BD-8);(2)
式1以及式2中,BD为像素值位宽。具体的,在一实施例中,BD为编码或解码使用的像素值的位宽(BitDepth)。
进一步的,在本说明书实施例中,针对不同的滤波强度,提出了不同的滤波计算步骤(滤波器)。这里需要说明的是,在某些应用场景中,可以根据本说明书实施例所提出的方法确定滤波强度,然后根据本说明书实施例提出的具体的滤波计算步骤来进行去块效应滤波计算。并且,在某些应用场景中,也可以在根据本说明书实施例所提出的方法确定滤波强度后,根据其他的滤波计算 步骤(非本说明书实施例提出的具体的滤波计算步骤)来进行去块效应滤波计算。同样,在某些应用场景中,也可以在根据其他的方法确定滤波强度(非本说明书实施例所提出的方法确定滤波强度)后,根据本说明书实施例提出的具体的滤波计算步骤来进行去块效应滤波计算。
进一步的,在实际应用场景中,去块效应滤波的对象包括亮度平面以及色度平面,为了获取更优的去块效应滤波效果,在本说明书实施例中,分别针对亮度平面以及色度平面构造不同的去块效应滤波计算步骤。
具体的,在本说明书一实施例中,滤波像素组至少包括连续排列的像素点P3、P2、P1、P0、Q0、Q1、Q2以及Q3,像素值分别为p3、p2、p1、p0、q0、q1、q2以及q3,滤波边界从P0、Q0两个像素点间穿过。在根据滤波强度对滤波像素组包含的像素点进行滤波计算时,当滤波边界是亮度块边界时,如果滤波强度为4,基于以下公式进行滤波计算:
p0’=(p2*3+p1*8+p0*10+q0*8+q1*3+16)>>5;(3)
q0’=(q2*3+q1*8+q0*10+p0*8+p1*3+16)>>5;(4)
p1’=(p2*4+p1*5+p0*4+q0*3+8)>>4;(5)
q1’=(q2*4+q1*5+q0*4+p0*3+8)>>4;(6)
p2’=(p3*2+p2*2+p1*2+p0+q0+4)>>3;(7)
q2’=(q3*2+q2*2+q1*2+q0+p0+4)>>3;(8)
式3~式8中,p2’、p1’、p0’、q0’、q1’、q2’分别对应P2、P1、P0、Q0、Q1以及Q2像素点滤波计算之后得到的新的像素值。
具体的,在本说明书一实施例中,滤波像素组至少包括连续排列的像素点P1、P0、Q0、Q1,像素值分别为p1、p0、q0、q1,所述滤波边界从P0、Q0两个像素点间穿过。在根据滤波强度对滤波像素组包含的像素点进行滤波计算时,当滤波边界是亮度块边界时,如果滤波强度为3,基于以下公式进行滤波计算:
p0’=(p2+p1*4+p0*6+q0*4+q1+8)>>4;(9)
q0’=(q2+q1*4+q0*6+p0*4+p1+8)>>4;(10)
p1’=(p2*3+p1*8+p0*4+q0*1+8)>>4;(11)
q1’=(q2*3+q1*8+q0*4+p0*1+8)>>4;(12)
式9~12中,p1’、p0’、q0’、q1’分别对应P1、P0、Q0、Q1像素点滤波之后得到的新的像素值。
具体的,在本说明书一实施例中,滤波像素组至少包括连续排列的像素点P0、Q0,像素值分别为p0、q0,滤波边界从P0、Q0两个像素点间穿过。在根据滤波强度对滤波像素组包含的像素点进行滤波计算时,当滤波边界是亮度块边界时,如果滤波强度为2,基于以下公式进行滤波计算:
p0’=(p1*3+p0*10+q0*3+8)>>4;(13)
q0’=(q1*3+q0*10+p0*3+8)>>4;(14)
式13以及式14中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
具体的,在本说明书一实施例中,滤波像素组至少包括连续排列的像素点P0、Q0,像素值分别为p0、q0,滤波边界从P0、Q0两个像素点间穿过。在根据滤波强度对滤波像素组包含的像素点进行滤波计算时,当滤波边界是亮度块边界时,如果滤波强度为1,基于以下公式进行滤波计算:
p0’=(p0*3+q0+2)>>2;(15)
q0’=(q0*3+p0+2)>>2;(16)
式15以及式16中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
具体的,在本说明书一实施例中,在计算滤波强度的过程中,当滤波边界为色度块边界时,如果根据FS计算得到的滤波强度不为零(图3所示的步骤S333的计算结果不为0),则将根据FS计算得到的滤波强度减1,作为最终的滤波强度计算结果。
具体的,在本说明书一实施例中,滤波像素组至少包括连续排列的像素点 P1、P0、Q0、Q1,像素值分别为p1、p0、q0、q1,滤波边界从P0、Q0两个像素点间穿过。在根据滤波强度对滤波像素组包含的像素点进行滤波计算时,当滤波边界是色度块边界时,如果滤波强度不为0,基于以下公式进行滤波计算:
p0’=(p1*3+p0*10+q0*3+8)>>4;(17)
q0’=(q1*3+q0*10+p0*3+8)>>4;(18)
式17以及式18中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
具体的,在本说明书一实施例中,滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1、Q2,像素值分别为p2、p1、p0、q0、q1、q2,滤波边界从P0、Q0两个像素点间穿过。在根据滤波强度对滤波像素组包含的像素点进行滤波计算时,当滤波边界是色度块边界时,如果滤波强度为3,基于以下公式进行滤波计算:
p1’=(p2*3+p1*8+p0*3+q0*2+8)>>4;(19)
q1’=(q2*3+q1*8+q0*3+p0*2+8)>>4;(20)
式19以及式20中,p1’、q1’分别对应P1、Q1像素点滤波之后得到的新的像素值。
这里需要说明的是,在上述实施例中,在确定滤波像素组时,仅限定了滤波像素组必须包含的像素点,但不等于说是滤波像素组仅包含那些像素点。在本说明书实施例中,可以根据实际需要确定滤波像素组中像素点的个数。例如,在本说明书一实施例中,只需要滤波像素组中紧靠滤波边界的6个像素点(滤波边界两侧,每侧各3个像素点)就可以完成针对FR、FL、FS以及滤波强度的计算。因此,滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1以及Q26个像素点。但这并不是说在所有实施例中滤波像素组仅包含这6个像素点。
进一步的,在本说明书一实施例中,在确定滤波像素组的滤波强度时,并 不是立即计算滤波强度,而是首先判断是否需要计算滤波强度。具体的,如图5所示,在确定滤波像素组的滤波强度的过程中(步骤S530):
S501,判断滤波强度是否应该直接置0;
S502,当滤波强度应该直接置0时,不进行滤波强度的计算,直接将滤波强度置0;
S500,当滤波强度不应该直接置0时计算滤波强度,即,采用步骤531~533计算滤波强度。
进一步的,在进行去块效应滤波时,如果滤波强度应该直接置0,不需要对对应的滤波像素组进行滤波计算(维持滤波像素组原始状态)。
具体的,在本说明书一实施例中,在判断滤波强度是否应该直接置0时,定义滤波像素组中与滤波边界相邻的像素点分别为P0以及Q0,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断滤波强度是否应该直接置0。
具体的,在本说明书一实施例中,在根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断滤波强度是否应该直接置0的过程中,判断因素包括:
P0和Q0所在的编码单元所有量化块是否是全0块;
P0和Q0所在的编码单元的编码模式;
P0和Q0所在的帧间预测单元的参考索引和参考帧;
P0和Q0所在的帧间预测单元的运动矢量。
具体的,在本说明书一实施例中,在根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断滤波强度是否应该直接置0的过程中,当满足以下所有条件时,判定所述滤波强度应该直接置0:
P0和Q0所在的编码单元所有量化块均为全0块;
P0和Q0所在的编码单元的预测模式不是帧内预测;
P0和Q0所在预测单元的运动一致。
具体的,在本说明书一实施例中,当同时满足下述条件a)和b)或者同时满足下述条件c)和d)时,则视为P0和Q0所在预测单元的运动一致:
a)P0和Q0所在预测单元的第一参考图像均不存在,或者两者第一参考索引值相同并且第一运动矢量的所有分量的差均小于一个整像素点;
b)P0和Q0所在预测单元的第二参考图像均不存在,或者两者第二参考索引值相同并且第二运动矢量的所有分量的差均小于一个整像素点;
c)P0所在预测单元的第一参考图像和Q0所在预测单元的第二参考图像均不存在,或者是同一帧并且P0所在预测单元的第一运动矢量和Q0所在预测单元的第二运动矢量所有分量的差均小于一个整像素点;
d)Q0所在预测单元的第一参考图像和P0所在预测单元的第二参考图像均不存在,或者是同一帧并且Q0所在预测单元的第一运动矢量和P0所在预测单元的第二运动矢量所有分量的差均小于一个整像素点。
进一步的,基于本说明书实施例提出的去块效应滤波方法,本说明书实施例还提出了一种视频编码方法。具体的,在本说明书一实施例中,视频编码方法包括:
获取预测图像块;
根据预测图像块以及原始图像块获取第一残差图像块;
根据第一残差图像块,经过变换和量化生成用于写入码流的量化块;
根据量化块经反量化和反变换生成第二残差图像块;
根据第二残差图像块以及预测图像块获取重建图像块;
采用如本说明书实施例所述的去块效应滤波方法对重建图像块构成的重建图像进行去块效应滤波,获取用于后续帧参考的参考图像。
具体的,在一具体应用场景中,首先将图像划分为不同大小的编码单元,对每个编码单元进行编码过程。将编码单元作为预测单元进行预测,预测模式可以从帧内预测模式和帧间预测模式中选择最优的模式。如果是帧间预测模式,还需要获取预测单元的第一和(或)第二参考帧索引,以及第一和(或)第二 运动矢量,并跟据以上预测信息生成预测图像块PRED。然后以编码单元为变换单元,用原始图像块ORG减去预测图像块PRED,生成残差图像块RESI。对残差图像块进行变换和量化操作,得到量化块。此时可以将量化块、编码模式、参考帧索引和运动矢量等信息写入码流,供解码端解码。同时,量化块进行反量化和反变换操作,得到残差图像块RESI’。经残差图像块RESI’加上预测图像块PRED,得到重建图像块RECO。根据本说明书实施例提出的去块效应滤波方法对重建图像块RECO进行去块效应滤波操作,获取用于后续帧编码参考的参考图像。
进一步的,基于本说明书实施例提出的去块效应滤波方法,本说明书实施例还提出了一种视频解码方法。具体的,在本说明书一实施例中,视频解码方法包括:
解析码流获取量化块以及预测信息;
根据预测信息获取预测图像块;
根据量化块获取残差图像块;
根据残差图像块以及所述预测图像块获取重建图像块;
采用如本说明书实施例所述的去块效应滤波方法对重建图像块构成的重建图像进行去块效应滤波,获取用于后续帧参考的参考图像。
具体的,在一具体应用场景中,对码流进行解析,得到每个编码单元的预测模式、参考帧索引、运动矢量、量化块等信息。跟据预测模式、参考帧索引、运动矢量等信息,生成预测图像块PRED。对量化块进行反量化和反变换操作,得到残差图像块RESI’。经残差图像块RESI’加上预测图像块PRED,得到重建图像块RECO。根据本说明书实施例提出的去块效应滤波方法对重建图像块组成的重建图像进行去块效应滤波操作,获取用于后续帧解码参考的参考图像。
进一步的,基于本说明书实施例提出的去块效应滤波方法,本说明书实施例还提出了一种去块效应滤波系统。具体的,如图6所示,系统包括:
滤波边界确定模块610,其配置为确定滤波边界;
滤波像素组确定模块620,其配置为根据滤波边界确定滤波像素组;
滤波强度确定模块630,其配置为确定滤波像素组的滤波强度,滤波强度确定模块630包括计算模块631,计算模块631包括:
单侧平坦度计算单元632,其配置为分别解析滤波像素组中位于滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;
综合平坦度计算单元633,其配置为计算滤波像素组的综合平坦度FS,其中,FS=FL+FR;
滤波强度计算单元634,其配置为根据FS计算滤波强度;
滤波计算模块640,其配置为根据滤波强度对滤波像素组包含的像素点进行滤波计算。
进一步的,在本说明书一实施例中,如图7所示,滤波强度确定模块730还包括置0判定模块735,置0判定模块735配置为判断滤波强度是否应该直接置0。滤波强度确定模块730配置为,当置0判定模块735判断滤波强度应该直接置0时,直接将滤波强度置0;当置0判定模块735判断滤波强度不应该直接置0时,使用计算模块731计算滤波强度。
基于本说明书实施例的方法,本说明书实施例还提出了一种计算机可读介质,其上存储有计算机可读指令,计算机可读指令可被处理器执行以实现本说明书实施例所述的方法。
基于本说明书实施例的方法,本说明书实施例还提出了一种用于在用户设备端进行信息处理的设备,该设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该设备执行本说明书实施例所述的方法。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已 经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序 代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设 备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括 一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (21)

  1. 一种去块效应滤波方法,其特征在于,所述方法包括:
    确定滤波边界,根据所述滤波边界确定滤波像素组;
    确定所述滤波像素组的滤波强度,包括,计算步骤,所述计算步骤包括:
    分别解析所述滤波像素组中位于所述滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;
    计算所述滤波像素组的综合平坦度FS,其中,FS=FL+FR;
    根据FS计算所述滤波强度;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算。
  2. 根据权利要求1所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1以及Q2,像素值分别为p2、p1、p0、q0、q1以及q2,所述滤波边界从P0、Q0两个像素点间穿过;
    获取两个单侧平坦度FL和FR,包括,根据P0和Q0所在的编码单元的量化参数计算平均量化参数,根据所述平均量化参数计算阈值A和B,将FL和FR初始化为0,分别计算FL和FR,其中:
    如果abs(p0-p1)<B,则FL的值增加2;
    如果abs(q0-q1)<B,则FR的值增加2;
    如果abs(p0-p2)<B,则FL的值增加1;
    如果abs(q0-q2)<B,则FR的值增加1;
    根据FS计算所述滤波强度,其中:
    当FS为6时,如果abs(p0-p1)≤B/4,且abs(q0-q1)≤B/4,且abs(p0-q0)<A,那么滤波强度为4,否则为3;
    当FS为5时,如果p0等于p1,且q0等于q1,则滤波强度为3,否则为2;
    当FS为4时,如果FL的值为2,则滤波强度BS为2,否则 为1;
    当FS为3时,如果abs(p1-q1)<B,则滤波强度为1,否则为0;
    当FS为3~6以外的其他值时,滤波强度为0。
  3. 根据权利要求2所述的方法,其特征在于,根据所述平均量化参数计算阈值A和B,包括:
    基于预设表格,根据所述平均量化参数查询获取阈值A和B的初始值;
    根据像素值位宽调整阈值A和B的初始值,获取阈值A和B的最终值。
  4. 根据权利要求3所述的方法,其特征在于,根据像素值位宽调整阈值A和B的初始值,其中,基于以下公式进行初始值的调整:
    A=A<<(BD-8);
    B=B<<(BD-8);
    上式中,BD为像素值位宽。
  5. 根据权利要求1~4中任一项所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P3、P2、P1、P0、Q0、Q1、Q2以及Q3,像素值分别为p3、p2、p1、p0、q0、q1、q2以及q3,所述滤波边界从P0、Q0两个像素点间穿过;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为4,基于以下公式进行滤波计算:
    p0’=(p2*3+p1*8+p0*10+q0*8+q1*3+16)>>5;
    q0’=(q2*3+q1*8+q0*10+p0*8+p1*3+16)>>5;
    p1’=(p2*4+p1*5+p0*4+q0*3+8)>>4;
    q1’=(q2*4+q1*5+q0*4+p0*3+8)>>4;
    p2’=(p3*2+p2*2+p1*2+p0+q0+4)>>3;
    q2’=(q3*2+q2*2+q1*2+q0+p0+4)>>3;
    上式中,p2’、p1’、p0’、q0’、q1’、q2’分别对应P2、P1、P0、 Q0、Q1以及Q2像素点滤波计算之后得到的新的像素值。
  6. 根据权利要求1~4中任一项所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P1、P0、Q0、Q1,像素值分别为p1、p0、q0、q1,所述滤波边界从P0、Q0两个像素点间穿过;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为3,基于以下公式进行滤波计算:
    p0’=(p2+p1*4+p0*6+q0*4+q1+8)>>4;
    q0’=(q2+q1*4+q0*6+p0*4+p1+8)>>4;
    p1’=(p2*3+p1*8+p0*4+q0*1+8)>>4;
    q1’=(q2*3+q1*8+q0*4+p0*1+8)>>4;
    上式中,p1’、p0’、q0’、q1’分别对应P1、P0、Q0、Q1像素点滤波之后得到的新的像素值。
  7. 根据权利要求1~4中任一项所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P0、Q0,像素值分别为p0、q0,所述滤波边界从P0、Q0两个像素点间穿过;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为2,基于以下公式进行滤波计算:
    p0’=(p1*3+p0*10+q0*3+8)>>4;
    q0’=(q1*3+q0*10+p0*3+8)>>4;
    上式中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
  8. 根据权利要求1~4中任一项所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P0、Q0,像素值分别为p0、q0,所述滤波边界从P0、Q0两个像素点间穿过;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是亮度块边界时,如果滤波强度为1,基于以下公式进行滤波计算:
    p0’=(p0*3+q0+2)>>2;
    q0’=(q0*3+p0+2)>>2;
    上式中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
  9. 根据权利要求1~4中任一项所述的方法,其特征在于,计算所述滤波强度,还包括:
    当所述滤波边界为色度块边界时,如果所述根据FS计算所述滤波强度步骤中计算得到的滤波强度不为零,则将所述根据FS计算所述滤波强度步骤中计算得到的滤波强度减1,作为最终的滤波强度计算结果。
  10. 根据权利要求9所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P1、P0、Q0、Q1,像素值分别为p1、p0、q0、q1,所述滤波边界从P0、Q0两个像素点间穿过;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中,当所述滤波边界是色度块边界时,如果滤波强度不为0,基于以下公式进行滤波计算:
    p0’=(p1*3+p0*10+q0*3+8)>>4;
    q0’=(q1*3+q0*10+p0*3+8)>>4;
    上式中,p0’、q0’分别对应P0、Q0像素点滤波之后得到的新的像素值。
  11. 根据权利要求9所述的方法,其特征在于:
    确定滤波像素组,其中,所述滤波像素组至少包括连续排列的像素点P2、P1、P0、Q0、Q1、Q2,像素值分别为p2、p1、p0、q0、q1、q2,所述滤波边界从P0、Q0两个像素点间穿过;
    根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算,其中, 当所述滤波边界是色度块边界时,如果滤波强度为3,基于以下公式进行滤波计算:
    p1’=(p2*3+p1*8+p0*3+q0*2+8)>>4;
    q1’=(q2*3+q1*8+q0*3+p0*2+8)>>4;
    上式中,p1’、q1’分别对应P1、Q1像素点滤波之后得到的新的像素值。
  12. 根据权利要求1~11中任一项所述的方法,其特征在于,确定所述滤波像素组的滤波强度,还包括:
    判断所述滤波强度是否应该直接置0;
    当所述滤波强度不应该直接置0时执行所述计算步骤。
  13. 根据权利要求12所述的方法,其特征在于,判断所述滤波强度是否应该直接置0,其中,定义所述滤波像素组中与所述滤波边界相邻的像素点分别为P0以及Q0,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断所述滤波强度是否应该直接置0。
  14. 根据权利要求13所述的方法,其特征在于,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断所述滤波强度是否应该直接置0,其中,判断因素包括:
    P0和Q0所在的编码单元所有量化块是否是全0块;
    P0和Q0所在的编码单元的编码模式;
    P0和Q0所在的帧间预测单元的参考索引和参考帧;
    P0和Q0所在的帧间预测单元的运动矢量。
  15. 根据权利要求13所述的方法,其特征在于,根据P0以及Q0所在的编码单元或预测单元的编码信息判断判断所述滤波强度是否应该直接置0,其中,当满足以下所有条件时,判定所述滤波强度应该直接置0:
    P0和Q0所在的编码单元所有量化块均为全0块;
    P0和Q0所在的编码单元的预测模式不是帧内预测;
    P0和Q0所在预测单元的运动一致。
  16. 根据权利要求15所述的方法,其特征在于,当同时满足下述条件a)和b)或者同时满足下述条件c)和d)时,则视为P0和Q0所在预测单元的运动一致:
    a)P0和Q0所在预测单元的第一参考图像均不存在,或者两者第一参考索引值相同并且第一运动矢量的所有分量的差均小于一个整像素点;
    b)P0和Q0所在预测单元的第二参考图像均不存在,或者两者第二参考索引值相同并且第二运动矢量的所有分量的差均小于一个整像素点;
    c)P0所在预测单元的第一参考图像和Q0所在预测单元的第二参考图像均不存在,或者是同一帧并且P0所在预测单元的第一运动矢量和Q0所在预测单元的第二运动矢量所有分量的差均小于一个整像素点;
    d)Q0所在预测单元的第一参考图像和P0所在预测单元的第二参考图像均不存在,或者是同一帧并且Q0所在预测单元的第一运动矢量和P0所在预测单元的第二运动矢量所有分量的差均小于一个整像素点。
  17. 一种视频编码方法,其特征在于,所述方法包括:
    获取预测图像块;
    根据所述预测图像块以及原始图像块获取第一残差图像块;
    根据所述第一残差图像块,经过变换和量化生成用于写入码流的量化块;
    根据所述量化块经反量化和反变换生成第二残差图像块;
    根据所述第二残差图像块以及所述预测图像块获取重建图像块;
    采用如权利要求1~16中任一项所述的方法对所述重建图像块构成的重建图像进行去块效应滤波,获取用于后续帧参考的参考图像。
  18. 一种视频解码方法,其特征在于,所述方法包括:
    解析码流获取量化块以及预测信息;
    根据所述预测信息获取预测图像块;
    根据所述量化块获取残差图像块;
    根据所述残差图像块以及所述预测图像块获取重建图像块;
    采用如权利要求1~16中任一项所述的方法对所述重建图像块构成的重建图像进行去块效应滤波,获取用于后续帧参考的参考图像。
  19. 一种去块效应滤波系统,其特征在于,所述系统包括:
    滤波边界确定模块,其配置为确定滤波边界;
    滤波像素组确定模块,其配置为根据所述滤波边界确定滤波像素组;
    滤波强度确定模块,其配置为确定所述滤波像素组的滤波强度,所述滤波强度确定模块包括计算模块,所述计算模块包括:
    单侧平坦度计算单元,其配置为分别解析所述滤波像素组中位于所述滤波边界两侧的像素点的像素值差值状态,获取两个单侧平坦度FL和FR;
    综合平坦度计算单元,其配置为计算所述滤波像素组的综合平坦度FS,其中,FS=FL+FR;
    滤波强度计算单元,其配置为根据FS计算所述滤波强度;
    滤波计算模块,其配置为根据所述滤波强度对所述滤波像素组包含的像素点进行滤波计算。
  20. 一种计算机可读介质,其上存储有计算机可读指令,所述计算机可读指令可被处理器执行以实现权利要求1至18中任一项所述的方法。
  21. 一种用于在用户设备端进行信息处理的设备,该设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该设备执行权利要求1至18中任一项所述的方法。
PCT/CN2019/077151 2019-02-26 2019-03-06 一种去块效应滤波方法、系统、设备及计算机可读介质 WO2020172902A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/768,377 US11206399B2 (en) 2019-02-26 2019-03-06 Methods, systems, devices and computer-readable mediums for deblocking filter

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910141512.2 2019-02-26
CN201910141512.2A CN109889853A (zh) 2019-02-26 2019-02-26 一种去块效应滤波方法、系统、设备及计算机可读介质

Publications (1)

Publication Number Publication Date
WO2020172902A1 true WO2020172902A1 (zh) 2020-09-03

Family

ID=66929379

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077151 WO2020172902A1 (zh) 2019-02-26 2019-03-06 一种去块效应滤波方法、系统、设备及计算机可读介质

Country Status (3)

Country Link
US (1) US11206399B2 (zh)
CN (1) CN109889853A (zh)
WO (1) WO2020172902A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4344202A3 (en) * 2019-08-23 2024-06-19 Huawei Technologies Co., Ltd. An encoder, a decoder and corresponding methods for performing chroma deblocking for blocks which use joint chroma coding
CN112544079A (zh) * 2019-12-31 2021-03-23 北京大学 视频编解码的方法和装置
CN113411584A (zh) * 2020-03-17 2021-09-17 北京三星通信技术研究有限公司 视频编解码的方法和装置
CN111711825B (zh) * 2020-06-23 2024-04-30 腾讯科技(深圳)有限公司 视频编解码中的去块效应滤波方法、装置、设备及介质
CN114640845B (zh) * 2021-02-23 2023-02-28 杭州海康威视数字技术股份有限公司 编解码方法、装置及其设备
CN113132725A (zh) * 2021-03-26 2021-07-16 中山大学 一种去块滤波优化方法、装置、设备及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008084996A1 (en) * 2007-01-11 2008-07-17 Samsung Electronics Co, . Ltd. Method and apparatus for deblocking-filtering video data
CN101472175A (zh) * 2007-12-29 2009-07-01 智多微电子(上海)有限公司 一种支持多视频标准的去块效应滤波装置
CN102196258A (zh) * 2010-03-11 2011-09-21 中国科学院微电子研究所 一种i帧编码方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100581255C (zh) * 2006-11-30 2010-01-13 联合信源数字音视频技术(北京)有限公司 一种像素级环路滤波方法和滤波器
CN101453651B (zh) * 2007-11-30 2012-02-01 华为技术有限公司 一种去块滤波方法和装置
US9338476B2 (en) * 2011-05-12 2016-05-10 Qualcomm Incorporated Filtering blockiness artifacts for video coding
CN103220529B (zh) * 2013-04-15 2016-02-24 北京大学 一种视频编解码环路滤波的实现方法
US9800895B2 (en) * 2013-06-27 2017-10-24 Qualcomm Incorporated Depth oriented inter-view motion vector prediction
CN103402101A (zh) * 2013-08-08 2013-11-20 张新安 基于边界平滑度的avs环路滤波快速算法
US10218983B2 (en) * 2015-09-30 2019-02-26 Apple Inc. Adapting mode decisions in video encoder
CN107027040B9 (zh) * 2016-01-29 2020-08-28 华为技术有限公司 一种去除块效应的滤波方法及装置
US11095893B2 (en) * 2016-10-12 2021-08-17 Qualcomm Incorporated Primary transform and secondary transform in video coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008084996A1 (en) * 2007-01-11 2008-07-17 Samsung Electronics Co, . Ltd. Method and apparatus for deblocking-filtering video data
CN101472175A (zh) * 2007-12-29 2009-07-01 智多微电子(上海)有限公司 一种支持多视频标准的去块效应滤波装置
CN102196258A (zh) * 2010-03-11 2011-09-21 中国科学院微电子研究所 一种i帧编码方法及装置

Also Published As

Publication number Publication date
US20210211656A1 (en) 2021-07-08
CN109889853A (zh) 2019-06-14
US11206399B2 (en) 2021-12-21

Similar Documents

Publication Publication Date Title
WO2020172902A1 (zh) 一种去块效应滤波方法、系统、设备及计算机可读介质
US9942574B2 (en) Deblocking filtering
KR102201051B1 (ko) 비디오 코딩 방법 및 장치
US11889102B2 (en) Filtering method for removing blocking artifact and apparatus
RU2565499C2 (ru) Способ обработки изображения, устройство обработки изображения, способы кодирования/декодирования видео, устройства кодирования/декодирования видео и программа для них
KR20210099134A (ko) 비선형 클리핑을 갖는 적응 루프 필터링(alf)
US9438912B2 (en) Video encoding/decoding methods, video encoding/decoding apparatuses, and programs therefor
TWI737137B (zh) 視訊編碼之非線性適應性迴圈濾波方法和裝置
WO2017084258A1 (zh) 编码过程中的实时视频降噪方法、终端和非易失性计算机可读存储介质
US20190387234A1 (en) Encoding method, decoding method, encoder, and decoder
US20190373281A1 (en) Encoding method, decoding method, encoder, and decoder
US10034016B2 (en) Coding apparatus, computer system, coding method, and computer product
CN114339223B (zh) 解码方法、装置、设备及机器可读存储介质
US20230388550A1 (en) Method and apparatus for adaptively processing video samples in a video signal frame
WO2020181579A1 (zh) 一种基于帧内预测的编解码方法、装置及滤波器
US10306247B2 (en) Image decoding apparatus and method
US10419775B2 (en) Moving image encoding apparatus, image capturing apparatus, moving image encoding method, and non-transitory computer readable storage medium
WO2020172904A1 (zh) 一种反量化方法、系统、设备及计算机可读介质
US11870994B2 (en) Method, system, device, and computer-readable storage medium for inverse quantization
WO2020258052A1 (zh) 图像分量预测方法、装置及计算机存储介质
US10944967B2 (en) Encoder and decoder and methods thereof
US20140270538A1 (en) Moving image processing apparatus, moving image processing method, and computer product
Lee et al. Block-based adaptive noise filtering for H. 264/AVC compression
CN118233641A (zh) 块效应检测方法和装置、块效应处理方法和装置、视频编码器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19916798

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19916798

Country of ref document: EP

Kind code of ref document: A1