GB2437579A - Hierarchical coding involving partitioning child level coefficients based on the partitioning of the parent level - Google Patents
Hierarchical coding involving partitioning child level coefficients based on the partitioning of the parent level Download PDFInfo
- Publication number
- GB2437579A GB2437579A GB0616384A GB0616384A GB2437579A GB 2437579 A GB2437579 A GB 2437579A GB 0616384 A GB0616384 A GB 0616384A GB 0616384 A GB0616384 A GB 0616384A GB 2437579 A GB2437579 A GB 2437579A
- Authority
- GB
- United Kingdom
- Prior art keywords
- prediction
- coding
- data
- parent
- level
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000638 solvent extraction Methods 0.000 title claims abstract description 17
- 238000000034 method Methods 0.000 claims abstract description 109
- 238000013139 quantization Methods 0.000 abstract description 2
- 230000033001 locomotion Effects 0.000 description 135
- 239000013598 vector Substances 0.000 description 69
- 230000003044 adaptive effect Effects 0.000 description 16
- 230000008569 process Effects 0.000 description 16
- 230000006870 function Effects 0.000 description 15
- 238000004422 calculation algorithm Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 12
- 230000008901 benefit Effects 0.000 description 11
- 238000000354 decomposition reaction Methods 0.000 description 11
- 241000023320 Luma <angiosperm> Species 0.000 description 10
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 description 10
- 238000013459 approach Methods 0.000 description 8
- 238000001914 filtration Methods 0.000 description 8
- 238000007906 compression Methods 0.000 description 7
- 230000006835 compression Effects 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 7
- 238000005192 partition Methods 0.000 description 7
- 238000000926 separation method Methods 0.000 description 7
- 230000006978 adaptation Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 6
- 238000005070 sampling Methods 0.000 description 6
- 238000003817 vacuum liquid chromatography Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000002123 temporal effect Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000018109 developmental process Effects 0.000 description 4
- 230000000750 progressive effect Effects 0.000 description 4
- 230000000644 propagated effect Effects 0.000 description 4
- 230000002441 reversible effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 239000000470 constituent Substances 0.000 description 3
- 238000012937 correction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000002829 reductive effect Effects 0.000 description 3
- 230000011664 signaling Effects 0.000 description 3
- 238000013179 statistical model Methods 0.000 description 3
- 238000003786 synthesis reaction Methods 0.000 description 3
- 101150115425 Slc27a2 gene Proteins 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 238000005562 fading Methods 0.000 description 2
- 230000000873 masking effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000008707 rearrangement Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 101100219315 Arabidopsis thaliana CYP83A1 gene Proteins 0.000 description 1
- 229930091051 Arenine Natural products 0.000 description 1
- 101100269674 Mus musculus Alyref2 gene Proteins 0.000 description 1
- 101100140580 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) REF2 gene Proteins 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000135 prohibitive effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
- H04N19/615—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding using motion compensated temporal filtering [MCTF]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/1883—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit relating to sub-band structure, e.g. hierarchical level, directional tree, e.g. low-high [LH], high-low [HL], high-high [HH]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/189—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
- H04N19/19—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding using optimisation based on Lagrange multipliers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/63—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/63—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
- H04N19/64—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets characterised by ordering of coefficients or of bits for transmission
-
- H04N7/26457—
-
- H04N7/26585—
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Systems and methods for coding data, particularly image data such as video data, are described. The invention relates to a method of hierarchical coding in which data is coded into at least parent and child coding levels and the parent and child levels are both quantized. The method comprises partitioning the coefficients of the parent coding level, partitioning the child level based on the parent level, and independently assigning coding parameters to each portion of the child level. The coding parameters may be quantization parameters and the partitioning of the parent level may be based on the quantized coefficients of the parent level. The parent level may be communicated to a decoder prior to the child level. The partitioning of the child level can therefore be deduced at the decoder based on the partitioning of the parent level.
Description
<p>Data Processing The present invention relates to coding of data,
particularly image data, particularly for motion video. However, aspects of the invention may be applied to other types of data.</p>
<p>A large number of methods for encoding data are known. Some methods use prediction of a portion of the data based on other portions of the data. For example, encoding of motion video using MPEG, a video frame may be predicted based on the content of a preceding frame and estimated motion within the frame. It is then only necessary to code the difference between the prediction and the actual data. In sequences which can be easily predicted, the amount of difference information required for satisfactory reproduction may be significantly less than the original data, leading to beneficial compression.</p>
<p>However, a drawback is that, particularly for sequences which are difficult to predict, a significant amount of information may be needed to convey the information used in prediction (e.g. motion vectors) and the resulting predictions may still not be very accurate so the saving in data between the original data and the difference information is relatively small. There may even be cases where the prediction gives a worse starting point for determining difterence information than no prediction at all.</p>
<p>In summary, predictive methods have two main drawbacks. Firstly, the information required for a successful prediction may become comparable in volume to the data thereby negating the benefit of prediction in data compression. Secondly, the prediction may fail significantly leading to little or no saving in data. Our earlier UK Patent Application No. 0122526.7 seeks to alleviate the first problem by using prediction based on data that will be available to a recipient of the coded data so that the prediction can be recreated by the recipient without having to communicate all of the parameters used in the prediction. However, there is still room for improvement on this technique.</p>
<p>It should be noted that, while predictive techniques have been described above in the context of inter-frame coding, where prediction is based on preceding frames of a video sequence (typically by predicting motion of objects between frames), predictive coding techniques can also be used within a single field or frame of video information (intra-frame prediction) based on information available elsewhere in the frame. Prediction can also be used with data which are not necessarily image data and which need not necessarily be structured, for example text. In many cases where data have inter-dependencies, prediction can be used to reduce the amount of information that needs to be transmitted to recreate the data. By way of further background history, GB-A- 2,195,062 discloses a predictive coding method for a television signal. Aspects of the present invention are generally concerned with predictive coding techniques.</p>
<p>It will be noted that video sequences may be distributed in essentially two ways. Firstly, an entire video sequence may be transmitted as an entity, for example as a computer file. In such a case, the entire sequence will be available to an entity attempting to display the sequence, and compression techniques may be developed based on complete knowledge of the sequence and relying on the complete coded sequence being available to a decoder in order to display the video. Such techniques may be highly efficient but a drawback is that display of the sequence is only possible if the entire sequence is available and this may require large or prohibitive amounts of memory. This situation is not generally applicable to real time transmission of video sequences or to large sequences as playback cannot occur until the entire file is received. In a second possibility, the video is compressed in such a way that a sequence can be displayed when only a portion is available, and generally it is only necessary to store a few frames of data at a time in order to decode the sequence; broadcast MPEG II is in this latter category which will herein be termed a "serially accessible" video sequence. Another criteria is that the sequence is substantially randomly accessible', that is the sequence that can be accessed at regular intervals, without requiring the sequence to be received from the start (although there may be delays before an accessible key point).</p>
<p>The present invention seeks to provide a coding method suitable for use in compressing video to provide a serially accessible sequence and preferably substantially randomly accessible sequence. However, the invention is applicable to other data and the sequence can be accessed in a parallel fashion if desired.</p>
<p>Aspects of the invention are set out in the independent claims and preferred features are set out in the dependent claims.</p>
<p>In a first aspect, the invention provides a data processing method for processing a stream of data to be coded using prediction, the stream comprising at least first, second and third portions, in which the second portion may be coded using prediction based on the first portion and the third portion may be coded using prediction based on at least the second portion, the method comprising: forming an estimate of accuracy of a prediction of the second portion based on the first portion; and selectively predicting the third portion based on at least the second portion and the estimate of accuracy of the prediction of the second portion.</p>
<p>Pursuant to the invention it has been appreciated that the effectiveness of an earlier prediction often gives a good indication of the likely effectiveness of a subsequent prediction for many types of real world data. It is very important to note that this method will not always give an optimum result. On the contrary, a much better "estimate" of the accuracy of prediction of the third portion can be obtained by actually doing the prediction as the necessary information is available at the coder. In many cases, as might be expected, the estimate of accuracy based on the estimate of accuracy of the previous prediction may turn out to be wrong, for example around transitions in the data. However, surprisingly, pursuant to the invention it has been appreciated that nonetheless the estimate of accuracy based on previous prediction is found to be helpful overall. A particular advantage is that the estimate can be made with data that will be available to a decoder which is receiving the signal serially and has only received the first and second portions.</p>
<p>The third portion will typically comprise an individual coefficient but may comprise a set of coefficients. The method will typically be repeated a plurality of times for subsequent coefficients, wherein each coefficient is selectively predicted based on the success (actual or estimated) of a previous prediction.</p>
<p>The method may be applied iteratively, selectively predicting subsequent portions based on the success of preceding predictions. In repeating the method iteratively, the second and third portions of a first selective prediction may become respectively the first and second portions of a second selective prediction, to predict a new third portion.</p>
<p>Preferably the estimate is based only on data that will be available to a decoder which is receiving the signal serially.</p>
<p>The method may be applied to a third portion which comprises an individual coefficient (preferably) or to a set of coefficients.</p>
<p>Selectively predicting the third portion may comprise comparing the magnitude of the second portion (or elements thereof) to the magnitude of the difference between the second and first portions (or the difference between one or more elements of the second and first portions).</p>
<p>The third portion may be predicted only if the second portion is substantially greater than said difference between the second and first portions. The second portion may be required to be at least a given multiple of the said difference between the second and first portions. It has been found advantageous if said multiple is at least two, preferably at least about four, more preferably about 6.</p>
<p>In place of a linear multiplication, a non-linear scaling function may be applied which gives multiplies differing magnitudes by differing amounts, for example a higher "standard of proof' (ratio of difference to coefficient value) may be required for prediction of small coefficients on the basis that noise may be more significant or conversely a higher standard may be applied to larger coefficients on the basis that prediction using a large (wrong) absolute value may result in greater coding error than predicting based on a small value. A polynomial function may be used, with coefficients empirically determined for a given set of data -the coefficients may be pre-set or configurable or adaptively determined.</p>
<p>In practice, however, it is found that a simple linear scaling function is highly effective and simple to configure and implement.</p>
<p>In a simple but highly effective implementation, if the third portion is predicted, the second portion is used as a prediction.</p>
<p>Alternatively, prediction may be based on several preceding samples. Thus, where the third portion comprises a single coefficient, the decision whether or not to predict may be made on the basis of success of prediction of a second portion comprising a single coefficient but the prediction itself may be made on the basis of a plurality of coefficients, based on the (recent) history of the sample. The decision whether or not to predict may also be based on the success of prediction of a number of coefficients rather than a single coefficient and the second portion may differ in size from the third portion. Similarly, the first portion may comprise a number of coefficients from the recent history of the data.</p>
<p>Following selectively predicting, either the third portion or the difference between the third portion and a prediction thereof is preferably coded.</p>
<p>The data may be processed by a hierarchical coding scheme in which data is coded in successive layers, wherein the third portion comprises data from a higher layer and the second portion comprises corresponding data from at least one lower layer.</p>
<p>Selective prediction of the third portion may comprise a prediction based on the data preceding the third portion if a parameter multiplied by a measure of the magnitude of the difference between the second portion and a prediction of the second portion based on the data preceding the second portion is less than a measure of the magnitude of the second portion, and a default prediction otherwise. Preferably, where the third portion comprises one or more numerical coefficients, the default prediction is zero. For non numerical coding, a default symbol may be used. Preferably the default is based on a set value for the expected mean of the samples (or may be based on the actual mean of the last predetermined number of samples although if this number of samples is too high, this may introduce problems for decoder synchronisation). The parameter may have a value of at least two.</p>
<p>The parameter may be set to a fixed value. Alternatively, the value of the parameter is adjusted based on dynamic analysis of the data. The parameter may be adjusted based on at least one of:-a) The prior inputs to the selective prediction method; b) The prior outputs of the selective prediction method; c) The prior outputs of the prediction based on the data preceding the portion to be coded; d) The prior outputs of the comparison.</p>
<p>If the adaptative algorithm adapts over too long a period, this may present problems for decoder synchronisation. However, this can be alleviated by restarting adaption at periodic intervals and/or communicating a default adaptation context at intervals. Typically, where the method is used to code portions comprising pixels of a frame, adaptation may be re-started each frame.</p>
<p>However, it does not require much bit rate to signal with each frame a few coefficients which give an adaptation context if desired and this may provide some advantage in some applications.</p>
<p>The method of prediction may be dynamically adjusted based on the results of prediction for preceding data. The effectiveness of the selective prediction method is compared with the effectiveness of the basic prediction method.</p>
<p>In a further aspect but closely related aspect, the invention provides a method of selectively predicting a current portion of data based on preceding data comprising selectively predicting a current portion of data x(i) in accordance with the formula: ] (S(i 1)) = -1)) if A C(P(S(i -2))-x(i -1)) < C(x(i -1)) ( 0 otherwise wherein P1(S(i-1)) represents the selective prediction of the current portion of data based on at least a part of the set of data preceding the current portion; P(S(i-1)) represents a prediction of the current portion of data based on at least a part of the set of data preceding the current portion; P(S(i-2)) represents a prediction of the preceding portion of data based on at least a part of the set of data preceding the preceding portion; C represents a measure of cost of transmitting or storing the data; x(i-1) represents the preceding portion of data; A represents a parameter, normally at least two.</p>
<p>In place of a multiplication parameter, a scaling function may be applied, as mentioned above.</p>
<p>Each portion of data may comprise a single coefficient. Each prediction may simply comprise the preceding coefficient. The cost measure may simply càmprise the magnitude of the coefficient. The cost measure preferably comprises a measure of the entropy of the coefficient (which relates to the "cost" (in terms of bits required) to encode it).</p>
<p>One or both of the cost measure, the method of prediction and the parameter may be adapted in response to successive portions of data.</p>
<p>Portions to be coded are preferably quantised prior to prediction; this facilitates the decoding process if quantisation is used.</p>
<p>Alternatively, portions to be coded may be unquantised and the residual data after selective prediction is quantised. In this case, preferably the coefficients used for prediction are reconstructed coefficients, on which inverse quantisation and prediction have been performed.</p>
<p>In the case of adaptive modification of prediction method or cost measure, adjustment is preferably based on reconstructed coefficients. This facilitates repeating the operation at a decoder.</p>
<p>In a further aspect, the invention provides a method of coding a video picture in which the picture is partitioned into at least two portions, the method comprising predicting elements of the second portion by displacing elements of the first portion and coding the differences between elements of the second portion and the respective predictions thereof.</p>
<p>Wavelet coding is known not to code diagonal edges well, and this method could be used to shuffle lines so that elements of the lines about the edges are aligned vertically by said displacing before filtering.</p>
<p>The two portions may correspond to first and second times, in which case displacing elements may comprise displacing elements based on an estimate of motion between the first and second times.</p>
<p>Preferably elements of the first portion are positioned at spatially different but substantially adjacent positions to elements of the second portion. Preferably the first and second portions are interleaved. The portions most conveniently comprise alternating picture lines, preferably vertically separated, but horizontal and other separation may be used additionally or alternatively.</p>
<p>In a preferred implementation, the first and second portions comprise respectively first and second fields of an interlaced video picture frame.</p>
<p>In a preferred implementation of this aspect, there is provided a method of coding an interlaced video picture frame comprising at least first and second fields, each field comprising a plurality of picture lines, the lines of the first field interleaving with lines of the second field, the first and second fields corresponding to respective first and second times, the method comprising: predicting elements of the second field based on the first field, wherein predicting comprises shifting elements of the first field along the direction of said picture lines based on an estimated component of motion along said lines between said first and second times, whereby elements of the second field are predicted based on elements of the first field which are estimated to be aligned;</p>
<p>coding the second field following prediction.</p>
<p>This is found to give an effective method of efficiently coding interlaced video, better than simple filtering which takes advantage of the similarities between adjacent fields but without requiring complex motion compensation to reconstruct a progressive picture.</p>
<p>TipicalIy, the lines are horizontal and only horizontal motion is estimated.</p>
<p>Estimating horizontal motion only has the benefit that the motion estimation process can be greatly simplified, requiring little computational power. In particular, only a one-dimensional search is required to find a match and this may be an order of magnitude faster than a traditional two-dimensional search for a motion vector. It may only be necessary to store a few lines of picture to perform the motion estimation, for example if prediction is based simply on the preceding line, only two lines are required for the motion estimation and this can efficiently be implemented in hardware if required.</p>
<p>However, vertical motion may also be estimated. Conventional two dimensional motion estimation may be used. Alternatively, vertical motion estimation may be first performed only to integer line accuracy to index a vertical line to be used as the basis of horizontal motion estimation and this two-stage process may be faster than a conventional two-dimensional estimate.</p>
<p>Elements of a field may be predicted using a single element from the other field as a basis for prediction, and this has numerous advantages in terms of algorithm simplicity and efficiency. However, multiple elements may be used, using long filters if desired (and these may extend in both the vertical and the horizontal direction if desired) and motion may be estimated to sub-pixel accuracy in both vertical and horizontal directions. In practice, improvements in prediction accuracy from the greater complexity may be outweighed by the complexity of the prediction method.</p>
<p>Advantageously, elements of the first field are used both as a basis for estimating a component of apparent motion between the first and second fields and as a basis for predicting values of elements of the second field.</p>
<p>In a closely related aspect, the invention provides a method of coding an interlaced video frame comprising first and second fields, the method comprising predicting elements of the second field based on elements of the first field which are displaced horizontally in accordance with estimated horizontal components of motion between the first and second fields and</p>
<p>coding the second field following prediction.</p>
<p>Only a single estimate of horizontal motion may be used for each picture line; this simplifies problems of multiple predictors pointing to the same pixel but gives effective results. Having multiple predictors may cause difficulties when coding the first field by the method described herein.</p>
<p>Each element of the second field is preferably associated with a predictor comprising an element of the first field from a corresponding picture line at a position along the corresponding line corresponding to the position along the line of the element of the second field to be predicted plus an offset based on estimated motion.</p>
<p>The corresponding picture line may simply be the line above. Alternatively, it may comprise another line indexed by a first stage of vertical motion estimation, as described above.</p>
<p>Advantageously, the interlaced picture is coded by a hierarchical or recursive coding method after prediction. Most preferably, the picture is coded by a wavelet coding method following prediction.</p>
<p>Preferably a difference between each element of the second field and a corresponding element of the first field is coded. Preferably the corresponding element of the first field comprises an element of the first field shifted based on a component of estimated motion. The difference may be used to provide a high-pass output of a wavelet coding filter, preferably wherein half the difference is coded. A low pass output of the wavelet coding filter may comprise the corresponding a cbmponent if the estimated prediction predicts no elements on a line or, if one or more elements on the second line are predicted, the average.of the corresponding element of the first field and the</p>
<p>predicted element or elements of the second field.</p>
<p>Although this aspect works well with horizontal motion compensation alone, vertical motion compensation could also be incorporated Each element preferably comprises an individual pixel. However, each element may comprise a group of pixels. The frame may be coded without further motion estimation. Further wavelet decomposition may be performed without further motion estimation.</p>
<p>In a further aspect, the invention provides a method of hierarchical coding of data in which data is coded by a coding scheme into at least parent and child coding levels, wherein parent and child levels are both quantised, the method comprising selecting quantisation parameters for at least a portion of the child coding level based on the quantisation parameters for at least a corresponding portion of the parent coding level.</p>
<p>In this way, coding of child level(s) is simplified and less information needs to be communicated to a decoder to reconstruct the child levels. A minor drawback in certain cases is that the child levels cannot be reconstructed independently from the parent levels, but this will typically not be problematic.</p>
<p>The coefficients in the parent coding level may be partitioned and the partitioning of the child level may be based on the partitioning of the parent level. Preferably, partitioning of the parent level is based on the quantised coefficients of the parent level. Preferably, the parent level is communicated to a decoder prior to the child level.</p>
<p>The principle is not limited to quantisation classes, but could be used for other coding parameters, for example for defining contexts for entropy coding. The classification could be used for defining quantisers as well as quantisation classes. If the quantiser values themselves are determined implicitly, this avoids the need to signal them to the decoder.</p>
<p>A useful development is to classify coefficients in the parent level into subsets with different variances or other statistical properties, for example into zero and non-zero coefficients, or into zero, small, and large coefficients. Local properties can also be taken into account, for example local masking so that a class of coefficients defined in this way can be quantised more heavily if the results are likely to be masked, or less heavily in a region of interest.</p>
<p>Implicit classification into subsets, although implicit, may be assisted by additional signalling from the encoder.</p>
<p>It is important to note that this aspect of the invention, although applied to video in the embodiment, can be applied to other signals and can be applied to* coding of multiple levels (with children and grandchildren) and to coding in which each parent has a number of children coeffcients (for example in audio coding using wavelet transforms in which each parent coefficient has two child coefficients). Similarly, although wavelet transforms are advantageous, other transforms in which parent-child relationships can be defined may be used, for example Block transforms, Lapped-Orthogonal Transforms and others.</p>
<p>In a further aspect, the invention provides a method of coding a sequence of pictures comprising: selecting only a subset of the sequence of pictures for communication leaving a subset of residual pictures; irterpoIating from the subset of pictures for communication according to an interpolation algorithm to create at least one interpolated picture corresponding substantially to one of the subset of residual pictures; encoding adjustment information based on a difference between the at least one interpolated picture and the corresponding residual picture; communicating the subset of pictures for communication together with the adjustment information.</p>
<p>In this way, a higher frame rate can be recreated from a signal which is essentially a lower frame rate using interpolation at a decoder and then adjustment of the interpolated frames (which may require considerably less information to achieve than transmission of the frames by a conventional method).</p>
<p>Preferably the subset of pictures is encoded.</p>
<p>The sequence of pictures has a first frame rate and the subset of pictures preferably comprises a sequence of pictures having a lower frame rate than the first frame rate.</p>
<p>Pictures may be dropped (i.e. be selected as residual pictures) at substantially regular intervals to reduce the frame rate. Additionally or alternatively pictures may be dropped based on picture information content, for example low information content pictures may be dropped, so that little adjustment information is required to recreate them. Pictures may be dropped to control the output frame rate and/or to control the output bitrate. Both selection of pictures and coding parameters may be adjusted to control the output bitrate.</p>
<p>The method typically further comprises communicating the output to be received by a decoder arranged to perform interpolation in accordance with the interpolation algorithm.</p>
<p>A complementary aspect provides a method of reconstructing a sequence of pictures comprising: receiving a sequence of pictures to produce a sequence of received pictures; interpolating at least one picture from the received pictures according to a predetermined interpolation algorithm; receiving adjustment information and applying the adjustment information to the or each interpolated picture to modify the or each interpolated picture; outputting a sequence of pictures comprising the received pictures and the modified interpolated pictures.</p>
<p>The method may include decoding the sequence of pictures received to provide received pictures.</p>
<p>In an aspect relating to the overall system, there is provided a method of communicating a sequence of pictures comprising: at a coder, selecting only a subset of the sequence of pictures for communication leaving a subset of residual pictures; interpolating from the subset of pictures for communication according to an interpolation algorithm to create at least one interpolated picture corresponding substantially to one of the subset of residual pictures; encoding adjustment information based on a difference between the at least one interpolated picture and the corresponding residual picture; communicating the subset of pictures to a decoder together with the adjustment information; and afthe decoder, receiving the subset of pictures to produce a sequence of received pictures; interpolating at least one picture from the received pictures according to the interpolation algorithm; receiving the adjustment information and applying the adjustment information to the or each interpolated picture to modify the or each interpolated picture; outputting a sequence of pictures comprising the received pictures and the modified interpolated pictures.</p>
<p>In all the related aspects, the interpolation algorithm preferablycomprises interpolating based only on information available for one or more pictures other than the picture to be interpolated. Pictures other than the picture to be interpolated may comprise pictures encoded using prediction based on motion vectors, for example according to an MPEG II or similar scheme. Alternatively, pictures may be coded according to other aspects of the invention. Where motion vectors are available, motion vectors for the other pictures are used in interpolation and preferably motion vectors are communicated for pictures selected for communication but no motion vectors are communicated specifically for the interpolated pictures.</p>
<p>The adjustment information may include information concerning the timing of an interpolated frame to which the adjustment information relates. The adjustment information may include information concerning the motion between the interpolated frame and other communicated frames or residual frames. The adjustment information may include information describing global motion between the interpolated frame and other communicated frames or residual frames. The adjustment information may include information concerning the selection of parameters used for the control of, or modification of the operation of, the interpolation procedure. Adjustment information may be provided for all pictures to be interpolated. Some pictures may be interpolated without adjustment.</p>
<p>The invention extends to corresponding methods and apparatus for decoding.</p>
<p>The invention further provides a method of decoding a signal coded by a method according to anyone herein comprising reconstructing a portion of the signal to be reconstructed based on a received portion of data and a method of selective prediction of a subsequent portion corresponding to said method.</p>
<p>A method of decoding a signal coded according to the first aspect may comprise receiving and decoding first and second coded portions of data, selectively predicting a third portion of data based on the first and second portions and applying received coded data for the third portion to the selective prediction to reconstruct the third portion.</p>
<p>A method of decoding data coded hierarchically may comprise receiving data encoding a parent level and reconstructing the parent level and reconstructing the child level based on received data for the child level and re-using data used in the reconstruction of the parent level.</p>
<p>The invention extends to a computer program or computer program product for performing a method according to any preceding claim.</p>
<p>The invention further provides apparatus corresponding to all method aspects.</p>
<p>The invention provides a coder arranged to perform any coding method. The invention provides a decoder arranged to perform any decoding method.</p>
<p>Preferred features of method aspects may be applied to apparatus and program aspects and vice versa. The coding methods of each aspect may be combined with each other (as in the embodiment) or combined with other coding methods, as may their preferred features.</p>
<p>Embodiments will now be described, by way of example, with reference to the accompanying drawings in which:-Figure 1 shows overall hybrid encoder architecture; Figure 2 shows rate-distortion curves for two signal components; Figure 3 illustrates minimisation of the Lagrangian cost function; Figure 4 illustrates frame coding architecture; Figure 5 illustrates perfect reconstruction analysis and synthesis filter pairs; Figure 6 illustrates wavelet transform frequency decomposition; Figure 7 illustrates a 3-level wavelet transform of a library picture ("LENNA"); Figure 8 illustrates uniform and dead-zone quantisers, with mid point reconstruction values; Figure 9 is an entropy coding block diagram; Figure 10 illustrates a unary encoding tree; Figure ilillustrates prediction of Li and L2 frames when Li frames are P frames; Figure 12 illustrates prediction of Li and L2 frames when Li frames are also B-frames; Figure 13 illustrates overlapping blocks in which the darker-shaded areas show overlapping areas; Figure 14 illustrates sub-pixel motion-vector refinement; Figure 15: shows the neighbouring vectors available in raster-scan order for local variance calculation; Figure i 6 illustrates Macroblock splitting modes; Figure 17 illustrates motion vector entropy coding architecture; Figure 18 demonstrates that data other than MB_SPLIT and MB_CBMODE is always associated with particular blocks, even if the relevant prediction unit is the sub-MB or MB itself; Figure 19 illustrates how block data is scanned in raster order by MB and then in raster order within each MB; Figure 20 shows that, for the purposes of prediction, values are deemed to be propagated within MBs or sub-MBs; Figure 21 shows the aperture for a) block parameter prediction, and b) MB parameter prediction, showing shaded blocks repeated in the NWMP scheme; Figure 22 shows how the MV prediction residue values are deemed to be propagated just as the values themselves are; Figure 23 illustrates exp-Golomb VLC coding; Figure 24 illustrates the lifting scheme analysis and synthesis processes; Figure 25 illustrates motion-compensated vertical filtering for wavelet decomposition of interlaced pictures; Figure 26 illustrates a motion-compensated frame and its wavelet transform; Figure 27 illustrates the parent-child relationship between pixels in subbands with the same orientation; Figure 28 illustrates an error feedback predictor (based on single tap feedback delay); Figure 29 illustrates an embodiment of adaptive prediction with a single tap adaptation delay; Figure 30 illustrates prediction according to an embodiment of the invention, with in-loop quantisation; Figure 31 illustrates rearrangement of block transform coefficients into subbands; Figure 32 illustrates parent-child relationships for subband transforms.</p>
<p>To assist in understanding the invention, a complete coding and decoding system will be explained. Certain components may be based on conventional components and so will not be described in detail, but it will be appreciated that the application in the context of this system may differ from conventional application. Although described in the context of a complete system for ease of understanding, it should be appreciated that the coder is essentially modular and, while there are certain synergies, features of the system may be provided independently of other features and in alternative combinations unless explicitly stated to be linked. As will become apparent, while certain components are novel per Se, particularly in the adaptive prediction and interlace coding modules, other parts of the system comprise novel combinations of components which, while based on conventional components, combine in a novel manner to provide particular advantages and these combinations may be provided as building blocks for an alternative coder.</p>
<p>Overall, the codec is based on a conventional motion-compensated hybrid codec. The coder has the architecture shown in Figure 1 below, whilst the decoder performs the inverse operations.</p>
<p>There are four main elements or modules to the coder: * Transform and scaling -this involves taking picture data and applying a transform (in this case the wavelet transform) and scaling and rounding the coefficients to perform quantisation; * Entropy coding -this is applied to quantised transform coefficients and to motion vector (MV) data and performs lossless compression on them; * Motion estimation (ME) -this involves finding matches for picture data from previously coded pictures, trading off accuracy with motion vector bit rate; * Motion compensation (MC) -this involves using the motion vectors to predict the current frame, in such a way as to minimise the cost of encoding the residual data.</p>
<p>-21 -The following sections describe these modules in more detail, after first describing the rate-distortion framework used throughout the encoder.</p>
<p>Rate-Distortion Optimisation (RDO) To make good decisions in compression it is desirable to be able to trade off the number of bits used to encode some part of the signal being compressed, with the error that is produced by using that number of bits (although a working coder can be made without using this principle). There is little point striving hard to compress one feature of the signal if the effect it produces is much more significant than compressing some other feature with fewer bits. In other words, it is desirable to distribute the bit rate to get the least possible distortion overall.</p>
<p>One basic explanation of how this can be done is the Principle of Equal Slopes, which states that the coding parameters should be selected so that the rate of change of distortion with respect to bit rate is the same for all parts of the system.</p>
<p>To explain why this is so, we consider two independent components of a signal.</p>
<p>They might be different blocks in a video frame, or different subbands in a wavelet transform. Compressing them at various rates using a selected coding technique tends to give curves like those shown in Figure 2. They show that at low rates, there is high distortion (or error) and at high rates there is low distortion, and there is generally a smooth curve between these points with a convex shape.</p>
<p>We assign Bi bits to component X and B2 bits to component V and examine the slope of the rate-distortion curves at these points. At Bi the slope of X's distortion with respect to bit rate is much higher than the slope at 62, which measures the rate of change of V's distortion with respect to bit rate. This is not the most efficient allocation of bits -consider increasing 61 by a small amount to B1+ and decreasing B2 to B2-. Then the total distortion has reduced even though the total bit rate hasn't changed, due to the disproportionately greater drop in the distortion of X. The conclusion is therefore that for a fixed total bit rate, the error or distortion is minimised by selecting bit rates for X and Y at which the rate-distortion curves have the same slope. Likewise, the problem can be reversed and for a fixed level of distortion, the total bitrate can be minimised by finding points with the same slope.</p>
<p>Two issues arise in practise, firstly, how to find points on these curves with the same slope and secondly, how to hit a fixed overall bit budget. The first question can be answered by Figure 3: the intercept of the tangent to the rate-distortion curve at the point (RO,DO) is the point RO+ADO where -A is the slope at the point (RO,DO). Furthermore it is the smallest value of R+AD for all values of (R,D) that lie on the curve. So in selecting, for example, a quantizer in a given block or subband, one minimises the value D(Q)+AR(Q) over all quantizers Q, where D(Q) is the error produced by quantizing with Q and R(Q) is the rate implied.</p>
<p>In order to hit an overall bit budget (alternatively, distortion), one needs to iterate over values of the Lagrangian parameter A in order to find the one that gives the right rate (alternatively, distortion). In practise, this iteration can be done in slow time given a reasonable encoding buffer size, and by modelling the overall rate distortion curve based on the recent history of the encoder.</p>
<p>Rate-distortion optimisation (RDO) is used throughout the video encoder of the embodiment and it has a very beneficial effect on performance (but is not essential to the invention). Although RDO is described mathematically, there is plenty of scope for a practical implementation to use empirical approximations, particularly to deal with the practical problems mentioned below.</p>
<p>-23 - 1) There may be no common measure of distortion.</p>
<p>For example: quantising a high-frequency subband is less visually objectionable than quantising a low-frequency subband, in general. So there is no direct comparison with the significance of the distortion produced in one subband with that produced in another. This can be overcome by perceptual weighting, in which the noise in HF bands is downgraded according to an estimate of the Contrast Sensitivity Function (CSF) of the human eye, and this is what is preferably done in an embodiment. The problem even occurs in block-based coders, however, since quantisation noise can be successfully masked in some areas but not in others. Perceptual correction factors are therefore desirable in RDO in all types of coders.</p>
<p>2) Rate and distortion may not be directly measurable.</p>
<p>In practice, measuring rate and distortion for, e.g. every possible quantiser in a coding block or subband cannot mean actually encoding for every such quantiser and counting the bits and measuring MSE. However, what one can do is estimate the values using entropy calculations or assuming a statistical model and calculating, say, the variance. In this case, the R and D values may well be only roughly proportional to the true values, and an empirical factor(s) may be used to compensate for this effect in each component part of the encoder.</p>
<p>3) Components of the bitstream will be interdependent.</p>
<p>The model describes a situation where the different signals X and Y are fully independent. This is often not true in a hybrid video codec. For example, the rate at which reference frames are encoded affects how noisy the prediction from them will be, and so the quantisation in predicted frames depends on that in the reference frame. Even if elements of the bitstream are logically independent, perceptually they might not be. For example, with I-frame coding, each I-frame could be subject to RDO independently, but this might lead to objectionally large variations in quantisation noise between frames with low bit rates and rapidly changing content.</p>
<p>Frame coding Frame coding will now be described. Both intra and inter frames are treated similarly in the codec. First they are wavelet-transformed using separable wavelet filters. Then they are quantised using RDO quantisers, before prediction (in the case of intra frames) and entropy coding.</p>
<p>The architecture of a frame coding implementation is shown in Figure 4.</p>
<p>As can be seen, each wavelet subband is coded independently. This means that the encoding and decoding can be parallelised across all the subbands.</p>
<p>Wavelet transform The discrete wavelet transform is described in many sources, including J. Goswami and A. Chan, Fundamentals of Wavelets: Theory, Algorithms and Applications', Wiley 1999. In the codec it plays the same role of the DCT in MPEG-2, although applied to a whole picture rather than a block of data, in decorrelating data in a roughly frequency-sensitive way, whilst having the advantage of preserving fine details better. In one dimension it consists of the iterated application of a complementary pair of half-band filters followed by subsampling by a factor 2.</p>
<p>These filters are termed the analysis filters. Corresponding synthesis filters can undo the aliasing introduced by the critical sampling and perfectly reconstruct the input. This arrangement is illustrated in figure 5. Clearly not just any pair of half-band filters can do this, and there is an extensive mathematical theory of wavelet filter banks. The filters split the signal into a LH and HF part; the wavelet transform then iteratively decomposes the LF component to produce an octave-band decomposition of the signal.</p>
<p>Applied to two-dimensional images, wavelet filters are normally applied in both vertical and horizontal directions to produce four so-called subbands termed Low-Low (LL), Low-High (LH), High-Low (HL) and High-High (HH). In the case of two dimensions, only the LL band is iteratively decomposed to obtain the decomposition of the two-dimensional spectrum shown in Fig. 6.</p>
<p>-25 -The number of samples in each resulting subband is as implied by Figure 6: the critical sampling ensures that after each decomposition the resulting bands all have one quarter of the samples of the input signal.</p>
<p>The choice of wavelet filters has an impact on compression performance, filters having to have both compact impulse response in order to reduce ringing artefacts and other properties in order to represent smooth areas compactly.</p>
<p>One criterion is the number of vanishing moments' of the high-pass filter. A filter has zeroth-order moments if it removes constant signals -any filter with a zero at DC does this; it has first-order moments if it removes linear signals; second-order moments if it removes quadratics; and so on. A filter has N vanishing moments if its z- transform has an N-order zero at unity. Suitable filters are the Daubechies (9,7) filter [M. Antonini, M. Barlaud, P. Mathieu, and I. Daubechies, Image coding using wavelet transform', IEEE Trans. Image Processing, vo 1, pp 295-220, 1992] which if applied naively require an average of 8 multiplications per sample for the transform in both directions.</p>
<p>However, the so-called lifting-scheme' [W. Sweldens, The lifting scheme: A custom-design construction of biorthogonal wavelets'. Technical Report 1994:7, Industrial Mathematics Initiative, Department of Mathematics, University of South Carolina, 1994] allows wavelet filters to be factorised and many implementations of these filters and similar exist using fewer operations (typical factorisations can reduce the number of multiplications by a factor of 3 or more).</p>
<p>Quantisation Having transformed the frame, each subband's coefficients are independently quantised using a so-called uniform dead-zone quantiser. A simple uniform quantiser is a division of the real line into equal-width bins, of size equal to the quantisation factor QF: the bins are numbered and a reconstruction value is selected for each bin. The bins consist of the intervals [(N1I2)*QF, (N+1/2)*QF] for integers N, which are also the labels for the bin, and it is the labels that are subsequently encoded. The reconstruction value used in the decoder (and for local decoding in the encoder) can be any value in each of the bins. The obvious, but not necessarily the best, reconstruction value is the midpoint N*QF. See Figure 8a below.</p>
<p>A uniform dead-zone quantiser is sJightly different in that the bin containing zero is twice as wide. So the bins consist of [-QF,QF], with a reconstruction value of 0 and other bins of the form [N*QF, (N 1)*QF] forN>O and [(N-I)*QF, MQF] for N<0, with reconstruction points somewhere in the intervals. The bin structure is shown in Figure 8b with mid-point reconstruction points.</p>
<p>The advantage of the dead-zone quantiser is two-fold. Firstly, it applies more severe quantisation of the smallest coefficients, which acts as a simple but effective de-noising operation. Secondly, it admits a very simple and efficient implementation. The quantised value N of a coefficient c is given by the formula: N =IJcI/QFjif c >0 = / QF]otherwise where the braces [ ] mean that the remainder is to be discarded. The corresponding reconstructed value is given by: =0ifN=0 =(N+0.375)*QFif N> 0 =(N_0.375)*QFif N <0 A value of 0.5, giving the mid-point of the interval might be the obvious reconstruction point, giving as it does the mid-point of the bin. Typically, however, the values of transformed coefficients in a wavelet subband have a distribution with mean very near zero and which decays reasonably rapidly and uniformly for larger values (the Laplacian distribution, which has exponential -27 -decay, is often used to model wavelet coefficients). Values are therefore more likely to occur in the first half of a bin than in the second half and the smaller value of 0.375 selected reflects this bias, and gives better performance in practice. It is noted that a quantiser need not have uniformly distributed steps, and for a given set of data the optimum quantiser (in a rate-distortion sense) can be constructed by the socalled Lloyd-Max algorithm [R. Gray and D. Neuhoff, Quantisation', IEEE Trans. Info. Theory, vol. 44 no. 6, October 1998].</p>
<p>However, for data with a Laplacian distribution, this turns out to be a uniform quantiser.</p>
<p>Lapranqian parameter control of subband ciuantisation The optimum quantiser is chosen for each subband by computing the quantiser which minimises a Lagrangian combination of rate and distortion. Rate is measured via a zeroth-order entropy measure Ent(q) of the quantised symbols resulting from applying the quantisation factor q, calculated as a value of bits/pixel. Distortion is measured in terms of the perceptually-weighted mean-square-error, MSE(q), resulting from the difference between the original and the quantised coefficients. Hence the total measure for each quantiser q is: MSE(q) +2.Ent(q) w where w is the perceptual weight associated with the subband -higher frequencies having a larger weighting factor. The quantisers are incremented in quarter-powers of 2 -i.e. q is an integer approximation of 2' for integers n. In other words, the quantisers represent the coefficient magnitudes to variable fractional-bit accuracies in quarter-bit increments.</p>
<p>Suitable perceptual weighting may be based on that disclosed by A. Watson et al, Visual thresholds for wavelet quantisation error', SPIE Proc. Vol 2657, Hum.</p>
<p>Vis. &Elec. Imag. B. Rogowitz and J. Allebach ed., 1996. In an implementation, for ease of use, the Lagrangian parameter A may be entered as a user-selectable quantisation parameter. It may be convenient for the actual value to be entered in log units, since then there will be a roughly linear relationship with the resulting PSNR. The larger the value, the lower the resulting bit rate, and vice-versa.</p>
<p>Frame entropy coding The entropy coding used in frame coding is based on four stages: coefficient prediction, binarisation, context modelling and adaptive arithmetic coding. All these stages are present for intra frame coding, but prediction is absent from inter-frame coding, since the picture has already largely been decorrelated by motion compensation.</p>
<p>The purpose of the first two stages is to provide a bitstream with easily analysable statistics that can be encoded using arithmetic coding which can adapt to those statistics to reflect local variations in picture characteristics.</p>
<p>Suitable binarisation and adaptive context modelling may be based on the Context-Adaptive Binarized Arithmetic Coding (CABAC) used in various parts of the H.264/AVC standard [ITU-T Rec. H.264 I ISO/IEC 14496-10 AVC, Draft standard, available at ftp://ftp.imtc-files.org/jvt-expertsl], although implementation details may differ. The inventive adaptive prediction used herein, however, is quite different to conventional methods and will be described below in detail.</p>
<p>Prediction The aim of the prediction stage is to remove any residual interdependencies between coefficients in the wavelet subbands, so that subsequent entropy coding can be applied as far as possible to decorrelated data. Prediction only applies to intra frames.</p>
<p>Residual interdependencies within subbands result in the main from edges in the original image. For example, a horizontal edge produces a horizontal line in the LH subbands, which have been low-pass filtered horizontally and high-pass filtered vertically. In this case, it is possible to predict each coefficient c(x,y) from its predecessor on the same line, c(x-1,y). So the value to be entropy coded could instead be: -29 -d(x,y) =c(x,y)-c(x-1,y) i.e. the stream is equivalent to DPCM followed by entropy coding if the coefficients are scanned in raster order.</p>
<p>For HL bands, the roles of x and y would be swapped, since vertical edges will introduce vertical dependencies in these bands. HL bands should therefore be scanned by column rather than by row.</p>
<p>Prediction in diagonal (HH) bands could proceed by using diagonally adjacent coefficients. However, there is little practical benefit gained with a convenient diagonal predictor and hence embodiments (including the present embodiment) may have no prediction in HH bands. The only remaining band is the DC band.</p>
<p>This band is a very low-resolution version of the original picture. In this band, the prediction operation is defined by: d(x,y) =c(x,y)-( c(x-1,y)+ c(x,y-1) c(x-1,y-1))13 If the subband is scanned in row (raster) or in column order then each of the predicting values is available to the decoder.</p>
<p>For pictures with low texture content, these prediction operations reduce bit-rate considerably. Unfortunately, for pictures with a large amount of texture, neighbouring coefficients are already decorrelated and the prediction actually increases bitrate. Most pictures are a mixture of these characteristics, and so the improvement is not clear-cut.</p>
<p>To deal with this problem, the embodiment makes the prediction adaptive, since edges and texture are local features. The approach taken is to predict if prediction would have worked for the previously scanned coefficient. For vertically-oriented subbands (i.e. LH bands) the rule is: d(x,y) =c(x,y)-c(x-1,y) if alc(x -I,y) -c(x -2, y)I <Ic(x -I,y)I =c(x,y) otherwise In one implementation, the best value of a was determined experimentally to be 6 (preferably at least 2, more preferably at least 3 and preferably also no more than 10, values of 4-8 being particularly suitable). This implies that the desired threshold for the efficacy of prediction is rather high. Adaptation is applied to LH and HL bands but not to the DC band.</p>
<p>This technique resulted in bit-rate reductions of up to 30% for some pictures, and increased the bit-rate of other, highly textured, pictures by less than 2% (which represents an acceptable increase for such a picture -in most practical sequences a significant decrease can be expected).</p>
<p>Adaptive prediction of wavelet coefficients To start with some definitions, consider a stream of symbols x(i). These could be binary symbols (0 or 1) or integers or any series of elements from a discrete alphabet on which it is possible to perform arithmetic operations. The symbol stream x(i) could result, as in the case described above, from scanning coefficients from a wavelet subband transform of an image in a predetermined order, but many other examples are possible, such as a stream of characters in a text document.</p>
<p>Denote by S(i) the set of all symbols up to and including x(i): S(i){x(k): k =i} The symbols in S(i-1) are all available for predicting x(i). The result of predicting using prior symbols can be written: y(iJx(i)-P(S(i-1)) where P is some prediction operator. A traditional error-feedback predictor can adapt P on the basis of consideration of the values y(k) and x(i) for k<i -that is, -31 -on the actual prior outputs of the predictor and on the prior inputs. This is illustrated in Figure 28.</p>
<p>In distinction to this approach, the invention conditions a predictor on the basis of what would have been the best prediction to have made for prior symbols.</p>
<p>This distinction is illustrated in Figure 29.</p>
<p>The whole scheme can be thought of as deriving a new predictor P1 from a simpler predictor P, by switching between a prediction of zero and that given by P. In the example of a HL-filtered subband of a wavelet transform of an image, each wavelet coefficient is predicted by its immediate predecessor on the same line. If the symbols are scanned in raster order (ie line by line) then the predictor P is simply given in this case by P(S(i))= x(i) since this is the previous symbol in scan order also. With these definitions, a new predictor P1 can be defined by, for example, performing a simple weighted comparison between predicted and non-predicted outputs: F (S(i -1)) = jP(S(i -I)) if2. IP(si -2)) -x(i -1)1< Ix(i -1)1 (*) 0 otherwise Generalisations 1) The adaption mechanism can be combined with other means of adaption, such as error feedback, and its component parts can themselves be adapted.</p>
<p>For example, the new predictor P1 can be used as the predictor in anerror-feedback scheme. By such means, all parts of the predictor -the subsidiary predictor P, the comparison means and the control means -can all be adapted. In particular, in the example given above, the weighting coefficient A can be adapted. A great variety of signals are available for further adaptation: a) The prior inputs to the prediction mechanism P1; b) The prior outputs of the prediction mechanism P1; c) The prior outputs of the subsidiary prediction mechanism P; d) The prior outputs of the comparison mechanism.</p>
<p>Feedback elements can additionally be incorporated into the embodiment of the invention. In particular, it is possible to assess the past success of the new prediction mechanism P1 and compare it with the success of using the subsidiary predictor P and use it to establish the reliability of the switch mechanism and so adjust either the control means or the comparison means.</p>
<p>2) The process can be iterated and the new prediction operator Pi can be used as the subsidiary predictor to produce a further prediction operator P2 by the same method.</p>
<p>3) Various methods can be used for performing the comparison and control means.</p>
<p>A simple generalisation of formula (*) would be to define IP(S(i -I)) if 2 C(P(S(i -2))-x(i -1)) < C(x(i -1)) 1 0 otherwise where C is any cost measure (such as an entropy measure) that may also be adapted over time, and A is a parameter, that may also be adapted over time.</p>
<p>4) In the case of the coding a discrete signal ri a compression system, quantisation may also be brought within the prediction loop.</p>
<p>In the example given of coding wavelet subbands, the wavelet coefficients were assumed to have all been quantised prior to prediction and entropy coding.</p>
<p>However it is possible to use prediction on unquantised data and then quantise the prediction residuals, provided that: a) the coefficients used for prediction are reconstructed coefficients, on which inverse quantisation and prediction have been performed; -b) any adaption is based only on reconstructed coefficients.</p>
<p>-33 -The adjustments required to the block diagram of Figure 29 are shown in Figure 30.</p>
<p>Binarization Binarization is the process of transforming the multi-valued coefficient symbols into bits. The resulting bitstream can then be arithmetic coded. The reason for doing this is that the efficiency of arithmetic coding depends on the accuracy of the statistics that the encoder uses. Wavelet coefficients cover a wide range but are heavily clustered around zero (except in the LL band). So the symbol space is large but most possible symbol values occur rarely or not at all.</p>
<p>rn Maintaining a probability model of all the possible values that could occur in a quantised subband consumes a lot of memory, and results in inaccurate estimates of probabilities since the sample space for most symbols is so small.</p>
<p>Where the arithmetic coding is adaptive, as it is here, this can impact on coding efficiency significantly.</p>
<p>The simplest way to binarize a symbol is directly: a symbol is encoded by encoding the constituent bits of the binary representation of its magnitude, followed by a sign bit. This is termed bit-plane coding. Modelling the resulting bitstream in order to code it efficiently is possible and has been done but somewhat complicated. Each bit-plane has different statistics, and needs to be modelled separatelytaking into account interdependencies between bit-planes.</p>
<p>Modelling many conditional probabilities is possible if complex, of course, but in practice tends to reintroduce the problem of small sample sizes.</p>
<p>Instead, the arithmetic coding scheme used in the codec of the embodiment binarizes coefficient magnitudes with so-called unary coding, subsequently encoding sign bits for non-zero magnitudes. Unary coding is a simple VLC in which every non-negative number N is mapped to N zeroes followed by a 1 as shown in Fig. 10.</p>
<p>U'nary encoding is actually optimal for a Laplacian probability distribution where the probability of N occurring is 2 ' (This is because the length of each symbol is bits, which is precisely the optimal length -log2(p) predicted by information theory, where p is the probability of occurrence). A different context, or set of contexts, can be defined for each bin or for a number of bins together, and the effect is to analyse the coefficient statistics in an iterative way. For example, the probability of zero occurring in Bin 1 is the probability that the coefficient magnitude is >0, whilst P(0: Bin 2) is the probability that the magnitude is >1, and so on. The sparse statistics of the larger coefficients can be effectively combined by having a single context for all the larger bins, representing the tails of the distribution. The process will be further explained</p>
<p>by example.</p>
<p>For example, we suppose one wished to encode the sequence: -3 0 1 0 -1 When binarized, the sequence to be encoded is: o 0 0 1101110 1111110 110 The first 4 bits encode the magnitude, 3. The first bit is encoded using the statistics for Bini, the second using those for Bin 2 and so on. When a 1 is detected, the magnitude is decoded and a sign bit is expected. This is encoded using the sign context statistics; here it is 0 to signify a negative sign. The next bit must be a magnitude bit and is encoded using the Bin 1 contexts; since it is 1 the value is 0 and there is no need for a subsequent sign bit. The same principle is applied iteratively.</p>
<p>Context modelling Suitable context modelling of this embodiment is based on the principle that small coefficients, particularly zero, are well-predicted by their neighbours whilst large coefficients are not. Therefore the codec conditions the probabilities used by the arithmetic coder for coding bins 1 and 2 on the size of the neighbouring coefficients.</p>
<p>-35 -The reason for this approach is that, whereas prediction removes correlation between a coefficient and its neighbours, they may not be statistically independent even if they are uncorrelated: small and especially zero coefficients in wavelet subbands tend to clump together, located at points corresponding to smooth picture areas.</p>
<p>To compute the context, a value nhood_sum is calculated at each point (x,y) of each subband, as: nhood _sum(x, y) = Ic(x -1, y)+ Ic(x, y -1)1 (NB: nhood_sum depends on the size of the neighbouring coefficients, not on the predicted neighbouring coefficients d(x,y) as defined above).</p>
<p>There are nine contexts used, which are as follows: 1. FRAME_SIGN_CTX -context for sign bits; 2. FRAME_BIN la_CTX -context for Bin 1, O<nhood_sum<3 3. FRAME_BIN 1 b_CTX -context for Bin 1, nhood_sum =3 4. FRAME_BIN1z_CTX -context for Bin 1, nhood_sumO 5. FRAME_B IN2aCTX -context for Bin 2, nhood_sum<3 6. FRAME.BIN2b_CTX -context for Bin 2, nhood_sum =3 7. FRAME_BIN3_CTX -context for Bin 3 8. FRAMEfiIN4_CTX -context for Bin 4 9. FRAME_B lN5plus_CTX -context for Bin 5 or more After binarization, a context is selected based on the value of nhood_sum and on the bin, and the probabilities for 0 and 1 that are maintained in the appropriate context will be fed to the arithmetic coding function along with the value itself to be coded.</p>
<p>In' the example of the previous section, when coding the first value, -3, the encoder then checks the values of neighbouring coefficients and produces the value nhood_sum. Based on this value, a different statistical model (that is, a count of 1 and a count of zero) is used to code the first two bins. So the coder maintains, for example, the probabilities that Bin I is 0 or 1, given that the value of neighbouring coefficients is 0 -this is contained in FRAME_BIN1z_CTX.</p>
<p>These are fed to the arithmetic coding engine for encoding the bit in Bin 1, and the context probabilities are updated after encoding.</p>
<p>Arithmetic coding Examples of Arithmetic coding are known, for example as disclosed in A. Moffat et al, Arithmetic coding revisited', ACM Transactions on Information Systems, 16(3), pp256-294, July 1998 so it will only be described briefly.</p>
<p>Conceptually, an arithmetic coder can be thought of a progressive way of producing variable-length codes for entire sequences of symbols based on the probabilities of their constituent symbols. For example, if we know the probability of 0 and I in a binary sequence, we also know the probability of the sequence itself occurring. So if P(0)=0.2, P(1)=0.8 then P(111O1111111O1111O1O1)=(O.2)3(O.8)17=1.8x1O (assuming independent occurrences).</p>
<p>Information theory then says that optimal entropy coding of this sequence requires Iog2(1IP)12.4 bits. Arithmetic coding produces a code-word very close to this optimal length, and implementations can do so progressively, outputting bits when possible as more arrive. Using a look-up table VLC for 20-bit sequences is, by contrast, less practical, requiring several Mbytes storage.</p>
<p>VLCs for long sequences do exist, and depend on formulae for generating codewords on the fly. An example is the exp-Golomb codes used for the DC coefficient coding in Intra frames, described below. Adaptive VLCs also exist, based on a parameterised statistical model. In both cases, efficiency is only -37 -very high if the model used is accurate. Arithmetic coding can adapt to any statistics.</p>
<p>All arithmetic coding (AC) requires is estimates of the probabilities of symbols as they occur, and this is where context modelling fits in. Since AC can, in effect, assign a fractional number of bits to a symbol, it is very efficient for coding symbols with probabilities very close to 1, without the additional complication of run-length coding. The aim of context modelling is, in fact to use information about the symbol stream to be encoded to produce accurate io probabilities as close to 1 as possible. This is illustrated by example, considering a bit stream with P(O)=0.5=P(1). If we knew that the bit stream was actually composed of two bit streams (perhaps alternated), in one of which P(O)0.25 and P(1)=O.75 and in the other P(1)0.25 and P(O)=O.75 then we could feed these more refined probabilities to the arithmetic coder as appropriate. The result would be a bit rate saving of 19%.</p>
<p>The estimates are computed for each context simply by counting their occurrences. In order for the decoder to be in the same state as the encoder, these statistics cannot be updated until after a binary symbol has been encoded. This means that the contexts must be initialised with a count for both 0 and 1, which is used for encoding the first symbol in that context.</p>
<p>An additional source of redundancy lies in the local nature of the statistics. If the contexts are not refreshed periodically then later data has less influence in shaping the statistics than earlier data, resulting in bias, and local statistics are not exploited. A simple way to refresh the contexts is to pick a number, preferably at least about 1000, preferably no more than about 10,000. (8092 is used in the codec) so that if the count of 0 plus the count of 1 for that context exceeds that number then these counts are halved. The effect is to maintain the probabilities to a reasonable level of accuracy, but to keep the influence of all coefficients roughly constant.</p>
<p>Motion estimation and motion compensation Motion estimation will now be described.</p>
<p>GOP structures Three types of frames are defined in the codec. lntra frames (I frames) are coded without reference to other frames in the sequence, whereas inter frames are predicted by motion estimation from other frames. Level 1 frames (Li frames) are inter frames which are also used as temporal references for other frames. The embodiment provides for Li frames to be either P frames (i.e. only forward predicted), or B frames (bi-directionally predicted). Level 2 frames (L2 frames) are conventional B frames which are not used as a temporal reference.</p>
<p>It is possible in either case to have more than one reference andindeed in the embodiment the references for P/LI frames are (in temporal order) the previous I frame and the preceding LI frame, if one exists (see Figure Ii).</p>
<p>A practical embodiment may allow LI frames to be B-frames. This might be useful in some applications, such as streaming, perhaps, where the key issue might not be the overall latency (which must always be at least one GOP) but the frequency of Intra frame updates. The references in this case are the (temporally) prior Li frame and the succeeding I-frame, or the preceding and succeeding I-frame, if the first Li frame is being coded (Figure 12). In certain cases, the second configuration may confer advantages.</p>
<p>Overlapped Block-based Motion Compensation Motion compensation in the codec uses Overlapped Block-based Motion Compensation (OBMC) to avoid block-edge artefacts which would be expensive to code using wavelets; this is a known technique, disclosed in G. Heising, D. Marpe, H. Cycon and A. Petukhov, Wavelet-based very low bit-rate video coding using image warping and overlapped block motion compensation', lEE Proceedings -Vision, Image and Signal Processing, vol. 148, no. 2, pp. 93- 101, April 2001. The size of blocks can be varied with a desired degree of overlap selected: this is configurable within the codec. Although the codec need not be designed to be scalable, in the embodiment the size of blocks is the only -39 -non-scalable feature, and for lower resolution pictures, smaller blocks can easily be selected.</p>
<p>The OBMC scheme adopted in the embodiment is based on a separable Raised-Cosine mask. This acts as a weight function on the predicting block.</p>
<p>Given a pixel p=p(x,y,t) in frame t, p may fall within only one block or in up to four if it lies at the corner of a block (see Figure 13).</p>
<p>Each block that the pixel p is part of has a predicting block within the reference io frame selected by motion estimation. The predictor for p is the weighted sum of all the corresponding pixels in the predicting blocks in frame t', given by p(x-V,,y-W,,t') for motion vectors (V,,W,). The Raised-Cosine mask has the necessary property that that sum of the weights will always be 1: p(x,y,t)-w1p(x-V,,y-W1,t'), w1 =1 Although this may seem prima fade complicated, in a practical implementation the additional complexity is to apply the weighting mask to a predicting block before subtracting it from the picture and this is feasible.</p>
<p>Motion estimation Motion estimation will now be described, beginning with Hierarchical motion estimation.</p>
<p>Hierarchical motion estimation The embodiment of the codec supports motion estimation to 1/8 pixel accuracy.</p>
<p>Motion estimation (ME) is by far the single largest computational load in encoding and in many cases it is impractical to perform brute-force motion vector searches over reasonable areas, especially for HD material. Various shortcuts are desirable and the technique adopted herein is a Rate-Distortion Optimised hierarchical search method.</p>
<p>I. -40-Inthis method, integral pixel accuracy is produced by hierarchical ME, and then refined to sub-pixel accuracy. The hierarchical approach repeatedly downconverts both the current and the reference frame by a factor of two in both dimensions, four times in all. Motion vectors are estimated for blocks at each level and used as a guide for the next higher resolution. The block size remains constant (and the blocks will still overlap at all resolutions) so that at each level there are only a quarter as many blocks and each block has 4 children at the next higher resolution. The lower-resolution block's motion vector is then used as a guide vector to be refined by the children at the next highest level of resolution. At each resolution, block matching proceeds by searching in a small range around the guide vector for the best match using the RDO metric (which is described below).</p>
<p>Downconversion and search ranges in hierarchical ME The hierarchical approach dramatically reduces the computational effort involved in motion estimation for an equivalent search range. However it has two significant risks that need to be mitigated in an implementation.</p>
<p>The first risk is that when there is a variety of motions in a sequence, the hierarchical method matches the motion to that of the largest objects at an early stage and it is impossible to then escape to better matches at later stages because the search ranges are too small. To mitigate this, the codec does two things: it always searches around the zero vector (0,0) as well as around the guide vector -this allows it to track fast and slow-moving objects; secondly, it always searches a range of +/-2 pixels at each level -this means that an error of 1 pixel at the next lowest resolution can always be corrected.</p>
<p>The second risk is less apparent, but we have found it can still be a problem with very highly textured sequences. This is that the aliasing resulting from repeated downconversion with short (e.g. 1/2, 1/2) filters renders motion estimation difficult at lower levels, and can produce poor guide vectors. This is remedied in the codec by using the non-separable filter: 1 1 1 2 2 1 1 2 2 1 1 1 which reduces aliasing.</p>
<p>Sub-pixel refinement and upconversion Sub-pixel refinement also operates hierarchically. Once pixel-accurate motion vectors have been determined, the reference picture is upconverted using a Nyquist windowed-sinc function filter. Each block has an associated vector (Vo,Wo) where Vo and W0 are multiples of 8 with respect to the upconverted reference. 1/2-pel accurate vectors are found by finding the best match out of (V0,Wo) and its 8 neighbours: (Vo+4,Wo+4), (V0,Wo+4), (V0-4,Wo+4), (V0+4,Wo), (V0-4,Wo), (V0+4,Wo-4), (V0,Wo-4), (V0-4,Wo-4). This in turn produces a new best vector (V1,W1), which provides a guide for 1/4-pel refinement, and so on.</p>
<p>The process is illustrated in Figure 14.</p>
<p>RDO motion estimation metric The performance of motion-estimation and motion-vector coding is very important critical to the performance of a practical video coding scheme, as motion vectors can often comprise the majority of the information used in the encoding of inter frames, particularly B-frames. With motion vectors at 1/4 or 1/8th pixel accuracy, a simple-minded strategy of finding the best match between frames can greatly inflate the resulting bitrate for little or no gain in quality. What is required is the ability to trade off the vector bitrate with prediction accuracy and hence the bit rate required to code the residual picture and the eventual quality of that picture.</p>
<p>A simple but effective way we have found to do this is to incorporate a smoothing factor into the metric used for matching blocks. So the metric consists of a basic block matching metric, plus some constant times a measure of the local motion vector smoothness.</p>
<p>The basic block matching metric used is Sum of Absolute Differences with DC removal (DCSAD). Given two blocks X V of samples, this is given by: DCSAD(X, Y) = -y,1 -DC(X, )I where DC(X,Y) = -y,, is the average of the differences.</p>
<p>DC-removal helps maintain motion vector accuracy in fades and lighting changes.</p>
<p>The smoothness measure used is the local variance between the selected motion vector and previously computed motion vectors. So if the blocks are estimated in raster-scan order then vectors for blocks to the left and above are available for calculating the local variance, as illustrated in Fig. 15.</p>
<p>The local variance is defined, if the vectors of the neighbouring blocks are V, by the recipe: VAR(V) = IV -V.2, where 11W112 = W. W (inner product) iEN The total metric is a combination of these two metrics. Given a vector V which maps the current picture block Xto a block Y=V(X) in the reference frame, the metric is given by: M(X,Y) = DCSAD(X,Y)+ 2* VAR(V) The value A is a coding parameter used to control the trade-off between the smoothness of the motion vector field and the accuracy of the match. When A is very large, the local variance dominates the calculation and the motion vector which gives the smallest metric is simply that which is closest to its neighbours.</p>
<p>When A is very small, the metric is dominated by the SAD term, and so the best vector will simply be that which gives the best match for that block. For values in between, varying degrees of smoothness can be achieved.</p>
<p>The parameter A can be set at the command-line of the encoder, but if omitted is calculated as a multiple (currently 0.1) of the Lagrangian rate-control parameters for the Li and L2 frames (see above), so that if the inter frames are compressed more heavily then smoother motion vector fields are derived.</p>
<p>Macroblock structures and motion vector data This section describes the macroblock structures which are used to introduce a degree of adaption into motion estimation by allowing the size of the blocks used to vary. The motion estimation stage of the encoding is organised by macroblock, and each combination of block size and prediction mode is tried io using the RDO block-matching metric, and the best solution adopted macroblock by macroblock.</p>
<p>Macroblocks and variable-sized block matching A macroblock consists of a 4x4 array of blocks, and there are three possible ways of splitting a MB, which are encoded in the MB variable MM_SPLIT: MB_SPLITO: no split, a single MV per reference frame for the MB; MB_SPLITI: split into four sub-macroblocks (sub-MBs), each a 2x2 array of blocks, one MV per reference frame per sub-MB; MB_SPLIT2: split into the 16 constituent blocks.</p>
<p>It is noted that, while still somewhat complex, the structures defined herein are considerably simpler than the 7 possible MB splittings, together with prediction from any two of up to 5 reference frames, and several special forms of motion vector prediction conventionally proposed in standard H.264.</p>
<p>The splitting mode is chosen by redoing motion estimation for the sub-MBs and the MB as a whole, again using the RDO metric described in the previous section, suitably scaled to take into account the different sizes of the blocks. At the same time, the best prediction mode (PREDMODE) is chosen. Four prediction modes are available for each prediction unit (block, sub-MB or MB): MODE_NO_PRED: no prediction -intra coded; MODE_REF 1_ONLY: only predict from the first reference; MODE_REF2_ONLY: only predict from the second reference (if one exists); MODE_REF 1 AND2: bi-directional prediction.</p>
<p>So a different prediction mode can be chosen for each prediction unit of the MB. However, mode data itself incurs a cost in bit-rate. So a further MB parameter is defined, MB_CBMODE, which records whether a common block prediction mode is to be used for the MB: MB_CBMODE=1: the same prediction mode is to be used for each prediction unit with the MB; MB_CBMODEO: the prediction modes of each block or sub-MB are different.</p>
<p>For example, if MB_SPLITI then the MB is split into 4 sub-MBs, each itself combining four basic blocks. If MB_CBMODE1 then if one of those sub-MBs has PREDMODE equal to MODE_REF1_ONLY, then a//the sub-MBs have this prediction mode. Of course if MB_SPLIT is 0, then this is true by default -in this case MB_CBMODE need not be coded.</p>
<p>The result is a hierarchy of parameters: MB_SPLIT determines whether MB_CBMODE needs to be coded for a given macroblock; the MB parameters together determine which prediction units need to encode PREDMODE; and PREDMODE itself determines what motion vectors need to be present.</p>
<p>In motion estimation, an overall cost for each MB is computed, and compared for each legal combination of MB_SPLIT, MBCBMODE and value of PREDMODE. Then the best combination is selected for coding.</p>
<p>Block data Parameters other than MB_SPLIT and MB_CBMODE are termed block data, even though they may apply to blocks, sub-MBs or the MB itself depending on the value of the MB data. PREDMODE has already been described. The four remaining block parameters are: REF1_x: horizontal component of motion vector to the first reference frame; REF 1_y: vertical component of motion vector to the first reference frame; REF2_x: horizontal component of motion vector to the second reference frame; REF2_y: vertical component of motion vector to the second reference frame.</p>
<p>io Clearly not all of these values must be coded. If PREDMODE is MODE_REF1_ONLY then REF2_x and REF2_y will not be coded, for example.</p>
<p>Motion vector coding Motion vector (MV) coding is important to the performance of video coding, especially for codecs with a high level of MV accuracy (1/4 or 1/8 pel). For this reason, MV coding and decoding is probably the most complicated part of the wavelet codec since significant gains in efficiency can be made by choosing a good prediction and entropy coding structure. The basic format of the MV coding module is similar to the coding of quantised coefficients: it consists of prediction, followed by binarisation, context modelling and adaptive arithmetic coding (Figure 17).</p>
<p>Median prediction of motion vector data Some of the conventions used herein will first be explained.</p>
<p>All the motion vector data is predicted from previously encoded data from nearest neighbours using a form of median prediction, which is described below. The two parameters MB_SPLIT and MB_CBMODE are deemed to comprise the MB data -all other parameters, even though (depending on the MB parameters) they may refer to blocks, sub-MBs or MBs, are deemed to be associated with particular blocks, and are termed block data. This allows for a consistent prediction and coding structure to be adopted.</p>
<p>Example. If MB_SPLIT=1 and MB_CBMODEO then the prediction units in a MB are sub-MBs. Nevertheless, the prediction mode and any motion vectors are associated with the top-left block of each sub-MB and values need not be coded for other blocks in the sub-MB.</p>
<p>Example. If MB_SPLIT=2 but MB_CBMODE1 then the block parameter PREDMODE need only be coded for the top-left block in the MB. Motion vectors need to be coded for every block in the MB if PREDMODE is not equal to MODE_NO_PRED.</p>
<p>The second convention is that all MB data is scanned in raster order for encoding purposes. All block data is scanned first by MB in raster order, and then in raster order within each MB. That is, taking each MB in raster order, each block value which needs to be coded within that MB is coded in raster order (see Figure 19).</p>
<p>The third convention concerns the availability of values for prediction purposes when they may not be coded for every block. Since prediction will be based on neighbouring values, it is necessary to propagate values for the purposes of prediction when the MB modes have conspired to ensure that values are not required for every block.</p>
<p>Example. In Figure 20 below, we can see the effect of this. Suppose we are coding REF1_x. In the first MB, MB_SPLITO and so at most only the top-left block needs a value, which can be predicted from values in previously coded MBs. As it happens, PREDMODEMODE_REF1_ONLY and so a value is coded. The value v is then deemed to be applied to every block in the MB. In the next MB, MB_SPLITI and MB_CBMODEO, so the unit of prediction is the sub-MB. In the top-left sub-MB PREDMODE is, say, MODE REF1AND2 and so a value x is coded for the top-left block of that sub-MB. It can be predicted from any available values in neighbouring blocks, and in particular the value v is available from the adjacent block. -47.</p>
<p>Neighbour-weighted median prediction Before entropy coding the MV data is predicted in order to remove correlation, just as in Intra frame coding of wavelet subbands. In this case the prediction used is what I term neighbour-weighted median prediction (NWMP). This is median prediction from previously-coded neighbouring blocks/MBs, but with a bias towardsthose neighbours closest to the block being predicted. The aperture for the NWMP predictor is shown in Figure 21 below.</p>
<p>In many cases values are not available from all blocks in the aperture, for io example if the prediction mode is different. In this case the blocks are merely excluded from consideration.</p>
<p>NWMP works by taking values associated to the nearest blocks, shown shaded in the diagram, and repeating them twice in the list of values from which the median is taken. The purpose of NWMP is that, in the event (for example) of a prediction mode change between a block and its neighbours, no predictor may be available from the nearest neighbours and so more distant neighbours should be consulted. On the other hand, if the nearest neighbours' values are available then they should be given more weight. Hence a larger aperture with neighbour-weighting. NWMP is, however, complex, and empirical attempts to simplify it, while permissible in implementations, should consider carefully the effects on performance.</p>
<p>In the case of the MB data, the number of possible values is only 3 in the case of MB_SPLIT and 2 in the case of MB_CBMODE. The prediction therefore can use modulo arithmetic and produces an unsigned prediction residue of 0,1 or 2 in the first case and 0 or 1 in the second. All other predictions produce signed prediction residues. There are also only four prediction modes, so prediction modulo 4 could be used for PREDMODE; however, this number could increase if more potential reference frames are allowed. Median prediction for MB data and for PREDMODE may not seem prima fade intrinsically sensible as there is no concept of order. However, in practice it actually works reasonably well, and this data comprises a small proportion of the MV data as a whole, so a unified approach has been maintained.</p>
<p>Entropy codinci Entropy coding of the MV prediction residuals uses the same basic architecture as for wavelet coefficient coding: unary VLC binarization, followed by adaptive arithmetic coding with multiple context models. For MV coding there are many different types of data, and these have their own context models.</p>
<p>There are 24 motion vector data contexts in total. However, there are many io components of the MV data, and the majority are not in play at any one time.</p>
<p>The contexts for MB_SPLIT residues are: MB_CTX_SPLIT_BINI: context for Bin I of the unary binarization; MB_CTX_SPLIT_BIN 2: context for Bin 2; MB_CTX_SPLILBIN 3: context for Bin 3.</p>
<p>There is only one context required for MB_CBMODE, since the value of residues is either 0 or 1:</p>
<p>MB_CTX_CBMODE</p>
<p>PREDMODE residues are more numerous -there are five: MODE_CTX_BIN1: context for Bin 1 of magnitude the bits; MODE_CTX_BIN2 context for Bin 2 of magnitude the bits; MODECTX_BIN3: context for Bin 3 of magnitude the bits; MODE_CTX_BlN4plus: context for the remaining bins of the magnitude bits; MODE_CTX_SIGN: context for sign bits.</p>
<p>The remaining data is the actual motion vector values: REF1_x, REF1_y, REF2_x, REF2.y. As for wavelet coefficient coding, these values are contextualised on the basis of the size of their neighbours, although in this case it is the size of the neighbouring prediction residuals not the neighbouring values themselves. For the purposes of context modelling, residue values are assumed to be propagated in just the same way that the values themselves are -49 - -so after prediction, the propagated values corresponding to Figure 20 are illustrated in Figure 22 below.</p>
<p>If the neighbouring residues r(x-1,y) and r(x,y-1) are available then a value nhood_residue_size can be defined by: nhood residue -size(x, y) = Ir(x -1, y) + jr(x, -1)1 If only one of these values is available, then nhood_residue_size is equal to twice its magnitude. Only Bin 1 is contextualised on nhood_residue_size -the contexts for horizontal vector components are (vertical components are rn similar): VEC_CTX_X_BINI a: Bin I context for magnitude bits, nhood_residue_size<3; VEC_CTX_XBINIb: Bin I context for magnitude bits, 3 ihood_residue_size 5; VEC_CTX_X_BI Ni C: Bin 1 context for magnitude bits, nhood_residue_size>1 5 or,(x-1,y) and r(x,y-1) are not available.</p>
<p>The remaining horizontal vector contexts are: VEC_CTX_X_BIN2: Bin 2 context for magnitude bits; VEC_CTX_X_BIN3: Bin 3 context for magnitude bits; VEC_CTX_X_BIN4: Bin 4 context for magnitude bits; VEC_CTX_X_BlN5plus: context for the remaining bits of the magnitude bits; VEC_CTX_X_SIGN: context for the sign bits.</p>
<p>The resulting compression is quite powerful, but rather complex; ideally, the number of contexts should be reduced.</p>
<p>DC coefficient coding If good predictions are not available, then a block is deemed to be intra coded, and no subtraction is performed for that block in the motion compensation process. lntra blocks have quite different characteristics from other areas of the Inter frame. In particular, their mean will be non-zero, whereas the mean value in'other areas will be close to zero. Although the block overlaps will soften the edges of these areas, they will still be coded relatively inefficiently because of the transition in DC value. To deal with this, the codec subtracts the local DC from these areas and codes it separately.</p>
<p>The DC value is computed in the coder from the un-compensated original frame, although the coder is of course free to compute the value in any way. It is subtracted from the Inter frame using the same raised-cosine windowing: intra blocks can therefore be considered as not being intra at all, but as io predicted by weighted constant blocks'. Since PREDMODE can apply to blocks, sub-MBs or MBs themselves, depending on MB parameters, the same applies to DC coefficients. Hence DC removal is applied for variable-sized blocks and DC values are coded according to the MB types imposed by the MB parameters.</p>
<p>DC coding operates on the principle established herein of prediction followed by entropy coding. However, both prediction and entropy coding are simpler in this case.</p>
<p>As for MV data encoding, the DC coefficients are scanned by MB in raster order and in raster order within each MB, depending on the MB data and prediction modes. DC coefficients are predicted by some value dependent only on the previous DC value to be encoded. In particular, there is no attempt as yet at neighbourhood prediction. Instead, the prediction for DC(n), the nth DC coefficient so far coded is given by: R(n)=DC(n)-dDC(n-1) for some value d.</p>
<p>If the block coordinates of DC(n) are designated (x(n),y(n)) then the factor d is given by: d --Max(Ix(n) -x(n -1)1+ y(n) -y(n -1)1,8) -51 -The purpose of this arrangement is that DC blocks are generally very sparse.</p>
<p>There is no point in having a very complicated prediction structure from neighbours that don't, for the most part, have coded DC values anyway. The value of a prediction also recedes with distance. If the last DC block coded was a long way away then using it as a prediction will increase bit rate, not decrease it.</p>
<p>Entropy coding uses the expGolomb VLC for the magnitude bits, which is as shown in Fig. 23.</p>
<p>The rule is that there is a length prefix of N zeroes followed by a 1. Then there is an N-bit binary number b. If N>O, the number represented is 2'+b. Sign bits are uncoded.</p>
<p>The method of DC coefficient coding may be empirically adjusted to improve its performance. However, the basic idea is effective and should give some gains on the most difficult sequences, where motion estimation fails.</p>
<p>Further developments The following sections briefly sketch some further ideas in video coding that can be used to develop the above wavelet coding architecture.</p>
<p>Non-linear wavelets Wavelet transforms can be understood in the context of a device called a lifting scheme. In the lifting scheme, a discrete signal is decomposed into two parts in three stages, shown in Fig. 24. A splitting stage does an initial reversible split, which could (for example) just be a split into alternate samples. A predict stage then uses one (the lower in the figure) of the resulting streams to predict the other, and this is then replaced by the difference between the sample and its predictor. Using this new sequence the other stream can then be modified by an update function. The result, provided that the original splitting process is reversible by some merge function, is itself clearly reversible by performing these operations in reverse order with addition replaced by subtraction.</p>
<p>If the split, predict and update processes are linear, then the result is a perfect-reconstruction filter bank, and hence wavelets. In fact, any orthogonal or biorthogonal wavelet transform can be constructed by iterating lifting schemes, optionally with additional gain multipliers and reversing the order of predict and update.</p>
<p>Example. Suppose the split function simply splits the signal x into even and odd samples, X2n and X2n+1. Suppose also that the predict operator is the identity P(z)=z, and the update operator simply divides by 2: U(z)=z,,'2. Then the resulting transform is (up to a gain factor in each stream) equal to the Haar wavelet filter bank (1/2,1/2) and (1/2,-1/2).</p>
<p>Very complicated transforms can be built up from simple stages very easily, since each Split function can be iteratively composed of a whole lifting stage.</p>
<p>The update and predict operators need not be linear. If the initial split is a linear wavelet splitting, then the predict and update functions can be used to correct for the less welcome characteristics of the wavelet filters. This opens the way to non-linear wavelets.</p>
<p>On natural images, wavelet filters must perform a compromise. For relatively smooth areas of the picture, a large number of vanishing moments are desirable so that the signal can be represented compactly as being approximately polynomial. This requires a long filter, however. At edges within the image, long filters are a disadvantage and cause ringing when combined with quantisation. So it makes sense to vary the length of the filter according to the signal characteristics so that both smooth areas and edges can be represented compactly. Possible advantageous implementations include:- -53 - 1) A splitting function derived from a short-length wavelet filter bank. So far experiments have been confined to (1/2,1/2), (112,-112) although slightly longer filters may improve iterability.</p>
<p>2) An edge detector for switching prediction modes, operating on the low-pass filtered and subsampled signal.</p>
<p>3) A predict operator based on high-order polynomial interpolation away from the corners of detected edges, leaving values near the corners (where ringing occurs) unchanged.</p>
<p>There is no update operator in this scheme.</p>
<p>The effect is that information about the high-pass filtered subband is gleaned from the low-pass filtered subband by investigating edges, which are compact artefacts spatially but which spread energy over a wide range of frequencies.</p>
<p>This is then used to provide additional prediction of the high-pass band to reduce the number of coefficients that need coding.</p>
<p>In this case the predict operator is only non-linear by virtue of being switchable.</p>
<p>Median or stack filters might also prove useful.</p>
<p>Coding interlaced pictures using wavelets Wavelets are generally used in video coding to transform the whole picture: although it is possible to use them as local block transforms, their coding efficiency tends to be reduced. However, in interlaced video, this appears to limit the application of the wavelet transform to coding either whole frames or whole fields. As a first attempt at interlace video coding, coding frames or fields might be quite effective. However, interlace artefacts (vertical-temporal aliasing) arise through motion, and often local motion at that. We have therefore considered a motion-compensated wavelet decomposition.</p>
<p>The idea is that motion compensation is applied to the first stage of wavelet decomposition only, and then only in the vertical direction. MC is used to shift lines, or parts of lines, from the two fields to compensate for the motion of objects so that vertical filtering can then be applied. This process is illustrated in Figure 25.</p>
<p>This principle, although particularly helpful for interlace pictures may be applied to pictures which have been partitioned in other ways than conventional interlace splitting. The portions may correspond to different spatial subsets (e.g. alternate horizontal or vertical lines, chequerboard patterns etc) and the different portions may correspond to different times or the same time. Where the portions correspond to different times, motion vectors may be estimated but in other cases a simple displacement vector between matching portions which does not correspond to motion but simply to areas of correlation may be estimated. It will be appreciated that there are numerous possibilities for employing the technique; the embodiment will be described in the advantageous context of application to interlace however.</p>
<p>We note that it is known to perform motion compensated filtering using perfect reconstruction filter banks along the temporal axis [S.-J. Choi and J. Woods, Motion-compensated 3-D subband coding of video', IEEE Trans. Image Processing, Vol 8 No 2, Feb 1999]. However, this is complex whereas in the present embodiment we provide a motion-compensated vertical filter within the same frame; this feature may be provided independently.</p>
<p>The filtering process works as follows. Field 1 is used as a temporal reference for motion estimation of Field 2, but the only motion vectors considered are horizontal vectors shifting lines (or parts of lines) in Field I relative to the corresponding line in Field 2. Suppose that we consider the lines of the frame numbered in consecutive order from 0 with Field I and Field 2 lines alternating; suppose also for convenience that the top line is from Field 1, and so all Field 1 lines are even and all Field 2 lines odd (other orderings and numberings will be very similar in effect). Each sample Xm,2n+1 on line 2n+1 of Field 2 is therefore supplied with a predictor -55 -Xm+v(m,2n+1),2n from Field 1. The decomposition high-pass output is: (Xm,2n+1 -Xm+v(m,2n+1),2n)12 The low-pass filter is slightly more complicated, since each pixel in Field I may predict none (if the pixel is concealed), one or more than one of the pixels in</p>
<p>Field 2. The rule is that:</p>
<p>i) If Xm,n predicts no pixels in Field 2 then the low-pass output is Xm,2n ii) if Xm,2n predicts one or more pixels then the output is one half of Xm,2n and half the average (possibly weighted) of all of those predicted pixels. So that in the case that Xm,2n predicts just one pixel Xp,2n+1 then the output is: (Xp,2n+I+ Xm,2j,)I2 If it predicted two pixels, Xp,2n+1 and Xq,2n+1, then the output is: ((Xp,2n+11 Xq,2n+1)12+ Xm,2n)I2 (Weighted averages might be used in the case that overlapped blocks were used for motion estimation and compensation.) To recover the original values, one reverses this process. If each point in Field 1 predicts at most one point in Field 2, this is simple, but it is a little more complex if it predicts more than one. Suppose that both Xp,2n+1 and Xq,2n+1 are predicted by m2n* Then the hih pass outputs for (p,2n+1) and (q,2n+1) are: (Xp,2n+1 Xm,2n)/2 and (Xq,2n+r Xm,2n)12 respectively.</p>
<p>The low-pass output for (m,2n) is ((Xp,2n+11 Xq,2n+1)/2+ Xm,2n)12, and adding this to the average of the two high-pass outputs yields: ((xv, 2n+1 + Xq,2+1)12 + Xm, 2n)12+((Xp, 2n+1 -X,2n)I2+(Xq,2n+1 -Xm,2n'12)12 which is (xp,2n+1+ Xq,2n+1)12. From this Xrn,2n and so Xp,2n+i and Xq,2n+1 can be determined.</p>
<p>* -56-The case of more than one pixel in Field 2 being predicted by a pixel in Field 1 can be avoided by having only a single motion vector per line, and this would be the simplest approach (which is surprisingly effective) for an initial implementation.</p>
<p>After this initial vertical decomposition, the rest of the wavelet decomposition can be performed without any further motion compensation.</p>
<p>Developments The basic principle can be modified by in several ways. For a start, longer filters could be used. The description given above is for motion compensated (1/2,1/2) and (1/2-1/2) filters. However any pair of half-band perfect reconstruction filters could be used. Suppose that g(k) and h(k) were such a pair, with g(k) the low-pass and h(k) the high-pass filter. The result of vertically filtering a picture by h(k) using motion compensation is given by using the real sample for each sample in Field 2 and using a motion-compensated sample for samples in Field 1. This means that the output at line 2n+1 is: Xr,2n+I = (h X)r2fl+ I = h(2k) + h(2k + 1) Xr+v(r,2fl_2k+l),((2n+I)_(2k+I)) = h(2k)* Xr,2fl+I_2k + h(2k + 1) Xr+v(r,2n_2k+I),2n_2k (*) The low-pass filter could be constructed in a similar manner to that described above: Xr2n = (g X)r2fl = g(2k) + g(2k + 0. r,(2,,-(2k+I)) (**) where p,2q+I denotes the average (possibly weighted) of all those samples in Field 2 whose motion-compensated predictor in Field 1 is x,1,.</p>
<p>Aside from longer filters, vertical motion compensation could also be incorporated, and the formulae given can be generalised to this case: for example, (*) would be modified to be: = (h)r,2,,+I = h(2k) x,.*211+1_2 + h(2k + 1) Xr+vJ(r.2fl_2k+I).2n_2k+2(r,2,I_2k+I) The idea is not limited to the particular description given: other methods of performing motion-compensated perfect reconstruction filtering could be used.</p>
<p>Also, the roles of Field 1 and Field 2 can be interchanged in the previous description, as can the roles of even and odd lines. Although conventional interlaced video invariably has two fields, the techniques can be applied to more than two fields per frame were this considered desirable.</p>
<p>Coding of inter-frame residuals Most frames in any video coding scheme are likely to be inter frames, and most of the bit rate is due to them also, given a reasonably long GOP. Their efficient coding is therefore very important, and in the current scheme there is probably more scope to reduce their bitrate than that of other components of the bitstream.</p>
<p>Inter frames can be very variable in character. When prediction is good, the predicted data consists just of low-level noise. With 1/4 or 1/8 pel accuracy, this noise is at a very low level indeed, and will almost certainly be quantised away.</p>
<p>Areas that are predicted poorly can be of two basic types: revealed/concealed areas and non-translational motion areas. It is likely that a good motion estimator will code the former areas as intra, so they will be picture-like in character. The latter areas may sometimes be matched with similar areas and sometimes not. If predicted the residual can look quite random, although often very edgy' and certainly not white-noise-like.</p>
<p>The wavelet transform still does a good job of decorrelating these poorly predicted areas. However, the appropriate quantisation level in different parts of the picture may be quite different. In a basic but effective implementation, the coder defines a single quantiser for each subband. More quantisers could be defined by splitting each subband into blocks and this would be an advantageous next step.</p>
<p>A more complicated but potentially adaptive idea uses the parent-child relationship that wavelets can introduce. As can be seen from the Figure 26 below, areas which are not well predicted tend to produce significant coefficients across all subbands, whereas areas that are well predicted tend to produce low-level, independent noise across all subbands.</p>
<p>The large coefficients tend to be organised in a parent-child arrangement, whereby the pixels corresponding to the same picture area with the same orientation (LH,HL or HH) are related, as illustrated in Figure 27.</p>
<p>Although parent and child pixels are likely to be decorrelated, they are not io statistically independent, and it seems that the magnitude of a parent and its children are related. One way of exploiting this is to partition the coefficients in each subband (other than the DC band) according to size. This partition can then be inherited by the child subband via the parent-child relationship, and a different quantiser assigned to each partition. The important point is that if the partitioning process is performed on quanfised coefficients in the parent subband, then it can be performed by the decoder in an identical fashion. There is then no need to signal the shape of the different partitions of the subbands to the decoder, and the only overhead, therefore, is signalling the additional quantisers.</p>
<p>Implicit classification and quantisation As described above, the parent-child relationship available in wavelet-transformed data can be used to partition data implicitly for quantisation. When quantising a subband, the data in the parent subband can be classified by whatever means is desired into a number of sets and this classification then inherited by the child subband. Each subset of the band can then be given a separate quantiser. If the parent band has been encoded before the child band then the classification can be performed identically at the decoder. A different quantiser can then be selected by the encoder for each defined subset of the child band, and transmitted to the decoder, with no need to transmit the -59 -classification of child subband pixels. There are some important considerations: 1) The classification need not, or not only, be used for defining quantisation classes, but could also be used for defining contexts for entropy coding.</p>
<p>If a given set of coefficients have been quantised differently from another set of coefficients within the same subband, then it is likely that the statistical properties of the two sets will differ and different statistical contexts would be appropriate for entropy coding for the two sets, especially for adaptive arithmetic coding. Even if the same quantiser was selected for all sets (ie the classification was not used for defining quantisation classes) a partition of coefficients in the parent subband (on the basis of coefficient statistics or other means) could be used to define different coefficient classes for entropy coding, and could prove useful.</p>
<p>In so-called zerotree coders [A. Said and W. Pearlman, A new, fast, and efficient image codec based on set partitioning in hierarchical trees', lEE Trans Circ. Syst. for Vid. Tech., Vol 6, No3, June 1996], significance data -whether a coefficient is larger than a given threshold -is often coded conditionally on whether the parent coefficient is significant or not, but quantisation is not affected, and general-form partitioning into multiple sets has not been entertained.</p>
<p>2) One useful classification is to classify coefficients in the parent subband into subsets with different variances or other statistical properties.</p>
<p>In particular, one suitable simple classification is into zero and non-zero coefficients, or into zero, small, and large coefficients. Local properties can also be taken into account, for example local masking so that a class of coefficients defined in this way can be quantised more heavily if the results are likely to be masked. Another case where this might be useful would be Region-of-Interest (ROl) coding where coefficients corresponding to more important areas of the picture (such as human faces) might be less heavily quantised.</p>
<p>To facilitate the exploitation of local features, the classification into subsets, although implicit, could also be augmented, refined or amended with additional signalling from the encoder so that a finer classification could be obtained if the implicit one proved insufficient. For example, if coefficients are split into two classes: has_zero_parent and has_non-zero_parent, then the encoder could signal that has_non-zero_parent should be further split into, say, coefficients correponding to central areas of a picture and those corresponding to peripheral areas. Certain coefficients could even be identified and moved from one class to another.</p>
<p>3) The principle is not limited to two dimensional transforms. It can be applied to one-dimensional signals (for example in audio coding): in this case each parent coefficient has two child coefficients. It can also be applied to 3- dimensionals signals, for example a 3D-wavelet transform, motion-compensated or not, of a video signal. In a 3D transform, each coefficient has 8 children in the child subband.</p>
<p>4) Wavelet transforms are not the only transforms for which parent-child relationships can be defined. Other transforms, for example block transforms, Lapped-Orthogonal Transforms, wavelet packets and even adaptive so-called best-basis' transforms can be given a parent-child relationship [Z Xiong, K Ramchandran and MT Orchard, Wavelet Packet Image Coding Using Space-Frequency Quantization', IEEE Trans. Image Proc, Vol 7, No. 6, June 1998.], and the method described above can be applied.</p>
<p>Block transforms, such as the LOT or the widely-used DCT, can be given a parent-child structure in a number of ways [T. Tran and T. Nguyen, A progressive transmission image coder using linear phase uniform filterbanks as block transforms', IEEE Trans. On Image Proc., Vol 8 No 11, Nov 1999J.</p>
<p>To understand how this might be done, it is helpful to think of block transform coefficients as the outputs of critically-sampled perfect-reconstruction filterbanks, just like wavelet coefficients, only with all subbands having the same bandwidth and being subsampled by equal factors. This can be done by conceptually grouping coefficients corresponding to the same area of the picture. So the (i,j)-th coefficient of block (p,q) can instead be thought of as point (p,q) within frequency subband (i,j) -see Figure 31 in which a 4x4 array of 2x2 transform blocks can be considered as a 2x2 array of 4x4 subbands.</p>
<p>Given this rearrangement, Figure 32 shows two possible parent-child relationships, the first a wavelet-like relationship. In this case a coefficient may have children in different bands.</p>
<p>5) The classification can be used for defining quantisers as well as quantisation classes.</p>
<p>An analysis of the statistics of the parent band can allow the quantiser values themselves to be determined iniplicitly also, avoiding the need to signal them to the decoder.</p>
<p>A representation of the partition and quantisation algorithm can be defined as follows. Given a subband B, let P(B) denote the parent subband to B. If c represents the coordinates of a coefficient in B, let p(c) in P(B) denote the parent coefficient coordinates; if v(c) denotes the value of the coefficient at c then let q(v(c)) denote the quantised value.</p>
<p>1. For every subband 8, if B has a parent band that has already been encoded,</p>
<p>DO</p>
<p>{ 1.1 Set P=P(B) 1.2 Define sets P1, ..., P, such that a) P, nP = for all i,j b) UP, = P io according to a predefined rule based on the quantised coefficients q(v(c))c P 1.3 Define sets B1, ..., Bk by the rule CE B, if and only if p(c)E P,. For each set B,</p>
<p>DO</p>
<p>{ 1.3.1 Pick a quantiser q,for B,.</p>
<p>1.4.1 For each CE B,, quantise c by qi.</p>
<p>This implicit adaptive quantisation can therefore be used to match the quantisation levels to the shape of the residual data. The approach may have a drawback that subbands cannot be decoded independently and this is often useful, but this is not always essential, and other methods of paralleliation may be employed.</p>
<p>-63 -Global motion compensation This is a simple idea to implement and is suitable for pans, tracking shots and especially for camera rotations and zooms. In these cases it makes sense to remove the global motion byglobally motion-compensating the reference frame before using it to encode translational motion. In the case of a zoom, the magnification factor can be extracted and used to expand/contract the reference frame to match the current frame; the remaining translational motion will be small and both the motion vectors and the residual will be relatively easy to code.</p>
<p>A more complicated idea was used in an early proposal for H.264. In this case, general warping parameters were defined for the reference frame and the resulting reference used for translation motion compensation. This process can help remove many local sources of prediction error, such as figures walking towards a camera, or objects rotating, which cannot be eliminated in translational motion modelling.</p>
<p>Proportional weighting for motion compensation The bi-directional prediction performed within the coder uses a weighting of (0.5,0.5) for each of the reference frames. One feature introduced into H.264 is the ability to apply different weights to reference frames, to compensate for fading/cross-fading effects. H.264 allows for a linear calculation of weights based on frame distance as well as direct calculation.</p>
<p>The effect of choosing different weights can be quite dramatic when there are cross-fades or major lighting changes. However, the problem is in detecting these occurrences and addressing them properly. Brute-force motion estimation, in particular, is likely to lead to errors even if a cross-fade has been detected.</p>
<p>The wavelet coder uses a hierarchical block-matching algorithm with DC-removal. This means that motion estimation is improves for fades and cross-fades. It also gives an opportunity to detect these effects with very little complexity: since a low-resolution version of both the reference frame(s) and the current frame are available, a simple correlator can be used to determine the correlation between them. If there is a significant imbalance between the correlation factor between the first reference and the current frame, and that between the second reference and the current frame, then the ratio of the correlation factors can be used to weight the references.</p>
<p>Frame interpolation A frame interpolator can be used to increase the decoded picture frame rate. A io commercially available tool (from Microsoft Windows Media Player), based on gradient-flow techniques, not on the motion vector field can be computed in real time on a moderate PC for up to CIF resolution, although it possess artefacts when the motion estimation was not adequate, for example a fly-over of a mountain in which the revealed area behind the mountain was not present in the preceding frame and a different shape from the same area in the succeeding frame.</p>
<p>An inventive development, to mitigate the problems of the existing tool, is based on the fact that in most cases of Internet delivery, a higher frame-rate original is available to the encoder. A typical example would be standard definition material which had been converted to CIF at 25 frames/sec progressive, and then encoded at 12.5 fps by dropping frames. The function of the decoder frame interpolator is to recover the original 25Hz frame rate.</p>
<p>If this is the case it would be possible to perform the same frame interpolation in both the encoder and the decoder, and for the encoder to compare the result with the actual frame and send a correction signal. One possible signal would be the difference, but we have appreciated that this might not necessarily be the best because the interpolated frame, although plausible, might be quite different from the actual one -for example through a disparity in actual and predicted global motion. It would be better only to send a correction for areas -65 -which can be identified as revealed and to compensate for any global motion disparity in correcting them.</p>
<p>There are a number of possible cases of adjusted interpolation, in which information is sent to aid interpolation, including but not limited to:-i) Sending a difference between the residual picture and the corresponding interpolated picture (ie the difference between true and interpolated pictures); ii) Sending a difference between the suitably scaled motion vector field between members of the subset of pictures used in deriving the interpolated picture, and the measured motion vector field between the residual picture and members of the subset of pictures (ie the difference between true and interpolated motion); iii) Sending motion vectors to adjust one or more of the members of the subset of pictures before using them for interpolation; v) Sending a set of guide motion vectors for use in the interpolation procedure to improve accuracy; v) Sending parameters to otherwise control or improve the accuracy of the interpolation procedure, or to control its complexity. Coder</p>
<p>In a preferred implementation, adjustable parameters may include one or more of the following: -Lagrangian QP for I-frames -Lagrangian QP for Li -frames -Lagrangian OP for L2-frames -Lagrangian parameter for motion estimation.</p>
<p>-Cycles per degree in video standard at assumed viewing distance for perceptual weighting.</p>
<p>-Luminance only coding -Width of block used for OBMC, specified for luma file -Height of block used for OBMC, specified for luma file -Horizontal separation of blocks used for OBMC. Must be < block width for both luma and chroma, taking into account chroma subsampling.</p>
<p>-Vertical separation of blocks used for OBMC. Must be < block height for both luma and chroma, taking into account chroma subsampling.</p>
<p>-Number of LI frames in GOP -Separation of LI frames from nearest I or LI frame in GOP -Specifying that Li frames are forward-predicted only Decoder In a preferred implementation, all the relevant encoder adjustable parameters, and any other information necessary for successful decoding of the bitstream, will be conveyed to the decoder by means of suitably encoded header parameters embedded in the bitstream.</p>
<p>The parameters may include one or more of the following: -Luminance only decoding -Width of block used for OBMC, specified for luma file -Height of block used for OBMC, specified for luma file -67 - -Horizontal separation of blocks used for OBMC. Must be < xblen for both luma and chroma, taking into account chroma subsampling.</p>
<p>-Vertical separation of blocks used for OBMC. Must be <yblen for both luma and chroma, taking into account chroma subsampling.</p>
<p>-Width of luma picture -Height of luma picture Additional parameters may include: -Number of frames to be decoded -the option to specify 444 format chroma sampling -the option to specify 422 format chroma sampling -the option to specify 420 format chroma sampling -the option to specify 411 format chroma sampling -Number of Li frames in GOP -Separation of Li frames from nearest I or Li frame in GOP -Specifying that Li frames are forward-predicted only It will be appreciated that modifications of detail may be made within the scope of the invention. As explained above, features may be provided independently or in other combinations.</p>
Claims (1)
- <p>Claims 1. A method of hierarchical coding of data in which data iscoded by a coding scheme into at least parent and child coding levels, wherein parent and child levels are both quantised, the method comprising partitioning the coefficients in the parent coding level, partitioning the child level based on the partitioning of the parent level, and independently assigning coding parameters to each portion of the child level.</p><p>2. A method according to Claim 1 wherein said coding parameters are quantisation parameters.</p><p>3. A method according to Claim 2 wherein partitioning of the parent level is based on the quantised coefficients of the parent level.</p><p>4. A method according to Claim 3 wherein the parent level is communicated to a decoder prior to the child level.</p><p>5. A method of decoding a signal coded by a method according to any preceding claim comprising reconstructing a portion of the signal to be reconstructed based on a received portion of data and a method of selective prediction of a subsequent portion corresponding to said method according to any preceding claim.</p><p>6. A method according to Claim 5 of decoding a signal coded according to Claim 1, the method comprising receiving and decoding first and second coded portions of data, selectively predicting a third portion of data based on the first and second portions and applying received coded data for the third portion to the selective prediction to reconstruct the third portion.</p><p>-69 - 7. A method according to Claim 5 comprising: receiving data encoding a parent level and reconstructing the parent level; reconstructing the child level based on received data for the child level and re-using data used in the reconstruction of the parent level.</p>
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB0616384A GB2437579B (en) | 2003-05-07 | 2003-05-07 | Data processing |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB0616384A GB2437579B (en) | 2003-05-07 | 2003-05-07 | Data processing |
GB0310495A GB2401502B (en) | 2003-05-07 | 2003-05-07 | Data processing |
Publications (3)
Publication Number | Publication Date |
---|---|
GB0616384D0 GB0616384D0 (en) | 2006-09-27 |
GB2437579A true GB2437579A (en) | 2007-10-31 |
GB2437579B GB2437579B (en) | 2007-12-19 |
Family
ID=37081158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
GB0616384A Expired - Fee Related GB2437579B (en) | 2003-05-07 | 2003-05-07 | Data processing |
Country Status (1)
Country | Link |
---|---|
GB (1) | GB2437579B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10964102B2 (en) | 2018-07-09 | 2021-03-30 | Sony Corporation | Adaptive sub-band based coding of hierarchical transform coefficients of three-dimensional point cloud |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1997017797A2 (en) * | 1995-10-25 | 1997-05-15 | Sarnoff Corporation | Apparatus and method for quadtree based variable block size motion estimation |
WO2001041156A1 (en) * | 1999-12-01 | 2001-06-07 | Ivast, Inc. | Optimized bifs encoder |
-
2003
- 2003-05-07 GB GB0616384A patent/GB2437579B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1997017797A2 (en) * | 1995-10-25 | 1997-05-15 | Sarnoff Corporation | Apparatus and method for quadtree based variable block size motion estimation |
WO2001041156A1 (en) * | 1999-12-01 | 2001-06-07 | Ivast, Inc. | Optimized bifs encoder |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10964102B2 (en) | 2018-07-09 | 2021-03-30 | Sony Corporation | Adaptive sub-band based coding of hierarchical transform coefficients of three-dimensional point cloud |
Also Published As
Publication number | Publication date |
---|---|
GB0616384D0 (en) | 2006-09-27 |
GB2437579B (en) | 2007-12-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8588536B2 (en) | Guaranteed-rate tiled image data compression | |
EP2629523B1 (en) | Data compression for video | |
US8681873B2 (en) | Data compression for video | |
US7336720B2 (en) | Real-time video coding/decoding | |
US20060198439A1 (en) | Method and system for mode decision in a video encoder | |
US20070223582A1 (en) | Image encoding-decoding system and related techniques | |
US20110206118A1 (en) | Data Compression for Video | |
US20110002554A1 (en) | Digital image compression by residual decimation | |
AU2009324014A1 (en) | Switching between DCT coefficient coding modes | |
EP2206353A1 (en) | Method and apparatus for selecting a coding mode | |
GB2401502A (en) | Image data encoding and transmission | |
KR20090072150A (en) | Apparatus and method for determining scan pattern, and apparatus and method for encoding image data using the same, and method for decoding image data using the same | |
US9451272B2 (en) | Hybrid open-loop/closed-loop compression of pictures | |
EP1841235A1 (en) | Video compression by adaptive 2D transformation in spatial and temporal direction | |
KR101739580B1 (en) | Adaptive Scan Apparatus and Method therefor | |
GB2437579A (en) | Hierarchical coding involving partitioning child level coefficients based on the partitioning of the parent level | |
Ali et al. | Survey of Dirac: A Wavelet Based Video Codec for Multiparty Video Conferencing and Broadcasting | |
Milicevic et al. | RD optimization and skip prediction for H. 264/AVC standard | |
Rüfenacht et al. | Scalable Image and Video Compression | |
Parfieniuk | Polyphase components of an image as video frames: a way to code still images using H. 264 | |
Ansari et al. | Performance analysis and evaluation of proposed algorithm for advance options of H. 263 and H. 264 video codec | |
EP2452496B1 (en) | Hybrid open-loop/closed-loop compression of pictures | |
Ezhilarasan et al. | A hybrid transformation technique for advanced video coding | |
Ansari et al. | Analysis and Evaluation of Proposed Algorithm For Advance Options of H. 263 and H. 264 Video Codec | |
Tian et al. | Introduction to video compression |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PCNP | Patent ceased through non-payment of renewal fee |
Effective date: 20140507 |