METHOD AND APPARATUS FOR ENCODING A PICTURE

20200288144 · 2020-09-10

    Inventors

    Cpc classification

    International classification

    Abstract

    A method and an apparatus for encoding a picture are disclosed. A first rate-distortion cost is determined (42) for a current block of said picture when said current block is not split into subblocks, from a distortion computed for each subblock of said current block, said distortion being scaled by an inverse of a lagrangian parameter determined (40) according to a quantization parameter assigned to said subblock. It is then determined (44) whether said current block is split or not according at least to the determined first rate-distortion cost, and the current block is encoded (45) according to the result of determining whether a current block is split or not into subblocks.

    Claims

    1-7. (canceled)

    8. A method for encoding a picture, comprising: determining a first rate-distortion cost RD.sub.non-split for a current block of said picture when said current block is not split into subblocks, from a distortion computed from each distortion for each subblock i of said current block, said distortion being scaled by an inverse of a lagrangian parameter .sub.s(i) determined according to a quantization parameter q.sub.i assigned to said each subblock i; determining a first rate-distortion cost RD.sub.split for said current block when said current block is not split as the sum of rate-distortion costs of all subblocks in the current block using the assigned quantization parameters q.sub.i and the Lagrange parameters .sub.s(i), determining that the current block is split if RD.sub.non-split is larger than RD.sub.split, encoding the current block using a common quantization parameter q.sub.0 if the current block is not split or the subblocks in the current block using the assigned quantization parameters q.sub.i if the current block is split.

    9. The method according to claim 8, wherein determining a first rate-distortion cost RD.sub.non-split for said current block when said current block is not split further comprises: assigning to said current block, the quantization parameter q.sub.0 being a minimum value of the quantization parameters q.sub.i initially assigned to the subblocks of the current block.

    10. The method according to claim 8, wherein determining a first rate-distortion cost RD.sub.non-split for said current block when said current block is not split further comprises: assigning to said current block, the quantization parameter q.sub.0 being the quantization parameter from among the quantization parameters q.sub.i initially assigned to the subblocks that results in the lowest RD.sub.non-split.

    11. The method according to claim 9, wherein if said current block is not split for encoding, encoding the current block comprises quantifying datas for said current block using said assigned quantization parameter q.sub.0.

    12. The method according to claim 9, wherein when it is determined not to split said current block for encoding, encoding said current block comprises updating a quantization parameter map, wherein said quantization parameter map comprises indexes representative of quantization parameters assigned to the subblocks of said picture.

    13. The method according to claim 8, wherein said first rate-distortion cost RD.sub.non-split for said current block when said current block is not split is determined according to following the equation: R .Math. D non .Math. - .Math. s .Math. p .Math. l .Math. i .Math. t = ( .Math. i = 1 4 .Math. D i ( q 0 ) s ( i ) ) + R S .Math. B ( q 0 ) , where R.sub.SB(q.sub.0) corresponds to the total bits cost for encoding the current block and D.sub.i(q.sub.0) corresponds to the distortion computed for each subblock of said current block.

    14. An apparatus for encoding a picture, comprising at least one processor and at least one memory, said at least one processor being configured to: determine a first rate-distortion cost RD.sub.non-split for a current block of said picture when said current block is not split into subblocks, from a distortion computed for each distortion for each subblock i of said current block, said distortion being scaled by an inverse of a lagrangian parameter .sub.s(i) determined according to a quantization parameter q.sub.i assigned to said each subblock determine a first rate-distortion cost RD.sub.split for said current block when said current block is not split as the sum of rate-distortion costs of all subblocks in the current block using assigned quantization parameters q.sub.i and the Lagrange parameters .sub.s(i); determine that the current block is split if RD.sub.non-split is larger than RD.sub.split; encode the current block using a common quantization parameter q.sub.0 if the current block is not split or the subblocks in the current block using the assigned quantization parameters q.sub.i if the current block is split.

    15. The apparatus according to claim 14, wherein the quantization parameter q.sub.0 assigned to said current block when said current block is not split is the minimum value of the quantization parameters q.sub.i initially assigned to the subblocks of the current block.

    16. The apparatus according to claim 14, wherein the quantization parameter q.sub.0 assigned to said current block when said current block is not split, is the quantization parameter from among the quantization parameters q.sub.i initially assigned to the subblocks that results in the lowest RD.sub.non-split.

    17. The apparatus according to claim 15, wherein if said current block is not split for encoding, the processor is configured to encode the current block by quantifying datas for said current block using said assigned quantization parameter q.sub.0.

    18. The apparatus according to claim 14, wherein when it is determined not to split said current block for encoding, the processor is configured to encode the current block by updating a quantization parameter map, wherein said quantization parameter map comprises indexes representative of quantization parameters assigned to the subblocks of said picture.

    19. The apparatus according to claim 8, wherein said first rate-distortion cost RD.sub.non-split for said current block when said current block is not split is determined according to following the equation: R .Math. D non .Math. - .Math. s .Math. p .Math. l .Math. i .Math. t = ( .Math. i = 1 4 .Math. D i ( q 0 ) s ( i ) ) + R S .Math. B ( q 0 ) , where R.sub.SB(q.sub.0) corresponds to the total bits cost for encoding the current block and D.sub.i(q.sub.0) corresponds to the distortion computed for each subblock of said current block.

    20. A computer program comprising software code instructions for performing the method according to claim 1, when the computer program is executed by a processor.

    Description

    4. BRIEF DESCRIPTION OF THE DRAWINGS

    [0028] FIG. 1 illustrates an exemplary QP assignment map to blocks of a picture,

    [0029] FIG. 2A illustrates exemplary blocks partitioning into subblocks,

    [0030] FIG. 2B illustrates a block diagram of an exemplary method for encoding a video according to an embodiment of the present principle,

    [0031] FIG. 3 illustrates an exemplary QP assignment and block partitioning,

    [0032] FIG. 4 illustrates a flow diagram of an exemplary method for encoding a picture according to an embodiment of the present principle,

    [0033] FIG. 5 illustrates a flow diagram of an exemplary method for encoding a picture according to another embodiment of the present principle,

    [0034] FIG. 6 illustrates an exemplary QP assignment and block partitioning according to an embodiment of the present principle,

    [0035] FIG. 7 illustrates a flow diagram of an exemplary method for encoding a picture according to another embodiment of the present principle,

    [0036] FIG. 8 illustrates an exemplary encoder that may be used in one embodiment of the present principle.

    5. DESCRIPTION OF EMBODIMENTS

    [0037] The principle disclosed herein is described for encoding a picture from a video sequence, however the disclosed principle may be applied to still digital pictures encoding as well.

    [0038] For encoding, a picture is first subdivided into a set of units of pixels, which will be called blocks for simplicity.

    [0039] Depending on the video coding standard used, a unit of pixels may be called macroblock (MB) such as in H.264/AVC or a Coding Tree Unit (CTU) such as in HEVC, or a super-block (SB) such as in a VPx encoder.

    [0040] According to an H.264/AVC encoder, each macroblock comprises a 1616 block of luminance samples and in the usual case of 4:2:0 color sampling, two corresponding 88 blocks of chroma samples. A macroblock of size 1616 pixels may itself be subdivided into subblocks of size ranging from 88 to 44 pixels. Encoding of a macroblock may then be performed at the macroblock level or by encoding each subblock of the macroblock individually.

    [0041] According to an HEVC encoder, a coding tree unit comprises a coding tree block (CTB) of luminance samples and two coding tree blocks of chrominance samples and corresponding syntax elements regarding further subdividing of coding tree blocks. A coding tree block of luminance samples may have a size of 1616 pixels, 3232 pixels or 6464 pixels. Each coding tree block can be further subdivided into smaller blocks (known as coding blocks CB) using a tree structure and quadtree-like signaling. The root of the quadtree is associated with the coding tree unit. The size of the luminance coding tree block is the largest supported size for a luminance coding block. One luminance coding block and ordinarily two chrominance coding blocks form a coding unit (CU). A coding tree unit may contain one coding unit or may be split to form multiple coding units. The luminance and chrominance coding blocks can be further split in size. The HEVC standard supports variable block sizes from 6464 down to 44 samples for prediction.

    [0042] According to a VP9 encoder, the picture is subdivided into super-blocks of size 6464 pixels, and each super-block may be divided into smaller blocks in a quad-tree fashion.

    [0043] Depending on the video coding standard used, different splitting configuration may be possible. A square block may be split horizontally and/or vertically into 2 or 4 subblocks. FIG. 2A illustrates an exemplary splitting configuration for two square blocks 20 and 21. The block 21 has been split into 4 square subblocks 210, 211, 212, 213. A square subblocks may be further split horizontally and/or vertically. As shown in FIG. 2, the subblock 211 has been further split horizontally into 2 subblocks 2110 and 2111.

    [0044] The vertical or horizontal subblocks issued from a vertical or horizontal splitting may not have a same size. For instance, FIG. 2A illustrates the vertical splitting of the block 20 into two subblocks 200 and 201, with a vertical splitting line positioned at the first quarter of the horizontal size of the block 20.

    [0045] The splitting configuration of a block is generally decided by a rate-distortion optimization process when determining a best coding mode for coding the block.

    [0046] FIG. 2B illustrates a block diagram of an exemplary encoder for encoding a video according to an embodiment of the present principle. The video encoder 2000 disclosed here below may be conforming to any video or still picture encoding schemes.

    [0047] Classically, the video encoder 2000 may include several modules for block-based video encoding, as illustrated in FIG. 2B. A picture I to be encoded is input to the encoder 2000. The picture I is first subdivided into a set of blocks by a subdividing module (M31). Each block BLK of the picture I is then processed for encoding. Depending on the video coding standard used, a block BLK may correspond to an H.264/AVC macroblock, or an HEVC coding tree unit, or any subblock from one of the units described above, or any other layout of subdivision of picture I.

    [0048] The encoding process described below is for illustration purposes. According to some embodiments, encoding modules may be added, or removed or may vary from the following modules. However, the principle disclosed herein could still be applied to these variants.

    [0049] The encoder 2000 performs encoding of each block BLK of the picture I as follows. The encoder 2000 comprises a mode selection unit (M20) for selecting a coding mode for a block BLK of the picture to be coded, e.g. based on a rate/distortion optimization. Such a mode selection unit comprising:

    a motion estimation module (M21) for estimating motion between one current block of the picture to be coded and reference pictures,
    a motion compensation module (M22) for predicting the current block using the estimated motion,
    an intra prediction module (M23) for spatially predicting the current block.

    [0050] The mode selection unit (M20) may also decide whether splitting of the block is needed according to rate/distortion optimization. In that case, the mode selection unit (M20) loops on the subblocks of the block BLK for determining a best coding mode for each one of the subblocks of the block BLK.

    [0051] The block mode selection unit (M20) performs the encoding of the block for each candidate coding mode for the block BLK and computes a rate-distortion cost for each of these coding modes. The coding mode providing the lowest rate-distortion cost is selected as the best coding mode for the current block BLK. A candidate coding mode may be any coding mode available for coding the block and depends on the video compression standards used. For instance, for an HEVC coder, candidate coding modes may be chosen from one of the 36 intra prediction modes, an inter prediction mode using an estimated motion vector, a merge coding mode deriving motion information from spatial and. or temporal neighbor blocks, etc.

    [0052] Once a coding mode is selected for the current block BLK or coding modes for subblocks of the current block BLk are selected, the mode selection unit (M20) delivers a predicted block PRED and corresponding syntax elements to be coded in the bitstream for performing the same block prediction at a decoder. When the current block BLK has been split, the predicted block PRED is formed by the set of predicted subblocks delivered by the mode selection unit (M20) for each subblocks.

    [0053] A residual block RES is then obtained by subtracting the predicted block PRED from the original block BLK.

    [0054] The residual block RES is then transformed by a transform processing module (M24) delivering a transform block TCOEF of transformed coefficients. The transform block TCOEF is then quantized by a quantization module (M25) delivering a quantized transform block QCOEF of quantized residual transform coefficients.

    [0055] The syntax elements and quantized residual transform coefficients of the block QCOEF are then input to an entropy coding module (M26) to deliver coded data to form the coded bistream STR.

    [0056] The quantized residual transform coefficients of the quantized transform block QCOEF are processed by an inverse quantization module (M27) delivering a block TCOEF of unquantized transform coefficients. The block TCOEF is passed to an inverse transform module (M28) for reconstructing a block of residual prediction RES.

    [0057] A reconstructed version REC of the block BLK is then obtained by adding the prediction block PRED to the reconstructed residual prediction block RES.

    [0058] The reconstructed block REC is stored in memory for use by a picture reconstruction module (M29). The picture reconstruction module (M29) performs reconstruction of a decoded version I of the picture I from the reconstructed blocks REC. The reconstructed picture I is then added to a reference picture memory (M30) for later use as a reference picture for encoding the following pictures of the set of pictures to code or for encoding subsequent blocks of the picture I.

    [0059] When performing the rate-distortion optimization for a block BLK, the block mode selection unit (M20) may estimate the bitrate R of a candidate coding mode by performing all the encoding steps for encoding the block BLK in the candidate coding mode, that is by performing transform, quantization and entropy coding, so as to evaluate the real coding cost and distortion of the reconstructed block. The distortion D of the rate-distortion cost for the block BLK in the candidate coding mode is computed as the distortion between the original block BLK and the reconstructed block REC, for instance using a mean square error. The rate-distortion cost RD for a candidate coding mode is then computed by RD=D+R, with being a lagrange parameter.

    [0060] When the block BLK can be further split for encoding, the rate-distortion cost associated to the encoding of the block BLK in a splitting configuration, with the best coding modes associated to each subblock of the block BLK should be computed to be compared with the rate-distortion cost of the best coding mode when the block BLK is not split. So, that a decision is made as to whether to split the current block BLK for coding or not. Different splitting configurations may also be compared, such as horizontal splitting, vertical splitting, horizontal and vertical splitting, etc.

    [0061] In a VP9 encoder, for instance, the rate-distortion optimization process is performed by taking into account a quantization parameter (QP) assignment map determined during a pre-encoding stage. Such a pre-encoding stage determines quantization parameters QP that should be used when encoding the blocks of the picture I. For instance, a QP assignment map is determined for blocks having a size of 1616 pixels. Such a QP assignment map may be determined according to spatial activity computed over the 1616 blocks and classifying the computed spatial activity values. Each class of spatial activity is then associated to a QP parameter.

    [0062] In the VP9 encoder, the quadtree structure of a 6464 super-block is decided as follows by the rate-distortion optimization, for a block of the quadtree:

    If the block size is smaller or equal to a 1616 block of the input QP assignment map, then the block is given the QP from the QP assignment map.
    Otherwise, the QP is decided as a function of the block spatial activity which is re-computed over the whole block surface,
    The rate-distortion cost for the current block is then computed by:


    Cost.sub.RD=D+(q)R

    [0063] Where D is the distortion (L2, i.e. mean square error) of the current block when coded with its coding parameters, R is the associated rate (in number of coding bits) and is the Lagrange parameter that depends on the block's quantization parameter q. According to the video coding standard used, the Lagrange parameter is derived from the QP q assigned to the current block.

    [0064] When deciding the quad-tree structure, the video encoder uses competition between many block sizes by rate-distortion optimization to find the best block partitioning to encode the region overlapped by the blocks of the quad-tree structure. In the context of multiple QP encoding, this competition is done between heterogeneous blocks in terms of QP and Lagrange parameters, as illustrated on FIG. 3. FIG. 3 illustrates a competition for coding a large block 30 as a whole with an assigned QP q.sub.0 or in a splitting configuration with 4 subblocks 301, 302, 303, 304 with respective assigned QP q.sub.1, q.sub.2, q.sub.3, and q.sub.4. The rate-distortion cost for the block 30 coded as a whole block is RD.sub.0=D.sub.0+(q.sub.0)R.sub.0, with D.sub.0 the distortion computed for the block 30 reconstructed from its coding parameters, R.sub.0 the corresponding coding rate and (q.sub.0) the lagrange parameter associated to the assigned QP. The rate-distortion cost for the block 30 coded as 4 subblocks 301, 302, 303 and 304 is computed by RD.sub.1=.sub.i=1.sup.4D.sub.i+(q.sub.i)R.sub.i, with D.sub.i the distortion computed for the subblock 30i reconstructed from its coding parameters, R.sub.i the corresponding coding rate and (q.sub.i) the Lagrange parameter associated to the QP assigned to the subblock 30i. The decision to split the block 30 is made according to the comparison of the coding cost RD.sub.0 and RD.sub.1. The lowest coding cost is chosen. According to this method, the rate-distortion cost associated to the split mode (RD.sub.1) is not correct, because rate distortion costs are mixed although they are not additive in the case that the q.sub.i of the subblocks are not the same.

    [0065] Therefore, the rate-distortion optimization process joint to the QP assignment map disclosed above is not optimal.

    [0066] Therefore, a method for encoding a picture is disclosed. Such an encoding method allows determining a splitting configuration for a current block to be encoded when quantization parameters have already been assigned to subblocks of the current block, for instance, when the quantization parameters have been decided in a pre-encoding stage. The disclosed method determines a rate-distortion cost for the current block when the current block is coded as a whole block, i.e. when the current block is not split, by taking into account the quantization parameters assigned to the subblocks of the current block. The methods disclosed below may be implemented by the mode selection module (M20) disclosed in reference with FIG. 2B, or may be implemented in any rate-distortion optimization methods wherein a QP assignment map is built in a pre-encoded stage.

    [0067] It is assumed here that quantization parameters have been assigned to subblocks of the picture to encode in a pre-encoding stage, as illustrated on FIG. 1, providing a QP map of a the picture. The present principle is disclosed below in the case of an encoding of the QP map according to a VPx encoding video compression schemes. However, the present principle applies to any QP map encoding techniques.

    [0068] According to the embodiment disclosed here above, the QP map determined for the picture is encoded by encoding a header and a map of index. Such a map of index is similar to the QP map, wherein assigned quantization parameters are replaced by an index. The header carries the data indicating the association of the index to a value of a quantization parameter assigned to a subblock. According to this embodiment, the number of different quantization parameters in the QP map is limited by the number of index coded in the header.

    [0069] The index map may be used by the encoder to share other parameters for encoding the block of the index map. For instance in a VP9 encoder, the header disclosed above is used for assigning to a given index (also known as segment-ID in the VP9 encoder) encoding features to the blocks to which the index has been assigned in the index map. Such encoding features may be for example: restrictions on the reference frames that can be used for each index, coefficients skips, quantization parameter, loop filter strength, transform size options. All the subblocks sharing a same index or segment-ID forms what is commonly known as a segment of the picture.

    [0070] FIG. 4 illustrates a flow diagram of an exemplary method for encoding a picture according to an embodiment of the present principle.

    [0071] In step 40, a priority level is assigned to each segment under the form of a Lagrange parameter as a function of the QP assigned to the segment by:

    [0072] sP, .sub.s=f(q.sub.s), where P is the picture to encode, s represents a segment in the picture, q.sub.s is the quantization parameter assigned to the segment s in the pre-encoding stage and .sub.s is the calculated Lagrange parameter.

    [0073] The function f depends on the video encoder used, for instance a relationship between the Lagrange parameter and the quantization parameter may be:

    [00001] s = * 2 ( ( q s - 12 ) 3 ) ,

    being a constant set for the video encoder used.

    [0074] In step 41, when the current block overlaps at least two subblocks to which different quantization parameters have been assigned, a quantization parameter q.sub.0 is assigned to the current block 30. Such a quantization parameter q.sub.0 is for example a minimum value of the quantization parameters assigned to the subblocks of the current block 30, i.e. q.sub.0=min{q.sub.1,q.sub.2,q.sub.3,q} in the example shown in FIG. 3. That is to say that when determining a best coding mode for the current block in a non-split configuration, the quantization parameter q.sub.0 is assigned to the current block for the quantization process.

    [0075] According to this embodiment, when at least two subblocks overlapped by the current block have different quantization parameters assigned, a single quantization parameter is assigned to the current block for encoding the current block as a whole.

    [0076] When all the subblocks overlapped by the current block have been assigned a same quantization parameter q.sub.0, this quantization parameter is assigned to the current block 30.

    [0077] In step 42, a rate-distortion cost RD.sub.non-split for the current block 30 coded as a whole, i.e. non split, is computed by RD.sub.non-split=.sub.i=1.sup.4D.sub.i(q.sub.0)+.sub.s(i)R.sub.i(q.sub.0), with D.sub.i(q.sub.0) the distortion computed for the subblock 30i reconstructed after encoding and decoding of the current block 30 coded as a whole from the coding parameters of its best coding mode in a non-split configuration and using the quantization parameter q.sub.0 assigned to the current block, R.sub.i(q.sub.0) the coding rate corresponding to the encoding of the subblock 30i when encoding the current block 30 in a non-split configuration and using the quantization parameter q.sub.0 assigned to the current block, and .sub.s(i) the Lagrange parameter corresponding to the Lagrange parameter assigned to the segment s(i) to which the subblock 30i belongs.

    [0078] In practice, when encoding the current block 30 in a non-split configuration, the coding rate R.sub.i(q.sub.0) corresponding to the bitrate used for encoding the datas corresponding to the subblock 30i is difficult to assess as it is difficult to distinguish the bit cost associated to each individual subblock when the current block is being encoded in a non-split configuration. This is because for the current block encoded in a non-split configuration, a single large prediction, transform and entropy coding may be applied to the entire current block, overlapping all subblocks comprised in the current block. Therefore, the computation of the rate-distortion cost RD.sub.non-split for the current block 30 in a non-split configuration is modified as follows:

    [00002] R .Math. D non .Math. - .Math. split = .Math. i = 1 4 .Math. ( D i ( q 0 ) s ( i ) + R i ( q 0 ) ) = ( .Math. i = 1 4 .Math. D i ( q 0 ) s ( i ) ) + R S .Math. B ( q 0 ) ,

    where R.sub.SB(q.sub.0) corresponds to the total bits cost for encoding the entire current block 30.

    [0079] In step 43, a rate-distortion cost RD.sub.split for the current block in a splitting configuration is computed as a sum of rate-distortion costs computed for each subblock of the split block 30, (301, 302, 303 and 304), by:

    [00003] RD split = .Math. i = 1 4 .Math. D i ( q i ) s ( i ) + R i ( q i ) = ( .Math. i = 1 4 .Math. D i ( q i ) s ( i ) ) + R S .Math. B ,

    with D.sub.i(q.sub.i) the distortion computed for the subblock 30i reconstructed from the coding parameters of its best coding mode and using the QP q.sub.i assigned to this subblock, R.sub.i(q.sub.i) the coding rate corresponding to the subblock 30i, .sub.s(i) the Lagrange parameter corresponding to the Lagrange parameter assigned to the segment s(i) to which the subblock 30i belongs, R.sub.SB corresponding to the total coding cost of the current block 30 when it is coded in a split configuration.

    [0080] In step 44, splitting or not splitting the current block is determined by comparing the rate-distortion costs RD.sub.non-split and RD.sub.split. If the lowest rate-distortion cost is RD.sub.split, the current block is split, otherwise the current block is not split.

    [0081] In step 45, the current block is encoded according to the decision made at step 44 on whether to split or not the current block. The encoding of the current block is performed, for instance, as disclosed in the encoding process disclosed with FIG. 2B.

    [0082] FIG. 5 illustrates a flow diagram of an exemplary method for encoding a picture according to another embodiment of the present principle. According to this embodiment, the quantization parameter assigned to the current block for encoding the current block in a non-split configuration is determined in an optimal way.

    [0083] According to this embodiment, steps 40 and 43-45 of FIG. 5 are similar to steps 40 and 43-45 from FIG. 4 and are not discussed here.

    [0084] In step 51, when the current block overlaps at least two subblocks to which different quantization parameters have been assigned, a quantization parameter q.sub.agg is assigned to the current block 30.

    [0085] According to this embodiment, the quantization parameter q.sub.agg is determined as being a quantization parameter providing a minimum rate-distortion cost from the rate-distortion costs computed for the current block when said current block is not split, using the quantization parameters q assigned to the subblocks of the current block. That is:

    [00004] q a .Math. g .Math. g = Arg .Math. .Math. min q .Math. .Math. .Math. { q ( s ) , s .Math. .Math. .Math. .Math. P } .Math. ( ( .Math. i .Math. .Math. .Math. .Math. SB .Math. D i ( q ) s ( i ) ) + R S .Math. B ( q ) ) ,

    where q(s) is the quantization parameter of the segment s, P being the set of segments of the subblocks overlapped by the current block, SB is the set of subblocks overlapped by the current block, D.sub.i(q) is the distortion computed for the subblock i of the current block when encoding the current block in non-split configuration with quantization parameter q, .sub.s(i) is the Lagrange parameter assigned to the segment s(i) to which the subblock i belongs, R.sub.SB(q) is the total bit cost of the current block when encoding the current block in non-split configuration with the quantization parameter q.

    [0086] According to this embodiment, a best coding mode is searched for encoding the current block is a non-split configuration using each quantization parameter available in the set of subblocks overlapped by the current block. The quantization parameter q providing the lowest coding cost for the current block in a non-split configuration is selected as the quantization parameter q.sub.agg for the current block.

    [0087] According to a variant, the quantization parameter q.sub.agg is determined as being a quantization parameter providing a minimum rate-distortion cost from the rate-distortion costs computed for the current block when said current block is not split, using the quantization parameters q assigned to the subblocks of the picture to encode. According to this variant, the quantization parameter is computed in a similar manner as above by

    [00005] q a .Math. g .Math. g = Arg .Math. min q .Math. .Math. .Math. { q ( s ) , s .Math. .Math. .Math. .Math. P } ( ( .Math. i .Math. .Math. .Math. .Math. SB .Math. D i ( q ) s ( i ) ) + R S .Math. B ( q ) )

    where P here stands for the set of segments of the QP map of the picture to encode. According to this variant, all the quantization parameters of the QP map are evaluated.

    [0088] According to this embodiment and to any one of the variants disclosed above for determining the quantization parameter q.sub.agg, the rate-distortion cost RD.sub.non-split for the current block in the non-split configuration has already been computed when searching q.sub.agg:

    [00006] R .Math. D non .Math. - .Math. split = ( .Math. i .Math. .Math. .Math. .Math. SB .Math. D i ( q agg ) s ( i ) ) + R S .Math. B ( q a .Math. g .Math. g ) .

    The rate-distortion cost RD.sub.non-split is retrieved from the searched if the results have been stored or else recomputed.

    [0089] The present principle has been described above according to an example wherein a current block comprises 4 subblocks to which quantization parameters have been assigned. The present principle could be applied to a more general example, wherein the current block comprises more or less than 4 subblocks.

    [0090] More particularly, the principle disclosed above may also be applied for deciding horizontal or vertical splitting of the current block, as well as the splitting of the subblocks of the current block, and to any partitioning such as the one disclosed with FIG. 2A.

    [0091] In a general case, the rate-distortion cost computed for a current block is computed by:

    [00007] J S .Math. B = ( i .Math. .Math. .Math. .Math. SB .Math. D i ( q o ) s ( i ) ) + R S .Math. B ,

    with SB being the set of subblocks overlapped by the current block, D.sub.i(q.sub.0) the distortion computed for a subblock i reconstructed from the encoding of the current block in non-split configuration, q.sub.0 the quantization parameter assigned to the current block, .sub.s(i) the Lagrange parameter corresponding to the Lagrange parameter assigned to the segment s(i) to which the subblock i belongs, R.sub.SB corresponding to the total coding cost of the current block.

    [0092] The principle disclosed above may be applied in a bottom-to-top block size rate-distortion competition approach that is when subblocks of a current block may be recursively aggregated until the size of the current block.

    [0093] FIG. 6 illustrates a large block 60 that may be split into four blocks 61, 62, 63 and 64 (configuration (b) on FIG. 6). Each block 61, 62, 63 and 64 may be further split into subblocks (configuration (a) on FIG. 6). The quantization parameters assigned to the subblocks in the pre-encoding stage are indicated on FIG. 6 (configuration (a)) inside each subblock of the large block 60.

    [0094] The encoding method disclosed above can thus be applied when performing rate-distortion optimization for determining for each of the blocks 61-64 if the block should be encoded in a split configuration (i.e. by encoding each subblock individually in the given example) or in a non-split configuration.

    [0095] Configuration (b) of FIG. 6 illustrates the results in which it has been determined that each block 61-64 should be coded in a non-split configuration. Therefore, according to this example, the configuration (b) of FIG. 6 illustrates updated quantization parameters for the subblocks, with a same single quantization parameter that has been assigned to the block to which the subblock belongs. This same single quantization parameter may be determined according to any one of the embodiments disclosed above.

    [0096] The encoding method disclosed above can then be applied when performing rate-distortion optimization for determining for the large block 60 if the large block 60 should be encoded in a split configuration or in a non-split configuration. According to this embodiment, when computing the rate-distortion cost for encoding the large block 60 in a non-split configuration (configuration (c) on FIG. 6), the rate-distortion cost is computed from the distortion computed for each subblock of the large block using the Lagrange parameter assigned to the initial quantization parameter assigned to the subblock in the pre-encoding stage.

    [0097] FIG. 7 illustrates a flow diagram of an exemplary method for encoding a picture according to another embodiment of the present principle. According to this embodiment, the decisions for encoding the current block have been performed according to any one of the embodiments disclosed above in relation with FIG. 4 or 5. The steps disclosed below may be implemented in the encoder disclosed in relation with FIG. 2B.

    [0098] According to the embodiment disclosed below, at step 45, if it has been determined that the current block is encoded in a non-split configuration, when quantifying datas of the current block, for instance by the quantization module (M25) from FIG. 2B, in step 70, the quantization parameter q.sub.0 assigned to the current block is used for quantifying datas.

    [0099] In step 71, the QP map of the picture to encode is updated before being encoding. For the subblocks overlapped by a current block that is to be encoded in a non-split configuration, the quantization parameters of these subblocks are updated with the quantization parameter q.sub.0 assigned to the current block. In the index map representative of the indexes of the QP map for the picture to encode, the index of the subblocks belonging to the current block are updated with the index corresponding to the quantization parameter q.sub.0 assigned to the current block. In that way, when decoding the picture, a decoder could use a same quantization parameter as the one used for encoding the current block. The index map is then encoded a classical way, by the entropy coding module (M26) of FIG. 2B for instance.

    [0100] FIG. 8 illustrates the simplified structure of an apparatus (2000) for encoding a picture according to an embodiment of the present principle. Such an apparatus 2000 is configured to implement the method for encoding a picture according to the present principle according to any embodiments disclosed above. The functional units of the encoder apparatus 2000 have been disclosed in reference to FIG. 2B. The structural apparatus 2000 disclosed below may be configured to implement each of these functional units individually or in combination, and according to any one of the embodiments of the principle disclosed above in reference with FIGS. 4-7.

    [0101] According to an embodiment, the encoder apparatus 2000 comprises a processing unit PROC equipped for example with a processor and driven by a computer program PG stored in a memory MEM and implementing the method for encoding a picture according to the present principle.

    [0102] At initialization, the code instructions of the computer program PG are for example loaded into a RAM (not shown) and then executed by the processor of the processing unit PROC. The processor of the processing unit PROC implements the steps of the method for encoding a picture which has been described here above, according to the instructions of the computer program PG.

    [0103] The encoder apparatus 2000 comprises a communication unit COMOUT to transmit an encoded bitstream STR to a data network.

    [0104] The encoder apparatus 2000 also comprises an interface COMIN for receiving a picture or a video to encode.