Method and apparatus for deriving linear model and apparatus for decoding one or more images

By deriving linear model parameters based on linear equations and two sample pairs, the problem of high computational complexity in JEM is solved, which improves coding efficiency and reduces hardware resource requirements.

CN119316608APending Publication Date: 2025-01-14CANON KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411592190.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-12-07
Filing Date
2019-02-21
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The prior art has high computational complexity in chroma intra prediction, especially the joint exploration model (JEM) in the joint video exploration group (JVET) requires complex linear model parameter derivation, resulting in low encoding efficiency and computational complexity.

Method used

Linear-based equations are used to determine the linear model parameters, and only two sample pairs are used to derive linear model parameters, avoiding the use of the minimum average method, and simplifying the calculation process.

Benefits of technology

The calculation complexity of linear model parameter derivation is reduced, the encoding efficiency is improved, and the computing resource requirements of hardware implementation is reduced without affecting the encoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316608A_ABST
    Figure CN119316608A_ABST
Patent Text Reader

Abstract

The invention relates to a method and an apparatus for deriving a linear model and an apparatus for decoding one or more images. The invention also relates to cross-component prediction and to a method for deriving a linear model that obtains associated reconstructed first component samples of a first component block from second component samples of a second component block in the same frame, the method includes determining a parameter representing a linear equation of a straight line through two points based on reconstructed samples of both a first component and a second component, each point being defined by two variables of a first variable and a second variable, the first variable corresponding to a second component sample value, the second variable corresponding to the first component sample value; and deriving a linear model defined by the straight line parameters.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] (This application is a divisional application of an application filed on February 21, 2019, with application number 2019800148550, and invention name “New sample set and new downsampling method and device for linear component sample prediction”.) Technical Field

[0002] The present invention relates to encoding or decoding a block of a given video component, in particular intra-predicting such a component block or obtaining samples of such a block. The present invention is applicable to obtaining a block of a component of video data (usually a block of a chrominance component) from samples of another component (usually luminance samples). Background Art

[0003] Predictive coding of video data is based on segmenting frames into blocks of pixels. For each block of pixels, a prediction block is searched in the available data. The prediction block can be a block in a reference frame different from the current frame in INTER coding mode, or generated from neighboring pixels in the current frame in INTRA coding mode. Different coding modes are defined according to different ways of determining the prediction block. The result of the coding is a signaling of a prediction block and a residual block involving the difference between the block to be coded and the prediction block.

[0004] For INTRA coding mode, various modes are generally proposed, such as direct current (DC) mode, planar mode, and angular mode, etc. Each of these modes attempts to predict samples of a block using previously decoded boundary samples from spatially neighboring blocks.

[0005] The components of the pixels that form the video data can be encoded. Although the RGB (abbreviation for red-green-blue) representation is well known, the YUV representation is preferably used for encoding to reduce inter-channel redundancy. According to these encoding modes, a pixel block can be regarded as comprising multiple (usually three) component blocks. An RGB pixel block includes: an R component block, which contains the values ​​of the R components of the pixels of the block; a G component block, which contains the values ​​of the G components of these pixels; and a B component block, which contains the values ​​of the B components of these pixels. Similarly, a YUV pixel block includes a Y component block (luminance), a U component block (chrominance), and a V component block (also chrominance). Another example is YCbCr, where Cb and Cr are also called chrominance components. However, inter-component (also called cross-component) correlations can still be observed locally.

[0006] In order to improve compression efficiency, the use of cross-component prediction (CCP) has been studied in the prior art. The main application of CCP is luma-to-chroma prediction. This means that the luma samples have been encoded and reconstructed (as in the decoder) from the coded data, and the chroma is predicted from the luma. However, variants use CCP for chroma-to-chroma prediction, or more generally for first component to second component prediction (including RGB).

[0007] Cross-component prediction can be applied directly to the chroma pixel block, or can be applied to the residual chroma block (which means the difference between the chroma block and the chroma block predictor).

[0008] Linear Model (LM) mode uses a linear model for predicting chroma from luma as a chroma intra prediction mode, which depends on one or two parameters (slope (α) and offset (β)) to be determined. Thus, a linear model with these parameters can be used to derive chroma intra prediction results from the reconstructed luma samples of the current luma block.

[0009] The linearity (i.e., parameters α and β) is derived from the reconstructed causal samples, in particular from the set of neighboring chroma samples comprising reconstructed chroma samples neighboring the current chroma block to be predicted, and from the set of neighboring luma samples comprising luma samples neighboring the current luma block.

[0010] In particular, for an N×N chrominance block, the N neighbors in the upper row and the N neighbors in the left column are used to form a set of neighboring chrominance samples for derivation.

[0011] The adjacent luma sample set also consists of N adjacent samples directly above the corresponding luma block and N adjacent samples on the left side of the luma block.

[0012] It is known to reduce the size of video data to be encoded without significantly degrading visual rendering by subsampling chroma components. Known subsampling modes are labeled 4:1:1, 4:2:2, 4:2:0.

[0013] In the case of subsampling the video chroma data, the luma block corresponding to the N×N chroma block is larger than N×N. In this case, the set of adjacent luma samples is downsampled to match the chroma resolution. The chroma intra prediction results used to predict the chroma samples in the current N×N chroma block must be generated using a linear model with the derived one or more parameters α and β and the reconstructed luma samples of the current luma block that were previously downsampled to match the chroma resolution. The reconstructed luma samples are downsampled to the chroma resolution, which allows the same number of samples as chroma samples to be retrieved to form both the luma sample set and the chroma intra prediction results.

[0014] Thus, the chroma intra prediction result is subtracted from the current chroma block to obtain the residual chroma block encoded at the encoder. Conversely, at the decoder, the chroma intra prediction result is added to the received residual chroma block to retrieve the chroma block, which is also called reconstruction of the decoded block. This may also involve clipping for addition results that exceed the sample range.

[0015] Sometimes, the residual chroma block is negligible and is not considered during encoding. In this case, the above-mentioned chroma intra-frame prediction result is used as the chroma block itself. As a result, the above-mentioned LM mode makes it possible to use a linear model with one or more parameters to obtain samples of the current block of a given component from associated (i.e., co-located or corresponding) reconstructed samples of a block of another component in the same frame. The samples are obtained using a linear model with one or more derived parameters and associated reconstructed samples in the block of the other component. If necessary, the block of the other component consists of samples downsampled to match the block resolution of the current component. Although the blocks of the current component are usually chroma blocks and the blocks of the other component are luminance blocks, this may not be the case. For clarity and simplicity, the examples given here focus on predicting chroma blocks from luminance blocks, and it should be clear that the described mechanism can be applied to predict any component from another component.

[0016] The Joint Exploration Model (JEM) of the Joint Video Exploration Team (JVET) adds six cross-component (luminance to chrominance) linear model modes to the known traditional intra prediction modes. All these modes compete with each other to predict or generate chrominance blocks, and the selection is usually made based on the rate-distortion criteria at the encoder end.

[0017] The six cross-component (luminance to chrominance) linear model modes differ from each other in terms of: different downsampling schemes used to downsample the reconstructed luminance samples, and / or different sample sets of samples from which the parameters α and β are derived.

[0018] For example, a sample set may consist of samples of two lines (i.e., rows and columns) adjacent to the current luminance or chrominance block, which are parallel and immediately adjacent to each of the upper and / or left boundaries of the current luminance or chrominance block at the chrominance resolution. Such an exemplary sample set is described in the publication US 9,736,487.

[0019] Other exemplary sample sets are also disclosed in publications US 9,288,500 and US 9,462,273.

[0020] The downsampling scheme used in JEM includes: a 6-tap filter for determining the downsampled reconstructed luminance samples from six reconstructed luminance samples; three 2-tap filters for selecting the upper right sample and the lower right sample, or the lower sample and the lower right sample, or the upper sample and the upper right sample from the six reconstructed luminance samples; and a 4-tap filter for selecting the upper sample, the upper right sample, the lower sample, and the lower right sample from the six reconstructed luminance samples. Summary of the invention

[0021] JEM is complex to process. For example, JEM requires complex derivation of linear model parameters to compute chroma predictor block samples.

[0022] The present invention has been designed to address one or more of the aforementioned problems.The present invention relates to an improved method for obtaining chroma samples of a current chroma block, possibly by chroma intra prediction.

[0023] According to a first aspect of the present invention, a method according to the first aspect is provided.

[0024] According to another aspect of the present invention, there is provided a device for deriving a linear model according to the second aspect.

[0025] According to another aspect of the present invention, there is provided an apparatus for obtaining associated reconstructed first component samples of a first component block from second component samples of a second component block in the same frame according to the third aspect.

[0026] According to another aspect of the present invention, there is provided a computer program product, a computer readable medium or a computer program according to the fourth aspect.

[0027] Further aspects of the invention are provided in other aspects.

[0028] According to another aspect, a method for deriving a linear model is provided, wherein the linear model is used to derive associated reconstructed first component sample values ​​from second component sample values, the method comprising: taking two sets from two or more sets, each set comprising first component sample values ​​and second component sample values ​​of reconstructed sample values ​​from the first component and the second component; and deriving the linear model based on the rate of change of the first component sample values ​​and the second component sample values ​​between the two sets, so that the first component sample values ​​of the two sets can be obtained from the second component sample values ​​of the corresponding sets using the derived linear model.

[0029] It should be understood that the first component sample values ​​and the associated reconstructed second component sample values ​​are associated with each other through a preset relationship.

[0030] Suitably, the preset relationship is that the two are co-located or correspond to each other. The co-located relationship or correspondence relationship can be defined for each sample value individually, or between a block / group of first component sample values ​​and a block / group of second component sample values.

[0031] Suitably, the preset relationship is that the two are associated with at least one pixel in the current pixel block to be processed, for example, the two are co-located or corresponding sample values ​​of at least one pixel to be processed. The co-location relationship or corresponding relationship can be defined for each sample value individually, or between a block / group of sample values ​​and a block / group of pixels.

[0032] It should also be understood that downsampling or upsampling processing can be applied to blocks of first component sample values ​​or second component sample values ​​so that a preset relationship between blocks or with at least one pixel of the current pixel block can be established after downsampling / upsampling.

[0033] Suitably, the first component sample value and the associated second component sample value are associated with a pixel block of the same image or frame to be processed. It should be understood that, here, the set comprising the first component sample value and the second component sample value is a component sample value set of the first component sample value and the second component sample value. Therefore, the set is an n-tuple having the first component sample value and the second component sample value as its elements. Suitably, the set is a 2-tuple. Alternatively, the set is an n-tuple having more than two elements (n elements).

[0034] Suitably, the reconstructed sample values ​​of the first component and the second component are associated with one or more blocks adjacent to the current block to be processed. Suitably, the one or more blocks adjacent to the current block are above or to the left of the current block.

[0035] Suitably, the two sets taken are sets including the minimum second component sample value and the maximum second component sample value among the second component sample values ​​in the two or more sets. Suitably, the two sets taken are sets including the minimum first component sample value and the maximum first component sample value among the first component sample values ​​in the two or more sets.

[0036] Suitably, taking two sets comprises: determining a first set comprising a minimum second component sample value and a maximum second component sample value among the second component sample values ​​within two or more sets; determining a second set comprising a minimum first component sample value and a maximum first component sample value among the first component sample values ​​within two or more sets; and selecting two sets from the first set and the second set.

[0037] Suitably, selecting two sets from the first and second sets comprises: selecting the first set if the difference between the minimum second component sample value and the maximum second component sample value is greater than the difference between the minimum first component sample value and the maximum first component sample value; otherwise, selecting the second set.

[0038] Suitably, selecting the two sets from the set of the first group and the second group comprises: determining positions of sample values ​​of the sets of the first group and the second group; and selecting the two sets based on the determined positions of the sample values. Suitably, the positions of the sample values ​​are determined for the reconstructed second component sample values ​​in relation to a block of reconstructed second component sample values ​​associated with the block of first component sample values ​​to be processed. Suitably, the positions of the sample values ​​are determined for the reconstructed first component sample values ​​in relation to the block of reconstructed first component sample values ​​to be processed. Suitably, the positions of the sample values ​​are determined based on associated / co-located / corresponding positions defined in relation to the block of pixels to be processed.

[0039] Suitably, selecting two sets based on the determined positions of the sample values ​​comprises: selecting a set including sample values ​​at a predetermined position adjacent to the block to be processed. Suitably, selecting two sets based on the determined positions of the sample values ​​comprises: determining whether any of the sets of the first group and the second group include sample values ​​at the predetermined position; and selecting the set including the sample value at the predetermined position as one of the two sets. Suitably, selecting two sets based on the determined positions of the sample values ​​comprises: determining whether any of the sets of the first group and the second group include sample values ​​at another predetermined position if the set including the sample value at the predetermined position is not available; and selecting the set including the sample value at the another predetermined position as one of the two sets. Suitably, the predetermined position or the another predetermined position is a lower left or upper right position among the positions adjacent to the current block to be processed.

[0040] Suitably, selecting two sets from the first group and the second group of sets comprises comparing distances between the two sets from the first group and the second group of sets, wherein the distances are defined in a space of first component sample values ​​and second component sample values, the space being defined by elements of the sets such that each of the two or more sets corresponds to a position in the space.

[0041] Suitably, selecting the two sets comprises: determining whether the distance between the sets of the first group is greater than the distance between the sets of the second group; and if the distance between the sets of the first group is greater than the distance between the sets of the second group, selecting the first group, otherwise selecting the second group. Suitably, selecting the two sets comprises: selecting two sets with the largest distance between the sets of the first group and the second group.

[0042] Suitably, selecting the two sets comprises: determining whether corresponding elements of the sets of the first set have the same or different values; and selecting the first set if the corresponding elements do not have the same value or have different values, and selecting the second set if the corresponding elements have the same value or do not have different values. Suitably, the corresponding elements of the sets are either or both of the first component sample value and the second component sample value.

[0043] Suitably, selecting the two sets comprises: determining whether corresponding elements of the sets of the second set have the same value or different values; and selecting the second set if the corresponding elements do not have the same value or have different values, and selecting the first set if the corresponding elements have the same value or do not have different values.

[0044] Suitably, selecting two sets includes: obtaining a change rate of the first component sample value and the second component sample value between sets of the first group; determining whether the obtained ratio is greater than, equal to, or less than a preset value; and in the case where the obtained ratio is greater than, equal to, or less than the preset value, selecting the first group, otherwise selecting the second group. Suitably, selecting two sets includes: obtaining a change rate of the first component sample value and the second component sample value between sets of the second group; determining whether the obtained ratio is greater than, equal to, or less than a preset value; and in the case where the obtained ratio is greater than, equal to, or less than the preset value, selecting the second group, otherwise selecting the first group.

[0045] Suitably, the two sets taken are sets comprising second component sample values ​​from one or more blocks adjacent to a block of second component sample values ​​associated with the current block to be processed, and taking the two sets comprises: selecting the two sets based on the second component sample values ​​of the two sets. Suitably, the two sets taken are sets of two most frequently occurring second component sample values ​​among the reconstructed sample values ​​of the blocks comprising the corresponding second component sample values.

[0046] Suitably, the reconstructed sample values ​​of the second component are divided into at least two groups, and for each group, two sets are taken and a linear model is derived based on the two sets taken. Suitably, if the rate of change of the first component sample values ​​and the second component sample values ​​between the two sets taken for a group is less than or equal to a preset value, the linear model of the group is derived based on the two sets taken for another group. Suitably, if the rate of change of the first component sample values ​​and the second component sample values ​​between the two sets taken for a group is less than or equal to a preset value, the linear model for the group is derived based on the two sets that have been taken when all the reconstructed sample values ​​of the second component are in a single group.

[0047] According to yet another aspect, a method for encoding one or more images into a bitstream or decoding one or more images from a bitstream is provided, the method comprising: deriving a linear model according to the method of the first aspect of the invention, the linear model being used to obtain associated reconstructed first component sample values ​​from second component sample values.

[0048] Suitably, the method further comprises: selecting one of a plurality of linear model derivation modes to obtain a first component sample value of a current block of an image to be processed, wherein the plurality of linear model derivation modes comprise a first mode using a single linear model and a second mode using more than one linear model, and the derived linear model can be used in the selected linear model derivation mode. Suitably, only the first mode uses the derived linear model. Alternatively, only the second mode uses the derived linear model.

[0049] According to yet another aspect, there is provided an apparatus for deriving a linear model for obtaining associated reconstructed first component sample values ​​from second component sample values, the apparatus being configured to perform the method of the first aspect of the present invention.

[0050] According to a further aspect, there is provided an apparatus for encoding one or more images into a bitstream or decoding one or more images from a bitstream, the apparatus being configured to perform the method of the second aspect of the present invention.

[0051] According to yet another aspect, there is provided a method for obtaining associated reconstructed first component sample values ​​from second component sample values, the method comprising: selecting a linear model mode from a plurality of linear model modes to obtain first component sample values; and using the selected linear model mode to obtain the first component sample values, wherein at least one of the plurality of linear model modes uses a linear model derived using the derivation method according to the first aspect of the present invention. Suitably, the plurality of linear model modes include a first mode using a single linear model and a second mode using more than one linear model. Suitably, only the first mode uses the derivation method according to the first aspect of the present invention. Alternatively, only the second mode uses the derivation method according to the first aspect of the present invention.

[0052] According to yet another aspect, there is provided an apparatus for obtaining associated reconstructed first component sample values ​​from second component sample values, the apparatus being configured to perform the method of the fifth aspect of the present invention.

[0053] According to a further aspect, a method for encoding one or more images into a bitstream is provided, wherein the method comprises: obtaining associated reconstructed first component sample values ​​from second component sample values ​​according to the fifth aspect of the invention. Suitably, the method further comprises: providing in the bitstream information representing a selection of a linear model mode that can be used to obtain the first component samples.

[0054] According to a further aspect, a method for decoding one or more images from a bitstream is provided, wherein the method comprises: obtaining associated reconstructed first component sample values ​​from second component sample values ​​according to the fifth aspect of the invention. Suitably, the method further comprises: obtaining from the bitstream information representing a selection of a linear model mode that can be used to obtain the first component sample, and selecting a linear model mode from a plurality of linear model modes is performed based on the obtained information.

[0055] According to a further aspect, there is provided an apparatus for encoding one or more images into a bitstream, the apparatus being configured to perform the method described herein.

[0056] According to a further aspect, there is provided a computer program which, when executed, causes the performance of the method described herein, and a (non-transitory) computer-readable medium storing instructions for implementing the method described herein.

[0057] According to the present invention, there are provided devices, methods, computer programs (products) and computer readable storage media as described in the attached claims. Other features of the embodiments of the present invention are defined in the attached claims and the following description. Some of these features are described below with reference to the method, and these features can be transposed into system features specific to the device.

[0058] At least a portion of the method according to the present invention can be implemented by a computer. Therefore, the present invention can take the following forms: a completely hardware embodiment; a completely software embodiment (including firmware, resident software, microcode, etc.); or an embodiment combining software and hardware aspects that can generally be referred to as "processor and memory", "circuit", "module" or "system" here. In addition, the present invention can take the form of a computer program product embodied in any tangible medium with a representation of a computer-usable program code embedded in the medium.

[0059] Since the present invention can be implemented in software, the present invention can be embodied as computer readable code to be provided to any suitable carrier medium of a programmable device. Tangible carrier media may include storage media such as hard disk drives, magnetic tape devices, or solid-state memory devices. Transient carrier media may include signals such as electrical signals, electronic signals, optical signals, acoustic signals, magnetic signals, or electromagnetic signals such as microwave or RF signals. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Embodiments of the present invention will now be described, by way of example only, and with reference to the following drawings, in which:

[0061] Figure 1 shows the video encoder logical architecture;

[0062] Figure 2 Shown with Figure 1 The video decoder logical architecture corresponds to the video encoder logical architecture shown;

[0063] Figure 3 Schematically illustrating an example of a YUV sampling scheme for 4:2:0 sampling;

[0064] Figure 4 Using a flow chart to illustrate the general steps performed by an encoder or decoder for generating a block prediction result using LM mode;

[0065] Figure 5 schematically illustrates a chroma block and an associated or co-located luma block, as is known in the prior art, wherein luma samples as well as adjacent chroma samples and luma samples are downsampled;

[0066] Figure 6 schematically illustrates an exemplary sample set for LM parameter derivation as known in the prior art;

[0067] Figure 7 Some downsampling filters known in the prior art are shown;

[0068] Figure 8 An exemplary encoding of a signaling flag for indicating LM mode is shown;

[0069] Fig. 9 Points showing luma and chroma neighboring samples, and straight lines representing linear model parameters obtained in one embodiment of the present invention;

[0070] Fig.10 Shows the main steps of the process of simplifying LM derivation in one embodiment of the present invention;

[0071] Fig.11 Several points of luma and chroma neighboring samples and line segments for determining the best two points are shown in some embodiments of the present invention;

[0072] Fig.12 shows the main steps of the process of MMLM derivation in one embodiment of the present invention; and

[0073] Fig.13 is a schematic block diagram of a computing device for implementing one or more embodiments of the present invention. DETAILED DESCRIPTION

[0074] Figure 1104. The video encoder architecture is shown. In the video encoder, the original sequence 101 is split into pixel blocks 102, which are called coding blocks or coding units in HEVC. The coding mode is then affected to each block. Video coding generally uses two families of coding modes: coding modes based on spatial prediction or "INTRA modes" 103, and coding modes based on temporal prediction or "INTER modes" based on motion estimation 104 and motion compensation 105.

[0075] INTRA coding blocks are usually predicted from the coding pixels at their causal boundaries by a process called INTRA prediction. The prediction results for each pixel of the INTRA coding block thus form a prediction result block. Depending on which pixels are used to predict the INTRA coding block, various INTRA modes are proposed: for example, DC mode, planar mode and angular mode.

[0076] although Figure 1 Referring to the general description of the video encoder architecture, it should be noted that a pixel here corresponds to an element of an image, which element typically comprises multiple components (eg, a red component, a green component, and a blue component). An image sample is an element of an image that contains only one component.

[0077] Temporal prediction first involves finding a reference area closest to the coded block in a previous or future frame called a reference frame 116 in a motion estimation step 104. This reference area constitutes a predictor block. This predictor block is then used to predict the coded block in a motion compensation step 105 to calculate a residue or residual block.

[0078] In both the spatial and temporal prediction cases, the residual or residual block is calculated by subtracting the obtained prediction block from the coded block.

[0079] In INTRA prediction, the prediction mode is encoded.

[0080] In temporal prediction, the index representing the reference frame used and the motion vector representing the reference area in the reference frame are encoded. However, in order to further reduce the bit rate cost associated with motion vector encoding, the motion vector is not encoded directly. In fact, assuming that the motion is uniform, it is particularly advantageous to encode the motion vector as the difference between the motion vector and the motion vectors (or motion vector prediction results) around it. For example, in the H.264 / AVC coding standard, the motion vector is encoded for the median vector calculated based on the motion vectors associated with the three blocks located above and to the left of the current block. Only the difference calculated between the median vector and the current block motion vector (also called the residual motion vector) is encoded in the bit stream. This is processed in the module "Mv prediction and encoding" 117. The values ​​of each coded vector are stored in the motion vector field 118. The neighboring motion vectors used for prediction are extracted from the motion vector field 118.

[0081] The HEVC standard uses three different INTER modes: inter mode, merge mode and merge skip mode, which mainly differ in the signaling of motion information in the bitstream 110 (i.e., motion vectors and associated reference frames via so-called reference frame indices). For simplicity, motion vectors and motion information are mixed below. Regarding motion vector prediction, HEVC provides multiple candidates for motion vector predictors evaluated during rate-distortion competition to find the best motion vector predictor or the best motion information for inter mode and merge mode, respectively. The index corresponding to the best candidate for the best predictor or motion information is inserted in the bitstream 110. Due to this signaling, the decoder can derive the same set of predictors or candidates and use the best set according to the decoded index.

[0082] The design of the derivation of motion vector predictors and candidates helps achieve optimal coding efficiency without significantly affecting complexity. Two motion vector derivations are proposed in HEVC: one motion vector derivation for inter mode (known as Advanced Motion Vector Prediction (AMVP)) and another motion vector derivation for merge mode (known as merge derivation process).

[0083] Next, a coding mode is selected in module 106 for optimizing the rate-distortion criterion for the coding block currently considered. In order to further reduce redundancy within the obtained residual data, a transformation, typically DCT, is applied to the residual block in module 107 and a quantization is applied to the obtained coefficients in module 108. The quantized block of coefficients is then entropy coded in module 109 and the result is inserted into the bitstream 110.

[0084] Then, in modules 111 to 116, the encoder decodes each coded block of the frame for future motion estimation. These steps enable the encoder and decoder to have the same reference frame 116. To reconstruct the coded frame, each quantized and transformed residual block is inversely quantized in module 111 and inversely transformed in module 112 to provide a corresponding "reconstructed" residual block in the pixel domain. Due to the quantization losses, this "reconstructed" residual block is different from the original residual block obtained in step 106.

[0085] Next, depending on the coding mode selected at 106 (INTER or INTRA), this "reconstructed" residual block is added to the INTER predictor block 114 or the INTRA predictor block 113 to obtain a "pre-reconstructed" block (coded block).

[0086] Next, in module 115, the "pre-reconstructed" block is filtered by one or more post-filters to obtain a "reconstructed" block (encoded block). The same post-filter is integrated at the encoder (in the decoding loop) and at the decoder to be used in the same way, so that exactly the same reference frame is obtained at the encoder and decoder. The purpose of this post-filtering is to remove compression artifacts.

[0087] Figure 2 Shown with Figure 1 The video encoder architecture shown corresponds to the video decoder architecture.

[0088] First, the video stream 201 is entropy decoded in module 202. Then, each obtained residual block (encoded block) is inversely quantized in module 203 and inversely transformed in module 204 to obtain a "reconstructed" residual block. This is similar to the start of a decoding loop at the encoder end.

[0089] Next, the prediction result block is constructed according to the decoding mode indicated in the bit stream 201 (INTRA type decoding or INTER type decoding).

[0090] In case of INTRA mode, the INTRA predictor block is determined 205 based on the INTRA prediction mode specified in the bitstream 201 .

[0091] In case of INTER mode, motion information is extracted from the bitstream during entropy decoding 202. The motion information includes reference frame indices and motion vector residuals, for example in the form of HEVC and JVET.

[0092] The motion vector predictor is obtained in the same way as it is done by the encoder (from neighboring blocks) using the calculated motion vectors stored in the motion vector field data 211. Thus, the motion vector predictor is added 210 to the extracted motion vector residual block to obtain a motion vector. This motion vector is added to the motion vector field data 211 for use in predicting the next decoded motion vector.

[0093] The motion vector is also used to locate the reference area in the reference frame 206 which is the INTER predictor block.

[0094] Next, the "reconstructed" residual block obtained at 204 is added to the INTER predictor block 206 or the INTRA predictor block 205, thereby obtaining a "pre-reconstructed" block (encoded block) in the same way as the decoding loop of the encoder.

[0095] This "pre-reconstructed" block is then post-filtered in module 207 as is done at the encoder end (the signaling of the post-filtering to be used may be retrieved from the bitstream 201).

[0096] A "reconstructed" block (encoded block) is thus obtained, which forms the decompressed video 209 as output of the decoder.

[0097] The encoding / decoding process described above can be applied to monochrome frames. However, the most common frames are color frames, which are usually composed of three arrays of color samples, each array corresponding to a "color component" (e.g., R (red), G (green), and B (blue)). A pixel of the image includes three co-located / corresponding samples, where each co-located / corresponding sample is for each component.

[0098] There is usually a high correlation between the R, G, B components. Therefore, in image and video compression, it is common to decorrelate the color components by converting the frames in another color space before processing them. The most common format is YUV (YCbCr), where Y is the luma (or luminance) component, and U (Cb) and V (Cr) are the chroma (or chrominance) components.

[0099] In order to reduce the amount of data to be processed, some color components of a color frame may be subsampled, such that there are different sampling ratios for the three color components. The subsampling scheme is usually expressed as a three-part ratio J:a:b describing the number of luma samples and chroma samples in a conceptual 2-pixel high region. "J" defines the horizontal sampling reference (i.e., the width in pixels) of the conceptual region, which is usually 4. "a" defines the number of chroma samples (Cr, Cb) in the first row of J pixels, while "b" defines the number of (additional) chroma samples (Cr, Cb) in the second row of J pixels.

[0100] With these subsampling schemes, the number of chroma samples is reduced compared to the number of luma samples.

[0101] The 4:4:4 YUV or RGB format does not provide subsampling and corresponds to non-subsampled frames with the same size W×H for luma and chroma frames.

[0102] A 4:0:0 YUV or RGB format has only one color component and therefore corresponds to a monochrome frame.

[0103] An exemplary sampling format is as follows.

[0104] The 4:2:0 YUV format has half as many chroma samples as luma samples in the first row, and no chroma samples in the second row. Thus, the two chroma frames are W / 2 pixels wide and H / 2 pixels high, where the luma frame is W×H.

[0105] The 4:2:2 YUV format has half as many chroma samples as luma samples in the first row, and half as many chroma samples as luma samples in the second row. Thus, the two chroma frames are W / 2 pixels wide and H pixels high, where the luma frame is W×H.

[0106] The 4:1:1 YUV format has 75% fewer chroma samples than luma samples in the first row, and 75% fewer chroma samples than luma samples in the second row. Thus, the two chroma frames are W / 4 pixels wide and H pixels high, where the luma frame is W×H.

[0107] When subsampled, the positions of the chroma samples in the frame are offset compared to the luma sample positions.

[0108] Figure 3 An exemplary positioning of chroma samples (triangles) relative to luma samples (circles) for a 4:2:0 YUV frame is shown.

[0109] Figure 1 The encoding process can be applied to each color component frame of the input frame.

[0110] Due to the correlation between color components (correlation between RGB or residual correlation between YUV despite RGB to YUV conversion), cross-component prediction (CCP) methods were developed to exploit these (residual) correlations and thus improve coding efficiency.

[0111] The CCP method can be applied at different stages of the encoding or decoding process, in particular at the first prediction stage (to predict the current color component) or at the second prediction stage (to predict the current residual block of the component).

[0112] A known CCP method is the LM mode, which is also called CCLM (Cross Component Linear Model Prediction). The LM mode is used to predict both chrominance components Cb and Cr (or U and V) from luma Y (more specifically, from reconstructed luma (at the encoder or decoder end). One prediction result is generated for each component. The method works at the (chrominance and luma) block level (e.g., at the CTU (Coding Tree Unit), CU (Coding Unit) level, PU (Prediction Unit) level, sub-PU or TU (Transform Unit) level).

[0113] Figure 4 The general steps performed by an encoder (used as reference below) or a decoder for generating a block predictor using the LM mode are shown using a flow chart as an example.

[0114] In the following description, an exemplary first component is chrominance, and an exemplary second component is luminance.

[0115] Consider the current chrominance block 502 to be encoded or decoded in the same frame ( Figure 5 A) and its associated or corresponding (i.e., "co-located") luma block 505 (i.e., for example, the same CU), the encoder (or decoder) receives in step 401 a set of adjacent luma samples RecL including luma samples 503 adjacent to the current luma block, and receives a set of adjacent chroma samples RecC (denoted as 402) including chroma samples 501 adjacent to the current chroma block. It should be noted that for some chroma sampling formats and chroma phases, such as Figure 5 As shown in A, luma samples 504 and 503 are not directly adjacent to luma block 505. For example, in Figure 5 In A, to obtain the left row RecL'(503), only the second left row is needed, not the immediate left row. Similarly, for the upper line 504, Figure 5 As shown in A, the second upper line is also considered for downsampling of luma samples.

[0116] When a chroma sampling format (e.g., 4:2:0, 4:2:2, etc.) is used, the set of adjacent luma samples is downsampled to RecL' 404 in step 403 to match the chroma resolution (i.e., the sample resolution of the corresponding chroma frame / block). Thus, RecL' includes the reconstructed luma samples 504 adjacent to the current luma block after downsampling. Due to the downsampling, RecL' and RecC include the same number of 2N samples (the chroma block 502 is N×N). However, in the prior art, where fewer samples are needed to obtain RecL', there is a specific downsampling of the luma boundaries. In addition, even if RecL and RecC have the same resolution, RecL' can be regarded as a denoised version of RecL by using a low-pass convolution filter.

[0117] exist Figure 5 In the example of A, the adjacent luminance and chrominance sample sets are respectively composed of the downsampled upper and left adjacent luminance samples and the upper and left adjacent chrominance samples. More precisely, these two sample sets are each composed of the first line of the immediately left boundary and the first line of the immediately upper boundary of the corresponding luminance or chrominance block. Due to the downsampling ( Figure 5 A), a single line of adjacent luma samples RecL' is obtained from two lines of non-downsampled reconstructed luma samples RecL (left or above).

[0118] US 9,565,428 suggests using subsampling that selects a single sample only for the upper line (i.e., the upper border of the adjacent luma block) and not for the luma block itself (as described below with reference to step 408). Figure 6 The proposed subsampling is shown in A. The motivation for this approach is to reduce the line buffering of the upper lines.

[0119] A linear model defined by one or two parameters (slope α and offset β) is derived from RecL′ (if present, otherwise RecL) and RecC. This is step 405 to obtain parameters 406.

[0120] The LM parameters α and β are obtained by the least mean square based method using the following equations:

[0121]

[0122] Where: M is a value that depends on the size of the block being considered. Figure 5 In the general case of square blocks as shown in A and 5B, M = 2N. However, the LM-based CCP can be applied to any block shape, where M is, for example, the sum of block height H + block width W (for rectangular block shapes).

[0123] It should be noted that the value of M used as a weight in the equation can be adjusted to avoid overflow of the calculations at the encoder and decoder. Specifically, when using algorithms with 32-bit or 64-bit signed architectures, some of these calculations may sometimes overflow, resulting in unspecified behavior (which is strictly prohibited in any cross-platform standard). To cope with this situation, the maximum possible magnitude given input RecL' and RecC values ​​can be evaluated, and M (and in turn the above sum can be scaled) can be scaled accordingly to ensure that overflow does not occur.

[0124] The derivation of parameters is usually done by Figure 5 The sample set shown in A consists of RecL' and RecC.

[0125] A variation of the sample set is proposed.

[0126] For example, US 9,288,500 proposes three competing sample sets, which include a first sample set consisting of outer lines adjacent to the upper boundary and outer lines adjacent to the left boundary, a second sample set consisting only of outer lines adjacent to the upper boundary, and a third sample set consisting only of outer lines adjacent to the left boundary. Figure 6 In B it is shown only for chrominance blocks (and therefore can be transposed to luma blocks).

[0127] US 9,462,273 extends the second and third sample sets to include additional samples that extend the outer line (usually doubling the length of the outer line). Figure 6 C is only shown for chrominance blocks. The document also provides reducing the number of available LM modes to reduce the signaling cost for indicating the LM mode used in the bitstream. The reduction can be context-dependent, for example based on the intra mode selected for the associated luminance block.

[0128] US 9,736,487 proposes three competing sample sets similar to the sample set of US 9,288,500, but each time consisting of outer adjacent samples of two lines that are parallel and immediately adjacent to the boundary under consideration. These sample sets are Figure 6 Only the chrominance blocks are shown in D.

[0129] Furthermore, US 9,153,040 and documents of the same patent family propose additional sample sets consisting of a single line for each boundary, wherein the sample for each line is smaller than the previous set.

[0130] Back to Figure 4 , using a linear model with the derived one or more parameters 406, the chroma intra prediction result 413 of the chroma block 502 can be obtained from the reconstructed luma samples 407 of the current luma block represented in 505. Again, if a chroma sampling format (e.g., 4:2:0, 4:2:2, etc.) is used, the reconstructed luma samples are downsampled to L' 409 in step 408 to match the chroma resolution (i.e., the sample resolution of the corresponding chroma frame / block).

[0131] The same downsampling as in step 403 may be used, or another downsampling may be used for line buffering reasons. For example, a 6-tap filter may be used to provide the downsampled value as a weighted sum of the upper left sample, upper sample, upper right sample, lower left sample, lower sample, and lower right sample surrounding the downsampled position. When some surrounding samples are missing, only a 2-tap filter is used instead of a 6-tap filter.

[0132] By applying to the reconstructed luma samples L, the output L' of the exemplary 6-tap filter is obtained as follows:

[0133] L'[i,j]=(2×L[2i,2j]+2×L[2i,2j+1]+L[2i-1,2j]+L[2i+1,2j]

[0134] +L[2i-1,2j+1]+L[2i+1,2j+1]+4)>>3

[0135] Where: (i,j) are the coordinates of the sample within the downsampled block, and >> is a bitwise right shift operation.

[0136] In addition, as described in US2017 / 0244975, adaptive luma downsampling can be used. Only the content of the luma block is used to determine which downsampling filter to use for each reconstructed luma sample of the luma block. A 1-tap filter can be used. The motivation for this method is to avoid the propagation of edges in the downsampled luma block.

[0137] Due to the downsampling step 408, the L' and C blocks (the set of chroma samples in the chroma block 502) include the same number of N 2 samples (chrominance block 502 is N×N).

[0138] Next, the loop 410-411-412 is used to calculate each sample of the chroma intra prediction result PredC413 according to the following formula:

[0139] PredC[i,j]=α.L′[i,j]+β

[0140] Where: (i,j) are the coordinates of all samples within the chrominance and luma blocks.

[0141] In order to avoid division and multiplication, a less complex method can be used to implement the calculation based on a lookup table and a shift operation. For example, the actual chroma intra prediction result derivation 411 can be performed as follows:

[0142] PredC[i,j]=(AL′[i,j])>>S+β

[0143] Where: S is an integer and A is derived from A1 and A2 (introduced above in the calculation of α and β) using the lookup table described earlier. It actually corresponds to the rescaled value of α. The operation (x>>S) corresponds to a bitwise right shift operation, which is equivalent to integer dividing x (with truncation) by 2 S .

[0144] When all samples of the downsampled luma block are parsed (412), the chroma intra prediction result 413 can be used to subtract from the chroma block 502 at the encoder end (to obtain a chroma residual block), or to be added to the chroma residual block at the decoder end (to obtain a reconstructed chroma block).

[0145] Note that the chroma residual block may be unimportant and thus discarded, wherein in this case the obtained chroma intra prediction result 413 directly corresponds to the predicted chroma samples (forming the chroma block 502).

[0146] The two standardization groups that define the HEVC standard, ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC29 / WG 11), are working together to study future video coding technologies, the successor to HEVC, known as the Joint Video Exploration Group (JVET). The Joint Exploration Model (JEM) contains HEVC tools and new additions selected by the JVET group. In particular, as described in document JVET-G1001, this reference software contains some CCP tools.

[0147] In JEM, a total of 11 intra modes are allowed for chroma coding. These modes include five traditional intra modes and six cross-component LM modes (represented in the bitstream 101, 201) for predicting Cb from Y, and one cross-component LM mode for predicting Cr from Cb.

[0148] One of the six Y to Cb CC LM modes is the CCLM described above, where Figure 5 As shown in A, adjacent luminance and chrominance sample sets RecL' and RecC are each composed of the first line adjacent to the left boundary and the first line adjacent to the top boundary of the respective luminance or chrominance block.

[0149] The five other Y to Cb CC LM modes are based on a special derivation called the Multiple Model (MM). These modes are labeled MMLM.

[0150] Compared with CCLM, the MMLM mode uses two linear models. The adjacent reconstructed luminance samples from the RecL' set and the adjacent chrominance samples from the RecC set are classified into two groups, each of which is used to derive the parameters α and β of a linear model, thereby obtaining two sets of linear model parameters (α1, β1) and (α2, β2).

[0151] For example, the threshold may be calculated as the average of the adjacent reconstructed luma samples that form RecL'. Next, adjacent luma samples with RecL'[i,j]≤threshold are classified into group 1; and adjacent luma samples with RecL'[i,j]>threshold are classified into group 2.

[0152] Next, the chroma intra prediction result (or the predicted chroma sample of the current chroma block 602) is obtained according to the following formula:

[0153] PredC[i,j]=α1.L′[i,j]+β1,L′[i,j]≤threshold

[0154] PredC[i,j]=α2.L′[i,j]+β2,L′[i,j]>threshold.

[0155] In addition, compared to CCLM, the MMLM mode uses sets of neighboring luminance and chrominance samples RecL' and RecC, each consisting of two lines of outer neighboring samples that are parallel and immediately adjacent to the left and top boundaries of the considered block. Figure 5 An example illustrating a 4:2:0 sampling format is shown in B, for which two lines of adjacent luma samples are obtained from four lines of non-downsampled reconstructed luma samples (using downsampling).

[0156] The five MMLM modes differ from each other in terms of five different downsampling filters used to downsample the reconstructed luma samples to match the chroma resolution (to obtain RecL' and / or L').

[0157] The first MMLM mode relies on the same 6-tap filter as used in CCLM (see Figure 7 ). The second to fourth MMLM modes rely on 2-tap filters, which respectively provide downsampled values ​​as the weighted sum of:

[0158] - The upper and lower right samples of the six samples (used by the 6-tap filter) around the downsampled position (see Filter 1, Figure 7 702):

[0159] L′[i,j]=(L[2i+1,2j]+L[2i+1,2j+1]+1)>>1 (the same applies to RecL),

[0160] - The lower and lower right samples of the six samples around the downsampled position (used by the 6-tap filter) (see Filter 2, Figure 7 703):

[0161] L′[i,j]=(L[2i,2j+1]+L[2i+1,2j+1]+1)>>1, and

[0162] - the upper and upper right samples of the six samples (used by the 6-tap filter) around the downsampled position (see filter 4, Figure 7 705):

[0163] L′[i,j]=(L[2i,2j]+L[2i+1,2j]+1)>>1.

[0164] The fifth MMLM mode relies on a 4-tap filter that provides the downsampled value as a weighted sum of the upper, upper right, lower and lower right samples of the six samples surrounding the downsampled position (used by the 6-tap filter) (see Filter 3, Figure 7 704):

[0165] L'[i,j]=(L[2i,2j]+L[2i,2j+1]+L[2i+1,2j]+L[2i+1,2j+1]+2)>>2.

[0166] As mentioned above, CCLM or MMLM mode must be represented in the bitstream 110 or 201. Figure 8 Exemplary LM mode signaling for JEM is shown. A first binary flag indicates whether the current block is predicted using LM mode or other intra-frame modes (including the so-called DM mode). In the case of LM mode, six possible LM modes need to be represented. The first MMLM mode (using a 6-tap filter) is represented by setting a second binary flag to 1. The second binary flag is set to 0 for the remaining modes, wherein in this case the third binary flag is set to 1 to represent CCLM mode and is set to 0 for the remaining MMLM modes. Then, two additional binary flags are used to represent one of the remaining four MMLM modes.

[0167] One mode is represented for each chrominance component.

[0168] The Cb to Cr CCLM mode introduced above is used in the DM mode and applied to the residual level. In fact, the DM mode uses the intra-frame mode used for luminance in a predetermined position for chrominance. Traditionally, coding modes like HEVC use a single DM mode in the same position as the upper left corner of the CU. Without going into too much detail and for the sake of clarity, JVET provides multiple such positions. This mode is then used to determine the prediction method, so a usual intra-frame prediction is created for the chrominance component, which, when subtracted from the reference / original data, produces the above-mentioned residual data. The prediction of the Cr residual is obtained from the Cb residual (hereinafter referred to as ResidualCb) by the following formula:

[0169] PredCr[i,j]=α.ResidualCb[i,j]

[0170] Where: α is derived in the same way as CCLM luma-to-chroma prediction. The only difference is that a regression cost relative to the default α value is added to the error function, so that the derived scaling factor is biased towards the default value of -0.5 as follows:

[0171]

[0172] Where: RecCb i Represents the value of the adjacent reconstructed Cb sample, RecCr i represents adjacent reconstructed Cr samples, and

[0173]

[0174] The known LM model exhibits a large computational complexity, especially when using the least squares method to derive the linear model parameters.

[0175] The present invention seeks to improve the situation in terms of coding efficiency and / or computational complexity.

[0176] The present invention is based on replacing the derivation of a linear model for calculating chrominance prediction result block samples from luminance block samples with the determination of the parameters of the linear model based on equations of a straight line. The straight line is defined by two sample pairs defined by pairs of reconstructed samples in a neighborhood of the block. First, the two sample pairs to be used are determined. Then, the parameters of the linear model are determined from these two sample pairs. By limiting the number of sample pairs used in the determination of the linear model to two, the use of the least mean square method can be avoided. Therefore, the proposed method is less computationally intensive than the known method using the least mean square method.

[0177] Fig. 9 The principle of this method is illustrated by considering here the minimum and maximum values ​​of the luma sample values ​​in a set of sample pairs in the neighborhood of the current block. All sample pairs are plotted on the diagram according to their chrominance and luma values. Two different points are identified on the diagram (i.e., point A and point B), each corresponding to a sample pair. Point A corresponds to the sample with the lowest luma value x from RecL'. A and its co-located chromaticity value y from RecC A Point B corresponds to the point with the highest brightness value x B and its chromaticity value y at the same position B of sample pairs.

[0178] Fig.10 A flowchart of the proposed method for deriving linear model parameters is given. The flowchart is Figure 4 The method is based on the adjacent luma samples RecL′ obtained in step 1001 and the chroma samples RecC obtained in step 1002 .

[0179] In step 1003, two points A and B corresponding to two sample pairs are determined (1004). In the first embodiment, these two points A and B correspond to the sample values ​​x having the lowest and highest brightness, respectively. A and x B and its corresponding chrominance sample value y Aand B of sample pairs.

[0180] Then, in step 1005, the equation of the line passing through points A and B is calculated according to the following equation:

[0181]

[0182]

[0183] The obtained α and β are the linear model parameters 1006 used to generate the chrominance prediction result.

[0184] The derivation of the linear model based on the LMS algorithm used in the prior art has a certain complexity. In this known method, the calculation of the α parameter of the model is obtained by the following equation:

[0185]

[0186] Analysis of this equation with respect to computational complexity gives the following results. Computing B1 requires M+1 multiplications and M summations, where M is the number of sample pairs. Computing B2 requires 1 multiplication and 2M summations. Computing B3 requires M+1 multiplications and M summations, and computing B4 requires 1 multiplication and 2M summations. The corresponding α requires two additional summations and one division.

[0187] To calculate β, one multiplication and 2M+1 summations and one division are required. As mentioned earlier, M is the number of samples in RecC i and RecL′ i The number of

[0188] Therefore, the complexity of the LMS derivation of α and β is (2M+2+2) multiplications, (7M+3) additions, and two divisions.

[0189] In contrast, analysis of the proposed method based on the calculation of the equation of the straight line using only two points gives the following results. As reported, the derivation step 1005 requires only one multiplication, three summations and one division. This large complexity reduction in generating the linear model parameters is a major advantage of the proposed invention.

[0190] It should be noted that searching for minima and maxima has its own complexity usually associated with sorting algorithms. This operation is not completely continuous: N points can be compared with N other points, thus generating N minima / maxima. Then, the N / 2 minima and N / 2 maxima points can be compared with N / 2 other points, and then with N / 4 other points, and so on, until only the desired number of minima and maxima points remain. Typically, searching for minima and maxima thus results in about 2*N-2 comparisons (each N-1).

[0191] As already explained, the chrominance prediction results can be calculated using integer multiplications and shifts rather than floating point multiplications and divisions when calculating the slope. This simplification involves using

[0192]

[0193] To replace

[0194]

[0195] To use only integer multiplications and shifts, in one embodiment, the equation for the line is obtained as follows:

[0196] S=10

[0197]

[0198] β=y A -L(x A >>S).

[0199] Note that if L and S are used instead of α, then β in the following text refers to this equation, otherwise β refers to the traditional equation β = y A -αx A .

[0200] Another advantage of this derivation is that the offset value S always has the same value. This is particularly interesting for hardware implementations which can become simpler when utilizing this property.

[0201] In yet another embodiment, the value of S is forced to be low because L can be large and require a larger multiplier operation. In practice, multiplying an 8-bit value by an 8-bit value is easier to implement than, for example, an 8*16 multiplier. Typical practical values ​​of L are usually equivalent to a multiplier of less than 8 bits.

[0202] However, the preferred embodiment is a so-called fixed-point implementation: for D=(x B -x A) For all values of (1<<S) / D, store the values in a table. Preferably, these values are only used for positive values since the sign can be retrieved easily. Using the array TAB, the calculation of L becomes:

[0203]

[0204] Q controls quantization and thus the number of elements in the table. Thus, using Q = 1 means no quantization. Additionally, note that instead, the query index can be (abs(x B -x A ) + R) / Q, typically with R = Q / 2, or a rounded variant of their division. As a result, Q is ideally a power of 2 such that dividing by Q = 2 P is equivalent to a right shift by P.

[0205] Finally, some values in the table can be non - zero: low values of abs(x B -x A ) or abs(y B -y A ) typically give a very poor estimate of L. Then pre - determined or explicit values (such as in the slice header or in a parameter set such as PPS or SPS) can be used. For example, for all values of D below 4, the array TAB can contain a default value, such as -(1<<S) / 8.

[0206] For 10 - bit content and Q = 1, up to 2048 entries in the array are needed. By exploiting the signed symmetry as shown above, this can be reduced to 1024. Further increasing Q will similarly reduce the size of TAB.

[0207] If some of these samples (RecL or RecC or both) are residual samples (i.e., the residual samples themselves resulting from the difference between two blocks that may be quantized), as in the case of JVET with Cb - to - Cr prediction, then the size (and content) of the table can be changed accordingly.

[0208] In another preferred embodiment, the determination of the two parameters α and β of the straight line in the following formula is made such that integer arithmetic can be used to easily implement it in hardware.

[0209] More precisely, the determination of the parameters α and β can be done only by integer multiplication and shift operations on integers. Such calculations utilize fewer computational resources (e.g., memory and time) compared to other types of calculations such as floating - point operations.

[0210] To perform this integer arithmetic, the following steps are taken.

[0211] The first intermediate value "pshift" is determined by taking into account the bit depth of the luma and chroma samples to be processed. This shift value ensures a specified maximum value α of the denominator (called "diff") α. In this embodiment, the maximum value of "diff" is 512, and as such can be represented in a table with 512 entries. By enforcing a specific maximum value for "diff", a common table (or set of tables) can be used for a variety of different bit depths, thereby reducing the overall memory requirements.

[0212] Thus, the value of pshift depends on the bit depth of the sample, since, for example, if 10 bits are used to encode the sample, the maximum difference between the maximum and minimum values ​​is 1024. To represent this in a table of 512 entries, the difference must be divided by 2 or shifted by 1 bit, so pshift = 1. For example, the relationship between pshift and bitdepth can be extracted for the following Table 1a, or given by the following expression:

[0213] pShift=(BitDepth>9)? BitDepth-9:0

[0214] This can be alternatively expressed by the following expression:

[0215]

[0216] An optional rounding value "add" can also be calculated to make "diff" an integer after the bit shift. The "add" value is related to pshift according to the following expression:

[0217] add=pshift? 1<<(pshift-1):0

[0218] This can be alternatively expressed by the following expression:

[0219]

[0220] Alternatively, a direct relationship between "BitDepth" and "add" can be provided by the following expression:

[0221] add=(BitDepth>9)? 1<<(BitDepth-10):0

[0222] or

[0223]

[0224] Table 1 below gives example values ​​of "pshift" and "add" corresponding to the bit depths of the luma and chroma samples to be processed, which range from 8 bits to 16 bits.

[0225] Table 1: Examples of "pshift" and "add" values

[0226] Bit Depth Value of "pShift" The value of "add" 8 or 9 digits 0 0 10-bit 1 1 11th place 2 2 12-bit 3 4 13th 4 8 14-bit 5 16 15th 6 32 16-bit 7 64

[0227] The table can be stored in memory to avoid the need to recalculate "pshift" and "add", which can reduce the number of processing operations. However, some implementations may prioritize reducing memory usage over reducing the number of processing operations, and thus may calculate "pshift" and "add" every time.

[0228] The "diff" value then represents the range of values ​​between the minimum and maximum values ​​of the luma samples in a manner suitable for processing using integer arithmetic. The value of "diff" is an integer constrained to a certain range by using "pshift". The value "diff" is calculated according to the following formula:

[0229] diff=(x B -x A +add)>>pshift

[0230] Then, calculate the α and β parameters, remembering that α and β define the slope and intercept of the linear model at the intercept points A and B:

[0231]

[0232] β=y A -αx A .

[0233] If the value of "diff" representing α is equal to zero, the α and β parameters are assigned as follows:

[0234] α=0

[0235] β=y A (or β=y B ).

[0236] The selection of point A or B to use may be determined by which point is currently stored in memory to reduce the number of processing operations.

[0237] Otherwise, if the value of "diff" is strictly positive, the value of α is determined by the following formula:

[0238] α = (((y B -y A ) * Floor(2 k / diff) + div + add) >> pshift) (1)

[0239] Where: the function Floor(x) provides the largest integer value less than or equal to x, and

[0240] Where: The intermediate parameter "div" is calculated as follows:

[0241] div = ((y B -y A ) * (Floor((2 k * 2 k ) / diff) - Floor(2 k / diff) * 2 k ) +2 (k-1) ) >> k (2)

[0242] The precision of this division is represented by the variable "k". A value of k = 16 has been found to provide the best coding efficiency and allows α and β to be accurately represented using integer arithmetic. This will enable accurate prediction of chrominance samples when the corresponding luma samples are used.

[0243] As will be explained in more detail below, the value of k also defines how much memory is required for each entry.A value of k=16 allows the use of a 16-bit memory register, which can be represented in 2 bytes, when addressing each entry in the table.

[0244] The parameter β is determined by applying the straight line equation to a single point on the line (which can be point A or point B as follows):

[0245] β=y A -((α*x A )>>k), or

[0246] β=y B -((α*x B )>>k).

[0247] The selection of point A or B to use may be determined by which point is currently stored in memory, thereby reducing the number of processing operations. Alternatively, point A or B may be a fixed selection (eg, a selection defined in a standard).

[0248] From a hardware implementation perspective, some of the terms in formulas (1) and (2) can be replaced by tables that store pre-calculated values. The main advantage of such a table is to avoid calculating the intermediate "Floor" function each time the α and β parameters are derived. In this way, multiple processing operations can be replaced by lookup operations.

[0249] For example, equation (1) may be simplified as follows to provide equation (3) by using table TAB1[diff]:

[0250] α = (((yB - yA) * TAB1[diff] + div + add) >> pshift) (3)

[0251] Where: TAB1[diff] = Floor(2 k / diff)

[0252] Likewise, formula (2) can be simplified by using predetermined tables TAB1[diff] and TAB2[diff] to avoid iterating the same operation.

[0253] div = ((y B -y A ) * (TAB2[diff] - TAB1[diff] * 2 k ) + 2 (k-1) ) >> k (4)

[0254] Where: TAB2[diff] = Floor((2 k *2 k ) / diff)

[0255] Equation (4) can be further simplified by the following equation:

[0256] div = ((y B -y A ) * (TAB3[diff]) + 2 (k-1) ) >> k (5)

[0257] in:

[0258] TAB3[diff]=TAB2[diff]-TAB1[diff]*2 k =Floor((2 k *2 k ) / diff)-2 k

[0259] *Floor(2 k / diff)

[0260] TAB1 and TAB3 (and TAB2) are each with N entries N = 2 (BitDetpth-pshift) A table with each entry represented by k bits.

[0261] According to the definition of the integer variable "diff" above, and taking for example the luma or chroma sample values ​​represented with 10 bits, the maximum "diff" value is 512 (using Table 1a above). This means that tables TAB1 and TAB3 (and TAB2) can be represented by an array with 512 entries for each, and each entry is encoded on "k=16" bits. The "pshift" variable given in Table 1 makes it possible to obtain the same number of entries (here 512) depending on the bit depth of the samples to be processed.

[0262] As mentioned above, these arrays (TAB1-TAB3) can be stored in memory to reduce the number of operations to be performed in equations (1) and (2) to derive parameters α and β.

[0263] Within the scope of the VVC standardization work, such an approach can be used to implement the division to retrieve the α and β parameters of the linear model to predict the chrominance samples from the luma samples. However, it was surprisingly found that the size of the table and the representation of each entry can be reduced without adversely affecting the coding efficiency.

[0264] As described above, the total memory required to store each table depends on the value of the "pshift" value, and the number of bits used to represent each entry can be encoded by using the "k" value. In the above embodiment, two tables (TAB1 and TAB3) are used, and each table has 512 entries and k=16. The memory required to represent these two tables TAB1 and TAB3 is 2*512*16=16384 bits, which can be stored on 2048 bytes.

[0265] Modifying the parameters that (independently and collectively) determine memory requirements will now be discussed.

[0266] The number of entries in each table (array)

[0267] Although good compression is achieved by using tables of size 512 entries, these tables may be considered quite large, and it may be desirable to reduce the size of these tables.

[0268] Tables 3 and 4 show the effects of reducing the number of entries from 512 to 256 and 128, respectively. The coding efficiency impact of the metrics (see, for example, Bjontegard. Calculation of average PSNR differences between rd-curves. Doc. VCEG-M33 ITU-T Q6 / 16, April 2001. 79 Z. Xiong, A. Liveris, and S. Cheng for an explanation of how these metrics are determined). By increasing the value of "pshift" by 1 (N=2 (BitDetpth-pshift) ) to reduce the size of the table. The value of "add" can be adjusted accordingly. The following Table 2 shows that N is changed to 256 or 128.

[0269] Table 2: Examples of "pshift" and "add" values ​​for a table of 256 or 128 entries

[0270]

[0271] The table can be represented by the following expression:

[0272] 256 items

[0273] pShift=(BitDepth>8)? BitDepth-8:0

[0274] This can alternatively be expressed by the following expression:

[0275]

[0276] An optional rounding value "add" can also be calculated to make "diff" an integer after the bit shift. The "add" value is related to pshift according to the following expression:

[0277] add=pshift? 1<<(pshift-1):0

[0278] This can alternatively be expressed by the following expression:

[0279]

[0280] Alternatively, a direct relationship between "BitDepth" and "add" can be provided by the following expression:

[0281] add=(BitDepth>8)? 1<<(BitDepth-9):0

[0282] or:

[0283]

[0284] 128 items

[0285] pShift=(BitDepth>7)? BitDepth-7:0

[0286] This can alternatively be expressed by the following expression:

[0287]

[0288] An optional rounding value "add" can also be calculated to make "diff" an integer after the bit shift. The "add" value is related to pshift according to the following expression:

[0289] add=pshift? 1<<(pshift-1):0

[0290] This can alternatively be expressed by the following expression:

[0291]

[0292] Alternatively, a direct relationship between "BitDepth" and "add" can be provided by the following expression:

[0293] add=(BitDepth>7)? 1<<(BitDepth-8):0

[0294] or:

[0295]

[0296] Reducing the size of the table results in a coarser representation of the difference between the maximum and minimum of the sample values.

[0297] The coding efficiency evaluation tests were performed on a set of video sequences used by the JVET standardization consortium defined in document JVET-L1010. In the following table, negative values ​​show better coding efficiency, while positive values ​​correspond to a decrease in coding efficiency.

[0298] Table 3: Compression performance when using a table of size 256

[0299]

[0300] As shown in Table 3, despite the fact that the number of entries in tables TAB1 and TAB3 is reduced by a factor of 2, the coding efficiency is surprisingly not substantially affected. It can be observed that the losses introduced by the modifications affecting the CCLM mode are very limited and these losses are less than 0.2% in the chrominance channels (U) and (V), which is essentially negligible (and more likely represents noise).

[0301] A similar experiment was performed with a table size of 128 generated by increasing the value of pshift by an additional 1 (as shown in Table 2 above).

[0302] Table 4: Compression performance when using a table of size 128

[0303]

[0304] Even more surprisingly, despite the 4-fold reduction in the number of entries in tables TAB1 and TAB3, the coding efficiency remains essentially unaffected, as shown in Table 4. It can be observed that the losses introduced by the modifications affecting the CCLM mode are very limited and these losses are less than 0.05% in the chroma channels (U) and (V), which are essentially negligible (and more likely represent noise).

[0305] However, further reducing the table size to 64 entries (by increasing pshift by an additional 1) results in a greater loss in compression performance as shown in Table 5 below:

[0306]

[0307] These results are partial in that they do not include class A2, so there is no "overall" figure.

[0308] The results shown above show that the size of the table can be reduced by a factor of 2 or even 4 without adversely affecting the efficiency of the CCLM mode that uses two points A and B to derive the parameters α and β.

[0309] In another embodiment, the number of entries in the table (i.e., the value of pshift) may vary depending on the bit depth (e.g., 128 (or 256) for up to 10 bits, and 256 (or 512) for more than 10 bits). This may be due to the fact that a more powerful encoder would be required to encode samples represented by (e.g.) 16 bits, and therefore the computational complexity of using a larger table would not be as problematic. In this case, it may be preferable to slightly improve encoding performance by using a larger number of entries (e.g., 512 or more).

[0310] The number of bits representing each entry in the table (array)

[0311] To further reduce the size of the table, each entry in the table may also be represented on less than the initial k=16 bits using 2 bytes for each entry. Reducing the value of k represents a reduction in the precision of the division, since it essentially corresponds to reducing the magnitude of α represented by an integer. Table 6 below shows the impact on coding efficiency when reducing the number of bits to represent each entry (compared to k=16).

[0312] Table 6: Coding performance with decreasing k value

[0313]

[0314]

[0315] The above Tables 6 show the surprising result that when the entries are represented on 8 bits or less, the coding efficiency is essentially the same compared to k=16 bits.

[0316] The above table shows that acceptable coding efficiency results are obtained for k included in the interval 6 to 8. Similar results are achieved for k in the interval 9 to 15, but this representation will still require 2 bytes and therefore will not provide much advantage in reducing the memory required to store the table.

[0317] Table 6 shows that for k equal to 5 bits or less, a greater degradation is observed since the division when calculating α becomes inaccurate.

[0318] Thus, it was surprisingly found that the best compromise between performance and storage is k=8 bits.

[0319] Compared to k=16 bits where each entry is represented on 2 bytes, this embodiment can use only a single byte to represent an entry of table TAB1 or TAB3. This reduces the complexity of all calculations involving k, thus reducing processing requirements.

[0320] Values ​​of k=6, 7 or 8 surprisingly provide similar coding performance as k=16, with higher values ​​of k providing slightly better coding performance.

[0321] It is particularly surprising that k can be reduced by a full byte (8 bits) without seeing any noticeable drop in encoding performance.

[0322] Furthermore, it was surprisingly found that k can be reduced down to k=6 and only outside this range a significant degradation in coding performance is detected.

[0323] By reducing k from 16 to 8, the total memory used by the tables is reduced by a factor of 2.

[0324] This is surprising because the accuracy of operations involving bit shifts is typically strongly affected by small changes to the value of the bit shift parameter, and a large drop in encoding performance would be expected when the value of k is reduced by even a small amount. However, the above results counterintuitively show that large changes in the value of k (e.g., from 16 to 6) only drop encoding performance by a negligible amount (<0.14%).

[0325] The choice of k may vary depending on the bit depth (e.g. 8 for up to 10 bits, and 16 for more than 10 bits). This may be due to the fact that a more powerful encoder would be required to encode samples represented by (e.g.) 16 bits, and thus the computational complexity of using a larger table would not be as problematic. In this case, it may be preferable to slightly improve encoding performance by using a larger number of bits (e.g. more than 8).

[0326] A combination of the number of entries and the number of digits representing each entry

[0327] Table 7 below shows the results for coding performance changing k from 8 to 5 when there are 256 entries in each table (i.e., a combination of the two sets of results shown in Tables 3 and 6 above) (compared to the baseline of k=16 and 512 entries in each table).

[0328] Table 7: Encoding performance when reducing the value of k and the number of entries from 512 to 256

[0329]

[0330]

[0331] The above coding efficiency results show the following surprising result: by using two tables (TAB1 and TAB3) with 256 entries each encoded using a single byte (i.e., k≤8), similar results can be obtained compared to the case of two tables with 512 entries represented on 2 bytes. A particular advantage of this embodiment is that the memory required to store these tables TAB1 and TAB3 is reduced by a factor of 4 without affecting the coding efficiency results. In this particular embodiment, the memory required to represent the two tables (TAB1 and TAB3) is: 2*256*8=4092 bits, which can be stored on 512 bytes.

[0332] Table 8 below shows the results for coding performance changing k from 8 to 5 when there are 128 entries in each table (i.e., a combination of the two sets of results shown in Tables 4 and 6 above) (compared to the baseline of k=16 and 512 entries in each table).

[0333] Table 8: Encoding performance when reducing k and the number of entries from 512 to 128

[0334]

[0335]

[0336] The above coding efficiency results show the following surprising result: by using two tables (TAB1 and TAB3) with 128 entries each encoded using a single byte (i.e., k≤8), similar results can be obtained compared to the case of two tables with 512 entries represented on 2 bytes. It is particularly surprising that in many examples, using 128 entries actually improves coding performance compared to using 256 entries. For example, for k=8 (one byte for each entry), the results show that a table size of 128 results in improved coding performance compared to a table of 256 entries.

[0337] The particular advantage of this embodiment is that the memory required to store these tables TAB1 and TAB3 is reduced by a factor of 8 without affecting the coding efficiency results. In this particular embodiment, the memory required to represent the two tables (TAB1 and TAB3) is: 2*128*8=2046 bits, which can be stored on 256 bytes.

[0338] Therefore, the CCLM mode can use this division to retrieve α and β parameters that can be achieved through integer arithmetic for efficient hardware implementation.

[0339] In particular, it has been shown that combining reducing the number of entries in a table with reducing the size of each entry does not result in a worsening performance degradation (as might be expected), but rather, when reducing the number of entries in a table and reducing the size of each entry are combined, essentially the same performance is achieved compared to performing each operation independently.

[0340] For completeness, Table 9 shows partial results when using a table of N = 64 entries compared to a baseline of k = 16 and N = 512. It should be noted that in the U and V components, the performance loss is large for class A1 (which is the main target of VVC).

[0341] Table 9: Some encoding performance results when reducing the k value and the number of entries from 512 to 64

[0342]

[0343] Representation of α

[0344] In another embodiment, the value of the α parameter is modified so that the value can be represented in "L" bits. Through the above-mentioned derivation of α and β, when k is equal to 8, the value of α can be up to 17 bits (and up to 25 bits in the case of k=16). The main reason for modifying the value of α is to limit the bit width of the multiplication in the following prediction formula:

[0345] C C =((α*L c )>>k)+β

[0346] Where: C C is the chrominance prediction value corresponding to the luminance Lc value, and α and β are the parameters of the slope (which can be derived as described above).

[0347] If the luma samples are encoded on 10 bits, this means that the prediction core loop needs to be able to handle multiplications of up to 10 bits by 17 bits, which is computationally complex (and can use a lot of memory). In this embodiment, the value of α is modified so that the multiplication does not exceed 16 bits. Such calculations are very suitable for hardware implementation (for example, a 16-bit processor can use a single memory register to perform the calculation).

[0348] To achieve this, α needs to be represented by 6 bits or less. To achieve this 6-bit representation, the range of α can be "clipped" to force larger values ​​into the specified range.

[0349] In another embodiment, the magnitude of α is determined so that it can be reduced by dividing it by an appropriate amount and adjusting the offset parameter k accordingly. Determining the amount of adjustment toward the offset value (k) includes finding the "most significant bit" position P (classically by counting leading zeros or taking a base 2 logarithm, for example). In this case, if the limit L (5 or 6 in the preferred embodiment) is exceeded, the following operation is performed:

[0350] α=α>>(PL)

[0351] k=k+LP

[0352] That is, divide α by a factor of 2 (P-L) , and the value of k is compensated by the opposite quantity (LP).

[0353] The value of L may depend on the bit depth, but may be the same for multiple bit depths to simplify implementation. In addition, L may take into account the sign bit, ie, L=5.

[0354] It is also observed that in most implementations, in CCLM mode, the floating point value of α is in the range [-2.0; 2.0]. For example, using only 6 bits, 64 values ​​in the interval [-2.0; 2.0] can be represented, where any calculated value that falls outside this range is replaced by the endpoint of the range.

[0355] In any case, clipping α into any range can be done before reducing its amplitude. This ensures that extraneous values ​​are removed before the amplitude reduction process is performed.

[0356] Fig.11 Different ways of selecting two points (A and B) in embodiments of the present invention are shown.

[0357] The proposed simplification of the derivation has an impact on the coding efficiency. In order to reduce this coding efficiency loss, carefully choosing these two points is a very important step.

[0358] In the first embodiment as described above, Fig.11 Points A and B correspondingly select the minimum and maximum values ​​of adjacent brightness sample values.

[0359] In an alternative embodiment, the two points selected are Fig.11 Points C and D of , which correspond to a pair of luma and chroma samples corresponding to the minimum and maximum of adjacent chroma sample values. This alternative embodiment is sometimes of interest in terms of coding efficiency.

[0360] In an alternative embodiment, the longest line segment between line segment [AB] and line segment [CD] is determined, and if the [AB] line segment is longer than the [CD] line segment, then points A and B are selected, otherwise points C and D are selected. The length of each line segment can be calculated using Euclidean distance. However, another distance measurement value can also be used. Compared with the previous two embodiments, this embodiment improves coding efficiency. In fact, when the two selected points are far apart, the linear models generated are usually correlated. As a result, the generated chrominance block prediction result is related to the current block prediction.

[0361] In another embodiment, the two points selected are given by the longest line segment among all possible line segments that can be generated between A, B, C, and D. This corresponds to Fig.11 Line segments [AB], [CD], [AC], [AD], [CB], and [DB] are shown. This embodiment improves coding efficiency at the expense of higher complexity compared to the previous embodiment.

[0362] In a preferred embodiment, points representing the minimum and maximum values ​​of the RecL' luminance sample values ​​are set to create points A and B, and if a component of point A is equal to the corresponding component from B (x B =x A or B =y A ), then select the points representing the minimum and maximum values ​​of the chrominance sample values ​​C and D. This embodiment achieves the best coding efficiency because if x B =x A or B =y A, then α (or L) is infinite or equal to 0, respectively, and the resulting chrominance prediction result block is either unusable or equivalent to the DC prediction. This is the case whenever the numerator or denominator of the fraction representing α (or L) is too low (e.g., the following condition can be verified: |α|<0.1): even small errors (such as errors due to quantization, etc.) result in very different values ​​of α (or L). In the rest of this article, these cases of essentially almost horizontal or vertical slopes result in so-called anomalous slopes (regardless of whether the slope is α or L).

[0363] In additional embodiments, testing Fig.11 The multiple pairs of points shown are calculated until α is not “abnormal”. This embodiment improves the coding efficiency of the previous embodiment, but increases the computational complexity.

[0364] In an alternative embodiment, the difference between the maximum and minimum values ​​of the two components (chrominance and brightness) is calculated. In addition, the component with the largest difference is selected to determine the two points of the line used to define the calculation of the model parameters. This embodiment is efficient when the two components are two chrominance components or two RGB components.

[0365] Two points A and B can be selected for the sample value of the current block. In one embodiment, based on the current downsampled luminance block ( Figure 5 The sample values ​​of the sample pairs in the neighborhood of the block are compared with the luminance sample values ​​of the luminance block. The value with the largest occurrence rate is selected to create x A , and select the second value with the largest occurrence to create x B The corresponding chromaticity value y A and B is the average of the co-located chrominance samples in the sample pairs within the neighborhood of the block. When α (or L) is "abnormal" (equal to 0 or close to 0 (|α|<0.1)), instead of the second most selected value, x B is one of the few brightness values. B is the average value of the chrominance samples at the same position. Compared with the previous embodiment, this embodiment improves the coding efficiency at the cost of the highest complexity.

[0366] The selection of the two points A and B can be performed on the spatial positions of the sample pair.

[0367] In the previous embodiment, it is necessary to determine the minimum and maximum values ​​of luma (A, B) or / and chroma (C, D) among M pairs of luma and chroma neighboring samples. This can be considered as additional complexity. Therefore, for some implementations, it is preferred to obtain these two points with minimal complexity.

[0368] In one embodiment, using the chrominance sample RecC ( Figure 5 501 in the figure) and a linear model is generated using the downsampled luma sample (503) of the boundary RecL'. The first point selected is the lower sample of the left row of reference numerals 5004 for luma and the chroma sample 5001 at the same position. The second point selected is the upper right luma sample 5003 and the chroma sample 5002 at the same position. The selection of these two points is very simple, but the selection is also not as efficient as the previous embodiment based on values.

[0369] In addition, if, for example, one of the upper edge or the left edge does not exist for a block on the boundary of an image or a strip, or is unavailable, for example, due to complexity or error recovery reasons, then these two samples (e.g., samples with luminance 504 or 5003 on the available edge) are selected instead of the missing sample. Thus, it can be seen that there are multiple conditions to select samples.

[0370] Further embodiments are described in which, if insufficient points can be selected to calculate the slope, or these points result in an "abnormal" α (or L), default points can be selected instead. This embodiment is also applicable to MMLM modes with adaptation. To create the first set of linear model parameters, the first point is the lower sample (5009) of the second left row of luma and the co-located chroma sample (5005). In addition, the second point is the upper luma sample (5010) and the co-located chroma sample (5006) of the first left row.

[0371] To create the second set of linear model parameters, the first point is the left sample of the first upper line of luma (5011) and the co-located chroma sample (5007). And, the second point is the right luma sample (5012) and the co-located chroma sample (5008) of the second upper line.

[0372] This embodiment simplifies the selection of the first group and the second group of four points.

[0373] In yet another embodiment, the threshold of the MMLM mode is the brightness value of point 5010 or 5011 (ie, the upper right point of the left neighborhood and the lower left point of the upper neighborhood in this example), or the average value between these points. This additional embodiment simplifies the calculation of the threshold.

[0374] In a further embodiment for all of these embodiments relating to the selection of two points, the downsampling of the luminance is disabled and this is replaced by decimation, i.e. one of the two luminance samples is used for the RecL' sample. In this case, Fig.10 Step 1001 in the following detailed description Fig.12 Step 1201 in the embodiment. This embodiment reduces the complexity with little impact on coding efficiency.

[0375] Points A, B, C and D are determined based on the decoded version of the sample and therefore may not match the original sample values. As already explained when defining the so-called "abnormal" slopes, this may result in abnormally short line segments or simply noisy estimates. A and C are the two lowest points, B and D are the two highest points, and instead of using any two of these four points, at the cost of some simple supplementary operations, point E defined as the average between A and C, and point F defined as the average between B and D can be used:

[0376] x E =(x A +x C +1)>>1 and y E =(y A +y C +1)>>1

[0377] x F =(x B +x D +1)>>1 and y F =(y B +y D +1)>>1

[0378]

[0379] β=y E -A.(x E >>S).

[0380] Obviously, if y E -y F or x E -x F If φ is equal to 0 or too low (i.e., the derived slope is "abnormal"), then points A, B, C, and D are considered as usual to obtain better parameters.

[0381] It should be understood from this that the two points used in the calculation of the slope in the model may not be two actual points consisting of sample values ​​of RecL′ or RecC. This explains the use of the wording “determine” instead of “select” in step 1003 .

[0382] In yet another embodiment, for the MMLM mode, if the α (or L) parameter defining the slope of one group is "abnormal", the corresponding LM parameter is set equal to the LM parameters of the other group or another group in the case of more than two groups. Fig.12This embodiment is shown. After determining (α1, β1) and (α2, β2) of the two models defining the two groups in step 1203, α1 and α2 are tested in steps 1204 and 1205 to check whether both are equal to 0. If this is the case, the "abnormal" slope parameter α (or L) is set equal to the other slope parameter α, and similarly, the corresponding β parameter value of the other group is also used in steps 1206 and 1207. Therefore, in this case, regardless of the downsampled luminance sample value of the current block, only one set of parameters is used, there is no comparison with the threshold, and the same complexity as the CCLM mode is obtained. The advantage of this embodiment is that since there is no need to derive additional linear model parameters, the coding efficiency can be improved with low complexity.

[0383] In an alternative embodiment, when one slope parameter α (or L) is "abnormal", a set of linear parameters is re-derived by considering all initial samples of the MMLM (which corresponds to a CCLM derivation using two upper lines and two adjacent rows instead of one upper line and one adjacent row). This embodiment gives better coding efficiency than the previous embodiment, but is more complicated due to the need to re-derive a set of linear model parameters.

[0384] The simplified LM derivation using two points as described herein is generally not efficient compared to the classical LMS derivation, except that it cannot replace all LMS derivations when multiple LM modes are competing.

[0385] In one embodiment, LM derivation using two points is only used in CCLM mode to derive chroma block prediction results. This embodiment provides improved coding efficiency.

[0386] In one embodiment, the derivation using two points is only used for the MMLM mode, since the MMLM mode is the most complex prediction method.

[0387] In one embodiment, the LM derivation using two points is used for CCLM mode and MMLM mode to derive the chroma block prediction result. This embodiment has similar coding efficiency as JEM, but reduces the worst case complexity by using this simplified LM derivation for the generation of chroma block prediction results. In fact, the chroma prediction based on luma is the mode that exhibits the worst case complexity among the prediction linear model modes. This chroma prediction is more complex than the residual chroma prediction.

[0388] In one embodiment, all LMS derivations (chrominance block prediction result generation and residual prediction) are replaced with LM derivations of two points. This embodiment reduces coding efficiency compared to JEM, but significantly reduces complexity. Please note that regardless of the derivation method used for the parameters in step 1203, both embodiments provide improved coding efficiency.

[0389] In yet another embodiment, if one or both of the slope parameters α (or L) are "abnormal", then default values (such as -(1<<S) / 8, etc.) are used instead in steps 1206 and / or 1207, and the corresponding value β is calculated.

[0390] In yet another embodiment, multiple LM modes are competing on the encoder side, and on the decoder side the syntax elements can represent the selected LM mode in the bitstream. This signaling can be at the slice level (or PPS or SPS) to indicate which sets should be used, or at least provide candidates for block-level selection. At least one of the differences between these competing LM modes is a set of two points used to derive the LM parameters. This set of two points and the method for generating these two points define the different LM modes in the competition. For example, for one LM mode, these two points are determined based on the minimum and maximum luminance values, and for another LM mode, these two points are selected based on the maximum and minimum chrominance values.

[0391] Another embodiment relates to defining multiple sets from possible positions as Figure 5 shown. Although four such different points can result in up to twelve different pairs, pairs can be preferred: these pairs result in the maximum values for the numerator and denominator in the equation for calculating the slope parameter α (or L). The encoder builds a list of pairs and sorts these pairs according to some criteria (such as the distance in the luminance component, or the Cartesian distance using both the luminance and chrominance components), thereby possibly removing some of these pairs (i.e., cases where the slopes of some of these pairs are too close to each other), and thus establishing a list of parameters that can be selected and represented.

[0392] The advantage of these embodiments is the improved coding efficiency.

[0393] The descriptions of these embodiments mention the luminance and chrominance components, but can be easily applied to other components such as both chrominance components or RGB components. According to an embodiment, the present invention is used when predicting the first chrominance component sample value based on the second chrominance component. In another embodiment, the present invention is used when predicting the sample value of one component based on the sample values of more than one component of more than one component. It should be understood that in this case, the linear model is derived based on two points / sets, each point / set containing the sample value of one component, and the sample values of more than one component of more than one component. For example, if the sample values of two components are used to predict the sample value of one component, each point / set can be represented as a position in three-dimensional space, and the linear model is based on the straight line passing through two positions in three-dimensional space corresponding to the two points / sets of the reconstructed sample values.

[0394] Fig.131 is a schematic block diagram of a computing device 1300 for implementing one or more embodiments of the present invention. The computing device 1300 may be a device such as a microcomputer, a workstation, or a light portable device. The computing device 1300 includes a communication bus, wherein the communication bus is connected with the following components:

[0395] - a central processing unit 1301 such as a microprocessor, denoted as a CPU;

[0396] - a random access memory 1302 represented as a RAM and registers, wherein the RAM 1302 is used to store executable codes of the method according to the embodiment of the present invention, and the registers are adapted to record variables and parameters required to implement the method for encoding or decoding at least a part of an image according to the embodiment of the present invention, and its memory capacity can be expanded by using an optional RAM connected to an expansion port, for example;

[0397] - a read-only memory 1303, denoted as ROM, for storing a computer program used to implement the embodiments of the present invention;

[0398] - A network interface 1304, which is typically connected to a communication network via which digital data to be processed is sent or received. The network interface 1304 may be a single network interface, or a collection of different network interfaces (e.g., a wired interface and a wireless interface or different kinds of wired interfaces or wireless interfaces). Under the control of a software application running in the CPU 1301, data packets are written to the network interface for transmission or data is read from the network interface for reception;

[0399] - A user interface 1305 for receiving input from a user or displaying information to a user;

[0400] - a hard disk 1306 denoted as HD, which may be provided as a mass storage device;

[0401] - I / O module 1307, which can be used for receiving / sending data with respect to external devices such as video sources or displays.

[0402] The executable code may be stored in the read-only memory 1303, on the hard disk 1306, or on a removable digital medium such as a disk. According to a variation, the executable code of the program may be received via the network interface 1304 using a communication network before execution, and thus stored in one of the storage components of the communication device 1300 such as the hard disk 1306.

[0403] The central processing unit 1301 is adapted to control and guide the execution of a part of the instructions or software code of the program according to an embodiment of the present invention, wherein these instructions are stored in one of the above-mentioned storage components. After power-on, the CPU 1301 can, for example, execute these instructions after loading the instructions related to the software application from the main RAM memory 1302 from the program ROM 1303 or the hard disk (HD) 1306. This software application, when executed by the CPU 1301, makes each step of the method according to the present invention be performed.

[0404] Any step of the method according to the present invention can be implemented in software by executing a set of instructions or programs using a programmable computing machine (such as a PC ("personal computer"), a DSP ("digital signal processor") or a microcontroller, etc.); or implemented in hardware by a machine or dedicated components (such as an FPGA ("field programmable gate array"), or an ASIC ("application-specific integrated circuit"), especially for minimum and maximum value selection, etc.).

[0405] It should also be noted that, although some examples are based on HEVC for illustration, the present invention is not limited to HEVC. For example, the present invention can also be used in any other prediction / estimation process, where a model can be used to estimate / predict the relationship between sample values ​​of two or more components, where the model is an approximate model determined based on at least two sets of relevant / associated component sample values ​​selected from all available sets of relevant / associated component sample values.

[0406] It will be appreciated that points corresponding to sample pairs (i.e., sets of associated sample values ​​for different components) may be stored and / or processed in terms of arrays. For example, sample values ​​for each component may be stored in an array such that each sample value for that component is referenceable / accessible / obtainable by reference to an element of the array, for example using an index of the sample value. Alternatively, an array may be used to store and process sample pairs whose sample values ​​are accessible / obtainable as elements of the array.

[0407] It should also be understood that any results of the above-described comparisons, determinations, evaluations, selections, or considerations (e.g., selections made during the encoding process) may be represented in or determined from data in the bitstream (e.g., a flag or data representative of the results) such that the represented or determined results may be used in the processing instead of actually performing a comparison, determination, evaluation, selection, or consideration, such as during decoding.

[0408] Although the present invention has been described above with reference to specific embodiments, the present invention is not limited to these specific embodiments, and those skilled in the art will appreciate that modifications exist within the scope of the present invention.

[0409] Numerous other modifications and variations will be self-evident to those skilled in the art with reference to the foregoing exemplary embodiments which are given by way of example only and are not intended to limit the scope of the invention, wherein the scope is determined solely by the appended claims. In particular, different features from different embodiments may be interchanged where appropriate.

[0410] The various embodiments of the present invention described above may be implemented individually or as a combination of multiple embodiments. In addition, features from different embodiments may be combined where necessary or where it is beneficial to combine elements or features in various embodiments into one embodiment.

[0411] Unless otherwise expressly stated, each feature disclosed in this specification can be replaced by an alternative feature serving the same, equivalent or similar purpose. Therefore, unless otherwise expressly stated, each feature disclosed is only an example of a general series of equivalent or similar features.

[0412] In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite article "a" or "an" does not exclude a plurality. The mere fact that different features are recited in mutually different other aspects does not indicate that a combination of these features cannot be used to advantage.

[0413] The following numbered clauses also define certain embodiments:

[0414] 1. A method for deriving a linear model for obtaining associated reconstructed first component samples of a first component block from second component samples of a second component block in the same frame, the method comprising:

[0415] determining parameters of a linear equation representing a line through two points, each point being defined by two variables, a first variable corresponding to the second component sample values ​​and a second variable corresponding to the first component sample values; and

[0416] Derive the linear model defined by the line parameters,

[0417] Therein, the determining of the parameters uses integer arithmetic.

[0418] 2. A method according to clause 1, wherein the parameter corresponding to the slope (α) of the linear equation is estimated by calculating the difference (diff) between the first components of the two points, and the size of the difference is limited by applying a bit shift to the difference.

[0419] 3. A method according to clause 2, wherein the value of the bit shift depends on the bit depth of the sample.

[0420] 4. A method according to clause 2 or 3, wherein the maximum number of values ​​of the difference is 256.

[0421] 5. A method according to clause 4, wherein the value of the bit shift (pShift) is related to the bit depth (BitDepth) of the sample by the following formula:

[0422]

[0423] 6. A method according to any of clauses 3 to 5, wherein the value corresponding to the difference is stored in a table, wherein the number of entries in the table is 256.

[0424] 7. A method according to any one of clauses 3 to 5, wherein the value corresponding to the difference is stored in a table, wherein the number of entries in the table is 256 when the bit depth of the sample is lower than or equal to a threshold value, and is 512 when the bit depth of the sample is higher than the threshold value.

[0425] 8. A method according to clause 2 or 3, wherein the maximum number of values ​​of the difference is 128.

[0426] 9. A method according to clause 8, wherein the value of the bit shift (pShift) is related to the bit depth (BitDepth) of the sample by the following formula:

[0427]

[0428] 10. A method according to clause 8 or 9, wherein the value corresponding to the difference is stored in a table, wherein the number of entries in the table is 128.

[0429] 11. A method according to clause 8 or 9, wherein the value corresponding to the difference is stored in a table, wherein the number of entries in the table is 128 if the bit depth of the sample is lower than or equal to a threshold value, and is 256 if the bit depth of the sample is higher than the threshold value.

[0430] 12. A method according to clause 7 or 11, wherein the threshold is 10 bits.

[0431] 13. The method according to any of clauses 6 to 12, wherein the values ​​stored in the table correspond to the differences by a function comprising a Floor function.

[0432] 14. A method according to any one of clauses 2 to 13, wherein the difference is restricted to an integer.

[0433] 15. A method according to clause 14, wherein a value dependent on a bit shift applied to the difference is added to the difference.

[0434] 16. A method according to any one of clauses 1 to 15, wherein determining a parameter corresponding to the slope of the linear equation comprises determining a division, the determining comprising reducing the magnitude of the division by applying a bit shift to the division.

[0435] 17. The method of clause 16, further comprising applying the bit shift to a value stored in a table corresponding to the difference to limit a size of the entries stored in the table.

[0436] 18. A method according to clause 16 or 17, wherein reducing the magnitude comprises limiting the number of bits used for the divided values ​​to one byte.

[0437] 19. The method of clause 18, wherein the number of bits is 6, 7 or 8.

[0438] 20. A method according to clause 18 or 19, wherein the number of bits depends on the bit depth of the samples.

[0439] 21. A method according to any one of clauses 1 to 20, further comprising limiting the size and / or number of possible values ​​of a parameter corresponding to the slope of the linear equation.

[0440] 22. The method of clause 21, further comprising: clipping the value of the slope of the linear equation within a predefined range.

[0441] 23. The method of clause 22, wherein, in CCLM mode, the predefined range corresponds to [-2.0, 2.0].

[0442] 24. A method according to any of clauses 17 to 23, wherein limiting the size and / or number of possible values ​​of a parameter corresponding to the slope of the linear equation comprises reducing the magnitude of the parameter by applying a bit shift to the parameter.

[0443] 25. The method of clause 24 when referring to clause 22, wherein the reduction in amplitude is performed after the limiting.

[0444] 26. A method according to clause 24 or 25, wherein reducing the magnitude comprises limiting the number of bits used for the value of the parameter.

[0445] 27. A method according to clause 26, wherein the number of bits depends on the bit depth of the samples.

[0446] 28. The method of clause 26, wherein the number of bits is 5 or 6.

[0447] 29. An apparatus for encoding an image, wherein the apparatus comprises means for deriving a linear model according to any of clauses 1 to 28.

[0448] 30. An apparatus for decoding an image, wherein the apparatus comprises means for deriving a linear model according to any of clauses 1 to 28.

[0449] 31. A computer program product for a programmable device, the computer program product comprising a sequence of instructions for implementing a method according to any of clauses 1 to 28 when loaded into and executed by the programmable device.

[0450] 32. A computer readable medium storing a program which, when executed by a microprocessor or a computer system in a device, causes the device to perform a method according to any one of clauses 1 to 28.

[0451] 33. A computer program which, when executed, causes the method according to any one of clauses 1 to 28 to be performed.

Claims

1. A method for deriving a linear model to obtain chrominance sample values ​​of a chrominance block of a target area from associated luminance sample values ​​of a luminance block in the same frame, the method comprising: A first determination step is used to determine two pairs of values ​​for deriving the linear model based on sample values ​​at predetermined positions in the neighborhood of the target area; as well as a second determination step for determining the parameters of the linear model using the two pairs of values ​​used to derive the linear model, Wherein, each pair of values ​​in the two pairs of values ​​is defined by two variables, The first of the two variables corresponds to the luma sample value, The second of the two variables corresponds to the chroma sample values, and Each value in the two pairs of values ​​is determined by averaging two values ​​based on sample values ​​in the neighborhood.

2. The method according to claim 1, wherein: The parameters of the linear model include parameters corresponding to the slope of the linear model.

3. The method according to claim 1, wherein: The parameters of the linear model include parameters corresponding to the intercept of the linear model.

4. A method for decoding one or more images from a bitstream by deriving a linear model to obtain chroma sample values ​​of a chroma block of a target region from associated luma sample values ​​of a luma block in the same frame, the method comprising: A first determination step is used to determine two pairs of values ​​for deriving the linear model based on sample values ​​at predetermined positions in the neighborhood of the target area; as well as a second determination step for determining the parameters of the linear model using the two pairs of values ​​used to derive the linear model, Wherein, each pair of values ​​in the two pairs of values ​​is defined by two variables, The first of the two variables corresponds to the luma sample value, The second of the two variables corresponds to the chroma sample values, and Each value in the two pairs of values ​​is determined by averaging two values ​​based on sample values ​​in the neighborhood.

5. The method according to claim 4, wherein: The parameters of the linear model include parameters corresponding to the slope of the linear model.

6. The method according to claim 4, wherein: The parameters of the linear model include parameters corresponding to the intercept of the linear model.

7. An apparatus for deriving a linear model to obtain chrominance sample values ​​of a chrominance block of a target area from associated luminance sample values ​​of a luminance block in the same frame, the apparatus comprising: a first determining unit configured to determine two pairs of values ​​for deriving the linear model based on sample values ​​at predetermined positions in a neighborhood of the target area; as well as a second determining unit configured to determine parameters of the linear model using two pairs of values ​​used to derive the linear model, Wherein, each pair of values ​​in the two pairs of values ​​is defined by two variables, The first of the two variables corresponds to the luma sample value, The second of the two variables corresponds to the chroma sample values, and The first determination unit determines each value of the two pairs of values ​​by averaging two values ​​based on sample values ​​in the neighborhood.

8. The device according to claim 7, wherein: The parameters of the linear model include parameters corresponding to the slope of the linear model.

9. The device according to claim 7, wherein: The parameters of the linear model include parameters corresponding to the intercept of the linear model.

10. An apparatus for decoding one or more images from a bitstream by deriving a linear model to obtain chroma sample values ​​of a chroma block of a target region from associated luma sample values ​​of a luma block in the same frame, the apparatus comprising: a first determining unit configured to determine two pairs of values ​​for deriving the linear model based on sample values ​​at predetermined positions in a neighborhood of the target area; as well as a second determining unit configured to determine parameters of the linear model using two pairs of values ​​used to derive the linear model, Wherein, each pair of values ​​in the two pairs of values ​​is defined by two variables, The first of the two variables corresponds to the luma sample value, The second of the two variables corresponds to the chroma sample values, and The first determination unit determines each value of the two pairs of values ​​by averaging two values ​​based on sample values ​​in the neighborhood.

11. The device according to claim 10, wherein: The parameters of the linear model include parameters corresponding to the slope of the linear model.

12. The device according to claim 10, wherein: The parameters of the linear model include parameters corresponding to the intercept of the linear model.

Citation Information

Patent Citations

  • Method of Guided Cross-Component Prediction for Video Coding

    US20170244975A1

  • Image processing device and image processing method

    US9153040B2

  • Luma-based chroma intra-prediction for video coding

    US9288500B2

  • Intra-frame prediction and decoding methods and apparatuses for image signal

    US9462273B2

  • Method and apparatus of chroma intra prediction with reduced line memory

    US9565428B2