Method and apparatus for generating frames for error correction
09794027 · 2017-10-17
Assignee
Inventors
Cpc classification
H03M7/30
ELECTRICITY
H04L1/0083
ELECTRICITY
International classification
Abstract
A method and apparatus for generating frames to apply error correction to data including a plurality of consecutive data groups are provided. Upon receiving input of an n-th data group consisting of a plurality of priority groups with different priority levels, the number of first code rate frames, which is the number of frames in the n-th data group for which a first code rate is used, is calculated based on the number of first code rate bits calculated based on the ratio of the length of data in an (n−1)-th data group for which the first code rate is used. The number of second code rate frames, which is the number of frames in the n-th data group for which the second code rate is used, is calculated based on the number of second code rate bits calculated based on the number of first code rate bits. Frames for error correction are generated based on the number of first code rate frames and the number of second code rate frames.
Claims
1. A method for generating frames to apply error correction to data including a plurality of consecutive data groups, the method comprising: processing computer executable program code embodied in a recording medium by at least one processor, the computer executable program code comprising: a program code that calculates, upon receiving input of an n-th data group consisting of a plurality of priority groups with different priority levels, a number of first code rate bits, which is a number of data bits in the n-th data group for which a first code rate is to be used, based on a ratio of a length of data in an (n−1)-th data group for which the first code rate is used; a program code that calculates a number of first code rate frames, which is the number of frames in the n-th data group for which the first code rate is used, based on the number of first code rate bits; a program code that calculates a number of second code rate bits, which is a number of data bits in the n-th data group for which a second code rate is used, based on the number of first code rate bits; a program code that calculates a number of second code rate frames, which is a number of frames in the n-th data group for which the second code rate is used, based on the number of second code rate bits; and a program code that generates frames for which the first code rate is used based on the number of first code rate frames and generating frames for which the second code rate is used based on the number of second code rate frames, and wherein the program code that calculates of the number of first code rate bits comprises: a program code that calculates a ratio of a first code rate length, which is the ratio of the length of data in the (n−1)-th data group for which the first code rate is used; a program code that calculates the ratio of the first code rate length with a predetermined ratio; a program code that corrects the ratio of the first code rate length if the ratio of first code rate length is not consistent with the predetermined ratio; and a program code that calculates the number of first code rate bits based on the corrected ratio of the first code rate length.
2. The method of claim 1, wherein, in the program code that corrects the ratio of the first code rate length, the corrected ratio of first code rate length is calculated by subtracting the ratio of the first code rate length from the predetermined ratio and then adding a new predetermined ratio to the difference.
3. The method of claim 1, wherein, in the program code that calculates of the number of first code rate bits, the number of first code rate bits in the n-th data group is calculated by adding the length of the n-th data group and a number of non-encoded data bits in the (n−1)-th data group and then multiplying the sum by the corrected ratio of first code rate length.
4. The method of claim 1, wherein, in the program code that calculates of the number of first code rate frames, the number of first code rate frames is calculated by adding the number of first code rate bits in the n-th data group and a number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
5. The method of claim 1, wherein, in the program code that calculates of the number of second code rate bits, the number of second code rate bits is calculated by removing the first code rate bits from the n-th data group.
6. The method of claim 1, wherein, in the program code that calculates of the number of second code rate frames, the number of second code rate frames is calculated by adding the number of second code rate bits in the n-th data group and a number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
7. The method of claim 1, wherein a data group is split into a first priority group to which a first priority level is given and a second priority group to which a second priority level is given, and the first priority level is higher than the second priority level.
8. The method of claim 7, wherein, if the length of the first priority group is referred to as “first group length” and the length of the second priority group is referred to as “second group length”, the number of first code rate bits is greater than the first group length, and the number of second code rate bits is less than the second group length.
9. An apparatus for generating frames to apply error correction to data including a plurality of consecutive data groups, the apparatus comprising: at least one processor that processes computer executable program code embodied in a recording medium, the computer executable program code comprising: a number-of-first-code-rate-bits calculating program code that, upon receiving input of an n-th data group consisting of a plurality of priority groups with different priority levels, calculates a number of first code rate bits, which is a number of data bits in an n-th data group for which a first code rate is to be used, based on a ratio of a length of data in an (n−1)-th data group for which the first code rate is used; a number-of-first-code-rate-frames calculating program code that calculates a number of first code rate frames, which is a number of frames in the n-th data group for which the first code rate is used, based on the number of first code rate bits; a number-of-second-code-rate-bits calculating program code that calculates a number of second code rate bits, which is a number of data bits in the n-th data group for which a second code rate is used, based on the number of first code rate bits; a number-of-second-code-rate-frames calculating program code that calculates a number of second code rate frames, which is a number of frames in the n-th data group for which the second code rate is used, based on the number of second code rate bits; and a frame generating program code that generates frames for which the first code rate is used based on the number of first code rate frames and generates frames for which the second code rate is used based on the number of second code rate frames, and a length ratio correcting program code that corrects the ratio of a first code rate length if ratio of the first code rate length, which is a ratio of the length of data in the (n−1)-th data group for which the first code rate is used, is not consistent with a predetermined ratio.
10. The apparatus of claim 9, wherein the length ratio correcting program code calculates the corrected ratio of the first code rate length by subtracting the ratio of first code rate length from the predetermined ratio and then adding a new predetermined ratio to the difference.
11. The apparatus of claim 9, wherein the number-of-first-code-rate-bits calculating program code calculates the number of first code rate bits in the n-th data group by adding the length of the n-th data group and the number of non-encoded data bits in the (n−1)-th data group and then multiplying the sum by the corrected ratio of first code rate length.
12. The apparatus of claim 9, wherein the number-of-first-code-rate-frames calculating program code calculates the number of first code rate frames by adding the number of first code rate bits in the n-th data group and the number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
13. The apparatus of claim 9, wherein the number-of-second-code-rate-bits calculating program code calculates the number of second code rate bits by removing the first code rate bits from the n-th data group.
14. The apparatus of claim 9, wherein the number-of-second-code-rate-frames calculating program code calculates the number of second code rate frames by adding the number of second code rate bits in the n-th data group and the number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION OF THE EMBODIMENTS
(9) In the following detailed description, only certain exemplary embodiments of the present invention have been shown and described, simply by way of illustration. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature and not restrictive. Like reference numerals designate like elements throughout the specification.
(10) Throughout the specification, unless explicitly described to the contrary, the word “comprise” and variations such as “comprises” or “comprising” will be understood to imply the inclusion of stated elements but not the exclusion of any other elements.
(11) Hereinafter, a method and apparatus for generating frames for error correction to perform unequal error protection according to an exemplary embodiment of the present invention will be described.
(12) In wired or wireless transmission of multimedia data, multimedia data is compressed due to limited transmission capacity. Compressed video data has a different priority level within the same GOP (group of pictures) or picture, depending on how much an error can affect reception performance. Compressed video data may have various levels of priority for different layers (i.e., GOP layer, picture layer, slice layer, etc.).
(13) For example, an I picture, which is an intra picture, a P picture, which is a predicted picture, and a B picture, which is a bidirectional picture, may exist within a GOP layer, and priority is given by I>P>B. In picture decoding, the I picture may be decoded by itself, the P picture is decoded with reference to the I picture, and the B picture is decoded with reference to the I picture and the P picture. Accordingly, a bit error in the I picture is propagated as far as the B and P pictures. Hence, the I picture has higher priority than the B picture and the P picture, and accordingly the P picture has higher priority than the B picture.
(14) The priority of compressed video data may be split into two or more levels and grouped together according to a given criterion. Within each picture, the picture header has higher priority than picture data such as a DCT (discrete cosine transform) coefficient or a motion vector, and the motion vector has higher priority than the DCT coefficient.
(15) Within a GOP of a given length, important information of highest priority, such as picture header, may be grouped together and arranged consecutively, regardless of the order of transmission of pictures, and data of second highest priority may be arranged as a second group.
(16) In FEC for error protection of compressed multimedia data, unequal error protection may be applied using different code rates according to priority, and equal error protection (EEP) may be applied using the same code rate for all data regardless of priority.
(17)
(18) Compressed multimedia data, in general, includes consecutive data groups of a specific length. For compressed video such as MPEG-1/2/4 or H.26x, one I picture and a plurality of B and P pictures constitute a single data group, i.e., GOP (group of pictures), and GOPs of a certain length are arranged consecutively, as shown in
(19)
(20) Priority levels may be assigned to data within a data group of compressed video data, as shown in
(21) Accordingly, in transmission of a stream with such a data structure as shown in
(22) In the MPEG Audio layer II standard, an audio stream has a data structure including consecutive audio frames of constant length.
(23) For DAB (digital audio broadcasting) audio frames, data groups, i.e., frames, are of constant length within the same audio stream, and priority groups within a frame are of equal length in all frames.
(24)
(25) In DAB, frame length l is constant in all frames, and the lengths l.sub.p1, l.sub.p2, l.sub.p3, l.sub.p4 of priority groups within a frame are constant in all frames. Accordingly, the payload rate is kept constant, even with varying FEC code rates R.sub.c1, R.sub.c2, R.sub.c3, R.sub.c4 for different priority groups within a frame. The lengths of the priority groups are in the order l.sub.p1<l.sub.p4<l.sub.p2<l.sub.p3, and the code rates for the priority groups are in the order R.sub.c1<R.sub.c4<R.sub.c2<R.sub.c3.
(26) In the exemplary embodiment of the present invention, when unequal error protection is applied to compressed multimedia data, the number of FEC frames can be adjusted in accordance with the code rate, even if the length of consecutive data groups and the length of priority groups in each data group are not constant, thereby maintaining a constant payload rate.
(27)
(28) In the exemplary embodiment of the present invention, a description will be given of an example where compressed multimedia data includes a plurality of consecutive data groups, and each data group is split into two priority groups.
(29) As shown in
(30) When applying FEC to data groups each having priority groups, two different code rates are used. The structure of an FEC frame is as shown in
(31)
(32) The numbers of data bits l.sub.nR.sub.
(33) To this end, the number of data bits l.sub.nR.sub.
l.sub.nR.sub.
(34) Herein, K.sub.FEC1 indicates the number of bit strings of a frame for which the code rate R.sub.c1 is used, and
(35) M.sub.n indicates the number of frames for which the code rate R.sub.c1, which is an integer, is used.
l.sub.nR.sub.
(36) Herein, K.sub.FEC2 indicates the number of bit strings of a frame for which the code rate R.sub.c2 is used, and
(37) N.sub.n indicates the number of frames for which the code rate R.sub.c2, which is an integer, is used.
(38) All data within a data group may be split into K.sub.FEC1 or K.sub.FEC2 bit strings to create an FEC frame of a predetermined length, as shown in
(39) In the exemplary embodiment of the present invention, the number of FEC frames in the n-th data group for which the code rate R.sub.c1 is used and the number of FEC frames in the n-th data group for which the code rate R.sub.c2 is used are calculated as follows.
(40)
(41) In Equation 3, R.sub.l is a predetermined value, which indicates an ideal ratio of the length of data in each data group of a stream for which the code rate R.sub.c1 is to be used. For better comprehension and ease of description, R.sub.l is referred to as a predetermined ratio.
(42) Within a single stream, the same R.sub.l value is used for each data group. In Equation 3 and Equation 4, M.sub.n and N.sub.n indicate the numbers of FEC frames in the n-th data group for which the code rate R.sub.c1 and the code rate R.sub.c2 are respectively used.
(43) The numbers of FEC frames may be calculated by the following process.
(44) When an n-th data group is input, the ratio
(45)
of the length of data in an (n−1)-th data group for which the code rate R.sub.c1 is used may be calculated by Equation 3, based on the numbers of FEC frames M.sub.n−1 and N.sub.n−1 used in the (n−1)-th data group.
(46) If the calculated ratio
(47)
of the length of data is not consistent with a predetermined ratio R.sub.l, the ratio of the length of data for which the code rate R.sub.c1 is to be used is re-calculated based on the predetermined ratio R.sub.l, as in
(48)
in order to correct an error in the (n−1)-th data group. The ratio of the length of data calculated by
(49)
is referred to as the corrected ratio of the length of data for ease of explanation.
(50) The corrected ratio of the length of data for which the code rate R.sub.c1 is to be used is calculated, and then the calculated value is multiplied by the sum of the length l.sub.n of the n-th data group and the number r.sub.FEC2,n−1 of non-encoded data bits in the (n−1)-th data group, thereby calculating the number of data bits in the n-th data group for which the code rate R.sub.c1 is to be used. An integer value M.sub.n satisfying the right side of the first equation of Equation 3, i.e., the number of FEC frames for which the code rate R.sub.c1 is to be used, may be calculated based on the number of data bits in the n-th data group for which the code rate R.sub.c1 is used.
(51) Meanwhile, the number N.sub.n of FEC frames for which the code rate R.sub.c2 is used may be calculated based on Equation 4.
(52) First of all, the number of data bits for which the code rate R.sub.c2 is to be used equals the number of bits left after the data bits for which the code rate R.sub.c2 is to be used are removed from the n-th data group, which is given by (l.sub.n+r.sub.FEC2,n−1)−K.sub.FEC1.Math.M.sub.n.
(53) In the same manner as Equation 3, an integer value N.sub.n satisfying the right side of the first equation of Equation 4, i.e., the number of FEC frames for which the code rate R.sub.c2 is to be used, may be calculated based on the number of data bits for which the code rate R.sub.c2 is used.
(54) As described above, when the numbers M.sub.n and N.sub.n of FEC frames for which the code rates R.sub.c1 and R.sub.c2 are respectively used are calculated based on Equations 3 and 4, M.sub.n FEC frames for which the code rate R.sub.c1 is used from the starting bit and N.sub.n FEC frames for which the code rate R.sub.c2 is used from the starting bit are generated. Using the aforementioned method, the average payload rate may be maintained constant while applying unequal error protection.
(55) Next, a method for generating frames for error correction to perform unequal error protection according to an exemplary embodiment of the present invention will be described based upon the foregoing description.
(56)
(57) Compressed multimedia data includes a plurality of consecutive data groups. Provided that each data group is split into two priority groups, each data group may vary in length and each priority group in a data group may also vary in length. A data group may be split into a first priority group to which a first priority level is given and a second priority group to which a second priority level is given. Here, the ordinal numbers—first and second—are given for identification.
(58) For convenience of explanation, the first priority level is higher than the second priority level, and the length of the first priority group is referred to as “first group length” and the length of the second priority group is referred to as “second group length”.
(59) When applying FEC for error correction to data groups with these characteristics, different code rates are used. Here, it is assumed that a first code rate and a second code rate are used. The number of data bits for which the first code rate is used is referred to as “the number of first code rate bits” and the number of data bits for which the second code rate is used is referred to as “the number of second code rate bits”. Here, the number of first code rate bits is greater than the first group length, and the number of second code rate bits is less than the second group length.
(60) When applying FEC for error correction to each data group of compressed multimedia data, frames to which FEC is applied are generated as follows.
(61) First of all, as shown in
(62) The frame generating apparatus 1 splits all input data in an n-th data group into a predetermined number of bit strings to create FEC frames of a predetermined length. In order to maintain a constant payload rate, the number of FEC frames for which the first code rate R.sub.c1 is used and the number of FEC frames for which the second code rate R.sub.c2 is used are calculated. For ease of explanation, the number of FEC frames for which the first code rate R.sub.c1 is used is referred to as “the number of first code rate frames, and the number of FEC frames for which the second code rate R.sub.c2 is used is referred to as “the number of second code rate frames”.
(63) To this end, the frame generating apparatus 1 calculates the ratio of the length of data in the (n−1)-th data group for which the first code rate is used, based on the number of first code rate frames and the number of second code rate frames, which are used for the (n−1)-th data group (S110). For convenience of explanation, the ratio of the length of data for which the first code rate is used is referred to as “the ratio of first code rate length”.
(64) The calculated ratio of first code rate length in the (n−1)-th data group is compared with a predetermined ratio R.sub.c1 (S120).
(65) If the ratio of first code rate length in the (n−1)-th data group is not consistent with the predetermined ratio, it is determined that an error has occurred. For error correction, the ratio of first code rate length in the (n−1)-th data group is corrected (S130). Specifically, the ratio of first code rate length in the (n−1)-th data group is corrected based on the predetermined ratio. That is, the corrected ratio of the first code rate length is calculated by subtracting the ratio of the first code rate length from the predetermined ratio and then adding a new predetermined ratio to the difference.
(66) In this way, the number of first code rate bits, which is the number of data bits in the n-th data group for which the first code rate is to be used, is calculated based on the corrected ratio of the first code rate length in the (n−1)-th data group (S140). The number of first code rate bits in the n-th data group is calculated by adding the length of the n-th data group and the number of non-encoded data bits in the (n−1)-th data group and then multiplying the sum by the ratio of the first code rate length in the (n−1)-th data group. If the ratio of the first code rate length in the (n−1)-th data group is consistent with the predetermined ratio in S120, the number of first code rate bits may be calculated, without correction, based on the ratio of the first code rate length in the (n−1)-th data group calculated in S110.
(67) Thereafter, the number of first code rate frames is calculated based on the number of first code rate bits in the n-th data group (S150). Based upon Equation 3, the number of FEC frames for which the first code rate R.sub.c1 is used is calculated by adding the number of first code rate bits in the n-th data group and the number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings (S).
(68) Next, the frame generating apparatus 1 calculates the number of second code rate bits, which is the number of data bits for which the second code rate R.sub.c2 is used, in order to calculate the number of second code rate frames, which is the number of FEC frames in the n-th data group for which the second code rate R.sub.c2 is used (S160). The number of second code rates is the number of bits left after the first code rate bits are removed from the n-th data group. The number of second rate bits may be calculated by subtracting a second value, obtained by multiplying the number of first code rate bits by a predetermined number of bit strings, from a first value, obtained by adding the length of the n-th data group and the number of non-encoded data bits in the (n−1)-th data group as in (l.sub.n+r.sub.FEC2,n−1)−K.sub.FEC1.Math.M.sub.n.
(69) Then, the number of second code rate frames is calculated based on the number of second code rate bits in the n-th data group (S170). Based upon Equation 4, the number of FEC frames for which the second code rate R.sub.c2 is used is calculated by adding the number of second code rate bits in the n-th data group and the number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
(70) Based on the number of first code rate frames and the number of second code rate frames thus calculated, FEC frames of a predetermined length for which the first code rate is used and FEC frames of a predetermined length for which the second code rate is used are generated by dividing all input data in the n-th data group by a predetermined number of bit strings (S180).
(71)
(72) As shown in the attached
(73) The ratio-of-first-code-rate-length calculator 10 calculates the ratio of the first code rate length, which is the ratio of the length of data in the (n−1)-th data group for which the first code rate is used for all input data in the n-th data group based on the number of first code rate frames, and the number of second code rate frames, which are used for the (n−1)-th data group.
(74) The length ratio corrector 20 corrects the ratio of first code rate length if the ratio of first code rate length in the (n−1)-th data group is not consistent with a predetermined ratio. Specifically, the corrected ratio of the first code rate length may be calculated by subtracting the ratio of the first code rate length from the predetermined ratio and then adding a new predetermined ratio to the difference.
(75) The number-of-first-code-rate-bits calculator 30 calculates the number of first code rate bits, which is the number of data bits in the n-th data group for which the first code rate is to be used, based on the corrected ratio of the first code rate length in (n−1)-th data group.
(76) The number-of-first-code-rate-frames calculator 40 calculates the number of first code rate frames based on the number of first code rate bits in the n-th data group. Specifically, the number of first code rate frames is calculated by adding the number of first code rate bits in the n-th data group and the number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
(77) The number-of-second-code-rate-bits calculator 50 calculates the number of second code rate bits, which is the number of data bits in the n-th data group for which the second code rate is to be used. The number of second code rate bits is the number of bits left after the first code rate bits are removed from the n-th data group.
(78) The number-of-second-code-rate-frames calculator 60 calculates the number of second code rate frames based on the number of second code rate bits in the n-th data group. Specifically, the number of second code rate frames is calculated by adding the number of second code rate bits in the n-th data group and the number of non-encoded data bits in the n-th data group and then dividing the sum by a predetermined number of bit strings.
(79) The frame generator 70 generates FEC frames of a predetermined length for which the first code rate is used, and generates FEC frames of a predetermined length for which the second code rate is used based on the number of first code rate frames and the number of second code rate frames, by dividing all input data in the n-th data group by a predetermined number of bit strings.
(80) According to an embodiment of the present invention, when unequal error protection is applied to compressed multimedia data at varying FEC code rates, the number of FEC frames can be adjusted in accordance with the code rate, even if the length of consecutive data groups and the length of priority groups in each data group are not constant, thereby maintaining a constant payload rate.
(81) The exemplary embodiments of the present invention are implemented not only through the apparatus and method, but may also be implemented through a program that realizes functions corresponding to constituent members of the exemplary embodiments of the present invention or a recording medium in which the program is recorded.
(82) While this invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.