TECHNICAL FIELD

The present invention relates to an apparatus, a method and a computer program for encoding and decoding.

BACKGROUND INFORMATION

A video codec may comprise an encoder which transforms input video into a compressed representation suitable for storage and/or transmission and a decoder that can uncompress the compressed video representation back into a viewable form, or either one of them. Typically, the encoder discards some information in the original video sequence in order to represent the video in a more compact form, for example at a lower bit rate.

Typical video codecs, operating for example according to the International Telecommunication Union's ITU-T H.263 and H.264 coding standards, encode video information in two phases. In the first phase, pixel values in a certain picture area or “block” are predicted. These pixel values can be predicted, for example, by motion compensation mechanisms, which involve finding and indicating an area in one of the previously encoded video frames (or a later coded video frame) that corresponds closely to the block being coded. Additionally, pixel values can be predicted by spatial mechanisms which involve finding and indicating a spatial region relationship.

Prediction approaches using image information from a previous (or a later) image can also be called as Inter prediction methods, and prediction approaches using image information within the same image can also be called as Intra prediction methods.

The second phase is one of coding the error between the predicted block of pixels and the original block of pixels. This is typically accomplished by transforming the difference in pixel values using a specified transform. This transform is typically a Discrete Cosine Transform (DCT) or a variant thereof. After transforming the difference, the transformed difference is quantized and entropy encoded.

By varying the fidelity of the quantization process, the encoder can control the balance between the accuracy of the pixel representation, (in other words, the quality of the picture) and the size of the resulting encoded video representation (in other words, the file size or transmission bit rate).

The decoder reconstructs the output video by applying a prediction mechanism similar to that used by the encoder in order to form a predicted representation of the pixel blocks (using the motion or spatial information created by the encoder and stored in the compressed representation of the image) and prediction error decoding (the inverse operation of the prediction error coding to recover the quantized prediction error signal in the spatial domain).

After applying pixel prediction and error decoding processes the decoder combines the prediction and the prediction error signals (the pixel values) to form the output video frame.

The decoder (and encoder) may also apply additional filtering processes in order to improve the quality of the output video before passing it for display and/or storing as a prediction reference for the forthcoming frames in the video sequence.

In typical video codecs, the motion information is indicated by motion vectors associated with each motion compensated image block. Each of these motion vectors represents the displacement of the image block in the picture to be coded (in the encoder) or decoded (at the decoder) and the prediction source block in one of the previously coded or decoded images (or pictures). In order to represent motion vectors efficiently, motion vectors are typically coded differentially with respect to block specific predicted motion vector. In a typical video codec, the predicted motion vectors are created in a predefined way, for example by calculating the median of the encoded or decoded motion vectors of the adjacent blocks.

In typical video codecs the prediction residual after motion compensation is first transformed with a transform kernel (like DCT) and then coded. The reason for this is that often there still exists some correlation among the residual and transform can in many cases help reduce this correlation and provide more efficient coding.

Typical video encoders utilize the Lagrangian cost function to find optimal coding modes, for example the desired macro block mode and associated motion vectors. This type of cost function uses a weighting factor or λ to tie together the exact or estimated image distortion due to lossy coding methods and the exact or estimated amount of information required to represent the pixel values in an image area.

This may be represented by the equation:
C=D+λR(1)

where C is the Lagrangian cost to be minimised, D is the image distortion (for example, the mean-squared error between the pixel values in original image block and in coded image block) with the mode and motion vectors currently considered, λ is a Lagrangian coefficient and R is the number of bits needed to represent the required data to reconstruct the image block in the decoder (including the amount of data to represent the candidate motion vectors).

Some hybrid video codecs, such as H.264/AVC, predict the Intra coded areas by spatial means utilizing the pixel values of the already processed areas in the picture. A typical codec has a fixed set of available prediction methods which provide predictions from the corresponding direction. If the number of available prediction directions is low, the compression performance may suffer as there may not be a method matching to all the directional structures in the picture content. If the number of available prediction directions is large the implementation complexity may become a burden. Some codecs use a small number of directional intra prediction methods, for example from 2 to 8 different directions, which may lead into suboptimal performance but may keep the implementation complexity at a moderate level.

SUMMARY

This invention provides some embodiments which may support a relatively large number of prediction directions in an Intra prediction subsystem of a video codec. According to some embodiments the prediction process is defined by a displacement measure between one line of pixels and a reference line of pixels at a given granularity, either in a horizontal or a vertical direction. When deriving predicted values for each pixel in the block the selected displacement is used to calculate a projection of each pixel to the line of reference pixels and an interpolation operation is applied to calculate final prediction values utilizing the distance of the projected pixel location from the closest reference pixels.

According to a first aspect of the invention, there is provided an apparatus comprising:

a selector configured for selecting a pixel for prediction;

a projection definer configured for determining a projection of said pixel to a set of reference pixels; and

a prediction definer configured for selecting one or more reference pixels from said set of reference pixels on the basis of said projection, and using said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to a second aspect of the invention there is provided a method comprising:

selecting a pixel for prediction;

determining a projection of said pixel to a set of reference pixels;

selecting one or more reference pixels from said set of reference pixels on the basis of said projection; and

obtaining a prediction value for said pixel to be predicted by using said selected one or more reference pixels.

According to a third aspect of the invention there is provided a computer readable storage medium stored with code thereon for use by an apparatus, which when executed by a processor, causes the apparatus to perform:

select a pixel for prediction;

determine a projection of said pixel to a set of reference pixels;

select one or more reference pixels from said set of reference pixels on the basis of said projection; and

obtain a prediction value for said pixel to be predicted by using said selected one or more reference pixels.

According to a fourth aspect of the invention there is provided at least one processor and at least one memory, said at least one memory stored with code thereon, which when executed by said at least one processor, causes an apparatus to perform:

select a pixel for prediction;

determine a projection of said pixel to a set of reference pixels;

select one or more reference pixels from said set of reference pixels on the basis of said projection; and

obtain a prediction value for said pixel to be predicted by using said selected one or more reference pixels.

According to a fifth aspect of the invention there is provided an apparatus which comprises:

an analyser configured for examining an indication of a directionality regarding a block of pixels of an image to be decoded; and

a reconstructor configured for:

determining a projection of a pixel of said block of pixels to be decoded on a set of reference pixels; and

selecting one or more reference pixels from said set of reference pixels on the basis of said projection, and using said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to a sixth aspect of the invention there is provided a method comprising:

examining an indication of directionality regarding a block of pixels of an image to be decoded;

determining a projection of a pixel of said block of pixels to be decoded on a set of reference pixels; and

selecting one or more reference pixels from said set of reference pixels on the basis of said projection, and using said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to a seventh aspect of the invention there is provided a computer readable storage medium stored with code thereon for use by an apparatus, which when executed by a processor, causes the apparatus to perform:

examine an indication of a directionality regarding a block of pixels of an image to be decoded;

determine a projection of a pixel of said block of pixels to be decoded on a set of reference pixels;

select one or more reference pixels from said set of reference pixels on the basis of said projection, and

use said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to an eighth aspect of the invention there is provided at least one processor and at least one memory, said at least one memory stored with code thereon, which when executed by said at least one processor, causes an apparatus to perform:

examine an indication of directionality regarding a block of pixels of an image to be decoded;

determine a projection of a pixel of said block of pixels to be decoded on a set of reference pixels; and

select one or more reference pixels from said set of reference pixels on the basis of said projection, and

use said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to a ninth aspect of the invention there is provided an encoder comprising:

a selector configured for selecting an encoding method from a set of intra prediction modes for encoding a block of pixels of an image; and

a selector configured for selecting a pixel for prediction;

wherein said intra prediction mode comprises:

a projection definer configured for determining a projection of said pixel to a set of reference pixels; and

a prediction definer configured for selecting one or more reference pixels from said set of reference pixels on the basis of said projection, and using said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to a tenth aspect of the invention there is provided a decoder which comprises:

an analyser configured for examining an indication of a directionality regarding a block of pixels of an image to be decoded; and

a reconstructor configured for:

determining a projection of a pixel of said block of pixels to be decoded on a set of reference pixels; and

selecting one or more reference pixels from said set of reference pixels on the basis of said projection, and using said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

According to an eleventh aspect of the invention there is provided an apparatus which comprises:

means for selecting an encoding method from a set of intra prediction modes for encoding a block of pixels of an image;

means for selecting a pixel for prediction;

wherein said intra prediction mode comprises:

means for determining a projection of said pixel to a set of reference pixels;

means for selecting one or more reference pixels from said set of reference pixels on the basis of said projection; and

means for obtaining a prediction value for said pixel to be predicted by using said selected one or more reference pixels.

According to a twelfth aspect of the invention there is provided an apparatus which comprises:

means for examining an indication of a directionality regarding a block of pixels of an image to be decoded; and

means determining a projection of a pixel of said block of pixels to be decoded on a set of reference pixels; and

means for selecting one or more reference pixels from said set of reference pixels on the basis of said projection; and

means for using said selected one or more reference pixels to obtain a prediction value for said pixel to be predicted.

