A method and apparatus for processing a video frame is provided. The method includes dividing the video frame into pixel blocks each including a reference pixel; calculating difference values between the reference pixel and pixels neighboring the reference pixel; converting the calculated difference values into values that belong to a bit depth range; and performing entropy coding by using the converted difference values as symbols.
|
16. A method of decoding an encoded video frame, the method comprising:
reconstructing symbols used for entropy coding from encoded pixel values;
mapping the reconstructed symbols to values that belong to a bit depth range;
summing the mapped values and a pixel value of at least one reference pixel where the at least one reference pixel is predetermined;
performing a modulo operation on the summed values by using a level value of a bit depth; and
determining resultant modulo operation values as pixel values of pixels neighboring the at least one reference pixel included in the encoded video frame,
wherein the encoded pixel values are based on difference values between the at least one reference pixel in a current pixel block and pixels neighboring the at least one reference pixel where the pixels neighboring the at least one reference pixel are located in the current pixel block.
1. A method of encoding a video frame, the method comprising:
dividing the video frame into a plurality of pixel blocks each including at least one reference pixel where the at least one reference pixel is predetermined;
calculating difference values between the at least one reference pixel in a current pixel block and pixels neighboring the at least one reference pixel where the pixels neighboring the at least one reference pixel are located in the current pixel block;
converting the calculated difference values into values that belong to a bit depth range; and
performing entropy coding by using the converted difference values as symbols,
wherein the performing of entropy coding comprises:
rearranging the converted difference values in an order of occurrence probabilities of the difference values before being converted; and
mapping the rearranged difference values to symbols used for entropy coding.
20. A non-transitory computer-readable recording medium storing a computer-readable program for executing a method comprising:
reconstructing symbols used for entropy coding from encoded pixel values;
mapping the reconstructed symbols to values that belong to a bit depth range;
summing the mapped values and a pixel value of at least one reference pixel where the at least one reference pixel is predetermined;
performing a modulo operation on the summed values by using a level value of a bit depth; and
determining resultant modulo operation values as pixel values of pixels neighboring the at least one reference pixel included in the encoded video frame,
wherein the encoded pixel values are based on difference values between the at least one reference pixel in a current pixel block and pixels neighboring the at least one reference pixel where the pixels neighboring the at least one reference pixel are located in the current pixel block.
8. A non-transitory computer-readable recording medium storing a computer-readable program for executing a method comprising:
dividing the video frame into a plurality of pixel blocks each including at least one reference pixel where the at least one reference pixel is predetermined;
calculating difference values between the at least one reference pixel in a current pixel block and pixels neighboring the at least one reference pixel where the pixels neighboring the at least one reference pixel are located in the current pixel block;
converting the calculated difference values into values that belong to a bit depth range; and
performing entropy coding by using the converted difference values as symbols,
wherein the performing of entropy coding comprises:
rearranging the converted difference values in an order of occurrence probabilities of the difference values before being converted; and
mapping the rearranged difference values to symbols used for entropy coding.
9. An apparatus for encoding a video frame, the apparatus comprising:
a frame dividing unit that divides the video frame into a plurality of pixel blocks each including at least one reference pixel where the at least one reference pixel is predetermined;
a difference value calculating unit that calculates difference values between the at least one reference pixel in a current pixel block and pixels neighboring the at least one reference pixel where the pixels neighboring the at least one reference pixel are located in the current pixel block;
a difference value converting unit that converts the calculated difference values into values that belong to a bit depth range; and
an entropy coding unit that performs entropy coding by using the converted difference values as symbols,
wherein the entropy coding unit rearranges the converted difference values in an order of occurrence probabilities of the difference values before being converted, and maps the rearranged difference values to symbols used for entropy coding.
21. An apparatus for decoding an encoded video frame, the apparatus comprising:
a symbol reconstruction unit that reconstructs symbols used for entropy coding from encoded pixel values;
a mapping unit that maps the reconstructed symbols to values that belong to a bit depth range;
a summing unit that sums the mapped values with a pixel value of at least one reference pixel where the at least one reference pixel is predetermined;
a modulo operation performing unit that performs a modulo operation on the summed values by using a level value of a bit depth; and
a pixel value determining unit that determines resultant modulo operation values as pixel values of pixels neighboring the at least one reference pixel included in the encoded video frame,
wherein the encoded pixel values are based on difference values between the at least one reference pixel in a current pixel block and pixels neighboring the at least one reference pixel where the pixels neighboring the at least one reference pixel are located in the current pixel block.
2. The method of
the calculated difference values are converted with respect to the pixel blocks into values that belong to a bit depth range.
3. The method of
summing the difference values and a level value of a bit depth; and
performing a modulo operation on the summed values by using the level value of the bit depth.
4. The method of
5. The method of
wherein d denotes the converted difference values, Sd denotes the symbols mapped to d, and p denotes the bit depth.
6. The method of
mapping a first converted difference value to the symbols wherein the first converted difference value is less than a threshold value;
mapping a second converted difference value, based on the first converted difference value and a bit depth, to the symbols wherein the first converted difference value is greater than the threshold value.
7. The method of
when the first converted difference value is less than the threshold value, the symbols are calculated according to
when the first converted difference value is greater than the threshold value, the symbols are calculated according to
wherein d1 denotes the first converted difference values, d2 denotes the second converted difference values, Sd denotes the symbols mapped to d1 and d2, and p denotes the bit depth.
10. The apparatus of
the difference value converting unit converts the calculated difference values with respect to the pixel blocks into values that belong to a bit depth range.
11. The apparatus of
a summing unit that sums the difference values with a level value of a bit depth; and
a modulo operation performing unit that performs a modulo operation on the summed values by using the level value of the bit depth.
12. The apparatus of
13. The apparatus of
wherein d denotes the converted difference value, Sd denotes the symbols mapped to d, and p denotes the bit depth.
14. The apparatus of
mapping a first converted difference value to the symbols wherein the first converted difference value is less than a threshold value;
mapping a second converted difference value, based on the first converted difference value and a bit depth, to the symbols wherein the first converted difference value is greater than the threshold value.
15. The apparatus of
when the first converted difference value is less than the threshold value, the symbols are calculated according to
when the first converted difference value is greater than the threshold value, the symbols are calculated according to
wherein d1 denotes the first converted difference values, d2 denotes the second converted difference values, Sd denotes the symbols mapped to d1 and d2, and p denotes the bit depth.
17. The method of
wherein Ds denotes the mapped values for the symbols s, and p denotes the bit depth.
18. The method of
19. The method of
wherein Ds denotes the mapped values for the symbols s, and p denotes the bit depth.
wherein Ds denotes the mapped values for the symbols s, and p denotes the bit depth.
23. The apparatus of
wherein Ds denotes the mapped values for the symbols s, and p denotes the bit depth.
|
This application claims the benefit of U.S. Provisional Patent Application Nos. 61/333,016 and 61/361,043 filed on May 10 and Jul. 2, 2010, respectively, in the U.S. Patent and Trademark Office, and priority from Korean Patent Application No. 10-2010-0104751, filed on Oct. 26, 2010, in the Korean Intellectual Property Office. The disclosures of all three applications are incorporated by reference herein in their entirety.
1. Field
Methods and apparatuses consistent with the present disclosure relate to a method and apparatus for encoding and decoding a video frame.
2. Description of the Related Art
As image processing and communication technologies have developed, a size of image data transmitted and received through a network has been gradually increasing. Recently, technology for reproducing full high definition (full-HD) video having a resolution of 1920×1080 by seamless streaming has been spotlighted. A seamless reproduction of mass storage and high quality image data needs a wide bandwidth, and thus research into communication technology for using a 60 GHz band has been actively conducted. A radio wave in the 60 GHz band has directionality, and thus an available bandwidth in 60 GHz communications is influenced by obstacles present in a path of a beam. In this environment, it is necessary to efficiently compress raw image data in order to secure a quality of service. To this end, an Advanced Video coding (AVC)/H.264 codec is used. However, most codecs used for image processing require many operations, which is complicated and uses up many system resources.
A device having a limited power capacity and operation resources, such as a mobile device, requires image processing technology that is relatively easily implemented and requires a small amount of operations compared to conventional codecs, in order to process mass storage and high quality image data.
One or more exemplary embodiments provide a method and apparatus for efficiently encoding and decoding image data.
According to an aspect of an exemplary embodiment, there is provided a method of encoding a video frame, the method including dividing the video frame into a plurality of pixel blocks each including a reference pixel; calculating difference values between the reference pixel and pixels neighboring the reference pixel; converting the calculated difference values into values that belong to a bit depth range; and performing entropy coding by using the converted difference values as symbols.
The difference values between the reference pixel and the pixels neighboring the reference pixel may be calculated for each one of the pixel blocks, and the calculated difference values may be converted with respect to the pixel blocks into values that belong to a bit depth range.
The converting of the calculated difference values may include summing the difference values and a level value of a bit depth; and performing a modulo operation on the summed values by using the level value of the bit depth.
The performing of entropy coding may include mapping the converted difference values to symbols used for entropy coding using an exponential Golomb code in an order of occurrence probabilities of the difference values before being converted.
The mapping of the converted difference values may be performed according to
wherein d denotes the converted difference values, Sd denotes the symbols mapped to d, and p denotes the bit depth.
According to another aspect of an exemplary embodiment, there is provided a computer-readable recording medium storing a computer-readable program for executing the method of encoding a video frame.
According to another aspect of an exemplary embodiment, there is provided a apparatus for encoding a video frame, the apparatus including a frame dividing unit that divides the video frame into a plurality of pixel blocks each including a reference pixel; a difference value calculating unit that calculates difference values between the reference pixel and pixels neighboring the reference pixel; a difference value converting unit that converts the calculated difference values into values that belong to a bit depth range; and an entropy coding unit that performs entropy coding by using the converted difference values as symbols.
The difference value calculating unit may calculate, for each one of the pixel blocks, the difference values between the reference pixel and the pixels neighboring the reference pixel, and the difference value converting unit may convert the calculated difference values with respect to the pixel blocks into values that belong to a bit depth range.
The difference value converting unit may include a summing unit that sums the difference values with a level value of a bit depth; and a modulo operation performing unit that performs a modulo operation on the summed values by using the level value of the bit depth.
The entropy coding unit may map the converted difference values to symbols used for entropy coding using an exponential Golomb code in an order of occurrence probabilities of the difference values before being converted.
The entropy coding unit may map the converted difference values according to
wherein d denotes the converted difference value, Sd denotes the symbols mapped to d, and p denotes the bit depth.
According to another aspect of an exemplary embodiment, there is provided a method of decoding an encoded video frame, the method including reconstructing symbols used for entropy coding from encoded pixel values; mapping the reconstructed symbols to values that belong to a bit depth range; summing the mapped values and a pixel value of a reference value; performing a modulo operation on the summed values by using a level value of a bit depth; and determining resultant modulo operation values as pixel values of pixels neighboring a reference pixel in pixel blocks included in the encoded video frame.
The mapping of the reconstructed symbols may be performed according to
wherein Ds denotes the mapped values for the symbols s, and p denotes the bit depth.
The symbols may be entropy coding symbols corresponding to an exponential Golomb code.
According to another aspect of an exemplary embodiment, there is provided a computer-readable recording medium storing a computer-readable program for executing the method of decoding an encoded video frame.
According to another aspect of an exemplary embodiment, there is provided a apparatus for decoding an encoded video frame, the apparatus including a symbol reconstruction unit that reconstructs symbols used for entropy coding from encoded pixel values; a mapping unit that maps the reconstructed symbols to values that belong to a bit depth range; a summing unit that sums the mapped values with a pixel value of a reference value; a modulo operation performing unit that performs a modulo operation on the summed values by using a level value of a bit depth; and a pixel value determining unit that determines resultant modulo operation values as pixel values of pixels neighboring a reference pixel in pixel blocks included in the encoded video frame.
The mapping unit may map the reconstructed symbols according to
wherein Ds denotes the mapped values for the symbols s, and p denotes the bit depth.
The symbols may be entropy coding symbols corresponding to an exponential Golomb code.
The above and other aspects will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
The present inventive concept will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments are shown.
Referring to
The pixel block determined according to the process described with reference to
d01=y01−y00 (1)
d10=y10−y00 (2)
d11=y11−y10 (3)
More specifically, the pixels y00, y01, y010, and y11 included in one pixel block are converted into pixel values y00, d01, d10, and d11, respectively (no change in the reference pixel y00). In this regard, the pixel value d11 is calculated by using a pixel value of the pixel y10 rather than the reference pixel y00 due to a high correlation between the pixels y11 and y10 since the pixel y11 is closer to the pixel y10 than the reference pixel y00.
Although the pixel y11 is converted into the difference value between the pixels y10 and y11 in the present exemplary embodiment, the pixel y11 may alternatively be converted into a difference value between the pixels y01 and y11.
Therefore, the converted pixel values may be restored using the following processes:
y01=s01−y00 (4)
y10=s10−y00 (5)
y11=s11−y10 (6)
In this regard, since the pixel y10 is necessary for restoring the pixel y11, process (5) is performed before process (6).
Referring to
In operation 302, partition data is generated. In this regard, a partition is a set of values of pixels converted as a result of the PPDT at a specific position in pixel blocks belonging to one slice. For example, if a slice is divided into 2×2 pixel blocks as shown in
In this way, partitions include pixels at the same positions of pixel blocks in order to perform selective entropy coding according to partitions. The entropy coding is performed selectively on partitions in operation 303. Selective entropy coding according to partitions may minimize an influence of a bit error due to a channel problem. For example, if the bit error occurs at d10 of
Furthermore, an overflow may occur at a specific partition during entropy coding according to the characteristics of the video frame. Thus, in this case, entropy coding is not performed on the partition, thereby preventing the overflow from occurring.
In operation 304, the partitions are packetized. That is, a header is added to the partition data, and a packet is generated for each partition.
In operation 305, video frame data including the partition packets is transmitted to a decoder over a network.
A header of a partition packet (PAL header) may include a video frame number, a slice number, information indicating whether entropy coding is performed, information regarding a size of a pixel block, pixel position information indicating a position of a pixel included in a partition in a pixel block, and the like.
Referring to
In operation 502, difference values between a reference pixel and neighboring pixels of the reference pixel in the pixel blocks are calculated. As described with reference to
More specifically, in operations 501 and 502, a PPDT is performed on the pixels of the video frame. Values converted through the PPDT are converted into values suitable for efficient entropy coding. Such a process is performed in operations 503 and 504.
In operation 503, the difference values are converted into values in a range [0, 2p−1]. In this regard, p denotes a bit depth of the video frame. Operation 503 enables the number of symbols used for entropy coding to be reduced.
For example, when the bit depth of the video frame is 8 bits, a pixel value has a range [0, 255], and the difference values have a range [−255, +255]. Thus, 9 bits are needed to present entropy coding symbols, and 511 code words are also needed. However, the difference values are converted into values belonging to the range [0, 2p−1] in operation 503, and thus entropy coding symbols may be represented using 8 bits, thereby reducing operations necessary for entropy coding and reducing implementation complexity. A conversion method will be described in more detail with reference to
In operation 504, the converted values are mapped to respective entropy coding symbols. In this regard, the converted values are not mapped to entropy coding symbols in an order of sizes thereof but are rearranged to increase efficiency of entropy coding.
Entropy coding is an encoding method of differentiating lengths of codes indicating symbols according to probabilities of symbol occurrence. The higher the probability that the symbol occurs, the smaller the code used. However, the values converted in operation 503 are not arranged according to probabilities of occurrence of original difference values. Thus, the converted values are mapped to respective entropy coding symbols after being rearranged in an order of probabilities of occurrence of original difference values. Symbol mapping will be described in more detail with reference to
In operation 505, entropy coding is performed.
Referring to
In operation 602, a modulo operation is performed on the summed value by using the level value of the bit depth. For example, when the difference value is −200, if the level value of the bit depth is 256, in operation 601, the summed value is 56. If the modulo operation is performed on the summed value 56 by using the level value of the bit depth of 256 (i.e. 56 mod 256), the modulo operation value is 56. That is, the original difference value −200 is converted into 56.
As described above, although all difference values are converted into values in the range [0, 2p−1] by performing the process of
The graph of
The graph of
To use the exponential Golomb code shown in
Therefore, the converted values are mapped to symbols so that the symbols have a probability distribution as shown in
This process is summarized by the following equation:
wherein, Sd denotes a symbol to be mapped to a converted value d, and p denotes a bit depth.
In the present exemplary embodiment, a bit depth is 8, and accordingly the difference values have a range [−255, 255]. For example, the original difference value −255 is converted into 1 by performing the process of
Referring to
The frame dividing unit 1001 receives video frame data and divides the received video frame data into a plurality of pixel blocks.
The difference value calculation unit 1002 calculates, for each of the pixel blocks, difference values between pixels neighboring a reference pixel and the reference pixel.
The difference value conversion unit 1010 converts the difference values into values that belong to a bit depth range [0, 2p−1]. For example, if a bit depth is 8, the difference values are converted to have the bit depth range [0, 255]. Referring to
The summing unit 1011 sums the difference values obtained by the difference value calculation unit 1002 with level values of the bit depth. The modulo operation performing unit 1012 performs a modulo operation on resultant values obtained by the summing unit 1011 by using the level values of the bit depth. More specifically, original difference values, i.e. difference values input into the difference value calculation unit 1002, are converted into the resultant values obtained by the modulo operation performing unit 1012.
The entropy coding unit 1003 rearranges the resultant values obtained by the modulo operation performing unit 1012 in an order of high occurrence probabilities with respect to the original difference values, i.e., values that are not converted by the difference value conversion unit 1010, and maps the rearranged resultant values to entropy coding symbols. In this regard, the entropy coding symbols may use symbols corresponding to exponential Golomb codes. Video frame data encoded by the entropy coding unit 1003 is packetized and transmitted to a decoder over a network.
Referring to
Operation 1120 maps the resultant values to entropy coding symbols MapDiff. More specifically, if a resultant value d is greater than or equal to 2p-1 (p is the bit depth), the resultant value d is mapped to 2(2p−d)−1. If the resultant value d is greater than 0 and smaller than or equal to 2p-1−1, the resultant value d is mapped to 2d. Meanwhile, an entropy coding symbol 0 is mapped to 0.
Referring to
In operation 1202, the reconstructed symbols are mapped to values that belong to a bit depth range [0, 2p−1], and an inverse process of the mapping process described with reference to
wherein, Ds denotes a value to be mapped to a symbol S, and p denotes a bit depth.
In operation 1203, a pixel value of the reference pixel is summed with the mapped values. As described with reference to
In operation 1204, the modulo operation is performed on the resultant summed values by using the level value of the bit depth.
In operation 1205, the modulo operation resultant values are determined as pixel values to be decoded, i.e. pixel values of pixels neighboring the reference pixel in pixel blocks of the video frame.
Referring to
Process 1320 reconstructs pixel values of original pixels by using the mapped values. More specifically, a modulo operation is performed on resultant values obtained by summing a pixel value PrevPix of a reference pixel with the mapped values by using a level value (1<<BitDepth) of the bit depth. The resultant modulo operation values are pixel values before encoding.
Referring to
The symbol reconstruction unit 1401 extracts symbols used for entropy coding from encoded pixel values.
The mapping unit 1402 maps the reconstructed symbols to values that belong to a bit depth range.
The summing unit 1403 sums the mapped values with a pixel value of a reference pixel and outputs the summed values to the modulo operation performing unit 1404.
The modulo operation performing unit 1404 performs a modulo operation on the values output by the summing unit 1403 by using a level value of a bit depth.
The pixel value determining unit 1405 determines the values output by the modulo operation performing unit 1404 as original pixel values before being encoded. A display apparatus determines pixel colors by using the reconstructed pixel values and displays the determined pixel colors.
For example, in a video frame having a bit depth 8, the original pixel value is 200, and the pixel value of the reference value is 201. A reference value −1 between the original pixel value 200 and the pixel value of the reference value 201 is converted into 255 by the summing unit 1011 of the apparatus 1000 for decoding the video frame. The resultant converted value 255 is mapped to an entropy coding symbol 1 by performing the modulo operation thereon (Sd=2(2p−d)−1). That is, if entropy coding is performed by using an exponential Golomb code, the original pixel value 200 is encoded as 010 (see
The symbol reconstruction unit 1401 reconstructs an entropy coding symbol 1 from a bit stream and maps the reconstructed entropy coding symbol 1 to 255 (Ds=2p−(s+1)/2). The summing unit 1403 sums the mapped value 255 with the pixel value 201 of the reference value and outputs the summed value 456. The modulo operation performing unit 1404 performs the modulo operation on the summed value 456 by using the level value 256 of the bit depth, and outputs a resultant modulo operation value 200. The pixel value determining unit 1405 determines the resultant modulo operation value 200 as a pixel value of a pixel to be decoded.
The exemplary embodiments can be written as computer programs and can be implemented in general-use digital computers that execute the programs using a computer readable recording medium. Examples of the computer readable recording medium include magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.) and optical recording media (e.g., CD-ROMs, or DVDs). Additionally, the frame dividing unit 1001, the difference value calculation unit 1002, the entropy coding unit 1003, the difference value conversion unit 1010, the summing unit 1011, and the modulo operation performing unit 1012 of
While this inventive concept has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope as defined by the appended claims. The exemplary embodiments should be considered in a descriptive sense only and not for purposes of limitation. Therefore, the scope of the inventive concept is defined not by the detailed description but by the appended claims, and all differences within the scope will be construed as being included in the present inventive concept.
Shao, Huai-Rong, Park, Sung-Bum, Yoon, Jae-won, Jun, Hae-young, Kang, Shin-wook, Choi, Dai-woong
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
6072909, | Dec 13 1995 | Fuji Xerox Co., Ltd. | Image coding devise and image decoding devise using with image disassembly |
6173078, | Oct 30 1996 | Godo Kaisha IP Bridge 1 | Image encoder, image encoding method, image decoder, image decoding method, and data recording medium |
6654419, | Apr 28 2000 | Oracle America, Inc | Block-based, adaptive, lossless video coder |
20020006229, | |||
20070065023, | |||
20070195888, | |||
20070223579, | |||
20100092097, | |||
EP2059048, | |||
EP2129135, | |||
EP838955, | |||
WO9901979, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
May 09 2011 | Samsung Electronics Co., Ltd. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Date | Maintenance Schedule |
Jul 07 2018 | 4 years fee payment window open |
Jan 07 2019 | 6 months grace period start (w surcharge) |
Jul 07 2019 | patent expiry (for year 4) |
Jul 07 2021 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jul 07 2022 | 8 years fee payment window open |
Jan 07 2023 | 6 months grace period start (w surcharge) |
Jul 07 2023 | patent expiry (for year 8) |
Jul 07 2025 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jul 07 2026 | 12 years fee payment window open |
Jan 07 2027 | 6 months grace period start (w surcharge) |
Jul 07 2027 | patent expiry (for year 12) |
Jul 07 2029 | 2 years to revive unintentionally abandoned end. (for year 12) |