Patent Description:
To reduce the bit-rate of video signals, the ISO and ITU coding standards apply hybrid video coding with inter and intra frame prediction combined with transform coding of the prediction error. Today's standards H. <NUM>/AVC and H. <NUM>/HEVC use intra-block prediction based on reference samples from already encoded surrounding blocks. Then the difference between original and predicted block (called residual) can be transformed to frequency domain using e.g. DCT or DST, quantized and coded with entropy coding.

Effectiveness of the prediction strongly influences the amount of residuals that need to be coded and transmitted. Improving the quality of prediction can reduce the amount of residual information and reduce an overall bitrate of the coded video sequence.

At the decoding side, information about prediction type and prediction parameters can be extracted from the bitstream. A prediction block can be generated according to this information. Then residuals coefficients are extracted from the bitstream, inverse quantized, transformed and added to the prediction block to get the reconstructed block. Once a full picture is reconstructed, it goes through loop filters. An obtained filtered picture goes to the output and is stored in a reference picture buffer for future inter-frame prediction.

Conventional intra prediction mechanisms in video coding use reference samples from an already encoded area to generate a prediction signal for a block that needs to be encoded.

A series of methods for improvement of intra frame prediction were proposed. Some of them were adopted in H. <NUM>/HEVC video coding standardization.

The known solutions, however, cause a distortion of the natural edges in the reference samples and correspondingly also in the prediction block that is generated from those samples. The use of a quantization matrix designed to preserve the coefficients of low frequency components can cause more errors to be generated for the blocks containing natural edge and result in blurring of edges and ringing effect around the reconstructed edges. For reducing ringing effect linear smoothing filters can be used. The problem of such approach is that together with suppression of ringing natural edges may also be blurred.

Document "<NPL> generally describes a video compression technology which has an increased compression capability. Several algorithmic tools are proposed on top of a basic structure covering several aspects of prior art video compression technology. These generally include a flexible structure of representation of video content, inter/intra prediction, in-loop filtering, and entropy coding. A sharpening filter structure using first and second derivatives and warping is also disclosed.

Document <CIT> generally describes a pixel value of a pixel in a picture of a video sequence which is modified by a weighted combination of the pixel value and at least one spatially neighboring pixel value in a filtering. The filtering depends on a pixel distance between the pixel and a neighboring pixel and on a pixel value difference between the pixel and a neighboring pixel value of the neighboring pixel. The filtering is controlled by a spatial parameter and a range parameter. At least one of the spatial parameter and the range parameter depend on at least one of a quantization parameter, a quantization scaling matrix, a transform width, a transform height, a picture width, a picture height and a magnitude of a negative filter coefficient used as part of inter/intra prediction.

The objective of the present invention is to provide a decoder, an encoder and methods for decoding and encoding, wherein the decoder, the encoder and the methods overcome one or more of the above-mentioned problems of the prior art. In particular, there is provided a decoder, an encoder, corresponding decoding and encoding methods as well as a computer-readable storage medium, having the features of respective independent claims. The dependent claims relate to preferred embodiments.

A first example not encompassed by the claims but useful for understanding the invention provides a decoder for decoding a block of a current frame of a video from a bitstream, the decoder comprising:.

The decoder of the first example comprises a filter unit which can filter the reference samples using the sharpening filter and/or the de-ringing filter. Experiments have shown that this sharpening and/or de-ringing of the reference samples can improve a prediction accuracy and/or perceived image quality of the predicted blocks.

The decoder of the first example can further comprise a reconstruction unit configured to generate a reconstructed video block on the basis of the prediction of the block and a residual video block from the received bitstream.

In a first implementation of the decoder according to the first example, the sharpening filter and/or the de-ringing filter is a non-linear filter.

Experiments of the inventors have shown that non-linear filters can achieve particularly good results with regard to prediction accuracy and/or perceived image quality.

In a second implementation of the decoder according to the first example as such or according to the first implementation of the first example, the decoder is configured to activate the sharpening filter and/or the de-ringing filter based on signaling of sharpening and/or the de-ringing filter related information in the bitstream and/or based on image properties of one or more reconstructed blocks of the current frame.

The decoder of the second implementation has the advantage that the sharpening filter and/or the de-ringing filter can be activated or deactivated based on whether in a given scenario an improvement of image quality is expected. Explicit signaling in the bitstream allows to achieve optimum active/inactive settings (based e.g. on an optimization of settings during the encoding process). On the other hand, activation of the sharpening filter and/or the de-ringing filter based on image properties of one or more reconstructed blocks of the current frame without explicit signaling may improve the overall coding efficiency.

To avoid the overhead of explicit signaling, the sharpening filter and/or the de-ringing filter may be activated based on e.g. a strength of edges in surrounding blocks, a coding block size etc. For example, the strength of edges in surrounding blocks and/or the coding block size can be compared with a threshold and the sharpening filter and/or the de-ringing filter be activated based on the result of the threshold comparison. For example, the sharpening filter and/or the de-ringing filter can be activated if a strength of one or more edges in nearby blocks exceeds some threshold. The strength of edges can be estimated for instance by calculating an absolute value of a derivative of reference samples (e.g. of reference samples arranged on a horizontal line next to an upper line of the current block or arranged on a vertical line next to a left line of the current block as shown in <FIG>) used for intra prediction of the current block.

The compression rate and correspondingly the level of compression artifacts can be controlled by a quantization parameter (QP) as in state-of-the art video compression technology. The quantization parameter may be set per sequence, frame, slice or block level. Ringing is one of the strongest compression artifacts caused by a quantization process. The higher the compression level (quantization parameter value) the stronger are the ringing artifacts. In certain embodiments, a de-ringing filter suppressing ringing artifacts is only applied at higher compression levels and correspondingly higher quantization parameters (or higher quantization parameter values) QP. Thus, de-ringing filter may be activated based on a QP value of the current block, e.g. if it exceeds some predefined quantization parameter value (or quantization parameter threshold value).

In embodiments, for example, the QP may be obtained and a de-ringing filter may be applied or not based on (or depending on) the quantization parameter. For instance, a threshold QP value may be used to determine whether to apply a de-ringing filter (e.g. if the QP is below the threshold no de-ringing filter is applied, if the QP is above or exceeds the first threshold a de-ringing filter is applied; if the threshold is a valid QP, embodiments may be configured either way, e.g. apply the de-ringing filter or not).

In further embodiments, different de-ringing filters, e.g. de-ringing filters of different strength, may be applied based on (or depending on) the quantization parameter. For instance, a first threshold QP value may be used to determine whether to apply a de-ringing filter (e.g. if the QP is below the first threshold no de-ringing filter is applied, if the QP is above or exceeds the first threshold a first de-ringing filter is applied; if the first threshold is a valid QP, embodiments may be configured either way, e.g. apply the first de-ringing filter or not), and a second threshold may be used to determine whether to use a stronger de-ringing filter (e.g. if the QP is below the second threshold the first de-ringing filter is applied, if the QP is above or exceeds the second threshold a second de-ringing filter is applied which is stronger with regard to reducing ringing artifacts than the first de-ringing filter (if the second threshold is a valid QP, embodiments may be configured either way, e.g. apply the first de-ringing filter or the second de-ringing filter).

Further embodiments may comprise more than two de-ringing filters and correspondingly more than two thresholds to determine whether and/or which de-ringing filter to apply.

Further embodiments may use a list or table (e.g. look-up-table) instead of a threshold to determine based on (or dependent on) the QP whether to apply a de-ringing filter or not. The list may for example comprise all those (e.g. larger) QPs for which the de-ringing filter shall be applied. Further embodiments using more than one de-ringing filter may, for example, use several lists (e.g. one list for each de-ringing filter, each list comprising the QPs for which this particular de-ringing filter shall be applied) or one list mapping the QP to the de-ringing filters (e.g. by an index).

Further embodiments may activate or deactivate the sharpening filter based on the same or similar criteria (e.g. different thresholds or lists of quantization parameters) as described above for the sharpening filter.

In preferred embodiments, in addition to signaling of activation / deactivation of the sharpening filter and/or the de-ringing filter also further parameters may be signaled in the bitstream and/or may be derived from image properties.

The activation of the filters can be performed just for some part of the video content, e.g. a sequence, a group-of-pictures, a single picture, an arbitrary region and/or a regular coding block.

In a third implementation of the decoder according to the first example as such or according to any of the preceding implementations of the first example, the filter unit comprises:.

The decoder of the third implementation comprises a non-linear filter that in experiments has been shown to show particularly good results allowing to suppress ringing artifacts and to increase subjective sharpness of natural edge.

In a fourth implementation of the decoder according to the first example as such or according to any one of the preceding implementations of the first example, the warping unit is configured to displace each of the reference samples with a respective displacement vector obtained by scaling the second derivatives with a scaling coefficient, wherein the scaling coefficient is the sharpening strength.

In a fifth implementation of the decoder according to the first example as such or according to any of the preceding implementations of the first example, the decoder is configured to adapt the scaling coefficient based on signaling in the bitstream and/or based on local image properties.

For example, the value of the scaling coefficient can be explicitly indicated in the bitstream. Alternatively, the overhead of explicit signaling can be avoided by adapting the scaling coefficient based on local image properties, e.g. based on a measured strength of one or more edges in blocks already decoded from the bitstream.

In some embodiments the scaling coefficient may be controlled by the quantization parameter of the block. The higher the QP (or QP value) the stronger are the ringing artifacts caused by the quantization.

Embodiments can be configured to obtain the QP (or QP value or any other measure representing the degree of quantization) and to apply a stronger de-ringing filter for higher quantization parameters to stronger suppress the ringing artifacts. In other words, embodiments can be configured to adapt the strength of the de-ringing filter (e.g. by adapting the scaling coefficient) based on the quantization parameter, and in particular such that the strength of the de-ringing filter is increased (e.g. once or gradually or step-by-step, e.g. by increasing the scaling coefficient) when the quantization parameter increases (and vice versa), or such that the strength of the de-ringing filter is low (or lower) for low (or lower) quantization parameters and that the strength of the de-ringing filter is higher (or higher) for high (or higher) quantization parameters.

Embodiments can be configured to consider the block size as another kind of indication of a quantization level. Embodiments may, for example, assume that at higher compression rates block sizes tend to be bigger because of limitations on the size or amount of information signaled in the bitstream and that bigger block size means less information to be signaled on block split flags and prediction information in each block. Thus, embodiments can be configured to obtain the block size of the current block and to control or adapt the scaling coefficient based on the block size. Embodiments can, for example, be configured to apply stronger de-ringing filters (or sharpening filters) at higher block sizes. For instance if the block size is obtained, e.g. estimated as the sum of the width and the height of the block (width + height, e.g. in samples), and is equal or larger than a block size threshold (or block size threshold value), e.g. <NUM>, a first scaling coefficient (or first scaling coefficient value) k1 is used, and if the block size is smaller than the block size threshold value another scaling coefficient (or scaling coefficient value) k2 is used. Embodiments can also be configured to have a zero scaling coefficient k at certain level of block size. That actually means deactivating the de-ringing filter for such blocks.

Further embodiments may comprise more than one threshold and accordingly more than two scaling coefficients to apply different de-ringing filters for different block sizes.

In a sixth implementation of the decoder according to the first example as such or according to any of the preceding implementations of the first example, the filter unit further comprises a clipping unit that is configured to limit the absolute value to be above a threshold.

The decoder of the sixth implementation has the advantage that extremely high values of the absolute values of the first derivatives are clipped, thus avoiding extreme outliers that might lead to image quality degradation. Moreover, limiting the absolute value (by the threshold) may keep, for example, the position of an edge unchanged by using a warping procedure or algorithm. Only flat-to-edge transition regions that may generate ringing are processed by the filter.

The limiting threshold value controls the region around the edge to be enhanced. On other hand, as described above, the ringing is much higher as quantization parameter is set for the current block. The higher the QP the wider is the corresponding ringing region. In some embodiments, the limiting value (the threshold) can be controlled by the quantization parameter of the block which allows to adjust the filter to the region of artifacts. For example, embodiments may be configured to apply a higher limiting threshold value for higher QP values, which allows to use a wider region for edge enhancement.

As was discussed above, another indication of quantization level may be block size. At higher compression rates block sizes tend to be bigger. Thus, embodiments can be configured to adapt or control the limiting threshold value based on (or depending on) the block size, wherein higher limiting values are applied at higher block sizes.

In a seventh implementation of the decoder according to the first example as such or according to any of the preceding implementations of the first example, further comprising a blurring filter configured to smooth the absolute values.

For example, the blurring filter can be a Gaussian filter.

A second example not encompassed by the claims but useful for understanding the invention refers to an encoder for encoding a block of a current frame in a bitstream, the encoder comprising:.

The encoder of the second example can be configured to encode the block of the current frame in the bitstream such that it can be decoded by the decoder according to the first example of the invention.

The encoder of the second example can further comprise a reconstruction unit configured to generate a reconstructed video block on the basis of the prediction of the block and a residual video block.

In a first implementation of the encoder of the second example, the control unit is configured to select one of:.

by performing a rate-distortion optimization, by minimizing a prediction error criterion and/or based on one or more local image properties.

In this way, the encoder of the second example can determine an optimum filtering (or bypass of filtering). The encoder can be configured to encode the selection into the bitstream, e.g. via explicit signalling of the selection.

In a second implementation of the encoder of the second example as such or according to the first implementation of the second example, the filter comprises one or more parameters and the encoder further comprises a parameter selection unit configured to select the one or more parameters by performing a rate-distortion optimization, by minimizing a prediction error criterion and/or based on one or more local image properties.

In a third implementation of the encoder of the second example as such or according to the first implementation of the second example, the encoder is configured to encode a sharpening filter flag, a sharpening coefficient and/or one or more parameters of the sharpening and/or de-ringing filter in the bitstream.

Further implementations of the encoder according to the second example correspond to the other implementation described for the decoder according to the first aspect.

A third example not encompassed by the claims but useful for understanding the invention refers to a method for decoding a block of a current frame of a video from a bitstream, the method comprising:.

The methods according to the third example of the invention can be performed by the decoder according to the first example of the invention. Further features or implementations of the method according to the third example of the invention can perform the functionality of the decoder according to the first example of the invention and its different implementation forms.

A fourth example not encompassed by the claims but useful for understanding the invention refers to a method for encoding a block of a current frame of a video in a bitstream, the method comprising:.

The methods according to the fourth example of the invention can be performed by the encoder according to the second example of the invention. Further features or implementations of the method according to the fourth example of the invention can perform the functionality of the encoder according to the second example of the invention and its different implementation forms.

A fifth example not encompassed by the claims but useful for understanding the invention refers to a computer-readable storage medium storing program code, the program code comprising instructions for carrying out the method of the third or the fourth example.

A sixth example not encompassed by the claims but useful for understanding the invention provides a decoder for decoding a block of a current frame of a video from a bitstream, the decoder comprising:.

The decoder of the sixth example has the advantage that the sharpening filter and/or the de-ringing filter can improve efficiency of prediction leading to better objective and perceived image quality. In particular, since the sharpening filter and/or the de-ringing filter can be applied based on the flag in the bitstream, these filters can be selectively applied in scenarios where they lead to an improved image quality.

The decoder of the sixth example can further comprise a reconstruction unit configured to generate a reconstructed video block on the basis of the prediction of the block and a residual video block from the bitstream.

In a first implementation of the decoder according to the sixth example, the filter unit and/or the block generation unit and/or a prediction post-filtering unit, which is configured to filter the prediction of the block, comprises a smoothing filter.

The decoder according to the first implementation has the advantage that it comprises both a sharpening filter / de-ringing filter and a smoothing filter. Thus, depending on circumstances it can apply either sharpening or smoothing, thus achieving optimum image reproduction.

The decoder can be configured to apply, based on one flag in the bitstream, either:.

For example, if the flag in the bitstream is true, the decoder can be configured to apply the smoothing filter and if the flag is false it can be configured to apply the sharpening filter and/or the de-ringing filter.

This has the advantage that it is avoided that opposite actions of smoothing and sharpening are applied at the same time.

The decoder can be configured to apply the smoothing filter based on a rule which is based on one or more block properties, unless a sharpening flag in the bitstream is true.

In a second implementation of the decoder according to the sixth example as such or according to the first implementation of the sixth example, the decoder is configured to:.

In other words, according to the second implementation the smoothing filter is applied only if both the smoothing filtering condition is fulfilled and sharpening is deactivated. Thus, it is avoided that opposite actions of smoothing and sharpening are performed at the same time.

In a third implementation of the decoder according to the sixth example as such or according to any of the preceding implementations of the first example, the decoder is configured to:.

and/or wherein the decoder is configured to:.

In other words, parsing of a smoothing flag may be skipped if the sharpening flag is true (which results in the sharpening filter being applied). Similarly, parsing of a sharpening flag may be skipped if a smoothing flag is true (which results in the smoothing filter being applied). This has the advantage that less information needs to be parsed from the bitstream. Thus, a coding efficiency can be improved.

In a fourth implementation of the decoder according to the sixth example as such or according to any of the preceding implementations of the sixth example, the block generation unit comprises a plurality of prediction modes comprising a DC mode, a planar mode and/or one or more angular modes, and the decoder is further configured to:.

In other words, if the parsed prediction mode is DC mode or planar mode, the decoder skips parsing the sharpening flag from the bitstream. The reason for this is that the DC mode and the planar mode can be seen as smoothing filters. Thus, the decoder can assume that if DC mode or planar mode is used for prediction, sharpening should be avoided. Thus, there is no need to parse the sharpening flag if the prediction mode is DC mode or planar mode. The fourth implementation thus has the advantage that unnecessary parsing of flags can be avoid-ed and a coding efficiency can be improved.

In a fifth implementation of the decoder according to the sixth example as such or according to any of the preceding implementations of the sixth example, the block generation unit comprises a plurality of interpolation filters with different frequency response characteristics configured to obtain sample values in fractional pixel positions, and the decoder is further configured to:.

For example, if Cubic and blurring filters (such as Gaussian or bi-linear) are available, if the sharpening flag is true, the Cubic filter should be applied because this passes a higher amount of high frequencies.

In a sixth implementation of the decoder according to the sixth example as such or according to any of the preceding implementations of the sixth example, the smoothing filter comprises:.

Position-dependent intra prediction combination (PDPC) is a post-processing for block prediction which invokes a combination of HEVC Block prediction with filtered and un-filtered boundary reference samples. A few <NUM>-tap low pass filter is used to smooth the boundary samples. As a result pixels of the prediction block become smoothed depending on their position in the block.

Multi-parameter intra prediction (MPI) is a post-processing tool for intra prediction which invokes additional smoothing with decoded boundary. The purpose of MPI is to generate more natural patterns by applying different post processing filters to the prediction results while maintaining the directional patterns even after the smoothing.

In a seventh implementation of the decoder according to the sixth example as such or according to any of the preceding implementations of the sixth example, the smoothing filter is a Gaussian filter and the block generation unit is configured to use a Cubic filter instead of the Gaussian filter if the sharpening filter is used.

A seventh example not encompassed by the claims but useful for understanding the invention refers to an encoder for encoding a block of a current frame of a video in a bitstream, the encoder comprising:.

The encoder can be configured to calculate a target criterion for each of a plurality of encoding modes, wherein each of the plurality of encoding modes applies either a sharpening filter or a smoothing filter, and wherein the encoder is configured to select a preferred encoding mode based on the calculated target criteria.

The encoder may further comprise a write unit that is configured to write a flag into the bitstream, wherein the flag indicates whether a sharpening filter and/or a de-ringing filter should be used during decoding.

In a first implementation of the encoder of the seventh example, the filter unit and/or the block generation unit and/or a post-filtering unit, which is configured to filter the prediction of the block, comprises a smoothing filter.

In a second implementation of the encoder of the seventh example as such or according to the first implementation of the seventh example, the encoder is configured to:.

and/or wherein the encoder is configured to:.

In a third implementation of the encoder of the seventh example as such or according to any of the preceding implementations of the seventh example, the block generation unit comprises a plurality of prediction modes comprising a DC mode, a planar mode and/or one or more angular modes, and the decoder is further configured to:.

An eighth example not encompassed by the claims but useful for understanding the invention refers to a method for decoding a block of a current frame of a video from a bitstream, the method comprising:.

The methods according to the eighth example of the invention can be performed by the decoder according to the sixth example of the invention. Further features or implementations of the method according to the eighth example of the invention can perform the functionality of the decoder according to the sixth example of the invention and its different implementation forms.

A ninth example not encompassed by the claims but useful for understanding the invention refers to a method for encoding a block of a current frame of a video in a bitstream, the method comprising:.

wherein the method further comprises a step of deciding whether filtering the reference samples comprises a step of applying a sharpening filter and/or a de-ringing filter.

The method can further comprise: determining a target criterion for the predicted block, and selecting a preferred encoding mode based on the determined target criteria.

The methods according to the ninth example of the invention can be performed by the encoder according to the seventh example of the invention. Further features or implementations of the method according to the ninth example of the invention can perform the functionality of the encoder according to the seventh example of the invention and its different implementation forms.

A tenth example not encompassed by the claims but useful for understanding the invention refers to a computer-readable storage medium storing program code, the program code comprising instructions for carrying out the method of the eighth and ninth example.

To illustrate the technical features of embodiments of the present invention more clearly, the accompanying drawings provided for describing the embodiments are introduced briefly in the following. The accompanying drawings in the following description are merely some embodiments of the present invention, modifications on these embodiments are possible without departing from the scope of the present invention as defined in the claims.

<FIG> shows a decoder <NUM> for decoding a block of a current frame of a video from a bitstream.

The decoder <NUM> comprises a reference sample selection unit <NUM>, a filter unit <NUM> and a block generation unit <NUM>.

The reference sample selection unit <NUM> is configured to select reference samples of a recon-structed part of the current frame. Selection of the reference samples can be done according to conventional schemes.

The filter unit <NUM> is configured to filter the reference samples, wherein the filter unit <NUM> comprises a sharpening filter and/or a de-ringing filter. These filters may be configured based on signaling in the bitstream and/or based on image properties, e.g. based on image properties of already reconstructed blocks.

The block generation unit <NUM> is configured to generate a prediction of the block based on the filtered reference samples.

<FIG> shows an encoder <NUM> for encoding a block of a current frame in a bitstream.

The encoder comprises a reference sample selection unit <NUM>, a filter unit <NUM>, a block generation unit <NUM> and a control unit <NUM>.

The filter unit <NUM> is configured to filter the reference samples and comprises a sharpening filter and/or a de-ringing filter.

The block generation unit <NUM> configured to generate a prediction of the block based on the filtered reference samples.

The control unit <NUM> configured to control whether to apply the sharpening filter and/or the de-ringing filter.

A more detailed description of a possible implementation of the decoder <NUM> and encoder <NUM> will be given in the following with reference to <FIG> and <FIG>.

<FIG> shows a method <NUM> for obtaining of prediction block of a current frame of a video from a bitstream.

The method <NUM> comprises a first step of selecting <NUM> reference samples of a reconstructed part of the current frame.

The method <NUM> comprises a second step of filtering <NUM> the reference samples.

The method comprises a third step of generating <NUM> a prediction of the block based on the filtered reference samples, wherein filtering the reference samples comprises a step of sharpening and/or de-ringing the reference samples.

<FIG> shows a method <NUM> for encoding a block of a current frame of a video in a bitstream.

The method comprises a first step of selecting <NUM> reference samples of a reconstructed part of the current frame.

The method comprises a second step of filtering <NUM> the reference samples.

The method comprises a third step of generating <NUM> a prediction of the block based on the filtered reference samples, wherein the method further comprises a step of deciding whether to filter the reference samples by sharpening and/or de-ringing.

<FIG> shows an encoder <NUM> which comprises an input for receiving input blocks of frames or pictures of a video stream and an output for generating an encoded video bitstream. In an explicative realization the encoder <NUM> is adapted to apply prediction, transformation, quantization, and entropy coding to the video stream. The transformation, quantization, and entropy coding are carried out respectively by a transform unit <NUM>, a quantization unit <NUM> and an entropy encoding unit <NUM> so as to generate as an output the encoded video bitstream.

The video stream may include a plurality of frames, wherein each frame is divided into blocks of a certain size that are either intra or inter coded. The blocks of for example the first frame of the video stream are intra coded by means of an intra prediction unit <NUM>. An intra frame is coded using only the information within the same frame, so that it can be independently decoded and it can provide an entry point in the bitstream for random access. Blocks of other frames of the video stream are inter coded by means of an inter prediction unit <NUM>: information from coded frames, which are called reference frames, are used to reduce the temporal redundancy, so that each block of an inter-coded frame is predicted from a block in a reference frame. A mode selection unit <NUM> is adapted to select whether a block of a frame is to be processed by the intra prediction unit <NUM> or the inter prediction unit <NUM>. This block also controls the parameters of intra of inter prediction.

The intra prediction unit <NUM> is a block prediction unit. It comprises a sharpening filter and/or a de-ringing filter (not shown in <FIG>).

For performing spatial or temporal prediction, the coded blocks may be further processed by an inverse quantization unit <NUM>, an inverse transform unit <NUM>. After reconstruction of whole frame a loop filtering unit <NUM> is applied so as to obtain the reference frames that are then stored in a frame buffer <NUM>.

The inter prediction unit <NUM> comprises as input a block of a current frame or picture to be inter coded and one or several reference frames or pictures from the frame buffer <NUM>. Motion estimation and motion compensation are applied by the inter prediction unit <NUM>. The motion estimation is used to obtain a motion vector and a reference frame based on certain cost function. The motion compensation then describes a current block of the current frame in terms of the transformation of a reference block of the reference frame to the current frame. The inter prediction unit <NUM> outputs a prediction block for the current block, wherein said prediction block minimizes the difference between the current block to be coded and its prediction block, i.e. minimizes the residual block. The minimization of the residual block is based e.g. on a rate-distortion optimization procedure.

The intra prediction unit <NUM> receives as input a block of a current frame or picture to be intra coded and one or several reference samples from an already reconstructed area of a current picture. The intra prediction then describes a current block of the current frame in terms of the transformation of reference samples of the current frame to the currently coded block. The intra prediction unit <NUM> outputs a prediction block for the current block, wherein said prediction block minimizes the difference between the current block to be coded and its prediction block, i.e., it minimizes the residual block. The minimization of the residual block can be based e.g. on a rate-distortion optimization procedure.

The difference between the current block and its prediction, i.e. the residual block, is then transformed by the transform unit <NUM>. The transform coefficients are quantized and entropy coded by the quantization unit <NUM> and the entropy encoding unit <NUM>. The thus generated encoded video bitstream comprises intra coded blocks and inter coded blocks.

<FIG> shows a video decoder <NUM>. The video decoder <NUM> comprises particularly a reference picture buffer <NUM> and an intra prediction unit <NUM>, which is a block prediction unit and which comprises a sharpening filter and/or a de-ringing filter. The reference picture buffer <NUM> is adapted to store at least one reference frame obtained from the encoded video bitstream, said reference frame being different from a current frame of the encoded video bitstream. The intra prediction unit <NUM> is configured to generate a prediction block, which is an estimate of the block to be decoded. The intra prediction unit <NUM> is configured to generate this prediction based on reference samples that are obtained from the reference picture buffer <NUM>. The intra prediction unit <NUM> is configured to use the sharpening filter and/or the de-ringing filter to sharpen and/or de-ring reference samples obtained from the reference picture buffer.

The decoder <NUM> is adapted to decode the encoded video bitstream generated by the video encoder <NUM>, and preferably both the decoder <NUM> and the encoder <NUM> generate identical predictions. The features of the reference picture buffer <NUM> and the intra prediction unit <NUM> are similar to the features of the reference picture buffer <NUM> and the intra prediction unit <NUM> of <FIG>.

Particularly, the video decoder <NUM> comprises further units that are also present in the video encoder <NUM> like e.g. an inverse quantization unit <NUM>, an inverse transform unit <NUM>, a loop filtering unit <NUM> and an intra prediction unit <NUM>, which respectively correspond to the inverse quantization unit <NUM>, the inverse transform unit <NUM>, the loop filtering unit <NUM> and the intra prediction unit <NUM> of the video coder <NUM>.

An entropy decoding unit <NUM> is adapted to decode the received encoded video bitstream and to correspondingly obtain quantized residual transform coefficients and, if present, sharpening filter information. The quantized residual transform coefficients are fed to the inverse quantization unit <NUM> and an inverse transform unit <NUM> to generate a residual block. The residual block is added to a prediction block and the addition is fed to the loop filtering unit <NUM> to obtain the decoded video. Frames of the decoded video can be stored in the reference picture buffer <NUM> and serve as a reference frame for inter prediction.

Generally, the intra prediction units <NUM> and <NUM> of <FIG> and <FIG> can use reference samples from an already encoded area to generate prediction signals for blocks that need to be encoded or need to be decoded (see <FIG>).

<FIG> illustrates an intra-prediction of block <NUM> based on a plurality of reference samples <NUM> that are part of an already encoded area <NUM>. As indicated in <FIG> with arrows <NUM>, the block <NUM> is predicted based on the plurality of reference samples. In particular, a plurality of reference samples may be used to predict an individual pixel of the block <NUM>. The reference samples <NUM> may be selected from the already encoded area e.g. as a vertical and horizontal line of reference samples that surround the block to be predicted.

<FIG> is a block diagram of an intra prediction unit <NUM>. The intra prediction unit <NUM> may be an implementation of the intra prediction units <NUM> and <NUM> of <FIG> and <FIG> according to an implementation of the present invention and comprises three major blocks:.

At the reference samples preparation unit <NUM>, along with unprocessed reference samples and smoothed reference samples sharpened (and/or de-ringed) reference samples are obtained by applying a sharpening (and/or de-ringing) filter to reference samples. A decision about what type of pre-processing should be used can be made by the encoder e.g. during a rate-distortion optimization procedure (based on cost or minimum prediction error criterion) or based on some a-priori defined rules (e.g. based on a block size, a prediction mode, etc.).

<FIG> is a block diagram of a reference samples preparation unit <NUM>. The reference samples preparation unit <NUM> comprises a samples selection unit <NUM>, a smoothing filter <NUM> and a sharpening filter <NUM>. Furthermore, it comprises a switch <NUM> that is configured to switch between the smoothing filter <NUM>, the sharpening filter <NUM> and a bypass connection, wherein the filters are bypassed.

Preferably, the sharpening filter <NUM> of <FIG> is a non-linear warping-based sharpening filter.

<FIG> illustrates an example of a non-linear warping-based sharpening filter <NUM>. The filter <NUM> comprises a first derivative unit <NUM>, an absolute value unit <NUM>, a clipping unit <NUM>, a blurring filter <NUM>, a second derivative unit <NUM>, a multiplier <NUM> and a warping unit <NUM>. These units <NUM>-<NUM> are connected sequentially. In particular, the units <NUM>-<NUM> of the filter <NUM> are configured to sequentially carry out the following steps:.

This non-linear warp-based sharpening filter can achieve both types of improvement: increasing sharpness of natural edges and removing ringing artifacts around edges.

Traditional edge enhancement techniques based on linear sharpening (or de-blurring) filters like "unsharp masking" may increase subjective quality, but typically cannot suppress ringing artifacts caused by residual quantization. In many cases, they even increase ringing and reduce objective performance characteristics. In many cases, non-linear filters can provide better results for ringing elimination and enhance both subjective and objective quality of edges.

Adding a sharpening filter, such as e.g. the sharpening filter <NUM> of <FIG>, to reference samples processing allows to:.

Adding a sharpening filter of a specific structure (non-linear, warping based, adaptive) allows to:.

Preferably, an adaptation coefficient is changeable for some parts of content: sequence, group-of-pictures, coding picture, arbitrary region or regular coded block of any size (e.g. CTU, CU, PU, TU using HEVC terminology). To let decoder know about changed interpolation filter sets it should be signaled to decoder or derived on decoder side without explicit signaling.

A sharpening (and/or de-ringing) filter can be always enabled or switchable on/off. A decision about enabling or disabling a sharpening filter in each particular block of coded image (e.g. CTU, CU, PU, TU in H. <NUM>/HEVC terminology) can be chosen by encoder e.g. by minimization of a prediction error or a cost (rate/distortion) criterion and signaled in the bitstream with a <NUM>-bit flag.

The filter <NUM> allows increasing subjective sharpness of natural edges and suppressing ringing artifacts near to edges caused by quantization of reference samples. However further steps of prediction signal generation and post-filtering may cause natural edges be blurred again. To avoid this, running of sharpening and blurring tools simultaneously can be explicitly disabled. Such design reduces overhead generated by signaling of each particular prediction enhancement tool and reduces a complexity of an encoder by eliminating contradictory combinations from processing.

Preferably, if further steps of obtaining prediction signal contain tools that cause blurring (e.g. DC and Planar prediction mode, Gaussian Interpolation filter, bi-linear interpolation filter, MPI, PDPC, Boundary Prediction filter) then a combination of such tools with sharpening is excluded from processing and signaling.

The effects of sharpening and de-ringing can sometimes be achieved by just one filter. However, there are also cases where only sharpening or only de-ringing is desired, and special filters for only one of the two purposes are provided.

Depending on the particular configuration, the enabling of the sharpening filter does not always cause disabling of all possible blurring tools. Some of them may be disabled and some of them not. Such combinations may have improved performance.

Further modifications are addressed to next steps of intra prediction - Prediction Block Generation and Prediction post filtering. The Prediction Block Generation uses two interpolation filters. One is preserving high frequencies Cubic filter, the second is a low-pass Gaussian filter.

<FIG> is a flow chart of an exemplary method for determining which filter to use. The method begins in step <NUM> and proceeds to determine <NUM> whether the block size matches a criterion, e.g. whether the block size corresponds to a predetermined value. If so, the method proceeds to check <NUM> whether a sharpening flag, e.g. a sharpening flag parsed from a bitstream, is set. If the sharpening flag is true, the method proceeds with a step <NUM> of using a cubic interpolation filter. Otherwise, the method proceeds with step <NUM> of using a Gaussian interpolation filter.

In <FIG>, another exemplary embodiment is presented. Conventionally, during prediction, the block generation intra prediction mechanism looks over existing prediction modes and chooses a best prediction mode based on a minimum of a prediction error or rate/distortion (cost) criterion. The prediction modes can include Planar, DC and Angular modes.

In the method of <FIG>, which is preferably applied during encoding, if a sharpening mode was selected during a reference samples preparation step, then DC and Planar modes are excluded from the search. Accordingly, the combination of sharpening mode and DC or Planar prediction mode do not have to be signaled to the decoder.

In detail, the method begins in step <NUM>, and proceeds, for each prediction mode <NUM>, to determine in step <NUM> whether the prediction mode is DC or Planar. If so, the method determines in step <NUM> whether a sharpening flag is set. If the sharpening flag is set, the method proceeds with step <NUM> to the next prediction mode. If the sharpening flag is not set, the method continues with step <NUM> of calculating a prediction distortion/rate. In step <NUM>, a best prediction mode is saved.

The method of <FIG> ends in step <NUM> when all prediction modes have been evaluated.

<FIG> is a flow chart of a corresponding method to be applied during decoding. The method begins in step <NUM> and proceeds with step <NUM> of parsing an intra prediction mode. Subsequently, in step <NUM>, the method determines whether a prediction mode is DC or planar. If so, the method ends in step <NUM>, otherwise in step <NUM> the sharpening flag is parsed, e.g. from the bitstream.

On the last step of intra prediction - prediction post-filtering may also be tools contradictive to sharpening of reference samples. position dependent intra prediction combination (PDPC) according to invention should also be excluded from processing if sharpening of reference samples was chosen. This fact can be used to optimize signaling.

Depending on a signaling order, the decoder parses flags like presented in <FIG> when the PDPC flag is written first. If the sharpening flag is written first, then the parsing process is performed according to <FIG>. Another prediction post-filtering tool - multi parameter intra (MPI) prediction also may be harmonized with sharpening tool same way as for PDPC.

In more detail, <FIG> is a flow chart of a method to be applied during decoding. After initialization <NUM>, the method proceeds to parse <NUM> the PDPC flag. In step <NUM> it is determined whether the PDPC flag is set. If it is set, the method ends in step <NUM>. Otherwise the method proceeds with step <NUM> of parsing the sharpening flag.

<FIG> is a flow chart of another method to be applied during decoding. The method begins with a step <NUM> and proceeds to parse <NUM> a sharpening flag. If it is determined in step <NUM> that the sharpening flag is not set, the method in a further step <NUM> parses the PDPC flag. The method ends in a final step <NUM>.

<FIG> is a flow chart of another exemplary embodiment of joint work of reference samples sharpening and boundary smoothing filter. After initialization <NUM>, the method determines in step <NUM> whether a boundary smoothing condition is enabled. If not, the method ends in a final step <NUM>. Otherwise the method determines in step <NUM> whether a sharpening flag is set. Only if the sharpening flag is not set, the method proceeds with step <NUM> to perform boundary smoothing.

Claim 1:
A decoder (<NUM>; <NUM>) for decoding a block (<NUM>) of a current frame of a video from a bitstream, the decoder comprising:
- a reference sample selection unit (<NUM>) configured to select reference samples (<NUM>) of a recon-structed part of the current frame,
- a filter unit (<NUM>; <NUM>) configured to filter the reference samples, and
- a block generation unit (<NUM>) configured to generate a prediction of the block based on the filtered reference samples, wherein the prediction of the block is an intra-frame prediction of the block,
wherein the filter unit comprises a sharpening filter (<NUM>),
wherein the decoder is configured to activate the sharpening filter based on a quantization parameter of the block,
wherein the filter unit (<NUM>) comprises:
- a first derivative unit (<NUM>) configured to determine first derivatives of the reference samples,
- an absolute value unit (<NUM>) configured to determine absolute values of the first derivatives,
- a second derivative unit (<NUM>) configured to determine second derivatives based on the absolute values of the first derivatives, and
- a warping unit (<NUM>) configured to warp the reference samples based on the second derivatives, and
wherein the warping unit (<NUM>) is configured to displace each reference sample with a respective displacement vector obtained by scaling the second derivatives with a scaling coefficient, wherein the scaling coefficient is the sharpening strength.