Improved entropy bypass code processing
By maintaining the offset and range in the arithmetic code processor, using the midpoint comparison and update mechanism, combined with normalization processing, the problems of high computational complexity and asymmetric probability of the existing technology are solved, and efficient and accurate code processing effects are achieved.
Patent Information
- Application Number
- CN202380075522.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-10-25
- Filing Date
- 2023-10-24
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art when coding the peer-probability symbols is coded, the calculation complexity is high, making it difficult to effectively code multiple symbols in the hardware period, and may also reduce the asymmetric probability and normalization accuracy.
By maintaining offsets and ranges, using the midpoint comparison and update mechanism, combined with normalization processing, efficient decoding and encoding of peer probability symbols is achieved. This method avoids CDF scaling and complex normalization in traditional techniques, and improves the symmetry of computing efficiency and probability.
It improves the throughput and accuracy of the arithmetic code processor, can decode multiple equal probability symbols within hardware cycles, and maintain high-precision normalization while reducing the computational complexity.
Smart Images

Figure CN120113243A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to and the benefit of U.S. Provisional Patent Application Serial No. 63 / 419,164, filed on October 25, 2022, the entire disclosure of which is incorporated herein by reference. Background Art
[0003] A digital video stream can represent a video using a sequence of frames or still images. Digital video can be used for a variety of applications, including, for example, video conferencing, high-definition video entertainment, video advertising, or sharing of user-generated videos. A digital video stream can contain a large amount of data and consume a considerable amount of computing or communication resources of a computing device for processing, sending, or storing video data. Various methods have been proposed to reduce the amount of data in a video stream, including compression and other coding techniques.
[0004] Coding based on motion estimation and compensation can be performed by decomposing a frame or image into blocks that are predicted based on one or more prediction blocks of a reference frame. The difference between the block and the predicted block (i.e., the residual error) is compressed and encoded in the bitstream. The decoder uses this difference and the reference frame to reconstruct the frame or image. Summary of the invention
[0005] In one general aspect, a method may include receiving a request to decode a plurality of bins from a compressed bitstream, wherein each bin in the bins is equally probable, and wherein an arithmetic decoder maintains an offset and a range. The method may also include establishing a decoding range based on the range. The method may further include decoding a binary value of the bin by: for each bin in the bins, performing the following steps: comparing the offset to a midpoint of a decoding range to determine a binary value of each bin, wherein the binary value is decoded from the compressed bitstream; conditionally updating the midpoint based on the comparison; and halving the midpoint so that an equal probability is maintained for the next bin after decoding each bin. The method may further include providing a binary value of the bin. Other embodiments of this aspect include corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the method.
[0006] Another general aspect is a method for encoding a binary value. The method includes: initializing an offset and a decoding range; receiving a binary value and a specified number of bits within which the binary value is to be encoded, wherein the specified number of bits is limited to a predetermined maximum value; based on the binary value and the specified number of bits, adjusting the offset by performing a left shift operation on the offset and then adding a product of the decoding range and the binary value to obtain an adjusted offset; and outputting bits in a compressed bit stream based on the adjusted offset.
[0007] Another general aspect is a method for bypassing code processing, the method comprising receiving a number of bits to be code processed; calculating a midpoint value of a range to obtain a cumulative distribution function; conditionally subtracting the midpoint from an offset; and normalizing at least one of the range or the offset.
[0008] These and other aspects of the present disclosure are disclosed in the following detailed description of the embodiments, the attached claims and the accompanying drawings. It should be understood that the various aspects can be implemented in any convenient form. For example, the various aspects can be implemented by a suitable computer program that can be carried on a suitable carrier medium, which can be a tangible carrier medium (e.g., a disk) or an intangible carrier medium (e.g., a communication signal). The various aspects can also be implemented using a suitable device, which can take the form of a programmable computer running a computer program arranged to implement the methods and / or techniques disclosed herein. The various aspects can be combined so that the features described in the context of one aspect can be implemented in another aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The description herein refers to the drawings described below, wherein like reference numerals refer to like parts throughout the several views.
[0010] Figure 1 It is a schematic diagram of a video encoding and decoding system.
[0011] Figure 2 is a block diagram of an example of a computing device that may implement a transmitting station or a receiving station.
[0012] Figure 3 is a diagram of a video stream to be encoded and subsequently decoded.
[0013] Figure 4 is a block diagram of an encoder according to an implementation of the present disclosure.
[0014] Figure 5 is a block diagram of a decoder according to an implementation of the present disclosure.
[0015] Figure 6 is a flow chart of a technique for bypassing code processing of equal probability symbols.
[0016] Fig. 7A is a diagram of decoding bypass symbols according to an implementation of the present disclosure.
[0017] Figure 7B is a diagram of encoding a single-bit bypass symbol according to an implementation of the present disclosure.
[0018] Figure 7C is a diagram of encoding a multi-bit bypass symbol according to an implementation of the present disclosure.
[0019] Figure 8 is a flow chart of a technique for bypass decoding of equally probable symbols.
[0020] Fig. 9 is a flow chart of a technique for bypass encoding of equally probable symbols.
[0021] Fig. 10A Conventional techniques for encoding bypass symbols in a compressed bitstream are illustrated.
[0022] Fig. 10B Conventional techniques for decoding bypass symbols from a compressed bitstream are illustrated. DETAILED DESCRIPTION
[0023] In the coded video bitstream, many of the bits are used for one of two things: content prediction (e.g., inter-mode / motion vector coding, intra-prediction mode coding, etc.) or residual coding (e.g., transform coefficients). For example, bits may be used to code symbols (also called syntax elements) corresponding to prediction mode information and parameters and transform coefficients. Symbols may be losslessly coded using entry coding (e.g., an arithmetic code processor (AC)).
[0024] Entropy coding is a technique for losslessly coding symbols that relies on a probability model that models the distribution of values that appear in the encoded video bitstream. By using a probability model based on a measured or estimated distribution of values, entropy coding can reduce the number of bits required to represent video data to close to a theoretical minimum. In practice, the actual reduction in the number of bits required to represent video data can be a function of the accuracy of the probability model, the number of bits over which the coding is performed, and the computational accuracy of the fixed point arithmetic used to perform the coding.
[0025] For some symbols, AC can obtain (e.g., use or select) a probability distribution based on or using a model. A model can be any parameter or method that affects the probability estimate for entropy code processing purposes. In an example, a two-pass process can be used to understand the probability of the current frame. In another example, the model can define a certain context derivation method.
[0026] Other symbols may be coded using so-called bypass coding. Bypass coding refers to the process of arithmetic coding without using an adaptive model. Bypass coding can be used for equally probable symbols (also called bypassed symbols), where each of the possible values of the symbol has the same probability of occurrence. Thus, for a binary symbol or a bin of a symbol, a probability of 0.5 may be assumed for the two symbol values (0 and 1). This equality of probabilities eliminates the complex probability estimates that are typically required in an adaptive model, thereby simplifying the encoding process and reducing computational requirements.
[0027] Bitstream parsing is often the bottleneck when decoding or encoding a compressed video stream.For illustration, a hardware-implemented codec may be limited to code processing (encoding or decoding) 1 or 2 symbols per cycle. FIG. 10A to FIG. 10B Conventional techniques for encoding and decoding bypass symbols, respectively, are illustrated.
[0028] Fig. 10A A conventional technique 1000 for encoding bypass symbols in a compressed bitstream is illustrated. A bypass symbol may include multiple bits (e.g., may be composed of multiple bits). Bypass encoding utilizes a cumulative distribution function (CDF). A CDF represents the probability that a random variable is less than or equal to a certain value. In the context of bypass encoding, the CDF is typically uniform because it processes equally probable symbols, meaning that it assumes a consistent probability distribution for all potential outcomes or symbol values. The CDF allows for the calculation of intervals within which symbol values reside, thereby guiding the encoding and subsequent decoding of these symbols in a compressed bitstream.
[0029] Scaling the CDF is a key part of conventional technique 1000. Scaling involves adjusting the range of the CDF to ensure that it accurately represents the probabilities of various symbols within the specific context of the data being encoded or decoded. For example, by repeatedly scaling the CDF, an arithmetic code processor can maintain accuracy and ensure that each symbol is assigned a proportional range on a probability scale that is directly related to its likelihood of occurrence.
[0030] CDF scaling function 1006 receives range 1002 and CDF 1004 of current entropy "range" value. CDF 1004 can be initialized to a fixed CDF {32768, 16384, 0} (such as before any scaling operation). As the bit encoding progresses, CDF scaling function 1006 dynamically adjusts the CDF to align with the current entropy range value, i.e., range 1002. Range 1002 helps maintain an accurate representation of the current interval width for encoding the current bit. The range is essentially used as a dynamic threshold that is adjusted based on the data being processed. Range 1002 is typically represented as a single number that represents (e.g., indicates) an upper limit on the possible values that a symbol may statistically take.
[0031] The CDF scaling function 1006 outputs a scaled CDF 1008. The scaled CDF 1008 may be given by {range, midpoint, 0}, where the midpoint value is calculated as: midpoint = od_ec_prob_scale (16384, range, 1), and where, in an example implementation, the function may be given by the code of Table I, where EC_PROB_SHIFT is the number of bits used to reduce the precision of the CDF during arithmetic code processing, and EC_MIN_PROB is the minimum probability assigned to each symbol during arithmetic code processing. In an example, EC_PROB_SHIFT may be set to 6, and EC_MIN_PROB may be set to 4.
[0032]
[0033] The scaled CDF 1008, the offset 1010, and the current bit 1012 of the bypass symbol are input to a selector / adder function 1014, which updates the entropy value corresponding to the current bit 1012. The selector / adder function 1014 compares the offset 1010 with the midpoint value of the given bit value to be encoded (i.e., the current bit 1012). The midpoint is conditionally subtracted from the offset, and the range 1002 is set to (range-midpoint) or (midpoint-0). The offset 1010 points to (e.g., indicates) the current bit position within the range 1002. The normalization function 1016 outputs a normalized offset 1018 and a normalized range 1020, which are then used as the offset 1010 and the range 1020, respectively. If the range is below 32768, the normalization function 1066 performs a renormalization by right-shifting the range 1002 by one (1) to obtain the normalized range 1020 and updating the offset. The technique 1000 then returns to the CDF scaling function 1006 to process multiple symbols.
[0034] Fig. 10B A conventional technique 1050 for decoding bypass symbols from a compressed bitstream is illustrated. A bypass symbol may include a plurality of bits (e.g., may be composed of a plurality of bits). A CDF scaling function 1056 receives a range 1052 of bypass symbols to be decoded and a bypass CDF 1054. As described above, the range is used to track the width of the current interval; and the bypass CDF 1054 may be a fixed CDF {32768, 16384, 0}. The CDF scaling function 1056 outputs a scaled CDF 1058. The scaled CDF 1058 may be {range, midpoint, 0}, where the midpoint value is calculated as described above.
[0035] The scaled CDF 1058 and offset 1060 are input to a comparator / subtractor function 1062, which outputs (e.g., obtains) a bit 1064 of the bypass symbol based on the current entropy value. The comparator / subtractor function 1062 compares the offset 1060 to the midpoint value, the result of which determines the decoded bit value. The midpoint is conditionally subtracted from the offset, and the range is set to (range-midpoint) or (midpoint-0).
[0036] Normalization function 1066 outputs a normalized offset 1068 and a normalized range 1070, which are then used as offset 1060 and range 1052, respectively. If the range is below 32768, normalization function 1066 performs a renormalization by right-shifting range 1052 by one (1) and updating the offset. Technique 1050 then returns to CDF scaling function 1056 to process multiple symbols.
[0037] These conventional bypass code processing methods are suboptimal. Due to the amount of computation (including scaling and complex range normalization), it may not be possible to code process no more than 2 symbols within a hardware cycle. In addition, the scaling function may result in asymmetric probabilities. For illustration, after scaling, the probabilities may become 49.9% and 50.1% (instead of remaining at 50%), which may have an impact on whether less than 1 bit or more than 1 bit is coded (e.g., consumed from or written to the bit stream).
[0038] According to the implementation of the present disclosure, the throughput and accuracy of an arithmetic code processor for code processing of equal probability symbols can be improved. For example, using an arithmetic code processor according to the present disclosure, eight or more equal probability symbols can be decoded per hardware cycle. In addition, it is also possible to normalize the range (and / or offset) while reducing the computational complexity, while improving the accuracy of the normalization (for example, the probability remains at 50%). To reiterate, the entropy bypass code processing as described herein avoids scaling of the CDF; avoids complex normalization; and prevents asymmetric CDF caused by scaling. In addition, the decoding process can look ahead to a certain number of bypass symbols in the compressed bitstream without advancing the bitstream. In addition, compared with the traditional entropy bypass code processing method, the entropy bypass code processing as described herein has no effect on the code processing efficiency. In an example, bypass decoding may include the following steps: receiving the number of bits to be processed, calculating the midpoint value of the range to obtain a cumulative distribution function, conditionally subtracting the midpoint from the offset, and normalizing at least one of the range or the offset.
[0039] Further details of the techniques are described herein initially with reference to systems in which the techniques for entropy bypass code processing may be implemented. Figure 1 1 is a schematic diagram of a video encoding and decoding system 100. The transmitting station 102 may be, for example, Figure 2 The computer with internal hardware configuration is described. However, other suitable implementations of the sending station 102 are possible. For example, the processing of the sending station 102 can be distributed among multiple devices.
[0040] The network 104 can connect the sending station 102 and the receiving station 106 to encode and decode the video stream. Specifically, the video stream can be encoded in the sending station 102, and the encoded video stream can be decoded in the receiving station 106. The network 104 can be, for example, the Internet. The network 104 can also be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a cellular phone network, or any other tool that transfers the video stream from the sending station 102 to the receiving station 106 (in this example).
[0041] In one example, receiving station 106 may be a Figure 2 1. A computer with an internal hardware configuration is described. However, other suitable implementations of receiving station 106 are possible. For example, the processing of receiving station 106 may be distributed among multiple devices.
[0042] Other implementations of the video encoding and decoding system 100 are possible. For example, one implementation may omit the network 104. In another implementation, the video stream may be encoded and then stored for transmission to a receiving station 106 or any other device with memory at a later time. In one implementation, the receiving station 106 receives (e.g., via the network 104, a computer bus, and / or some communication pathway) the encoded video stream and stores the video stream for later decoding. In an example implementation, the Real-time Transport Protocol (RTP) is used to send the encoded video over the network 104. In another implementation, a transport protocol other than RTP may be used, such as a video streaming protocol based on the Hypertext Transfer Protocol (HTTP-based).
[0043] When used in a video conferencing system, for example, the sending station 102 and / or the receiving station 106 may include the ability to both encode and decode video streams as described below. For example, the receiving station 106 may be a video conference participant that receives an encoded video bitstream from a video conference server (e.g., the sending station 102) for decoding and viewing, and further encodes his or her own video bitstream and sends it to the video conference server for decoding and viewing by other participants.
[0044] Figure 2 is a block diagram of an example of a computing device 200 that can implement a transmitting station or a receiving station. For example, the computing device 200 can implement Figure 1The computing device 200 may be in the form of a computing system including multiple computing devices, or in the form of a computing device (e.g., a mobile phone, a tablet computer, a laptop computer, a notebook computer, a desktop computer, etc.).
[0045] The CPU 202 in the computing device 200 may be a conventional central processing unit. Alternatively, the CPU 202 may be any other type of device or devices now known or later developed that are capable of manipulating or processing information. Although the disclosed implementations may be practiced with one processor (e.g., CPU 202) as shown, advantages in speed and efficiency may be achieved by using more than one processor.
[0046] In an implementation, the memory 204 in the computing device 200 may be a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may be used as the memory 204. The memory 204 may include code and data 206 accessed by the CPU 202 using the bus 212. The memory 204 may further include an operating system 208 and an application 210, which includes at least one program that permits the CPU 202 to perform the method described herein. For example, the application 210 may include applications 1 to N, which further include a video code processing application that performs the techniques described herein, such as techniques for bypassing code processing of symbols. The computing device 200 may also include an auxiliary storage 214, which may be, for example, a memory card used with a mobile computing device. Because a video communication session may contain a significant amount of information, they may be stored in whole or in part in the auxiliary storage 214 and loaded into the memory 204 as needed for processing.
[0047] The computing device 200 may also include one or more output devices, such as a display 218. In one example, the display 218 may be a touch-sensitive display that combines a display with a touch-sensitive element operable to sense touch input. The display 218 may be coupled to the CPU 202 via the bus 212. In addition to or in lieu of the display 218, other output devices may be provided that permit a user to program or otherwise use the computing device 200. When the output device is or includes a display, the display may be implemented in various ways, including by a liquid crystal display (LCD), a cathode ray tube (CRT) display, or a light emitting diode (LED) display, such as an organic LED (OLED) display.
[0048] The computing device 200 may also include or be in communication with an image sensing device 220, such as a camera or any other image sensing device 220 now existing or later developed that can sense an image, such as an image of a user operating the computing device 200. The image sensing device 220 may be positioned so that it is pointed toward the user operating the computing device 200. In an example, the position and optical axis of the image sensing device 220 may be configured so that the field of view includes an area directly adjacent to the display 218 and from which the display 218 is visible.
[0049] The computing device 200 may also include or communicate with a sound sensing device 222, such as a microphone or any other sound sensing device now existing or later developed that can sense sounds near the computing device 200. The sound sensing device 222 may be positioned so that it is directed toward a user operating the computing device 200, and may be configured to receive sounds, such as voice or other utterances, uttered by the user while the user is operating the computing device 200.
[0050] although Figure 2 The CPU 202 and memory 204 of the computing device 200 are depicted as being integrated into one unit, but other configurations may be utilized. The operation of the CPU 202 may be distributed across multiple machines (where each machine may have one or more processors), which may be directly coupled or coupled across a local area network or other network. The memory 204 may be distributed across multiple machines, such as across a network-based memory or memory distribution in multiple machines that perform the operations of the computing device 200. Although depicted here as one bus, the bus 212 of the computing device 200 may be composed of multiple buses. Further, the auxiliary storage 214 may be directly coupled to other components of the computing device 200 or may be accessed via a network, and may include an integrated unit (such as a memory card) or multiple units (such as multiple memory cards). Therefore, the computing device 200 may be implemented in a wide variety of configurations.
[0051] Figure 3300 is an illustration of an example of a video stream 300 to be encoded and subsequently decoded. Video stream 300 includes a video sequence 302. At the next level, video sequence 302 includes several adjacent frames 304. Although three frames are depicted as adjacent frames 304, video sequence 302 may include any number of adjacent frames 304. Adjacent frames 304 may then be further subdivided into individual frames, e.g., frame 306. At the next level, frame 306 may be divided into a series of planes or fragments 308. For example, fragment 308 may be a subset of a frame that permits parallel processing. Fragment 308 may also be a subset of a frame that may separate video data into separate colors. For example, a frame 306 of color video data may include a luminance plane and two chrominance planes. Fragment 308 may be sampled at different resolutions.
[0052] Regardless of whether the frame 306 is divided into segments 308, the frame 306 can be further subdivided into blocks 310, which can contain data corresponding to, for example, 16×16 pixels in the frame 306. The blocks 310 can also be arranged to include data from one or more segments 308 of pixel data. The blocks 310 can also be any other suitable size, such as 4×4 pixels, 8×8 pixels, 16×8 pixels, 8×16 pixels, 16×16 pixels, or larger. Unless otherwise specified, the terms block and macroblock are used interchangeably herein.
[0053] Figure 4 4 is a block diagram of an encoder 400 according to an implementation of the present disclosure. As described above, the encoder 400 may be implemented in the sending station 102, such as by providing a computer software program stored in a memory (e.g., the memory 204). The computer software program may include machine instructions that, when executed by a processor such as the CPU 202, cause the sending station 102 to generate a signal. Figure 4 The video data is encoded in the manner described. The encoder 400 may also be implemented as dedicated hardware included in, for example, the transmission station 102. In a particularly desirable implementation, the encoder 400 is a hardware encoder.
[0054] The encoder 400 has the following stages for performing various functions in a forward path (shown by solid connecting lines) to produce an encoded or compressed bitstream 420 using the video stream 300 as input: an intra / inter prediction stage 402, a transform stage 404, a quantization stage 406, and an entropy encoding stage 408. The encoder 400 may also include a reconstruction path (shown by dashed connecting lines) for reconstructing frames for encoding of future blocks. Figure 4In FIG. 4 , the encoder 400 has the following stages for performing various functions in the reconstruction path: a dequantization stage 410, an inverse transform stage 412, a reconstruction stage 414, and a loop filter stage 416. Other structural variations of the encoder 400 may be used to encode the video stream 300.
[0055] When the video stream 300 is presented for encoding, the corresponding adjacent frames 304, such as frame 306, can be processed in units of blocks. At the intra / inter prediction stage 402, the corresponding blocks can be encoded using intra-frame prediction (also known as intra-prediction) or inter-frame prediction (also known as inter-prediction). In any case, a prediction block can be formed. In the case of intra-frame prediction, the prediction block can be formed by samples in the current frame that have been previously encoded and reconstructed. In the case of inter-frame prediction, the prediction block can be formed by samples in one or more previously constructed reference frames. The following is about Figure 6 , Figure 7 and Figure 8 Implementations of forming a prediction block, for example, using a parameterized motion model identified for encoding a current block of a video frame are discussed.
[0056] Next, refer to Figure 4 , the prediction block can be subtracted from the current block at the intra / inter prediction stage 402 to produce a residual block (also referred to as a residual). The transform stage 404 uses a block-based transform to transform the residual into, for example, transform coefficients in the frequency domain. The quantization stage 406 uses a quantizer value or quantization level to convert the transform coefficients into discrete quantum values, which are referred to as quantized transform coefficients. For example, the transform coefficients can be divided by the quantizer value and truncated. The quantized transform coefficients are then entropy encoded by the entropy encoding stage 408. The entropy encoded coefficients are then output to a compressed bit stream 420 along with other information used to decode the block (the other information may include, for example, the prediction type used, the transform type, the motion vector, and the quantizer value). Various techniques, such as variable length code processing (VLC) or arithmetic code processing, can be used to format the compressed bit stream 420. The compressed bit stream 420 may also be referred to as an encoded video stream or an encoded video bit stream, and the terms will be used interchangeably herein.
[0057] Figure 4The reconstruction path in (shown by the dashed connecting line) can be used to ensure that the encoder 400 and the decoder 500 (described below) use the same reference frame to decode the compressed bitstream 420. The reconstruction path performs functions similar to those that occur during the decoding process (described below), including dequantizing the quantized transform coefficients at the dequantization stage 410 and inverse transforming the dequantized transform coefficients at the inverse transform stage 412 to produce a derivative residual block (also referred to as a derivative residual). At the reconstruction stage 414, the prediction block predicted at the intra / inter prediction stage 402 can be added to the derivative residual to create a reconstructed block. A loop filtering stage 416 can be applied to the reconstructed block to reduce distortion, such as blocking artifacts.
[0058] Other variations of the encoder 400 may be used to encode the compressed bitstream 420. For example, for certain blocks or frames, a non-transform based encoder may directly quantize the residual signal without the transform stage 404. In another implementation, the encoder may have the quantization stage 406 and the dequantization stage 410 combined in a common stage.
[0059] Figure 5 2 is a block diagram of a decoder 500 according to an implementation of the present disclosure. The decoder 500 may be implemented in the receiving station 106, for example, by providing a computer software program stored in the memory 204. The computer software program may include machine instructions that, when executed by a processor such as the CPU 202, cause the receiving station 106 to receive the received data in a manner that is consistent with the present disclosure. Figure 5 The decoder 500 may also be implemented in hardware included in the transmitting station 102 or the receiving station 106, for example.
[0060] Similar to the reconstruction path of the encoder 400 discussed above, in one example, the decoder 500 includes the following stages for performing various functions to produce an output video stream 516 from the compressed bitstream 420: an entropy decoding stage 502, a dequantization stage 504, an inverse transform stage 506, an intra / inter prediction stage 508, a reconstruction stage 510, a loop filtering stage 512, and a post-filtering stage 514. Other structural variations of the decoder 500 may be used to decode the compressed bitstream 420.
[0061] When the compressed bitstream 420 is presented for decoding, the data elements within the compressed bitstream 420 may be decoded by the entropy decoding stage 502 to produce a set of quantized transform coefficients. The dequantization stage 504 dequantizes the quantized transform coefficients (e.g., by multiplying the quantized transform coefficients by a quantizer value), and the inverse transform stage 506 inversely transforms the dequantized transform coefficients to produce a derivative residual, which may be the same as the derivative residual created by the inverse transform stage 412 in the encoder 400. Using the header information decoded from the compressed bitstream 420, the decoder 500 may use the intra / inter prediction stage 508 to create a prediction block that is the same as the prediction block created in the encoder 400 (e.g., at the intra / inter prediction stage 402). At the reconstruction stage 510, the prediction block may be added to the derivative residual to create a reconstructed block. A loop filtering stage 512 may be applied to the reconstructed block to reduce blocking artifacts.
[0062] Other filtering can be applied to the reconstructed blocks. In this example, the post-filtering stage 514 is applied to the reconstructed blocks to reduce blocking distortion or perform other post-processing on the frame, and the result is output as an output video stream 516. The output video stream 516 can also be referred to as a decoded video stream, and the term will be used interchangeably herein. Other variations of the decoder 500 can be used to decode the compressed bit stream 420. For example, the decoder 500 can generate an output video stream 516 without the post-filtering stage 514 or by omitting filtering in the post-filtering state 514.
[0063] Figure 6 6 is a flow chart of a technique 600 for bypassing codes for equal probability symbols. The technique 600 may be used in a system such as Figure 5 The technique 600 may be implemented, for example, by a decoder such as Figure 1 The software program may include machine-readable instructions (e.g., executable instructions) that may be stored in a memory such as memory 204 or secondary storage 214 and executed by a processor such as CPU 202 to cause the computing device to perform the technique 600. In at least some implementations, the technique 600 may be performed in whole or in part by a computing device of the sending station 102 or the receiving station 106. Figure 5 The entropy decoding stage 502 of the decoder 500 is performed.
[0064] Technique 600 may be implemented using dedicated hardware or firmware. Some computing devices may have multiple memories, multiple processors, or both. The steps or operations of technique 600 may be distributed using different processors, memories, or both. Use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory as well as devices having multiple processors or multiple memories that may be used to perform some or all of the enumerated steps.
[0065] As is well known, (binary) arithmetic code processing is characterized by recursive interval partitioning of a probability model. AC can maintain two values: range and offset. The range register can be used to keep track of the width of the current interval; and the offset can be used to indicate the current position within the range.
[0066] At 602, a number of bits N to be decoded is received. Technique 600 may determine N based on a known maximum value of the value to be decoded.
[0067] At 604, the midpoint value is calculated as the midpoint within the current range. Thus, the midpoint may be calculated as range / 2. This in turn produces the CDF {range, range / 2, 0}. At 606, the midpoint value is conditionally subtracted from the offset. That is, the offset is compared to the midpoint value, and if the offset is greater than or equal to the midpoint value, the offset may be set to: offset = offset - midpoint value; and if the offset is less than the midpoint value, the offset is unchanged. At 608, at least one of the range or the offset may be normalized. Then, the technique 600 returns to step 604 to process multiple (e.g., additional) symbols.
[0068] In some implementations, the technique 600 requires that the range is always a multiple of 2. Therefore, for non-bypassed symbols, the least significant bit (LSB) of the range can be set to 0 after scaling, as shown in the pseudo code of Table II. Setting the LSB to zero can be achieved via the operation "&~1", which represents a bitwise AND operation with the bitwise negation of 1, thereby rounding the range value down to the nearest even number.
[0069]
[0070] Table III illustrates the function od_ec_decode_literal_bypass(), which further elaborates on the technique 600 for decoding an n_bits literal. It should be noted that the disclosure herein is not limited to or by the specific implementation shown in Table III, and other implementations are possible. The function od_ec_decode_literal_bypass() in Table III receives as input a value n_bits indicating the number of bits required to represent the literal. In the example, n_bits can be a value in the range [1,15]. The function od_ec_decode_literal_bypass() returns the value to be decoded, which is in the range [0,2 n_bits-1 The value to be decoded is accumulated in the variable ret.
[0071] In Table III, variables vw (e.g., decoded range) and dif are scaled versions of the range and offset of technique 600, respectively; and dec is a data structure that holds the state of the entropy decoder. The state of the entropy decoder may include the current range and offset (i.e., the initial range and offset, or the range and offset immediately following the last consumed bit in the bitstream). At lines 7 and 8, variables dif and r are initialized with corresponding values in decoder state dec (e.g., copied from corresponding values in decoder state dec).
[0072]
[0073] Although the function od_ec_decode_literal_bypass() adjusts the variable dif, the range value r (which is equal to dec->rng) remains unchanged after the function. The vw variable is used to determine the threshold between '0' and '1'. If dif is greater than or equal to vw, the bit is considered to be '0'; otherwise, the bit is '1'. In other implementations, the opposite operation can be implemented. That is, for example, if dif is greater than or equal to vw, the bit is considered to be '1'; otherwise, the bit is '0'. The loop between lines 12 and 20 reads the consumed bits from the bit stream. As can be seen, and in contrast to conventional methods, no scaling is performed on the CDF as bits are being consumed.
[0074] At line 10, vw is calculated as r shifted left by (OD_EC_WINDOW_SIZE-16) and then right by 1. The value dif is an extended version of this "offset" with an additional preload bit from the compressed bitstream. The dif value is OD_EC_WINDOW_SIZE bits (which can be 32 or 64 bits), while the canonical "offset" value is only 16 bits. Changing the value of the constant OD_EC_WINDOW_SIZE (such as from 32 to 64) will in principle not affect the results of the od_ec_decode_literal_bypass() function. What will change is the maximum number of bits (n_bits) that can be decoded within the loop of lines 12-20.
[0075] Assuming OD_EC_WINDOW_SIZE=32, the "offset" can be found to be offset=(dif>>(32–16)). The range stored in the decoder state (i.e., dec->rng) can be canonically defined as a 16-bit value. However, vw is OD_EC_WINDOW_SIZE bits: vw=r<<(32-16). Therefore, the 16 most significant bits (MSBs) of dif can be or can be equal to the offset, and the 16 LSBs can be the next few bits read from the bitstream (dif[31:0]→[offset[15:0]|next_bits[15:0]]); and the 16 most significant bits (MSBs) of vw can be or can be equal to the range, and the 16 LSBs can be padded with zeros (vw[31:0]→[range[15:0]|zero padding[15:0]]). At line 13, vw is right-shifted by 1 to obtain the midpoint value used to decode the bypass bits. At line 15, due to the zero padding of vw, the comparison "dif>=(vw>>1)" is equivalent to the comparison "offset>=(range>>1)". The advantage of preloading the next_bits number of bits in this way is that normalization does not need to be performed until all n_bits bypass bits are decoded.
[0076] To illustrate the operation of the function od_ec_decode_literal_bypass() in Table III, assume that no bits have been consumed from the bitstream, the bitstream includes the value 561093 (i.e., the encoded data received and to be decoded), and 6 bits are to be read from the bitstream (i.e., n_bits=6). Therefore, the offset dif is equal to 561093. In addition, the range r can initially be set to the maximum initial range 65535, which is the maximum range of the 16-bit prediction assumed in this illustration. The initial decoder state dec includes dif=561093, and (after normalization) the 16-bit range r values must be within [32768,65536) (e.g., 65536 is just outside this range). In an implementation, the starting (initial) range r=32768.
[0077] Table IV illustrates the values of the different variables after each of the iterations between lines 12 and 20. Before the loop, vw is set to 65536 and dif is set to 561093.
[0078] At line 13, vw is halved to 32768. At line 14, ret is shifted left by 1 to make room for the next bit. By shifting left, the LSB of ret is 0. At line 15, dif(561093) is greater than vw(32768). Therefore, line 16 is executed, and it is assumed that the bit to be read is 0. At line 16, dif is set to (dif=dif–vw)=24125. In the second iteration, vw is halved again to 16384, and ret is shifted left. Since dif(24125) is greater than vw(16384), the bit is '0', and dif is updated to dif-vw=7741. In the third iteration, vw is halved again to 10192, and ret is shifted left. Since dif(7741) is less than vw(10192), the bit is considered as '1' and dif remains 7741. Since the bit is considered as '1', at line 18, the LSB of ret is set to 1. The same set of steps is repeated until all 6 bits are read and accumulated into ret. When all iterations are completed, ret will contain the bit string 001000.
[0079] The final dif is 573, and the range r remains 65536.
[0080]
[0081] Table V illustrates a function od_ec_encode_literal_bypass() for encoding a value given by a variable val in n_bits bits. The function od_ec_encode_literal_bypass() in Table V receives as input the variables n_bits and val. The function od_ec_encode_literal_bypass() encodes the value in a compressed bitstream.
[0082]
[0083] In the function od_ec_encode_literal_bypass(), bypass code processing is mainly implemented through lines 7-8. In Table V, l is an offset indicating the starting point of the range currently held by the encoder state data structure enc. The range r is usually the maximum range minus the low value (i.e., the offset). In this particular example, and as indicated by the assertion of line 6, the range r should be at least 32768. Again, the independent variable val is the value to be encoded with the number of bits given by the independent variable n_bits. For example, corresponding to the above example, val can be 8 (i.e., the binary value 001000), and needs to be encoded with 6 bits (n_bits=6).
[0084] At line 7, the offset l is shifted by n_bits (e.g., 6 bits in this case) to make room for the new bits. At line 8, the value val is scaled by the current range r (i.e., r*val) and the product is added to the offset (i.e., l+=r*val), thereby achieving direct bypass encoding of the value val. That is, val is simply added directly to the encoded output and scaled by the current range. At line 9, od_ec_enc_normalize() is called to renormalize the range (e.g., if the range is below a certain threshold) and output the bits to the bitstream. The od_ec_enc_normalize() function keeps track of the number of bits (n_bits) that have been encoded into the variable l. When the accumulated number of bits exceeds the threshold N, the high N bits of the variable l can be sent to the output buffer, and these N bits are then set to zero in the variable l. Since the known range value remains the same value after bypass code processing, the value is not modified by the od_ec_encode_literal_bypass() function and no additional range adjustment is required in the od_ec_enc_normalize() function.
[0085] Fig. 7A is a diagram 700 of decoding bypass symbols according to an implementation of the present disclosure. Figure 7B 720 is a diagram of encoding a single-bit bypass symbol according to an implementation of the present disclosure. Figure 7C is a diagram 740 of encoding a multi-bit bypass symbol according to an implementation of the present disclosure.
[0086] In diagram 700, bypass arithmetic decoder 701 uses decoder range 702 and offset 704 to obtain Figure 5 4. The decoder range 702 and the offset 704 may be described as variables r and dif, respectively, of the function ec_decode_literal_bypass() of Table III. After decoding a bit (i.e., bit 706), the bypass arithmetic decoder 701 conditionally updates the offset 704 to obtain an offset 708.
[0087] In diagram 720, bypass arithmetic code encoder 721 uses decoder range 722 and offset 724 to encode (eg, write) binary bit values into a compressed bit stream, such as Figure 4 420 of the compressed bit stream 420. The bypass arithmetic encoder 721 is shown as including an "ADD" operation, which essentially corresponds to row 8 of the function od_ec_encode_literal_bypass() of Table V. In the case of encoding one bit, the statement l+=r*val essentially simplifies to l+=r. After encoding one bit, the offset 724 is conditionally updated to produce the offset 728. The difference between Figure 740 and Figure 720 is that the bypass arithmetic encoder 721 receives more than one bit (i.e., bit 730) to encode.
[0088] Figure 8 8 is a flow chart of a technique 800 for bypass decoding of equally probable symbols. The technique 800 may be used in a system such as Figure 5 The technique 800 may be implemented, for example, by a decoder such as Figure 1 The software program may include machine-readable instructions (e.g., executable instructions) that may be stored in a memory such as memory 204 or secondary storage 214 and executed by a processor such as CPU 202 to cause the computing device to perform the technique 800. In at least some implementations, the technique 800 may be performed in whole or in part by a computing device of the sending station 102 or the receiving station 106. Figure 5 The technique 800 may be performed by an entropy decoding stage 502 of a decoder 500 of FIG. Fig. 7A The arithmetic decoder of the bypass arithmetic decoder 701 is implemented.
[0089] Technique 800 may be implemented using dedicated hardware or firmware. Some computing devices may have multiple memories, multiple processors, or both. The steps or operations of technique 800 may be distributed using different processors, memories, or both. Use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory as well as devices having multiple processors or multiple memories that may be used to perform some or all of the enumerated steps.
[0090] At 802, a request is received to decode a plurality of bins from a compressed bit stream, wherein each bin in the bin is of equal probability. The arithmetic decoder may maintain an offset and a range as described above. The range is limited to even numbers, particularly even numbers of powers of 2. At 804, a decoding range may be established (e.g., set, select, configure, etc.) based on the range. In an example, the range itself may be used as a decoding range. In an example, the decoding range may be an enlarged version of the range, such as described in row 10 of Table III. In an example, the decoding range may be maintained between a lower limit of 32,768 and an upper limit of 65,535. As further described herein, an offset may be used to decode a bit from a compressed bit stream and may be considered (e.g., set to) the lowest value in the decoding range.
[0091] At 806, the binary value is decoded. Decoding the binary value may include performing steps 806_4 to 806_8 for each bit. Therefore, at 806_2, it is determined whether more bits are to be decoded. If more bits are to be decoded, the technique 800 proceeds to 806_4; otherwise, the technique 800 continues at 808. At 808, the technique 800 provides (e.g., returns) the binary value (such as to a requester or caller of the technique 800). That is, the technique 800 may provide a binary string including the decoded bits.
[0092] At 806_4, the offset is compared to the midpoint of the decoding range to determine the binary value of each binary bit. The comparison may be as described in row 15 of Table III. At 806_6, the midpoint is conditionally updated based on the comparison. For example, as described in row 15-10 of Table III, in response to determining that the offset is greater than or equal to the midpoint of the decoding range, the (decoded) binary bit is set to a specific binary value and the offset is set to a value determined by subtracting the midpoint from the offset; and in response to determining that the offset is less than the midpoint of the decoding range, the binary bit is set to the complement of the specific binary value and the offset is not updated. In some implementations, the specific binary value is 0 (and its complement is 1). In other implementations, the specific binary value is 1 (and its complement is 0). Therefore, conditionally updating the midpoint based on the comparison may include: if the decoded bit value corresponds to a specific portion of the range, the offset is set to a value determined by subtracting the midpoint from the offset, otherwise the offset is maintained, as described above.
[0093] At 806_8, the midpoint is halved so that equal probability is maintained for the next bin after decoding each bin. The midpoint may be halved using a right shift operation, such as described with respect to row 13 of Table III. As described above, halving the midpoint constitutes a normalization step so that the least significant bit of the decoding range is always set to zero.
[0094] The binary bits may be used to decode (or may be associated with) corresponding sign bits of the non-zero coefficients of the transform block. Coding the coefficient values of the quantized transform block may include coding a so-called sign map. The sign map indicates which coefficients are positive and which coefficients are negative for the non-zero coefficients of the quantized transform block. The sign map code may be processed as a bit string, where a 1 may indicate that the coefficient is positive and a 0 may indicate that the coefficient is negative (or vice versa).
[0095] The binary bits may be used to decode (or may be associated with) the levels of the Golomb-coded transform coefficients. For illustration, the transform coefficients may be coded horizontally (e.g., in three horizontal planes). The three horizontal planes may be a low level, a mid level, and a high level. The low level plane, the mid level plane, and the high level plane correspond to different ranges of coefficient magnitudes (0-2, 3-14, 15 and above, respectively). The remainder (coefficient magnitude minus 14) is entropy coded using the Golomb code.
[0096] The binary bit may be used to decode (or may be associated with) the position of an end of block (EOB). Given a scan order through the quantized transform coefficients, the EOB indicates the scan order position of the last non-zero coefficient of the quantized transform coefficients. Coding the position of the EOB may include coding a range of scan positions and then coding an offset within the range. The range may be coded using a context-selected CDF, and the offset may be bypass coded.
[0097] The binary bits may be used to decode (or may be associated with) loop filter parameters. For example, the encoded bitstream may include data indicating that the loop filter parameters are to be decoded, such as by Figure 5 The loop filtering stage 512 or the post filtering stage 514 of the image processing unit may be used to determine which available filters (if any) are applied. For illustration, and using the AV1 codec as an example, available (optional) filters may include a constrained directional enhancement filter (CDEF), a Weiner filter, a self-guided filter, and a frame super-resolution filter. Binary bits may be used to decode (or may be associated with) a palette color list. For example, a color palette including multiple (e.g., 2 to 8) base colors (i.e., pixel values) may be constructed for luma and / or chroma planes, and a color index in the palette may be assigned to each pixel. The color values of the palette may be bypass-coded.
[0098] Fig. 9 is a flow chart of a technique 900 for bypass encoding equal probability symbols. The technique 900 can be used in a system such as Figure 4 The technique 900 may be implemented, for example, by a Figure 1 The software program may include machine-readable instructions (e.g., executable instructions) that may be stored in a memory such as memory 204 or secondary storage 214 and executed by a processor such as CPU 202 to cause the computing device to perform the technique 900. In at least some implementations, the technique 900 may be performed in whole or in part by a computing device of the sending station 102 or the receiving station 106. Figure 4 The entropy encoding stage 408 of the encoder 400 is performed. The technique 900 may be performed by, for example, Figure 7B or Figure 7C The arithmetic encoder of the bypass arithmetic encoder 721 is implemented.
[0099] Technique 900 may be implemented using dedicated hardware or firmware. Some computing devices may have multiple memories, multiple processors, or both. The steps or operations of technique 900 may be distributed using different processors, memories, or both. Use of the terms "processor" or "memory" in the singular encompasses computing devices having one processor or one memory as well as devices having multiple processors or multiple memories that may be used to perform some or all of the enumerated steps.
[0100] At 902, an offset (value) and a decoding range (value) are initialized. The offset and the decoding range may be as described in relation to variables l and r of the function od_ec_encode_literal_bypass() of Table V, respectively. At 904, a binary value and a specified number of bits in which the binary value is to be encoded are received. The specified number of bits is limited to a predetermined maximum value. As described above, the range is repeatedly halved. Thus, in the case of 16-bit precision, the range may be initialized to 32768, and the predetermined maximum value may be 15, since the range may not be further halved after 15 divisions.
[0101] At 906, based on the binary value and the specified number of bits, the offset is adjusted by performing a left shift operation on the offset and then adding the product of the decoded range and the binary value to obtain an adjusted offset. At 908, bits are output to a compressed bit stream based on the adjusted offset.
[0102] Technique 900 can further include normalizing at least one of the offset or the decoded range by calling a normalization function that takes the adjusted offset, the range value, and the specified number of bits as parameters. The normalization facilitates accommodating binary values within the specified number of bits while maintaining data integrity during compression. That is, the normalization function can be designed to prevent overflow or underflow conditions of the range or offset by adjusting the decoded range and offset.
[0103] For ease of explanation, Figure 6 , Figure 8 and Fig. 9 The techniques 600, 800 and 900 in the present invention are depicted and described as a corresponding series of steps or operations. However, the steps or operations according to the present invention may occur in various orders and / or concurrently. Additionally, other steps or operations not presented and described herein may be used. In addition, all steps or operations described may not be required to implement the method according to the disclosed subject matter.
[0104] The disclosure presented herein may be considered in light of the following terms.
[0105] Example clause A: A method of bypass decoding by an arithmetic decoder, comprising: receiving a request to decode a plurality of bins from a compressed bit stream, wherein each bin in the bins is equally probable and wherein the arithmetic decoder maintains an offset and a range; establishing a decoding range based on the range; decoding the binary value of the bin by: for each bin in the bins, performing steps comprising: comparing the offset to a midpoint of the decoding range to determine a binary value for each bin, wherein the binary value is decoded from the compressed bit stream; conditionally updating the midpoint based on the comparison; and halving the midpoint so that equal probability is maintained for decoding the next bin after each bin; and providing the binary value of the bin.
[0106] Example Clause B: The method as described in Example Clause A further includes: in response to determining that the offset is greater than or equal to the midpoint of the decoding range: setting each binary bit to a specific binary value; and setting the offset to a value determined by subtracting the midpoint from the offset; and in response to determining that the offset is less than the midpoint of the decoding range: setting each binary bit to the complement of the specific binary value.
[0107] Example clause C: The method of example clause A or example clause B, wherein the specific binary value is 0.
[0108] Example clause D: The method of any one of example clauses A to C, wherein the particular binary value is 1.
[0109] Example clause E: The method of any of example clauses A to D, wherein halving the midpoint comprises performing a right shift operation on the midpoint.
[0110] Example clause F: A method as described in any of example clauses A to E, wherein conditionally updating the midpoint based on the comparison includes: if the decoded bit value corresponds to a particular portion of the range, setting the offset to a value determined by subtracting the midpoint from the offset, otherwise maintaining the offset.
[0111] Example clause G: A method as described in any of example clauses A to F, wherein a binary bit is used to decode one of: a corresponding sign bit of a non-zero coefficient of a transform block, a transform coefficient level processed by a Golomb code, an end of block (EOB) position of a transform block, a loop filter parameter, or a palette color list.
[0112] Example clause H: A method as described in any of example clauses A to G, wherein halving the midpoint constitutes a normalization step so that the least significant bit of the decoding range is always set to zero.
[0113] Example clause I: The method of any of example clauses A to H, wherein the decoding range is maintained between a lower limit of 32,768 and an upper limit of 65,535.
[0114] Example clause J: A method as described in any of example clauses A to I, wherein the offset is used to decode bits from a compressed bitstream and is a lowest value in a decoding range.
[0115] Example Clause K: A method for encoding a binary value, comprising: initializing an offset and a decoding range; receiving a binary value and a specified number of bits within which the binary value is to be encoded, wherein the specified number of bits is limited to a predetermined maximum value; based on the binary value and the specified number of bits, adjusting the offset by performing a left shift operation on the offset and then adding the product of the decoding range and the binary value to obtain an adjusted offset; and outputting bits into a compressed bit stream based on the adjusted offset.
[0116] Example clause L: The method of example clause K, further comprising: normalizing at least one of the offset or the decoded range by calling a normalization function that takes the adjusted offset, the range, and the specified number of bits as parameters.
[0117] Example clause M: A method as described in example clause K or example clause L, wherein the normalization function is designed to prevent overflow or underflow conditions by adjusting the decoding range and the offset.
[0118] Example clause N: The method of any of example clauses K to M, wherein the predetermined maximum value is sixteen.
[0119] Example clause O: A method as described in any of example clauses K to N, wherein a binary bit is used to encode one of the following: a corresponding sign bit of a non-zero coefficient of a transform block, a transform coefficient level processed by a Golomb code, an end of block (EOB) position of a transform block, a loop filter parameter, or a palette color list.
[0120] Example Clause P: A method for bypassing code processing, comprising: receiving a number of bits to be code processed; calculating a midpoint value of a range to obtain a cumulative distribution function; conditionally subtracting the midpoint from an offset; and normalizing at least one of the range or the offset.
[0121] The aspects of encoding and decoding described above illustrate some examples of encoding and decoding techniques. However, it should be understood that when those terms are used in the claims, encoding and decoding may mean compressing data, decompressing data, transforming data, or any other processing or change of data.
[0122] The word "example" is used herein to mean serving as an example, instance or illustration. Any aspect or design described herein as an "example" is not necessarily interpreted as being preferred or advantageous over other aspects or designs. Rather, the use of the word "example" is intended to present concepts in a specific manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clearly indicated in the context, the statement "X includes A or B" is intended to represent any one of its natural inclusive arrangements. That is, if X includes A; X includes B; or X includes both A and B, then "X includes A or B" is satisfied under any of the above examples. In addition, unless otherwise specified or the context clearly indicates a singular form, the article "one / a" used in this application and the appended claims should generally be interpreted as meaning "one or more". In addition, the use of the term "implementation" or the term "an implementation" throughout this disclosure is not intended to mean the same embodiment or implementation, unless so described.
[0123] The implementation of the sending station 102 and / or the receiving station 106 (and the algorithms, methods, instructions, etc. stored thereon and / or executed by it (including by the encoder 400 and the decoder 500)) can be implemented in hardware, software, or any combination thereof. The hardware may include, for example, a computer, an intellectual property (IP) core, an application specific integrated circuit (ASIC), a programmable logic array, an optical processor, a programmable logic controller, a microcode, a microcontroller, a server, a microprocessor, a digital signal processor, or any other suitable circuit. In the claims, the term "processor" should be understood to cover any of the aforementioned hardware individually or in combination. The terms "signal" and "data" are used interchangeably. Further, the parts of the sending station 102 and the receiving station 106 do not necessarily have to be implemented in the same way.
[0124] Further, in one aspect, for example, the sending station 102 or the receiving station 106 can be implemented using a general purpose computer or general purpose processor with a computer program that, when executed, performs any of the corresponding methods, algorithms and / or instructions described herein. Additionally or alternatively, for example, a special purpose computer / processor can be utilized that may include other hardware for performing any of the methods, algorithms or instructions described herein.
[0125] Transmitting station 102 and receiving station 106 can be realized on the computer in the video conference system, for example. Alternatively, transmitting station 102 can be realized on a server, and receiving station 106 can be realized on a device (such as a handheld communication device) separated from the server. In this example, transmitting station 102 can use encoder 400 to encode content into a coded video signal and send the coded video signal to the communication device. Then, the communication device can use decoder 500 to decode the coded video signal then. Alternatively, the communication device can decode the content (for example, the content not sent by transmitting station 102) stored locally on the communication device. Other suitable transmission and reception implementations are available. For example, receiving station 106 can be a generally fixed personal computer rather than a portable communication device, and / or the device including encoder 400 can also include decoder 500.
[0126] Further, all or part of the implementation of the present disclosure may take the form of a computer program product accessible from, for example, a computer usable or computer readable medium. A computer usable or computer readable medium may be any device that may, for example, tangibly contain, store, communicate, or transmit a program for use by or in conjunction with any processor. The medium may be, for example, an electronic, magnetic, optical, electromagnetic, or semiconductor device. Other suitable media are also available.
[0127] The above embodiments, implementations, and aspects have been described to facilitate easy understanding of the present disclosure and are not intended to limit the present disclosure. On the contrary, the present disclosure is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims, which scope should be given the broadest interpretation permitted under the law to cover all such modifications and equivalent structures.
Claims
1. A method for bypass decoding by an arithmetic decoder, include: receiving a request to decode a plurality of bins from a compressed bitstream, wherein each bin of the bins is equally probable, and wherein the arithmetic decoder maintains an offset and a range; establishing a decoding range based on the range; The binary value of the bit is decoded by: For each binary digit in the binary digits, the following steps are performed: comparing the offset to a midpoint of the decoding range to determine a binary value of each of the bins, wherein the binary value is decoded from the compressed bitstream; conditionally updating the midpoint based on the comparison; and halving the midpoint so that equal probability is maintained for decoding the next bin following each bin; and The binary value of the binary bit is provided.
2. The method of claim 1, further comprising: include: In response to determining that the offset is greater than or equal to the midpoint of the decoding range: setting each of said binary bits to a specific binary value; as well as setting the offset to a value determined by subtracting the midpoint from the offset; and In response to determining that the offset is less than the midpoint of the decoding range: Each of the binary bits is set to the complement of the particular binary value.
3. The method according to claim 2, in, The specific binary value is 0.
4. The method according to claim 2, in, The specific binary value is 1.
5. The method according to any one of claims 1 to 4, in, Conditionally updating the midpoint based on the comparison comprises: If the decoded bit value corresponds to a particular portion of the range, the offset is set to a value determined by subtracting the midpoint from the offset, otherwise the offset is maintained.
6. The method according to any one of claims 1 to 5, in, Halving the midpoint involves: A right shift operation is performed on the midpoint.
7. The method according to any one of claims 1 to 6, in, The binary bits are used to decode one of the following: corresponding sign bits of non-zero coefficients of a transform block, Golomb-coded transform coefficient levels, end-of-block (EOB) positions of the transform block, loop filter parameters, or a palette color list.
8. The method according to any one of claims 1 to 7, in, Halving the midpoint constitutes a normalization step so that the least significant bit of the decoding range is always set to zero.
9. The method according to any one of claims 1 to 8, in, The decoding range is maintained between a lower limit of 32,768 and an upper limit of 65,535.
10. The method according to any one of claims 1 to 9, in, The offset is used to decode bits from the compressed bitstream and is the lowest value in the decoding range.
11. A method for encoding a binary value, include: Initialize the offset and decoding range; receiving a binary value and a specified number of bits within which the binary value is to be encoded, wherein the specified number of bits is limited to a predetermined maximum value; adjusting the offset based on the binary value and the specified number of bits by performing a left shift operation on the offset and then adding a product of the decoded range and the binary value to obtain an adjusted offset; and Bits are output into a compressed bitstream based on the adjusted offsets.
12. The method of claim 11, further comprising: include: At least one of the offset or the decoded range is normalized by calling a normalization function that takes the adjusted offset, the range, and the specified number of bits as parameters.
13. The method according to claim 12, in, The normalization function is designed to prevent overflow or underflow conditions by adjusting the decoding range and the offset.
14. The method according to any one of claims 11 to 13, in, The predetermined maximum value is sixteen.
15. The method according to any one of claims 11 to 14, in, The binary value is used to encode one of the following: the corresponding sign bit of the non-zero coefficient of the transform block, the Golomb-coded transform coefficient level, the end of block (EOB) position of the transform block, the loop filter parameters or the palette color list.
16. A device, include: A processor, the processor being configured to execute the method according to any one of claims 1 to 10.
17. A device, include: Memory; as well as A processor configured to execute instructions stored in the memory to perform the method according to any one of claims 1 to 10.
18. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processor, facilitate performance of operations, the operations comprising performing the operations of the method of any one of claims 1 to 10.
19. A non-transitory computer-readable storage medium having stored thereon an encoded bitstream, in, The encoded bit stream is configured for decoding by the method according to any one of claims 1 to 10.
20. A device, include: A processor configured to execute the method according to any one of claims 11 to 15.
21. A device, include: Memory; as well as A processor configured to execute instructions stored in the memory to perform the method according to any one of claims 11 to 15.
22. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processor, facilitate performance of operations, the operations comprising performing the operations of any one of the methods of claims 11 to 15.
23. A non-transitory computer-readable storage medium having stored thereon an encoded bitstream, in, The encoded bit stream is generated by an encoder performing the method according to any one of claims 11 to 15.
24. A method for bypass code processing, include: Receive the number of bits to be coded; Calculate the midpoint value of the range to obtain the cumulative distribution function; conditionally subtracting the midpoint from the offset; as well as At least one of the range or the offset is normalized.