Apparatus, method, and non-transitory computer-readable storage medium for dynamic bitset coding

By decoding the bit set and using the processor to decode the bit index from the compressed bit stream and set the value, the problem of low image rendering efficiency in the existing technology is solved, and more efficient image data coding and resource conservation are achieved.

CN115516862BActive Publication Date: 2025-10-17GOOGLE LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080100487.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-28
Publication Date
2025-10-17
Estimated Expiration
2040-05-28

AI Technical Summary

Technical Problem

In the prior art, when rendering images, the compression and decompression processes require a large amount of time and resources, resulting in low image display efficiency.

Method used

By decoding the bit set, a processor is used to decode the index of the bit from the compressed bit stream and set the value of the bit according to the index, and different decoding methods are used to decode according to the coding mode.

Benefits of technology

The coding efficiency of image data is improved, and the number of bits required for compressing the bit stream is reduced, thereby speeding up image rendering and reducing resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115516862B_ABST
    Figure CN115516862B_ABST
Patent Text Reader

Abstract

Decoding the bitset includes decoding, from the compressed bitstream, indices of bits in the bitset, each bit in the bitset corresponding to a respective value in a range of minimum values to maximum values, each bit in the bitset having a first value. Decoding the bitset also includes setting all other bits in the bitset not decoded from the compressed bitstream to a second value. Decoding the indices of bits in the bitset includes decoding a number of indices of bits in the bitset, decoding a first index of the indices in a first range having a first lower limit and a first upper limit, and decoding a last index of the indices in a second range having a second lower limit and a second upper limit.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND

[0001] Image content (e.g., still images or video frames) represents a large amount of online content. For example, a web page can include multiple images, and a large portion of the time and resources spent on rendering the web page is dedicated to rendering the images for display. The amount of time and resources required to receive and render the images for display depends, in part, on the way the images are compressed. Thus, it is possible to render images faster by using compression and decompression techniques to reduce the overall data size of the images.

[0002] For different types of data, different compression techniques can be used to compress (at an encoder) and corresponding decompression techniques used at a decoder. For example, techniques such as Huffman coding, Lempel-Ziv-Welch compression, run-length encoding, Golomb coding, arithmetic coding, and the like can be used. SUMMARY

[0003] A first aspect is an apparatus for decoding a set of bits, each bit in the set of bits corresponding to a respective value in a range of a minimum value to a maximum value. The apparatus includes a processor. The processor is configured to decode, from a compressed bitstream, indices of bits in the set of bits, each bit in the set of bits having a first value, and set all other bits in the set of bits not decoded from the compressed bitstream to a second value. Decoding the indices of bits in the set of bits includes decoding, from the compressed bitstream, a number of indices of bits in the set of bits, decoding a first index of the indices in a first range having a first lower limit and a first upper limit, and decoding a last index of the indices in a second range having a second lower limit and a second upper limit. The first lower limit is equal to the minimum value. The first upper limit is equal to the maximum value minus the number of indices of bits in the set of bits having the first value minus one. The first index corresponds to a first bit in the set of bits having the first value. The second lower limit is equal to the first index plus the number of indices minus one. The second upper limit is equal to the maximum value. The last index corresponds to a last bit in the set of bits having the first value.

[0004] A second aspect is a method for decoding a bitset, each bit in the bitset corresponding to a respective value in a range of a minimum value to a maximum value. The method includes decoding, from a compressed bitstream, respective indices of bits in the bitset having a first value, wherein the respective indices include a first index and a second index, and setting each bit in the bitset between the first index and the second index to a second value, the second value being a complement of the first value. Decoding the respective indices of bits includes obtaining a first index of a first bit in the bitset having the first value, setting the first bit at the first index of the bitset to the first value, decoding, from the compressed bitstream, a first index difference, adding the first index difference to the first index to obtain the second index, and setting a second bit at the second index of the bitset to the first value.

[0005] A third aspect is a method for decoding a bitset having a length. The method includes decoding, from a compressed bitstream, a first number of first bits in the bitset having a first value, setting a first variable to the first number of first bits in the bitset having the first value, setting a second variable to a number of second bits in the bitset having a complement of the first value, and performing an operation while more bits having the first value remain to be read and more bits having the complement of the first value remain to be read, the operation including reading a bit from the compressed bitstream, if the bit is equal to the first value, decrementing the first variable, and if the bit is equal to the complement of the first value, decrementing the second value.

[0006] A fourth aspect is an apparatus for decoding a bitset. The apparatus includes a processor. The processor is configured to decode, from a compressed bitstream, a coding mode of the bitset, and decode, from the compressed bitstream, the bitset according to the coding mode. When the coding mode is a first value, the processor decodes the bitset as in the first aspect. When the coding mode is a second value, the processor decodes the bitset using the first method of the second aspect. When the coding mode is a third value, the processor decodes the bitset using the second method of the third aspect.

[0007] These and other aspects of the present disclosure are disclosed in the following detailed description of embodiments, the appended claims, and the accompanying drawings.

[0008] It will be appreciated that the various aspects can be implemented in any convenient form. For example, the various aspects can be implemented by a suitable computer program, which 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 suitable devices, which can take the form of a programmable computer running a computer program, which is arranged to implement the methods and / or techniques disclosed herein. The various aspects can be combined so that features described in the context of one aspect can be implemented in another aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 is a diagram of a computing device according to an embodiment of the present disclosure.

[0010] Figure 2 is a diagram of a computing and communication system according to an embodiment of the present disclosure.

[0011] Figure 3 is a diagram of a video stream for use in encoding and decoding according to an embodiment of the present disclosure.

[0012] Figure 4 is a block diagram of an encoder according to an embodiment of the present disclosure.

[0013] Figure 5 is a block diagram of a decoder according to an embodiment of the present disclosure.

[0014] Figure 6 is an example of a flow diagram of a technique for decoding a bit set according to an embodiment of the present disclosure.

[0015] Figure 7 is an example of a portion of a compressed bitstream decoded using a few-value, large-range technique according to an embodiment of the present disclosure.

[0016] Figure 8 is an example of a flow chart of a technique for decoding a set of bits using a large range of few values ​​according to an embodiment of the present disclosure.

[0017] Figure 9 is an example of a flow diagram of a technique for decoding a bit set according to an embodiment of the present disclosure.

[0018] Figure 10 is an example of a portion of a compressed bitstream decoded using a few-value, small-range technique according to an embodiment of the present disclosure.

[0019] Figure 11 is an example of a flow chart of a technique for decoding a bit set using a small range of few values ​​according to an embodiment of the present disclosure.

[0020] Figure 12 is an example of a flowchart for a technique for decoding a bitset using many values, small range, according to embodiments of the present disclosure.

[0021] Figure 13 is an example of a flowchart for a technique for decoding a bitset using many values, large range, according to embodiments of the present disclosure.

[0022] Figure 14 is an example of a diagram illustrating a compressed bitstream format for use with many values, large range, according to embodiments of the present disclosure.

[0023] Figure 15 is an example of a portion of a compressed bitstream, according to embodiments of the present disclosure. DETAILED DESCRIPTION

[0024] Image (e.g., independent image or video frame) coding includes coding many different types of data. A data type can mean data having different semantics. Examples of data types can include transform coefficients of residual values resulting from prediction of a block of an image, level map information of transform coefficients, a histogram (such as a distribution of color values in an image or in one or more blocks of an image), etc. A level map can refer to a one-dimensional array of a transform block, where each bit describes a characteristic of a corresponding transform coefficient. The one-dimensional array can be generated from a transform block using a scan order. In an example, the level map can be a non-zero map indicating which transform coefficients are zero and which transform coefficients are non-zero. In another example, the level map can indicate which coefficients are greater than a certain value (e.g., 1, 2, or some other value) and which coefficients are equal to the value.

[0025] A bitset can be used to code, or used in the coding of, such data types. A bitset, which can be referred to as a bit string, is a sequence of bits, where each bit can be interpreted as, for example, dark / bright, not / present, valid / invalid, yes / no, etc.

[0026] For purposes of illustration, the techniques described herein are described with reference to coding (encoding and decoding) a bitset representing occupancy (or presence) information. That is, each bit in the bitset indicates whether or not the value represented by the bit is present. In this context, “present” can mean that the count of the value is non-zero. The bit does not indicate a level of presence of the corresponding value. However, the present disclosure is not limited to this.

[0027] For example, assume that a histogram of luminance values is to be decoded from a compressed bitstream. Further assume that luminance values are represented with 4-bit values. Thus, each pixel can have a luminance value in the range [0, 15]. Further assume that in an image block of size 8x8, there are 10, 20, 30, and 4 pixels that have luminance values of 0, 2, 4, and 14, respectively. No other luminance values are present in the image block. Thus, the bitset (denoted as BITSET) of the presence (occupancy) of all possible luminance values is BITSET = 101010000000010, where BITSET[i] (i.e., the bit at position i within the bitset BITSET) is an index into the range of luminance values and corresponds to luminance value i.

[0028] The bitset BITSET can simply be represented by an array of indices of the non-zero bits within the bitset. Thus, the bitset 101010000000010 can be represented by the array [0, 2, 4, 14]. Knowing which bits in the bitset have a value (e.g., 1 or 0) can easily determine that the remaining bits in the bitset have the complementary value (e.g., 0 or 1).

[0029] Although the techniques disclosed herein can be illustrated using a histogram of luminance values for simplicity of explanation, the disclosure is not so limited.

[0030] Implementations according to the disclosure can be used to code bitsets in an optimal manner in order to reduce the number of bits required to compress the bitsets. Depending on the characteristics of the bitset, different methods can be used to code the bitset representing the data type. The characteristics can include which bits have a particular value, the indices of such bits, and their relative position within the bitset, the length of the bitset. When coding the bitset using implementations according to the disclosure, coding efficiency can be improved.

[0031] Details of dynamic bitset coding are described herein first with reference to a system in which the teachings herein can be implemented.

[0032] Figure 1 is a diagram of a computing device 100 according to implementations of the disclosure. The computing device 100 shown includes a memory 110, a processor 120, a user interface (UI) 130, an electronic communication unit 140, a sensor 150, a power supply 160, and a bus 170. As used herein, the term “computing device” includes any unit or combination of units disclosed herein that can perform any method or any one or more portions thereof.

[0033] The computing device 100 can be a stationary computing device, such as a personal computer (PC), a server, a workstation, a minicomputer, or a mainframe computer, or a mobile computing device, such as a mobile phone, a personal digital assistant (PDA), a laptop computer, or a tablet PC. Although shown as a single unit, any one or more elements of the computing device 100 can be integrated in any number of separate physical units. For example, the user interface 130 and the processor 120 can be integrated in a first physical unit, and the memory 110 can be integrated in a second physical unit.

[0034] The memory 110 can include any non-transitory computer-usable or computer-readable medium, such as any tangible device that can, for example, contain, store, communicate, or transport data 112, instructions 114, an operating system 116, or any information associated with the same for use by or in connection with the other components of the computing device 100. The non-transitory computer-usable or computer-readable medium can be, for example, a solid state drive, a memory card, a removable medium, a read-only memory (ROM), a random access memory (RAM), any type of magnetic disk, a magnetic or optical card, a special purpose integrated circuit (ASIC), or any type of non-transitory medium suitable for storing electronic information, or any combination thereof.

[0035] Although shown as a single unit, the memory 110 can include multiple physical units, such as one or more primary memory units, such as random access memory units, one or more secondary data storage units, such as magnetic disks, or a combination thereof. For example, the data 112 or a portion thereof, the instructions 114 or a portion thereof, or both, can be stored in a secondary storage unit and can be loaded or otherwise transferred to a primary memory unit in connection with processing the respective data 112, executing the respective instructions 114, or both. In some implementations, the memory 110 or a portion thereof can be removable memory.

[0036] The data 112 can include information, such as input audio and / or visual data, encoded audio and / or visual data, decoded audio and / or visual data, and the like. The visual data can include still images, video sequence frames, and / or video sequences. The instructions 114 can include directions for performing any of the methods disclosed herein or any one or more portions thereof, such as code. The instructions 114 can be implemented in hardware, software, or any combination thereof. For example, the instructions 114 can be implemented as information stored in the memory 110, such as a computer program that can be executed by the processor 120 to perform any of the respective methods, algorithms, aspects, or combinations thereof as described herein.

[0037] Although illustrated as included in the memory 110, in some embodiments, the instructions 114, or portions thereof, can be implemented as a special-purpose processor or circuit that can include specialized hardware for executing any of the methods, algorithms, aspects, or combinations thereof, as described herein. Portions of the instructions 114 can be distributed across multiple processors on the same machine or different machines, or across a network, such as a local area network, a wide area network, the Internet, or a combination thereof.

[0038] The processor 120 can include any device or system capable of manipulating or processing digital signals or other electronic information, including optical processors, quantum processors, molecular processors, or a combination thereof, now existing or later developed. For example, the processor 120 can include a special-purpose processor, a central processing unit (CPU), a digital signal processor (DSP), multiple microprocessors, one or more microprocessors in association with a DSP core, a controller, a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a programmable logic array, a programmable logic controller, microcode, firmware, any type of integrated circuit (IC), a state machine, or any combination thereof. As used herein, the term "processor" includes a single processor or multiple processors.

[0039] The user interface 130 can include any unit capable of interfacing with a user, such as a virtual or physical keypad, a touchpad, a display, a touch display, a speaker, a microphone, a video camera, a sensor, or any combination thereof. For example, the user interface 130 can be an audiovisual display device, and the computing device 100 can use the user interface 130 audiovisual display device such as in connection with displaying a video presentation such as decoded video, an audio such as decoded audio. Although illustrated as a single unit, the user interface 130 can include one or more physical units. For example, the user interface 130 can include an audio interface for performing audio communication with a user, and a touch display for performing visual and touch-based communication with a user.

[0040] The electronic communication unit 140 can transmit, receive, or both transmit and receive signals over a wired or wireless electronic communication medium 180, such as a radio frequency (RF) communication medium, an ultraviolet (UV) communication medium, a visible light communication medium, an optical fiber communication medium, a wired communication medium, or a combination thereof. For example, as illustrated, the electronic communication unit 140 is operably connected to an electronic communication interface 142, such as an antenna, configured to communicate via wireless signals.

[0041] Although the electronic communication interface 142 is illustrated as a single unit, the electronic communication interface 142 can include one or more physical units. For example, the electronic communication interface 142 can include a first electronic communication interface for performing electronic communication with a first device, and a second electronic communication interface for performing electronic communication with a second device. Figure 1The electronic communication interface 142 can be a wireless antenna as shown, a wired communication port such as an Ethernet port, an infrared port, a serial port, or any other wired or wireless unit capable of interfacing with the wired or wireless electronic communication medium 180. Although Figure 1 A single electronic communication unit 140 and a single electronic communication interface 142 are shown, but any number of electronic communication units and any number of electronic communication interfaces can be used.

[0042] The sensor 150 can include, for example, an audio sensing device, a visible light sensing device, a motion sensing device, or a combination thereof. For example, the sensor 150 can include a sound sensing device such as a microphone or any other sound sensing device now existing or later developed that is capable of sensing sounds, such as speech or other utterances, emitted by a user operating the computing device 100 in the vicinity of the computing device 100. In another example, the sensor 150 can include a camera or any other image sensing device now existing or later developed that is capable of sensing images, such as an image of a user operating the computing device. Although a single sensor 150 is shown, the computing device 100 can include multiple sensors 150. For example, the computing device 100 can include a first camera oriented in a field of view of a user of the computing device 100 and a second camera oriented in a field of view away from the user of the computing device 100.

[0043] The power source 160 can be any suitable device for powering the computing device 100. For example, the power source 160 can include a wired external power source interface, one or more dry cell batteries such as nickel-cadmium (NiCd), nickel-zinc (NiZn), nickel-metal hydride (NiMH), lithium-ion (Li-ion), a solar cell, a fuel cell, or any other device capable of powering the computing device 100. Although a single power source 160 is shown in Figure 1 Although a single power source 160 is shown in

[0044] Although shown as separate units, the electronic communication unit 140, the electronic communication interface 142, the user interface 130, the power source 160, or portions thereof can be configured as a combined unit. For example, the electronic communication unit 140, the electronic communication interface 142, the user interface 130, and the power source 160 can be implemented as a communication port capable of interfacing with an external display device, providing communication, power, or both.

[0045] One or more of the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, or the power source 160 can be operatively coupled via the bus 170. Although Figure 1The bus 170 is shown as a single bus, but the computing device 100 can include multiple buses. For example, the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, and the bus 170 can receive power from the power source 160 via the bus 170. In another example, the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, the power source 160, or a combination thereof can communicate data, such as by sending and receiving electronic signals via the bus 170.

[0046] Although Figure 1 Although not shown separately in FIG. 1, one or more of the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, or the power source 160 can include an internal memory, such as an internal buffer or register. For example, the processor 120 can include an internal memory (not shown), and can read data 112 from the memory 110 into the internal memory (not shown) for processing.

[0047] Although shown as separate elements, the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, the power source 160, and the bus 170, or any combination thereof, can be integrated in one or more electronic units, circuits, or chips.

[0048] Figure 2 is a diagram of a computing and communication system 200 in accordance with embodiments of the present disclosure. The illustrated computing and communication system 200 includes computing and communication devices 100A, 100B, 100C, access points 210A, 210B, and a network 220. For example, the computing and communication system 200 can be a multiple access system that provides communication, such as voice, audio, data, video, messaging, broadcast, or a combination thereof, to one or more wired or wireless communication devices, such as the computing and communication devices 100A, 100B, 100C. Although three computing and communication devices 100A, 100B, 100C, two access points 210A, 210B, and one network 220 are shown for simplicity, Figure 2 Although three computing and communication devices 100A, 100B, 100C, two access points 210A, 210B, and one network 220 are shown for simplicity,

[0049] The computing and communication device 100A, 100B, or 100C can be, for example, a computing device, such as a desktop computer, a laptop computer, a tablet computer, a server, a personal digital assistant, an Internet appliance, a gaming console, a television, a camera, a media player, a navigation device, a mobile device, or a combination thereof. Figure 1The computing and communication devices 100A, 100B can be user devices, such as mobile computing devices, laptops, thin clients, or smartphones, and the computing and communication device 100C can be a server, such as a mainframe or cluster. Although the computing and communication device 100A and the computing and communication device 100B are described as user devices, and the computing and communication device 100C is described as a server, any of the computing and communication devices can perform some or all of the functions of a server, some or all of the functions of a user device, or some or all of the functions of both a server and a user device. For example, the server computing and communication device 100C can receive, encode, process, store, transmit, or a combination thereof, audio data; and one or both of the computing and communication device 100A and the computing and communication device 100B can receive, decode, process, store, present, or a combination thereof, audio data.

[0050] Each of the computing and communication devices 100A, 100B, 100C, which can include a user equipment (UE), a mobile station, a fixed or mobile subscriber unit, a cell phone, a personal computer, a tablet computer, a server, a consumer electronic, or any similar device, can be configured to perform wired or wireless communication, such as via the network 220. For example, the computing and communication devices 100A, 100B, 100C can be configured to transmit or receive wired or wireless communication signals. Although each of the computing and communication devices 100A, 100B, 100C is shown as a single unit, the computing and communication devices can include any number of interconnected elements.

[0051] Each of the access points 210A, 210B can be any type of device configured to communicate with the computing and communication devices 100A, 100B, 100C, the network 220, or both, via wired or wireless communication links 180A, 180B, 180C. For example, the access points 210A, 210B can include a base station, a base transceiver station (BTS), a Node-B, an enhanced Node-B (eNode-B), a Home Node-B (HNode-B), a wireless router, a wired router, a hub, a repeater, a switch, or any similar wired or wireless device. Although each of the access points 210A, 210B is shown as a single unit, the access points can include any number of interconnected elements.

[0052] Network 220 can be any type of network configured to provide services such as voice, data, applications, Voice-over-Internet Protocol (VoIP), or any other communication protocol or combination of communication protocols over wired or wireless communication links. For example, network 220 can be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a mobile or cellular telephone network, the Internet, or any other electronic communications means. The network can use communication protocols such as Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Internet Protocol (IP), Real-Time Transport Protocol (RTP), Hypertext Transport Protocol (HTTP), or a combination thereof.

[0053] Computing and communication devices 100A, 100B, 100C can communicate with each other via network 220 using one or more wired or wireless communication links or a combination of wired and wireless communication links. For example, as shown, computing and communication devices 100A, 100B can communicate via wireless communication links 180A, 180B, and computing and communication device 100C can communicate via wired communication link 180C. Any of computing and communication devices 100A, 100B, 100C can communicate using any one or more wired or wireless communication links. For example, first computing and communication device 100A can communicate via first access point 210A using a first type of communication link, second computing and communication device 100B can communicate via second access point 210B using a second type of communication link, and third computing and communication device 100C can communicate via a third access point (not shown) using a third type of communication link. Similarly, access points 210A, 210B can communicate with network 220 via one or more types of wired or wireless communication links 230A, 230B. Although Figure 2 Computing and communication devices 100A, 100B, 100C are shown communicating via network 220, computing and communication devices 100A, 100B, 100C can communicate with each other via any number of communication links, such as direct wired or wireless communication links.

[0054] In some embodiments, communication between one or more of the computing and communication devices 100A, 100B, 100C can omit communication via the network 220 and can pass data via another medium (not shown), such as a data storage device. For example, the server computing and communication device 100C can store audio data, such as encoded audio data, in a data storage device, such as a portable data storage unit, and one or both of the computing and communication device 100A or the computing and communication device 100B can access, read, or retrieve the stored audio data from the data storage unit, such as by physically disconnecting the data storage device from the server computing and communication device 100C and physically connecting the data storage device to the computing and communication device 100A or the computing and communication device 100B.

[0055] Other embodiments of the computing and communication system 200 are possible. For example, in embodiments, the network 220 can be an ad hoc network and one or more of the access points 210A, 210B can be omitted. The computing and communication system 200 can include additional communication devices, networks, and access points not shown in FIG. 2. For example, the computing and communication system 200 can include more communication devices, networks, and access points. Figure 2

[0056] Figure 3 is a diagram of a video stream 300 for use in encoding and decoding according to embodiments of the present disclosure. A video stream 300, such as a video stream captured by a video camera or a video stream generated by a computing device, can include a video sequence 310. The video sequence 310 can include a sequence of adjacent frames 320. Although three adjacent frames 320 are shown, the video sequence 310 can include any number of adjacent frames 320.

[0057] Each frame 330 from the adjacent frames 320 can represent a single image from the video stream. Although not shown in FIG. 3, the frames 330 can include one or more slices, tiles, or planes that can be independently coded or otherwise processed, such as in parallel. Figure 3 Figure 3 Although not shown in FIG. 3, the blocks can include pixels. For example, the blocks can include 16x16 groups of pixels, 8x8 groups of pixels, 8x16 groups of pixels, or any other group of pixels. Unless otherwise indicated herein, the term "block" can include a superblock, a macroblock, a slice, a tile, or any other portion of a frame. The frames, blocks, pixels, or combinations thereof can include display information, such as luminance information, chrominance information, or any other information that can be used to store, modify, transmit, or display a video stream or a portion thereof.

[0058] ​​In some embodiments, frames that are not part of a video stream are encoded and decoded in accordance with embodiments of the present disclosure.

[0059] Figure 4 is a block diagram of an encoder 400 in accordance with embodiments of the present disclosure. The encoder 400 can be implemented in a device such as the computing device 100 shown in FIG. 1 or the computing and communication devices 100A, 100B, 100C shown in FIG. 2A, for example. Figure 1 The encoder 400 can be implemented as, for example, a computer software program stored in a data storage unit such as the memory 110 shown in FIG. 1. Figure 2 The computer software program can include machine-readable instructions that can be executed by a processor such as the processor 120 shown in FIG. 1, and can cause the device to encode video data as described herein. The encoder 400 can be implemented as, for example, a special-purpose hardware included in the computing device 100. Figure 1 Figure 1 The encoder 400 can encode an input video stream 402 such as the video stream 300 shown in FIG. 3 to generate an encoded (compressed) bitstream 404. In some embodiments, the encoder 400 can include a forward path for generating the compressed bitstream 404. The input video stream 402 can be a single image or a collection of images. The forward path can include an intra / inter prediction unit 410, a transform unit 420, a quantization unit 430, an entropy encoding unit 440, or any combination thereof. In some embodiments, the encoder 400 can include a reconstruction path (indicated by the broken connection line) to reconstruct frames for encoding other blocks. The reconstruction path can include a dequantization unit 450, an inverse transform unit 460, a reconstruction unit 470, a filtering unit 480, or any combination thereof. Other structural variations of the encoder 400 can be used to encode the video stream 402.

[0060] To encode the video stream 402, each frame within the video stream 402 can be processed in a block unit. Thus, a current block can be identified from the blocks in the frame, and the current block can be encoded. Figure 3

[0061] To encode the video stream 402, each frame within the video stream 402 can be processed in a block unit. Thus, a current block can be identified from the blocks in the frame, and the current block can be encoded.

[0062] ​​At intra / inter prediction unit 410, the current block can be encoded using intra prediction, which can be within a single frame, or inter prediction, which can be between frames. Intra prediction can include generating a prediction block from samples in the current frame that have been previously encoded and reconstructed. Inter prediction can include generating a prediction block from samples in one or more previously reconstructed reference frames. Generating a prediction block for a current block in a current frame can include performing motion estimation to generate a motion vector that indicates an appropriate reference portion of a reference frame. In the case of encoding a single image (e.g., an image that is not part of a video sequence and / or image sequence), intra / inter prediction unit 410 can encode the image using intra prediction.

[0063] Intra / inter prediction unit 410 can subtract the prediction block from the current block (original block) to produce a residual block. Transform unit 420 can perform a block-based transform, which can include transforming the residual block into transform coefficients in, for example, the frequency domain. Examples of block-based transforms include Karhunen-Loeve transform (KLT), discrete cosine transform (DCT), singular value decomposition transform (SVD), Fourier transform (FT), discrete sine transform (DST), and asymmetric discrete sine transform (ADST). In an example, the DCT can include transforming the block into the frequency domain. The DCT can include using spatial frequency-based transform coefficient values, with the lowest frequency (i.e., DC) coefficient at the top left of the matrix and the highest frequency coefficient at the bottom right of the matrix.

[0064] Quantization unit 430 can convert the transform coefficients into discrete quantum values, which can be referred to as quantized transform coefficients or quantization levels. The quantized transform coefficients can be entropy encoded by entropy encoding unit 440 to produce entropy encoded coefficients. Entropy encoding can include using a probability distribution metric. The entropy encoded coefficients and information used to decode the block, which can include the type of prediction used, motion vectors, and quantizer values, can be output to compressed bitstream 404. Compressed bitstream 404 can be formatted using various techniques, such as run-length encoding (RLE) and zero-run coding.

[0065] The reconstruction path can be used to maintain encoder 400 and a corresponding decoder, such as decoder 500, in synchronization. The reconstruction path can include inverse quantization unit 460, inverse transform unit 470, and summer 480. Inverse quantization unit 460 can receive quantized transform coefficients from quantization unit 430 and can convert the quantized transform coefficients into dequantized transform coefficients. Inverse transform unit 470 can receive the dequantized transform coefficients from inverse quantization unit 460 and can convert the dequantized transform coefficients into a residual block in the spatial domain. Summer 480 can receive the residual block from inverse transform unit 470 and can add the residual block to the prediction block to produce a reconstructed block. The reconstructed block can be output to, for example, a buffer 490. Figure 5reference frame synchronization between the decoder 500 and the encoder 400. The reconstruction path can be similar to the decoding process discussed below, and can include decoding the encoded frame or a portion thereof, which can include decoding the encoded blocks, which can include dequantizing the quantized transform coefficients at the dequantization unit 450 and inverse transforming the dequantized transform coefficients at the inverse transform unit 460 to produce a derivative residual block. The reconstruction unit 470 can add the prediction block generated by the intra / inter prediction unit 410 to the derivative residual block to create a decoded block. The filtering unit 480 can be applied to the decoded block to generate a reconstructed block, which can reduce distortion such as block artifacts. Although one filtering unit 480 is shown in Figure 4

[0066] Other variations of the encoder 400 can be used to encode the compressed bitstream 404. For example, a non-transform based encoder 400 can directly quantize the residual block without having the transform unit 420. In some implementations, the quantization unit 430 and the dequantization unit 450 can be combined into a single unit.

[0067] Figure 5 is a block diagram of a decoder 500 according to an implementation of the disclosure. The decoder 500 can be implemented in a device such as Figure 1 the computing device 100 shown in Figure 2 the computing and communication device 100A, 100B, 100C shown in Figure 1 The decoder 500 can be implemented as, for example, a computer software program stored in a data storage unit such as Figure 1 The decoder 500 can be implemented as, for example, a computer software program stored in a data storage unit such as

[0068] The decoder 500 can receive a compressed bitstream 502, such as Figure 4 ​The decoder 500 can include an entropy decoding unit 510, a dequantization unit 520, an inverse transform unit 530, an intra / inter prediction unit 540, a reconstruction unit 550, a filtering unit 560, or any combination thereof. Other structural variations of the decoder 500 can be used to decode the compressed bitstream 502.

[0069] The entropy decoding unit 510 can decode data elements within the compressed bitstream 502 using, for example, context adaptive binary arithmetic decoding, to produce a set of quantized transform coefficients. The dequantization unit 520 can dequantize the quantized transform coefficients, and the inverse transform unit 530 can inverse transform the dequantized transform coefficients to produce a derivative residual block, which can correspond to the derivative residual blocks generated by the inverse transform unit 460 shown in FIG. 4B. Using header information decoded from the compressed bitstream 502, the intra / inter prediction unit 540 can generate a prediction block corresponding to the prediction blocks created in the encoder 400. At the reconstruction unit 550, the prediction block can be added to the derivative residual block to create a decoded block. The filtering unit 560 can be applied to the decoded block to reduce artifacts such as blockiness, which can include loop filtering, deblocking filtering, or other types of filtering or combinations of types of filtering, and which can include generating a reconstructed block, which can be output as the output video stream 504. Figure 4

[0070] Other variations of the decoder 500 can be used to decode the compressed bitstream 502. For example, the decoder 500 can produce the output video stream 504 without having a deblocking filtering unit 570.

[0071] Figure 6 is an example of a flowchart of a technique 600 for decoding a bitset according to an embodiment of the disclosure. The bitset represents occupancy or presence information of values in a range. In cases where there is a relatively small number of all possible values in the range and the range is relatively large, the technique 600 can be used. To give an illustrative example, the range can be [0, 255] and the number of present values can be four. Thus, the bitset can be, for example, BITSET = 001111000...00, where the bitset length is 256 bits and the indexes of the present values are INDEXES = [2, 3, 4, 5]. For ease of reference, Figure 6 The technique of FIG. 6 is referred to as a "few values, big range" (FV BR) technique. The technique 600 reads (e.g., decodes) the indexes from the compressed bitstream and reorganizes (e.g., reconstructs the bitset) according to the indexes.

[0072] ​The maximum value in the range (MAX VAL) and the length of the bitset (LEN) can be related by the formula LEN = MAX VAL + 1. For example, if the range is [0, 1023], then MAX VAL = 1023. The length of the bitset is MAX VAL + 1 = 1023 + 1 = 1024.

[0073] The technique 600 can be implemented, for example, as a software program that can be executed by a computing and communication device such as one of the computing and communication devices 100A, 100B, 100C. Figure 1 The software program can include machine-readable instructions that can be stored in a memory such as the memory 110 and that, when executed by a processor such as the processor 120, can cause the computing and communication device to perform the technique 600. The technique 600 can be implemented in whole or in part in the entropy decoding unit 510 of the decoder 500. The technique 600 can be implemented using dedicated hardware or firmware. Multiple processors, memories, or both can be used. Figure 1 Figure 1 The technique 600 can be implemented, for example, as a software program that can be executed by a computing and communication device such as one of the computing and communication devices 100A, 100B, 100C. Figure 5 The technique 600 can be implemented, for example, as a software program that can be executed by a computing and communication device such as one of the computing and communication devices 100A, 100B, 100C.

[0074] The technique 600 is described with reference to a compressed bitstream, such as the compressed bitstream 502 that includes data as described with reference to Figure 7 Figure 5 The technique 600 is described with reference to a compressed bitstream, such as the compressed bitstream 502 that includes data as described with reference to Figure 7 is an example of a portion 700 of a compressed bitstream that is decoded using a few values, big range (FV BR) technique according to an embodiment of the present disclosure.

[0075] The portion 700 encodes values of a data structure INDEXES. Field 702 encodes the number of indexes (i.e., the size of the INDEXES data structure). Field 703 encodes all of the indexes of the data structure INDEXES. Field 703 includes indexes in a head-tail-alternating fashion. That is, an index from the head of the INDEXES data structure (e.g., index 704 at position 0) is encoded, then an index from the tail of the INDEXES data structure (e.g., index 706 at position N-1) is encoded, then an index from the head of the INDEXES data structure (e.g., index 708 at position 1) is encoded, then an index from the tail of the INDEXES data structure (e.g., index 710 at position N-2) is encoded, and so on until all of the indexes are encoded as indicated by ellipsis 712.

[0076] The portion 700 is encoded into a compressed bitstream, such as the compressed bitstream 502, by an encoder such as the encoder 400. Figure 4 The portion 700 is encoded into a compressed bitstream, such as the compressed bitstream 502, by an encoder such as the encoder 400. Figure 4 ​​The encoder or techniques implemented therein can receive the histogram, build a bitset from the histogram, build the INDEXES data structure by determining which bits in the bitset have a first value (e.g., 1), encode the number of values of the INDEXES data structure to obtain field 702, and alternately encode the index values 704-712 in the compressed bitstream.

[0077] As described further below, each index is encoded using the number of bits in the possible range of the index. The number of bits in the possible range of the index can be code (i.e., encoded by the encoder and decoded by the decoder) using a range coder (i.e., a range encoder at the encoder and a range decoder at the decoder). For example, if it is known that the index is only in the sub-range [20, 40] of the range [0, 255], then only 5 bits are needed to encode the index compared to the 7 bits that would be needed to encode a value in the range [0, 255]. Thus, an index code of 00000 would correspond to the value 20, an index code of 00001 would correspond to the value 21, and so on. That is, the code value must be added to the minimum bound of the sub-range to obtain the true value of the index. In another example, if the range is not a power of two, then the number of bits can be optimized to a floating point value using arithmetic coding. For example, an asymmetric numeral systems (ANS) entropy coding technique can be used.

[0078] Returning to Figure 6 At 602, technique 600 reads the number of non-zero indexes (NUM NON ZERO) from the compressed bitstream. That is, technique 600 reads field 702 of compressed bitstream 404. Although technique 600 is described with field 702 encoding the number of ones, it can be readily appreciated that technique 600 can be modified to decode the number of zero bits of the bitset in field 702. Figure 7

[0079] At 604, technique 600 initializes variable LAST VALUE FROM FRONT to -1 (e.g., one less than the minimum possible value of the range), initializes variable LAST VALUE FROM END to one more than the last possible value of the range (MAX VAL), and initializes variable NUM LEFT to the total number of indexes to read (i.e., the value of field 702). Variables LAST VALUE FROM FRONT and LAST VALUE FROM END are used to set the lower and upper bounds, respectively, of the sub-range that includes the value of the next index to be read from the compressed bitstream.

[0080] ​At 606, if there are more indexes to read (e.g., if NUM LEFT is not equal to 0), the technique 600 proceeds to 608; otherwise, the technique 600 ends.

[0081] At 608, the technique 600 sets a lower bound and an upper bound for the next index to read from the head of the INDEXES data structure. The technique 600 sets the lower bound, LOWER BOUND, to be one greater than the value of the last index to read from the head of the INDEXES. Thus, LOWER BOUND is set to LAST VALUE FROM FRONT + 1. The technique 600 sets the upper bound, UPPER BOUND, to be LAST VALUE FROM END - NUM LEFT.

[0082] To illustrate and assume there are 4 indexes to read (i.e., NUM NON ZERO = 4), when the first index (e.g., index 704) is read, all that can be said about index 704 is that it must be in the subrange [0, 252]. Index 704 cannot be 253; otherwise, the remaining three indexes would have to be 254, 255, and 256. However, since the range is [0, 255], the value 256 is impossible.

[0083] At 610, the technique 600 reads the next index in the subrange [LOWER BOUND, UPPER BOUND] (e.g., INDEXES [0]). For example, for INDEXES [0], ceiling(log2(UPPER BOUND - LOWER BOUND)) bits are read, where the function ceiling(x) maps x to the smallest integer greater than x. In another example and as mentioned above, arithmetic coding can be used. For example, the number of bits need not be an integer and arithmetic coding can be used.

[0084] At 612, the technique 600 updates the variable LAST VALUE FROM FRONT to be equal to the index read at 610. At 614, since an index was read at 610, the technique 600 decrements the number of indexes to read (NUM LEFT) by 1.

[0085] At 616, the technique 600 performs the same test as described with respect to 606. If the number of indexes to read is odd, the technique 600 will start at 614 and end after all the indexes are read. On the other hand, when the number of indexes to read is even, the technique 600 will start at 606 and end after all the indexes are read.

[0086] At 618, the technique 600 sets the lower and upper bounds of the next index to be read from the tail (i.e., end) of the INDEXES data structure. The technique 600 sets the lower bound, LOWER_BOUND, to be equal to the last index value from the front (LAST_VALUE_FROM_FRONT) plus the number of remaining indices to be read (NUM_LEFT). The technique 600 sets the upper bound, UPPER_BOUND, to be one less than the last value read from the tail (i.e., LAST_VALUE_FROM_END - 1).

[0087] To illustrate and continue from the above example, when the first index from the tail is read (e.g., index 706), all that can be said about index 706 is that it must be in the sub-range [5, 255]. Index 706 cannot be 3 or 4 because the technique 600 knows that there are two indices less than index 706 to be read. Thus, index 706 cannot have a value less than 5.

[0088] At 620, the technique 600 reads the next index in the sub-range [LOWER_BOUND, UPPER_BOUND] (e.g., INDEXES[N - 1]), which can be as described with respect to 610. At 622, the technique 600 updates the variable LAST_VALUE_FROM_END to be equal to the index read at 620. At 624, the technique 600 decrements the number of indices remaining to be read (NUM_LEFT) by 1, since an index was read at 620. From 624, the technique 600 returns to 606.

[0089] To illustrate the operation of the technique 600, given the values in the range [0, 255] and the bitset in which the bits at indices 2, 60, 200, and 255 are to be decoded, then the technique 600 reads index 2 in the range [0, 252], index 255 in the range [5, 255], index 60 in the range [3, 253], and index 200 in the range [61, 254].

[0090] As another example, given the values in the range [0, 255] and the bitset in which the bits at indices 20, 250, 251, 254, and 255 are set (i.e., are to be decoded), then the technique 600 reads index 20 in the range [0, 251], index 255 in the range [24, 255], index 250 in the range [21, 252], index 254 in the range [252, 254], and index 251 in the range [251, 253].

[0091] In an example, after reading the index, the technique 600 can reassemble the bitset based on the index read from the compressed bitstream. For example, the bit corresponding to the index can be set to one value (e.g., 1), and all other bits in the bitset can be set to the opposite value (e.g., 0).

[0092] Figure 8 is an example of a flowchart of a technique 800 for decoding a bitset using few values, a large range (FV BR) according to an embodiment of the disclosure. The bitset can be as described with reference to Figure 6 Each bit in the bitset corresponds to a respective value in a range of a minimum value (e.g., 0) to a maximum value (e.g., 255). The technique 800 decodes, from a compressed bitstream, indices of bits in the bitset. Each bit in the bitset has a first value (e.g., 1 or 0).

[0093] The technique 800 can be implemented, for example, as a software program that can be executed by one of the computing and communication devices 100A, 100B, 100C, such as a computing and communication device 100A, 100B, 100C. Figure 1 The software program can include machine-readable instructions that can be stored in a memory, such as the memory 110, and when executed by a processor, such as the processor 120, can cause the computing and communication device to perform the technique 800. Figure 1 The technique 800 can be implemented in whole or in part in the entropy decoding unit 510 of the decoder 500. The technique 800 can be implemented using dedicated hardware or firmware. Multiple processors, memories, or both can be used. Figure 1 Figure 5 At 802, the technique 800 decodes, from a compressed bitstream, a number of indices of bits in a bitset. The number of indices can be as described with reference to the field 702.

[0094] At 804, the technique 800 decodes a first index of the indices in a first range having a first lower limit and a first upper limit. The first lower limit can be equal to the minimum value; the first upper limit can be equal to the maximum value minus the number of indices of bits in the bitset having the first value minus 1; and the first index can correspond to a first bit in the bitset having the first value. That is, the technique 800 can decode the first index as described above with reference to reading the indices 704. Figure 7

[0095] At 804, the technique 800 decodes a first index of the indices in a first range having a first lower limit and a first upper limit. The first lower limit can be equal to the minimum value; the first upper limit can be equal to the maximum value minus the number of indices of bits in the bitset having the first value minus 1; and the first index can correspond to a first bit in the bitset having the first value. That is, the technique 800 can decode the first index as described above with reference to reading the indices 704. Figure 7

[0096] ​​​At 806, the technique 800 decodes a last index of the indices in a second range having a second lower bound and a second upper bound. The second lower bound can be equal to the first index plus the number of indices minus one; the second upper bound can be equal to the maximum value; and the last index can correspond to a last bit of the bit set having the first value. As described above with respect to reading the indices 706 of the FV BR technique, the technique 800 can decode the last index. Figure 7

[0097] At 808, the technique 800 can set all other bits of the bit set that are not decoded from the compressed bit stream to a second value (e.g., 0 or 1). The second value is the binary complement of the first value.

[0098] In an example, the technique 800 can further include decoding, from the compressed bit stream, a coding pattern that indicates a range and a number of indices of bits of the bit set. For example, the technique 800 can decode the bit set using a number of different decoding techniques. Thus, the compressed bit stream can include (i.e., be included by the encoder) a coding pattern that indicates to the technique 800 that the FV BR technique is to be used to decode the bit set. In an example, the coding pattern can precede the field 702 of the FV BR technique. Figure 7

[0099] In an example, the technique 800 can include decrementing, after decoding the indices from the compressed bit stream, the number of remaining indices by one, such as described with respect to 614 and 624 of the FV BR technique. Figure 6

[0100] In an example, the technique 800 can include decoding, from the compressed bit stream, a next index immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index.

[0101] The next index can be a head index. For example, the next index can be the field 708. Thus, the previous index can be the field 706 (i.e., a tail index), and the next previous index can be the field 704 (i.e., a head index). Thus, decoding the next index can include setting a lower bound of a remaining range to the next previous index plus 1, as described with respect to 608 of the FV BR technique; setting an upper bound of the remaining range to the previous index minus the number of remaining indices, also as described with respect to 608 of the FV BR technique; and decoding, from the compressed bit stream, the next index in the remaining range, as described with respect to 610 of the FV BR technique. Figure 6 Figure 6 Figure 6 The next index can be a tail index. For example, the next index can be the field 710. Thus, the previous index can be the field 708 (i.e., a head index), and the next previous index can be the field 706 (i.e., a tail index). Thus, decoding the next index can include setting a lower bound of a remaining range to the next previous index minus 1, as described with respect to 612 of the FV BR technique; setting an upper bound of the remaining range to the previous index, also as described with respect to 612 of the FV BR technique; and decoding, from the compressed bit stream, the next index in the remaining range, as described with respect to 614 of the FV BR technique.

[0102] Figure 7 ​​​​​​Thus, the previous index can be field 708 (i.e., the head index), and the next previous index can be field 706 (i.e., the tail index). Thus, decoding the next index can include setting the lower limit of the remaining range to the previous index plus the number of remaining indices, as described with respect to Figure 6 618 as described; the upper limit of the remaining range is set to the next previous index minus 1, as described in Figure 6 and decoding the next index in the remaining range from the compressed bit stream, as described in relation to Figure 6 As stated in 620.

[0103] Figure 9 is an example of a flowchart of a technique 900 for decoding a bit set according to an embodiment of the present disclosure. The bit set represents occupancy or presence information of values ​​within a range. Technique 900 can be used in cases where there are a relatively small number of all possible values ​​in the range and the range is relatively small. To give an illustrative example, the range can be [0,15] and the number of values ​​present can be four. Thus, the bit set can be, for example, BITSET=001111000...00, where the bit set length is 16 bits and the bits at indices [2,3,4,5] are set to 1. For ease of reference, Figure 9 The technique is called the "few value, small range" (FV_SR) technique.

[0104] The technique 900 can be implemented, for example, as a computer program that can be used by computing and communication devices such as Figure 1 The software program can include machine-readable instructions that can be stored in a computer system such as a computer or a communication device. Figure 1 110 of the memory, and when such Figure 1 When executed by the processor 120 of the processor 120, the computing and communication device can perform the technique 900. The technique 900 can be Figure 5 The technique 900 may be implemented in whole or in part in the entropy decoding unit 510 of the decoder 500. The technique 900 may be implemented using dedicated hardware or firmware. Multiple processors, memories, or both may be used.

[0105] The technique 900 is described with reference to a compressed bitstream, such as a bitstream including a reference Figure 10 Describing the data Figure 5 The compressed bit stream 502. Figure 10 is an example of a portion 1000 of a compressed bitstream decoded using a few value, small range (FV_SR) technique according to an embodiment of the present disclosure.

[0106] The portion 1000 includes a field 1002 that indicates the number of bits in the bitset in the field 1003 that have a particular value (i.e., 0 or 1). The field 1003 includes a series of bits. The field 1004 includes the first bit in the bitset (i.e., BITSET[0]), the field 1006 includes the second bit in the bitset (i.e., BITSET[1]), and so on. That is, the fields 1004 through 1012 are each a sequence of bits.

[0107] At 902, the technique 900 reads the number of ones (e.g., NUM_OF_ONES) from the compressed bitstream. That is, the technique 900 can read the field 1002 of Figure 10 The number of ones indicates the number of bits in the bitset that are set to 1. Although the technique 900 is described with the field 1002 encoding the number of ones, it can be readily appreciated that the technique 900 can be modified to encode the number of zeros in the field 1002.

[0108] At 904, the technique 904 initializes a variable NUM_NOT_ZERO to the number of ones read from the compressed bitstream; initializes a variable NUM_ZERO to the number of zero bits in the bitset; and initializes a variable I to 0. The variable I is a loop variable used as an index into the bitset.

[0109] The variable NUM_NOT_ZERO is used to track the number of 1 bits in the bitset that have not yet been read from the compressed bitstream. Each time a 1 bit is read from the compressed bitstream, the variable NUM_NOT_ZERO is decremented by 1.

[0110] The variable NUM_ZERO is used to track the number of 0 bits in the bitset that have not yet been read from the compressed bitstream. Each time a 0 bit is read from the compressed bitstream, the variable NUM_ZERO is decremented by 1. The variable NUM_ZERO is initialized to the total number of bits in the bitset minus the number of 1 bits (i.e., NUM_OF_ONES). Thus, for example, if the bitset represents values in the range [0, 31] and NUM_OF_ONES is 3, there are a total of 29 bits that are 0 (i.e., MAX_VAL - NUM_OF_ONES + 1 = 31 - 3 + 1 = 29). Equivalently, NUM_ZERO can be computed as the length of the bitset minus the number of 1 bits.

[0111] At 906, the technique 900 tests whether all of the 1 bits have been read or all of the 0 bits have been read, which is equivalent to testing whether there are still 0 bits that have not been read (i.e., NUM_ZERO!= 0) and there are still 1 bits that have not been read (i.e., NUM_NOT_ZERO!= 0). If so, the technique 900 proceeds to 908, otherwise the technique 900 proceeds to 914.

[0112] At 908, the technique 900 reads the next bit in the bitset (i.e., BITSET[I]) from the compressed bitstream. At 910, if the bit read at 908 is 0, the technique 900 decrements the variable NUM_ZERO by 1; otherwise, the technique 900 decrements the variable NUM_NOT_ZERO. At 912, the loop variable I is incremented by 1. From 912, the technique 900 returns to 906.

[0113] At 914, if the variable NUM_ZERO is not equal to zero, then not all 0 bits of the bitset have been read from the bitstream. Therefore, if at 914, NUM_ZERO is not equal to zero, the technique 900 proceeds to 916 to set all remaining bits of the bitset (i.e., from index I to MAX_VAL) to 0 and end; otherwise, the technique 900 proceeds to 918. On the other hand, if at 914, NUM_ZERO is equal to zero, the technique 900 proceeds to 918.

[0114] At 918, the technique 900 sets all remaining bits of the bitset (i.e., from index I to MAX_VAL, if any) to 1. The technique 900 then ends.

[0115] It is noted that when the test at 906 fails, the remaining unread bits in the bitset (if any) can be set to the complement of the last bit to be read at 908. Therefore, in an implementation, steps 914-918 can be replaced by the following steps: for J = I, MAXVAL, set BITSET[J] = ~BITSET[I-1], where ~ is the bit complement operator.

[0116] To illustrate, assume the bitset is 00110000. That is, the range is [0, 7] and the number of ones is 2. Thus, the encoder will only encode the 2 in field 1002, the 0 in field 1004, the 0 in field 1006, the 1 in field 1008, and the 1 in field 1010. The encoder needs to encode any other bits in the compressed bitstream. Technique 900 reads the 2 (at 902); initializes NUM NOT ZERO to 2, NUM ZERO to 6, and I to 0 (at 904); reads the first 0 (i.e., field 1004, BITSET[0]) (at 908); decrements NUM ZERO by 1 so that NUM ZERO is now 5 (at 910); reads the second 0 (i.e., field 1006, BITSET[1]) (at 908); decrements NUM ZERO by 1 so that NUM ZERO is now 4 (at 910); reads the first 1 (i.e., field 1008, BITSET[2]) (at 908); decrements NUM NOT ZERO by 1 so that NUM NOT ZERO is now 1 (at 910); reads the second 1 (i.e., field 1010, BITSET[3]) (at 908); and decrements NUM NOT ZERO by 1 so that NUM NOT ZERO is now 0 (at 910). At this point, technique 906 moves from 906 to 914. When NUM ZERO is 4 (i.e., not 0), technique 900 sets the remaining 4 bits of the bitset to zero (at 916).

[0117] As another example, assume the bitset is 00111111. That is, the range is [0, 7] and the number of ones is 8. Thus, the encoder will only encode the 6 in field 1002, the 0 in field 1004, the 0 in field 1006. The encoder needs to encode any other bits in the compressed bitstream. Technique 900 reads the 6 (at 902); initializes NUM NOT ZERO to 6, NUM ZERO to 2, and I to 0 (at 904); reads the first 0 (i.e., field 1004, BITSET[0]) (at 908); decrements NUM ZERO by 1 so that NUM ZERO is now 1 (at 910); reads the second 0 (i.e., field 1006, BITSET[1]) (at 908); and decrements NUM ZERO by 1 so that NUM ZERO is now 0 (at 910). At this point, technique 906 moves from 906 to 914. When NUM ZERO is 0, technique 900 moves to 918. When NUM NOT ZERO is 6 (i.e., not 0), technique 900 sets the remaining 6 bits of the bitset to 1 (at 920).

[0118] The encoder can encode the bit set decoded by technique 900 by steps including: encoding field 1002 in a compressed bitstream; maintaining variables similar to NUM_NOT_ZERO and NUM_ZERO described above; and writing each bit in the bit set to the compressed bitstream until NUM_NO_ZERO becomes zero or NUM_ZERO becomes zero.

[0119] Figure 11 is an example of a flow chart of a technique 1100 for decoding a bit set using few values, small range (FV_SR) according to an embodiment of the present disclosure. Figure 9 A bit set is described. In an example, each bit in the bit set can correspond to a corresponding value in a range from a minimum value (e.g., 0) to a maximum value (e.g., 7, 15, 31, or some other value). Technique 1100 decodes bits in the bit set from a compressed bitstream until a certain condition is met. Each bit in the bit set has a first value (e.g., 1 or 0). If the first value is 1 (0), the complement of the first value is 0 (1).

[0120] The technique 1100 can be implemented, for example, as a computer program that can be used by computing and communication devices such as Figure 1 The software program can include machine-readable instructions that can be stored in a computer system such as a computer or a communication device. Figure 1 110 of the memory, and when such Figure 1 When executed by the processor 120 of the processor 1100, the computing and communication device can perform the technique 800. The technique 1100 can be Figure 5 The technique 1100 may be implemented in whole or in part in the entropy decoding unit 510 of the decoder 500. The technique 1100 may be implemented using dedicated hardware or firmware. Multiple processors, memories, or both may be used.

[0121] At 1102, technique 1100 decodes a first number of first bits having a first value in a bit set from a compressed bit stream. The compressed bit stream can be Figure 5 The first number of first bits can be as follows: Figure 10 1002 of the field 1002. In an example, the first value can be 1 and the complement of the value can be 0. In another example, the first value can be 0 and the complement of the value can be 1.

[0122] At 1104, the technique 1100 sets a first variable to a first number of first bits in a bit set having a first value. In an example, the first variable can be Figure 9the variable NUM NOT ZERO as described with respect to 1104. At 1106, the technique 1100 sets a second variable to a number of second bits in the bit set that have a complement of the first value. In an example, the second variable can be the variable NUM ZERO as described with respect to 1106. Thus, setting the second variable to the number of second bits in the bit set that have the complement of the first value can include setting the second variable to the length minus the first number of first bits in the bit set that have the first value. Figure 9

[0123] At 1106, the technique 1100 tests whether more bits having the first value remain to be read and more bits having the complement of the first value remain to be read, as described with respect to 906 of FIG. 9. When the test succeeds (as indicated by the loop arrow 1109), the technique 1100 performs steps 1110-1114, as described with respect to 908-910 of FIG. 9. Figure 9 Figure 9

[0124] At 1110, the technique 1100 reads a bit from the compressed bit stream (i.e., the next bit in the bit set). At 1112, if the bit is equal to the first value, the technique 1100 decrements the first variable. At 1114, if the bit is equal to the complement of the first value, the technique 1100 decrements the second value. From 1114, the technique 1100 returns to 1108.

[0125] In an example, the technique 1100 can include setting remaining bits in the bit set to the first value after there are no more bits having the first value remaining to be read or no more bits having the complement of the first value remaining to be read, as described with respect to 918-920 of FIG. 9. In an example, the technique 1100 can include setting remaining bits in the bit set to the complement of the first value after there are no more bits having the first value remaining to be read or no more bits having the complement of the first value remaining to be read, as described with respect to 914-916 of FIG. 9. In an example, the technique 1100 can include setting remaining bits in the bit set to the complement of the last bit value read from the compressed bit stream after there are no more bits having the first value remaining to be read or no more bits having the complement of the first value remaining to be read. Figure 9 Figure 9

[0126] ​​​​​Each bit in the bitset can indicate the presence of a respective value in the range. In an example, the technique 1100 can further include decoding, from the compressed bitstream, a coding pattern that indicates a range and a first number of the first bit. For example, the technique 1100 can decode the bitset using a number of different decoding techniques. Thus, the compressed bitstream can include (i.e., be included by the encoder) a coding pattern that indicates to the technique 1100 that the FV_SR technique is to be used to decode the bitset. In an example, the coding pattern can precede the field 1002 of Figure 10

[0127] In some cases, the bitset can represent a number of values in a small range. For ease of reference, techniques for decoding such bitsets are referred to herein as many values, small range (MV_SR).

[0128] Some coding techniques, such as entropy coding, rely on a probability model that models the distribution of values that occur. By using a probability model (i.e., a probability distribution) based on the measured or estimated distribution of values, entropy coding can reduce the number of bits required to represent data (e.g., image or video data) to near the theoretical minimum. Entropy coding engines, such as arithmetic coding, Huffman coding, and other variable length to variable length coding engines, can use a probability distribution.

[0129] Figure 12 is an example of a flow diagram of a technique 1200 for decoding a bitset using many values, small range (MV_SR) according to an embodiment of the present disclosure. The technique 1200 can be implemented, for example, as a software program that can be executed by one of the computing and communication devices 100A, 100B, 100C, such as the computing and communication device 100A of Figure 1 The software program can include machine-readable instructions that can be stored in a memory, such as the memory 110 of Figure 1 and when executed by a processor, such as the processor 120 of Figure 1 can cause the computing and communication device to perform the technique 1200. The technique 1200 can be implemented in whole or in part in the entropy decoding unit 510 of the decoder 500. Figure 5 The technique 1200 can be implemented using specialized hardware or firmware. Multiple processors, memories, or both can be used.

[0130] The MV_SR technique uses a progressive probability to decode the next bit from the compressed bitstream. In an example, the technique 1200 can include decoding, from the compressed bitstream, a coding pattern that indicates a range and a first number of the first bit. For example, the technique 1200 can decode the bitset using a number of different decoding techniques. Thus, the compressed bitstream can include (i.e., be included by the encoder) a coding pattern that indicates to the technique 1200 that the FV_SR technique is to be used to decode the bitset. In an example, the coding pattern can precede the field 1002 of Figure 12 ​In the described progressive arithmetic coding approach, the probability distribution can be adjusted after each bit in the bitset is coded. The adjusted probability distribution can be used to code the next bit. For example, the encoder can first transmit a count of the number of bits having a first value (e.g., 1). "Transmit" can mean transmitted via a compressed bitstream to a decoder, encoded in a stored bitstream that can be decoded by the decoder at a later time, etc. The number of bits having the first value can be encoded in the bitstream and decoded (by the decoder) from the bitstream.

[0131] The length of the bitset can be known a priori by the decoder, or can be transmitted by the encoder in the compressed bitstream. In an example, the length can correspond to a maximum value in the range [0, MAX VAL] plus 1 (i.e., MAX VAL + 1). As described above, each bit in the bitset can indicate the presence of a corresponding value in the range. More generally, if the range is [MIN, MAX], the length of the bitset is given by MAX - MIN + 1.

[0132] To illustrate, assume that the length of the bitset is L and there are M bits having the first value. For the first bit in the bitset, the probability that the bit has the first value (e.g., has a value of 1) is given by equation (1):

[0133]

[0134] For all subsequent bits, the best probability estimate for a bit having the first value (e.g., equal to 1) is given by equation (2)

[0135]

[0136] The decoder can update the probability estimate without requiring additional information from the encoder (e.g., a syntax element in the compressed bitstream).

[0137] Technique 1200 is further described with reference to adjusting the probability of the next bit as the complement of the first value, where technique 1200 decodes (e.g., reads) the number of bits in the bitset having the first value.

[0138] At 1202, technique 1200 reads from the compressed bitstream the number of bits in the bitset set to 1 (e.g., the first value). In an example, the first value can be 0. At 1204, technique 1200 initializes the variables NUM ZERO, NUM NOT ZERO, and I as described with respect to 904 of FIG. 9. Figure 9

[0139] ​At 1206, the technique 1200 determines whether all of the 1 bits have been read from the compressed bitstream. If so, the technique 1200 proceeds to 1214; otherwise, the technique 1200 proceeds to 1208 to read the next bit (i.e., BITSET[I]). At 1208, the next bit (i.e., BITSET[I]) is read with a probability given by equation (3).

[0140] P(BITSET[I] = 0) = NUM_ZERO / (NUM_ZERO + NUM_NOT_ZERO) (3)

[0141] That is, the probability is equal to the number of zeros that remain unread in the bitset divided by the total number of unread bits (NUM_ZERO + NUM_NOT_ZERO). Alternatively, the technique 1200 can read the next bit with a probability of being a 1 using the probability of equation (4).

[0142] P(BITSET[I] = 1) = NUM_NOT_ZERO / (NUM_ZERO + NUM_NOT_ZERO) (4)

[0143] At 1210, the technique 1200 updates NUM_ZERO or NUM_NOT_ZERO as described with respect to 910 of FIG. 9. At 1212, the technique 1200 updates the variable I in preparation for reading the next bit of the bitset. Figure 9

[0144] Since the technique 1200 loops until all of the 1 bits are read, there can still be some unread 0 bits when the technique 1200 reaches 1214. Accordingly, at 1214, the technique 1200 sets any remaining unread bits to 0. The remaining bits are those from index I to the length of the bitset minus 1. Likewise, the remaining bits are those from index I to the maximum value of the range (MAX_VAL).

[0145] To illustrate, assume that the bitset to be decoded is 0011011011011. Thus, the number of 1 bits is 8 and the length of the bitset is 13 (or, equivalently, the range can be [0, 12]). Thus, the number of zero bits is 5.

[0146] ​Technique 1200 reads BITSET[0] with a 5 / 13 probability that the bit is 0. Since the bit is indeed 0, NUM_ZERO is decremented to 4 and the total number of bits remaining to be read is 12. Technique 1200 then reads BITSET[1] with a 4 / 12 probability that the bit is 0. Since the bit is indeed 0, NUM_ZERO is decremented to 3 and the total number of bits remaining to be read is 11. Technique 1200 then reads BITSET[2] with a 3 / 11 probability that the bit is 0. Since the bit is 1, technique 1200 decrements NUM_NOT_ZERO to 7. Technique 1200 then reads BITSET[3] with a 3 / 10 probability that the bit is 0. And so on.

[0147] Figure 13 is an example of a flowchart of a technique 1300 for decoding a set of bits according to an embodiment of the present disclosure. The set of bits represents occupancy or presence information of values in a range. Technique 1300 can be used in cases where there is a relatively large number of all possible values in the range and the range is relatively large. To give an illustrative example, the range can be [0, 255] and the number of values present can be 74. For ease of reference, Figure 13 Technique of is referred to as a "many values, big range" (MV BR) technique.

[0148] Technique 1300 can be implemented, for example, as a software program that can be executed by one of computing and communication devices 100A, 100B, 100C, such as Figure 1 computing and communication device 100A, 100B, 100C. The software program can include machine-readable instructions that can be stored in a memory, such as memory 110, and when executed by a processor, such as processor 120, can cause the computing and communication device to perform technique 1300. Technique 1300 can be implemented in whole or in part in entropy decoding unit 510 of decoder 500. Technique 1300 can be implemented using special-purpose hardware or firmware. Multiple processors, memories, or both can be used. Figure 1 Figure 1 Technique 1300 can be implemented in whole or in part in entropy decoding unit 510 of decoder 500. Technique 1300 can be implemented using special-purpose hardware or firmware. Multiple processors, memories, or both can be used. Figure 5

[0149] To illustrate technique 1300, and without loss of generality, let the set of bits BITSET be 00000111110...011000...0, where the length of the set of bits is 256 bits and the bits at indices [5, 6, 7, 8, 9, 23, 24] are set to 1.

[0150] Technique 1300 reads the index difference from the bitstream. That is, instead of reading the indices [i0, i1, i2, i3,..., i N-2 N-1 ​​​], technology 1300 reads [i0,i1-i0,i2-i1,i3-i2,...,i N-2 -i N-3 ,i N-1 -i N-2 ], which requires fewer bits to store in the compressed bitstream than the index itself. Thus, instead of [5,6,7,8,9,23,24], technique 1300 reads [5,1,1,1,1,14,1]. Since the difference between an index and the next index is at least one, in some embodiments, technique 1300 can read [i0,i1-i0-1,i2-i1-1,i3-i2-1,...,i N-2 -i N-3 -1,i N-1 -i N-2 -1]. Therefore, technique 1300 is able to read [5,0,0,0,0,13,0]. The following description uses the index difference [5,1,1,1,1,14,1].

[0151] For clarity, the term "index difference" as used herein for ease of explanation includes the index of the first index itself. That is, the value "5" is the index itself and is also covered by the term "index difference", while the remaining values ​​(i.e., 1, 1, 1, 14, 1) are true index differences.

[0152] Technique 1300 reads index differences in batches. Each batch includes the size in bits of the index differences to be read within the batch using SIZE number of bits (i.e., SIZE, field 1416), the number of index differences in the batch (i.e., NUM_OF_DIFFS, field 1418), and all NUM_OF_DIFFS index differences themselves.

[0153] Figure 14 is an example of a diagram 1400 illustrating a compressed bitstream format for use with many values ​​and a large range, according to an embodiment of the present disclosure.

[0154] Row 1402 shows the index difference read by technique 1300, which is [5, 1, 1, 1, 1, 14, 1]. Row 1404 shows the contents of the compressed bitstream in bits. Row 1406 describes the contents represented by each group of bits. As mentioned above, technique 1300 reads the index difference in batches. The compressed bitstream is shown as including four batches: batches 1408 through 1414.

[0155] Which index differences are included in which batches is determined by the encoder encoding row 1404. There are many ways for the encoder to group the index differences into batches.

[0156] In an example, the encoder can select the batches (i.e., how to group the index differences into batches) based on grouping that minimizes the number of bits needed to encode the index differences.

[0157] In an example, the encoder can include within a batch all subsequent index differences of a first index difference within the batch that can be decoded with the same number of bits as the first index or fewer number of bits than the first index. For example, given a sequence of index differences [5, 1, 1, 2, 11], the first index difference (i.e., 5) requires 3 bits. Thus, the encoder can group the index differences 5, 1, 1, and 2 into one batch. The index difference 11 requires 4 bits. Thus, 11 is not included in the same batch.

[0158] In an example, the encoder can group within the same batch all those subsequent index differences of a first index difference within the batch that can be encoded with no less than a threshold number of bits, the threshold number of bits being less than the first index. For example, if the threshold is 1, then since “5” requires 3 bits, but the subsequent index difference “1” requires no more than 1 bit, “1” is not included in the same batch as 5 because 3 - 1 > threshold (i.e., 1). Thus, the batch will only include the index difference 5 and then a new batch begins.

[0159] Each index is a value that is greater than or equal to 0 and less than the length of the bitset. If, for example, the length is 256 bits, then each index is in the range [0, 255]. Since the maximum index is 255, the number of bits needed to represent the index is 7 bits. That is, the number of bits needed to encode the index is in the range [0, 7], which itself can be encoded with 3 bits. In Figure 14 In the example of FIG. 14, the SIZE field (i.e., field 1416) is shown as a 3-bit field. More generally, given a bitset with length L, the SIZE field can be encoded in ceiling(log2(log2(length))). Knowing that SIZE is in the range [0, log2(length)], the SIZE field can be coded using a range coder. Field 1418 (i.e., the NUM_OF_DIFFS field) can be coded using a range coder. Field 1418 is in the range [1, num of elements left].

[0160] The row 1404 is interpreted (and thus read) by the technique 1300 as follows. Each index difference of the next batch requires 3 bits (i.e., 011) to be read; there is one index difference in that batch; the value is 5 (i.e., binary 101); each index difference of the next batch requires 1 (i.e., 001) bit to be read; there are 4 (i.e., 100) index differences in that batch; those values are 1, 1, 1, and 1; each index difference of the next batch requires 4 bits (i.e., 100) to be read; there is one index difference in that batch; the value is 14 (i.e., binary 1110); each index difference of the next batch requires 1 bit to be read; there is one index difference in that batch; the value is 1 (i.e., binary 1).

[0161] The decoder can infer that there are no more batches in the compressed bitstream. For example, the decoder can infer that there are no more batches in the compressed bitstream if the last index difference read corresponds to the last bit of the bitset. The decoder can infer that there are no more batches in the compressed bitstream because, for example, it knows in advance how many indices are to be read.

[0162] In an example, the index differences in a batch can be inferred. For example, if the SIZE is 1, the value of the index difference need not be included in the bitstream because there is only one possible index difference for a 1 bit; namely, index difference 1.

[0163] Returning to Figure 13 At 1302, the technique 1330 decodes, from the compressed bitstream, respective indices of bits in the bitset that have a first value. The respective indices include a first index and a second index. The first index and the second index are consecutive indices decoded from the compressed bitstream. That is, the technique 13 does not decode any other indices between the first index and the second index. Decoding the respective indices of bits can include steps 1302_2 through 1302_8.

[0164] At 1302_2, the technique 1300 obtains the first index of the first bit in the bitset that has the first value. Assuming the bitset is read from left to right, the “first bit” as used herein does not necessarily mean the leftmost bit of the bitset unless the context otherwise indicates. If the first index is the first index (i.e., “5” in [5, 6, 7, 8, 9, 23, 24]), obtaining the first index can mean reading (e.g., decoding) the first index from the compressed bitstream. If the first index is not the first index, obtaining the first index can include decoding an index difference from the compressed bitstream and adding 1 to the immediately preceding index. That is, for example, the technique 1300 can read the index difference 14 of the batch 1412 and add it to the immediately preceding index 9 to obtain 14 + 9 = 23 (i.e., the second index). Figure 14 At 1302_2, the technique 1300 obtains the first index of the first bit in the bitset that has the first value. Assuming the bitset is read from left to right, the “first bit” as used herein does not necessarily mean the leftmost bit of the bitset unless the context otherwise indicates. If the first index is the first index (i.e., “5” in [5, 6, 7, 8, 9, 23, 24]), obtaining the first index can mean reading (e.g., decoding) the first index from the compressed bitstream. If the first index is not the first index, obtaining the first index can include decoding an index difference from the compressed bitstream and adding 1 to the immediately preceding index. That is, for example, the technique 1300 can read the index difference 14 of the batch 1412 and add it to the immediately preceding index 9 to obtain 14 + 9 = 23 (i.e., the second index).

[0165] At 1302_4, the technique 1300 sets a first bit at a first index of the bitset to a first value. For example, upon obtaining the index 23, the technique 1300 sets BITSET

[23] = 1. At 1302_6, the technique 1300 decodes a first index difference from the compressed bitstream. For example, assuming the first index is 9, the first index difference would be a difference of 14 in indices. At 1302_8, the technique 1300 adds the first index difference (e.g., 14) to the first index (e.g., 9) to obtain a second index (e.g., 23). At 1302_10, the technique 1300 sets a second bit at the second index of the bitset to the first value. That is, for example, the technique 1300 sets BITSET

[23] = 1.

[0166] At 1304, the technique 1300 sets each bit (if any) in the bitset between the first index and the second index to a second value, the second value being a complement of the first value. For example, using the indices [5, 6, 7, 8, 9, 23, 24] of the bitset, the first index can be index 9 and the second index can be 23. Thus, while the 9th bit of the bitset (i.e., the bit at index 9) and the 25th bit (i.e., the bit at index 23) have the first value (e.g., 1), the technique 1300 sets the 10th through 24th bits in the bitset to the complement of the first value (e.g., 0). If the first index is 5 and the second index is 6, then no bits are set to the complement of the first value since there are no bits between the 5th bit and the 6th bit. Figure 14 As described with reference to

[0167] As described with reference to Figure 14 the index differences can be decoded in batches. Thus, decoding the respective indices of the bits can include decoding a size in bits (e.g., SIZE) from the compressed bitstream, decoding a number of index differences (e.g., NUM_OF_DIFFS) from the compressed bitstream, and decoding each of the index differences from the compressed bitstream using a number of bits equal to the size in bits (i.e., SIZE). Decoding the size in bits can include decoding the size in bits using ceiling(log2(log2(length))) bits, where length is a length of the bitset. In some examples, and as mentioned above, decoding each of the index differences from the compressed bitstream using a number of bits equal to the size in bits can include inferring the index differences.

[0168] In an example, the technique 1300 can further include decoding, from the compressed bitstream, a code mode that indicates a range and number of indices of bits of the bitset. For example, the technique 1300 can be capable of decoding the bitset using a number of different decoding techniques. Accordingly, the compressed bitstream can include (i.e., be included by the encoder) a code mode that indicates to the technique 1300 that the MV BR technique is to be used to decode the bitset. In an example, the code mode can be indicated in the field 1416A before. Figure 14

[0169] As described above, the decoder can decode the bitset using a number of different bitset decoding techniques. Which technique is used by the decoder can be indicated in the compressed bitstream using a code mode. The code mode can be one of FV BR, FV SR, MV SR, or MV BR. In this case, since there are four modes, the code mode can be read from the bitstream using 2 bits. For example, after reading the code mode from the compressed bitstream, the decoder can decode the bitset according to the code mode.

[0170] The encoder determines the code mode. In an example, the encoder can test encode the bitset using each available code mode and select the code mode that results in the smallest number of bits in the compressed bitstream. Although shorthand names (i.e., FV BR, FV SR, MV SR, or MV BR) are used in this disclosure to easily refer to the different bitset code techniques, such names do not in any way limit how the encoder selects the code mode for a particular bitset.

[0171] Figure 15 is an example of a portion 1500 of a compressed bitstream according to an embodiment of the disclosure. The portion 1500 includes a field 1502 that indicates a code mode that the decoder should use when decoding (e.g., reconstructing) the bitset using data in a field 1504, which encoded the bitset according to the code mode of the field 1502.

[0172] For ease of illustration, the techniques 600, 800, 900, 1100, 1200, and 1300 of Figure 6 , 8 9, 11, 12, and 13 are depicted and described as a series of steps or operations. However, steps or operations according to the disclosure can occur in various orders and / or concurrently. Additionally, other steps or operations not presented and described herein can be used. Further, not all illustrated steps or operations can be required to implement a method in accordance with the disclosed subject matter.

[0173] ​The words “example” or “exemplary” are used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “example” or “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs. Rather, use of the words “example” or “exemplary” is intended to present concepts in a concrete fashion. As used in this application, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless specified otherwise, or clear from context, “X includes A or B” is intended to mean any of the natural inclusive permutations. 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 foregoing instances. In addition, the terms “a” and “an” as used herein should not construe as intending to refer to only a singular entity but include the general class of which the reference typically refers to be there is at least one of the particular entity. Furthermore, unless otherwise required by context, the use of the term “another” herein is intended to convey a “one or more” meaning. As used herein, the terms “determine” and “identify” or any variant thereof include using Figure 1 one or more devices shown in FIG. 1 to select, confirm, calculate, look up, receive, determine, establish, obtain, or otherwise identify or determine in any manner.

[0174] Furthermore, to simplify illustration, although the figures and descriptions herein can include a sequence or series of operations or stages, elements of the methods disclosed herein can occur in various orders and / or concurrently. Additionally, elements of the methods disclosed herein can occur with other elements not specifically presented or described herein. Furthermore, one or more elements of a method described herein can be omitted from an embodiment of the methods of the disclosed subject matter.

[0175] Embodiments of the transmitting computing and communication device 100A and / or the receiving computing and communication device 100B (as well as algorithms, methods, instructions, etc. stored thereon and / or executed thereby) can be realized in hardware, software, or any combination thereof. The hardware can include, for example, computers, intellectual property (IP) cores, application- specific integrated circuits (ASICs), programmable logic arrays, optical processors, programmable logic controllers, microcode, microcontrollers, servers, microprocessors, digital signal processors, or any other suitable circuit. In the claims, the term “processing device” should be understood as encompassing any of the foregoing hardware, either alone or in combination. The terms “signal” and “data” are used interchangeably. Moreover, parts of the transmitting computing and communication device 100A and the receiving computing and communication device 100B need not be implemented in the same manner.

[0176] Further, in one embodiment, for example, the transmitting computing and communication device 100A or the receiving computing and communication device 100B can be implemented using a computer program that, when executed, performs any of the respective methods, algorithms, and / or instructions described herein. Additionally or alternatively, for example, a special purpose computer / processor can be utilized that can include specialized hardware for performing any of the methods, algorithms, or instructions described herein.

[0177] The transmitting computing and communication device 100A and the receiving computing and communication device 100B can be implemented, for example, on a computer in a real-time video system. Alternatively, the transmitting computing and communication device 100A can be implemented on a server and the receiving computing and communication device 100B can be implemented on a device separate from the server, such as a handheld communication device. In this case, the transmitting computing and communication device 100A can use the encoder 400 to encode content into an encoded video signal and transmit the encoded video signal to the communication device. In turn, the communication device can then use the decoder 500 to decode the encoded video signal. Alternatively, the communication device can decode content locally stored on the communication device, for example, content that was not transmitted by the transmitting computing and communication device 100A. Other suitable transmitting computing and communication device 100A and receiving computing and communication device 100B embodiments are available. For example, the receiving computing and communication device 100B can be a generally stationary personal computer, rather than a portable communication device, and / or the device that includes the encoder 400 can also include the decoder 500.

[0178] Further, all or a portion of an embodiment can take the form of a computer program product accessible from, for example, a tangible computer-usable or computer-readable medium. A computer-usable or computer-readable medium can be any device that can, for example, tangibly contain, store, communicate, or transport the program for use by or in connection with any processor. The medium can be, for example, an electronic, magnetic, optical, electromagnetic, or a semiconductor device. Other suitable mediums are also available. The foregoing description of the embodiments has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the application be limited not with this detailed description, but rather by the claims appended hereto.

Claims

1. An apparatus for decoding a set of bits, each bit in the set corresponding to a respective value in a range from a minimum value to a maximum value, the apparatus comprising: a processor configured to: Decoding, from a compressed bitstream, indices of bits in the set of bits, each of the bits having a first value, wherein decoding the indices of the bits in the set of bits comprises: decoding, from the compressed bitstream, a number of indices of the bits in the bit set; Decode a first index in a first range of indices having a first lower limit and a first upper limit, where: The first lower limit is equal to the minimum value, The first upper limit is equal to the maximum value minus the number of indices of bits in the bit set having the first value minus 1, and The first index corresponds to a first bit in the bit set having the first value; and Decode a last index in a second range of indices having a second lower bound and a second upper bound, where: The second lower limit is equal to the first index plus the number of indices minus one, The second upper limit is equal to the maximum value, and The last index corresponds to a last bit in the set of bits having the first value; and All other bits in the set of bits that have not been decoded from the compressed bitstream are set to a second value.

2. The device according to claim 1, wherein The processor is configured to: A coding mode is decoded from the compressed bitstream, wherein the coding mode indicates a range and a number of the indices of the bits in the bit set.

3. The device according to claim 1, wherein The first value is 1 and the second value is 0.

4. The device according to claim 1, wherein The processor is configured to: The number of remaining indices is decremented by one after decoding the indices from the compressed bitstream.

5. The device according to claim 4, wherein The processor is configured to: Decoding a next index from the compressed bitstream immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index, wherein decoding the next index comprises: Set the lower limit of the remaining range to the next previous index plus 1; setting the upper limit of the remaining range to the number of the previous index minus the remaining index; and The next index in the remaining range is decoded from the compressed bitstream.

6. The device according to claim 4, wherein The processor is configured to: Decoding a next index from the compressed bitstream immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index, wherein decoding the next index comprises: setting the lower limit of the remaining range to the number of the previous index plus the remaining index; setting the upper limit of the remaining range to the next previous index minus 1; and The next index in the remaining range is decoded from the compressed bitstream.

7. The device according to claim 1, wherein The minimum value is 0 and the maximum value is 255.

8. A method for decoding a set of bits, each bit in the set corresponding to a respective value in a range from a minimum value to a maximum value, the method comprising: Decoding, from a compressed bitstream, indices of bits in the set of bits, each of the bits having a first value, wherein decoding the indices of the bits in the set of bits comprises: decoding, from the compressed bitstream, a number of indices of the bits in the bit set; Decode a first index in a first range of indices having a first lower limit and a first upper limit, where: The first lower limit is equal to the minimum value, The first upper limit is equal to the maximum value minus the number of indices of bits in the bit set having the first value minus 1, and The first index corresponds to a first bit in the bit set having the first value; and Decode a last index in a second range of indices having a second lower bound and a second upper bound, where: The second lower limit is equal to the first index plus the number of indices minus one, The second upper limit is equal to the maximum value, and The last index corresponds to a last bit in the set of bits having the first value; and All other bits in the set of bits that have not been decoded from the compressed bitstream are set to a second value.

9. The method according to claim 8, further comprising: A coding mode is decoded from the compressed bitstream, wherein the coding mode indicates a range and a number of the indices of the bits in the bit set.

10. The method according to claim 8, wherein The first value is 1 and the second value is 0.

11. The method according to claim 8, further comprising: The number of remaining indices is decremented by one after decoding the indices from the compressed bitstream.

12. The method according to claim 11, further comprising: Decoding a next index from the compressed bitstream immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index, wherein decoding the next index comprises: Set the lower limit of the remaining range to the next previous index plus 1; setting the upper limit of the remaining range to the number of the previous index minus the remaining index; and The next index in the remaining range is decoded from the compressed bitstream.

13. The method according to claim 11, further comprising: Decoding a next index from the compressed bitstream immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index, wherein decoding the next index comprises: setting the lower limit of the remaining range to the number of the previous index plus the remaining index; setting the upper limit of the remaining range to the next previous index minus 1; and The next index in the remaining range is decoded from the compressed bitstream.

14. The method according to claim 8, wherein The minimum value is 0 and the maximum value is 255.

15. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a processor, facilitate performing operations for decoding a set of bits, each bit in the set corresponding to a respective value in a range from a minimum value to a maximum value, the operations comprising: Decoding, from a compressed bitstream, indices of bits in the set of bits, each of the bits having a first value, wherein decoding the indices of the bits in the set of bits comprises: decoding, from the compressed bitstream, a number of indices of the bits in the bit set; Decode a first index in a first range of indices having a first lower limit and a first upper limit, where: The first lower limit is equal to the minimum value, The first upper limit is equal to the maximum value minus the number of indices of bits in the bit set having the first value minus 1, and The first index corresponds to a first bit in the bit set having the first value; and Decode a last index in a second range of indices having a second lower bound and a second upper bound, where: The second lower limit is equal to the first index plus the number of indices minus one, The second upper limit is equal to the maximum value, and The last index corresponds to a last bit in the set of bits having the first value; and All other bits in the set of bits that have not been decoded from the compressed bitstream are set to a second value.

16. The non-transitory computer-readable storage medium of claim 15, the operations further comprising: A coding mode is decoded from the compressed bitstream, wherein the coding mode indicates a range and a number of the indices of the bits in the bit set.

17. The non-transitory computer-readable storage medium of claim 15, wherein: The first value is 1 and the second value is 0.

18. The non-transitory computer-readable storage medium of claim 15, the operations further comprising: The number of remaining indices is decremented by one after decoding the indices from the compressed bitstream.

19. The non-transitory computer-readable storage medium of claim 18, the operations further comprising: Decoding a next index from the compressed bitstream immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index, wherein decoding the next index comprises: Set the lower limit of the remaining range to the next previous index plus 1; setting the upper limit of the remaining range to the number of the previous index minus the remaining index; and The next index in the remaining range is decoded from the compressed bitstream.

20. The non-transitory computer-readable storage medium of claim 18, the operations further comprising: Decoding a next index from the compressed bitstream immediately after decoding a previous index, the previous index being decoded immediately after decoding a next previous index, wherein decoding the next index comprises: setting the lower limit of the remaining range to the number of the previous index plus the remaining index; setting the upper limit of the remaining range to the next previous index minus 1; and The next index in the remaining range is decoded from the compressed bitstream.

21. The non-transitory computer-readable storage medium of claim 15, wherein: The minimum value is 0 and the maximum value is 255.

Citation Information

Patent Citations

  • Content adaptive variable length coding (CAVLC) decoding

    US20050135691A1

  • Systems and methods for decoding compressed data

    US7046175B1