Further improved methods and apparatus for image compression
The FAST Block Coder with Optimized Truncation (FBCOT) addresses the computational complexity of JPEG2000 by dividing sample values into three bitstreams, enabling efficient compression and decoding on mobile devices with reduced power consumption.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2019-04-04
- Publication Date
- 2026-03-24
AI Technical Summary
JPEG2000 image compression is computationally complex, limiting its effectiveness for hardware implementations, especially in power-conscious applications and video applications.
A block coding algorithm, known as FAST Block Coder with Optimized Truncation (FBCOT), which divides sample values into three bitstreams for encoding and decoding, reducing computational complexity while maintaining compatibility with JPEG2000 standards.
The FBCOT algorithm significantly reduces computational requirements, allowing for real-time compression and decoding of high-resolution video on mobile devices and efficient rendering with reduced power consumption, while retaining key JPEG2000 features like quality scalability.
Smart Images

Figure 0007834306000106 
Figure 0007834306000107 
Figure 0007834306000108
Abstract
Description
[Technical Field]
[0001] The present invention relates to an improved method and apparatus for image compression, and more particularly, but not limited to, an improved block coding apparatus and method for image compression. [Background technology]
[0002] Image compression systems are known. JPEG and JPEG2000 are common standards for image compression.
[0003] JPEG2000 offers a rich set of features that have applications in many diverse fields. Some of the most important features are as follows: Compression efficiency Quality scalability Resolution scalability Accessibility of areas of interest Parallel processing Optimized rate control that does not require iterative encoding Visually relevant optimization goals can be targeted. Error tolerance Compressed domain (i.e., very low memory) inversion and flip operations Information can be rearranged at the level of code blocks, regions, or J2K packets.
[0004] Most of these features are derived from the use of the EBCOT algorithm (Embedded Block Coding with Optimized Truncation), while the use of the Hierarchical Discrete Wavelet Transform (DMT) also plays a significant role.
[0005] In addition to these core features, the JPEG2000 standard suite provides good support for the following applications: Efficient and responsive remote interactive viewing of video (including video and animation) via JPIP Efficient on-demand rendering of any region from a vast video source. High dynamic range compression by using nonlinear tone curves and / or custom floating-point mapping. Rich metadata annotation Efficient compression of hyperspectral and volumetric content
[0006] One significant drawback of the JPEG2000 standard is its computational complexity. While JPEG2000 offers numerous modes that can be used to target efficient hardware solutions, the extent to which this is a major limitation for hardware implementation is not immediately apparent. Furthermore, software implementations are efficient enough to render images of almost any viewable size nearly instantaneously on modern platforms, including mobile devices. However, for video applications and especially power-conscious applications, the complexity of compression and rendering can become a problem.
[0007] Prior international patent application PCT / AU2017 / 050484 discloses an improved method and apparatus for image compression incorporating a fast block coding algorithm. The disclosure of this prior application is incorporated herein by reference. [Prior art documents] [Patent Documents]
[0008] [Patent Document 1] International patent application PCT / AU2017 / 050484 [Overview of the project] [Means for solving the problem]
[0009] According to a first aspect, the present invention relates to a method for encoding a block of subband sample values derived from a still image, video frame, or related media, comprising three bitstreams and dividing the samples from a block into predetermined groups, a. The first bitstream (MEL bitstream) encodes the overall significance of the group (AZC group) where all causally related neighboring groups are non-significant, with samples having a non-zero magnitude identified as significant and samples having a zero magnitude identified as non-significant. b. Encode the significance of individual samples within each group that the second bitstream (VLC bitstream) is either a significant AZC group or not an AZC group. c. The second bitstream (VLC bitstream) described above, when added to a set of exponent predictors, also encodes the unsigned residual values of each significant group, giving an upper limit to the size exponent of each significant sample within the group. d. A third bit stream (MagSgn bit stream) provides the sign bits and any additional magnitude bits necessary to represent significant sample values, given the corresponding exponential boundary. e. The above exponential predictor is calculated using both the exponential boundary associated with the preceding sample in the block and the additional size bits, except when the preceding sample in the block lies outside the block boundary. Provide a method.
[0010] According to a second aspect, the present invention relates to a method for decoding a block of subband sample values that generates a still image, a video frame, or related media, wherein such samples are organized into a predetermined group and represented using three bitstreams. a. The first bitstream (MEL bitstream) is decoded to find the overall significance of the group (AZC group) where all causally related adjacent groups are non-significant, samples with a non-zero magnitude are identified as significant, and samples with a zero magnitude are identified as non-significant. b. The second bitstream (VLC bitstream) is decoded to find the significance of individual samples within each group, either being a significant AZC group or not being an AZC group. c. The decoding of the second bitstream (VLC bitstream) described above is also used to find the unsigned residual values of each significant group, which, when added to the set of exponential predictors, give an upper limit to the size exponent of each significant sample in the group. d. The third bit stream (MagSgn bit stream) is unpacked to discover the sign bit and any additional magnitude bits used to estimate the value of each significant sample, given the corresponding exponential boundary. e. The above exponential predictor is calculated using both the exponential boundary associated with the previously decoded sample in the block and the additional size bits, except when the preceding sample in the block lies outside the block boundary. Provide a method.
[0011] According to a third aspect, the present invention provides an apparatus for encoding a block of subband sample values, comprising a processing unit configured to carry out the method of the first aspect of the present invention.
[0012] In one embodiment, the apparatus may comprise a processor, memory, and an operating system that implements a software process for carrying out the method of the first embodiment of the present invention. In another embodiment, the apparatus may include hardware for carrying out the method, or a mixture of hardware and software for carrying out the method.
[0013] According to a fourth aspect, the present invention provides an apparatus for decoding a block of a subband sample, comprising a processing unit configured to carry out the method of a second aspect of the present invention.
[0014] In one embodiment, the apparatus may comprise a processor, memory, and an operating system that implements a software process for carrying out the method of a second embodiment of the present invention. In another embodiment, the apparatus may include hardware for carrying out the method, or a mixture of hardware and software for carrying out the method.
[0015] According to a fifth aspect, the present invention provides a computer program that includes instructions for controlling a computer to carry out a method according to a first aspect of the present invention.
[0016] According to a sixth aspect, the present invention provides a non-volatile computer-readable medium that provides a computer program according to a fifth aspect of the present invention.
[0017] According to a seventh aspect, the present invention provides a data signal including a computer program according to a fifth aspect of the present invention.
[0018] According to an eighth aspect, the present invention provides a computer program that includes instructions for controlling a computer to carry out a method according to a second aspect of the present invention.
[0019] According to the ninth aspect, the present invention provides a non-volatile computer-readable medium that provides a computer program according to the eighth aspect of the present invention.
[0020] According to a tenth aspect, the present invention provides a data signal including a computer program according to an eighth aspect of the present invention.
[0021] The features and advantages of the present invention will become apparent from the following detailed description of embodiments of the invention, which are given only as examples and refer to the attached drawings. [Brief explanation of the drawing]
[0022] [Figure 1] This figure shows an example of a FAST coding path, which illustrates the codeword segments generated with and without the TERMINATION mode flag, according to one embodiment, and an example of a coding path that can be generated by the encoder and ultimately emitted into the code stream. [Figure 2] This figure shows an overview of the FAST Cleanup path and encoding process according to one embodiment. [Figure 3] This figure shows an overview of the FAST Cleanup pass decoding process according to one embodiment. [Figure 4] This figure shows the codeword structure of the Cleanup pass of a FAST block coder having three byte streams, according to one embodiment. [Figure 5] This figure shows a scan sequence where lines are interleaved in 2x2 square groups, representing code blocks with H = 3 lines and an odd width W. [Figure 6] This figure shows significance neighborhood information used to form the encoded context of a 2x2 group found in a code block, specifically in the non-first pair of lines and the first pair of lines, according to one embodiment. [Figure 7] This figure shows the formation of an exponential predictor within a group row other than the first one, according to one embodiment. [Figure 8] This diagram shows the interleaving of VLC bits from a pair of groups. The bit count range is applicable to group lines that are not the first in the code block. The arrows at the bottom of the diagram reveal the decoding dependencies. [Figure 9] This figure shows the possible coding path contributions recorded in the JPEG2000 packet header, indicating the use of the FAST block coding algorithm. [Modes for carrying out the invention]
[0023] One embodiment of the present invention relates to a temporary replacement for the original JPEG2000 block coding algorithm described in Annexes C and D of IS15444-1 (JPEG2000 Part 1). Throughout this specification, the terms “J2K-1 block coder” and “J2K-1 algorithm” shall be used to identify this block coding algorithm, which is also central to other JPEG2000 standards, including IS15444-2 (JPEG2000 Part 2), IS15444-3 (Motion JPEG2000), IS15444-6 (Compound Document Compression), and IS15444-9 (JPIP). As a temporary replacement for the JPK-1 algorithm, the block coding algorithm described in this embodiment can be used with these other standards to dramatically increase throughput while retaining most of the existing features.
[0024] Importantly, the block coding algorithms described herein enable completely lossless coding to and from code streams generated using the J2K-1 algorithm.
[0025] As a trade-off for the dramatic reduction in complexity associated with the block coding algorithms described herein, compression efficiency is slightly reduced, and in addition, the quality scalability features of JPEG2000 are lost (or nearly lost).
[0026] Quality scalability is particularly important for interactive browsing applications via JPIP, where it essentially leads to significant communication savings and / or increased responsiveness of the browsing application. Quality scalability can also be important in distribution systems, as it provides a brilliant solution to the gradual degradation of image / video archives when necessary, and also enables selective protection and / or encryption of content, all of which are important to many applications. Conveniently, however, the transcoding features of the algorithm proposed in this embodiment mean that quality scalability can be optionally restored or temporarily abandoned by selectively transcoding images, video frames, volumes, or block bit streams associated with individual regions within an image or volume, in order to manage performance and power consumption targets within the media system.
[0027] In this invention, the term FBCOT (FAST Block Coder with Optimized Truncation) is used to describe the proposed method. This is because the "embedding" characteristics of the original EBCOT algorithm are largely (but not completely) lost, although post-compression rate distortion optimization can still be performed. Throughout this specification, the term FAST is used simply to refer to the block coding algorithm itself, while FBCOT refers to this algorithm in combination with a rate control algorithm.
[0028] The rate control aspects of the FBCOT algorithm have been extensively discussed elsewhere, allowing this specification to focus on a detailed explanation of the FAST block coder itself.
[0029] The algorithm described in this embodiment represents an evolution of the FBCOT algorithm, originally proposed in response to the JPEG-XS CfP, which achieved significantly higher target performance than other methods, particularly at low bitrates. During the JPEG-XS evaluation process, it was determined that the JPEG2000 extension for high throughput would be best managed through a separate activity known as High Throughput JPEG2000 (HTJ2K), which is expected to become part 15 of the JPEG2000 standard family. The motivation behind the FBCOT algorithm, and in particular its FAST block coder, precisely matches the motivation behind the HTJ2K activity.
[0030] In particular, the objectives of this embodiment are as follows: 1. The HTJ2K block coding algorithm shall support reversible code conversion to and from J2K-1 block bit streams. 2. The impact of the technologies introduced to JPEG2000 via HTJ2K shall be limited to the encoding and decoding of code block bit streams only, and shall not affect the code stream syntax, including packet header syntax, other than the necessary changes required for the code stream / tile subheader markers to signal the presence of the new encoding style. 3. The HTJ2K block decoder shall, on average, be at least 10 times faster than J2K-1 block decoder embodiments within a typical commercial Kakadu® toolkit (footnote 1) across a range of conditions important in actual applications, including transcoded content and content directly encoded using HTJ2K. 4. The HTJ2K block encoder shall, on average, be at least 10 times faster than the J2K-1 block encoder embodiment within Kakadu®, across a range of conditions that are important in practical applications. 5. The coding efficiency of the HTJ2K block coding algorithm shall, on average, not be more than 15% worse than the J2K-1 block coding algorithm over a range of conditions that are important in practical applications.
[0031] This specification describes three application areas that can benefit from the FBCOT algorithm described herein, all of which can be achieved within the expected framework for the HTJ2K standard.
[0032] High-resolution video capture Most mobile devices do not have sufficient CPU power to directly compress the high-resolution video streams that their image sensors can generate when the J2K-1 block coding algorithm is used. The FAST block coding option addresses this problem by allowing the compressed stream to be generated in real time and later transcoded to a J2K-1 representation when quality scalability attributes are important, for example, for efficient interactive browsing via JPIP. While transcoding is possible between any two compression formats, the advantages of the FBCOT algorithm described herein are as follows: a) Code conversion can be performed in the converted domain. b) Code conversion is essentially lossless, even if compression itself involves loss. c) Code conversion can be performed selectively as needed, even on a code block basis.
[0033] Energy-efficient image / video rendering In many applications of JPEG2000, content is rendered multiple times. For example, large images are interactively viewed at resolutions or regions of interest where sequentially rendered views typically contain many code blocks. Cached fully decoded code blocks in memory is rarely practical, and the availability of the FAST block coding option means that an intelligent content cache can choose to code repeatedly accessed code blocks into representations that can be decoded more quickly or with less energy consumption. The advantages of the algorithms described herein are that the coding from J2K-1 block bitstreams to FAST block bitstreams is computationally efficient, lossless overall, and accurately preserves all aspects of the original JPEG2000 representation.
[0034] Cloud-based video service JPEG2000 provides an excellent framework as an intermediate distribution format for video content, enabling the efficient extraction of resolutions (or even regions) of interest close to the point of delivery, which can then be coded into one of several common streaming video formats. While this use is already feasible and may be more advantageous than other methods, such applications can further benefit from the availability of lightweight block coders that retain all other relevant features.
[0035] A brief overview of the J2K-1 block coding algorithm. The J2K-1 block coder, as described in IS15444-1, processes subband samples within each code block through a series of coding passes. A brief review of this is useful in the following section to illustrate the different, but still related, coding pass structures of the FAST block coding algorithm.
[0036] Let X[n] denote the samples within a code block indexed by position n = (n1, n2), where 0 ≦ n1 < W represents the horizontal position, 0 ≦ n2 < H represents the vertical position, W is the code block width, and H is the code block height. Each coding path belongs to a bitplane index p ≧ 0, and in relation to it, the quantized magnitude of sample X[n] is given by the following. [Number] Here, Δ is the quantization step size that does not exist for the reversible coding procedure.
[0037] In this specification, M p If M[n] ≠ 0, sample X[n] is said to be "significant" with respect to bitplane p.
[0038] The finest bitplane (highest quality) corresponds to p = 0, while the coarsest quality corresponds to p = K - 1, where K is the maximum number of bitplanes of any code block belonging to a given subband, determined by the subband-specific parameter recorded in the code stream header.
[0039] For each code block, the parameter M start is communicated via the associated JPEG2000 packet header, which is interpreted as the number of lost bitplanes within the representation of the code block. The J2K-1 block decoder is allowed to predict that all samples within the code block are not significant within bitplanes p ≧ K - M start Equally, the total number of bitplanes that can contain significant samples is given by the following. P = K - M start
[0040] The first J2K-1 coding pass encodes significance information and codes (for significant samples only) for the bit plane p=P-1. This coding pass is identified as the "Cleanup" pass. Importantly, any significant sample encoded in this Cleanup pass must have a size of 1.
[0041] Next, for each more detailed bit plane, three coding paths are generated, which are identified as "SigProp" (significance propagation) and "MagRef" (magnitude refinement) coding paths. In total, there are 3P-2 coding paths with the following structure. Cleanup(p=P-1): Encodes the significance level in bitplane p for all samples, plus the sign of significant samples. SigProp(p=P-2): Visits non-significant adjacent samples in plane p, encoding their significance (and sign) for known significant samples. MagRef(p=P-2):M p We will access samples that were already significant with respect to plane p+1, encoding the least significant bit of [n]. Cleanup(p=P-2): Encodes the significance (and code) within bitplane p for all samples for which significance has not yet been established. SigProp(p=P-3):… MagRef(p=P-3):… Cleanup (p=P-3):… ... Cleanup(p=0):…
[0042] It should be noted that the encoder may remove any number of final coding paths from the information contained in the final code stream. In fact, if the encoder can reasonably expect that such coding paths will be removed, it does not need to generate such coding paths in the first place.
[0043] All coding paths in the J2K-1 block coder employ a stripe-oriented scanning pattern with four line stripes. Each stripe column is visited from left to right, then the code moves to the next stripe, while within each stripe column, the four samples of the stripe column are scanned from top to bottom.
[0044] The block coder utilizes arithmetic coding for all symbols in the Cleanup pass, but can optionally emit unprocessed (uncoded) bits for certain SigProp and MagRef coding passes. This mode, in which unprocessed bits are emitted for non-Cleanup passes, is identified as the "arithmetic coder bypass" mode, or simply "BYPASS" mode, as it is identified by bit 0 (LSB) of the code block style field in the associated COD / COC marker segment.
[0045] An overview of the FAST block coding algorithm. Coding path structure The FAST block coder also employs a coding path structure with Cleanup, SigProp, and MagRef coding paths defined for each bit plane p. However, importantly, the Cleanup path associated with each bit plane p is M p The size M of the sample for which [n]≠0 is true. p [n] and the code are fully encoded. This information fully encompasses all preceding (where p is greater than) coding paths and their associated information, so that no points exist in their emission into the code streams.
[0046] This means that as long as the first coding path to be emitted is the Cleanup path, both the first and the last coding paths can be deleted (or never generated) by the encoder. In fact, the encoder never needs to include more than four coding paths for any given code block in the final code stream. Figure 1 shows the coding paths that can be generated by the FAST block encoder and / or emitted to the final code stream.
[0047] From the decoder's perspective, the M value restored by parsing the JPEG2000 packet header still serves to identify the bitplane index p = K - M - 1 associated with the first available coding path for that code block. However, since the FAST Cleanup path can encode multiple magnitude bits of any given sample, M can no longer be interpreted as the number of leading magnitude bits that are all zero. The encoder should be careful to ensure that M accurately describes the first emitted coding path having a non-zero length for each code block. start is still associated with the bitplane index p = K - M - 1 of the first available coding path for that code block. However, since the FAST Cleanup path can encode multiple magnitude bits of any given sample, M start can no longer be interpreted as the number of leading magnitude bits that are all zero. The encoder should be careful to ensure that M start accurately describes the first emitted coding path having a non-zero length for each code block. start Note: As verified, the FAST Cleanup path always contains at least two bytes. It may be convenient for the writer of the code stream to be able to generate packet headers that identify the first coding path having a zero length. This is because these coding paths can be associated with the coding paths from the J2K-1 coded code blocks that are transcoded for use with the FAST block coder. This allows the transcoded representation to be recoded back to the original J2K-1 representation without losing the original relationship between the quality layer and the code block truncation point.
[0048] Note: As verified, the FAST Cleanup path always contains at least two bytes. It may be convenient for the writer of the code stream to be able to generate packet headers that identify the first coding path having a zero length. This is because these coding paths can be associated with the coding paths from the J2K-1 coded code blocks that are transcoded for use with the FAST block coder. This allows the transcoded representation to be recoded back to the original J2K-1 representation without losing the original relationship between the quality layer and the code block truncation point.
[0049] The SigProp and MagRef coding paths generated by the FAST block coder are independent of each other and depend only on the preceding Cleanup path. The SigProp and MagRef coding paths generated by the FAST block coder encode exactly the same information as the corresponding coding paths of the J2K-1 block coder, and consequently, the effective quantization associated with the truncation of the representation at the end of the Cleanup, SigProp, or MagRef path is the same regardless of whether the FAST block coding algorithm or the J2K-1 algorithm is used.
[0050] All significance and associated code information from the SigProp pass is emitted as raw binary, and all precision improvement information from the MagRef pass is emitted as raw binary. These raw bit streams then undergo only the bit stuffing procedure used by the J2K-1 algorithm to avoid the appearance of false marker codes in the range of FF90h to FFFFh (footnote 2).
[0051] The MagRef path employed by the FAST block coding algorithm is identical to that of the J2K-1 algorithm operating in BYPASS mode, except that the code bits are packed into bytes in little-endian bit order. That is, the first code bit in a byte appears in its LSB, opposite to its MSB.
[0052] The SigProp coding path employed by the FAST block coding algorithm is very similar to that of the J2K-1 block coder operating in BYPASS mode, but there are two differences: 1. While the J2K-1 block coder uses big-endian bit-packing order, the code bits are also packed into bytes of the raw bitstream in little-endian bit order. 2. The J2K-1 block coder inserts any required sign bits immediately after the same sample size bits, while the significance bits associated with one or more stripe columns are emitted first, followed by the associated sign bits, and then proceed to the next set of stripe columns.
[0053] These modifications together offer practical advantages over the J2K-1 algorithm method, particularly in software-based embodiments. It should be noted that the second modification listed above is carefully crafted to enable accelerated decoding based on a reasonable lookup table.
[0054] Aside from the block coding algorithm itself, the FAST block coder does not affect other JPEG2000 code stream structures or their interpretation. Regions, packets, tiles, transformations, and all other JPEG2000 elements remain unchanged. In particular, the structure of a JPEG2000 packet depends on the codeword segments generated by the block coder.
[0055] A codeword segment is a sequence of bytes whose length is always identified via the packet header. A J2K-1 block coder can pack all coding paths into a single codeword segment (default mode), while in TERMINATION mode, each coding path is assigned its own codeword segment, and in BYPASS mode (without TERMINATION), consecutive SigProp and MagRef coding paths are assigned to a single codeword segment.
[0056] The FAST Cleanup path is always assigned its own codeword segment and therefore does not affect BYPASS mode. However, TERMINATION mode is affected.
[0057] The CAUSAL mode flag also affects the information represented by the SigProp coding path, and is therefore supported by the FAST block coder to ensure fully reversible coding conversion to and from J2K-1 block bit streams.
[0058] The SEGMARK, ERTERM, RESET, and BYPASS mode flags are ignored when found in relation to the FAST block coder, but all of these flags can be retained to support truly reversible code conversion from a J2K-1 block coder-based code stream to a FAST block coder-based code stream, and vice versa.
[0059] Cleanup Path Overview The majority of this specification is devoted to describing the Cleanup path of the FAST block coder. Figures 2 and 3 provide summary block diagrams of the encoding and decoding processes, respectively.
[0060] The memory elements in these diagrams represent buffers capable of storing samples of code blocks and some estimated state information. During encoding, subband samples are loaded into the memory elements, and then the derived quantities (significance flags and magnitude indices) can be immediately determined. During decoding, subband samples and derived quantities (significance flags and magnitude indices) are progressively loaded into the memory elements as decoding progresses. The memory elements do not necessarily need to correspond to all samples or derived quantities of the entire code block; it is easiest to conceptualize things in this way.
[0061] A key feature of the Cleanup pass is that its codeword segment actually consists of three byte streams growing in different directions. These separate bit streams undergo bit stuffing and are packed into three byte streams to avoid the appearance of spurious marker codes in the range of FF90h to FFFFh. Care is also taken to combine the byte streams into a single Cleanup codeword segment so that the entire codeword segment is free of spurious marker codes and does not terminate at FFh, which is a fundamental requirement for all JPEG2000 codeword segments.
[0062] This 3-bit stream configuration offers distinct advantages over a single interleaved bit stream. In particular, the 3-bit stream configuration allows for significant separation between the various elements of the encoding and decoding algorithms, enabling these elements to be executed in parallel or in the order most beneficial to the implementation platform. In the software environment, register and vector processing blocks can be optimized far more aggressively than would be possible without the 3-bit stream configuration. In hardware embodiments, the 3-bit stream configuration provides better simultaneity, allowing for a very aggressive reduction in the actual amount of local storage to as few as two or three code block lines. Essentially, the optimal ordering of the various elements of the algorithm differs between encoding and decoding, between hardware and software deployments, and also depends on the vector processing length. Tightly interleaved bit streams cannot accommodate more than one processing order, whereas the 3-bit stream configuration provides the flexibility necessary to create highly efficient implementations across a wide range of platforms.
[0063] The three bitstreams used within the Cleanup path are known herein as the "MEL bitstream" (or simply the "MEL stream"), the "VLC bitstream" (or simply the "VLC stream"), and the "MagSgn bitstream" (or simply the "MagSgn stream").
[0064] Detailed explanation of the FAST Cleanup path algorithm Significance value, exponential value, Implicit-1 (implicit 1) value, and MagSgn value To understand the FAST Cleanup algorithm, we begin by defining the key quantities involved. As already mentioned, a Cleanup pass is associated with a particular bit plane p, and the size of the samples X[n] is understood as follows:
number
number
number
[0065] A sample is observed to be significant only if its index is non-zero. The FAST Cleanup algorithm explicitly encodes significance information, and then all that is needed is the code χ[n] and M for each significant sample. p This simply involves encoding the value of [n]-1. This information is then combined with the so-called "MagSgn" value.
number
[0066] Non-zero exponents are exponential predictors κ p The set [n] is coded via a so-called "unsigned residual". The property of this residual coding process is that the coded information can only provide a boundary for the exponent. U p [n]≧E p [n] v p [n] U p [n] LSBs provide a complete description of the sign and size of each significant sample, in particular. However, the boundaries are dense (i.e., U p [n]=E p [n]), E p If the decoder can know that [n]>1, then v p [n] U p Since the most significant bit among the [n] LSBs is implicitly 1, v p [n] U p It is sufficient to emit only [n]-1 LSBs.
[0067] To understand this, we define the "implicit-1" condition.
number
[0068] At this time, the MagSgn bitstream of the significant sample is packed into v p The number of LSBs from [n] is given by the following: m p [n]=U p [n]-i p [n]
[0069] The following subsections provide significance information and U for each sample. p Encode the [n] value, implicit-1 condition i p A detailed explanation of the method used to derive [n] is given.
[0070] For convenience, and considering that it is usually implied by context, we will remove the subscript p (bitplane index) from the notation expanded above, while moving the 2D index n, which identifies the sample position within the code block, to a subscript position. The equivalent notation is as follows: M p [n]≡M n , E p [n]≡E n , U p [n]≡U n κ p [n]≡κ n i p [n]≡i n , and v p [n]≡v n .
[0071] Several notable features of the coding algorithm can be summarized below. These features are readily apparent in the coding and decoding block diagrams in Figures 2 and 3. 1. Subband samples within a code block are processed within 2x2 groups g, each of which is given a 4-bit significance pattern ρ indicating the significance of each sample within that group. g It can be assigned. 2. Significant patterns are encoded using a combination of two different techniques: adaptive MELCODE and non-adaptive VLC code sets. 3. Exponential boundary U n This is the "unsigned predictive residual" u, which is common to all samples within a 2x2 group. g Encoded via U, and as a result, for all positions n in group g n=f pred (κ n ,u g ) becomes f pred () is almost always κ n +u g This is a fixed function that returns [a specific value]. 4. Predictor κ n It is derived from the size exponent of a particular preceding encoded sample, which itself depends on the MagSgn value of the preceding sample within the code block. 5. Significance pattern ρ of a certain group g and unsigned predicted residual u g One of them (CxtVLC code) is adjacent significance context c g Depending on the situation, both are encoded using a VLC encoding scheme with two subcodes, one best suited for table search techniques and the other suitable for direct computation when the other (U-VLC code) is required. 6.2 pairs of VLC code bits are interleaved to facilitate encoding or decoding eight samples together at once, while allowing four sample groups to be encoded or decoded individually if desired.
[0072] Bit stuffing and byte stream packs As mentioned, for compatibility with the JPEG2000 code stream structure, the Cleanup pass of the FAST block coder generates a single codeword segment whose length is communicated about the associated packet header using existing methods. However, in the FAST block coder, this codeword segment is divided into three byte streams, which are derived by bit stuffing and packing bits from the following three bit streams. A. The packed bytes grow forward from the beginning of the codeword segment in the MagSgn bitstream. B. The VLC bitstream in which the packed bytes grow backward from the end of the codeword segment, and C. The packed bytes grow forward from the end of the MagSgn byte stream into a MEL bit stream.
[0073] In this specification, the terms bit stream and byte stream are used with caution. Each bit stream consists of a sequence of bits generated by an encoding algorithm, while the corresponding byte stream consists of bytes into which those bits are packed, subject to a bit stuffing algorithm that serves to avoid the appearance of spurious marker codes in the final codeword segment. The structure of byte streams growing forward and backward is shown in Figure 4.
[0074] Bitpacking sequence and bit stuffing Bits from the MagSgn bit stream are packed into bytes of the MagSgn bit stream in little-endian order, resulting in the first bit from the MagSgn bit stream appearing as the LSB (bit 0) of the first byte from the MagSgn byte stream. When a byte is full, if the value of the byte is FFh, the MSB (bit 7) of the next byte becomes a stuffing bit with a value of 0, resulting in a byte having only 7 bits available and not exceeding the value of 7Fh. This means that no pair of consecutive bytes can form a 16-bit big-endian unsigned integer in the range of FF80h to FFFFh, and that the maximum number of stuffing bits introduced for every 15 bits packed from the MagSgn bit stream is 1.
[0075] The decoder should expand the MagSgn byte stream by FFh bytes before unpacking the bits and removing the stuffing bits.
[0076] Note: The encoder can, and should, discard any terminating FFh that would otherwise be emitted into the MagSgn byte stream.
[0077] Bits from the MEL bit stream are packed into bytes in the MEL byte stream in big-endian order, resulting in the first bit from the MEL bit stream being found in the MSB (bit 7) of the first byte from the MEL byte stream. Once a byte is filled, if the value of the byte is FFh, the MSB (bit 7) of the next byte becomes a stuffing bit with the value 0, and the next MEL bit is packed into bit 6 of that byte. Again, this means that no pair of consecutive bytes from the MEL byte stream can form a 16-bit big-endian unsigned integer with a value in the range of FF80h to FFFFh, and that the maximum number of stuffing bits introduced for every 15 bits packed from the MEL bit stream is 1.
[0078] Bits from the VLC bit stream are packed into bytes in the VLC byte stream in little-endian order, but the bytes themselves act backward from the end of the codeword segment. The fact that bytes are emitted and consumed in reverse order means that a different bit stuffing procedure is required. In particular, B cur However, this indicates the current byte in which bits are packed during encoding, or the current byte in which bits are unpacked during decoding, B prev However, this refers to the preceding byte emitted during encoding or the preceding byte consumed during decoding. prev >8Fh, B cur If all seven LSBs are 1, then B cur The MSB is a stuffing bit that should be 0. cur However, in reality, within the FAST Cleanup codeword segment, B prevWith the preceding note, this bit stuffing procedure ensures that no pair of consecutive bytes from the VLC byte stream can form a 16-bit big-endian unsigned integer having a value in the range of FF90h to FFFFh, which is the range of marker codes that must not appear in the external JPEG2000 code stream within any marker segment.
[0079] Communication of suffix length S via Interface Locator Word The length L of the codeword segment in the FAST Cleanup path is always communicated within the associated JPEG2000 packet header. The portion of this codeword segment containing the MEL byte stream and VLC byte stream is identified as a codeword suffix consisting of S bytes. The value of S is encoded within 12 bits, reserved as Interface Locator Language (ILW), so that LS identifies the interface between the MagSgn byte stream portion and the MEL byte stream portion that grow ahead of the codeword segment.
[0080] The 12 ILW bits correspond to the 8 bits of the last byte in the codeword segment, along with the 4 LSBs of the second-to-last byte in the codeword segment, and all FAST Cleanup codeword segments should have a length L and suffix length S of 2 or greater. The ILW bits are considered to reside within the VLC byte stream itself. The decoder should read the ILW bits, decode the value of S, and then overwrite the ILW bits with 1s, including the modified last 2 bytes of the codeword segment in the VLC byte stream from which the VLC bits are extracted, but discard the first 12 such extracted bits. The encoder should pack 12 1s into the VLC byte stream before packing the actual VLC bits, and the byte stream is then combined into a Cleanup codeword segment, with the 12 ILW bit positions holding 1s, which should be replaced by the coding suffix length S. These procedures ensure that the bit stuffing and bit unstuffing procedures associated with the VLC byte stream operate independently of the suffix length itself.
[0081] Unpacking the actual VLC bits from the VLC byte stream is done by extracting the bytes (B cur ) Let the four LSBs be 1, B prev Note that by setting this to FFh, you can start from bit 4 of the second to last byte in the codeword segment.
[0082] The suffix length S is encoded within 12 ILW bits as follows: S=B L-1 +(B L-2 (&0Fh) × 255 In the formula, B L-1 is the last byte in the codeword segment, B L-2 This is the second to last byte, (B L-2 &0Fh) is B L-2 Separate the four LSBs. In this representation, B L-1 Assume that it is not equal to FFh.
[0083] Transformation form 1: Suffix length is boundary
number
[0084] Termination procedure The boundary between the forward-growing MEL byte stream and the backward-growing VLC byte stream is not explicitly signaled. The decoder should consider all S suffix bytes of the FAST Cleanup codeword segment so that they belong to both the MEL and VLC byte streams when unpacking the bits. This means that some bits from the suffix may be unpacked into both bit streams.
[0085] Note: The ILW bit substitution described above should be performed before any MEL or VLC bits are unpacked from the codeword suffix.
[0086] The encoder is free to employ termination procedures that result in overlaps between the MEL byte stream and the VLC byte stream, as long as accurate decoding is achieved as a result. In fact, it is meaningful and relatively simple for the encoder to search for a one-byte overlap between these streams.
[0087] The individual bit stuffing procedures associated with the three byte streams do not guarantee the avoidance of spurious marker codes at the interface between the byte streams. This must be guaranteed during encoder termination. A spurious marker code is a pair of consecutive bytes that form a 16-bit big-endian unsigned integer in the range of FF90h to FFFFh. To avoid spurious marker codes between the MEL byte stream and the VLC byte stream, the encoder may need to insert an additional byte (e.g., a 00h byte).
[0088] As already mentioned above, since the decoder always synthesizes one final FFh, the encoder should generally eliminate any terminal FFh bytes that would otherwise be emitted into the MagSgn byte stream. This technique helps improve efficiency and avoids any possibility of spurious marker codes occurring at the interface between the prefix and suffix of the FAST Cleanup codeword segment.
[0089] Scanning sequence and 2x2 group structure Samples from code blocks of height W and width H are organized into 2x2 groups and processed in the line interleaved manner shown in Figure 5. Note that an additional column is effectively inserted to the right of code blocks with odd widths and an additional row is inserted below code blocks with odd heights, so that all 2x2 groups are guaranteed to give four samples to the scanning pattern. This addition is applied only to the FAST Cleanup coding pass and does not affect other coding passes. The sample values associated with the added positions are encoded, but all are non-significant, i.e., M p It should be equal to 0.
[0090] Significance patterns, context, and AZC groups Each group g is a binary significance state σ, where σ is 1 if any sample within the group is significant, and 0 otherwise. g It has the following characteristics. In addition, group g has a 4-bit significance pattern ρ in the range of 0 to 15. g It has such that each bit (LSB to MSB in scan order) is 1 if the corresponding sample in the group is significant. Clearly, σ g =0⇔ρ g = 0
[0091] Each group relies solely on the significance information associated with the preceding group visited in the scan order, and is encoded in context c. g This allows significance to be decoded before size and coding information, thereby improving computational throughput in at least the software embodiments of both the encoder and decoder, and also allowing the SigProp and MagRef coding paths to be coded and decoded in parallel with the Cleanup path.
[0092] AZC Group's MEL Adaptive Coding c gThe group g that is equal to 0 is said to be in the all-zero-context (AZC) state. In fact, these are groups where all causally adjacent groups are non-significant, which explains the term AZC. Adaptive coding is only used to encode the significance σ g of the AZC groups. Specifically, the binary symbol σ g associated with each AZC group in the sequence is concatenated to form a variable-length binary sequence σ AZC [i] that is encoded within the MEL bit stream. The encoding and decoding of this AZC symbol sequence need not be synchronized with any other encoding or decoding step.
[0093] The AZC symbol stream σ AZC [i] is first converted into a sequence of run lengths R AZC [j], where each run represents the number of 0s preceding the next 1. There is at most one AZC symbol per group of four code-block samples, and since there cannot be a code block with more than 4096 samples, the maximum run length that needs to be encoded is 1024, corresponding to a completely non-significant code block.
[0094] The MEL encoding procedure is a variant of the adaptive run-length encoding algorithm within the JPEG-LS standard, known as MELCODE. The MELCODE used in the JPEG-LS standard has 32 states, but a different state machine with only 13 state indices k within the range 0 to 12 is utilized by the FAST block coder. Each state k is associated with an exponent E MEL [k] and a threshold
Number
Table 2
[0095] The MEL code is a type of adaptive Golomb code for run lengths R AZC [j], and the threshold T MEL [k] serves as the Golomb parameter. Ignoring adaptation for the time, the encoding procedure can be summarized as follows. While R≥T, emit 1 (“hit”) and subtract T from R Emit 0 (“miss”), and then emit the E LSBs of R
[0096] The optimal Golomb parameter for an exponentially distributed source is slightly above half its mean value. Thus, a typical run R should be encoded by one hit followed by a miss. This implies that the adaptive state machine should experience one hit and one miss for each run, which is achieved by incrementing the state after each hit and decrementing the state after each miss, as shown in Table 2. The complete MEL encoding algorithm is as follows. Initialize k = 0 for each j = 0, 1, … Set R to R AZC [j] while R≥T MEL [k] Emit “1” (“hit”) Set R to R - T MEL Update Update k to min{k + 1, 12} Emit “0” (“miss”) The E MEL LSBs of R Update k to max{k−1, 0}
[0097] Note: Although the above algorithm is expressed in relation to run-length coding, just as binary arithmetic coding can be recast as a state machine operating on runs, the above algorithm can always be recast as an adaptive state machine operating on individual symbols. As an encoder for individual AZC symbols, the MEL coder here cannot produce more than 6 code bits, and in many cases does not produce any bits at all. Both the MQ arithmetic coder and the MEL coding method used by the J2K-1 algorithm exhibit roughly the same number of state transitions here, but the advantage of the MEL coder is that its state machine is very small. In software, it is prudent to use a small lookup table to drive the coding and decoding of runs, here in most cases a single lookup is sufficient to code or decode an entire run.
[0098] The bits emitted by the MEL coder constitute the MEL bit stream. If the last AZC symbol in a code block is 0, the last run is considered "open," meaning the coded run value is at least the number of zeros at the end of the AZC symbol sequence. last This means that it can have any value of a certain magnitude.
[0099] Note: The encoder can leverage the flexibility of an "open" run to terminate the MEL byte stream in order to maximize the opportunity for overlap with the VLC byte stream growing backward.
[0100] Significance and u via CxtVLC code off encoding Non-AZC group, and significant (i.e., σ g =1) For the AZC group, use a variable-length code that operates for each individual 2x2 group to determine the significance pattern ρ gHowever, it is encoded along with other information. Two types of codes are used, identified herein as CxtVLC code and U-VLC code. The resulting code bits are interleaved in group-pair units, as will be described later, to form the VLC bit stream of the FAST block coder.
[0101] This section deals with the significance pattern ρ. g , and the corresponding exponential boundary U n To obtain the offset, predictor κ is associated with the samples in group g. n A binary value indicating whether or not it should be applied.
number
number
[0102] The first pair of lines in a code block (equivalently, the first line in a 2x2 group) that lacks contextual information from preceding lines is distinguished from any pair of lines that are not the first. Figure 6 shows the significance information used to form the context labels for these two cases. The corresponding context labels are calculated from this information as follows: Group row other than the first one:
number
number
[0103] Modification 2: The context label here takes a value between 0 and 7 for both the first group row and the non-first group rows. Since a separate CxtVLC code table is used for each instance, it may be preferable to use a smaller set of contexts for the first row of the group, which has less impact on the overall performance of the coder, in order to reduce the footprint of the embodiment. In particular, the following may be used in the present invention: First group row (alternative form):
number
[0104] Note: The precise definitions of these labels are important only for the accurate interpretation of the CxtVLC code table. Context label substitutions can be used equally, along with their corresponding substitutions in the CxtVLC code table.
[0105] CxtVLC codeword length of a group line other than the first one For groups found in non-first group lines (non-first pair of lines in a code block), the CxtVLC codeword has a maximum length of 7 bits. There are eight distinct contexts c g There exist, and each of them is a 4-bit significance pattern ρ g and binary
number
number
number
number
[0106] Table 3 gives the codeword lengths for each valid combination of context and codeword. The mapping of codeword lengths to actual codewords will be explained later in this section. [Table 3]
[0107] Note: The embodiment avoids conditional branching by c g =0 and ρ g For invalid combinations with =0, it may be found useful for populating the coding table with zero-length entries.
[0108] Modification 3: The CxtVLC codeword tables provided herein can be further modified to optimize coding efficiency across a range of video types. In particular, it may be desirable to provide separate codeword tables for various subband orientations.
[0109] Modified form m1: Codeword length is less than 7
number
number
number
number
number
number
[0110] This variant form constitutes a variable - variable - length coding scheme, where both the length of each codeword and the amount of information represented by each codeword are variable. Specifically, in this variant form, each codeword within the enhanced CxtVLC is
Number
Number
Number
Number
[0111] In this case, the FAST block coding algorithm, the MagSgn bit - count m n is reduced by 1 for each sample whose φ g bit is 1, and the implicit - 1 value i n of each such sample is
Number
[0112] The enhanced CxtVLC mentioned above uses a 4-bit effectiveness mask φ g is not valid
number
number
number
number
Number
Number
[0113] CxtVLC codeword length of the first group row For the first row of the group, since the exponential-bound encoding is also different for these groups, here
Number
[0114] and is not provided in the original, so I can't translate it accurately. Here I assume it's some placeholder or incomplete content and use <…> to represent it.) Variant 4: It may be preferable to increase the similarity between the encoding procedure used for the first group row and the encoding procedure used for non-first group rows, so then
Number
Table 4
[0115] Actual VLC codeword c associated with each entry in Tables 3 and 4 w This is obtained via the Macmillan assignment procedure, which yields the prefix code for each context. In the table above, the length of the codeword having entry w is l w This is expressed as follows, where w=0 is the first valid entry in the context label, w=W-1 is the last entry, and W is the number of valid codewords in that context. The codewords are first sorted from shortest to longest using the index table idx[] as follows: for each w=0,1,...,W-1 for each i = 0, 1, ..., w-1 IF (l w <l idx[i] ) or ((l w =l idx[i] ) and (i mod 2 ≠ 0)) Move the idx[i] entry i~w-1 to position i+1~w. Exit the loop without advancing i. Assign idx[i]=w
[0116] The condition (i mod 2 ≠ 0) in this sorting procedure is not particularly important and is merely there to ensure consistency with the procedure used to generate the codewords used during the evaluation of the coding efficiency of the FAST block coder.
[0117] Once sorting is complete, each codeword will be, according to the following, l max I-bit unsigned integer w Assigned
number
number
[0118] Finally, the actual codeword c of VLC w However, I is written in big-endian order. w The highest level l w It is formed from bits. That is, c w The first bit is I w MSB (bit l) max -1) on the other hand, code word c w The last bit is I w bit l max -l w As already mentioned, this is the well-known Macmillan assignment. The assignment is unique except for the substitution of codewords of the same length, whose order is determined by the explicit sorting procedure described above.
[0119] Predictors for non-first group rows, U boundaries, and U-VLC codes This section exclusively concerns the encoding of exponential boundaries of group rows that are not the first. Samples belonging to the first row of a group within a code block are handled somewhat differently, as described later.
[0120] Predictor κ n However, these are formed for each significant sample based on the magnitude index from the preceding group row. Figure 7 identifies the four indices used to form the predictor for significant samples within group g (footnote 4), where the positional subscript n has been replaced with the more convenient group-associated labels "tl", "bl", "tr", and "br". The decoder generally needs to derive these magnitude indices from the fully decoded sample values in the second line of the preceding group row.
[0121] The first step in forming a predictor is the estimated index.
number
number
number
number
number
number
number
number
number
[0122] The estimated index is converted into a predictor using the following: κ n =max{P n ,1}-Z g In the formula, Z g The offset Z is the predicted offset of the group g to which position n belongs, where Z is 1 if all significant samples in the group have an estimated index of 2 or greater, and 0 otherwise. gIn effect, u g This allows us to represent small prediction residuals of around -1, which can be formally written as follows:
number
[0123] For each significant group g, a single unsigned residual u g ∈{0,1,…,36} are encoded together via CxtVLC and U-VLC codes. In particular, the CxtVLC code is used to communicate the following binary values:
number
number
[0124] κ of the group containing position n n and u g From the value, the decoder determines the exponential boundary U according to the following: n Derive the following.
number
[0125] Here, the binary significance value σ n For all non-significant samples, U n Set it to zero.
[0126] Note: However, if the U-VLC code is greater than 36 g Because it is not possible to represent the value, special conditions u g =36 is required, while κ n It can be made as small as about 1, while the JPEG2000 standard family provides subband samples where the size index can be as large as about 38. To address this, ug =36 forces U into a significant sample. g It is treated as an "escape code" that takes the maximum exponential boundary of =38.
[0127] The encoder is u g The value of U g ≧E g It is necessary to guarantee that it takes the smallest non-negative value that satisfies the requirement, which can be written as follows.
number
number
number
[0128] Note: In the above description, some quantities are
number
number
number
number
[0129] u g The U-VLC code used to represent non-zero values consists of prefix and suffix components designed to be interleaved in group-pair units. The prefix, if present, uniquely determines the length of the suffix and is small enough to allow the prefixes of a pair of groups to be decoded together using a reasonable table lookup. Table 5 gives all the relevant details of this code. [Table 5]
[0130] For the first line of a group within a code block, there is no available size index from the preceding scan line.
[0131] This case may be important in low-latency applications where code block heights are typically small, and therefore alternative mechanisms for encoding exponential boundaries, including a form of horizontal prediction, can be used that can be achieved without introducing additional latency.
[0132] The alternative mechanism developed in this invention also involves a predictor and an unsigned residual u g The forecast includes, but the baseline value B is fitted for each group and can be interpreted as a state variable. g A single exponential boundary U with the following values is formed. g However, each group g is decoded,
number
number
[0133] If group g has two or more significant samples, γ g is equal to 1, otherwise γ g Please recall that is equal to 0. For row groups other than the first one, this formulation is the maximum codeable value (u g By treating -2)=36 as a special escape code, U g This allows it to take a large value of 38.
[0134] For a continuous set of groups with two or more significant samples, the unsigned residual u g In this case, U g =U g-1 +(u g -2) Therefore, U g It can be understood as the (by only 2) offset difference between consecutive values of . For a group with only one significant sample, the above relationship is: gIt is forced to be 1, and as a result, U g =u g -2 is independent of the preceding group. B g The special value of =0 is U g Although not strictly important as it corresponds to non-significant groups where the value is not encoded or used, this special value can be used to facilitate efficient implementation based on lookup tables.
[0135] Similar to the first group row, the encoder uses U for each position n within group g. g ≧E n While guaranteeing the above formula, u g You need to select the minimum value.
[0136] Clearly, u g Some values of should not be allowed, this is because u in the first group row g This reflects the use of the modified U-VLC codes. The U-VLC codes adopted for the first group row are for baseline variable B g The condition is applied to the value of . Furthermore, here,
number
[0137] The implicit-1 condition for the first row of the group is as follows:
number
[0138] The B-dependent U-VLC (or "BU-VLC") code used in the first row of a group is specified in Table 6. Since the codeword prefix never exceeds 4 bits in length, condition ρ g+1 = 0 or M g+1After adjustment for =0, the codeword prefix returns the prefix length, the suffix length (often zero), and the decoded U. g The updated B will be used to index the boundaries and the BU-VLC table of group g+1. g Along with the value, 2 bits of B g-1 It is possible to develop efficient LUT-based decoding strategies that are indexed by values. [Table 6]
[0139] Modification 5: Different processing of the first group of rows and the second group of rows, as described herein, imposes costs, particularly on hardware embodiments. In most applications, the first group of rows contribute relatively little to the overall coding efficiency, and therefore it may be preferable to modify the method to be more similar to the one used for all the second group of rows. One method processes all estimated indices to P n Set =1 and have a binary with a significant pattern encoded via CxtVLC code
number
[0140] Modification 6: After the above simplification, a significant improvement is made by reducing the specific unsigned predictive residual u g This includes using a MEL coding machine to adaptively communicate the offset to the AZC symbol stream σ. Specifically, this involves the AZC symbol stream σ. AZC [i] is
number
number
number
number
number
number
number
[0141] Modification k1: For the benefit of simplification and further throughput enhancement, it is meaningful to reduce the number of possible non-AZC symbols associated with Modification 6. This modification is
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
[0142] Modified form m2: The same technique described in modified form m1 can also be used for the first row of a group to incorporate a partial msb pattern into an enhanced CxtVLC table, which does not result in an increase in codeword length. In this case, the first group row contains examples.
number
[0143] VLC bitstream organization A VLC bit stream consists of bits from CxtVLC and U-VLC codes, interleaved in groups. For code blocks with an odd number of 2x2 groups per group row, each group row is padded by an additional 2x2 group that does not contain a CxtVLC codeword or AZC symbol, is always non-significant, and consequently does not contain a U-VLC codeword either. In this way, each group row is divided from left to right into integer groups.
[0144] The VLC bit stream is formed by first emitting a significance CxtVLC codeword associated with a group pair (which may be from (footnote 5)), then emitting any U-VLC code prefix for each group in the pair, and finally emitting any U-VLC code suffix for each group in the pair. All such VLC bits precede those from the next group pair in lexicographical order. This interleaving strategy, along with the associated decoding dependencies, is shown in Figure 8. The interleaving procedure is identical for the first group row and subsequent group rows in the codebook, except that the number of bits associated with each interleaving component may differ in the first group row.
[0145] One advantage of interleaving is that pairs of U-VLC prefixes can be decoded together, after which the U-VLC suffix length is known, and CxtVLC decoding can be immediately started within the next group pair. A second advantage is that the encoder can generate both the CxtVLC bits and the U-VLC bits using only two table lookups in total per group pair.
[0146] MagSgn bitstream organization and sample value decoding The MagSgn bit stream is scanned according to the order shown in Figure 5, and the MagSgn value v of each sample is obtained. n From m n It is formed by linking together LSBs, where, m n =U n -i n v n =χ n +2(M n -1) And, χ n σ is the sign bit of the sample, which is 1 if the sample is negative and 0 otherwise. It is not significant, i.e., σ n For samples where = 0, U n i n and mn Note that all values are zero, and therefore non-significant samples do not contribute to the MagSgn bitstream. All significant samples contribute at least 1 bit to the MagSgn bitstream.
[0147] v n no m n Each LSB is packed into a MagSgn bit stream in little-endian order, which is v n The LSB (bit 0) appears first, and bit (m n This means it ends with -1).
[0148] The decoder takes these m from the MagSgn bitstream. n Unpack the bits,
number
[0149] As long as sufficient AZC group significance symbols are decoded from the MEL bitstream, these inter-row dependencies are significance pattern ρ g and unsigned residual u gIt is worth noting that this does not restrict the order in which bits are decoded from the VLC bitstream. Furthermore, the MEL decryption procedure is, overall, independent of both the VLC and MagSgn decryption processes. In summary, VLC decryption depends only on MEL decryption, and MagSgn decryption depends only on VLC and MEL decryption, while the VLC and MagSgn decryption processes each have an internal dependency on the completion of the preceding VLC and MagSgn decryption steps, respectively.
[0150] Detailed explanation of the FAST MagRef coding path The FAST MagRef coding path is identical to the precision improvement path of the J2K-1 algorithm when BYPASS mode is used, except that the unprocessed precision improvement bits are packed into bytes in little-endian order as opposed to big-endian order.
[0151] The FAST MagRef pass provides an additional precision bit to improve the precision of significant sample size from the preceding FAST Cleanup pass. Let p represent the bit plane associated with that Cleanup pass. The MagRef pass may only exist if p > 0. The MagRef pass identifies each sample position that is significant with respect to bit plane p, i.e., M p For each position where [n]≠0, r p [n]=(M p-1 [n] mod 2) ∈ {0,1} Provides a value.
[0152] The FAST MagRef path skips non-significant locations and removes all other locations. p It uses the same 4-line stripe orientation scanning pattern as the J2K-1 block coder, emitting [n] bits to the MagRef bitstream.
[0153] Bits from the MagRef bitstream are packed into bytes in little-endian order, starting from the LSB of each byte. Once the entire byte is assembled, if the value of that byte is FFh, a stuffing bit (0) is introduced into the MSB (bit 7) of the next byte, which can accommodate only 7 bits from the MagRef bitstream. The decoder progressively extracts bits from the bytes, working from the LSB of each byte toward the MSB, skipping any preceding bytes (if any) in the MagRef byte stream that had the value FFh.
[0154] The last byte in the FAST MagRef byte stream should not have the value FFh, meaning the encoder must emit a byte containing any stuffing bits generated through the procedure described above. The unused bits in the last byte of the MagRef byte stream may take any value, as long as the last byte does not equal FFh.
[0155] Detailed explanation of the FAST SigProp coding path The FAST SigProp coding path is the same as the significance propagation path of the J2K-1 algorithm when BYPASS mode is used, except that the significance and sign bits are rearranged and packed into bytes in little-endian order as opposed to big-endian order.
[0156] The FAST SigProp pass provides improved size information for samples encoded as insignificant in the preceding FAST Cleanup pass, as long as they have significant adjacent samples, based on information encoded in either the FAST Cleanup pass or the FAST SigProp pass that precedes it. Let p represent the bit plane associated with the preceding Cleanup pass. The SigProp pass may only exist if p > 0. The SigProp pass provides size bits for each position n. rp [n]=(M p-1 [n] mod 2) ∈ {0,1} Encode it, and as a result,
number
number
number
[0157] Here, N n This includes all adjacent positions, including all eight nearest adjacent positions of position n in the codebook, unless the CAUSAL mode flag is set within the associated COD / COC marker segment. n This omits any adjacent positions found in the following four-line stripe (i.e., those following the stripe containing position n).
number
[0158] For a total height stripe (i.e., one with four actual code blocks within each stripe column), all member positions within the stripe column (i.e.,
number
number
[0159] If a code block ends in an incomplete stripe of height 3, the size and sign bits are also interleaved column by column within that stripe, although of course there are up to 3 member positions within each such column.
[0160] If a code block ends in an incomplete stripe of height 2, the magnitude and sign bits are interleaved in column-pair units within that stripe, meaning that the magnitude bits from all members (4 samples) in the first pair of stripe columns are emitted into the SigProp bit stream before the sign of any newly significant member in that stripe column pair, and the same is done for each subsequent stripe column pair in the code block. Only positions that actually exist within the code block can be members.
[0161] If a code block ends in an incomplete stripe of height 1, the size and sign bits are interleaved in column-quad units, meaning that the size bits from all members (in this case, 4 samples) in a set of 4 columns are emitted into the SigProp bit stream before the sign from that set of columns. Again, only positions that actually exist within the code block can be considered members.
[0162] Note: Interleaving based on size and sequence and multiple sequences of sign bits can have a highly beneficial impact on software embodiments, at least for both encoding and (particularly) decoding. Here, we note the special case of stripes having heights of 2 and 1, which is important for enabling high throughput in degraded cases where code blocks are truncated below their nominal dimensions. This can occur only at the lower boundary of an image or video frame, but is much more frequent when the image is divided into tiles or when short, wide area dimensions are used, especially to achieve low latency or memory utilization. The overall significance of these special cases is highly application-dependent and may justify further consideration.
[0163] Modification 7: Particularly with respect to hardware embodiments, it is preferable to employ a more unified processing of stripes having 1, 2, 3, or 4 lines. One good way to achieve this while maintaining high software decoding throughput even for stripes of height 1 and 2 is to interleave the magnitude and sign bits in column quad units in all stripes, regardless of height. In this case, magnitude bits from all members of the set of 4-stripe columns are emitted into the SigProp bit stream before the sign from the newly significant sample in that set of 4-stripe columns. For full-height stripes with 4 lines, as a result of this modification, up to 16 magnitude bits are emitted into the SigProp path, followed by up to 16 sign bits corresponding to the newly significant sample. For stripes of height 1, there is no difference between this modification of the SigProp path and the one described above.
[0164] Bits from the FAST SigProp bitstream are packed into bytes in little-endian order and undergo the exact same bit stuffing procedure as the FAST MagRef bitstream, resulting in the SigProp bytestream.
[0165] Any FAST SigProp byte stream should begin at the start of the codeword segment immediately following a FAST Cleanup codeword segment. If the TERMINATION mode flag is set within the associated COD / COC marker segment, the SigProp byte stream should occupy its own codeword segment, and the last byte of that codeword segment should not be equal to FFh. In this case, the FAST MagRef byte stream (if any) should occupy the subsequent codeword segment and should not terminate with FFh, as previously described.
[0166] If the TERMINATION mode flag is not set, the SigProp bitstream and the MagRef bitstream (if present) are concatenated, and the resulting bitstream is packed into a single byte stream according to little-endian conventions, resulting in a single codeword segment that should not end with FFh.
[0167] Variation 8: To enable simultaneous processing of the SigProp coding path and the MagRef coding path when the TERMINATION flag is not set, a desirable change to the current method is to configure the MagSgn byte stream to grow backward rather than forward, so that the start of both the SigProp byte stream and the MagRef byte stream can be immediately identified within a single codeword segment they share.
[0168] Code Stream Syntax This section describes a small set of changes to the code stream syntax described in IS15444-1 that are required to support the introduction of FAST block coders. Some of the principles behind these changes are worth highlighting. 1. The FAST block coder can be used as a temporary alternative to the J2K-1 block coder across the JPEG2000 standard family. 2. It is possible to convert a J2K-1 based code stream to one using a FAST block coder without losing any information about the quantized image samples. This characteristic is essentially already provided by offering FAST SigProp coding paths and MagRef coding paths that encode exactly the same information as their counterparts within the J2K-1 algorithm. 3. Even if the FAST block coder itself is not highly scalable, it is possible to code a J2K-1 based code stream with multiple quality layers to one using the FAST block coder, while retaining all information about the layer boundaries associated with each code block. As a result, it is possible to code back to the original, finely embedded representation without any loss of information. 4. No changes will be made to the JPEG2000 code stream syntax or the structure of JPEG2000 packets, except to the extent that a new signaling method needs to be introduced to identify the use of the FAST block coding algorithm.
[0169] FAST block byte stream carriage within JPEG2000 packets As described in Annex B of IS15444-1, code blocks are organized into areas, each area represented by a sequence of packets, one per quality layer. Each packet has a header that identifies the contribution made to the packet by each code block in the area, and a body that holds the associated coded bytes from the code blocks in the area. The packet header identifies the number of the first missing highest-order bit planes for each contributing code block, along with the number of coding paths and the associated coded length information for each contributing code block.
[0170] Depending on the block coding mode, coded bytes from each code block are divided into one or more codeword segments. If a code block contributes to coding paths from multiple codeword segments to a packet, the packet header contains enough length information to identify the boundaries between the codeword segments. In particular, if the TERMINATION mode flag (bit 2 of the code block style field) is set within the associated COD / COC marker segment, each coding path occupies its own codeword segment, and therefore the number of lengths communicated by the packet header is equal to the number of coding paths included. If the BYPASS mode flag (bit 0 of the code block style field) is set, each bypass significance propagation must appear at the beginning of a codeword segment, and each bypass precision improvement path must appear at the end of a codeword segment, which is the same codeword segment initiated by the preceding precision improvement path, unless the TERMINATION mode flag is set.
[0171] When the FAST block coding algorithm is used, regardless of whether the BYPASS mode flag is set, the FAST Cleanup pass must occupy its own codeword segment, the FAST SigProp pass must appear at the beginning of the codeword segment, and each FAST MagRef pass must appear at the end of the codeword segment.
[0172] Note 1: This configuration of the codeword segment in the FAST coding path is consistent with that used by the J2K-1 block coder when the BYPASS mode flag is set. However, the BYPASS mode flag itself is meaningless to the FAST block decoder.
[0173] Note 2: This allows the BYPASS mode flag to be preserved when transcoding from a J2K-1 based code stream to one using a FAST block coder, and as a result, the original representation can be restored later through subsequent transcoding operations.
[0174] When the TERMINATION mode flag is set, the FAST SigProp and MagRef coding paths occupy their own codeword segments.
[0175] If the associated COD / COC marker segment identifies its FAST block coder, the coding path contribution recorded in the packet header will match the structure shown in Figure 9.
[0176] In many cases, the first coding path contribution is the FAST Cleanup path. However, it is possible that the FAST Cleanup path is preceded by a set of "empty coding paths" which are identified as all having zero length. Since the FAST Cleanup path must have at least 2 bytes, these should not be interpreted as FAST coding paths by the decoder. The number of empty coding paths, if present, should be 3Z, where Z is a non-negative integer. The bit plane index p associated with the first FAST Cleanup path is given by: p=KM start -Z-1 In the formula, K is the maximum number of size bit planes associated with the subband, and M start Z is the number of missing MSBs, signaled in the packet header that identifies the first contribution of the code block, and Z is the number of empty triplets in the coding path identified before the first contribution that has a non-zero length.
[0177] Note 1: The reason why 3Z empty coding passes are allowed to precede the first FAST Cleanup pass is to allow the J2K-1 based code stream to be transcoded for use with the FAST block coder while still retaining all information related to the quality layer boundaries from the original code stream. This information can be used to reconstruct the transcoded original code stream.
[0178] Note 2: The CAP marker segment is used to advise the decoder whether a code block could contribute to an empty coding path before the first FAST Cleanup pass.
[0179] If Z is non-zero, the codeword segments associated with empty coding paths in 3Z are determined based on the mode flag found in the code block style field of the associated COD / COC marker segment, as if those coding paths were encoded using the J2K-1 block coding algorithm. In particular, if the BYPASS mode flag is set, empty SigProp paths, which would mean the arithmetic coder has been bypassed, appear at the beginning of those codeword segments, and empty MagRef paths, which would mean the arithmetic coder has been bypassed, appear at the end of those codeword segments, which will be the same codeword segment as the preceding SigProp path unless the TERMINATION mode flag is set.
[0180] A code block does not need to contribute to any non-empty coding path to a code stream, or in fact, does not need to contribute to any coding path at all. It is possible for four or more FAST coding paths to be contributed by a code block, in which case each consecutive FAST Cleanup path has a bit plane index p which is smaller than the index of the preceding index, and therefore encodes all the information embodied by all the preceding coding paths.
[0181] Note 1: The decoder is recommended to process the last available FAST Cleanup pass of the code block, along with any subsequent FAST SigProp passes (if any) and FAST MagRef passes (if any).
[0182] Note 2: The CAP marker segment is used to advise the decoder whether a code block can contribute to four or more FAST coding paths.
[0183] Carriage of mixed block coding type within JPEG2000 packets Note: While other code blocks are encoded using the J2K-1 algorithm, it may be useful to encode some code blocks of tile components using the FAST block coding algorithm. This may be necessary in applications where code blocks are transcoded on demand from one representation to another (for example, when needed to display or communicate a portion of a video), resulting in some code blocks being transcoded while others remain untranscoded.
[0184] Mixing of block coding types is permitted only if it is signaled within the relevant COD / COC marker segment, as described below. Furthermore, in this case, the CAP marker segment is used to advise the decoder that a mixed coding type is possible, as described in Section 0.
[0185] When the possibility of a mixed coding type is thus indicated, the block coding type used for a code block is indirectly identified through signaling length information within the packet header. In all JPEG2000 code streams, the length associated with a code block contribution is signaled using a number of bits that depends on an "Lblock" state variable specific to each code block and is progressively adjusted during packet header parsing. If the length of the first non-empty contribution to a code block is signaled using an Lblock value greater than required, the FAST block coding algorithm is used, and the structure of all code block contributions will be as shown in Figure 9. Otherwise, if the Lblock is less than or equal to the required value, the J2K-1 block coding algorithm is used, and all contained coding paths in that code block are processed according to the J2K-1 algorithm.
[0186] Signaling of FAST block coder technology via COD / COC markers A code stream using the FAST block coder includes a CAP marker segment in the main header that advertises its dependency on Part 15 features. When the FAST block coder is used within a code block belonging to a given tile component, the FAST mode flag (bit 7 of the code block style field) is set (equal to 1) within the associated COD or COC marker.
[0187] Table 7 summarizes the role of the code block style field in identifying the impact of the FAST block coding algorithm on the interpretation of all mode flags. [Table 7]
[0188] If bit 5 of the Scod or Scoc field (if applicable) of the COD / COC marker segment is set, the COD / COC marker segment also includes a 16-bit SXcod field whose MSB (bit 15) indicates whether the code block can be coded using the J2K-1 block coding algorithm. This is the "mixed coding" mode flag. If the mixed coding flag is set, the decoder checks whether the "L-block" packet analysis state variable, used to code the length of the first contribution of the code block that has a non-zero length, is greater than what is needed to code that length. As described above, if the L-block is greater than what is needed, the FAST block decoder is used to process the code block; otherwise, the J2K-1 block decoder is used.
[0189] Note: The SXcod field is also used in IS15444-2 / AMD4, and bit 5 of the SXcod field is also used to signal its presence. In IS15444-2 / AMD4, whenever the BYPASS mode flag (bit 0) of the code block style field is set, the two LSBs of the SXcod field encode a value BB that identifies the number of additional bit planes to be bypassed that should be used. When BYPASS=1 and BB=01, arithmetic coding is bypassed in all bit planes for both the SigProp coding path and the MagRef coding path. When the FAST block coder is used, these two LSBs of the SXcod field have no meaning to the decoder, but may be used to preserve the block coder mode used in the original J2K-1 based JPEG2000 code stream that was being transcoded to use the FAST block coder.
[0190] If bit 7 of the code block style field is set, but bit 5 of the Scod or Scoc field is not set, the 16-bit SXcod field does not exist within the COD / COC marker segment, and the code blocks of all affected tile components are encoded using only the FAST block coding algorithm.
[0191] Part 15 Function Flags In this invention, we propose defining three bit flags for the Part 15 function word within the CAP marker segment as follows: The "Empty Passes" flag indicates that a code stream may contain Z > 0 empty coding passes before a FAST Cleanup pass. If this flag is not set (i.e., 0), the first packet contribution from any code block using the FAST block coding algorithm is a FAST Cleanup pass. The "Multiple FAST Cleanup" flag indicates that a code stream may contain two or more FAST Cleanup paths for a code block. If this flag is not set (i.e., 0), at most one FAST Cleanup path is contributed to the packets in that area by any code block. The "mixed coding" flag indicates that two or more types of coding techniques, as shown above, may be possible for a code block. If this flag is not set (i.e., 0), all code blocks whose COD / COC marker segment has the FAST mode flag (bit 7 of the code block style field) set will be decoded using the FAST block coding algorithm, and the SXcod field will not exist, or its "mixed coding" mode flag will be 0.
[0192] If the “mixed coding” flag is set, bit 5, which identifies the presence of a 16-bit SXcod field, may be set within the COD and / or COC marker segment of the code stream, as described above.
[0193] Methods for encoding and decoding using the embodiments described above are carried out by a processing unit which may consist of software, a software-hardware hybrid, a programmable gate array (PGA) or FPGA, or any other architecture. The software may be provided in the form of modules. When the software is used, routines and subroutines, or any software architecture, carry out embodiments of the present invention. When software is used to carry out the present invention, the software may be provided on a computer-readable medium such as a disk, or as data signals over a network such as the Internet, or in any other form.
[0194] The above embodiments relate to use within the JPEG2000 format. The embodiments of the present invention are not limited thereto. Some embodiments may be used in other image processing formats. The embodiments may find applications in other image processing contexts.
[0195] The embodiments of the present invention are not limited to images or video frames, but may be used with any other type of media. For example, the embodiments may be used by depth coding of multi-view imaging and video or any other visual media.
[0196] Those skilled in the art will understand that numerous modifications and / or changes can be made to the present invention, as shown in certain embodiments, without departing from the spirit or scope of the invention as broadly described. Therefore, the embodiments of the present invention should be construed in all respects as illustrative rather than limiting. footnote 1. http: / / www.kakadusoftware.com - The comparison is with the regular Kakadu distribution, in contrast to the Kakadu Speed Pack Edition, which may only be 50% faster. 2. In practice, bit stuffing in the raw codeword segment of JPEG2000 avoids the occurrence of byte pairs whose big-endian hexadecimal values are in the range of FF80h to FFFFh, but block coding algorithms are generally only needed to avoid direct marker codes in the range of FF90h to FFFFh. 3. Initial experiments suggest that the typical improvement in coding efficiency resulting from this variant is unlikely to exceed 1.5%. 4. Predictors for non-significant samples within a group can be formed in the same way, but this does not affect the encoding or decoding process. 5. "Empty" in this specification refers to non-significant AZC groups in which no CxtVLC codewords exist, and groups added as an augmentation to ensure that each group row has a group pair of integers.
Claims
1. A method for encoding a block of subband sample values derived from a still image, video frame, or related media, the method comprising three bitstreams and the division of samples from a block into a specified number of groups, a. A first bitstream, referred to as the MEL bitstream, encodes the significance of an entire group where all causally related neighboring groups are non-significant, samples with a non-zero magnitude are identified as significant, and samples with a zero magnitude are identified as non-significant. These groups, where all causally related neighboring groups are non-significant, are referred to as the All Zero Context (AZC) group, where an AZC group is significant if it contains one or more significant samples. b. Encode the significance of individual samples within each group whether the second bit stream (VLC bit stream), referred to as the VLC bit stream, is a significant AZC group or not. c. The second bitstream, when added to the set of exponential predictors, also encodes the unsigned residual values of each significant group, which give an upper limit to the size exponent of each significant sample within the group. d. A third bit stream, referred to as the MagSgn bit stream, provides the sign bits and any additional size bits necessary to represent a significant sample value, given an upper limit of the corresponding size index. e. The exponential predictor is calculated using the size of the preceding sample within the block, except when the preceding sample within the block is outside the block, by a method, Each causally related adjacent group within a group corresponds to a sample location adjacent to the group, found either to the left of the group, within the same row of the group, or within a preceding row of the group, except in the first row of the group. In the first row of the group, each causally related adjacent group within a group corresponds to a sample location found immediately to the left of the group. Adjacent groups not included within the block are interpreted as non-significant. The significance of all samples within a group is encoded together based on the contextual label formed from the significance of the causally related adjacent groups within the group. Encoding of significance patterns involves the use of a variable-length code, referred to as a CxtVLC code dependent on the context label, The coding of unsigned residuals includes a variable-length code, which is referred to as a U-VLC code. A method in which an unsigned residual offset value is encoded together with the significance pattern of the group using a CxtVLC code, the unsigned residual offset value indicates whether the unsigned residual is non-zero or not, and the U-VLC code is used only to encode non-zero unsigned residuals.
2. The method according to claim 1, wherein the MEL bit stream is formed by an adaptive run-length coding process applied to a sequence of group significance symbols associated with AZC groups.
3. The method according to claim 1, wherein the codeword of the U-VLC code consists of a prefix and a suffix component, and the length of the suffix is entirely determined by the value of the prefix.
4. The method according to claim 1, wherein the CxtVLC code is augmented to identify size bits of several significant samples whose unsigned residual offset values associated with a codeword are non-zero, and the size bits are not included in the MagSgn bit stream.
5. The method according to claim 1, wherein the exponential predictor is formed using sample values from preceding rows of a group, except within the first row of a group of blocks, in which case the MEL bit stream is augmented with one additional common unsigned residual offset value of the set of groups, the preferred size of the set is two consecutive groups, and the unsigned residuals of all groups in the set are adjusted based on the common additional unsigned residual offset value before applying the U-VLC code to the adjusted unsigned residuals of the groups, only if all the unsigned residual offset values encoded together with the significance pattern of the groups are non-zero.
6. The method according to claim 1, wherein the group has a size of 2 × 2, and includes the sample from pairs of consecutive columns in pairs of consecutive rows within the block.
7. The method according to claim 6, wherein the exponential predictor for a sample in a group that is in a row other than the first row of the group in the block is formed from the maximum value of the magnitude indices of four samples adjacent to the group, found on the row of the sample directly above the group.
8. The method according to claim 1, wherein the exponential predictor for a significant sample within a group is forced to be 1 if it is the only significant sample within the group.
9. The method according to claim 1, wherein the MEL bit stream, the VLC bit stream, and the MagSgn bit stream each undergo a bit stuffing procedure and are packed into bytes to form a MEL byte stream, a VLC byte stream, and a MagSgn byte stream, respectively, the VLC byte stream growing backward from the end of a single byte sequence representing a block, while the MagSgn byte stream growing forward from the beginning of the byte sequence, and the MEL byte stream growing forward from the end of the MagSgn byte stream, so that only the boundary between the MagSgn byte stream and the MEL byte stream needs to be explicitly provided along with the byte sequence.
10. The method according to claim 1, wherein an additional coding pass, referred to as a SigProp pass, is used to encode the magnitude of a particular sample that is insignificant in precision with respect to the first size bit plane, relative to the next finer size bit plane, and also to encode the sign bits of all such samples that are significant with respect to the finer size bit plane, and the SigProp bit stream emits all relevant size bits from a defined set of stripe rows to a SigProp bit stream, and then emits the sign bits of the samples in the set of stripe rows that are identified as significant based on the emitted size bits.
11. The method according to claim 1, wherein an additional coding pass, referred to as a MagRef pass, is used to encode the least significant size bit of a sample encoded as significant in precision associated with the first size bit plane, for the next finer size bit plane, and emits all relevant size bits into a MagRef bit stream according to a stripe orientation scan through the block sample.
12. A method for decoding a block of subband samples that generates a still image, video frame, or related media, wherein the samples are organized into a defined group and represented using three bitstreams, a. The first bitstream, referred to as the MEL bitstream, is decoded to find the significance of the entire group where all causally related neighboring groups are non-significant, samples with a non-zero magnitude are identified as significant, and samples with a zero magnitude are identified as non-significant. These groups are referred to as the all-zero-context (AZC) group. b. The second bitstream, referred to as the VLC bitstream, is decoded to discover the significance of individual samples within each group, which are either significant AZC groups or not significant AZC groups. c. The decoding of the second bitstream is also used, when added to the set of exponential predictors, to discover the unsigned residual values of each significant group, which give an upper limit to the size exponent of each significant sample within the group. d. The third bit stream, referred to as the MagSgn bit stream, is unpacked to discover the sign bits and any additional size bits used to estimate the value of each significant sample, given an upper limit of the corresponding size index. e. The exponential predictor is calculated using the size of the preceding sample within the block, except when the preceding sample within the block is outside the block, by a method, Each causally related adjacent group within a group corresponds to a sample location adjacent to the group, found either to the left of the group, within the same row of the group, or within a preceding row of the group, except in the first row of the group. In the first row of the group, each causally related adjacent group within a group corresponds to a sample location found immediately to the left of the group. Adjacent groups not included within the block are interpreted as non-significant. The significance of all samples within a group is encoded together based on the contextual label formed from the significance of the causally related adjacent groups within the group. Decoding the significance pattern involves the use of a variable-length code, referred to as a CxtVLC code dependent on the context label, Decoding of the unsigned residual involves a variable-length code referred to as a U-VLC code. A method in which an unsigned residual offset value is encoded together with the significance pattern of the group using a CxtVLC code, the unsigned residual offset value indicates whether the unsigned residual is non-zero or not, and the U-VLC code is used only to encode non-zero unsigned residuals.
13. The method according to claim 12, wherein the significance of all samples within a group (the significance pattern of the group) is decoded together using context labels formed from the significance of causally related adjacent groups of the group, the decoding of unsigned residuals includes decoding a variable-length code referred to as a U-VLC code, the decoding of significance patterns includes decoding a context-label-dependent variable-length code referred to as a CxtVLC code, an unsigned residual offset value is decoded together with the significance pattern of the group in the process of decoding the CxtVLC code, the unsigned residual offset value indicates whether the unsigned residual is non-zero, the decoding of the U-VLC codeword of the group is performed only if the unsigned residual offset value is non-zero, and following the performance, the decoding result of the U-VLC is added to the unsigned residual offset value.
14. The method according to claim 13, wherein in the process of decoding some CxtVLC codes whose decoded unsigned residual offset values are non-zero, additional size bits are decoded for some significance coefficients together with the significance pattern and the unsigned residual offset values, and the additional size bits are combined with bits from the MagSgn bit stream to reconstruct the associated sample values.
15. a. An adaptive run-length decoding process is used to decode the MEL bit stream and generate a sequence of group significance symbols that identify the significance of each AZC group. b. The causally related adjacent groups of a group correspond to sample positions adjacent to the group, found either to the left of the group, within the same row of the group, or in preceding rows of the group, except for the first row of the group, and the significance of those samples has already been decoded; in the first row of the group, the causally related adjacent groups of a group correspond to sample positions found immediately to the left within the group, and the significance of those samples has already been decoded; adjacent groups not included in the block are interpreted as non-significant. c. The significance of all samples within a group, known as the significance pattern of the group, is decoded together using a context label formed from the significance of causally related adjacent groups of the group. d. Decoding of significance patterns involves decoding a variable-length code known as a CxtVLC code, which is dependent on the context label. e. Decoding of unsigned residuals involves decoding of variable-length codes known as U-VLC codes. f. The unsigned residual offset value is decoded along with the significance pattern of the group in the process of decoding the context-dependent variable-length code (CxtVLC code), the unsigned residual offset value indicates whether the unsigned residual is non-zero, the decoding of the U-VLC codeword of the group is performed only if the unsigned residual offset value is non-zero, and following the execution, the decoding result of the U-VLC is added to the unsigned residual offset value. g. In the process of decoding several CxtVLC codewords whose decoded unsigned residual offset values are non-zero, additional size bits are decoded for several significance coefficients along with the significance pattern and the unsigned residual offset values, and the additional size bits are combined with bits from the MagSgn bit stream to reconstruct the associated sample values. h. The exponential predictor is formed using sample values from preceding rows of a group, except for the first row of the group in the block, the sample values have been previously decoded, and for the first row of the group, the augmented MEL symbol stream provides a common additional unsigned residual offset value for the set of groups, the preferred size of the set is two consecutive groups, and the unsigned residuals of all groups in the set are adjusted based on the common additional unsigned residual offset value after decoding the U-VLC code of the group, only if all the unsigned residual offset values decoded together with the significance pattern of the group are non-zero. i. The method according to claim 12, wherein the exponential predictor for a significant sample within a group is forced to be 1 if it is the only significant sample within the group.
16. The method according to claim 15, wherein the group has a size of 2 x 2 and consists of the samples from pairs of consecutive columns in pairs of consecutive rows in the block, and the exponential predictor of the samples in the group that are in rows of the group that are not the first row of the block is formed from the maximum value of the magnitude index at four adjacent positions to the group that are found on the row of the sample directly above the group, the magnitude index is calculated from the previously decoded sample values at the four positions.
17. A non-temporary computer-readable storage medium that, when executed by one or more processors, stores software instructions causing the one or more processors to perform an operation relating to the division of samples from a block into a defined number of groups, the operation for encoding a block of subband sample values derived from a still image, video frame, or related media, wherein the operation is: a. A first bitstream that encodes the significance of an entire group, referred to as an All Zero Context (AZC) group, where all causally related neighboring groups are non-significant, and samples with a non-zero magnitude are identified as significant, and samples with a zero magnitude are identified as non-significant, where an AZC group is significant if it contains one or more significant samples, and b. A second bitstream that encodes the significance of individual samples within each group, which is either a significant AZC group or not a significant AZC group, c. The second bitstream, when added to the set of exponential predictors, encodes the unsigned residual values of each significant group, giving an upper limit to the size exponent of each significant sample within the group. The third bitstream provides a sign bit and any additional size bits used to indicate a significant sample value, given an upper limit on the corresponding size index. The exponential predictor is a non-temporary computer-readable storage medium that is calculated using the size of the preceding sample within the block, except when the preceding sample within the block is outside the block. Each causally related adjacent group within a group corresponds to a sample location adjacent to the group, found either to the left of the group, within the same row of the group, or within a preceding row of the group, except in the first row of the group. In the first row of the group, each causally related adjacent group within a group corresponds to a sample location found immediately to the left of the group. Adjacent groups not included within the block are interpreted as non-significant. The significance of all samples within a group is encoded together based on the contextual label formed from the significance of the causally related adjacent groups within the group. Encoding of significance patterns involves the use of a variable-length code, referred to as a CxtVLC code dependent on the context label, The coding of unsigned residuals includes a variable-length code, which is referred to as a U-VLC code. A non-temporary computer-readable storage medium in which an unsigned residual offset value is encoded together with the significance pattern of the group using a CxtVLC code, the unsigned residual offset value indicates whether the unsigned residual is non-zero or not, and the U-VLC code is used only to encode non-zero unsigned residuals.
Citation Information
Patent Citations
A method and apparatus for image compression
WO2017201574A1