Video coding

09854274 · 2017-12-26

Assignee

Inventors

Cpc classification

International classification

Abstract

A method of performing a rate-distortion optimization process comprising selecting a preferred encoding mode by optimizing a function comprising an estimate of distortion for a target image portion and a measure of bit rate required to encode that portion. The estimate of distortion is based on source coding distortion and an estimate of error propagation distortion due to loss. The method further comprises transmitting the same encoded version of the video stream from the transmitting terminal to each of a plurality of receiving terminals over respective lossy channels, using the same rate-distortion optimization process in relation to each of the plurality of receiving terminals, making the same encoding mode selection per target image portion based on the same optimization of said function. The estimate of error propagation distortion comprises an aggregate estimate of error propagation distortion that would be experienced due to possible loss over the plurality of channels.

Claims

1. A method of encoding a video stream, the method comprising: clustering channels from a transmitting terminal to a plurality of receiving terminals into classes, the channels in each class having similar packet loss probabilities between the transmitting terminal and the receiving terminals of the class, and each class having an associated error propagation distortion map; determining an estimate of error propagation distortion for each of the classes of channels, the estimate of distortion being determined from the respective error propagation distortion map associated with each of the classes; performing a rate-distortion optimization process comprising, for each of a plurality of target image portions to be encoded in a frame of the video stream, selecting a preferred one of a set of encoding modes by optimizing a function comprising an estimate of distortion for the target image portion and a measure of bit rate required to encode the target image portion, the estimate of distortion being based on source coding distortion and the estimates of error propagation distortion for the classes; encoding the target image portions into an encoded version of the video stream using the selected encoding modes; and transmitting the same encoded version of the video stream from the transmitting terminal to each of the plurality of receiving terminals over respective channels, using the same rate-distortion optimization process in relation to each of the plurality of receiving terminals, the use of the same rate-distortion optimization process comprising making the same encoding mode selection per target image portion based on the same optimization of said function.

2. The method of claim 1, wherein two or more of said channels are via a common relay node, whereby the transmitting terminal transmits the encoded version of the video stream to the relay mode over a first leg, and the relay node forwards a respective instance of the encoded version of the video stream on to each of the respective two or more receiving terminals via a respective second leg of the channel.

3. The method of claim 2, comprising determining an individual probability of loss over each of said channels, and determining an aggregate probability based on the individual probabilities, wherein the aggregate estimate of distortion is based on the aggregate probability, and wherein the individual probability for each of said two or more channels is determined by combining probabilities of loss over each of its legs.

4. The method of claim 3, wherein the relay node comprises one of a server and an end-user terminal.

5. The method of claim 1, wherein the packet loss probability of each class comprises one of a maximum, a median and a mean of individual packet loss probabilities of the channels in each class.

6. The method of claim 1, comprising determining an individual estimate of error propagation distortion that would be experienced due to possible loss over each of said channels, wherein the determined estimate of error propagation distortion for each class is an aggregate estimate of error propagation distortion determined by aggregating the individual estimates of error propagation distortion.

7. The method of claim 1, comprising updating the error propagation maps after each encoding mode selection.

8. The method of claim 6, wherein the aggregate of the individual estimates of distortion comprises one of a maximum, a median and a mean of the individual estimates of distortion.

9. The method of claim 6, wherein the individual estimate of error propagation distortion for each of one or more of said channels is based on feedback from the respective receiving terminal.

10. The method of claim 9, wherein said feedback comprises one of an acknowledgement that at least part of said earlier frame has been received, and a report that at least part of said earlier frame has not been received.

11. The method of claim 6, wherein the individual estimate of error propagation distortion based on feedback comprises: adjusting the estimate of distortion for an earlier frame or part of the earlier frame in dependence on said feedback, and propagating the adjusted estimate of distortion forward for use in relation to a current frame.

12. The method of claim 10, wherein the individual estimate of error propagation distortion based on feedback comprises: adjusting the estimate of distortion for an earlier frame or part of the earlier frame in dependence on said feedback; and propagating the adjusted estimate of distortion forward for use in relation to a current frame; and the individual estimate of error propagation distortion based on feedback comprises: adjusting the estimate of distortion for the earlier frame or part of the earlier frame in dependence on at least one of said acknowledgment and said report; and propagating the adjusted estimate of distortion forward for use in relation to the current frame.

13. The method of claim 1, wherein the encoding modes comprise at least an intra frame mode which encodes the target image portion relative to a reference image portion in the same frame, and an inter frame encoding mode which encodes the target image portion relative to a reference image portion in a previously encoded frame.

14. The method of claim 1, wherein the set of encoding modes comprises a skip mode.

15. The method of claim 1, wherein the set of encoding modes comprises modes using different partitions of the target image portion for at least one of intra and inter frame encoding.

16. A transmitting terminal for encoding a video stream, the transmitting terminal comprising: an encoder configured to: cluster channels from the transmitting terminal to a plurality of receiving terminals into classes, the channels in each class having similar packet loss probabilities between the transmitting terminal and the receiving terminals of the class, and each class having an associated error propagation distortion map; determine an estimate of error propagation distortion for each of the classes of channels, the estimate of distortion being determined from the respective error propagation distortion map associated with each of the classes; and perform a rate-distortion optimization process comprising, for each of a plurality of target image portions to be encoded in a frame of the video stream, selecting a preferred one of a set of encoding modes by optimizing a function comprising an estimate of distortion for the target image portion and a measure of bit rate required to encode the target image portion, the estimate of distortion being based on source coding distortion and the estimates of error propagation distortion for the classes, the encoder being arranged to encode the target image portions into an encoded version of the video stream using the selected encoding modes; and a transmitter configured to transmit the same encoded version of the video stream from the transmitting terminal to each of the plurality of receiving terminals over respective channels, the encoder being configured to use the same rate-distortion optimization process in relation to each of the plurality of receiving terminals, the use of the same rate-distortion optimization process comprising making the same encoding mode selection per target image portion based on the same optimization of said function.

17. The transmitting terminal of claim 16, wherein two or more of said channels are via a common relay node, whereby the transmitter is configured to transmit the encoded version of the video stream to the relay mode over a first leg, such that the relay node forwards a respective instance of the encoded version of the video stream on to each of the respective two or more receiving terminals via a respective second leg of the channel.

18. The transmitting terminal of claim 17, wherein the encoder is configured to determine an individual probability of loss over each of said channels, and determine an aggregate probability based on the individual probabilities; and wherein the encoder is configured such that the aggregate estimate of distortion is based on the aggregate probability, and the individual probability for each of said two or more channels is determined by combining probabilities of loss over each of its legs.

19. The transmitting terminal of claim 16, wherein the encoder is configured to determine an individual estimate of error propagation distortion that would be experienced due to possible loss over each of said channels, and wherein encoder is configured such that the determined estimate of error propagation distortion for each class is an aggregate estimate of error propagation distortion determined by aggregating the individual estimates of error propagation distortion.

20. The transmitting terminal of claim 19, wherein the encoder is configured to update the error propagation map after each encoding mode selection.

21. A computer program product for encoding a video stream, the computer program product being embodied on a computer-readable storage memory device and comprising code configured so as when executed on a transmitting terminal to perform operations of: clustering channels from a transmitting terminal to a plurality of receiving terminals into classes, the channels in each class having similar packet loss probabilities between the transmitting terminal and the receiving terminals of the class, and each class having an associated error propagation distortion map; determining an estimate of error propagation distortion for each of the classes of channels, the estimate of distortion being determined from the respective error propagation distortion map associated with each of the classes; performing a rate-distortion optimization process comprising, for each of a plurality of target image portions to be encoded in a frame of the video stream, selecting a preferred one of a set of encoding modes by optimizing a function comprising an estimate of distortion for the target image portion and a measure of bit rate required to encode the target image portion, the estimate of distortion being based on source coding distortion and the estimates of error propagation distortion for the classes; encoding the target image portions into an encoded version of the video stream using the selected encoding modes; and transmitting the same encoded version of the video stream from the transmitting terminal to each of the plurality of receiving terminals over respective channels, using the same rate-distortion optimization process in relation to each of the plurality of receiving terminals, the use of the same rate-distortion optimization process comprising making the same encoding mode selection per target image portion based on the same optimization of said function.

22. The computer program product of claim 21, wherein two or more of said channels are via a common multicasting relay node, whereby the code is configured so as when executed on the transmitting terminal to transmit the encoded version of the video stream to the multicasting relay mode over a first leg, such that the multicasting relay node forwards a respective instance of the encoded version of the video stream on to each of the respective two or more receiving terminals via a respective second leg of the channel.

23. The computer program product of claim 22, wherein the code is configured so as when executed to determine an individual probability of loss over each of said channels, and determine an aggregate probability based on the individual probabilities; and wherein the code is configured such that the aggregate estimate of distortion is based on the aggregate probability, and the individual probability for each of said two or more channels is determined by combining probabilities of loss over each of its legs.

24. The computer program product of claim 21, wherein the code is configured so as when executed to determine an individual estimate of error propagation distortion that would be experienced due to possible loss over each of said channels, and wherein the code is configured such that the determined estimate of error propagation distortion for each class is an aggregate estimate of error propagation distortion determined by aggregating the individual estimates of error propagation distortion.

25. The computer program product of claim 24, wherein the code is configured is configured so as when executed to update the error propagation maps after each encoding mode selection.

26. The computer program product of claim 21, wherein the packet loss probability of each class comprises one of a maximum, a median and a mean of individual packet loss probabilities of the channels in each class.

27. The computer program product of claim 24, wherein the aggregate of the individual estimates of distortion comprises one of a maximum, a median and a mean of the individual estimates of distortion.

28. The transmitting terminal of claim 16, wherein packet loss probability of each class comprises one of a maximum, a median and a mean of individual packet loss probabilities of the channels in each class.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) For a better understanding of the present invention and to show how it may be put into effect, reference is made by way of example to the accompanying drawings in which:

(2) FIG. 1a is a schematic representation of a video stream,

(3) FIG. 1b is a schematic representation of some intra prediction coding modes,

(4) FIG. 1c is a schematic representation of a calculation of error propagation distortion,

(5) FIG. 2 is a schematic block diagram of a communication system,

(6) FIG. 3 is a schematic block diagram of an encoder,

(7) FIGS. 4a and 4b represent example topologies for one transmitter and multiple receivers, and

(8) FIG. 5 is a schematic block diagram of a system employing feedback from a decoder to an encoder.

DETAILED DESCRIPTION

(9) An example communication system in which video coding may be employed is illustrated schematically in the block diagram of FIG. 2. The communication system comprises a first, transmitting terminal 12 and a second, receiving terminal 22. For example, each terminal 12, 22 may comprise a mobile phone or smart phone, tablet, laptop computer, desktop computer, or other household appliance such as a television set, set-top box, stereo system, etc. The first and second terminals 12, 22 are each operatively coupled to a communication network 32 and the first, transmitting terminal 12 is thereby arranged to transmit signals which will be received by the second, receiving terminal 22. Of course the transmitting terminal 12 may also be capable of receiving signals from the receiving terminal 22 and vice versa, but for the purpose of discussion the transmission is described herein from the perspective of the first terminal 12 and the reception is described from the perspective of the second terminal 22. The communication network 32 may comprise for example a packet-based network such as a wide area internet and/or local area network, and/or a mobile cellular network.

(10) The first terminal 12 comprises a storage medium 14 such as a flash memory or other electronic memory, a magnetic storage device, and/or an optical storage device. The first terminal 12 also comprises a processing apparatus 16 in the form of a CPU having one or more cores; a transceiver such as a wired or wireless modem having at least a transmitter 18; and a video camera 15 which may or may not be housed within the same casing as the rest of the terminal 12. The storage medium 14, video camera 15 and transmitter 18 are each operatively coupled to the processing apparatus 16, and the transmitter 18 is operatively coupled to the network 32 via a wired or wireless link. Similarly, the second terminal 22 comprises a storage medium 24 such as an electronic, magnetic, and/or an optical storage device; and a processing apparatus 26 in the form of a CPU having one or more cores. The second terminal comprises a transceiver such as a wired or wireless modem having at least a receiver 28; and a screen 25 which may or may not be housed within the same casing as the rest of the terminal 22. The storage medium 24, screen 25 and receiver 28 of the second terminal are each operatively coupled to the respective processing apparatus 26, and the receiver 28 is operatively coupled to the network 32 via a wired or wireless link.

(11) The storage medium 14 on the first terminal 12 stores at least a video encoder arranged to be executed on the processing apparatus 16. When executed the encoder receives a “raw” (unencoded) input video stream from the video camera 15, encodes the video stream so as to compress it into a lower bitrate stream, and outputs the encoded video stream for transmission via the transmitter 18 and communication network 32 to the receiver 28 of the second terminal 22. The storage medium on the second terminal 22 stores at least a video decoder arranged to be executed on its own processing apparatus 26. When executed the decoder receives the encoded video stream from the receiver 28 and decodes it for output to the screen 25. A generic term that may be used to refer to an encoder and/or decoder is a codec.

(12) FIG. 3 is a high-level block diagram schematically illustrating an encoder such as might be implemented on transmitting terminal 12. The encoder comprises: a discrete cosine transform (DCT) module 51, a quantizer 53, an inverse transform module 61, an inverse quantizer 63, an intra prediction module 41, an inter prediction module 43, and a subtraction stage (−). The encoder also comprises a switch 47 and mode selection module 49. Each of the modules is preferably implemented as a portion of code stored on the transmitting terminal's storage medium 14 and arranged for execution on its processing apparatus 16, though the possibility of some or all of these being wholly or partially implemented in dedicated hardware circuitry is not excluded.

(13) Each of the switch 47 and mode selection module 49 is arranged to receive an instance of the input video stream comprising a plurality of macroblocks MB. The mode selection module 49 is arranged to select a coding mode “o” for each macroblock and is operatively coupled to the multiplexer 47 so as to control it to pass the output of the inverse quantizer 63 to the input of either the intra prediction module 41 or inter prediction module 43 as appropriate to the selected mode. The mode selection module 49 may also be arranged to indicate the selected mode “o” to the relevant prediction module 41, 43 (e.g. to indicate a 4×4 partition mode, 8×8 mode, skip mode, etc.), and to receive information fed back from the prediction module 41, 43 for use in selecting the modes for the next frame. The output of the intra prediction module 41 or inter prediction module 43 is then coupled on to an input of the subtraction stage (−) which is arranged to receive the unencoded input video stream at its other input and subtract the predicted blocks from their unencoded counterparts, thus generating the residual signal. The residual blocks are then passed through the transform (DCT) module 51 where their residual values are converted into the frequency domain, then to the quantizer 53 where the transformed values are converted to discrete quantization indices. The quantized, transformed signal is fed back though the inverse quantizer 63 and inverse transform module 61 to generate a predicted version of the blocks or subblocks (as would be seen at the decoder) for use by the selected prediction module 41, 43. An indication of the predictions used in the prediction modules 41,43, the motion vectors generated by the inter prediction module 43 and the quantized, transformed indices of the residual as generated by the transform and quantization modules 51, 53 are all output for inclusion in the encoded video stream; typically via a further, lossless encoding stage such as an entropy encoder (not shown) where the prediction values and transformed, quantized indices may be further compressed using lossless encoding techniques known in the art.

(14) The following describes an encoder and encoding method which aggregates link-related distortion properties of each channel in order to optimize a trade-off between bitrate and distortion for a single version of an encoded video stream to be transmitted to multiple receivers. The encoder is similar to that described in relation to FIG. 3, but with a modified mode selection module 49. It may be used to encode a video stream of the kind illustrated in FIG. 1, and implemented in a communication system such as that of FIG. 2.

(15) As mentioned, mode selection may involve optimizing (e.g. minimizing) a Lagrangian type function:
J=D(m,o)+λR(m,o),  (1)
where J represents the Lagrange function, D represents a measure of distortion (a function of mode o and macroblock m or macroblock sub-partition), R is the bitrate, and λ is a parameter defining a trade-off between distortion and rate.

(16) In a conventional case the distortion term D only takes into account the source coding distortion, i.e. due to imperfections in the encoder such as the distortion introduced by quantization. It does not take into account the distortion that may be introduced due to loss of data over the channel, e.g. due to packet loss in transmission over a packet-based network 32.

(17) On the other hand, loss adaptive techniques such as those of the present invention and Zhang et al. attempt to define a measure of “end-to-end” distortion taking into account both the source encoding and the distortion due to loss of data over the channel. The end-to-end distortion for a given (target) block, macroblock or subblock may be described as:
D=(1−p)D.sub.arrival+pD.sub.loss  (5)
where D.sub.arrival is an estimate of the distortion that will be experienced if the target block does arrive at the decoder, and D.sub.loss is an estimate of the distortion that will be experienced if the target block does not arrive at the decoder due to packet loss over the channel, e.g. due to loss of a packet comprising that block over a packet-based network 32. The parameter p is an estimate of the probability of a loss event occurring over the channel that results in the block or image portion in question being lost, e.g. an estimate of the probability of a packet loss. For convenience the term “block” may be used in places here to refer generally to the relevant level of frame partition (e.g. a block or subblock of certain standards such as H.264).

(18) D.sub.arrival represents not only the source coding distortion but also the distortion that will be introduced due to distortion of a block's past, i.e. distortion in one or more reference blocks from which the target block is to be predicted. Therefore D.sub.arrival comprises both a source coding distortion term D.sub.s and an error propagation distortion term D.sub.ef.sub._.sub.ref which represents a distortion in the predicted target block's history (i.e. distortion in the target blocks' reference block which will carry forward into the target block):
D.sub.arrival=D.sub.s+D.sub.ep.sub._.sub.ref  (6)

(19) D.sub.loss comprises a loss due to concealment. If a target block is not received then the decoder will apply a concealment algorithm which could involve freezing a previously decoded block, or interpolating or extrapolating from one or more successfully decoded blocks (either from the current frame and/or a previous frame). Therefore D.sub.loss can be identified as the distortion due to this concealment process:
D.sub.loss=D.sub.ec  (7)

(20) So examining equation (5), the term D.sub.s represents an estimate of the distortion that will be experienced if there is no loss at all, the term D.sub.ec represents an estimate of the distortion that will be experienced if the target block is lost, and the term D.sub.ep.sub._.sub.ref represents an estimate of the distortion that will be experienced if the target block is successfully received but something in its history is lost (if the target block's reference block is lost, or the reference block's reference block is lost, etc.)

(21) D.sub.s and D.sub.ep.sub._.sub.ref are functions of encoding mode selection o. D.sub.ec is not a function of mode selection o and so is dropped from the Lagrange expression (it does not matter how a lost block was encoded—it is still lost). Hence the optimization can be written as:

(22) o opt = argmin o ( D s ( m , o ) + D ep_ref ( m , o ) + λ R ( m , o ) ) , ( 2 )

(23) D.sub.s is deterministic as it is based on information that can be known at the encoder, for example based on the difference between the raw input sample values s and the reconstructed sample values {circle around (s)}. The encoder runs a parallel instance of the decoder at the encoder side (or an approximation of it)—see the inset detailing the inter prediction module 43 in FIG. 3. The inter prediction module 43 comprises a motion compensation prediction (MCP) block 44 and addition stage (+) arranged to determine the reconstructed samples {circle around (s)} by combining the predicted samples {circle around (s)}.sub.pred and the reconstructed residual {circle around (r)}, i.e. {circle around (s)}.sub.i={circle around (r)}.sub.i+{circle around (s)}.sub.pred for each sample index i. In the case of inter encoding, at the encoder the predicted samples {circle around (s)}.sub.pred may be the same as the samples of the reference block {circle around (s)}.sub.ref (the reference block in the reference frame just being offset by the motion vector relative to the target frame—see FIG. 1c, to be discussed again shortly).

(24) Hence the encoder can determine the difference between the actual samples s and the reconstructed samples {circle around (s)} as seen at the encoder and decoder end (this so far ignores the possibility of loss which will introduce further distortion experienced at the decoder). The difference in samples may be calculated for example as the sum square difference (SSD) error over all sample indices i of the target block in question:

(25) D s = .Math. i [ ( s i - s ^ i ) 2 ] ( 8 )

(26) However, D.sub.ep.sub._.sub.ref remains to be estimated, which will be based on making some estimation concerning the channel over which the encoded data is to be transmitted (e.g. over packet-based network 32).

(27) To achieve this, the mode selection module 49 in the encoder may be configured to maintain an error propagation distortion map D.sub.ep describing the distortion of each macroblock or partition of a macroblock within the most recently encoded frame. The mode selection module 49 is also arranged to determine a probability p that the packet containing the reference block from which a target block is to be predicted will be lost over the channel (and therefore also to implicitly or explicitly determine a probability 1−p that the packet does arrive). The probability p may be predetermined at the design stage based on statistical modelling, in which case the mode selection module 49 determines p by retrieving a value from memory 14. Another is that the mode selection module 49 determines p based on feedback from the receiver 22.

(28) The error propagation map may be expressed as:
D.sub.ep=(1−p)D.sub.ep.sub._.sub.arrival+pD.sub.loss  (9)

(29) The error propagation map D.sub.ep comprises a distortion estimate for macroblock m or more preferably for each sub partition (block or sub-block) m(k) within the most recently encoded frame. Hence it may be more explicitly written as:
D.sub.ep(m(k))=(1−p)D.sub.ep.sub._.sub.arrival(m(k))+pD.sub.loss(m(k))  (10)
where m(k) denotes the k.sup.th sub-partition (e.g. sub-block) of macroblock m and p the probability of packet loss.

(30) D.sub.loss is equal to D.sub.ec as discussed above. D.sub.ep.sub._.sub.arrival represents the differences over the channel, i.e. the difference between the reconstructed samples at the encoder and the reconstructed at the decoder. For example this could be quantified in terms of the sum of squared differences (SSD):

(31) D ep_arrival = .Math. i ( s ^ i - s ~ i ) 2 ( 11 )
where {tilde over (s)}.sub.i are the samples (of indices i) received at the decoder taking into account both the source coding distortion and the distortion due to the channel. I.e. s.sub.i are the raw unencoded input samples, {circle around (s)}.sub.i are the reconstructed samples at the encoder taking into account the source coding distortion (e.g. due to quantization), and {tilde over (s)}.sub.i are the samples taking into account the total end-to-end distortion including the lossy effect of the channel; s.sub.i.fwdarw.{circle around (s)}.sub.i.fwdarw.{tilde over (s)}.sub.i.

(32) D.sub.ep.sub._.sub.arrival can be expanded to:

(33) D ep_arrival = .Math. i ( ( s ^ ref + r ^ i ) - ( s ~ ref + r ^ i ) ) 2 ( 12 )
where {circle around (r)}.sub.i are the samples of the reconstructed residual. Therefore:

(34) D ep_arrival = .Math. i ( s ^ ref - s ~ ref ) 2 = D ep_ref ( 13 )

(35) So substituting into equation (9), the error propagation map can be rewritten as:
D.sub.ep=(1−p)D.sub.ep.sub._.sub.ref+pD.sub.ec  (14)
or:
D.sub.ep(m(k))=(1−p)D.sub.ep.sub._.sub.ref(m(k))+pD.sub.ec(m(k))  (15)

(36) Considering the mode optimization problem, it may also be written:
D.sub.ep(m(k),n+1)=(1−p)D.sub.ep.sub._.sub.ref(m(k),n,o.sub.opt)+pD.sub.ec(m(k),n,o.sub.opt)  (16)
where n is the frame number, i.e. D.sub.ep(n+1) is the error propagation map to be used for making the mode selection for frame at a time n+1 given the existing decision o.sub.opt and distortion D.sub.ep(n) map for frame at a preceding time n.

(37) As in Zhang [2], the D.sub.ec term may be also expanded:
D.sub.ep(m(k),n+1)=(1−p)D.sub.ep.sub._.sub.ref(m(k),n,o.sub.opt)+p(D.sub.ec.sub._.sub.rec(m(k),n,o.sub.opt)+D.sub.ec-ep(m(k),n)),  (3)
where D.sub.ec-rec denotes the SSD between the reconstructed and error concealed pixels in the encoder, and D.sub.ec-ep the expected SSD between the error concealed pixels in the encoder and decoder.

(38) Examining equation (3), as explained above, the term D.sub.ep.sub._.sub.ref represents the distortion that will be experienced if the target block is successfully received but something in its history is lost (if the target block's reference block is lost, or the reference block's reference block is lost, etc.). Further, D.sub.ec-rec represents an estimate of the distortion due to the nature of the concealment algorithm itself (somewhat analogous to the intrinsic source coding distortion D.sub.s for prediction). D.sub.ec-ep then represents an estimate of the distortion that will be experienced if both the target block is lost (and so needs to be concealed at the decoder) and something in the concealed target block's history is lost (if the block from which concealment is done is lost, or the block from which that block is predicted or concealed is lost, etc.).

(39) So the distortion map D.sub.ep comprises a contribution due to new loss, resulting from D.sub.ec-rec and in part from D.sub.ec-ep; and a contribution due to past loss, resulting from D.sub.ep.sub._.sub.ref and in part also from D.sub.ec-ep.

(40) For the first frame in a sequence the frame will be coded with intra coding, in which case D.sub.ep.sub._.sub.ref=0 and therefore D.sub.ep=pD.sub.ec.

(41) The error concealment distortion D.sub.ec is calculated by the mode selection module 49. The term D.sub.ec-rec is based on knowledge of the concealment algorithm, and may depend on the particular error concealment algorithm used. D.sub.ec-ep is calculated based on the existing (most recent) distortion map in a manner analogous to D.sub.ep.sub._.sub.ref, e.g. by copying the distortion of a co-located block in the case of a basic concealment algorithm or calculating a weighted sum of the distortions from multiple previously encoded blocks b1-b4 if a more complex concealment is used that attempts to extrapolate motion (by analogy see discussion in relation to FIG. 1c below). Other ways of calculating D.sub.ec could be used—this could be any estimation of a difference between the reconstructed samples in the encoder and the error concealed samples as would be seen ay the decoder (i.e. the samples copied, interpolated or extrapolated from a previous received frame or a received region of the same frame to conceal the lost frame or region).

(42) The mode selection module 49 then maintains the error propagation map for each subsequent inter predicted frame by updating it following each mode selection decision, now including a calculation of D.sub.ep.sub._.sub.ref from knowledge of the existing error map. In the case of inter prediction (motion estimation), according to Zhang et al. this is done using the motion vectors for the frame in question.

(43) An example of this is illustrated in FIG. 1c. Four example blocks b1, b2, b3 and b4 are shown in a reference frame F.sub.n (at time n−1), the reference frame having already been encoded. The blocks of the target frame F.sub.n (at a subsequent time n) are to be predicted from the reference frame F.sub.n−1. For example consider a target block b.sub.1 in the target frame F.sub.n. To this end the motion prediction module 44 determines a motion vector defining an offset between the target block in the target frame F.sub.n and a reference block (shown by the dotted line) in the reference frame F.sub.n−1, such that when the reference block is translated from the offset position in the reference frame F.sub.n−1 into the position of the target block b.sub.1′ in the target frame F.sub.n it provides a best estimate of the target block b.sub.1. Note therefore that the dotted reference block is not necessarily an indexable block in the reference frame F.sub.n−1, i.e. is not necessarily a predetermined subdivision of the reference frame, and may be offset by any arbitrary amount (and in fact may even be offset by a fractional number of pixels). Hence the reference block is made up of a contribution from four actual indexable blocks b1, b2, b3 and b4.

(44) Accordingly, the existing calculation performed by the mode selection module 49 to determine D.sub.ep.sub._.sub.ref for use in the update of the error propagation map D.sub.ep(n+1) comprises calculating a weighted sum of the distortions recorded for blocks or subblocks b1 to b4 in the existing map D.sub.ep(n):

(45) D ep_ref = .Math. i = 1 4 w i D ep ( i ) ( 17 )
Or more explicitly:

(46) D ep_ref ( m , ( k ) , n ) = .Math. i = 1 4 w i D ep ( b i , n - 1 ) , ( 4 b )
where w.sub.i is the weight representing the contribution from block or subblock b.sub.i and D.sub.ep(i) is the error propagation map entry for block or subblock b.sub.i.

(47) The above describes an existing process of determining an initial error propagation map D.sub.ep, using the error propagation map to select an optimal coding mode decision o.sub.opt for a subsequent coding, using the coding decision to update the map D.sub.ep, then using the updated map in the next coding decision, and so forth, wherein the error propagation map represents an end-to-end distortion including an estimated effect of loss over the channel E.g. reference is made again to Zhang et al. This may be referred to herein as loss-adaptive rate-distortion optimization (LARDO).

(48) However, the process of Zhang et al. only addresses the problem of optimizing the end-to-end rate-distortion performance of a single transmitter and a single receiver.

(49) In group video calling scenario on the other hand, one is faced with the problem of optimizing the end-to-end rate-distortion performance for a single transmitter and multiple receivers where each transmitter-receiver link (i.e. channel) has some respective loss probability p.sub.i. Examples of this are illustrated schematically in FIGS. 4a and 4b.

(50) FIG. 4b illustrates an arrangement in accordance with a preferred application of the present invention. The arrangement comprises a transmitting terminal 12, a multicasting relay node 70, and a plurality of receiving terminals 22. Three receiving terminals 22a, 22b and 22c are shown here for illustrative purposes but it will be appreciated that any number from two upwards could be present. The transmitter 12 may be configured in accordance with FIG. 2 and comprise an encoder in accordance with that described in relation to FIG. 3, but with a modified mode selection module 49 configured in accordance with the following. Each of the receivers 22 may be configured in accordance with FIG. 2 and comprise a respective decoder configured to complement the encoder of FIG. 3. The relay node may comprise a third end-user-terminal such as a laptop or desktop computer belonging to a third user who has agreed to facilitate a scheme, or alternatively may comprise a server of a communication service provider. In the case where the relay 70 is an end-user terminal, the third user may or may not be a participant in the call (i.e. may or may not be decoding the video stream for play-out at the third-user terminal 70 and may or may not be authorised to do so).

(51) The transmitting terminal 12 is arranged to establish a connection with the multicasting relay node 70 via a packet-based network 32 such as the Internet; and the multicasting relay node 70 is arranged to establish a respective connection with each of the receiving terminals 22, again via a packet-based network 32 such as the Internet. The channel (i.e. link) from the transmitting terminal 22 to each respective receiving terminal 22 comprises: a first leg (i.e. first stage) in the form of the connection between the transmitting terminal 12 and the relay node 70, and a respective second leg (i.e. second stage) in the form of the connection between the relay node 70 and the respective second terminal 22.

(52) The first leg has an associated probability of packet loss p.sub.0. Each of the second legs has a respective probability of packet loss p.sub.1′, p.sub.2′, p.sub.3′. In general these probabilities are not the same. In the following, each channel or its receptive receiver may also be referred to by the numbering l=1 . . . L, e.g. where L=3 in the illustrated example.

(53) In accordance with the arrangement of FIG. 4b, the encoder on the transmitting terminal 12 is configured to generate only a single encoded version of the video stream for transmission to each of a plurality of the receiving terminals 22, and to transmit that encoded video stream to the common multicasting relay node 70 via the first leg (and only to that relay node 70 unless other recipients or relays, not shown, are connected to the transmitter 12 as part of a more complex “tree” type structure). The multicasting relay node 70 is configured to forward a respective instance of the encoded version of the video stream onwards to each of the receiving terminals 22 via a respective second leg of the respective channel.

(54) As discussed previously, if Zhang et al. was applied directly to a multi-receiver arrangement without further modification, this would only allow minimizing the end-to-end distortion (in a mean squared error sense) for a given bitrate for each individual transmitter-receiver pairs.

(55) Therefore Zhang et al. alone would not support an arrangement as described in relation to FIG. 4b.

(56) However, as also discussed, often both the uplink bandwidth and the transmitter's CPU resources constitute bottleneck, in which case the transmitter may be constrained to generate a single stream that is sent via a multicast node as in FIG. 4b. For example this may occur in a group video calling scenario where three or more terminals are participating in a live video call. In such a scenario the inventors have recognized that there are many different possible optimization objectives. For instance, in some cases one might want to optimize such that the average end-to-end distortion over all the receivers is minimized, and in other cases minimizing the maximum end-to-end distortion is desired.

(57) To address this, the improved system and method described in the following uses an aggregation of link-related properties on the different links or channels in order to optimize a desired target objective function affecting a single transmission stream. The level of robustness in the encoded single video stream may then be optimized for multiple receivers.

(58) As the encoder on the transmitting terminal generates and transmits only a single encoded version of the video stream for transmission to each of a plurality of the receiving terminals 22 (via the relay 70), and as this is based on an aggregated estimate in relation to the plurality of respective channels, then the encoded video stream sent to each of the receiving terminals 12 contains the same mode selections for a given macroblock, arrived at based on the same rate-distortion optimisation calculation performed for any given macroblock. This saves on uplink bandwidth and on CPU resources at the transmitter.

(59) In a first embodiment a function ƒ is applied to the set of packet loss probabilities for the receivers. That is, for L receivers 22:
p=ƒ(p.sub.0+p.sub.1′−p.sub.0p.sub.1′,p.sub.0+p.sub.2′−p.sub.0p.sub.2′, . . . ,p.sub.0+p.sub.L′−p.sub.0p.sub.L′),  (3a)
where it is assumed the structure shown in FIG. 4b, i.e. the loss probability from the transmitter 12 to the receiver 22 number l via the multicast node can be expressed as:
1−(1−p.sub.0)(1−p.sub.1′)=p.sub.0+p.sub.1′−p.sub.0p.sub.1′.  (3b)

(60) The aggregated packet loss probability p can then be used in equation (3) inside the encoder. Example functions are the maximum, the median, or the mean depending what the optimization objective is. E.g., optimizing based on the maximum packet loss guarantees optimal end-to-end rate distortion performance (on average) for the worst link, and consequently less optimal performance for the other links (higher source coding distortion than would be necessary).

(61) In a second embodiment the transmitter 12 tracks L different error propagation maps, each for a respective one of the channels to a respective one of the receivers 22. This may be achieved by applying equation (3) for each receiver 22 and its receptive channel, but using the respective loss probability of equation (3b) for each channel in place of the general parameter p in equation (3).

(62) Only transmitter-receiver pairs that are unique, with respect to the packet loss probability, need to be tracked. It is also possible to track fewer distortion maps, for example by clustering the different links to a few different classes (e.g., classes of low, medium, and high packet losses).

(63) Given the different distortion maps for the different links (channels) it is possible to compose an aggregated error-propagation reference distortion (conceptually similar to the first embodiment) that we apply in the mode selection of equation (2), e.g.:
D.sub.ep-ref(m(k),o)=ƒ(D.sub.ep-ref(m(k),o|link.sub.1), . . . ,D.sub.ep-ref(m(k),o|link.sub.L)),  (4a)
where ƒ can be for instance, the maximum, the median, or the mean, similar to above.

(64) In an optional but particularly advantageous realization of the second embodiment, there may be available feedback information from all (or some) of the receivers, signaling what packets (or frames or slices) were received or lost at the decoders. In general different packets may be lost on the different links from the multicast node to each individual receiver. The feedback information may be used in the encoder at the transmitter to reset and re-compute the different distortion maps. Individual distortion maps are tracked for the different receivers, even for the case when the different links have the same loss probability.

(65) FIG. 5 is a schematic block diagram depicting a system of encoder and decoder that may be used to implement the update of the distortion maps based on feedback. Preferably the encoder is manifested in the storage 14 and processing apparatus 16 of the transmitting terminal 12, and the decoder is manifested in the storage medium 24 and processing apparatus 26 of the receiving terminal 22. The encoder on the transmitting terminal 12 comprises an encoding module and an encoder-side instance of a decoding module mirroring or approximating the decoding as performed at the decoder. The encoding module comprises the forward transform module 51 and quantizer 53, as well as potentially one or more other stages such as an entropy encoder. The encoder-side decoding module comprises the inverse quantizer 63 and inverse transform module 61, as well as potentially other stages such as an entropy decoder. The encoder also comprises the motion compensation prediction (MCP) module 44, and subtraction stage (−). Reference is made again to FIG. 3 for an explanation of the connections between these encoder elements.

(66) Furthermore, not shown in FIG. 3 is that the encoder also comprises a decoded picture buffer 65 connected in the path between the encoder-side decoding module 61, 63 and the motion compensation prediction module 44. The decoded picture buffer 65 may comprise a plurality of constituent buffer regions each of which may be marked as holding either a short-term reference or a long-term reference. In FIG. 5 the decoded picture buffer 65 is shown as holding one or more short-term references 66, one or more unacknowledged long-term references 67, and one or more acknowledged long-term references 68.

(67) Each constituent buffer region is operable to store a reconstructed version of one or more previously encoded frames or slices (i.e. having been encoded and then decoded again by the encoder-side instance of the decoding module 61, 63 so as to represent the frame or slice as would be seen at the encoder). These reconstructed versions of previously encoded frames or slices are provided for use as a reference in the inter prediction coding of a current frame or slice, i.e. so that target blocks to be encoded can be coded relative to reference blocks in the buffers.

(68) The decoder on the receiving terminal 24 comprises decoder-side instances 44′, 61′, 63′, 65′, 66′, 67′ and 68′ of the motion compensation prediction module 44, decoding module 61, 63, and decoded picture buffer 65 arranged to store corresponding short and long term references 66, 67 and 68.

(69) The decoder on the receiving terminal 24 is configured to communicate with the encoder on the transmitting terminal 12 via a feedback channel. The feedback is preferably via the same network 32 by which the video stream is transmitted to the receiving terminal 22, e.g. the same packet-based network such as the Internet, though the possibility of an alternative feedback mechanism is not excluded.

(70) With reference to the exemplary implementation of FIG. 5, the feedback is considered to contain information about the decoded picture buffer 65′ at the decoder. Given this feedback the encoder knows for example which frames or slices in the decoder were decoded without containing any error-propagation distortions. In FIG. 5 the entry 68 in the decoded picture buffer 65 refers to such an acknowledged error-free frame. The entry 67 in the decoded picture buffer 65 refers to an unacknowledged frame. The feedback mechanism can be used to make the encoder aware of what is the latest acknowledged long-term reference available at the decoder (in addition to information about which frames have been lost).

(71) In the optional feedback-based realization of second embodiment of the present invention, information fed back to the encoder from one or more of the receiving terminals 22, such as the packet and/or frame arrival status, is used to adjust the corresponding distortion map in the encoder for the respective one or more of the receiving terminals 22, and thereby improve the overall rate-distortion performance compared to the method by Zhang et al.

(72) The error propagation distortion map D.sub.ep for each frame or slice of a frame is stored in association with that frame or slice in the decoded picture buffer 65 of the encoder, in relation to each of the receiving terminals 22. For each frame or slice, the decoded picture buffer 65 at the encoder also stores the corresponding error concealment reconstruction distortion map D.sub.ec-rec, error concealment error propagation map D.sub.ec-ep, corresponding mode decisions o and motion vector information. If feedback information is received from the decoder of one or more of the receiving terminals, this can then be used by the encoder to update the corresponding distortion map(s) for the respective one or more channels. Any distortion maps that are updated based on the feedback are input into the equation for the aggregate error-propagation distortion in the same way as any that aren't. Refer again to equations (3) and (4a). The feedback information allows the estimated distortion tracking to be refined, yielding better rate-distortion performance.

(73) Preferably the update of the error distortion map for any given receiver 22 is achieved as follows. If the encoder receives feedback information signaling that a particular frame or slice has successfully arrived at the decoder, the error concealment contributions D.sub.ec-rec and D.sub.ec-ep can be removed from the error propagation distortion map D.sub.ep in equation (3). Conversely, if feedback information is received signaling that a particular frame or slice was lost at the decoder, the associated error propagation distortion map D.sub.ep is recomputed so as to only include the contributions from the error concealment distortion, i.e. the second and third term in the right hand side of equation (3), D.sub.ec-rec and D.sub.ec-ep (normalized by the a priori loss probability estimate p).

(74) Then, if the round trip time (RTT) is small in comparison to the number of reference pictures in the decoded picture buffer, it is possible to propagate the adjusted potential error-propagation map D.sub.ep at time n-RTT to the error propagation distortion map at time n−1 by applying equation (3) recursively. The updated error propagation distortion map D.sub.ep at time n−1 will then be the basis for the computation of the D.sub.ep.sub._.sub.ref at time n which is used in the mode selection process (2). This results in a more accurate tracking of the potential distortion maps, and thus, improves the overall rate-distortion performance of the system.

(75) The above has been described in relation to the preferred application of FIG. 4b, but FIG. 4a illustrates an arrangement in accordance with an alternative application of the present invention, in which a transmitting terminal 30 transmits a respective instance of the same encoded version of the video stream to each of the receivers 22 via a respective connection over a packet-based network 32 such as the Internet. In this case each channel comprises the respective connection established between the transmitter 12 and respective receiver 22. Even in this scenario, it may still place an additional burden on the transmitter's CPU resources to perform a full loss-adaptive rate-distortion optimisation process in relation to each channel. Therefore it may still be desirable to aggregate the rate-distortion optimization process in order to transmit multiple instances of a single encoded version of the video stream to the multiple receivers, thus saving on processing resources at the transmitter, if not on uplink.

(76) To apply the above embodiments of the invention to this scenario, the probability of packet loss for the l.sup.th channel in equations (3a) and (3b) reduces to just the probability p.sub.1 of loss over the respective connection between the transmitter 12 and respective receiver 22, and the same techniques can then be applied.

(77) The encoder on the transmitter 12 of FIG. 4a can then transmit a respective instance of the same encoded version of the video stream to each of the receiving terminals 12, again containing the same mode selections for a given macroblock arrived at based on the same rate-distortion optimisation calculation. This saves on CPU resources at the transmitter.

(78) It will be appreciated that the above embodiments have been described only by way of example.

(79) Generally, while the above has been described in terms of slices, macroblocks and blocks or sub-blocks, these terms are not necessarily intended to be limiting and the ideas described herein are not limited to any particular way of dividing or subdividing a frame. Further, the distortion map may cover a whole frame or a region within a frame, and coding decision process may be applied over the whole frame or only for a region within a frame. Note also that the prediction block granularities do not have to be the same as or even connected to the distortion map granularity (though that possibility is not excluded).

(80) The sum of squared differences (SSD) is often preferred as measure of difference since it results in higher quality compared to sum of absolute differences (SAD), but the latter possibility or other possibilities are not excluded and generally the invention could be implemented using any measure of difference between samples as a basis for quantifying distortion.

(81) Commonly, the measure of rate also accounts for coding of all needed parameters, including parameters describing prediction and quantized transform coefficients. This kind of optimization may be referred to herein as full rate-distortion optimization (RDO). In lower complexity embodiments however, the distortion and/or rate term may be approximated by only taking into account the effect of some but not all processing stages, e.g. only taking into account the effect of prediction.

(82) Further, where the present invention is described in terms of two frames n−1 and n, or n and n+1 or such like, according to certain embodiments of the invention it is not necessary for these to refer to two adjacent frames (though that may be the case in existing codecs). In some embodiments it is possible that inter prediction could be performed relative to an even earlier frame, and as such n−1 and n, or n and n+1, may be used in relation to the present invention to refer respectively to any previously encoded frame or image portion and a subsequent frame or portion to be predicted from it.

(83) Note again that where a contribution due to loss is mentioned in this application, or anything stating what happens “if” data lost over the channel or such like, this only relates to a probabilistic assumption (e.g. p) made by the encoder about what might be experienced by the decoder—the encoder of course does not know what will happen. The probabilistic assumption may be predetermined at the design stage based on statistical network modelling, and/or could even be determined dynamically based on feedback from the decoder.

(84) It should be understood that the block, flow, and network diagrams may include more or fewer elements, be arranged differently, or be represented differently. It should be understood that implementation may dictate the block, flow, and network diagrams and the number of block, flow, and network diagrams illustrating the execution of embodiments of the invention.

(85) It should be understood that elements of the block, flow, and network diagrams described above may be implemented in software, hardware, or firmware. In addition, the elements of the block, flow, and network diagrams described above may be combined or divided in any manner in software, hardware, or firmware. If implemented in software, the software may be written in any language that can support the embodiments disclosed herein. The software may be stored on any form of non-transitory computer readable medium, such as random access memory (RAM), read only memory (ROM), compact disk read only memory (CD-ROM), flash memory, hard drive, and so forth. In operation, a general purpose or application specific processor loads and executes the software in a manner well understood in the art.

(86) Other variants may become apparent to a person skilled in the art given the disclosure herein. The scope of the invention is not limited by the described embodiments but only by the appendant claims.