WO2016197634A1 - 去块效应滤波方法和去块效应滤波器 - Google Patents

去块效应滤波方法和去块效应滤波器 Download PDF

Info

Publication number
WO2016197634A1
WO2016197634A1 PCT/CN2016/075311 CN2016075311W WO2016197634A1 WO 2016197634 A1 WO2016197634 A1 WO 2016197634A1 CN 2016075311 W CN2016075311 W CN 2016075311W WO 2016197634 A1 WO2016197634 A1 WO 2016197634A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
pixel
filtered
filter
neighborhood
Prior art date
Application number
PCT/CN2016/075311
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 EP16806532.4A priority Critical patent/EP3300361B1/en
Priority to KR1020187001044A priority patent/KR102094247B1/ko
Publication of WO2016197634A1 publication Critical patent/WO2016197634A1/zh
Priority to US15/837,594 priority patent/US10555007B2/en

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/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/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
    • 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/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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Definitions

  • the present invention relates to the field of communications and, more particularly, to a deblocking filtering method and a deblocking filter.
  • Video coding usually adopts a hybrid coding framework, such as H.264/AVC, H.265/HEVC, AVS, and the like.
  • the hybrid coding framework mainly includes prediction, transform, quantization, entropy coding, and deblocking.
  • High Efficiency Video Coding employs a hybrid coding framework based on image block-based prediction and transformation.
  • HEVC can divide the video that needs to be encoded into I frames, P frames, and B frames.
  • the encoding of the I frame is intraframe coding
  • the encoding of the P frame and the B frame is interframe coding
  • the interframe coding and the intra coding are both block-based coding methods.
  • HEVC divides the image into units based on the Coding Tree Unit (CTU).
  • the CTU continues to be divided into coding units (CUs) in the form of a quadtree, and CU is used as the root in prediction and transformation.
  • the node will continue to be divided into a Prediction Unit (PU) and a Transform Unit (TU).
  • PU Prediction Unit
  • TU Transform Unit
  • Block-based transform coding is widely used in image compression coding. As the code rate decreases, quantization becomes rough, and discontinuities appear at the boundary of the block, forming obvious defects in reconstructed images. The continuous phenomenon is called blockiness.
  • a deblocking filter In the existing method of removing blockiness, a deblocking filter is generally used.
  • the deblocking filter may first calculate the filter offset value of the pixel at the block boundary and filter the pixel value of the pixel according to the filter offset value.
  • the signal filtered by this method may have an increase in the local waveform gradient, which may cause the maximum waveform gradient to shift, so that the overall smoothness of the signal decreases.
  • the embodiment of the invention provides a deblocking filtering method and a deblocking filter, which can improve the overall smoothness of the filtered signal waveform.
  • a deblocking filtering method including: determining, according to a current pixel value of a pixel to be filtered on an image block and a pixel value of a pixel in a first neighborhood of the pixel to be filtered. Filtering a first filter offset value of the pixel; predicting a pixel value of the pixel to be filtered according to a pixel value of a pixel in a second neighborhood of the pixel to be filtered, thereby obtaining a filtered prediction value of the pixel to be filtered And determining an actual filtered value of the pixel to be filtered according to the current pixel value, the first filter offset value, and the filtered prediction value.
  • the difference between the current pixel value and the first filter offset value minus the filtered prediction value is taken as an absolute value, thereby obtaining the first An absolute value
  • the difference obtained by subtracting the current pixel value from the filtered prediction value is taken as an absolute value, thereby obtaining a second absolute value, and comparing the first absolute value with the second absolute value;
  • the comparison result determines the actual filtered value.
  • the determining, according to the current pixel value, the first filter offset value, and the filtered prediction value, the actual filter value includes Determining whether the symbol of the difference obtained after subtracting the filtered prediction value from the current pixel value is the same as the sign of the first filter offset value; determining the actual filter value according to the determination result.
  • the pixel value of the pixel to be filtered is performed according to a pixel value of a pixel in a second neighborhood of the pixel to be filtered
  • Predicting, obtaining the filtered prediction value of the pixel to be filtered includes: performing weighted summation on pixel values of at least two pixels on both sides of the pixel to be filtered in the second neighborhood, thereby obtaining the pixel to be filtered Filter the predicted value.
  • the pixel value of at least two pixels on both sides of the pixel to be filtered in the second neighborhood is weighted and obtained.
  • the pixel value of the pixel to be filtered is performed according to a pixel value of a pixel in a second neighborhood of the pixel to be filtered Predicting, thereby obtaining the filtered prediction value of the pixel to be filtered, comprising: determining a fitting curve, the fitting curve including a fitting parameter; performing at least two pixels in the second neighborhood according to the fitting curve Fitting, obtaining a value of the fitting parameter; obtaining a filtered prediction value of the pixel to be filtered according to the value of the fitting parameter and a fitting curve.
  • the fitting curve is: t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are the fitting parameters; correspondingly, the at least two pixels in the second neighborhood are fitted according to the fitting curve, and the value of the fitting parameter is obtained: a fitting curve, a distance from at least three pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and a pixel value corresponding to the at least three pixels The values of ⁇ and ⁇ .
  • the fitting curve is: t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are the fitting parameters; correspondingly, the at least two pixels in the second neighborhood according to the fitting curve Performing a fitting to obtain the value of the fitting parameter includes: according to the fitting curve, a distance from at least two pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and The pixel values corresponding to the at least two pixels determine the values of ⁇ and ⁇ .
  • the fitting curve is: t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are the fitting parameters; correspondingly, the at least two pixels in the second neighborhood are fitted according to the fitting curve, and the value of the fitting parameter is obtained: a fitting curve, a distance from at least two pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and a pixel value corresponding to the at least two pixels The values of ⁇ and ⁇ .
  • the current pixel value of the pixel to be filtered and the pixel value of the pixel in the first neighborhood of the pixel to be filtered Determining, by the first filter offset value of the pixel to be filtered, performing weighted summation on a current pixel value of the pixel to be filtered and a pixel value of at least one pixel in the first neighborhood, to obtain the to-be- The filtered offset value of the filtered pixel.
  • the first neighborhood and the second neighborhood are the same.
  • a deblocking filter including: a first determining unit, configured to: according to a current pixel value of a pixel to be filtered on an image block and a pixel in a first neighborhood of the pixel to be filtered Determining, by a pixel value, a first filter offset value of the pixel to be filtered; and a prediction unit, configured to predict a pixel value of the pixel to be filtered according to a pixel value of a pixel in a second neighborhood of the pixel to be filtered And obtaining a filtered prediction value of the pixel to be filtered; a second determining unit, configured to obtain, according to the current pixel value, the first filtering offset value obtained by the first determining unit, and the prediction unit The filtered prediction value determines an actual filtered value of the pixel to be filtered.
  • the second determining unit is specifically configured to subtract the filtered predicted value from a sum of the current pixel value and the first filtered offset value
  • the difference value is taken as an absolute value, thereby obtaining a first absolute value
  • the difference obtained by subtracting the current pixel value from the filtered prediction value is taken as an absolute value, thereby obtaining a second absolute value, for the first absolute value
  • the second absolute value is compared, and the actual filtered value is determined based on the comparison result.
  • the second determining unit is specifically configured to determine, after the current pixel value is subtracted from the filtered prediction value, Whether the sign of the difference value is the same as the sign of the first filter offset value, and determining the actual filter value according to the determination result.
  • the second determining unit is specifically configured to: obtain a difference value after subtracting the filtered prediction value from the current pixel value
  • the sign of ⁇ 1 is opposite, the value obtained by adding the current pixel value to the first filter offset value is used as the actual filter value.
  • the predicting unit is specifically configured to: at least two pixels on both sides of the pixel to be filtered in the second neighborhood The pixel values are weighted and summed to obtain a filtered prediction value of the pixel to be filtered.
  • the prediction unit is specifically configured to determine a fitting curve, where the fitting curve includes a fitting parameter, according to the fitting curve Fitting at least two pixels in the second neighborhood to obtain a value of the fitting parameter, and obtaining a filtered prediction value of the pixel to be filtered according to the value of the fitting parameter and a fitting curve.
  • the fitting curve is: t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are the fitting parameters; correspondingly, the prediction unit is specifically configured to: according to the fitting curve, at least three pixels on both sides of the pixel to be filtered in the second neighborhood to the image The distance of the boundary of the block and the pixel value corresponding to the at least three pixels are determined The values of ⁇ and ⁇ .
  • the fitting curve is: t is the distance from the pixel to be filtered to the boundary of the image block, and ⁇ and ⁇ are the fitting parameters; correspondingly, the prediction unit is specifically configured to use, according to the fitting curve, the second neighborhood A distance from at least two pixels on both sides of the pixel to be filtered to a boundary of the image block and a pixel value corresponding to the at least two pixels determine values of ⁇ and ⁇ .
  • the fitting curve is: t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are the fitting parameters; correspondingly, the prediction unit is specifically configured to: according to the fitting curve, at least two pixels on both sides of the pixel to be filtered in the second neighborhood to the image The distance of the boundary of the block and the pixel value corresponding to the at least two pixels are determined The values of ⁇ and ⁇ .
  • the first determining unit is specifically configured to: use a current pixel value of the pixel to be filtered and at least one of the first neighborhoods The pixel values of the pixels are weighted and summed to obtain a filter offset value of the pixel to be filtered.
  • the first neighborhood and the second neighborhood are the same.
  • the embodiment of the present invention determines the filter offset value and the filter prediction value of the pixel to be filtered by using the pixel value of the neighboring pixel of the pixel to be filtered, and determines the actual filter value according to the filter offset value, the current pixel value, and the filtered prediction value. This can improve the overall smoothness of the filtered signal waveform.
  • FIG. 1 is a schematic diagram of a conventional deblocking filtering method causing filtering anomalies.
  • FIG. 2 is a schematic flow chart of a deblocking filtering method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of filtered prediction values of pixels to be filtered based on linear prediction according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of filtered prediction values of pixels to be filtered predicted based on function fitting according to another embodiment of the present invention.
  • Figure 5 is a block diagram of a deblocking filter in accordance with one embodiment of the present invention.
  • Figure 6 is a block diagram of a deblocking filter in accordance with one embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a conventional deblocking filtering method causing filtering anomalies.
  • the deblocking filter of Figure 1 can be a deblocking filter in HEVC. Pixels P 0 and P 1 are located in a first image block in the image, and pixels Q 0 and Q 1 are located in a second image block in the image.
  • a deblocking filter In the existing method of removing blockiness, a deblocking filter is generally used.
  • the deblocking filter may first calculate the filter offset value of the pixel at the block boundary and filter the pixel value of the pixel according to the filter offset value. For example, pixels P 0 and Q 0 are filtered to obtain pixels P 0 ' and Q 0 '.
  • the gradient between P 0 ' and Q 0 ' decreases after filtering, and the gradient between Q 0 ' and Q 1 also decreases, that is, the gradient between pixels P 0 ' and Q 1 decreases. Make this waveform less prone to blockiness.
  • the gradient between P 1 and P 0 ' is increased.
  • the filtered maximum gradient does not decrease, but only shifts between P 0 and Q 0 to between P 1 and P 0 '. That is, the filtered signal may increase the local waveform gradient, causing the maximum waveform gradient to shift, so that the overall smoothness of the signal is reduced, the subjective visual effect is impaired, and the coding efficiency is reduced.
  • FIG. 2 is a schematic flow chart of a deblocking filtering method according to an embodiment of the present invention. The method of Figure 2 can be performed by a deblocking filter.
  • the pixel values of the pixels to be filtered are predicted according to the pixel values of the pixels in the second neighborhood of the pixel to be filtered, thereby obtaining a filtered prediction value of the pixel to be filtered.
  • the embodiment of the present invention determines the filter offset value and the filter prediction value of the pixel to be filtered by using the pixel value of the neighboring pixel of the pixel to be filtered, and determines the actual filter value according to the filter offset value, the current pixel value, and the filtered prediction value. This can improve the overall smoothness of the filtered signal waveform.
  • the pixel to be filtered in the embodiment of the present invention may be a pixel of an image block boundary such as a coded block, a change block, or a prediction block, or may be a pixel at a boundary of an image block where only a block effect exists, which is not performed by the embodiment of the present invention. limit.
  • the filter may filter at least one pixel to be filtered in the block effect according to the above method.
  • Reason Each pixel to be filtered may be any one of the block effect regions in the coding block, the change block, or the prediction block.
  • the pixel to be filtered may be a pixel at a block boundary where a block effect exists.
  • the plurality of pixels to be filtered may be a row or a column of pixels spanning two coding blocks, or may be a row or a column of pixels spanning two transform blocks, or may be a row or a column of pixels spanning two prediction blocks.
  • the filter offset value and the filter prediction value the same calculation method may be used, or different calculation methods may be used.
  • the embodiment of the present invention performs filtering processing on the pixels to be filtered in the area where the block effect exists, but as to how many pixels to be filtered are selected, the embodiment of the present invention does not limit this.
  • the number of plurality of filtered pixels may be 4, 6, 8, 10, 12, 9, and the like.
  • at least the pixels of the block boundary where the block effect is present are selected. The following is merely exemplified by taking any one of a plurality of pixels to be filtered as an example.
  • the first filter offset value ⁇ 1 of the pixel to be filtered may be determined according to a current pixel value of the pixel to be filtered and a pixel value of the first neighborhood pixel of the pixel to be filtered.
  • the first neighborhood pixel of the pixel to be filtered may be a pixel of a region around the pixel to be filtered.
  • the embodiment of the present invention does not limit the size of the first neighborhood, as long as the first neighborhood includes other pixels than the pixels to be filtered.
  • the filter offset value of the pixel to be filtered can be obtained from the current pixel value of the pixel to be filtered and the pixel value of at least one pixel around it.
  • the current pixel value of the pixel to be filtered and the pixel value of the at least one first neighborhood pixel may be weighted and summed to obtain a filter offset value of the pixel to be filtered.
  • the filter offset value of the pixel to be filtered may be calculated using a method of calculating a filter offset value of the pixel in HEVC.
  • the first filter offset value of the pixel P 0 to be filtered can be determined according to the following formula:
  • ⁇ 1 round ⁇ [a(q 0 -p 0 )-b(q 1 -p 1 )]/c ⁇ (1)
  • p 0 is a pixel value of a pixel to be filtered
  • p 1 , q 0 , and q 1 are pixel values corresponding to three pixels in the first neighborhood.
  • the pixels P 1 , Q 0 , and Q 1 are pixels of the first neighborhood of the pixel P 0 . It is assumed that the four pixel values p 0 , p 1 , q 0 , and q 1 are pixel values corresponding to the pixels P 0 , P 1 , Q 0 , and Q 1 , respectively.
  • round(x) means rounding up x, for example, rounding rounding, rounding up or down rounding, etc. can be used.
  • the weight values of p 0 , p 1 , q 0 , and q 1 are -a/c, b/c, a/c, and -b/c, respectively.
  • a, b, and c are preset constants, and the weight value of each pixel can be determined using an empirical value or re-determined.
  • the constant c can usually be set to a positive integer power of two.
  • the preset constants, a, b, and c may be 9, 3, and 16, respectively, that is, the first filter offset value of the pixel to be filtered may be determined according to the following formula:
  • the first filter offset value of the pixel to be filtered may also be determined according to the following formula:
  • ⁇ 1 round[(a 0 p 0 +a 1 p 1 +a 2 p 2 +b 1 q 1 +b 2 q 2 )/c] (3)
  • a 0 , a 1 , a 2 , b 1 , b 2 and c are preset constants
  • p 0 is the pixel value of the pixel to be filtered
  • p 1 , p 2 , q 1 and q 2 are in the first neighborhood
  • a 0 , a 1 , a 2 , b 1 may be generally set to an integer.
  • the filter offset value for pixel Q 0 may be - ⁇ 1 or may be calculated using other weighted summation methods.
  • the filter offset values of the two pixels symmetric about the block boundary may be the same size and opposite signs.
  • the two pixels may be calculated by using different weighted summation methods, which is not limited in this embodiment of the present invention.
  • the filter offset values of all the pixels can be calculated independently, and can also be calculated by using the filter offset value of the neighborhood point and the pixel value of the neighborhood point.
  • the filter offset value of the pixel can be obtained by the following method (4)(5) by the filter offset value of the neighborhood pixel and the pixel value of the neighborhood pixel.
  • Filter offset values for pixels P 1 , Q 1 Can be:
  • the pixel value of the pixel to be filtered may be predicted according to the pixel value of the second neighborhood pixel of the pixel to be filtered to obtain a filtered prediction value of the pixel to be filtered.
  • first neighborhood and the second neighborhood in the embodiment of the present invention are the neighborhoods of the pixels to be filtered, and the two may be the same area or different areas.
  • first neighborhood and the second neighborhood the same.
  • the pixel values of at least two pixels on both sides of the pixel to be filtered in the second neighborhood may be weighted and summed to obtain a filtered prediction value of the pixel to be filtered.
  • the constant c can usually be set to a positive integer power of two.
  • d 1 , d 2 , and d 3 are not limited in the embodiment of the present invention.
  • the filtered prediction value of the pixel to be filtered is located on the line connecting the pixels P 1 and Q 1 , that is, the filtering prediction of the pixel to be filtered.
  • the value r is a linear interpolation of the pixel values p 1 and q 1 .
  • N is an integer greater than or equal to 2.
  • the filtered prediction value of the pixel to be filtered is estimated by taking at least two pixels of the second neighborhood of the filtered pixel.
  • the pixel P 2, P 1, Q 1 corresponds to the pixel value p 2, p 1, q 1 is further weighted sum value as a filtering prediction value of the pixel to be filtered, wherein the pixel value p 2, p 1, q
  • the corresponding weights of 1 can be 6/16, 11/16, -1/16, respectively.
  • the weighted summation values of the pixel values p 3 , p 2 , p 1 , q 0 , q 1 , and q 2 corresponding to the pixels P 3 , P 2 , P 1 , Q 0 , Q 1 , and Q 2 may be used as the weighted summation values.
  • a filtered prediction value of the pixel to be filtered, wherein the weights corresponding to the pixel values p 3 , p 2 , p 1 , q 0 , q 1 , and q 2 may be 1/32, -5/32, 20/32, 20/, respectively. 32, -5/32, 1/32.
  • the filtered prediction value of the pixel to be filtered in the embodiment of the present invention may be obtained according to a fitting function. Determining the pixel value of the pixel to be filtered according to the pixel value of the pixel in the second neighborhood of the pixel to be filtered, thereby obtaining the filtered prediction value of the pixel to be filtered includes: determining a fitting curve, wherein the fitting curve includes a fitting parameter; Fitting a curve to fit at least two pixels in the second neighborhood Obtaining a value of the fitting parameter; obtaining a filtered prediction value of the pixel to be filtered according to the value of the fitting parameter and the fitting curve.
  • a function may be preset and parameters in the function may be set, and the function may be fitted by at least two pixels in the second neighborhood and their corresponding pixel values to obtain a parameter value in the function. Then, the value of the independent variable of the pixel to be filtered is substituted into the fitted function to obtain a filtered prediction value of the pixel to be filtered.
  • the embodiment of the present invention does not limit the specific fitting curve, and various forms of the curve can be used as the fitting curve.
  • the fit curve can be:
  • ⁇ and ⁇ may be determined according to a fitting curve, a distance from at least three pixels on both sides of the pixel to be filtered in the second neighborhood to the boundary of the image block, and a pixel value corresponding to at least three pixels.
  • the distance from the pixels P 2 , P 1 , Q 1 , and Q 2 in the second neighborhood to the block boundary may be And the pixel value corresponding to each pixel Fit the function in equation (8).
  • different pixels in the second neighborhood may be used to fit the function, and multiple sets of preset parameters are obtained. Then, traversing the plurality of sets of preset parameters, calculating the mean square error of the pixel values of the plurality of pixels and the predicted values of the pixels under each set of preset parameters, and taking the mean square error of the plurality of pixels and the minimum set of preset parameters as a function The fitting parameters.
  • the plurality of sets of preset parameters may be traversed, and when the total error of the pixel values of the plurality of pixels and the pixel predicted value under each set of preset parameters is less than the threshold, the set of preset parameters is taken as the final fitting parameter of the function.
  • the threshold here can be set in advance.
  • the distance from the pixel to the block boundary may be substituted into the fitted function to obtain a pixel predicted value of the pixel to be filtered.
  • the distance from the pixel P 0 , Q 0 to the block boundary The pixel prediction values of the pixels P 0 and Q 0 are respectively S (-0.5) and S (0.5).
  • the embodiment of the present invention does not limit the function of curve fitting selection.
  • the preset parameters in the fitting function can be determined by selecting pixels in the second neighborhood and their corresponding pixel values. After determining the preset parameters in the fitting function, the distance from the pixel to the block boundary to the block boundary may be substituted into the function to obtain a filtered prediction value of the pixel to be filtered.
  • the fitting curve can also be:
  • t is the distance from the pixel to be filtered to the boundary of the image block
  • the values of ⁇ and ⁇ may be based on the fitting curve, the distance from at least two pixels on both sides of the pixel to be filtered in the second neighborhood to the boundary of the image block, and at least two The pixel values corresponding to the pixels are determined.
  • the fitting curve can also be:
  • ⁇ and ⁇ may be determined according to a fitting curve, a distance from at least two pixels on both sides of the pixel to be filtered in the second neighborhood to the boundary of the image block, and pixel values corresponding to at least two pixels.
  • the value obtained from the current pixel value, the first filter offset value, and the filtered prediction value may be used as the actual filtered value of the pixel to be filtered.
  • whether the current pixel value is further away from the filtered prediction value may be determined by determining a value obtained by adding the first filter offset value to the current pixel value, and determining the actual filter value according to the determination result. For example, comparing the first absolute value of the difference between the current pixel value and the first filter offset value minus the filtered prediction value, and the second absolute value of the difference between the current pixel value minus the filtered prediction value, according to The comparison result determines the actual filtered value.
  • the value obtained after the current pixel value is added to the first filter offset value ⁇ 1 is obtained by adding the current filter value to the second filter offset value ⁇ 2 when the current pixel value is further away from the filtered prediction value.
  • the actual filtered value is described.
  • the actual filter value in the embodiment of the present invention can make the overall smoothness of the signal better, and enhance subjective visual effects and coding efficiency.
  • the actual filtered value is closer to the filtered predictor than the current pixel value plus the first filtered offset value.
  • the specific method for determining whether the current pixel value is further away from the filtered prediction value after adding the first filter offset value to the current pixel value is not limited.
  • the first distance between the current filtered value and the filtered predicted value may be added to the current pixel value, and the second distance between the current pixel value and the filtered predicted value may be compared, so as to determine the pixel to be filtered. Whether the current pixel value of the pixel to be filtered is more deviated from the filtered prediction value after the current pixel value plus the filter offset value. When the first distance is greater than the second distance, whether the current pixel value of the pixel to be filtered plus the filter offset value is further deviated from the filtered prediction value relative to the current pixel value of the pixel to be filtered.
  • the first distance is smaller than the second distance, whether the current pixel value of the pixel to be filtered and the current pixel value of the pixel to be filtered are closer to the filtered prediction value after adding the filter offset value.
  • the first distance is equal to the second distance, the current pixel value of the pixel to be filtered plus the filter offset value is the same as the current pixel value of the pixel to be filtered and the filtered prediction value.
  • the embodiment of the present invention can also determine whether the current pixel value is further away from the filtered prediction value after the current pixel value plus the first filter offset value by other equivalent methods, and will not be described one by one.
  • the actual filter value may be determined according to the determination result by determining whether the symbol of the difference value obtained after subtracting the filtered prediction value from the current pixel value is the same as the symbol of the first filter offset value. For example, when the sign of the difference value after the current pixel value minus the filtered prediction value is the same as the sign of the first filter offset value ⁇ 1 , the value obtained by adding the current pixel value to the second filter offset value ⁇ 2 is taken as the actual value.
  • ⁇ 1 represents the first filtered offset value, -1 ⁇ ⁇ ⁇ 1; or a sign of the difference value after the current pixel value minus the filtered predicted value
  • the sign of the filter offset value ⁇ 1 is opposite, the value obtained by adding the current pixel value to the first filter offset value is taken as the actual filter value.
  • the symbol here is a sign of a sign, that is, the sign can be positive or negative.
  • the current filtered pixel value is added to the filter prediction value after adding the first filter offset value to the current pixel value. value.
  • the actual filter value can be directly determined by the above symbol relationship. Further, the method further determines whether the current filter value is further determined by the current pixel value plus the first filter offset value, and whether the current filter value is further away from the filtered prediction value. The specific determination method has been described above, and details are not described herein again.
  • the current pixel value is added to the first filter offset value as the actual filtered value.
  • the above-mentioned scaling factor ⁇ value may be preset by the encoding end, or may be analyzed and determined at the encoding end.
  • the scaling factor with the best encoding performance is selected as the decision result, wherein the optimal encoding performance may be that the mean square error of each filtered pixel in the filtered image is minimum; then the decision result is written into the code stream, for example, Write into a grammatical structure such as a slice header or a picture parameter set (PPS).
  • PPS picture parameter set
  • the data can be adjusted within the dynamic range. For example, for an image that is 8 bits wide, its dynamic range is typically 0 to 255. If the current pixel value of the pixel to be filtered plus the filter offset value is greater than 255 or less than 0, then the vertical need to be defined in the range of 0 to 255. Typically, the value of the result less than 0 is clamped to 0, and the value of the result greater than 255 is clamped to 255.
  • the pixels to be filtered in the embodiment of the present invention are independent of each other, and may be processed separately for one pixel to be filtered in the block effect, or may be simultaneously processed for multiple pixels to be filtered.
  • the same formula may be used, or a different formula may be used.
  • the overall smoothness of the signal waveform can be improved, and the subjective visual effect and coding efficiency of the image can be enhanced.
  • the specific fitting curve of the filtered prediction value of the pixel to be filtered in the embodiment of the present invention is not limited. Here are two examples to illustrate.
  • FIG. 3 is a schematic diagram of filtered prediction values of pixels to be filtered based on linear prediction according to an embodiment of the present invention.
  • using two of the second neighborhood of the pixel P 0, e.g., on both sides of the pixel P 0 P 1 and Q 1 calculates a predicted value P 0 of the filter. Calculated as follows:
  • a pixel (P 1 and Q 1 ) on both sides of P 0 is fitted to obtain a parameter value corresponding to a straight line as shown in FIG. 3 and its straight line. Then, the linear prediction of the filtered pixel P 0 is performed by a straight line to obtain a filtered prediction value r corresponding to P 0 .
  • FIG. 4 is a schematic diagram of filtered prediction values of pixels to be filtered predicted based on function fitting according to another embodiment of the present invention.
  • the filtered prediction value can be determined according to the following formula:
  • t is the distance from the pixel to be filtered to the boundary of the image block
  • the values of ⁇ and ⁇ are determined according to the distance from at least three pixels on both sides of the pixel to be filtered in the second neighborhood to the boundary of the image block and the pixel values corresponding to at least three pixels.
  • the distance from the pixels P 2 , P 1 , Q 1 , and Q 2 in the second neighborhood to the block boundary may be And the pixel value corresponding to each pixel Fit the function in equation (8).
  • the distance from the pixel to the block boundary may be substituted into the fitted function to obtain a pixel predicted value of the pixel to be filtered.
  • the distance from the pixel P 0 , Q 0 to the block boundary The pixel prediction values of the pixels P 0 and Q 0 are respectively S (-0.5) and S (0.5).
  • FIGS. 5 and 6 A block diagram of a device for a deblocking filter according to an embodiment of the present invention.
  • FIG. 5 is a block diagram of a deblocking filter in accordance with one embodiment of the present invention.
  • the deblocking filter of FIG. 5 includes a first determining unit 11, a prediction unit 12, a judging unit 13, and a second determining unit 14.
  • the first determining unit 11 is configured to determine a first filter offset value of the pixel to be filtered according to a current pixel value of the pixel to be filtered on the image block and a pixel value of a pixel in the first neighborhood of the pixel to be filtered, where the to-be-filtered pixel is to be filtered.
  • a pixel is a pixel of an image block boundary in which there is a block effect in the image.
  • the prediction unit 12 is configured to predict a pixel value of the pixel to be filtered according to a pixel value of a pixel in a second neighborhood of the pixel to be filtered, thereby obtaining a filtered prediction value of the pixel to be filtered.
  • the second determining unit 13 is configured to determine an actual filtered value of the pixel to be filtered according to the current pixel value, the first filtered offset value obtained by the first determining unit, and the filtered predicted value obtained by the prediction unit.
  • the embodiment of the present invention determines the filter offset value and the filter prediction value of the pixel to be filtered by using the pixel value of the neighboring pixel of the pixel to be filtered, and determines the actual filter value according to the filter offset value, the current pixel value, and the filtered prediction value. This can improve the overall smoothness of the filtered signal waveform.
  • the second determining unit is specifically configured to: take the difference between the sum of the current pixel value and the first filter offset value and the filtered prediction value to obtain an absolute value, thereby obtaining the first absolute value. And subtracting the filtered value from the current pixel value to obtain an absolute value, thereby obtaining a second absolute value, comparing the first absolute value with the second absolute value, and determining the actual filtered value according to the comparison result.
  • the second determining unit is specifically configured to determine whether a symbol of the difference value obtained after subtracting the filtered prediction value from the current pixel value is the same as a sign of the first filter offset value, and according to the determination result Determine the actual filtered value.
  • the second determining unit is configured to sign the resulting difference value with a first filter bias current pixel value is subtracted after filtering prediction value ⁇ 1 is the same sign, the current pixel
  • the sign of the difference value obtained after subtracting the filtered prediction value from the pixel value is opposite to the sign of the first filter offset value ⁇ 1
  • the current pixel value is added to the first filter offset value as the actual filtered value.
  • the prediction unit is specifically configured to perform weighted summation of pixel values of at least two pixels on both sides of the pixel to be filtered in the second neighborhood to obtain a filtered prediction value of the pixel to be filtered.
  • the prediction unit is specifically configured to determine a fitting curve, wherein the fitting curve includes a fitting parameter, and fitting at least two pixels in the second neighborhood according to the fitting curve Obtain a value of the fitting parameter, and obtain a filtered prediction value of the pixel to be filtered according to the value of the fitting parameter and the fitting curve.
  • the fitting curve is Where t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are fitting parameters, and correspondingly, the prediction unit is specifically configured to: according to the fitting curve, a distance from at least three pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and corresponding to at least three pixels Pixel value determination The values of ⁇ and ⁇ .
  • the fitting curve is Where t is the distance from the pixel to be filtered to the boundary of the image block, and ⁇ and ⁇ are fitting parameters.
  • the prediction unit is specifically configured to use at least two sides of the pixel to be filtered in the second neighborhood according to the fitting curve. The distance from the pixel to the boundary of the image block and the pixel value corresponding to at least two pixels determine the values of ⁇ and ⁇ .
  • the fitting curve is Where t is the distance from the pixel to be filtered to the boundary of the image block, ⁇ and ⁇ are fitting parameters, and correspondingly, the prediction unit is specifically configured to: according to the fitting curve, a distance from at least two pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and corresponding to at least two pixels Pixel value determination The values of ⁇ and ⁇ .
  • the first determining unit is specifically configured to perform weighted summation on a current pixel value of the pixel to be filtered and a pixel value of the at least one first neighboring pixel, to obtain a filtering offset of the pixel to be filtered. value.
  • the first neighborhood and the second neighborhood are the same.
  • the deblocking filter according to an embodiment of the present invention may correspond to a deblocking filtering method in the method of the embodiment of the present invention, and each unit/module in the deblocking filter and other operations and/or functions described above Corresponding flows for implementing the deblocking filtering method shown in Figures 2 to 4, respectively Cheng, for the sake of brevity, I will not repeat them here.
  • Figure 6 is a block diagram of a deblocking filter in accordance with one embodiment of the present invention.
  • the deblocking filter 20 of FIG. 6 includes a processor 21 and a memory 22.
  • Processor 21 controls the operation of the deblocking filter and can be used to process signals.
  • Memory 22 can include read only memory and random access memory and provides instructions and data to processor 21.
  • the various components of the deblocking filter 20 are coupled together by a bus system 23, which in addition to the data bus includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as the bus system 23 in the figure.
  • the method disclosed in the foregoing embodiment of the present invention may be applied to the processor 21 or implemented by the processor 21.
  • each step of the above method may be completed by an integrated logic circuit of hardware in the processor 21 or an instruction in the form of software.
  • the processor 21 can be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can be implemented or executed in an embodiment of the invention.
  • a general purpose processor can be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 22, and the processor 21 reads the information in the memory 22 and combines the hardware to perform the steps of the above method.
  • the processor 21 may determine, according to the pixel value of the pixel in the first neighborhood of the pixel to be filtered, the current pixel value of the pixel to be filtered on the image block, the first filter offset value of the pixel to be filtered, where the pixel to be filtered is There is one pixel of the image block boundary of the block effect in the image.
  • the processor 21 may further predict, according to the pixel value of the pixel in the second neighborhood of the pixel to be filtered, the filtered prediction value of the pixel to be filtered.
  • the processor 21 may further determine an actual filter value of the pixel to be filtered according to the current pixel value, the first filter offset value obtained by the first determining unit, and the filtered prediction value obtained by the prediction unit.
  • the embodiment of the present invention determines the filter offset value and the filter prediction value of the pixel to be filtered by using the pixel value of the neighboring pixel of the pixel to be filtered, and determines the actual filter value according to the filter offset value, the current pixel value, and the filtered prediction value. This can improve the overall smoothness of the filtered signal waveform.
  • the memory 22 is stored such that the processor 21 performs the following operations.
  • the instruction taking the difference between the current pixel value and the first filter offset value minus the filtered prediction value as an absolute value, thereby obtaining a first absolute value, and subtracting the current pixel value from the filtered prediction value
  • the absolute value is taken to obtain a second absolute value, the first absolute value is compared with the second absolute value, and the actual filtered value is determined according to the comparison result.
  • the value obtained by the first filter offset value is taken as the actual filter value.
  • the processor 21 may be further configured to determine whether the symbol of the difference value obtained after subtracting the filtered prediction value from the current pixel value is the same as the sign of the first filter offset value, and determining the actual filtering according to the determination result. value.
  • the processor 21 is further configured to perform weighted summation of pixel values of at least two pixels on both sides of the pixel to be filtered in the second neighborhood to obtain a filtered prediction value of the pixel to be filtered.
  • the processor 21 may be further configured to determine a filtered prediction value according to the following formula:
  • the processor 21 may be further configured to determine a fitting curve, where the fitting curve includes a fitting parameter, and fitting at least two pixels in the second neighborhood according to the fitting curve, The value of the fitting parameter is obtained, and the filtered prediction value of the pixel to be filtered is obtained according to the value of the fitting parameter and the fitting curve.
  • the fitting curve is:
  • ⁇ and ⁇ are fitting parameters, and correspondingly, the prediction unit is specifically configured to: according to the fitting curve, a distance from at least three pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and corresponding to at least three pixels Pixel value determination The values of ⁇ and ⁇ .
  • the fitting curve is:
  • t is the distance from the pixel to be filtered to the boundary of the image block
  • ⁇ and ⁇ are fitting parameters.
  • the prediction unit is specifically configured to use at least two sides of the pixel to be filtered in the second neighborhood according to the fitting curve. The distance from the pixel to the boundary of the image block and the pixel value corresponding to at least two pixels determine the values of ⁇ and ⁇ .
  • the fitting curve is:
  • ⁇ and ⁇ are fitting parameters, and correspondingly, the prediction unit is specifically configured to: according to the fitting curve, a distance from at least two pixels on both sides of the pixel to be filtered in the second neighborhood to a boundary of the image block, and corresponding to at least two pixels Pixel value determination The values of ⁇ and ⁇ .
  • the processor 21 may further perform weighted summation on a current pixel value of the pixel to be filtered and a pixel value of the at least one first neighboring pixel to obtain a filter offset value of the pixel to be filtered.
  • the first neighborhood and the second neighborhood are the same.
  • the deblocking filter according to an embodiment of the present invention may correspond to a deblocking filtering method in the method of the embodiment of the present invention, and each unit/module in the deblocking filter and other operations and/or functions described above
  • the corresponding processes of the deblocking filtering method shown in FIG. 2 to FIG. 4 are respectively omitted for brevity.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B from A does not mean that B is only determined based on A, and that B can also be determined based on A and/or other information.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registered hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

Landscapes

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

Abstract

本发明实施例提供了一种去块效应滤波方法和去块效应滤波器。该方法包括根据图像块上的待滤波像素的当前像素值和待滤波像素的第一邻域中的像素的像素值,确定待滤波像素的第一滤波偏置值,并根据待滤波像素的第二邻域中的像素的像素值对待滤波像素的像素值进行预测,得到待滤波像素的滤波预测值,然后根据当前像素值、第一滤波偏置值和滤波预测值确定待滤波像素的实际滤波值。本发明实施例通过新增滤波预测值,并与当前像素值、第一滤波偏置值结合得到实际滤波值,这样能够提高滤波后的信号波形整体的平滑性。

Description

去块效应滤波方法和去块效应滤波器
本申请要求于2015年6月11日提交中国专利局、申请号为201510320826.0、发明名称为“去块效应滤波方法和去块效应滤波器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域,并且更具体地,涉及去块效应滤波方法和去块效应滤波器。
背景技术
视频编码通常采用混合编码框架,例如H.264/AVC、H.265/HEVC、AVS等视频编码标准。混合编码框架主要包括预测(prediction)、变换(transform)、量化(quantization)、熵编码(entropy coding)、环路去块滤波(deblocking)等环节。
例如,高效视频编码标准(High Efficiency Video Coding,HEVC)采用基于图像分块的预测和变换的混合编码框架。HEVC可以将需要编码的视频划分为I帧、P帧和B帧。I帧的编码为帧内编码,P帧和B帧的编码为帧间编码,帧间编码和帧内编码都有基于块的编码方式。HEVC以编码树单元(Coding Tree Unit,CTU)为基本单位对图像进行分块,CTU继续以四叉树的形式向下划分为编码单元(Coding Unit,CU),在预测及变换时CU作为根节点将继续分为预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。
基于块的变换编码在图像压缩编码中得到广泛应用,随着码率的降低,量化变得粗糙,在块的边界会出现不连续,形成重建图像的明显缺陷,这种图像块之间的不连续现象称为块效应。
现有的去除块效应时,一般采用去块滤波器。去块滤波器可以首先计算块边界处像素的滤波偏置值,并根据滤波偏置值对该像素的像素值进行滤波。但是,按照这种方法滤波后的信号可能会出现局部波形梯度增加,可能使得最大波形梯度发生转移,使得信号整体的平滑性下降。
发明内容
本发明实施例提供一种去块效应滤波方法和去块效应滤波器,能够提高滤波后的信号波形整体的平滑性。
第一方面,提供了一种去块效应滤波方法,包括:根据图像块上的待滤波像素的当前像素值和所述待滤波像素的第一邻域中的像素的像素值,确定所述待滤波像素的第一滤波偏置值;根据所述待滤波像素的第二邻域中的像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值;根据所述当前像素值、所述第一滤波偏置值和滤波预测值确定所述待滤波像素的实际滤波值。。
结合第一方面,在第一方面的一种实现方式中,将所述当前像素值与所述第一滤波偏置值的和减去所述滤波预测值所得差值取绝对值,从而获得第一绝对值,以及将所述当前像素值减去所述滤波预测值所得差值取绝对值,从而获得第二绝对值,对所述第一绝对值与所述第二绝对值进行比较;根据比较结果确定所述实际滤波值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述根据判断结果确定所述实际滤波值包括:当所述第一绝对值大于所述第二绝对值时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当所述第一绝对值小于或者等于所述第二绝对值时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述根据所述当前像素值、所述第一滤波偏置值和滤波预测值确定所述实际滤波值包括:判断所述当前像素值减去所述滤波预测值之后所得差值的符号是否与所述第一滤波偏置值的符号相同;根据判断结果确定所述实际滤波值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述根据判断结果确定所述实际滤波值包括:当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相同时,将所述当前像素值加上第二滤波偏置值Δ2所得的值确定为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相反时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述根据所述待滤波像素的第二邻域中像素的像素值对所述待滤波像素的像素值进行预测,得到所述待滤波像素的滤波预测值包括:对所述第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到所述待滤波像素的滤波预测值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述对所述第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到所述待滤波像素的滤波预测值包括根据以下公式确定所述滤波预测值:r=round[(d1p1+d2p2+…+dNpN)/dN+1],其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+…+dN,p1、p2…pN为所述第二邻域中所述待滤波像素两侧的N个像素分别对应的N个像素值,N为大于或者等于2的整数。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述根据所述待滤波像素的第二邻域中像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值包括:确定拟合曲线,所述拟合曲线包括拟合参数;根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值;根据所述拟合参数的值和拟合曲线得到所述待滤波像素的滤波预测值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述拟合曲线为:
Figure PCTCN2016075311-appb-000001
t为所述待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000002
β和γ为所述拟合参数;相应的,所述根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值包括:根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少三个像素到所述图像块的边界的距离及所述至少三个像素对应的像素值确定
Figure PCTCN2016075311-appb-000003
β和γ的值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述拟合曲线为:
Figure PCTCN2016075311-appb-000004
t为所述待滤波像素到所述图像块边界的距离,β和γ为所述拟合参数;相应的,所述根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值包括:根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定β和γ的值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述拟合曲线为:
Figure PCTCN2016075311-appb-000005
t为所述待滤波像素到所述图像块边界 的距离,
Figure PCTCN2016075311-appb-000006
β和γ为所述拟合参数;相应的,所述根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值包括:根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定
Figure PCTCN2016075311-appb-000007
β和γ的值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,,所述根据待滤波像素的当前像素值和所述待滤波像素的第一邻域中的像素的像素值,确定所述待滤波像素的第一滤波偏置值包括:对所述待滤波像素的当前像素值和至少一个所述第一邻域中的像素的像素值进行加权求和,得到所述待滤波像素的滤波偏置值。
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述第一邻域和所述第二邻域相同。
第二方面,提供了一种去块效应滤波器,包括:第一确定单元,用于根据图像块上的待滤波像素的当前像素值和所述待滤波像素的第一邻域中的像素的像素值,确定所述待滤波像素的第一滤波偏置值;预测单元,用于根据所述待滤波像素的第二邻域中的像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值;第二确定单元,用于根据所述当前像素值、所述第一确定单元得到的所述第一滤波偏置值和所述预测单元得到的所述滤波预测值确定所述待滤波像素的实际滤波值。
结合第二方面,在第二方面的一种实现方式中,所述第二确定单元具体用于将所述当前像素值与所述第一滤波偏置值的和减去所述滤波预测值所得差值取绝对值,从而获得第一绝对值,以及将所述当前像素值减去所述滤波预测值所得差值取绝对值,从而获得第二绝对值,对所述第一绝对值与所述第二绝对值进行比较,并根据比较结果确定所述实际滤波值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二确定单元具体用于:当所述第一绝对值大于所述第二绝对值时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当所述第一绝对值小于或者等于所述第二绝对值时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二确定单元具体用于判断所述当前像素值减去所述滤波预测值之后所 得差值的符号是否与所述第一滤波偏置值的符号相同,并根据判断结果确定所述实际滤波值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二确定单元具体用于:当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相同时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相反时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述预测单元具体用于对所述第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到所述待滤波像素的滤波预测值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述预测单元具体用于根据以下公式确定所述滤波预测值:r=round[(d1p1+d2p2+…+dNpN)/dN+1],其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+…+dN,p1、p2…pN为所述第二邻域中所述待滤波像素两侧的N个像素分别对应的N个像素值,N为大于或者等于2的整数。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述预测单元具体用于确定拟合曲线,所述拟合曲线包括拟合参数,根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值,并根据所述拟合参数的值和拟合曲线得到所述待滤波像素的滤波预测值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述拟合曲线为:
Figure PCTCN2016075311-appb-000008
t为所述待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000009
β和γ为所述拟合参数;相应的,所述预测单元具体用于根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少三个像素到所述图像块的边界的距离及所述至少三个像素对应的像素值确定
Figure PCTCN2016075311-appb-000010
β和γ的值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述拟合曲线为:
Figure PCTCN2016075311-appb-000011
t为所述待滤波像素到所述图像块边界的距离,β和γ为所述拟合参数;相应的,所述预测单元具体用于根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块 的边界的距离及所述至少两个像素对应的像素值确定β和γ的值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述拟合曲线为:
Figure PCTCN2016075311-appb-000012
t为所述待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000013
β和γ为所述拟合参数;相应的,所述预测单元具体用于根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定
Figure PCTCN2016075311-appb-000014
β和γ的值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第一确定单元具体用于对所述待滤波像素的当前像素值和至少一个所述第一邻域像素的像素值进行加权求和,得到所述待滤波像素的滤波偏置值。
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第一邻域和所述第二邻域相同。
本发明实施例利用待滤波像素的邻域像素的像素值来确定该待滤波像素的滤波偏置值和滤波预测值,并根据滤波偏置值、当前像素值以及滤波预测值来确定实际滤波值,这样可以提高滤波后的信号波形整体上的平滑性。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是现有的去块效应滤波方法导致滤波异常的示意图。
图2是本发明一个实施例的去块效应滤波方法的示意性流程图。
图3是本发明一个实施例的基于线性预测得到的待滤波像素的滤波预测值的示意图。
图4是本发明另一实施例的基于函数拟合进行预测得到的待滤波像素的滤波预测值的示意图。
图5是本发明一个实施例的去块效应滤波器的框图。
图6是本发明一个实施例的去块效应滤波器的框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
图1是现有的去块效应滤波方法导致滤波异常的示意图。
图1的去块滤波器可以为HEVC中的去块滤波器。像素P0和P1位于图像中的第一图像块,像素Q0和Q1位于图像中的第二图像块。
现有的去除块效应时,一般采用去块滤波器。去块滤波器可以首先计算块边界处像素的滤波偏置值,并根据滤波偏置值对该像素的像素值进行滤波。例如,像素P0和Q0滤波后得到像素P0′和Q0′。但是,由图像可以看出,滤波后P0′和Q0′之间的梯度下降,Q0′和Q1之间的梯度也下降,即像素P0′和Q1之间的梯度下降,使得这段波形更不容易发生块效应。但是,P1和P0′之间的梯度却增加了。从整个P0和P1之间的波形来看,滤波后的最大梯度并未减小,只是从P0与Q0之间转移到P1与P0′之间。即滤波后的信号可能会出现局部波形梯度增加,使得最大波形梯度发生转移,使得信号整体的平滑性下降,主观视觉效果受损,编码效率降低。
图2是本发明一个实施例的去块效应滤波方法的示意性流程图。图2的方法可以由去块效应滤波器执行。
201,根据图像块上的待滤波像素的当前像素值和待滤波像素的第一邻域中的像素的像素值,确定待滤波像素的第一滤波偏置值。
202,根据待滤波像素的第二邻域中的像素的像素值对待滤波像素的像素值进行预测,从而得到待滤波像素的滤波预测值。
203,根据当前像素值、第一滤波偏置值和滤波预测值确定待滤波像素的实际滤波值。
本发明实施例利用待滤波像素的邻域像素的像素值来确定该待滤波像素的滤波偏置值和滤波预测值,并根据滤波偏置值、当前像素值以及滤波预测值来确定实际滤波值,这样可以提高滤波后的信号波形整体上的平滑性。
本发明实施例中的待滤波像素可以为所有编码块、变化块或预测块等图像块边界的像素,也可以为仅存在块效应的图像块边界处的像素,本发明实施例对此不做限制。
本发明实施例对待滤波像素的具体位置不做限制。在本发明的一个实施例中,滤波器可以对块效应中至少一个待滤波像素按照上述方法进行滤波处 理。每个待滤波像素可以为编码块、变化块或预测块中存在块效应区域中的任意一个像素。一般地,待滤波像素可以为存在块效应的块边界处的像素。
另外,多个待滤波像素可以为横跨两个编码块的一行或一列像素,也可以为横跨两个变换块的一行或一列像素,还可以是横跨两个预测块的一行或一列像素。对多个待滤波像素进行滤波处理时,多个待滤波像素计算滤波偏置值和滤波预测值时,可以采用相同的计算方法,也可以采用不同的计算方法。本发明实施例对存在块效应的区域的待滤波像素进行滤波处理,但至于选择多少个待滤波像素,本发明实施例对此不做限制。例如,多个带滤波像素的数目可以为4、6、8、10、12、9等。一般地,至少会选择存在块效应的块边界的像素。下面仅以对多个待滤波像素中的任意一个为例进行示例性说明。
在本发明的一个实施例中,可以根据待滤波像素的当前像素值和待滤波像素的第一邻域像素的像素值,确定待滤波像素的第一滤波偏置值Δ1。待滤波像素的第一邻域像素可以为待滤波像素周围区域的像素。本发明实施例对第一邻域的大小不做限制,只要第一邻域包括除待滤波像素之外的其它像素即可。换句话说,可以由待滤波像素的当前像素值及其周围至少一个像素的像素值得到待滤波像素的滤波偏置值。
可选地,可以对待滤波像素的当前像素值和至少一个第一邻域像素的像素值进行加权求和,得到待滤波像素的滤波偏置值。
具体地,可以使用HEVC中计算像素的滤波偏置值的方法计算待滤波像素的滤波偏置值。例如,可以根据下列公式确定待滤波像素P0的第一滤波偏置值:
Δ1=round{[a(q0-p0)-b(q1-p1)]/c}  (1)
其中,a、b和c为预设常数,p0为待滤波像素的像素值,p1、q0和q1为第一邻域中的三个像素对应的像素值。
像素P1、Q0、Q1为像素P0第一邻域的像素。假设p0、p1、q0、q1四个像素值分别为像素P0、P1、Q0、Q1所对应的像素值。在公式(1)中,round(x)表示对x取整,例如,可以采用四舍五入的取整方法、向上取整或向下取整等。p0、p1、q0、q1的权重值分别为-a/c、b/c、a/c、-b/c。这里,a、b和c为预设常数,每个像素的权重值可以使用经验值或者重新确定。一般地,为 了使得加权求和能够转换为整数乘加和移位运算,通常可以将常数c设置为2的正整数次幂。例如,预设常数,a、b、c可以分别为9、3、16,即可以根据下列公式确定待滤波像素的第一滤波偏置值:
Figure PCTCN2016075311-appb-000015
另外,具体地,还可以根据下列公式确定待滤波像素的第一滤波偏置值:
Δ1=round[(a0p0+a1p1+a2p2+b1q1+b2q2)/c]  (3)
其中,a0、a1、a2、b1、b2和c为预设常数,p0为待滤波像素的像素值,p1、p2、q1和q2为第一邻域中的四个像素P1、P2、Q1、Q2对应的像素值。为了使得加权求和能够转换为整数乘加和移位运算,通常可以将常数c设置为2的正整数次幂,例如c=16、c=32、c=64等。可选地,a0、a1、a2、b1、通常可以设置为整数。例如,上述公式(3)中的参数可以如下设置:a0=-16、a1=5、a2=5、b1=3、b2=3、c=16。再如,a0=-17、a1=10、a2=5、b1=6、b2=-4、c=32。
对于像素Q0的滤波偏置值可以为-Δ1,也可以采用其它的加权求和方式计算。例如,当两个像素关于块边界对称(比如,两个距离块边界最近的像素或者次近的像素)时,关于块边界对称的两个像素的滤波偏置值可以大小相同,符号相反。或者,也可以对两个像素分别采用不同的加权求和方式进行计算,本发明实施例对此不做限制。
在本发明的一个实施例中,所有像素的滤波偏置值都可以独立进行计算得到,还可以通过邻域点的滤波偏置值及邻域点的像素值进行计算得到。例如,可以通过下列公式(4)(5)通过邻域像素的滤波偏置值及邻域像素的像素值得到该像素的滤波偏置值。
对于像素P1、Q1的滤波偏置值
Figure PCTCN2016075311-appb-000016
可以为:
Figure PCTCN2016075311-appb-000017
Figure PCTCN2016075311-appb-000018
在本发明的一个实施例中,可以根据待滤波像素的第二邻域像素的像素值对待滤波像素的像素值进行预测得到待滤波像素的滤波预测值。
应理解,本发明实施例中的第一邻域和第二邻域都为待滤波像素的邻域,二者可以为同一区域,也可以为不同区域。例如,第一邻域和第二邻域 相同。
可选地,可以对第二邻域中待滤波像素两侧的至少两个像素的像素值进行加权求和得到待滤波像素的滤波预测值。
具体地,对第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到待滤波像素的滤波预测值包括可以根据下列公式确定待滤波像素的滤波预测值:
r=round[(d1p1+d2p2+…+dNpN)/dN+1],  (6)
其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+…+dN,p1、p2…pN为第二邻域中待滤波像素两侧的N个像素分别对应的N个像素值,N为大于或者等于2的整数。
当公式(6)中N=2时,可以利用像素P0的第二邻域中的两个像素,例如,P0两侧的像素P1和Q1计算P0的滤波预测值。计算公式如下:
r=round[(d1p1+d2p2)/d3]  (7)
其中,d1、d2、d3为预设参数,且d3=d1+d2。通常,为了使得加权求和能够转换为整数乘加和移位运算,通常可以将常数c设置为2的正整数次幂。
本发明实施例对d1、d2、d3的具体数值不做限制。例如,可以采用d1=2、d2=1、d3=3,此时,待滤波像素的滤波预测值位于像素P1和Q1对应像素的连线上,即待滤波像素的滤波预测值r为像素值p1和q1的线性内插值。又如,d1=5、d2=3、d3=8。再如,d1=13、d2=3、d3=16。
公式(6)中,N为大于或者等于2的整数。只要取待滤波像素第二邻域的至少两个像素即可对待滤波像素的滤波预测值进行估计。例如,还可以像素P2、P1、Q1对应的像素值p2、p1、q1的加权求和值作为待滤波像素的滤波预测值,其中,像素值p2、p1、q1对应的权重可以分别为6/16、11/16、-1/16。又如,还可以像素P3、P2、P1、Q0、Q1、Q2对应的像素值p3、p2、p1、q0、q1、q2的加权求和值作为待滤波像素的滤波预测值,其中,像素值p3、p2、p1、q0、q1、q2对应的权重可以分别为1/32、-5/32、20/32、20/32、-5/32、1/32。
具体地,本发明实施例中的待滤波像素的滤波预测值可以根据拟合函数得到。根据待滤波像素的第二邻域中像素的像素值对待滤波像素的像素值进行预测,从而得到待滤波像素的滤波预测值包括:确定拟合曲线,其中,拟合曲线包括拟合参数;根据拟合曲线对第二邻域中的至少两个像素进行拟合 得到拟合参数的值;根据拟合参数的值和拟合曲线得到待滤波像素的滤波预测值。
例如,可以预设一个函数并设定函数中的参数,通过上述第二邻域中的至少两个像素及其对应的像素值对函数进行拟合,以得到函数中的参数值。然后,将待滤波像素的自变量的值代入到拟合得到的函数中,得到待滤波像素的滤波预测值。
本发明实施例对具体的拟合曲线不做限制,各种形式的曲线都可以作为拟合曲线。
例如,拟合曲线可以为:
Figure PCTCN2016075311-appb-000019
其中,t为待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000020
β和γ的值可以根据拟合曲线、第二邻域中待滤波像素两侧的至少三个像素到图像块边界的距离及至少三个像素对应的像素值确定。
具体地,可以通过第二邻域中的像素P2、P1、Q1、Q2到块边界的距离
Figure PCTCN2016075311-appb-000021
Figure PCTCN2016075311-appb-000022
以及每个像素对应的像素值
Figure PCTCN2016075311-appb-000023
对公式(8)中的函数进行拟合。例如,
Figure PCTCN2016075311-appb-000024
可以分别为-2.5、-1.5、1.5、2.5,可以用(-2.5,p2)、(-1.5,p1)、(1.5,q1)、(2.5,q2)这四组数据,求解一组α、β、γ,使得由公式(8)的拟合函数得到的预测值
Figure PCTCN2016075311-appb-000025
与p2、p1、q1、q2足够接近。
应理解,在求解拟合函数中参数时,为了减小计算复杂度,可以取第二邻域中不同的像素对函数进行拟合,得到多组预设参数。然后,遍历多组预设参数,计算每一组预设参数下多个像素的像素值与像素预测值的均方差,并取多个像素的均方差和最小的一组预设参数作为函数最终的拟合参数。或者,还可以遍历多组预设参数,计算每一组预设参数下多个像素的像素值与像素预测值的误差总和小于阈值时,取该组预设参数作为函数最终的拟合参数。这里的阈值可以预先设定。
在得到最终的拟合预设参数之后,可以将待滤波像素到块边界的距离代入拟合得到的函数中,得到待滤波像素的像素预测值。例如,像素P0、Q0到块边界的距离
Figure PCTCN2016075311-appb-000026
分别为-0.5、0.5,那么,像素P0、Q0的像素预测值分别为S(-0.5)、S(0.5)。
应理解,本发明实施例对曲线拟合选择的函数不做限制。例如,除公式 (8)中的拟合函数之外,还可以采用其它类型的函数进行拟合。可以通过选取第二邻域中的像素及其对应的像素值来确定拟合函数中的预设参数。确定拟合函数中的预设参数之后,可以将待滤波像素到块边界的距离代入函数中,求得待滤波像素的滤波预测值。
又如,拟合曲线还可以为:
Figure PCTCN2016075311-appb-000027
其中,t为待滤波像素到图像块边界的距离,β和γ的值可以根据拟合曲线、第二邻域中待滤波像素两侧的至少两个像素到图像块边界的距离及其至少两个像素对应的像素值确定。
再如,拟合曲线还可以为:
Figure PCTCN2016075311-appb-000028
其中,t为待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000029
β和γ的值可以根据拟合曲线、第二邻域中待滤波像素两侧的至少两个像素到图像块边界的距离及其至少两个像素对应的像素值确定。
在本发明的一个实施例中,可以根据当前像素值、第一滤波偏置值和滤波预测值所得的值作为待滤波像素的实际滤波值。
可选地,可以通过判断当前像素值加上第一滤波偏置值之后所得的值,相对当前像素值是否更加远离滤波预测值,并根据判断结果确定实际滤波值。例如,对当前像素值与第一滤波偏置值的和减去滤波预测值所得差值的第一绝对值,以及当前像素值减去滤波预测值所得差值的第二绝对值进行比较,根据比较结果确定实际滤波值。
例如,在当前像素值加上所述第一滤波偏置值Δ1之后所得的值,相对当前像素值更加远离滤波预测值时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;在当前像素值加上第一滤波偏置值之后所得的值,与滤波预测值相等,或者,相对当前像素值更加接近滤波预测值时,将当前像素值加上第一滤波偏置值作为实际滤波值。即,当第一绝对值大于所述第二绝对值时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当第一绝对值小于或者等于第二绝对值时,将当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
本发明实施例中的实际滤波值可以使得信号整体的平滑性更好,增强主观视觉效果和编码效率。原则上,实际滤波值相对当前像素值加上第一滤波偏置值更加接近滤波预测值。
本发明实施例对判断当前像素值加上第一滤波偏置值之后相对当前像素值是否更加远离滤波预测值的具体方法不做限定。
例如,可以对当前像素值加上第一滤波偏置值之后与滤波预测值之间的第一距离和当前像素值与滤波预测值之间的第二距离进行比较,这样来判断待滤波像素的当前像素值加上滤波偏置值之后相对待滤波像素的当前像素值是否更加偏离滤波预测值。当第一距离大于第二距离时,待滤波像素的当前像素值加上滤波偏置值之后相对待滤波像素的当前像素值是否更加偏离滤波预测值。当第一距离小于第二距离时,待滤波像素的当前像素值加上滤波偏置值之后相对待滤波像素的当前像素值是否更加接近滤波预测值。当第一距离等于第二距离时,待滤波像素的当前像素值加上滤波偏置值之后相对待滤波像素的当前像素值与滤波预测值的接近程度相同。
本发明实施例还可以通过其它等价的方式来判断当前像素值加上第一滤波偏置值之后相对当前像素值是否更加远离滤波预测值,在此不再一一叙述。
可选地,可以通过判断当前像素值减去滤波预测值之后所得差值的符号与第一滤波偏置值的符号是否相同,并根据判断结果确定实际滤波值。例如,在当前像素值减去滤波预测值之后所得差值的符号与第一滤波偏置值Δ1的符号相同时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,在当前像素值减去滤波预测值之后的差值的符号与第一滤波偏置值Δ1的符号相反时,将当前像素值加上第一滤波偏置值所得的值作为实际滤波值。这里的符号为正负号的符号,即符号可以为正,也可以为负。
当前像素值减去滤波预测值之后的差值的符号与第一滤波偏置值Δ1的符号相同时,使得当前滤波像素值加上第一滤波偏置值之后相对当前像素值更加远离滤波预测值。
当前像素值减去滤波预测值之后的差值的符号与第一滤波偏置值Δ1的符号相反时,可以直接通过上述符号关系来确定实际滤波值。也可以进一步地,继续判断当前像素值加上第一滤波偏置值之后相对当前像素值是否更加远 离滤波预测值来确定实际滤波值,具体确定方法前面已有叙述,此处不再赘述。
应理解,根据当前像素值、第一滤波偏置值和滤波预测值确定待滤波像素的实际滤波值的方案都在本发明的保护范围之内,上面列举的几个具体实施方式并不对本发明的保护范围构成任何限定。
可选地,可以根据判断结果确定待滤波像素的实际滤波值。例如,当前像素值加上第一滤波偏置值Δ1之后相对当前像素值更加远离滤波预测值时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1。当前像素值加上第一滤波偏置值之后相对当前像素值更加接近滤波预测值时,将当前像素值加上第一滤波偏置值作为实际滤波值。
上述缩放系数δ值可以由编码端预先设定,也可以在编码端经过分析并决策得到。编码端可以通过下列方法决策缩放系数:例如,对一幅图像尝试在多个不同数值δi下进行去块滤波,i=1,2,...,I,I为大于1的正整数;从多个缩放系数中,选择编码性能最优的缩放系数作为决策结果,其中,编码性能最优可以为滤波图像中各滤波像素的均方差最小;然后将决策结果写入码流中,例如,写入条带头(slice header)、图像参数集(picture parameter set,PPS)等语法结构体中。解码端可以通过解析码流中关于缩放系数的语法元素恢复出缩放系数,将该缩放系数用于解码端的去块滤波。
当待滤波像素的当前像素值加上滤波偏置值之后的数值超过图像信号的动态范围时,可以将该数据调整在动态范围之内。例如,对于宽为8比特位的图像,其动态范围一般为0到255。如果待滤波像素的当前像素值加上滤波偏置值之后的数值大于255或者小于0,那么需要将该竖直限定在0至255范围内。一般地,将结果小于0的数值钳置为0,将结果大于255的数值钳置为255。
应理解,本发明实施例中的待滤波像素相互独立,可以对块效应中的待滤波的一个像素单独处理,也可以对多个待滤波像素同时处理。对多个待滤波像素进行处理计算滤波偏置值或滤波预测值时,可以采用相同的公式,也可以采用不同的公式。
对块效应中的待滤波像素进行处理之后,可以提高信号波形的整体平滑性,增强图像的主观视觉效果和编码效率。
本发明实施例对待滤波像素的对滤波预测值的具体拟合曲线不做限定。下面举两个例子来说明。
图3是本发明一个实施例的基于线性预测得到的待滤波像素的滤波预测值的示意图。
在本发明的一个实施例中,可以利用像素P0的第二邻域中的两个像素,例如,P0两侧的像素P1和Q1计算P0的滤波预测值。计算公式如下:
r=round[(d1p1+d2p2)/d3]  (7)
其中,d1、d2、d3为预设参数,且d3=d1+d2
利用P0两侧的像素P1和Q1拟合得到一条如图3所示的直线及其直线对应的参数值。然后通过直线对待滤波像素P0进行线性预测,得到P0对应的滤波预测值r。
图4是本发明另一实施例的基于函数拟合进行预测得到的待滤波像素的滤波预测值的示意图。
在本发明的一个实施例中,可以根据下列公式确定滤波预测值:
Figure PCTCN2016075311-appb-000030
其中,t为待滤波像素到述图像块边界的距离,
Figure PCTCN2016075311-appb-000031
β和γ的值根据第二邻域中待滤波像素两侧的至少三个像素到图像块边界的距离及其至少三个像素对应的像素值确定。
具体地,可以通过第二邻域中的像素P2、P1、Q1、Q2到块边界的距离
Figure PCTCN2016075311-appb-000032
Figure PCTCN2016075311-appb-000033
以及每个像素对应的像素值
Figure PCTCN2016075311-appb-000034
对公式(8)中的函数进行拟合。例如,
Figure PCTCN2016075311-appb-000035
可以分别为-2.5、-1.5、1.5、2.5,可以用(-2.5,p2)、(-1.5,p1)、(1.5,q1)、(2.5,q2)这四组数据,求解一组α、β、γ,使得由公式(8)的拟合函数得到的预测值
Figure PCTCN2016075311-appb-000036
与p2、p1、q1、q2足够接近。
在得到最终的拟合预设参数之后,可以将待滤波像素到块边界的距离代入拟合得到的函数中,得到待滤波像素的像素预测值。例如,像素P0、Q0到块边界的距离
Figure PCTCN2016075311-appb-000037
分别为-0.5、0.5,那么,像素P0、Q0的像素预测值分别为S(-0.5)、S(0.5)。
上文中结合图2至图4,从去块效应滤波器的角度详细描述了根据本发明实施例的去块效应滤波方法,下面将结合图5和图6从去块效应滤波器的角度描述根据本发明实施例的去块效应滤波器的装置框图。
图5是本发明一个实施例的去块效应滤波器的框图。图5的去块效应滤波器包括第一确定单元11、预测单元12、判断单元13和第二确定单元14。
第一确定单元11用于根据图像块上的待滤波像素的当前像素值和待滤波像素的第一邻域中的像素的像素值确定待滤波像素的第一滤波偏置值,其中,待滤波像素为图像中存在块效应的图像块边界的一个像素。
预测单元12用于根据待滤波像素的第二邻域中的像素的像素值对待滤波像素的像素值进行预测,从而得到待滤波像素的滤波预测值。
第二确定单元13用于根据当前像素值、第一确定单元得到的第一滤波偏置值和预测单元得到的滤波预测值确定待滤波像素的实际滤波值。
本发明实施例利用待滤波像素的邻域像素的像素值来确定该待滤波像素的滤波偏置值和滤波预测值,并根据滤波偏置值、当前像素值以及滤波预测值来确定实际滤波值,这样可以提高滤波后的信号波形整体上的平滑性。
可选地,作为本发明的一个实施例,第二确定单元具体用于将当前像素值与第一滤波偏置值的和减去滤波预测值所得差值取绝对值,从而获得第一绝对值,以及将当前像素值减去滤波预测值所得差值取绝对值,从而获得第二绝对值,对第一绝对值与第二绝对值进行比较,并根据比较结果确定实际滤波值。
可选地,作为本发明的一个实施例,所述第二确定单元具体用于当第一绝对值大于所述第二绝对值时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当第一绝对值小于或者等于第二绝对值时,将当前像素值加上所述第一滤波偏置值所得的值作为实际滤波值。
可选地,作为本发明的一个实施例,第二确定单元具体用于判断当前像素值减去滤波预测值之后所得差值的符号是否与第一滤波偏置值的符号相同,并根据判断结果确定实际滤波值。
可选地,作为本发明的一个实施例,第二确定单元具体用于当前像素值减去滤波预测值之后所得差值的符号与第一滤波偏置值Δ1的符号相同时,将当前像素值加上第二滤波偏置值Δ2所得的值作为为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当前像素值减去滤波预测值之后所得差值的符号与第一滤波偏置值Δ1的符号相反时,将当前像素值加上第一滤波偏置值作为实际滤波值。
可选地,作为本发明的一个实施例,预测单元具体用于对第二邻域中待滤波像素两侧的至少两个像素的像素值进行加权求和得到待滤波像素的滤波预测值。
可选地,作为本发明的一个实施例,预测单元具体用于根据下列公式确定所述滤波预测值:r=round[(d1p1+d2p2+…+dNpN)/dN+1],其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+…+dN,p1、p2…pN为第二邻域中待滤波像素两侧的N个像素对应的像素值,N为大于或者等于2的整数。
可选地,作为本发明的一个实施例,预测单元具体用于确定拟合曲线,其中,拟合曲线包括拟合参数,根据拟合曲线对第二邻域中的至少两个像素进行拟合,得到拟合参数的值,并根据拟合参数的值和拟合曲线得到待滤波像素的滤波预测值。
可选地,作为本发明的一个实施例,拟合曲线为
Figure PCTCN2016075311-appb-000038
其中,t为待滤波像素到图像块边界的距离,
Figure PCTCN2016075311-appb-000039
β和γ为拟合参数,相应的,预测单元具体用于根据拟合曲线、第二邻域中待滤波像素两侧的至少三个像素到图像块的边界的距离及至少三个像素对应的像素值确定
Figure PCTCN2016075311-appb-000040
β和γ的值。
可选地,作为本发明的一个实施例,拟合曲线为
Figure PCTCN2016075311-appb-000041
其中,t为待滤波像素到所述图像块边界的距离,β和γ为拟合参数,相应的,预测单元具体用于根据拟合曲线、第二邻域中待滤波像素两侧的至少两个像素到图像块的边界的距离及至少两个像素对应的像素值确定β和γ的值。
可选地,作为本发明的一个实施例,拟合曲线为
Figure PCTCN2016075311-appb-000042
其中,t为待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000043
β和γ为拟合参数,相应的,预测单元具体用于根据拟合曲线、第二邻域中待滤波像素两侧的至少两个像素到图像块的边界的距离及至少两个像素对应的像素值确定
Figure PCTCN2016075311-appb-000044
β和γ的值。
可选地,作为本发明的一个实施例,第一确定单元具体用于对待滤波像素的当前像素值和至少一个第一邻域像素的像素值进行加权求和,得到待滤波像素的滤波偏置值。
可选地,作为本发明的一个实施例,第一邻域和第二邻域相同。
根据本发明实施例的去块效应滤波器可对应于本发明实施例的方法中的去块效应滤波方法,并且,该去块效应滤波器中的各个单元/模块和上述其他操作和/或功能分别为了实现图2至4中所示去块效应滤波方法的相应流 程,为了简洁,在此不再赘述。
图6是本发明一个实施例的去块效应滤波器的框图。
图6的去块效应滤波器20包括处理器21和存储器22。处理器21控制去块效应滤波器的操作,并可用于处理信号。存储器22可以包括只读存储器和随机存取存储器,并向处理器21提供指令和数据。去块效应滤波器20的各个组件通过总线系统23耦合在一起,其中总线系统23除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为总线系统23。
上述本发明实施例揭示的方法可以应用于处理器21中,或者由处理器21实现。在实现过程中,上述方法的各步骤可以通过处理器21中的硬件的集成逻辑电路或者软件形式的指令完成。处理器21可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器22,处理器21读取存储器22中的信息,结合其硬件完成上述方法的步骤。
具体地,处理器21可以根据图像块上的待滤波像素的当前像素值待滤波像素的第一邻域中的像素的像素值,确定待滤波像素的第一滤波偏置值,待滤波像素为图像中存在块效应的图像块边界的一个像素。
处理器21还可以根据待滤波像素的第二邻域中的像素的像素值对待滤波像素的像素值进行预测得到待滤波像素的滤波预测值。
处理器21还可以根据当前像素值、第一确定单元得到的第一滤波偏置值和预测单元得到的滤波预测值确定待滤波像素的实际滤波值。
本发明实施例利用待滤波像素的邻域像素的像素值来确定该待滤波像素的滤波偏置值和滤波预测值,并根据滤波偏置值、当前像素值以及滤波预测值来确定实际滤波值,这样可以提高滤波后的信号波形整体上的平滑性。
可选地,作为一个实施例,存储器22存储使得处理器21执行如下操作 的指令:将当前像素值与所述第一滤波偏置值的和减去滤波预测值所得差值取绝对值,从而获得第一绝对值,以及将当前像素值减去滤波预测值所得差值取绝对值,从而获得第二绝对值,对第一绝对值与第二绝对值进行比较,并根据比较结果确定实际滤波值。
可选地,作为一个实施例,处理器21还可以用于当第一绝对值大于所述第二绝对值时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当第一绝对值小于或者等于第二绝对值时,将当前像素值加上所述第一滤波偏置值所得的值作为实际滤波值。
可选地,作为一个实施例,处理器21还可以用于判断当前像素值减去滤波预测值之后所得差值的符号是否与第一滤波偏置值的符号相同,并根据判断结果确定实际滤波值。
可选地,作为一个实施例,处理器21还可以用于当前像素值减去滤波预测值之后所得差值的符号与第一滤波偏置值Δ1的符号相同时,将当前像素值加上第二滤波偏置值Δ2所得的值作为实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当前像素值减去滤波预测值之后所得差值的符号与第一滤波偏置值Δ1的符号相反时,将当前像素值加上第一滤波偏置值所得的值作为实际滤波值。
可选地,作为一个实施例,处理器21还可以用于对第二邻域中待滤波像素两侧的至少两个像素的像素值进行加权求和,得到待滤波像素的滤波预测值。
可选地,作为一个实施例,处理器21还可以用于根据下列公式确定滤波预测值:
r=round[(d1p1+d2p2+…+dNpN)/dN+1],
其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+…+dN,p1、p2…pN为第二邻域中所述待滤波像素两侧的N个像素对应的像素值,N为大于或者等于2的整数。
可选地,作为一个实施例,处理器21还可以用于确定拟合曲线,其中,拟合曲线包括拟合参数,根据拟合曲线对第二邻域中的至少两个像素进行拟合,得到拟合参数的值,并根据拟合参数的值和拟合曲线得到待滤波像素的滤波预测值。
可选地,作为一个实施例,拟合曲线为:
Figure PCTCN2016075311-appb-000045
其中,t为待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000046
β和γ为拟合参数,相应的,预测单元具体用于根据拟合曲线、第二邻域中待滤波像素两侧的至少三个像素到图像块的边界的距离及至少三个像素对应的像素值确定
Figure PCTCN2016075311-appb-000047
β和γ的值。
可选地,作为一个实施例,拟合曲线为:
Figure PCTCN2016075311-appb-000048
其中,t为待滤波像素到所述图像块边界的距离,β和γ为拟合参数,相应的,预测单元具体用于根据拟合曲线、第二邻域中待滤波像素两侧的至少两个像素到图像块的边界的距离及至少两个像素对应的像素值确定β和γ的值。
可选地,作为一个实施例,拟合曲线为:
Figure PCTCN2016075311-appb-000049
其中,t为待滤波像素到所述图像块边界的距离,
Figure PCTCN2016075311-appb-000050
β和γ为拟合参数,相应的,预测单元具体用于根据拟合曲线、第二邻域中待滤波像素两侧的至少两个像素到图像块的边界的距离及至少两个像素对应的像素值确定
Figure PCTCN2016075311-appb-000051
β和γ的值。
可选地,作为一个实施例,处理器21还可以用于对待滤波像素的当前像素值和至少一个所述第一邻域像素的像素值进行加权求和,得到待滤波像素的滤波偏置值。
可选地,作为一个实施例,第一邻域和第二邻域相同。
根据本发明实施例的去块效应滤波器可对应于本发明实施例的方法中的去块效应滤波方法,并且,该去块效应滤波器中的各个单元/模块和上述其他操作和/或功能分别为了实现图2至4中所示去块效应滤波方法的相应流程,为了简洁,在此不再赘述。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的 方式结合在一个或多个实施例中。
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
应理解,在本发明实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或步骤可以用硬件、处理器执行的软件程序,或者二者的结合来实施。软件程序可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存 器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内。

Claims (26)

  1. 一种去块效应滤波方法,其特征在于,所述方法包括:
    根据图像块上的待滤波像素的当前像素值和所述待滤波像素的第一邻域中的像素的像素值,确定所述待滤波像素的第一滤波偏置值;
    根据所述待滤波像素的第二邻域中的像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值;
    根据所述当前像素值、所述第一滤波偏置值和所述滤波预测值确定所述待滤波像素的实际滤波值。
  2. 如权利要求1所述的方法,其特征在于,所述根据所述当前像素值、所述第一滤波偏置值和所述滤波预测值确定所述待滤波像素的实际滤波值包括:
    将所述当前像素值与所述第一滤波偏置值的和减去所述滤波预测值所得差值取绝对值,从而获得第一绝对值,以及将所述当前像素值减去所述滤波预测值所得差值取绝对值,从而获得第二绝对值,对所述第一绝对值与所述第二绝对值进行比较;
    根据比较结果确定所述实际滤波值。
  3. 如权利要求2所述的方法,其特征在于,所述根据判断结果确定所述实际滤波值包括:
    当所述第一绝对值大于所述第二绝对值时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,其中,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,
    当所述第一绝对值小于或者等于所述第二绝对值时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
  4. 如权利要求1所述的方法,其特征在于,所述根据所述当前像素值、所述第一滤波偏置值和所述滤波预测值确定所述实际滤波值包括:
    判断所述当前像素值减去所述滤波预测值所得差值的符号,是否与所述第一滤波偏置值的符号相同;
    根据判断结果确定所述实际滤波值。
  5. 如权利要求4所述的方法,其特征在于,所述根据判断结果确定所述实际滤波值包括:
    当所述当前像素值减去所述滤波预测值所得差值的符号与所述第一滤波偏置值Δ1的符号相同时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,
    当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相反时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
  6. 如权利要求1-5中任一项所述的方法,其特征在于,所述根据所述待滤波像素的第二邻域中的像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值包括:
    对所述第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到所述待滤波像素的滤波预测值。
  7. 如权利要求6所述的方法,其特征在于,所述对所述第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到所述待滤波像素的滤波预测值包括:
    根据以下公式确定所述滤波预测值:
    r=round[(d1p1+d2p2+…+dNpN)/dN+1],
    其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+...+dN,p1、p2…pN为所述第二邻域中所述待滤波像素两侧的N个像素分别对应的N个像素值,N为大于或者等于2的整数。
  8. 如权利要求1-5中任一项所述的方法,其特征在于,所述根据所述待滤波像素的第二邻域中像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值包括:
    确定拟合曲线,所述拟合曲线包括拟合参数;
    根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值;
    根据所述拟合参数的值和拟合曲线得到所述待滤波像素的滤波预测值。
  9. 如权利要求8所述的方法,其特征在于,所述拟合曲线为:
    Figure PCTCN2016075311-appb-100001
    t为所述待滤波像素到所述图像块的边界的距离,
    Figure PCTCN2016075311-appb-100002
    β和γ为所述拟合参数;
    相应的,所述根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值包括:
    根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少三个像素到所述图像块的边界的距离及所述至少三个像素对应的像素值确定
    Figure PCTCN2016075311-appb-100003
    β和γ的值。
  10. 如权利要求8所述的方法,其特征在于,所述拟合曲线为:
    Figure PCTCN2016075311-appb-100004
    t为所述待滤波像素到所述图像块的边界的距离,β和γ为所述拟合参数;
    相应的,所述根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值包括:
    根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定β和γ的值。
  11. 如权利要求8所述的方法,其特征在于,所述拟合曲线为:
    Figure PCTCN2016075311-appb-100005
    t为所述待滤波像素到所述图像块的边界的距离,
    Figure PCTCN2016075311-appb-100006
    β和γ为所述拟合参数;
    相应的,所述根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值包括:
    根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定
    Figure PCTCN2016075311-appb-100007
    β和γ的值。
  12. 如权利要求1-11中任一项所述的方法,其特征在于,所述根据待滤波像素的当前像素值和所述待滤波像素的第一邻域中的像素的像素值,确定所述待滤波像素的第一滤波偏置值包括:
    对所述待滤波像素的当前像素值和至少一个所述第一邻域中的像素的像素值进行加权求和,从而得到所述待滤波像素的滤波偏置值。
  13. 如权利要求1-12中任一项所述的方法,其特征在于,所述第一邻域和所述第二邻域相同。
  14. 一种去块效应滤波器,其特征在于,包括:
    第一确定单元,用于根据图像块上的待滤波像素的当前像素值和所述待滤波像素的第一邻域中的像素的像素值,确定所述待滤波像素的第一滤波偏置值;
    预测单元,用于根据所述待滤波像素的第二邻域中的像素的像素值对所述待滤波像素的像素值进行预测,从而得到所述待滤波像素的滤波预测值;
    第二确定单元,用于根据所述当前像素值、所述第一确定单元得到的所述第一滤波偏置值和所述预测单元得到的所述滤波预测值确定所述待滤波像素的实际滤波值。
  15. 如权利要求14所述的去块效应滤波器,其特征在于,所述第二确定单元具体用于将所述当前像素值与所述第一滤波偏置值的和减去所述滤波预测值所得差值取绝对值,从而获得第一绝对值,以及将所述当前像素值减去所述滤波预测值所得差值取绝对值,从而获得第二绝对值,对所述第一绝对值与所述第二绝对值进行比较,并根据比较结果确定所述实际滤波值。
  16. 如权利要求15所述的去块效应滤波器,其特征在于,所述第二确定单元具体用于:当所述第一绝对值大于所述第二绝对值时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当所述第一绝对值小于或者等于所述第二绝对值时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
  17. 如权利要求14所述的去块效应滤波器,其特征在于,所述第二确定单元具体用于判断所述当前像素值减去所述滤波预测值之后所得差值的符号是否与所述第一滤波偏置值的符号相同,并根据判断结果确定所述实际滤波值。
  18. 如权利要求17所述的去块效应滤波器,其特征在于,所述第二确定单元具体用于:当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相同时,将所述当前像素值加上第二滤波偏置值Δ2所得的值作为所述实际滤波值,其中,Δ2=δΔ1,Δ1表示所述第一滤波偏置值,-1<δ<1;或者,当所述当前像素值减去所述滤波预测值之后所得差值的符号与所述第一滤波偏置值Δ1的符号相反时,将所述当前像素值加上所述第一滤波偏置值所得的值作为所述实际滤波值。
  19. 如权利要求14-18中任一项所述的去块效应滤波器,其特征在于, 所述预测单元具体用于对所述第二邻域中所述待滤波像素两侧的至少两个像素的像素值进行加权求和,从而得到所述待滤波像素的滤波预测值。
  20. 如权利要求19所述的去块效应滤波器,其特征在于,所述预测单元具体用于根据以下公式确定所述滤波预测值:
    r=round[(d1p1+d2p2+…+dNpN)/dN+1],
    其中,d1、d2、…dN、dN+1为预设参数,且dN+1=d1+d2+...+dN,p1、p2…pN为所述第二邻域中所述待滤波像素两侧的N个像素分别对应的N个像素值,N为大于或者等于2的整数。
  21. 如权利要求14-20中任一项所述的去块效应滤波器,其特征在于,所述预测单元具体用于确定拟合曲线,所述拟合曲线包括拟合参数,根据所述拟合曲线对所述第二邻域中的至少两个像素进行拟合,得到所述拟合参数的值,并根据所述拟合参数的值和拟合曲线得到所述待滤波像素的滤波预测值。
  22. 如权利要求21所述的去块效应滤波器,其特征在于,所述拟合曲线为:
    Figure PCTCN2016075311-appb-100008
    t为所述待滤波像素到所述图像块的边界的距离,
    Figure PCTCN2016075311-appb-100009
    β和γ为所述拟合参数;
    相应的,所述预测单元具体用于根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少三个像素到所述图像块的边界的距离及所述至少三个像素对应的像素值确定
    Figure PCTCN2016075311-appb-100010
    β和γ的值。
  23. 如权利要求21所述的去块效应滤波器,其特征在于,所述拟合曲线为:
    Figure PCTCN2016075311-appb-100011
    t为所述待滤波像素到所述图像块的边界的距离,β和γ为所述拟合参数;
    相应的,所述预测单元具体用于根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定β和γ的值。
  24. 如权利要求21所述的去块效应滤波器,其特征在于,所述拟合曲 线为:
    Figure PCTCN2016075311-appb-100012
    t为所述待滤波像素到所述图像块的边界的距离,
    Figure PCTCN2016075311-appb-100013
    β和γ为所述拟合参数;
    相应的,所述预测单元具体用于根据所述拟合曲线、所述第二邻域中所述待滤波像素两侧的至少两个像素到所述图像块的边界的距离及所述至少两个像素对应的像素值确定
    Figure PCTCN2016075311-appb-100014
    β和γ的值。
  25. 如权利要求14-24中任一项所述的去块效应滤波器,其特征在于,所述第一确定单元具体用于对所述待滤波像素的当前像素值和至少一个所述第一邻域像素的像素值进行加权求和,得到所述待滤波像素的滤波偏置值。
  26. 如权利要求14-25中任一项所述的去块效应滤波器,其特征在于,所述第一邻域和所述第二邻域相同。
PCT/CN2016/075311 2015-06-11 2016-03-02 去块效应滤波方法和去块效应滤波器 WO2016197634A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP16806532.4A EP3300361B1 (en) 2015-06-11 2016-03-02 Deblocking method and deblocking filter
KR1020187001044A KR102094247B1 (ko) 2015-06-11 2016-03-02 디블로킹 필터링 방법 및 디블로킹 필터
US15/837,594 US10555007B2 (en) 2015-06-11 2017-12-11 Deblocking filtering method and deblocking filter

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510320826.0 2015-06-11
CN201510320826.0A CN106303550B (zh) 2015-06-11 2015-06-11 去块效应滤波方法和去块效应滤波器

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/837,594 Continuation US10555007B2 (en) 2015-06-11 2017-12-11 Deblocking filtering method and deblocking filter

Publications (1)

Publication Number Publication Date
WO2016197634A1 true WO2016197634A1 (zh) 2016-12-15

Family

ID=57504456

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/075311 WO2016197634A1 (zh) 2015-06-11 2016-03-02 去块效应滤波方法和去块效应滤波器

Country Status (5)

Country Link
US (1) US10555007B2 (zh)
EP (1) EP3300361B1 (zh)
KR (1) KR102094247B1 (zh)
CN (1) CN106303550B (zh)
WO (1) WO2016197634A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11457239B2 (en) * 2017-11-09 2022-09-27 Google Llc Block artefact reduction
CN107623859B (zh) * 2017-11-27 2021-11-30 珠海亿智电子科技有限公司 一种低码率下jpeg编码的去块效应方法
JP6964780B2 (ja) * 2017-12-29 2021-11-10 テレフオンアクチーボラゲット エルエム エリクソン(パブル) 参照値と関係するデバイスとを使用するビデオの符号化および/または復号を行う方法
WO2020073904A1 (en) * 2018-10-08 2020-04-16 Huawei Technologies Co., Ltd. An image processing device and method for performing deblocking

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102754441A (zh) * 2009-11-20 2012-10-24 松下电器产业株式会社 图像编码方法、解码方法、装置、摄像机、元件
CN103051890A (zh) * 2011-09-27 2013-04-17 美国博通公司 根据视频编码进行自适应环路滤波
CN104219520A (zh) * 2014-09-10 2014-12-17 华为技术有限公司 确定图像补偿模式的方法和装置
CN104641649A (zh) * 2012-09-20 2015-05-20 索尼公司 图像处理装置和方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0174452B1 (ko) * 1995-02-28 1999-03-20 배순훈 디지털 영상 복호화장치
CA2824739C (en) 2011-01-14 2017-06-20 Telefonaktiebolaget L M Ericsson (Publ) Deblocking filtering
US9484952B2 (en) * 2011-11-03 2016-11-01 Qualcomm Incorporated Context state and probability initialization for context adaptive entropy coding
US9445130B2 (en) * 2013-01-09 2016-09-13 Qualcomm Incorporated Blockiness metric for large HEVC block artifacts

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102754441A (zh) * 2009-11-20 2012-10-24 松下电器产业株式会社 图像编码方法、解码方法、装置、摄像机、元件
CN103051890A (zh) * 2011-09-27 2013-04-17 美国博通公司 根据视频编码进行自适应环路滤波
CN104641649A (zh) * 2012-09-20 2015-05-20 索尼公司 图像处理装置和方法
CN104219520A (zh) * 2014-09-10 2014-12-17 华为技术有限公司 确定图像补偿模式的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3300361A4 *

Also Published As

Publication number Publication date
KR20180017159A (ko) 2018-02-20
US10555007B2 (en) 2020-02-04
CN106303550A (zh) 2017-01-04
EP3300361A1 (en) 2018-03-28
CN106303550B (zh) 2019-06-21
EP3300361B1 (en) 2022-07-27
KR102094247B1 (ko) 2020-03-27
US20180103274A1 (en) 2018-04-12
EP3300361A4 (en) 2018-03-28

Similar Documents

Publication Publication Date Title
CN110839153B (zh) 一种处理视频数据的方法和装置
JP2022008296A (ja) 省略符号化を用いた映像符号化及び復号化装置及びその方法
JP5792305B2 (ja) 適応ループフィルタリングの方法及び装置
WO2015180428A1 (zh) 帧内预测编码的视频编码方法及视频编码装置
WO2016197634A1 (zh) 去块效应滤波方法和去块效应滤波器
WO2017084258A1 (zh) 编码过程中的实时视频降噪方法、终端和非易失性计算机可读存储介质
CN112997500B (zh) 对基于区域的自适应环路滤波器的改进
KR102320733B1 (ko) 디블로킹 필터 방법 및 장치
WO2021203394A1 (zh) 环路滤波的方法与装置
WO2016180129A1 (zh) 预测模式选择方法、装置及设备
WO2021134706A1 (zh) 环路滤波的方法与装置
KR20120117613A (ko) 동영상 부호화 장치 및 방법
US20190200045A1 (en) Method and device for deblocking filtering a boundary within an intra predicted block
WO2019114225A1 (zh) 编码单元划分确定方法及装置、计算设备及可读存储介质
EP3991301A1 (en) Loop filter block flexible partitioning
WO2022077490A1 (zh) 一种帧内预测方法、编码器、解码器及存储介质
CN113489974B (zh) 帧内预测方法、视频/图像编解码方法及相关装置
CN112806006B (zh) 使用由预定义准则确定的参考样本以编解码的方法和设备
WO2020258052A1 (zh) 图像分量预测方法、装置及计算机存储介质
JP6171584B2 (ja) 動画像符号化装置、動画像符号化方法、および動画像符号化プログラム
JP2013207402A (ja) 画像符号化装置及びプログラム
WO2017214920A1 (zh) 帧内预测参考像素点滤波控制方法、装置及编码器
TWI834773B (zh) 使用適應性迴路濾波器以編碼和解碼影像之一或多個影像部分的方法、裝置和電腦可讀儲存媒體
WO2020258053A1 (zh) 图像分量预测方法、装置及计算机存储介质
WO2021022467A1 (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: 16806532

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016806532

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20187001044

Country of ref document: KR

Kind code of ref document: A