Method and Device for Mapping a Data Stream into an SDI Channel
20170094374 · 2017-03-30
Assignee
Inventors
- Charles Daniel BUYSSCHAERT (Bruxelles, BE)
- Thomas Denison (Gembloux, BE)
- Sébastien Lugan (Boissy-le-Chatel, FR)
- Gaël Rouvroy (Woluwe-Saint-Pierre, BE)
- Pascal Hubert Pellegrin (Wierde, BE)
Cpc classification
H04N21/23602
ELECTRICITY
H04N21/2343
ELECTRICITY
H04N21/6379
ELECTRICITY
International classification
Abstract
The invention provides a method for mapping a data stream onto an SDI channel, said data stream comprising a sequence of m-bit words, a range of values from 0 to 2**n1 and from 2**m2**n to 2**m1 being excluded values on said SDI channel. The method comprises the steps of grouping the words to be transmitted, detecting if at least one of the words of the group contains a number of MSB's equal to one, and then recoding these MSBs and adding a constant, in order that no excluded values are obtained. Supplementary bits signal groups that have been recoded.
Claims
1. A method for mapping a data stream onto an SDI channel, said data stream comprising a sequence of m-bit words, a range of values from 0 to (2**n)1 and from 2**m2**n to (2**m)1 being excluded values on said SDI channel, comprising the steps of a) grouping words of said sequence of m-bit words in a group of 2**g words, g being comprised between 0 and m1; b) detecting if among said group of 2**g words, a condition is met that at least one word has g+1 MSB bits equal to 1; c) if said condition is true, storing a supplementary bit equal to 1 and recoding said g+1 MSB bits of said 2**g words by replacing said (g+1)*2**g bits having a value x by an equal number of bits having a value y through a function y=f(x) applying bijectively the set of possible values of x to a disjoint set of values y of (g+1)*2**g bits ; d) if said condition is false, storing a supplementary bit equal to 0; e) repeating steps a-d a number k of times; f) grouping said k supplementary bits into the LSBs of a number j of m-bit words wherein j is the integer part of (k+m2)/(m1) ; g) performing an addition modulo 2**m of a value s to said number j of m-bit words, and to said k*2**g m-bit words, where s is comprised between 4 and 2**(m1); and h) sending said number j of m-bit words and said k*2**g m-bit words over said SDI channel.
2. A method according to claim 1 wherein said value of s is comprised between 2**n and (2**m2**n)(2**(m1i)), where the sum is performed for i going from zero to g.
3. A method according to claim 1 wherein said recoding step of step c) comprises When g=0, if the most significant bit of said word is 1, replacing it by a zero; When g>0, i. determining w being the number of words of said group having g+1 MSBs equal to 1; ii. if w is less than 2**g/g then 1. coding w in bits of y with a code of length w, composed of (w1) bits 1 and one bit 0 when w>1, or one bit 0 when w=1; 2. coding in w*g bits of y the indices of the w words containing g+1 MSBs equal to 1, each index being coded with g bits; iii. if w is larger than or equal to 2**g/g then 1. coding in 2**g bits of y a 1 for the w words having g+1 MSBs equal to one and 0 otherwise; copying the MSBs of the words not having g+1 MSBs equal to 1, if any, in bits of y, else code 0 bits in y.
4. A method according to claim 1 wherein said step c) comprises using a table comprising a value of y for each successive of the values of x, for obtaining the value of y corresponding to a value of x.
5. A method according to claim 1 wherein m equals 10.
6. A method according to claim 1 wherein n equals 2.
7. A method according to claim 1 wherein g equals 2.
8. A method according to claim 1 wherein k equals 9.
9. A method according to claim 1 wherein s equals 64.
10. A method for unmapping an SDI data stream, said data stream comprising a sequence of m-bit words, a range of values from 0 to (2**n)1 and from 2**m2**n to (2**m)1 being excluded values on said SDI channel, said unmapping of said SDI data stream comprising the steps of a) receiving j m-bit words containing supplementary bits over said SDI channel; b) receiving k*2**g m-bit words over said SDI channel; c) performing subtraction modulo 2**m of a value s from said j m-bit words, and from said k*2**g words; d) repeating steps e-g a number k of times; e) grouping words of said sequence of m-bit words in a group of 2**g m-bit words; f) if a supplementary bit corresponding to said grouping is equal to zero, copying said group of 2**g m-bit words; g) if a supplementary bit corresponding to said grouping is equal to 1, replacing said (g+1)*2**g bits having a value y by an equal number of bits having a value x through the function x=f**1(y) and copying said group of 2**g m-bit word.
11. A device for mapping a data stream onto an SDI channel, said data stream comprising a sequence of m-bit words, a range of values from 0 to (2**n)1 and from 2**m2**n to (2**m)1 being excluded values on said SDI channel, comprising a controller programmed for performing and/or hardware designed for performing a method comprising: a) grouping words of said sequence of m-bit words in a group of 2**g words, g being comprised between 0 and m1; b) detecting if among said group of 2**g words, a condition is met that at least one word has g+1 MSB bits equal to 1; c) if said condition is true, storing a supplementary bit equal to 1 and recoding said g+1 MSB bits of said 2**g words by replacing said (g+1)*2**g bits having a value x by an equal number of bits having a value y through a function y=f(x) applying bijectively the set of possible values of x to a disjoint set of values y of (g+1)*2**g bits ; d) if said condition is false, storing a supplementary bit equal to 0; e) repeating steps a-d a number k of times; f) grouping said k supplementary bits into the LSBs of a number j of m-bit words wherein j is the integer part of (k+m2)/(m1) ; g) performing an addition modulo 2**m of a value s to said number j of m-bit words, and to said k*2**g m-bit words, where s is comprised between 4 and 2**(m1); and h) sending said number j of m-bit words and said k*2**g m-bit words over said SDI channel.
12. A device according to claim 11 wherein the controller is programmed for and/or the hardware is designed for transmitting 4K UHDTV frames at 60 FPS over a single 3G-SDI link.
13. A device according to claim 12 where the compression codec is a TICO codec. 15
14. A device for unmapping a data stream from an SDI channel, said data stream comprising a sequence of m-bit words, a range of values from 0 to (2**n)1 and from 2**m2**n to (2**m)1 being excluded values on said SDI channel, comprising a controller programmed for performing and/or hardware designed for performing a method comprising: a) receiving j m-bit words containing supplementary bits over said SDI channel; b) receiving k*2**g m-bit words over said SDI channel; c) performing subtraction modulo 2**m of a value s from said j m-bit words, and from said k*2**g words; d) repeating steps e-g a number k of times; e) grouping words of said sequence of m-bit words in a group of 2**g m-bit words; f) if a supplementary bit corresponding to said grouping is equal to zero, copying said group of 2**g m-bit words; g) if a supplementary bit corresponding to said grouping is equal to 1, replacing said (g+1)*2**g bits having a value y by an equal number of bits having a value x through the function x=f**1(y) and copying said group of 2**g m-bit word.
15. A device according to claim 14 wherein the controller is programmed for and/or the hardware is designed for receiving 4K UHDTV frames at 60 FPS over a single 3GSDI link.
16. A device according to claim 15 where the decompression codec is a TICO codec.
Description
SHORT DESCRIPTION OF THE DRAWINGS
[0061] These and further aspects of the invention will be explained in greater detail by way of example and with reference to the accompanying drawings in which:
[0062]
[0063]
[0064] FIF. 3 is an example of a group of 2g words, wherein one word has g+1 MSB bits equal to 1.
[0065]
[0066] The drawings of the figures are neither drawn to scale nor proportioned. Generally, identical components are denoted by the same reference numerals in the figures.
DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION
[0067]
[0068]
[0069]
[0070]
[0071] The method of the invention involves the grouping of words of the compressed data stream 130 in a number 2**g of groups of words. Examples will be given where the groups involve one, two, four and eight words, i.e. g=0, 1, 2 and 3. In these examples, the case m=10 (10-bit words) and n=2 is discussed, i.e. the excluded values are 0 to 3h and 3FCh to 3FFh, but the skilled person will understand how to apply the invention to other values of m and n. In the pseudo code, comments are between /* and */ and make the link to the general method of claim 2.
EXAMPLE 1
Grouping by One
[0072] The m-bit words are treated each separately (i.e. g=0) If the most significant bit is 1, it is replaced by a zero and a supplementary bit equal to 1 is stored. Else, a supplementary bit equal to 0 is stored. This can be expressed by the pseudo-code
TABLE-US-00002 If bit 9=1, Supplementary bit = 1 bit 9 <= 0 else Supplementary bit = 0
This implies that values between 0 and 2**(m1)-1 are produced i.e. between 0 and 511 when m=10. A value of s is then added modulo 2**m. The value of s may be comprised of a number between 4 and 508. This ensures that the range 0-511 is transported to 4-515 with s=4 and 508-1019 for s=508. In both these limits, the forbidden values 0-3 and 1020-1023 are absent. The combination of the replacement of the most significant bit together with the addition of s modulo 2**m ensures that none of the excluded values are produced. This process is repeated a number k of times. The value of k may advantageously be chosen as nine, in order that a single 10-bit word of supplementary bits may be used without excluded values. In this case, the transmission of 9 words requires 10 words, i.e. an overhead of 11%.
EXAMPLE 2
Grouping by Two
[0073] The m-bit words are treated two by two (i.e. g=1). If at least one of the two words has 11 as MSB, a supplementary bit of 1 is stored, else a supplementary bit of 0 is stored. According to the invention, the two most significant bits of these two words, i.e. four bits, must be recoded. Among the 16 possible values of these four bits, 7 have at least two MSBs as 11 and must be recoded. It is a simple matter to design a table where these 7 values are recoded into 7 different values selected among the 9 remaining values having no 11 MSBs. This may be done e.g. by recoding each of the values 3, 7, 11, 12, 13, 14, 15 (in binary 0011,0111, 1011, 1100, 1101, 1110 and 1111 respectively) to the first seven not to be recoded values 0,1, 2, 4, 5, 6, 8. This operation from the first set of seven values to the second set of seven values is bijective, and can be inverted easily in the unmapping operation at the receiver. This can be performed in a table-driven way, both at the sender and at the receiver.
[0074] Another example of performing the recoding can be performed according to the pseudo-code, where msb_0 are the two most significant bits of the first word, msb_1 are the two most significant bits of the second word, and bits of the two ten-bit words are numbered from 0 to 19, bit 19 being the MSB of the first word and bit 0 the LSB of the last word
TABLE-US-00003 If (msb_1=11 | | msb_0=11), then Supplementary bit = 1 If we have only one msb_X=11 /* w=1*/ bit 19 <= 0 /* variable length code for 1 */ bit 18 <= X (position of the msb_X = 11) bit 9..8 <= value of the other msb_X (that is != 11) If we have two msb_X=11 /* w=2 */ bit 19..18 <= 10 /* variable length code for 2 */ bit 9..8 <= 00 /* dont care bits */ else Supplementary bit = 0
[0075] The resulting values are comprised between 0 and 767. The value of s may be comprised between 4 and 252. This ensures that the range 0-767 is transported to 4-771 with s=4 and 252-1019 for s=767. In both these limits, the forbidden values 0-3 and 1020-1023 are absent. The result of this process is that neither bits 19..18 nor bits 9..8 are ever equal 11. This may be performed with a very small lookup-table converting 4 bits to 5 bits (4 recoded bits plus the supplementary bit). This case results in an overhead of 5.56%.
EXAMPLE 3
Grouping by Four
[0076] The m-bit words are treated four by four (i.e. g=2). If at least one of the four words has 111 as MSBs, a supplementary bit of 1 is stored, else a supplementary bit of 0 is stored. According to the invention, the three most significant bits of these four words, i.e. twelve bits must be recoded. Among the 4096 possible values of these four bits, 1695 have at least three MSBs as 111 and must be recoded, and 2401 (i.e. 7**4) have no three MSBs as 111 It is a again a simple matter to design a table where the 1695 values are recoded into 1695 different values selected among the 2401 remaining values having no 111 MSBs. This may be performed in various ways including the method of example 2. Also the pseudo code outlined below, and using similar notations to example 2 may be used.
TABLE-US-00004 If (msb_11=111 | | msb_10=111 | | msb_01=111 | | msb_00=111), then Supplementary bit = 1 If we have only one msb_X=111 /* w=1 */ bit 39 <= 0 /* variable length code for 1 */ bits 38..37 <= X (position of the msb_X = 111) bits 29..27, 19..17, 9..8 <= value of the other msb_X (that are != 111) If we have two msb_X=111 /* w=2 */ bits 39..38 <= 10 /* variable length code for 2 */ bits 37,29 <= X1 (position of the highest msb_X = 111) bits 28..27 <= X0 (position of the lowest msb_X = 111 (X0 != 11)) bits 19..17, 9..8 <= value of the other msb_X (that are != 111) If we have three or more msb_X=111 /* w=3 */ bits 39..37 <= 110 /* variable length code for 3 */ bits 29 <= 0 bits 28 <= 1 if msb_11 = 111 else 0 bits 27 <= 1 if msb_10 = 111 else 0 bits 19 <= 0 bits 18 <= 1 if msb_01 = 111 else 0 bits 17 <= 1 if msb_00 = 111 else 0 bits 9..7 <= value of the other msb_X (that is != 111) else Supplementary bit = 0
[0077] The resulting values are comprised between 0 and 895 (i.e. 512+256+128-1). The value of s may be comprised between 4 and 124. This ensures that the range 0-895 is transported to 4-899 with s=4 and 124-1019 for s=895. In both these limits, the forbidden values 0-3 and 1020-1023 are absent. This operation is also bijective, and can be inverted easily in the unmapping operation at the receiver. This can be performed in a table-driven way, both at the sender and at the receiver.
[0078] In a preferred embodiment of the invention, the number k of groups of four words is 9. With this choice, the nine supplementary bits may be coded in one 10-bit words, and the transmission of 4X9 words will require the sending of 37 words, i.e. an overhead of 1/36 or 2.8%. Other number of groups of four words may be selected (i.e. other values of k) in order that a number of codec output words fits easily within the size of the group of words.
EXAMPLE 4
Grouping by Eight
[0079] The m-bit words are treated eight by eight (i.e. g=3). If at least one of the eight words has 1111 as MSBs, a supplementary bit of 1 is stored, else a supplementary bit of 0 is stored. According to the invention, the four most significant bits of these eight words, i.e. thirty-two bits must be recoded. Among the 2**32 possible values of these four bits, 1 732 076 671 have at least four MSBs as 1111 and must be recoded, and 2 562 890 625 (i.e. 15**8) have no four MSBs as 1111 A table may be designed, but in this case the pseudo code outlined below, and using similar notations to example 2 is the preferred solution.
TABLE-US-00005 If (msb_111=1111 | | msb_110=1111 | | msb_101=1111 | | msb_100=1111 | | msb_011=1111 | | msb_010=1111 | | msb_001=1111 | | msb_000=1111), then Supplementary bit = 1 If we have only 1 msb_X=1111 /* w=1 */ bit 79 <= 0 /* variable length code for 1 */ bits 78..76 <= X (position of the msb_X = =1111) bits 69..66,59..56,49..46,39..36,29..27, 19..17, 9..8 <= value of the other msb_X (that are != 1111) If we have 2 msb_X=111 /* w=2 */ bits 79..78 <= 10 /* variable length code for 2 */ bits 77..76,69 <= X1: position of the highest msb_X = 1111 bits 68..66 <= X0 : position of the lowest msb_X = 1111(X0 is != 111) bits 59..56,49..46,39..36,29..27, 19..17, 9..8 <= value of the other msb_X (that are != 1111) If we have 3 msb_X=1111 /* w=3*/ bits 79..77 <= 110 /* variable length code for 3 */ bit 76 <= 0 /* dont care bit */ bit 69<= 1 if msb_111 = 1111else 0 bit 68<= 1 if msb_110 = 1111else 0 bit 67<= 1 if msb_101 = 1111else 0 bit 66<= 1 if msb_100 = 1111else 0 bit 59<= 1 if msb_011 = 1111else 0 bit 58<= 1 if msb_010 = 1111else 0 bit 57<= 1 if msb_001 = 1111else 0 bit 56<= 1 if msb_000 = 1111else 0 bits 49..46, 39..36, 29..27, 19..17, 9..8 <= value of the other msb_X (that are != 1111) If we have 4 or more msb_X=1111 /* w=4 or more */ bits 79..76 <= 1110 /* variable length code for 4 */ bit 69<= 0 bit 68<= 1 if msb_111 = 1111else 0 bit 67<= 1 if msb_110 = 1111else 0 bit 66<= 1 if msb_101 = 1111else 0 bit 59<= 0 bit 58<= 1 if msb_100 = 1111else 0 bit 57<= 1 if msb_011 = 1111else 0 bit 56<= 1 if msb_010 = 1111else 0 bit 49<= 1 if msb_001 = 1111else 0 bit 48<= 1 if msb_000 = 1111else 0 bit 47..46 <= 00 bits 39..36, 29..27, 19..17, 9..8 <= value of the other msb_X (that are != 1111) else Supplementary bit = 0
[0080] The resulting values are comprised between 0 and 959 (i.e. 512+256+128+64-1). The value of s may be comprised between 4 and 60. This ensures that the range 0-959 is transported to 4-963 with s=4 and 60-1019 for s=60. In both these limits, the forbidden values 0-3 and 1020-1023 are absent. In a preferred embodiment of the invention, the number k of groups of four words is 9. With this choice, the nine supplementary bits may be coded in one 10-bit words, and the transmission of 8X9 words will require the sending of 73 words, i.e. an overhead of 1/72 or 1.38%
[0081] In a typical embodiment, 10-bit words are grouped by four (g=2) and repeated 16 times (k=16), being 640 bits in total. This leads to the production of 16 supplementary bits. These supplementary bits are coded in the 8 LSB bits of two supplementary 10-bit words, and the value s is added (thereby avoiding forbidden values). This leads to 660-bit packets in the output stream, i.e. an overhead of 20/640, i.e. 3,125%
[0082] The device of the invention may be implemented in an FPGA (Field-Programmable Gate Array) device, using a small amount of embedded memory to bufferize the words whose MSB's need remapping by the method of the invention, a ROM (Read-Only Memory) table to implement the recoding, and the necessary data path, synchronization and control logic to perform the mapping of incoming words to outgoing words to transmit over an SDI channel. Since the buffer size is small and the control logic is easy to implement, together with the use of a light-weight and low-latency codec such as TICO, the design footprint is small enough to allow it being added in an FPGA that is already used to host the video-to-SDI interface.
[0083] The method and device of the invention provides a solution having a lower overhead than the known solutions. The invention provides a solution with a very low latency impact on the transmitted video stream. When using the solution of example 3, with k=9, 4*9 =36 words must be treated as a whole and thus a 36-cycle latency is introduced in the transmission chain, which is negligible in this context. The invention presents a low gate count when implemented in an FPGA or in an ASIC, and small code footprint when realized in a software implementation. The invention processes groups of 2**g words independently and thus any error in the transmission between the mapping and unmapping operations only impacts one group, without consequences on the other groups. The recoding according to the invention allows the recoding of the MSBs of a group of words in the same number of bits as the original bits to be recoded, with a single supplementary bit for each group of words, informing if recoding was performed or not.
[0084] The present invention has been described in terms of specific embodiments, which are illustrative of the invention and not to be construed as limiting. More generally, it will be appreciated by persons skilled in the art that the present invention is not limited by what has been particularly shown and/or described hereinabove. More specifically, the invention has been described in a system where the MSBs of the words are analysed and recoded if needed, and then an addition modulo 2**m is performed. From the present description, the skilled person will know how to perform the invention in a system where the LSBs of the word words are transmitted MSB first, and the MSB of excluded values are recoded. However, the invention applies as well in a system where the words are transmitted LSB first, and the LSB of excluded values are recoded.
[0085] Reference numerals in the claims do not limit their protective scope. Use of the verbs to comprise, to include, to be composed of, or any other variant, as well as their respective conjugations, does not exclude the presence of elements other than those stated. Use of the article a, an or the preceding an element does not exclude the presence of a plurality of such elements.
[0086] The invention may also be described as follows: a method for mapping a data stream onto an SDI channel, said data stream comprising a sequence of m-bit words, a range of values from 0 to 2**n1 and from 2**m2**n to 2**m1 being excluded values on said SDI channel. The method comprises the steps of grouping the words to be transmitted, detecting if at least one of the words of the group contains a number of MSB's equal to one, and then recoding these MSBs and adding a constant, in order that no excluded values are obtained. Supplementary bits signal groups that have been recoded. The invention provides a simple and efficient method for transforming a data stream in order that forbidden values are absent in the SDI channel.