Patent Description:
Digital video communication and storage applications are implemented by a wide range of digital devices, e.g., digital cameras, cellular radio telephones, laptops, broadcasting systems, video teleconferencing systems, etc. One of the most important and challenging tasks of these applications is video compression. The task of video compression is complex and is constrained by two contradicting parameters: compression efficiency and computational complexity. Video coding standards, such as ITU-T H. <NUM>/Advanced Video Coding (AVC) or ITU-T H. <NUM>/ High Efficiency Video Coding (HEVC), provide a good tradeoff between these parameters.

Next Generation Video Coding (NGVC) is the latest video compression standard, which is being developed by the Joint Collaborative Team on Video Coding (JCT-VC) formed by ISO/IEC Moving Picture Experts Group (MPEG) and ITU-T Video Coding Experts Group (VCEG). NGVC is being developed in response to the previous H. <NUM>/HEVC (High Efficiency Video Coding) standard. Similar to previous video coding standards, NGVC includes basic functional modules such as intra/inter prediction, Transform, quantization, in-loop filtering, and entropy coding.

The coding standards, including NGVC, are based on partitioning of a source picture into video coding blocks, e.g., coding units (CUs). Each of the CUs can be further split into either smaller CUs or prediction units (PUs). Processing of these blocks depend on their size, spatial position and a coding mode specified by an encoder. Coding modes can be classified into two groups according to the type of prediction: intra- and inter-prediction modes. Intra prediction modes use pixels of the same picture (also referred to as frame or image) to generate reference samples to calculate the prediction values for the pixels of the block being reconstructed. Intra prediction is also referred to as spatial prediction. Inter-prediction modes are designed for temporal prediction and uses reference samples of previous or next pictures to predict pixels of the block of the current picture. After a prediction stage, transform coding is performed for a prediction error that is the difference between an original signal and its prediction.

When one of the prediction modes is selected for the current CU or PU, the prediction value is generated by extrapolation using the already coded pels surrounding the current CU or PU. For the bidirectional prediction method, the prediction value is generated in combination with two kinds of the intra prediction modes at each sub-block. A set of bidirectional intra prediction modes are introduced in the state-of-the-art, which needs a high bitrate.

Document "<NPL> et al. discloses experimental results of Bidirectional Intra Prediction (BIP) for Core Experiment <NUM> (CE6) on intra prediction improvement.

Document "<NPL> suggests introducing BIP into KTA (Key Technical Area) Software.

<CIT> discloses a method, an apparatus and a computer program product in which at least one view component of a first type and at least one view component of a second type are obtained.

It is an object of the invention to provide improved devices and methods for video coding, which allow reducing the high bitrate caused by introducing a set of bidirectional intra prediction modes.

Embodiments of the invention are described in the claims and in the below description. The scope of protection is defined by the claims.

According to a first aspect, the invention relates to a method of encoding a picture, the method comprising generating a bitstream for reconstructing the picture. The method comprises:.

In a further possible implementation form of the first aspect, the determining whether the BIP flag is to be signaled comprises:.

In a further possible implementation form of the first aspect, the determining whether the BIP flag is to be signaled according to numbers and positions of available primary reference samples comprises:.

In a further possible implementation form of the first aspect, the determining whether a BIP flag is to be signaled according to the size of the current coding block comprises: determining that the BIP is disabled, and the BIP flag is not to be signaled in the bitstream when both a width and height of the current coding block equal a minimum size, or when the width of the current coding block is larger than a first maximum threshold, or when the height of the current coding block is larger than a second maximum threshold.

In a further possible implementation form of the first aspect, the determining whether the BIP flag is to be signaled according to numbers and positions of available primary reference samples, and intra prediction mode index:.

In a further possible implementation form of the first aspect, the determining whether a BIP flag is to be signaled according to the numbers and positions of available primary reference samples, and the intra prediction mode index comprises:
determining that the BIP is enabled, and the BIP flag is applied by default and is not to be signaled in the bitstream when the intra prediction mode index is greater than a range start value and is less than a range end value, and when a primary reference sample in lower side or upper side of the current coding block is available, wherein the range start value and the range end value is determined using a width and a height of the current coding block.

In a further possible implementation form of the first aspect, the determining whether the BIP flag is to be signaled comprises:
determining a reliability of the BIP, where the reliability of the BIP includes low-reliable prediction (CTXLR), medium-reliable prediction (CTXMR) or highly-reliable prediction (CTXHR).

In a further possible implementation form of the first aspect, the determining the reliability of the BIP comprises:
determining the reliability of the BIP as CTXLR when primary reference samples in left and right sides of the current coding block are available, a primary reference sample in the top side of the current coding block is not available, and IIPM belongs to a first predefined range.

In a further possible implementation form of the first aspect, the determining the reliability of the BIP comprises:
determining the reliability of the BIP as CTXHR when primary reference samples in left and top sides of the current coding block are available, a primary reference sample in right side of the current coding block is not available, and IIPM belongs to a second predefined range.

In a further possible implementation form of the first aspect, the determining the reliability of the BIP comprises:
determining the reliability of the BIP as CTXMR when primary reference samples in left and right sides of the current coding block are available and one of the following is true:.

According to a second aspect the invention relates a method for intra prediction of a current coding block of a picture. The method comprises:.

In a further possible implementation form of the second aspect, the determining whether the BIP flag is signaled comprises:.

In a further possible implementation form of the second aspect, the prediction related information comprises numbers and positions of available primary reference samples, and wherein the determining whether the BIP flag is signaled comprises:.

In a further possible implementation form of the second aspect, wherein the prediction related information comprises the size of the current coding block, and wherein the determining whether the BIP flag is signaled comprises:
determining that the BIP is disable and the BIP flag is not signaled in the bitstream when both a width and height of the current coding block equal to a minimum size, or when the width of the current coding block is larger than a first maximum threshold, or when the height of the current coding block is larger than a second maximum threshold.

In a further possible implementation form of the second aspect, wherein the prediction related information comprises numbers and positions of available primary reference samples and intra prediction mode index, and wherein the determining whether the BIP flag is signaled comprises:.

In a further possible implementation form of the second aspect, wherein the prediction related information comprises numbers and positions of available primary reference samples and intra prediction mode index, and wherein the determining whether the BIP flag is signaled comprises:
determining that the BIP is enabled, and the BIP flag is applied by default and is not signaled in the bitstream when the intra prediction mode index is greater than a range start value and is less than a range end value, and when a primary reference sample in lower side or upper side of the current coding block is available, wherein the range start value and the range end value is determined using a width and a height of the current coding block.

In a further possible implementation form of the second aspect, the determining whether that BIP flag is signaled comprises:
determining a reliability of the BIP according to the prediction related information, where reliability of the BIP includes low-reliable prediction (CTXLR), medium-reliable prediction (CTXMR) or highly-reliable prediction (CTXHR).

In a further possible implementation form of the second aspect, the determining the reliability of the BIP comprises:
determining the reliability of the BIP as CTXLR when primary reference samples in left and right sides of the current coding block are available, a primary reference sample in the top side of the current coding block is not available, and IIPM belongs to a first predefined range.

In a further possible implementation form of the second aspect, wherein the determining the reliability of the BIP comprises:
determining the reliability of the BIP as CTXHR when primary reference samples in left and top sides of the current coding block are available, a primary reference sample in right side of the current coding block is not available, and IIPM belongs to a second predefined range.

In a further possible implementation form of the second aspect, the determining the reliability of the BIP comprises:
determining the reliability of the BIP as CTXMR when primary reference samples in left and right sides of the current coding block are available and one of the following is true:.

In a further possible implementation form of the second aspect, the BIP mode is a distance-weighted direction intra prediction (DWDIP) mode, and the BIP flag is a DWDIP flag.

According to a third aspect the invention relates to an encoder comprising processing circuitry for carrying out the method according to any one of the first aspect and the possible implementation forms of the first aspect.

According to a fourth aspect the invention relates to a decoder comprising processing circuitry for carrying out the method according to any one of the second aspect and the possible implementation forms of the second aspect.

According to a fifth aspect the invention relates to a computer program product comprising a program code for performing the method according to any one of the first aspect and the possible implementation forms of the first aspect, or according to any one of the second aspect and the possible implementation forms of the second aspect, when the computer program runs on a computing device.

In the various figures, identical reference signs will be used for identical or at least functionally equivalent features.

In the following description, reference is made to the accompanying drawings, which form part of the disclosure, and in which are shown, by way of illustration, specific aspects in which the invention may be placed.

In order to reduce the high bitrate caused by introducing a set of bidirectional intra prediction modes, such as the signaling overhead by adding a bidirectional intra prediction (BIP) flag to a bitstream, any one of the following three techniques may be implemented:.

These techniques are described further below with reference to various examples.

The following factors may be taken into account to decide whether a BIP flag should be put into a bitstream or what CABAC context should be selected as described below:.

<FIG> is a block diagram illustrating an example video encoding and decoding system <NUM> that may utilize the techniques described in this disclosure, including techniques for encoding and decoding blocks in an intra prediction mode. As shown in <FIG>, system <NUM> includes a source device <NUM> that generates encoded video data to be decoded at a later time by a destination device <NUM>. Video encoder <NUM> as shown in <FIG>, is an example of the source device <NUM>. Video decoder <NUM> as shown in <FIG>, is an example of the destination device <NUM>. Source device <NUM> and destination device <NUM> may comprise any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, so-called "smart" pads, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or the like. In some cases, source device <NUM> and destination device <NUM> may be equipped for wireless communication.

Destination device <NUM> may receive the encoded video data to be decoded via a link <NUM>. Link <NUM> may include any type of medium or device capable of moving the encoded video data from source device <NUM> to destination device <NUM>. In one example, link <NUM> may comprise a communication medium to enable source device <NUM> to transmit encoded video data directly to destination device <NUM> in real-time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to destination device <NUM>. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from source device <NUM> to destination device <NUM>.

Alternatively, encoded data may be output from output interface <NUM> to a storage device (not shown in <FIG>). Similarly, encoded data may be accessed from the storage device by input interface <NUM>. Destination device <NUM> may access stored video data from storage device via streaming or download. The techniques of this disclosure are not necessarily limited to wireless applications or settings. The techniques may be applied to video coding in support of any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, streaming video transmissions, e.g., via the Internet, encoding of digital video for storage on a data storage medium, decoding of digital video stored on a data storage medium, or other applications. In some examples, system <NUM> may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.

In the example of <FIG>, source device <NUM> includes a video source <NUM>, video encoder <NUM> and an output interface <NUM>. In some cases, output interface <NUM> may include a modulator/demodulator (modem) and/or a transmitter. In source device <NUM>, video source <NUM> may include a source such as a video capture device, e.g., a video camera, a video archive containing previously captured video, a video feed interface to receive video from a video content provider, and/or a computer graphics system for generating computer graphics data as the source video, or a combination of such sources. As one example, if video source <NUM> is a video camera, source device <NUM> and destination device <NUM> may form so-called camera phones or video phones. However, the techniques described in this disclosure may be applicable to video coding in general, and may be applied to wireless and/or wired applications.

The captured, pre-captured, or computer-generated video may be encoded by video encoder <NUM>. The encoded video data may be transmitted directly to destination device <NUM> via output interface <NUM> of source device <NUM>. The encoded video data may also (or alternatively) be stored onto the storage device for later access by destination device <NUM> or other devices, for decoding and/or playback.

Destination device <NUM> includes an input interface <NUM>, a video decoder <NUM>, and a display device <NUM>. In some cases, input interface <NUM> may include a receiver and/or a modem. Input interface <NUM> of destination device <NUM> receives the encoded video data over link <NUM>. The encoded video data communicated over link <NUM>, or provided on the storage device, may include a variety of syntax elements generated by video encoder <NUM> for use by a video decoder, such as video decoder <NUM>, in decoding the video data. Such syntax elements may be included with the encoded video data transmitted on a communication medium, stored on a storage medium, or stored a file server.

Display device <NUM> may be integrated with, or external to, destination device <NUM>. In some examples, destination device <NUM> may include an integrated display device and also be configured to interface with an external display device. In other examples, destination device <NUM> may be a display device. In general, display device <NUM> displays the decoded video data to a user, and may comprise any of a variety of display devices such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

Video encoder <NUM> and video decoder <NUM> may operate according to all kind of video compression standards, includes but not limited to MPEG-<NUM>, MPEG-<NUM>, ITU-T H. <NUM>, ITU-T H. <NUM>/MPEG-<NUM>, Part <NUM>, Advanced Video Coding (AVC), the High Efficiency Video Coding (HEVC), ITU-T H. <NUM>/Next Generation Video Coding (NGVC) standard.

It is generally contemplated that video encoder <NUM> of source device <NUM> may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that video decoder <NUM> of destination device <NUM> may be configured to decode video data according to any of these current or future standards.

Video encoder <NUM> and video decoder <NUM> each may be implemented as any of a variety of suitable encoder circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof.

In video coding specifications, a video sequence typically includes a series of pictures. Pictures may also be referred to as "frames. " Video encoder <NUM> may output a bitstream that includes a sequence of bits that forms a representation of coded pictures and associated data. Video decoder <NUM> may receive a bitstream generated by video encoder <NUM>. In addition, video decoder <NUM> may parse the bitstream to obtain syntax elements from the bitstream. Video decoder <NUM> may reconstruct the pictures of the video data based at least in part on the syntax elements obtained from the bitstream. The process to reconstruct the video data may be generally reciprocal to the process performed by video encoder <NUM>.

<FIG> shows a schematic diagram illustrating an example of a video encoder <NUM>. The video encoder <NUM> comprises an input for receiving input blocks of frames or pictures of a video stream and an output for generating an encoded video bit stream. The video 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 bit stream.

The video stream corresponds to 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 bit stream 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 of the same size 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>.

For performing inter prediction, the coded reference frames are processed by an inverse quantization unit <NUM>, an inverse transform unit <NUM>, a filtering unit <NUM> (optional) so as to obtain the reference frames that are then stored in a frame buffer <NUM>. Particularly, reference blocks of the reference frame can be processed by these units to obtain reconstructed reference blocks. The reconstructed reference blocks are then recombined into the reference frame.

The inter prediction unit <NUM> comprises as input 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 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 bit stream comprises intra coded blocks and inter coded blocks.

<FIG> shows a schematic diagram illustrating an example of a video decoder <NUM>. The video decoder <NUM> comprises particularly a frame buffer <NUM>, an inter prediction unit <NUM>. The frame buffer <NUM> is adapted to store at least one reference frame obtained from the encoded video bit stream. The inter prediction unit <NUM> is adapted to generate a prediction block of a current block of a current frame from a reference block of the reference frame.

The decoder <NUM> is adapted to decode the encoded video bit stream generated by the video encoder <NUM>, and both the decoder <NUM> and the coder <NUM> generate identical predictions. The features of the frame buffer <NUM>, the inter prediction unit <NUM> are similar to the features of the frame buffer <NUM>, the inter prediction unit <NUM>, of <FIG>. Particularly, the video decoder <NUM> comprises units that are also present in the video encoder <NUM> like e.g., an inverse quantization unit <NUM>, an inverse transform unit <NUM>, a filtering unit <NUM> (optional) and an intra prediction unit <NUM>, which respectively correspond to the inverse quantization unit <NUM>, the inverse transform unit <NUM>, the filtering unit <NUM> and the intra prediction unit <NUM> of the video encoder <NUM>. An entropy decoding unit <NUM> is adapted to decode the received encoded video bit stream and to correspondingly obtain quantized residual transform coefficients. 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 filtering unit <NUM> to obtain the decoded video. Frames of the decoded video can be stored in the frame buffer <NUM> and serve as a reference frame for inter prediction.

According to the HEVC/H. <NUM> standard, <NUM> intra prediction modes are available. As shown in <FIG>, this set contains the following modes: planar mode (the intra prediction mode index is <NUM>), DC mode (the intra prediction mode index is <NUM>), and directional (angular) modes that cover the <NUM>° range and have the intra prediction mode index value range of <NUM> to <NUM> shown by black arrows in <FIG>. To capture the arbitrary edge directions present in natural video, the number of directional intra modes is extended from <NUM>, as used in HEVC, to <NUM>. The additional directional modes are depicted as dotted arrows in <FIG>, and the planar and DC modes remain the same. It is worth noting that the range that is covered by intra prediction modes can be wider than180°. In particular, <NUM> directional modes with index values of <NUM> to <NUM> cover the range of approximately <NUM>°, i.e. several pairs of modes have opposite directionality. In the case of the HEVC Reference Model (HM) and JEM platforms, only one pair of angular modes (namely, modes <NUM> and <NUM>) has opposite directionality as shown in <FIG>. For constructing a predictor, conventional angular modes take reference samples and (if needed) filter them to get a pixel predictor. The number of reference samples required for constructing a predictor depends on the length of the filter used for interpolation (e.g., bilinear and cubic filters have lengths of <NUM> and <NUM>, respectively).

In order to take advantage of availability of reference samples that are used at the stage of intra prediction, a more flexible block coding order (BCO) is introduced, as schematically illustrated by the example at <FIG>. Comparing to an example of a fixed block coding order (BCO) as illustrated at <FIG>, flexible block coding order (FBCO) as illustrated at <FIG>, is a block coding order mechanisms that enables a non-fixed block coding order. FBCO encompasses different mechanisms such as Split Unit Coding Order (SUCO), Arbitrary Block Coding Order (ABCO), and others. For example, FBCO can be used at <FIG>, <FIG> and <FIG>. With FBCO, not only top and left (LR_10) reference sample sides can be available for intra prediction but also, for example, top and right (LR_01) sides as well as three (top, left and right) sides. However, in some cases, even for blocks located not on a picture boundary, only one (namely, top) side can be available that is impossible for partitioning frameworks with fixed BCO.

Bidirectional Intra prediction (BIP) is a mechanism of constructing a directional predictor by generating a prediction value in combination with two kinds of the intra prediction modes within each block. Distance-Weighted Direction Intra Prediction (DWDIP) is a particular implementation of BIP. Generating a predictor by DWDIP includes the following two steps:.

Both primary and secondary reference samples can be used at b) step.

Samples within the predictor are calculated as a weighted sum of reference samples defined by the selected prediction direction and placed on opposite sides as shown in <FIG>. Prediction of a block may include steps of generating secondary reference samples that are located on the sides of the block that are not yet reconstructed and to be predicted, i.e. unknown pixels. Values of these secondary reference samples are derived from the primary reference samples which are obtained from the pixels of the previously reconstructed part of the picture, i.e., known pixels. That means primary reference samples <NUM> are taken from adjacent blocks. Secondary reference samples <NUM> are generated using primary reference samples <NUM>. In <FIG>, the primary reference pixels/samples <NUM> are identified by squares with dots, and the secondary reference pixels/samples <NUM> are identified by squares with grids. A pixels/samples <NUM> are predicted using a distance-weighted mechanism.

The flag of BIP based modes is always signaled in conventional methods, which causes signaling overhead in the bitstream.

As secondary reference samples are typically not as close to source pixels as primary reference samples, the more pixels within a block are predicted using only primary reference samples, the higher the probability is that a constructed predictor is closer to an original block, as illustrated at <FIG> schematically illustrate the relationship between the primary reference samples and the accuracy of the constructed predictor. In view of this, the ratio of the number of pixels generated using primary-to-primary prediction to the entire number of pixels within a block is used to make decisions on what context should be selected to signal BIP. Primary-to-primary propagation ratio is a ratio of the number of pixels that are predicted from two primary references to the total number of pixels in the block. As shown in <FIG>, when the primary-to-primary propagation ratio is below a first threshold, BIP is disabled and a corresponding flag is not signaled. When the primary-to-primary propagation ratio is above a second threshold, BIP is used by default and corresponding flag is not signaled. When the primary-to-primary propagation ratio is between the first threshold and the second threshold, BIP is signaled using CABAC contexts. Different scenarios are discussed below for detail.

For a block of width w and height h being intra-predicted using mode IIPM, BIP is disabled and a corresponding flag is not signaled if any of the following conditions is true:.

Top side of neighboring pixels means a primary reference sample in top sides of the current coding block. Correspondingly, left side of neighboring pixels means a primary reference sample in left sides of the current coding block. Right side of neighboring pixels means a primary reference sample in right sides of the current coding block.

<FIG> shows an example scenario in which BIP is disabled because only an upper reference sample row is available for intra prediction (LR_00), left and right sides of neighboring pixels are not available.

BIP replaces conventional intra prediction by default and a corresponding flag is not signaled when additional reference pixels are available, and the intra prediction mode belongs to the specific sub-range.

For example, as shown in <FIG>, ranges are specified by horizontal (HOR) intra prediction mode number (<NUM>) and the ultimate intra prediction mode number specified in Table <NUM>, depending on the block aspect ratio.

IIPM_TL, as described in Table <NUM>, represents an intra-predicted using mode IIPM selected for the top-left block; IIPM_LL represents an intra-predicted using mode IIPM selected for the lower-left block.

Besides a range aligned with horizontal intra prediction, an additional range is specified for the case in which lower-left side is available (see the rightmost part of <FIG>). The range for this case is defined by the first available angular intra prediction mode (#<NUM>) and the corresponding value from Table <NUM>.

IIPM_TR, as described in Table <NUM>, represents an intra-predicted using mode IIPM selected for the top-right block.

In addition to the cases described above, BIP replaces conventional intra prediction and a corresponding flag is not signaled when:.

Intra prediction mode numbers listed in Table <NUM> and Table <NUM> are shown in <FIG>. Among <FIG>, IIPM_LA represents an intra prediction mode IIPM for the last-available intra prediction direction; and IIPM_FA represents an intra prediction mode IIPM for the first-available intra prediction direction. Intra prediction modes numbers are arranged in ascending order from IIPM_FA to IIPM_LA. Horizontal (HOR) and vertical (VER) directions modes (IIPM_HOR and IIPM_VER, respectively) do not depend on block aspect ratio RA. The remaining intra prediction mode numbers shown in <FIG> have a dependency on RA which is given by Table <NUM> and Table <NUM>.

<FIG> shows an example scenario when BIP is used by default because not only top sides, but also left and right sides (three sides) of neighboring pixels are available.

A context selection process is performed for a BIP flag when none of the procedures described in sections "BIP is disabled and corresponding flag is not signaled" section and "BIP is used by default and corresponding flag is not signaled" are in effect. A flowchart of an exemplary context selection procedure is given in <FIG>. Input of this process is given at the first step (block <NUM>) of the flowchart. It contains:.

Different contexts could be specified for a probability model, for example low-reliable prediction (denoted as CTXLR), medium-reliable prediction (denoted as CTXMR) and highly-reliable prediction (denoted as CTXHR) cases. Default context is medium-reliable context. The reliability of prediction affects the probability of BIP flag being equal <NUM>, and could be estimated by how close IIPM is to one of the ultimate modes listed above. These modes are determined according to the aspect ratio of a block which is calculated at the next step (block <NUM>). Such as, RA = log2(w) - log2(h). Aspect ratio is represented by a value that is positive if a block is aligned horizontally (i.e. width is greater than height) and negative if the block is aligned vertically. The next step (block <NUM>) is to select ultimate modes as specified by Table <NUM> and Table <NUM>. For example, { IIPM_LL, IIPM_TL, IIPM_TR } = LUT(RA).

Following decision making on context selection is performed depending on whether.

Depending on the availability of reference samples sides (S) different ranges are defined and context is selected on the fact of whether IIPM belongs to this range or not. If left and right sides are available at block <NUM>, {sL,sR} ⊇ S, CTXLR is selected at block <NUM> when top side is not available and IIPM belongs to the range as shown in <FIG> (block <NUM>). At block <NUM>, that whether top side is not available and whether IIPM belongs to the range as shown in <FIG> is determined, for example, <MAT> and <MAT>.

If left and right sides are available at block <NUM>, {sL,sR} ⊇ S, CTXMR is selected at block <NUM> when top side is available or IIPM does not belong to the range as shown in <FIG> (block <NUM>).

If left and top sides are available, CTXHR is selected if right side is not available and IIPM belongs to the range as shown in <FIG>. In <FIG>, for the rest cases additional calculations may be performed at block <NUM>, specifically:.

The rest of the context selection process is shown in <FIG>, which results in selection of one of the above-specified contexts depending on the prediction reliability estimation. When left side is available, and right side is not available at block <NUM>, whether C is true or {sLL,sTR} ⊉ S is determined at block <NUM>. When C is true or {sLL,sTR} ⊉ S, CTXMR is selected at block <NUM>. If C is false and {sLL,sTR} ⊇S, whether<MAT> or
IIPM_LL - ΔIPM ≤ IIPM ≤ min(IIPM_LL + ΔIPM, IIPM_LA) is determined at block <NUM>. If yes at block <NUM>, CTXMR is selected at block <NUM>; otherwise CTXHR is selected at block <NUM>.

If left side is not available, or right side is available at block <NUM>, whether C is false or {sLR,sTL} ⊉ S is determined at block <NUM>. If C is false or {sLR,sTL} ⊉ S, CTXMR is selected at block <NUM>. If C is true and {sLR,sTL} ⊇S, whether
IIPM_TL - ΔIPM ≤ IIPM ≤ IIPM_TL + ΔIPM is determined at block <NUM>. If yes at block <NUM>, CTXHR is selected at block <NUM>; otherwise CTXMR is selected at block <NUM>.

There may be fewer or more than three different contexts. Generally, a context could be defined as a function of.

Thus, more than just one context could be provided per an ultimate intra prediction, e.g., if several threshold difference values ΔIPM are introduced.

<FIG> shows an example scenario when BIP is used by context selection process when either top and left reference sample sides (LR_10) or top and right sides (LR_01) are available for intra prediction.

<FIG> is a flowchart of an example of a method of encoding (or compressing) a bitstream, which may be performed by the source device <NUM> as shown in <FIG>, or by the video encoder <NUM> as shown in <FIG>. Process <NUM> is an example for the encoder's processing. Encoder-side changes introduced by the present disclosure primarily relate to the selection of intra prediction mode using rate-distortion optimization (RDO) procedure. This procedure may notably comprise the following blocks.

Block <NUM>, the encoder generates a list of candidate intra prediction modes for a current coding block of the picture, where the list of candidate intra prediction modes comprises at least one BIP mode.

Block <NUM>, the encoder determines whether a BIP flag is to be signaled in the bitstream according to prediction related information, where the BIP flag indicates a BIP mode selected for the current coding block. The prediction related information comprises:.

Exemplary determining whether BIP flag is to be signaled in the bitstream described earlier and shown in <FIG>.

Block <NUM>, when the BIP flag is not to be signaled in the bitstream, the encoder does not code value of the BIP flag to the bitstream. The two examples are described earlier at sections "BIP is disabled and corresponding flag is not signaled" and "BIP is used by default and corresponding flag is not signaled.

Block <NUM>, when the BIP flag is to be signaled in the bitstream, the encoder derives a probability model for encoding from the prediction related information. Then at block <NUM>, the encoder codes a value of the BIP flag to the bitstream using the probability model. The example is described earlier at section "BIP is signaled using CABAC contexts (or probability model).

<FIG> is another flowchart of an example of a method of encoding (or compressing) a bitstream, which may be performed by the source device <NUM> as shown in <FIG>, or by the video encoder <NUM> as shown in <FIG>. Process <NUM> is an example for the encoder's processing. Encoder-side changes introduced by the present disclosure primarily relate to the selection of intra prediction mode using rate-distortion optimization (RDO) procedure. This procedure may notably comprise:.

One of the possible implementation forms involves a particular way of preparing a list of candidate intra prediction modes LRC. Besides the numbers of intra prediction modes, The LRC list would also contain the values of bip_flag associated with the corresponding intra prediction modes. <FIG> shows an exemplary flowchart for preparing a list of candidate intra prediction modes and corresponding values of bip_flag using cost estimation based on estimation of intra prediction residual. According to the flowchart <NUM>, available intra prediction modes are scanned twice having the value of bip_flag equal <NUM> and <NUM>, respectively. The flowchart <NUM> also skips Rate-Distortion Optimization (RDO) cost estimations for the cases when bip_flag is incompliant with the intra prediction mode IIPM being checked.

At block <NUM>, the encoder genereates intra_pred_list() for a current block. At beginning, bip_flag is <NUM> as shown at block <NUM>, and the IIPM is <NUM> as shown at block <NUM>.

At block <NUM>, the encoder determines that bip_flag is <NUM> or bip_flag is <NUM>. If the bip_flag is <NUM>, the encoder determines whether the BIP is applied by default at block <NUM>. If the bip_flag is <NUM>, the encoder determines whether the BIP is enabled at block <NUM>.

If the BIP is not applied by default, or the BIP is enabled, the encoder uses IIPM as the intra_prediction modes of the current block at block <NUM>. The encoder performs RDO cost estimation at block <NUM>. Then, the encoder prepares a list of candidate intra prediction modes LRC using RDO cost estimation based on estimation of intra prediction residual at block <NUM>, where the LRC list may contain the values of bip_flag associated with the corresponding intra prediction modes. Then at block <NUM>, a best intra prediction is selected or updated out of the LRC list using cost estimation based on coding of intra prediction residual.

After updating LRC with IIPM at block <NUM>, or the BIP is applied by default at block <NUM>, or the BIP is not enabled at block <NUM>, the encoder determines whether IIPM is the last-available intra prediction IIPM_LA at block <NUM>. If IIPM is not the last-available intra prediction IIPM_LA, IIPM= IIPM+<NUM> at block <NUM>. After IIPM= IIPM+<NUM>, the process goes back to block <NUM> to determine that bip_flag is <NUM> or bip_flag is <NUM>. If IIPM is the last-available intra prediction IIPM_LA, the encoder determines whether bip_flag < <NUM> at block <NUM>. If the bip_flag < <NUM>, bip_flag = bip_flag +<NUM> at block <NUM>. After bip_flag = bip_flag +<NUM>, the process goes back to block <NUM>.

Exemplary determining whether BIP is enabled or not, and exemplary determining whether BIP is applied by default are described earlier and shown in <FIG>.

In this embodiment, a single list of candidate intra prediction modes LRC is used. However, it is possible to prepare two separate lists and select a pair {bip_flag , IIPM } out of the two lists. In this case, the embodiment still would not affect the process of selecting a best intra prediction out of the LRC list. The only difference with <FIG> is that bip_flag loop is external to intra_pred_list process, and the list LRC to be updated is selected according to the input value of bip_flag.

<FIG> is an exemplary flowchart <NUM> to decode (or parse or decompress) an coded bitstream, which is performed by the destination device <NUM> as shown in <FIG>, or the video decoder <NUM> as shown in <FIG>. Process <NUM> is an example for the decoder's processing.

Block <NUM>, the decoder receives a bitstream, where the bitstream comprises prediction related information. The prediction related information comprises:.

Block <NUM>, the decoder determines whether a BIP flag is signaled in the bitstream according to the prediction related information, where the BIP flag indicates a BIP mode selected for the current coding block.

Exemplary determining whether BIP flag is signaled in the bitstream described earlier and shown in <FIG>.

Block <NUM>, when the BIP flag is not signaled in the bitstream, the decoder derives a value of the BIP flag from the prediction related information. The two examples are described earlier at sections "BIP is disabled and corresponding flag is not signaled" and "BIP is used by default and corresponding flag is not signaled.

Block <NUM>, when the BIP flag is signaled in the bitstream, the decoder derives a probability model for decoding from the prediction related information. Then the decoder restores a value of the BIP flag using the probability model. The example is described earlier at section "BIP is signaled using CABAC contexts (or probability model).

Block <NUM>, the decoder reconstructs the picture based on the value of the BIP flag.

<FIG> is another exemplary flowchart <NUM> to decode (or parse or decompress) an coded bitstream, which is performed by the destination device <NUM> as shown in <FIG>, or the video decoder <NUM> as shown in <FIG>. Process <NUM> is an example for the decoder's processing.

Parsing of prediction-related information from the bitstream is performed by a coding_unit procedure at block <NUM>. It may comprise various symbols, but for intra predicted blocks, intra prediction mode should be parsed in the procedure <NUM>. In the embodiment it is proposed to conditionally parse the value of bip_flag after intra_luma_pred_mode is parsed at block <NUM>. Depending on intra prediction mode, shape and size of the block, the value of bip_flag is either assigned or parsed from the bitstream. Detailed information is disclosed above from <FIG>. The decoder determines whether BIP is enabled or not at block <NUM>. If the BIP is not enabled, the bip_flag is false at block <NUM>. If the BIP is enabled, the decoder determines whether BIP is applied by default at block <NUM>. When BIP is applied by default, the bip_flag is true at block <NUM>. When BIP is not applied by default, the decorder parses bip_flag at block <NUM>. When decoding bip_flag value, a context could be selected, based on intra prediction mode, shape and size of the block. Exemplary context selection is described earlier and shown in <FIG>. Exemplary determining whether BIP is enabled or not, and exemplary determining whether BIP is applied by default are described earlier and shown in <FIG>.

<FIG> is a schematic diagram of a network element <NUM>. The network element <NUM> is suitable for implementing the disclosed embodiments as described herein. The network element <NUM> may be the encoder or the decoder to perform the methods described above. The network element <NUM> comprises ingress ports <NUM> and receiver units (Rx) <NUM> for receiving data; a processor, logic unit, or central processing unit (CPU) <NUM> to process the data; transmitter units (Tx) <NUM> and egress ports <NUM> for transmitting the data; and a memory <NUM> for storing the data. The network element <NUM> may also comprise optical-to-electrical (OE) components and electrical-to-optical (EO) components coupled to the ingress ports <NUM>, the receiver units <NUM>, the transmitter units <NUM>, and the egress ports <NUM> for egress or ingress of optical or electrical signals.

The processor <NUM> is implemented by hardware and software. The processor <NUM> may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), field-programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), and digital signal processors (DSPs). The processor <NUM> is in communication with the ingress ports <NUM>, receiver units <NUM>, transmitter units <NUM>, egress ports <NUM>, and memory <NUM>. The processor <NUM> includes a coding module <NUM>. The coding module <NUM> implements the disclosed embodiments described above. For instance, the coding module <NUM> implements the methods of compressing/decompressing the last coding or prediction block. The inclusion of the coding module <NUM> therefore provides a substantial improvement to the functionality of the network element <NUM> and effects a transformation of the network element <NUM> to a different state. Alternatively, the coding module <NUM> is implemented as instructions stored in the memory <NUM> and executed by the processor <NUM>.

The memory <NUM> comprises one or more disks, tape drives, and solid-state drives and may be used as an over-flow data storage device, to store programs when such programs are selected for execution, and to store instructions and data that are read during program execution. The memory <NUM> may be volatile and/or non-volatile and may be read-only memory (ROM), random-access memory (RAM), ternary content-addressable memory (TCAM), and/or static random-access memory (SRAM).

The techniques disclosed herein can save overhead to determine that bidirectional intra prediction modes are not signaled and used by default, or determine that bidirectional intra prediction modes are not signaled and not used. Even for the bidirectional intra prediction modes are signaled based on different contexts, the techniques can increase the reliability of the BIP. The BIP mode may be a DWDIP mode. Correspondingly, the BIP flag may be a DWDIP flag.

The techniques may also be beneficial in the following aspects:.

While a particular feature or aspect of the disclosure may have been disclosed with respect to only one of several implementations or embodiments, such a feature or aspect may be combined with one or more further features or aspects of the other implementations or embodiments as may be desired or advantageous for any given or particular application. Furthermore, to the extent that the terms "include", "have", "with", or other variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprise". Also, the terms "exemplary", "for example" and "e.g." are merely meant as an example, rather than the best or optimal. The terms "coupled" and "connected", along with derivatives thereof may have been used. It should be understood that these terms may have been used to indicate that two elements cooperate or interact with each other regardless whether they are in direct physical or electrical contact, or they are not in direct contact with each other.

Although specific aspects have been illustrated and described herein, it will be appreciated that a variety of alternate and/or equivalent implementations may be substituted for the specific aspects shown and described without departing from the scope of the present disclosure.

Claim 1:
A method (<NUM>) of encoding a picture, the method comprising generating a bitstream for reconstructing the picture, wherein the method comprises:
generating (<NUM>) a list of candidate intra prediction modes for a current coding block of the picture, wherein the list of candidate intra prediction modes comprises at least one bidirectional intra prediction, BIP, mode;
determining (<NUM>) whether a BIP flag is to be signaled in the bitstream according to prediction related information, wherein the BIP flag indicates a BIP mode selected for the current coding block, and wherein the prediction related information comprises at least numbers and positions of available primary reference samples; and
when the BIP flag is to be signaled in the bitstream, deriving (<NUM>) a probability model for encoding from the prediction related information, coding (<NUM>) a value of the BIP flag to the bitstream using the probability model; and
when the BIP flag is not to be signaled in the bitstream, not coding (<NUM>) a value of the BIP flag to the bitstream,
wherein the determining whether the BIP flag is to be signaled according to numbers and positions of available primary reference samples comprises:
determining that the BIP is disabled and the BIP flag is not to be signaled in the bitstream when primary reference samples at a top side of the current coding block are not available, or
determining that the BIP is disabled and the BIP flag is not to be signaled in the bitstream when primary reference samples at left and right sides of the current coding block are not available.