Abstract:
The method for block coding data, such as video data, via a compression operation includes applying to input-data blocks a discrete-cosine-transform (DCT) operation and a quantization operation to produce compressed-data blocks. The compressed-data blocks are subjected to a coding operation to obtain compressed output flows; and an inverse-quantization operation and an inverse-discrete-cosine-transform (IDCT) operation are applied on the compressed-data blocks to obtain reconstructed blocks. The method includes controlling generation of mismatch errors from the input-data blocks by detecting data blocks from the input-data blocks and compressed-data blocks that are liable to cause mismatch errors, and modifying the blocks that are liable to cause mismatch errors prior to the coding operation.

Description:
FIELD OF THE INVENTION  
       [0001]     The present invention relates to methods and devices for block coding of data, in particular image and video data, via compression including a discrete cosine transform (DCT).  
       BACKGROUND OF THE INVENTION  
       [0002]     The standards of compression based upon DCT include, by way of example, the standards MPEG-1, MPEG-2, MPEG-4 and H.263. The MPEG-4 standard contains an extended set of data-compression procedures. To achieve different goals, the procedures are divided into sets with progressively increasing capacities, referred to as “profiles”. Within each profile, the admissible range of parameters is governed through “levels”. Hence, an implementation of a certain given coding apparatus is specified through a given profile and a given level.  
         [0003]     The MPEG-4 standard enables reduction of the redundancy in the image of a sequence, transforming the data in an appropriate way. Application of an orthonormal transform enables concentration of the energy of the signal in the low-frequency coefficients, the information associated to which will be appropriately reduced to adapt to the channel.  
         [0004]     The correlation of the image is present between pixels that are locally adjacent in the image and between frames that are close to one another in time. For this reason, the MPEG-4 standard enables three different kinds of frames, designated by the letters I, P, and B. The frames I (Intra) are coded without any temporal reference. They require a large number of bits, but enable reconstruction of the quality of the image and have a random access to the sequence. The reconstructed images of type I (anchor frame) are used as references for reconstruction of the images that follow in the sequence.  
         [0005]     The frames P (Inter) are coded using the temporal correlation with the preceding frames of type I or P. The coding device estimates the movement that has occurred between two frames and sends corresponding motion vectors to the decoding device. The residual information, given by the difference between the original image and the information shown obtained from the anchor frame, contains the data that cannot be estimated through motion vectors.  
         [0006]     The frames of type B (two-directional frames) are coded using the temporal correlation with the preceding and following frames of type I or P. Since two possible references are available, the coding device can choose the direction that is less costly in terms of dimensions of the compressed data. Since both the preceding images and the following images are used, the transmission and the temporal order must be modified so as to have all the information necessary for reconstructing the two-directional predicted frames. The profile referred to as “simple” used by the MPEG-4 standard makes use of only frames of type I and P.  
         [0007]     Potentially, coding of the predicted frames (whether P frames or B frames) can cause a mismatch between the coding device and the decoding device. To code a frame of such a type, the coding device must in fact store the preceding frame to be used for the temporal prediction. Consequently, both the coding device and the decoding device reconstruct the current frame, which is used as reference for the future images.  
         [0008]     Theoretically, the coding device and the decoding device would require having available exactly the same set of reconstructed data to reconstruct correctly the decoded image and thus prevent occurrence of the so-called mismatch error between the two images reconstructed at the encoder end and at the decoder end. In practice, minimal differences between the two images are, however, acceptable.  
         [0009]     These differences are due to the particular discrete-cosine-transform procedure used. In fact, the goal of standards, and in particular of the MPEG-4 standard, is to allow the developers and implementers of the circuits the highest possible degree of freedom in implementing of the procedure. Since many DCT algorithms have been developed in the past, different implementers can use their own approaches to get an edge over the competitors, using the most innovative algorithms. However, since each DCT algorithm intrinsically represents a method of approximation of the cosine transform, different approximations generate slightly different results. Standards of the MPEG-4 type define the maximum amount of differences allowed.  
         [0010]     However, since, as explained previously, the images are predicted on the basis of the preceding ones, the difference tends to increase in time. The MPEG-4 standard defines statistically the maximum amount of variation between two images.  
         [0011]     When the coding device and the decoding device operate on different preceding data, because they use different DCT algorithms, the so-called mismatch error thus occurs. As stated previously, the difference between the coding device and the decoding device may be due only to the modules that execute the discrete cosine transform (DCT) and the inverse discrete cosine transform (IDCT). In fact, it is the result on the individual block that can vary between different codings.  
         [0012]     The MPEG-4 standard provides only limits of tolerated error, as may be seen from Annex A of the ISO/IEC 14496-2 recommendation, “Coding of audio—visual objects—Part 2: Visual”, pp. 253-254, Third edition: 2003.  
         [0013]     In particular, the mismatch occurs when the coding device and the decoding device obtain different outputs from the IDCT block. Two different cases may arise: the IDCT of the coding device supplies a zero block, i.e., a block identified by zero coefficients, from a block of the input data flow that originally was non-zero, while the decoding device supplies a non-zero block; or else the IDCT of the coding device supplies a non-zero block, while the decoding device supplies a zero block.  
         [0014]     An example of a similar problem can be obtained from an examination of  FIG. 1 , which represents a working diagram of a coding and decoding method that involves a compression via DCT. In Figure  1 , the reference number  100  consequently designates a coding device, which comprises a block  120  representing a DCT operation and a block  130  representing a quantization operation with a certain quantization step QP. The blocks  120  and  130  receive at input a noncompressed-data flow I, divided into blocks B, and return compressed blocks DB at output, which, via coding operations not represented in detail in  FIG. 1 , involve, for example, the use of Huffman tables, and are then coded in an output compressed-data flow O. CB designates a current block, i.e., the block that is processed at a given instant by the coding device  100 , and that, in the case shown, is assumed as containing non-zero coefficients.  
         [0015]     Present in the coding device  100  is a branch that fetches the compressed-data flow O and executes a set of inverse operations, i.e., an inverse quantization operation in a block  190  and an IDCT operation in a block  195 , to obtain reconstructed blocks RB to be used in the reconstruction of the frames.  
         [0016]     The reference  100 ′ thus designates a decoding device, which receives at input the compressed-data flow O and carries out thereon an inverse-quantization operation represented by a block  190 ′ and an IDCT operation in a block  195 ′, to supply reconstructed blocks RB′ in a decompressed-data flow I′.  
         [0017]      FIG. 1  shows the case where the block RB reconstructed by the coding device  100  and the block RB′ reconstructed by the decoding device  100 ′ are different on account of implementation of different procedures at the coding device  100  and at the decoding device  100 ′. In particular, the block RB reconstructed by the coding device  100  is a zero block, i.e., all its coefficients are zero.  
         [0018]     The MPEG-4 standard strongly recommends avoidance of such a case, i.e., the case where the IDCT of the coding device supplies a zero block, while the output of the coding device itself supplies a non-zero block (section “Mismatch control” ( 7 . 4 . 4 . 5 ) of the ISO/IEC 14496-2 recommendation, “Coding of audio—visual objects—Part 2: Visual”, pp. 253-254, Third edition: 2003). Normally, the effects are not visible, since the margins defined are sufficient to guarantee negligible differences between the frames reconstructed at the coding-device end. However, in particular situations, the results of the mismatch may be very evident.  
         [0019]     For example, when a still image is coded, prediction data with small errors are sent to the decoding device. These data can be reconstructed as zero data by the IDCT in the coding device, whereas they are reconstructed as non-zero data by another type of IDCT implementation at the decoding device. When the same data are present at the coding device in the next image, the same mismatch occurs between the coding device and the decoding device. The errors accumulate in the same points, and the reconstructed images soon diverge.  
         [0020]     Consequently, even though the standards fix quantitative limits of mismatch error, from the state of the art no approaches are known for attenuating or eliminating the mismatch error.  
       SUMMARY OF THE INVENTION  
       [0021]     The object of the present invention is to resolve the drawback described above and to provide an approach that will enable intervention on the mismatch error.  
         [0022]     According to the present invention, the object is achieved by a method for block coding data, such as video data, via a compression operation including applying to input-data blocks a discrete-cosine-transform (DCT) operation and a quantization operation to produce compressed-data blocks. The compressed-data blocks are subjected to a coding operation to obtain compressed output flows; and an inverse-quantization operation and an inverse-discrete-cosine-transform (IDCT) operation are applied on the compressed-data blocks to obtain reconstructed blocks. The method includes controlling generation of mismatch errors from the input-data blocks by detecting data blocks from the input-data blocks and compressed-data blocks that are liable to cause mismatch errors, and modifying the blocks that are liable to cause mismatch errors prior to the coding operation.  
         [0023]     The present invention also includes a corresponding coding device, as well as a computer-program product that can be loaded into the memory of at least one computer and comprises portions of software code for implementing the aforesaid method. As used herein, reference to such a computer-program product is understood as being equivalent to reference to a computer-readable medium containing instructions for controlling a computer system to co-ordinate execution of the method according to the invention. Reference to “at least one computer” is intended to highlight the possibility for the present invention to be implemented in a distributed and/or modular way.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0024]     The invention will now be described, by way of non-limiting example, with reference to the drawing figures, wherein:  
         [0025]      FIG. 1  is a block diagram illustrating a coding and decoding method that involves a compression via DCT in accordance with the prior art;  
         [0026]      FIG. 2  is a block diagram illustrating a first embodiment of a coding device according to the invention; and  
         [0027]      FIG. 3  is a block diagram illustrating a second embodiment of a coding device according to the invention. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0028]     In summary, a block-coding method and a corresponding device for block coding of data are provided, which envisage detecting in the coding step whether a block currently being coded is liable to generate a mismatch error, and, if so, modifying the current block to eliminate the mismatch error.  
         [0029]     To take into account the type of implementation of the coding device, i.e., whether the coding device will be implemented in a purely software way or in a mixed hardware/software way, two different embodiments are proposed, which envisage, respectively: resetting the block coefficients to zero, to enables a simple low-power implementation to be obtained, as will be illustrated more clearly hereinafter with reference to  FIG. 2 ; and incrementing the value of the quantizer to prevent the mismatch, which is illustrated hereinafter with reference to  FIG. 3 , and appears to be the better approach in terms of quality and of PSNR (Peak Signal-to-Noise Ratio) values, even though it requires all the blocks of one and the same macroblock to be coded with a higher quantizer value.  
         [0030]     The first embodiment, which contemplates, that is, zero-ing the coefficients of the block before coding, substantially envisages verifying, after the IDCT at the encoder end, whether a zero block is reconstructed from a block that contains some non-zero DCT coefficients. If this occurs, the coding device is configured for forcing to zero a block in terms of Huffman coding.  
         [0031]      FIG. 2  shows a coding device that implements the first embodiment. Represented, then, in  FIG. 2  is a coding device, designated as a whole by the reference number  200 , which receives at input the noncompressed-data flow I. The noncompressed-data flow I is sent at input to a motion-estimator block  210 , which generates at output motion vectors VM. The noncompressed-data flow I is sent in parallel to one of the inputs of an adder  212  to be added to the output of a frame memory  280 . The frame memory  280  has the function of storing the preceding frame to be used for the operations of temporal prediction together with the motion vectors VM. The sum obtained from the adder  212  is sent at input to a transformation module  220 , which carries out the DCT. The output of the transformation module  220  is supplied to a quantization module  230 , which applies a quantization according to a quantization parameter QP, which is supplied by a rate-control module  270 . The rate-control module  270  operates on the basis of the input signal, i.e., the noncompressed-data flow I, and of the output signal, i.e., a compressed-data flow O, of the coding device  200 , which the module  270  receives at two appropriate inputs of its own.  
         [0032]     Downstream of the quantization module  230  the signal, constituted by the compressed blocks DB, is sent to an inverse-quantization module  290  and to an IDCT module  295 , to obtain decompressed frames O′ to be supplied to the frame memory  280 , after being added to the output of the frame memory  280  in an appropriate adder  214 .  
         [0033]     The output of the quantization module  230  is likewise sent to the output of the coding device  200  through an AC/DC prediction module  235  and a variable-length-coding (VLC) module  240 , which adopts VLC techniques and Huffman coding to produce a coded data flow with a good statistical efficiency of compression. The output of the VLC module  240  is sent to a multiplexer  250 , together with the motion vectors VM. Set downstream of the multiplexer  250  is a buffer  260 , which supplies at output the compressed-data flow O.  
         [0034]     The modules so far described and their arrangements are in themselves known to the state of the art regarding coding devices of an MPEG type. However, according to the invention, in the coding device described in  FIG. 2 , provided downstream of the quantization module  230  and upstream of the AC/DC prediction module  235  is a mismatch-control module  1000 . The mismatch-control module  1000  detects the blocks RB reconstructed by the IDCT module  295  and modifies the compressed blocks DB upstream of the coding performed in the AC/DC prediction module  235  and in the VLC module  240 , via the operation of zero-ing the DCT coefficients of the compressed blocks DB to be coded, should a zero block be reconstructed from a block containing non-zero DCT coefficients.  
         [0035]     The use of the procedure in the mismatch-control module  1000  imposes some constraints upon implementation of the H/W coding device. In fact, after the quantization performed in the quantization module  230 , the data must wait for the results of the inverse quantization and of the IDCT in the blocks  290  and  295  to ensure that there will not be any mismatch. Upstream of the AC/DC prediction module  235  there must hence be inserted an additional buffer contained in the mismatch-control module  1000 , which leads to an increase in the area dedicated to the chip, an increase in the latency of the data, and a reduction in the parallelism between the computing procedures involved.  
         [0036]     A second embodiment of the invention overcomes the drawback of having to wait for the results of the inverse quantizations and of the IDCT before coding via the Huffman table, as well as the deterioration in the PSNR values. The second embodiment prevents the mismatch error without requiring any checks on the reconstructed block downstream of the IDCT, since it is based upon the analysis of the SAD (Sum of Absolute Differences) function and the quantizer values of the current block at the coding-device end. The information is available at the coding-device end because the motion-estimation procedure calculates it to identify the motion vectors.  
         [0037]     The ensuing description of the second embodiment of the method proposed comprises two parts. In a first part a general approach to the mismatch error is provided, which is irrespective of the implementation of particular proprietary algorithmic procedures, for example, of a forward DCT, forward quantization, and inverse quantization type.  
         [0038]     Described in the second part is, instead, the treatment of the specific case of the implementation of the MPEG-4-coding procedure. In the treatment that follows the errors due to the finite-precision arithmetic will not be taken into consideration in a first-order approximation. In a second step, described below, the errors will be considered and a final approach to the problem will be provided.  
         [0039]     Regarding infinite arithmetic approximation, by virtue of Parseval&#39;s theorem, there is a connection between the energy in the DCT domain and the energy in the space domain.  
                 ∑     i   =   1     N     ⁢            x   i          2       =       ∑     i   =   1     N     ⁢            X   i          2               (   1   )             
 
 where x i  indicate coefficients in the space domain corresponding to a block in the input data flow I and Xi indicate coefficients corresponding to the DCT domain. 
 
         [0040]     It is possible to set in relation the SAD function with the energy:  
             SAD   ≤     f   ⁡     (       ∑     i   =   1     N     ⁢            x   i          2       )               (   2   )             
 
         [0041]     The above Equation (2) enables an upper limit to be set to the mismatch error. In fact, if one finds the block that presents the maximum value for the summation  
         ∑     i   =   1     N     ⁢            x   i          2         
 
 producing the mismatch error, it is possible to establish the minimum value for the SAD function that can be used for detecting the occurrence of the mismatch. 
 
         [0042]     Assuming that the coefficients in the space domain x i  represent the data on the mismatch error, we can write  
               SAD   2     =         (       ∑     i   =   1     N     ⁢          x   i            )     2     =         ∑     i   =   1     N     ⁢            x   i          ·       ∑     j   =   1     N     ⁢          x   j                =       ∑     i   =   1     N     ⁢       ∑     j   =   1     N     ⁢            x   i          ⁢          x   j                            (   3   )             
 
 but the following inequality applies:  
                 x   ·   y     ≤       1   2     ⁢     (       x   2     +     y   2       )         ,     ∀   x     ,     y   ∈   ℜ             (   4   )             
 
 Thus, the square of the SAD function is  
               SAD   2     =           ∑     i   =   1     N     ⁢       ∑     j   =   1     N     ⁢            x   i          ⁢          x   j                ≤       1   2     ⁢       ∑     i   =   1     N     ⁢       ∑     j   =   1     N     ⁢     (       x   i   2     +     x   j   2       )             =         1   2     ⁢     (       N   ⁢       ∑     i   =   1     N     ⁢     x   i   2         +     N   ⁢       ∑     j   =   1     N     ⁢     x   j   2           )       =     N   ⁢       ∑     i   =   1     N     ⁢     x   i   2                     (   5   )             
 
 Hence, finally, we obtain  
             SAD   ≤       N   ⁢       ∑     i   =   1     N     ⁢     x   i   2                   (   6   )             
 
 Applying Parseval&#39;s theorem, it is possible to set in relation the energy in the space domain with the energy in the DCT domain, so that  
               SAD   ≤       N   ⁢       ∑     i   =   1     N     ⁢     x   i   2             =       N   ⁢       ∑     i   =   1     N     ⁢     X   i   2                   (   7   )             
 
 where x i  are the coefficients in the space domain, while X i  are the coefficients in the DCT domain. 
 
         [0043]     Finally, on the basis of the equations given above, it is possible to attempt calculation of the minimum value of the SAD function that enables the mismatch error to be prevented. The problem can be solved by finding, from among the blocks that produce the mismatch error, the one presenting the maximum value of energy.  
         [0044]     The impact of the finite-precision arithmetic must be considered in the light of the fact that the previous approach, in particular with reference to Equation ( 7 ) has been obtained considering the validity of Parseval&#39;s theorem, which is, however, only proven when an infinite precision of calculation is assumed.  
         [0045]     In an implementation of a real type, the DCT is calculated using finite-precision arithmetic, so that it is necessary to take into account that the Parseval relation becomes  
             E   =         1   N     ⁢       ∑     i   =   1     N     ⁢            x   i          2         =       1   N     ⁢       ∑     i   =   1     N     ⁢            X   i          2                   (   8   )             
 
 where E is the block energy. In the above calculation the SAD function in the space domain and the energy in the DCT domain are calculated, so that the FDCT (Finite Discrete Cosine Transform) error must be appropriately studied. 
 
         [0046]     Assuming the finite-precision calculations as an error E that affects each DCT coefficient, we can write the relation 
 
 X   i   ={overscore (X)}   i +ε i   ; i= 1, . . . 64  (9) 
 
 where X i  indicates the ideal value of the DCT coefficient, {overscore (X)} i  is the DCT coefficient obtained with the finite-precision arithmetic and ε i  is the error. 
 
         [0047]     Assuming that X i , ε i ∈         ∀i, we have  
             E   =         1   N     ⁢       ∑     i   =   1     N     ⁢                X   _     i     +     ɛ   i            2         =         1   N     ⁢       ∑     i   =   1     N     ⁢     (         X   _     i   2     +     2   ⁢       X   _     i     ⁢     ɛ   i       +     ɛ   i   2       )         =       1   N     ⁢     (         ∑     i   =   1     N     ⁢       X   _     i   2       +       ∑     i   =   1     N     ⁢     ɛ   i   2       +     2   ⁢       ∑     i   =   1     N     ⁢         X   _     i     ⁢     ɛ   i             )                   (   10   )             
 
         [0048]     Given a maximum error ε x =max(ε i , i=1, . . . , 64), we obtain  
             E   ≤       1   N     ⁢     (         ∑     i   =   1     N     ⁢       X   _     i   2       +     N   ⁢           ⁢     ɛ   x   2       +     2   ⁢           ⁢     ɛ   x     ⁢       ∑     i   =   1     N     ⁢       X   _     i           )               (   11   )             
 
         [0049]     The relation with the SAD function will be  
             SAD   ≤       N   ⁢       ∑     i   =   1     N     ⁢     x   i   2           ≤       N   ⁡     (         ∑     i   =   1     N     ⁢       X   _     i   2       +     N   ⁢           ⁢     ɛ   x   2       +     2   ⁢           ⁢     ɛ   x     ⁢       ∑     i   =   1     N     ⁢       X   _     i           )                 (   12   )             
 
         [0050]     In the real case, to be able to exploit the approach described above, it is necessary to take into account the particular implementation of the IDCT.  
         [0051]     Once the real implementation of the encoder has been fixed, it is thus sufficient to identify the block having maximum SAD that causes mismatch error and to use the value as upper limit Th for the equation 12. It is possible to identify also a minimum value Qpmin of the quantization parameter QP above which the mismatch does not occur. This makes it possible to avoid that blocks presenting a value assumed by the SAD function (designated in what follows as value S) lower than the threshold identified will be considered as being affected by mismatch errors when in actual fact they are not.  
         [0052]     Consequently, the pseudocode that describes the operation of detection of the mismatch, on the basis of the value calculated in this example of embodiment, would be:  
         [0000]     If (QP&lt;=QPmin &amp;&amp;  SAD&lt;Th )  
         [0053]     MismatchWarning( );  
         [0000]     where the function MismatchWarning( ) is the function that handles the modification.  
         [0054]     The function MismatchWarning( ) corresponding to the modification operations can have two possible embodiments that envisage the operations either of: 
        resetting the block to be coded; or else of     incrementing the value of the quantization step QP=QPmin+1.        
 
         [0057]     The first approach is simple to implement and, moreover, the blocks that follow can be turned off, with a consequent lower energy consumption. The second approach is simple to implement and ensures a higher quality in so far as some of the blocks detected as being affected by mismatch, with QP=QPmin+1, will certainly not in fact be affected.  
         [0058]     The pseudocode corresponding to the function MismatchWarning( ) for the first approach that envisages block resetting is:  
         [0000]     For each block b  
         [0000]     If (SAD (b)&lt;=Th and QP&lt;=QPmin)  
         [0059]     ResetBlock (out_b);  
         [0060]     ResetBlock (recon_b);  
         [0061]     Else 
        dct_b=DCT (in_b);     out_b=Q (dct_b);     iq_b=IQ (out_b);     recon_b=IDCT (iq_b);     VLC (out_b);        
 
         [0067]     The index b indicates the block B that is each time examined as regards SAD and QP values, i.e., the current block CB. dct_b, iq_b, recon_b and VLC represent variables corresponding to application of DCTs, quantizations, inverse quantizations and VLC coding to the blocks B at input, in_b, or at output, out_b.  
         [0068]     An example of procedure in pseudocode comprising the function MismatchWarning( ) for the second approach, with the strategy of incrementation of the quantization step QP, is:  
         [0000]     For each block b  
         [0069]     If (SAD (b)&lt;=Th and QP&lt;=QPmin) 
        QP=QPmin+1;     dct_b=DCT (in_b);     out_b=Q (dct_b);     iq_b=IQ (out_b);     recon_b=IDCT (iq_b);        
 
         [0075]     VLC (out_b);  
         [0076]      FIG. 3  shows a possible implementation, in a coding device  300 , of the second approach for controlling mismatch described above, with the strategy of incrementation of the quantization step QP. In  FIG. 3 , the modules having functions similar to the ones already described with reference to  FIG. 2  are designated by the same reference numbers.  
         [0077]     In  FIG. 3 , a mismatch-control block  1100  is inserted so as to receive from the motion estimator  210  at one input thereof macroblocks MB derived from the noncompressed-data flow I, and at another input thereof values S of the corresponding SAD function; at a third input, the mismatch-control block  1100  receives the value of the quantization step QP applied in the compression of the current macroblock from the rate-control module  270 .  
         [0078]     At output, the mismatch-control module  1100  supplies a macroblock to be coded MB′ to the adder  212 , and a minimum quantizer value Qmin to the rate-control module  270 . The function MismatchWarning( ) fixes the minimum value of the quantization step QP to increase the PSNR. Consequently, the procedure can, for example, be represented, in terms of program instructions in pseudocode, also as:  
         [0079]     MB′=MB;  
         [0080]     If (QP&lt;=QPmin &amp;&amp; SAD&lt;=Th) 
        Qmin=QPmin+1;        
 
         [0082]     else 
        Qmin=1 
 
 It should be noted that, in this case, the direct DCT, the quantization, the inverse quantization, and the inverse DCT can be avoided, with a lower energy consumption. 
       
 
         [0084]     The major advantages of this type of approach include: the loop-coding device does not require any modifications; the block is coded just once; multitasking is allowed, so that each block can process different macroblocks (i.e., the quantization block can process a macroblock, whilst the DCT block can process a subsequent macroblock at the same time); a lower-limit constraint is set on the quantizer value only for critical macroblocks; and the embodiment is very simple to implement and does not require an excessive use of resources.  
         [0085]     In actual fact, not all the blocks that present a value of the SAD function lower than the value established will give rise to mismatch. Using this procedure, a lower limit is set on the quantizer value also for these macroblocks. Consequently, without prejudice to the principle of the invention, the details of implementation and the embodiments may vary, even significantly, with respect to what is described and illustrated herein, purely by way of non-limiting example, without thereby departing from the scope of the invention, as defined in the ensuing claims.  
         [0086]     For example, regarding the procedure of identification of the values of SAD function and of minimum quantization parameter, it is possible to obtain the values even in another way, for example, via an exhaustive procedure that tries all the combinations of values, according to a so-called ‘brute force’ approach.