Method and apparatus for encoding and decoding image or video
By determining and updating the initial values of context-related parameters in the entropy codec, the problem of low entropy encoding and entropy decoding efficiency in the prior art is solved, and a more efficient video compression and decompression process is achieved.
Patent Information
- Application Number
- CN202380072295.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-12-19
- Filing Date
- 2023-10-03
- Publication Date
- 2025-05-16
AI Technical Summary
In the process of entropy encoding and entropy decoding, existing video compression technologies are difficult to effectively utilize the context information of images or videos, resulting in low compression efficiency.
By determining the initial values of the context-dependent parameters of the entropy codec, these initial values are determined based on the bit rate, and corresponding initialization and updates are performed during the encoding and decoding process to improve the efficiency of entropy encoding and entropy decoding.
It improves the encoding and decoding efficiency of images or videos, enhances the information utilization rate during compression, and reduces the complexity of encoding and decoding.
Smart Images

Figure CN120019650A_ABST
Abstract
Description
[0001] This application claims priority to European Application No. 22306525.1 filed on October 11, 2022 and No. 22306937.8 filed on December 19, 2022, which are incorporated herein by reference in their entirety. Technical Field
[0002] The present embodiment generally relates to video compression. The present embodiment relates to a method and apparatus for encoding or decoding an image or video. More specifically, the present embodiment relates to improved entropy encoding and decoding. Background Art
[0003] In order to achieve high compression efficiency, image and video coding schemes usually use prediction and transformation to exploit spatial and temporal redundancy in video content. Typically, intra-frame or inter-frame prediction is used to exploit intra-image or inter-frame correlations, and then the difference between the original block and the predicted block (usually expressed as prediction error or prediction residual) is transformed, quantized, and entropy encoded. In order to reconstruct the video, the compressed data is decoded through the inverse process corresponding to entropy coding, quantization, transformation, and prediction. Summary of the invention
[0004] According to one aspect, a method for encoding an image or video is provided. The method includes: determining an initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol in a binary symbol sequence representing the image or video, wherein the initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; initializing at least one parameter to the initial value; and entropy encoding at least one binary symbol based on the initialized at least one parameter.
[0005] According to another aspect, a device for encoding an image or video is provided. The device includes one or more processors, which are operable to: determine an initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol in a sequence of binary symbols representing the image or video, wherein the initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; initialize at least one parameter to the initial value; and entropy encode at least one binary symbol based on the initialized at least one parameter.
[0006] According to another aspect, a method for decoding an image or a video is provided.
[0007] In an embodiment, the method comprises: determining at least one initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol in a binary symbol sequence representing an image or a video, wherein the at least one initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; initializing at least one parameter to the determined initial value; and entropy decoding the binary symbol sequence based on the initialized at least one parameter.
[0008] In another embodiment, the method includes: determining at least one initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol in a binary symbol sequence representing an image or video, wherein the at least one initial value is determined based on decoding information representing the at least one initial value; initializing at least one parameter to the determined initial value; and entropy decoding the binary symbol sequence based on the initialized at least one parameter.
[0009] According to another aspect, an apparatus for decoding an image or a video is provided.
[0010] In an embodiment, the apparatus comprises one or more processors operable to: determine at least one initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol in a sequence of binary symbols representing an image or video, wherein the at least one initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; initialize at least one parameter to the determined initial value; and entropy decode the sequence of binary symbols based on the initialized at least one parameter.
[0011] In another embodiment, the apparatus includes one or more processors operable to: determine at least one initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol in a binary symbol sequence representing an image or video, wherein the at least one initial value is determined based on decoding information representing the at least one initial value; initialize at least one parameter to the determined initial value; and entropy decode the binary symbol sequence based on the initialized at least one parameter.
[0012] In some embodiments, the at least one parameter includes at least one of: a probability value, a window size for updating the probability value after encoding or decoding a binary symbol, and a weight used in determining a weighted average of the probability values for encoding or decoding the binary symbol.
[0013] Further embodiments are described herein that may be used alone or in combination.
[0014] One or more embodiments also provide a computer program, which includes instructions that, when executed by one or more processors, cause one or more processors to perform a method for encoding / decoding an image or video according to any embodiment described herein. One or more of the present embodiments also provide a non-transitory computer-readable medium and / or a computer-readable storage medium on which instructions for encoding / decoding an image or video according to the method described herein are stored.
[0015] One or more embodiments further provide a computer-readable storage medium on which a bitstream generated according to the method described herein is stored. One or more embodiments further provide a method and apparatus for sending or receiving a bitstream generated according to the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A block diagram of a system in which aspects of the present embodiments may be implemented is shown.
[0017] Figure 2 A block diagram of an embodiment of a video encoder is shown in which aspects of the present embodiments may be implemented.
[0018] Figure 3 A block diagram of an embodiment of a video decoder is shown that may implement aspects of the present embodiments.
[0019] Figure 4 An example of a CABAC encoding scheme is shown.
[0020] Figure 5 An example of CABAC parameter initialization is shown.
[0021] Figure 6 An example of a flow chart for decoding a single binary decision in VVC is shown.
[0022] Figure 7 An example of a method for encoding an image or a video according to an embodiment is shown.
[0023] Figure 8 An example of a method for decoding an image or a video according to an embodiment is shown.
[0024] Fig. 9 An example of a method for encoding an image or a video according to an embodiment is shown.
[0025] Fig.10 An example of a method for decoding an image or a video according to an embodiment is shown.
[0026] Fig.11 An example of a method for encoding an image or a video according to an embodiment is shown.
[0027] Fig.12 An example of a method for encoding an image or a video according to an embodiment is shown.
[0028] Fig.13 A block diagram of a system in which aspects of the present embodiment may be implemented is shown according to another embodiment.
[0029] Fig.14 Two remote devices are shown communicating over a communication network according to an example of the present principles.
[0030] Fig.15 The syntax of a signal according to an example of the present principles is shown.
[0031] Fig.16A An example of a method for encoding an image or a video and a method for decoding an image or a video according to an embodiment is shown.
[0032] Fig. 16B An example of a method for encoding an image or a video and a method for decoding an image or a video according to another embodiment is shown.
[0033] Fig.17 An example of a method for encoding an image or a video and a method for decoding an image or a video according to another embodiment is shown.
[0034] Fig.18 An example of a method for encoding an image or a video and a method for decoding an image or a video according to another embodiment is shown.
[0035] Fig.19 An example of a method for encoding an image or a video and a method for decoding an image or a video according to another embodiment is shown. DETAILED DESCRIPTION
[0036] The present application describes various aspects, including tools, features, embodiments, models, methods, etc. Many of these aspects are specific and are usually described in a manner that may sound restrictive, at least to show the various features. However, this is for the purpose of describing clearly and does not limit the application or scope of these aspects. In fact, all different aspects can be combined and interchanged to provide further aspects. In addition, these aspects can also be combined and interchanged with the aspects described in the previous application documents.
[0037] The aspects described and contemplated in this application can be implemented in many different forms. Figure 1 , Figure 2 and Figure 3Some embodiments are provided, but other embodiments are contemplated, and Figure 1 , Figure 2 and Figure 3 The discussion does not limit the breadth of implementation. At least one aspect generally relates to video encoding and decoding, and at least one other aspect generally relates to transmitting a generated or encoded bitstream. These and other aspects can be implemented as methods, apparatus, computer-readable storage media storing instructions for encoding or decoding video data according to any of the methods described, and / or computer-readable storage media storing a bitstream generated according to any of the methods described.
[0038] In this application, the terms "reconstruction" and "decoding" may be used interchangeably, the terms "pixel" and "sample" may be used interchangeably, and the terms "image", "picture" and "frame" may be used interchangeably.
[0039] Various methods are described herein, and each method includes one or more steps or actions for implementing the method. Unless the correct operation of the method requires a specific order of steps or actions, the order and / or use of specific steps and / or actions can be modified or combined. In addition, terms such as "first", "second" and the like can be used in different embodiments to modify elements, components, steps, operations, etc., such as "first decoding" and "second decoding". Unless specifically required, the use of such terms does not mean that the operation of modification is sorted. Therefore, in this example, the first decoding need not be performed before the second decoding, and can occur, for example, before the second decoding, during, or in a time period overlapping with the second decoding.
[0040] Aspects of the present application are not limited to VVC or HEVC, and can be applied, for example, to other standards and recommendations (whether existing or developed in the future) and extensions of any such standards and recommendations (including VVC and HEVC). Unless otherwise specified or technically excluded, the aspects described in the present application can be used alone or in combination.
[0041] Figure 1A block diagram of an example of a system that can implement various aspects and embodiments is shown. System 100 can be embodied as a device including the various components described below, and is configured to perform one or more aspects described in this application. Examples of such devices include, but are not limited to, a variety of electronic devices, such as personal computers, notebook computers, smart phones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, networked home appliances, and servers. The elements of system 100 can be embodied in a single integrated circuit, multiple ICs, and / or discrete components, either individually or in combination. For example, in at least one embodiment, the processing and encoder / decoder elements of system 100 are distributed over multiple ICs and / or discrete components. In various embodiments, system 100 is coupled to other systems or other electronic devices in a communication manner, for example, via a communication bus or by dedicated input and / or output ports. In various embodiments, system 100 is configured to implement one or more aspects described in this application.
[0042] The system 100 includes at least one processor 110 configured to execute instructions loaded therein to implement various aspects described in the present application, for example. The processor 110 may include embedded memory, input-output interfaces, and various other circuits known in the art. The system 100 includes at least one memory 120 (e.g., a volatile memory device and / or a non-volatile memory device). The system 100 includes a storage device 140, which may include non-volatile memory and / or volatile memory, including but not limited to EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash memory, disk drive, and / or optical drive. As a non-limiting example, the storage device 140 may include an internal storage device, an additional storage device, and / or a network accessible storage device.
[0043] The system 100 includes an encoder / decoder module 130, which is configured to process data to provide encoded video or decoded video, for example, and the encoder / decoder module 130 may include its own processor and memory. The encoder / decoder module 130 represents a module that can be included in a device to perform encoding and / or decoding functions. As is well known, a device may include one or both of the encoding and decoding modules. In addition, the encoder / decoder module 130 can be implemented as a separate element of the system 100, or can be incorporated into the processor 110 as a combination of hardware and software known to those skilled in the art.
[0044] Program code loaded onto the processor 110 or the encoder / decoder 130 to perform various aspects described herein may be stored in the storage device 140 and subsequently loaded onto the memory 120 for execution by the processor 110. According to various embodiments, one or more of the processor 110, the memory 120, the storage device 140, and the encoder / decoder module 130 may store one or more of a variety of items during execution of the processes described herein. These stored items may include, but are not limited to, input video, decoded video or a portion of decoded video, bitstreams, matrices, variables, and intermediate or final results from equations, formulas, operations, and arithmetic logic processing.
[0045] In some embodiments, memory inside the processor 110 and / or the encoder / decoder module 130 is used to store instructions and provide processing working memory required during encoding or decoding. However, in other embodiments, memory outside the processing device (e.g., the processing device can be the processor 110 or the encoder / decoder module 130) is used for one or more of these functions. The external memory can be a memory 120 and / or a storage device 140, such as a dynamic volatile memory and / or a non-volatile flash memory. In several embodiments, the external non-volatile flash memory is used to store the operating system of the TV. In at least one embodiment, a fast external dynamic volatile memory (e.g., RAM) is used as a working memory for video encoding and decoding operations (e.g., MPEG-2 (MPEG refers to the Moving Picture Experts Group, MPEG-2 is also known as ISO / IEC 13818, 13818-1 is also known as H.222, 13818-2 is also known as H.262), HEVC (HEVC refers to High Efficiency Video Coding, also known as H.265 and MPEG-H Part 2) or VVC (Versatile Video Coding, a new standard being developed by the Joint Video Experts Group (JVET))).
[0046] Inputs to the elements of system 100 may be provided through a variety of input devices as shown in block 105. Such input devices include, but are not limited to: (i) a radio frequency (RF) section that receives an RF signal transmitted over the air by, for example, a broadcaster; (ii) a component (COMP) input terminal (or a set of COMP input terminals); (iii) a universal serial bus (USB) input terminal; and / or (iv) a high-definition multimedia interface (HDMI) input terminal. Figure 1 Other examples not shown include composite video.
[0047] In various embodiments, the input device of block 105 has associated input processing elements known in the art. For example, the RF portion may be associated with elements suitable for (i) selecting a desired frequency (also referred to as selecting a signal or bandwidth limiting a signal to a frequency band), (ii) down-converting the selected signal, (iii) again bandwidth limiting to a narrower frequency band to select (for example) a signal frequency band (which may be referred to as a channel in some embodiments), (iv) demodulating the down-converted and bandwidth-limited signal, (v) performing error correction, and (vi) performing demultiplexing to select a desired packet stream. The RF portion of various embodiments includes one or more elements to perform these functions, including, for example, a frequency selector, a signal selector, a bandwidth limiter, a channel selector, a filter, a down-converter, a demodulator, an error corrector, and a demultiplexer. The RF portion may include a tuner that performs multiple of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., an intermediate frequency or a near-baseband frequency) or baseband. In a set-top box embodiment, the RF part and its associated input processing element receive the RF signal transmitted by wired (for example, cable) medium, and filter to the desired frequency band again by filtering, down-conversion and perform frequency selection. Various embodiments rearrange the order of above-mentioned (and other) elements, remove some of them, and / or add other elements of similar or different functions. Adding element can include inserting element between existing element, for example inserting amplifier and analog / digital converter. In various embodiments, the RF part comprises antenna.
[0048] In addition, the USB and / or HDMI terminals may include respective interface processors for connecting the system 100 to other electronic devices via USB and / or HDMI connections. It should be appreciated that various aspects of input processing (e.g., Reed-Solomon error correction) may be implemented as desired within a separate input processing IC or within the processor 110. Similarly, aspects of USB or HDMI interface processing may be implemented as desired within a separate interface IC or within the processor 110. The demodulated, error corrected, and demultiplexed streams are provided to a variety of processing elements, including, for example, the processor 110 and the encoder / decoder 130, which operate in conjunction with memory and storage elements to process the data streams as desired for presentation on an output device.
[0049] The various components of system 100 may be disposed within an integrated housing. Within the integrated housing, the various components may be interconnected and transmit data between each other using suitable connection means 115, such as internal buses (including I2C buses), wiring, and printed circuit boards known in the art.
[0050] The system 100 includes a communication interface 150 that allows communication with other devices via a communication channel 190. The communication interface 150 may include, but is not limited to, a transceiver configured to send and receive data via the communication channel 190. The communication interface 150 may include, but is not limited to, a modem or a network card, and the communication channel 190 may be implemented, for example, within a wired and / or wireless medium.
[0051] In various embodiments, data is streamed to system 100 using a Wi-Fi network such as IEEE 802.11 (IEEE refers to the Institute of Electrical and Electronics Engineers). The Wi-Fi signals of these embodiments are received by a communication channel 190 and a communication interface 150 adapted for Wi-Fi communication. The communication channel 190 of these embodiments is typically connected to an access point or router that provides access to an external network including the Internet to allow streaming applications and other over-the-top communications. Other embodiments use a set-top box to provide streaming data to system 100, and the set-top box transmits data via an HDMI connection of an input box 105. Other embodiments use an RF connection of an input box 105 to provide streaming data to system 100. As described above, various embodiments provide data in a non-streaming manner. In addition, various embodiments use wireless networks other than Wi-Fi, such as cellular networks or Bluetooth networks.
[0052] The system 100 can provide output signals to a variety of output devices, including a display 165, a speaker 175, and other peripherals 185. The display 165 of various embodiments includes one or more of a touch screen display, an organic light emitting diode (OLED) display, a curved display, and / or a foldable display. The display 165 can be used for a television, a tablet computer, a laptop computer, a mobile phone, or other devices. The display 165 can also be integrated with other components (for example, as in a smartphone) or separate (for example, an external display for a laptop computer). In examples of various embodiments, other peripherals 185 include one or more of a stand-alone digital video disc (or digital versatile disc) (DVR, used for both terms), a disc player, a stereo system, and / or a lighting system. Various embodiments use one or more peripherals 185 that provide functions based on the output of the system 100. For example, a disc player performs the function of playing the output of the system 100.
[0053] In various embodiments, control signals are communicated between the system 100 and the display 165, speaker 175, or other peripheral device 185 using signals such as AV.Link, CEC, or other communication protocols that allow device-to-device control with or without user intervention. The output devices may be communicatively coupled to the system 100 via dedicated connections through respective interfaces 160, 170, and 180. Alternatively, the output devices may be connected to the system 100 through the communication interface 150 using a communication channel 190. The display 165 and speaker 175 may be integrated with other components of the system 100 in a single unit in an electronic device, such as a television. In various embodiments, the display interface 160 includes a display driver, such as a timing controller (T Con) chip.
[0054] Display 165 and speaker 175 may alternatively be separate from one or more other components, for example if the RF portion of input 105 is part of a separate set-top box. In various embodiments where display 165 and speaker 175 are external components, the output signals may be provided through dedicated output connections, including, for example, an HDMI port, a USB port, or a COMP output.
[0055] The embodiments may be implemented by computer software or hardware or a combination of hardware and software executed by the processor 110. As a non-limiting example, the embodiments may be implemented by one or more integrated circuits. The memory 120 may be of any type suitable for use in the technical environment and may be implemented using any appropriate data storage technology, such as optical memory devices, magnetic memory devices, semiconductor-based memory devices, fixed memory, and removable memory, as non-limiting examples. The processor 110 may be of any type suitable for the technical environment and may include one or more microprocessors, general-purpose computers, special-purpose computers, and processors based on multi-core architectures (as non-limiting examples).
[0056] Figure 2 An encoder 200 is shown. Variations of the encoder 200 are contemplated, but for the sake of clarity, the encoder 200 will be described below without describing all contemplated variations.
[0057] In some embodiments, Figure 2 Also shown is an encoder that improves the HEVC standard or the VVC standard or an encoder that adopts a technology similar to HEVC or VVC, such as the encoder ECM being developed by JVET (Joint Video Exploration Team).
[0058] Prior to encoding, the video sequence may undergo pre-encoding processing (201), such as applying a color transform to the input color picture (e.g., converting from RGB 4:4:4 to YCbCr 4:2:0), or performing remapping on the input picture components to obtain a more compression-resistant signal distribution (e.g., using histogram equalization of the color components), or adjusting the picture size (e.g., downscaling). Metadata may be associated with the pre-processing and appended to the bitstream.
[0059] In encoder 200, a picture is encoded by encoder elements as described below. The picture to be encoded is divided (202) and processed, for example, in units of CUs (coding units) or blocks. In the present disclosure, different expressions may be used to refer to such units or blocks resulting from the picture division. Such terms may be coding units or CUs, coding blocks or CBs, luma CBs or blocks. A CTU (coding tree unit) may refer to a group of blocks or a group of units. In some embodiments, a CTU may be considered as a block, or as a unit in itself.
[0060] For example, each unit is encoded using intra or inter mode. When the unit is encoded in intra mode, intra prediction (260) is performed. In inter mode, motion estimation (275) and compensation (270) are performed. The encoder decides (205) which of intra mode or inter mode to use to encode the unit, and indicates the intra / inter decision, for example, by a prediction mode flag. The encoder can also mix (263) intra prediction results and inter prediction results, or mix results from different intra / inter prediction methods. For example, the prediction residual is calculated by subtracting (210) the predicted block from the original image block.
[0061] The motion refinement module (272) uses the already available reference pictures to refine the motion field of the block without referring to the original block. The motion field for a region can be considered as the set of motion vectors for all pixels in the region. If the motion vectors are sub-block based, the motion field can also be represented as the set of motion vectors for all sub-blocks in the region (all pixels within a sub-block have the same motion vector, and the motion vector may vary from sub-block to sub-block). If a single motion vector is used for the region, the motion field of the region can also be represented by a single motion vector (the motion vector is the same for all pixels in the region).
[0062] The prediction residual is then transformed (225) and quantized (230). The quantized transform coefficients, along with motion vectors and other syntax elements, are entropy encoded (245) to output a bitstream. The encoder can skip the transform and apply quantization directly to the untransformed residual signal. The encoder can bypass the transform and quantization, i.e., directly encode the residual without applying the transform or quantization process.
[0063] The encoder decodes the coded block to provide a reference for further prediction. The quantized transform coefficients are dequantized (240) and inverse transformed (250) to decode the prediction residual. The decoded prediction residual and the prediction block are combined (255) to reconstruct the image block. A loop filter (265) is applied to the reconstructed image to perform, for example, deblocking / SAO (sample adaptive offset) filtering to reduce coding artifacts. The filtered image is stored in a reference picture buffer (280).
[0064] Figure 3 A block diagram of a video decoder 300 is shown. In the decoder 300, the bitstream is decoded by the decoder elements as described below. The video decoder 300 generally performs the same Figure 2 The decoding process is the reverse of the encoding process described in . The encoder 200 also typically performs video decoding as part of encoding the video data.
[0065] Specifically, the input to the decoder includes a video bitstream, which may be generated by the video encoder 200. The bitstream is first entropy decoded (330) to obtain transform coefficients, motion vectors, and other encoding information. Picture partition information indicates how the picture is partitioned. Therefore, the decoder can segment (335) the picture according to the decoded picture partition information. The transform coefficients are dequantized (340) and inverse transformed (350) to decode the prediction residual. The decoded prediction residual is combined (355) with the prediction block to reconstruct the image block.
[0066] The prediction block may be obtained (370) from an intra prediction (360) or a motion compensated prediction (i.e., inter prediction) (375). The decoder may blend (373) intra prediction results with inter prediction results, or blend results from multiple intra / inter prediction methods. Prior to motion compensation, the motion field may be refined (372) using already available reference pictures. A loop filter (365) is applied to the reconstructed image. The filtered image is stored in a reference picture buffer (380).
[0067] The decoded image may be further subjected to post-decoding processing (385), such as inverse color conversion (e.g., from YCbCr 4:2:0 to RGB 4:4:4) or inverse remapping that performs the inverse of the remapping process performed in the pre-encoding process (201), or resizing the reconstructed picture (e.g., upscaling). The post-decoding processing may use metadata derived in the pre-encoding process and signaled in the bitstream.
[0068] Some embodiments described herein relate to context-based entropy encoding and context-based entropy decoding.
[0069] Any of the embodiments described herein may be implemented, for example, in the entropy encoding module 245 of the image or video encoder 200 or in the entropy decoding module 330 of the image or video decoder 300 .
[0070] In current video codecs, most of the signaling is done using entropy coding of the values to be sent to the decoder. In particular, when using context-adaptive binary arithmetic coding (e.g. CABAC), only binary values are encoded, while common values (except binary values) should be binarized first. In context-based entropy codecs, for each individual bin (or binary symbol) to be encoded / decoded, a context is associated to that bin. One or more probabilities are associated with the context, where the probability represents the probability that the bin is equal to a given binary value. Depending on the implementation of the encoder, a given binary value can be the most likely binary value or the least likely binary value of the bin. The probabilities of the context associated with each bin to be encoded / decoded are updated after each encoding / decoding of a bin associated with the same context. The speed at which the probabilities are updated is a parameter of the model. Another parameter is the initial probabilities used by the model (i.e. the probabilities used to encode / decode the first bin associated to that context).
[0071] Figure 4 An example of entropy coding is summarized in:
[0072] -For each bin, select the context associated with the bin. Each context contains the following information:
[0073] ○ Current probability. In recent codecs (e.g. VVC), 2 probabilities are maintained, p0 and p1.
[0074] ○ Window size, which corresponds to the update speed of the probabilities. Usually, the probabilities are updated as follows: p' = w*b + (1-w)*p, where p is the probability for encoding bin b, p' is the updated probability for encoding the next bin (associated with the same context), b is the current bin encoded / decoded with probability p, and w is the window size. In recent codecs, 2 different window sizes w0 and w1 are used to update the 2 probabilities. Each bin is then encoded / decoded by considering the average of the two probabilities p0 and p1.
[0075] ○ Initial value of probability. Usually, the same initial probability is used to initialize p0 and p1.
[0076] The parameters used for a given context (initial probability, window size) depend on external parameters, such as:
[0077] - Type of slice to be coded: intra, bidirectional prediction, unidirectional (I, B or P);
[0078] -Quantization parameter qp.
[0079] Each context uses fixed (ie, between encoder and decoder) parameters, and these parameters are decided for each context.
[0080] At the beginning of each slice, the parameters are initialized, such as Figure 5 shown.
[0081] In addition, a flag called sh_cabac_init_flag is signaled in the slice header for non-intra slices, which allows switching the parameters used for initialization: for B slices, when this flag is true, P slice parameter sets will be used for initialization, and when this flag is false, B slice parameters will be used. A similar mechanism is also used for P slices.
[0082] if (sh_slice_type!=I){ if(pps_cabac_init_present_flag) sh_cabac_init_flag u(1)
[0083] In VVC, CABAC entropy coding includes the following major changes compared to the CABAC design in HEVC:
[0084] -Core CABAC engine;
[0085] - Independent residual coding structure for transform blocks and transform skip blocks;
[0086] -Context modeling for transform coefficients.
[0087] The CABAC engine in HEVC uses a table-based probability transition process between 64 different representative probability states. In HEVC, the range ivlCurrRange representing the state of the coding engine is quantized into a set of 4 values before calculating the new interval range. HEVC state transitions can be implemented using a table containing all 64×4 8-bit pre-calculated values to approximate the value of ivlCurrRange*pLPS(pStateIdx), where pLPS is the probability of the minimum possible symbol (LPS) and pStateIdx is the index of the current state. In addition, a pre-calculated LUT can be used to implement decoding decisions. First, the LUT is used to obtain ivlLpsRange, as shown in the following formula (3-47). Then, ivlLpsRange is used to update ivlCurrRange and calculate the output binVal.
[0088] ivlLpsRange = rangeTabLps[ pStateIdx ][ qRangeIdx ] (3-47)
[0089] In VVC, probabilities are represented linearly by probability indexes pStateIdx. Therefore, all calculations can be done with equations without LUT operations. In order to improve the accuracy of probability estimates, a multi-hypothesis probability update model is applied. pStateIdx used for interval subdivision in the binary arithmetic encoder is a combination of two probabilities pStateIdx0 and pStateIdx1. The two probabilities are associated with each context model and updated independently with different adaptation rates. The adaptation rates of pStateIdx0 and pStateIdx1 for each context model are pre-trained based on the statistics of the relevant intervals. The probability estimate pStateIdx is the average of the two hypothesis estimates.
[0090] Figure 6 An example of a flow chart for decoding a single binary decision in VVC is shown.
[0091] As in HEVC, VVC CABAC also has a QP-related initialization process called at the beginning of each slice. Given an initial value of the luma QP for the slice, the initial probability state of the context model (denoted as preCtxState) is derived as follows:
[0092] m = slopeIdx × 5 – 45 (3-48)
[0093] n = (offsetIdx << 3) +7 (3-49)
[0094] preCtxState = Clip3(1, 127, ((m × (QP - 32)) >> 4) + n) (3-50)
[0095] Where slopeIdx and offsetIdx are functions of the context number and slice type, which can be stored in 3 bits respectively, and the total initialization value is represented with 6 bits of precision. The probability state preCtxState directly represents the probability in the linear domain. Therefore, preCtxState only needs to perform appropriate shift operations before entering the arithmetic coding engine and save the mapping from logarithm to linear domain and the 256-byte table.
[0096] Then, initialize the two probabilities as follows:
[0097] pStateIdx0 = preCtxState << 3 (3-51)
[0098] pStateIdx1 = preCtxState << 7 (3-52)
[0099] Extended Precision
[0100] The intermediate precision used in the arithmetic coding engine has been increased, which includes three elements. First, the precision of both probability states has been increased to 15 bits, compared to 10 bits and 14 bits in VVC, respectively. Second, the LPS range update process has been modified as follows:
[0101] if q>=16384,q=2 15 –1–q
[0102] R LPS =((range*(q>>6))>>9)+1,
[0103] Where range is a 9-bit variable, indicating the width of the current interval, q is a 15-bit variable, indicating the probability state of the current context model, R LPS is the updated range for LPS. This operation can also be implemented by querying 512×256 entries in a 9-bit lookup table. Third, at the encoder side, the 256-entry lookup table for bit estimation in the VTM is expanded to 512 entries.
[0104] Window size based on slice type
[0105] Since the statistics of different slice types are different, it is beneficial to update the context probability state at the optimal rate for a given slice type. Therefore, for each context model, three window sizes for I, B and P slice types are predefined as initialization parameters.
[0106] The context initialization parameters and window size are retrained.
[0107] Adaptive update rate, weighted average, and state transfer
[0108] While the update rule for the two probability states pStateIdx0 and pStateIdx1 remains the same, the encoding of the nth bit of the context is performed using probability states pStateIdx0' and pStateIdx1', which are obtained from pStateIdx0 and pStateIdx1 using a window size that depends on the n-1th bin:
[0109] pStateIdx0'(n) = (1-w0'(b n-1 ))*pStateIdx0(n-1) + w0'(b n-1 )*b n-1 (3-53)
[0110] pStateIdx1'(n) = (1-w1'(b n-1))*pStateIdx1(n-1) + w1'(b n-1 )*b n-1 (3-54)
[0111] The probability state used for encoding can be a weighted average of pStateIdx0' and pStateIdx1' (rather than a simple average as before):
[0112] pStateIdx = alpha*pStateIdx0' + (1-alpha)*pStateIdx1' (3-55)
[0113] where the parameter alpha is obtained from the LUT and depends on the context and slice type.
[0114] The initial state of some B or P slices can be inherited from the previous slice instead of being reinitialized on each slice: more precisely, the two final states of each B slice (or P slice) are saved and used to initialize the next B slice (or P slice) sharing the same temporal level and qp within the same intraframe period.
[0115] Therefore, in the above method, the CABAC state probability updated after encoding the bin of a B or P slice is saved and used to initialize the CABAC probability used to encode the bin of the next B or P slice.
[0116] Some embodiments presented herein relate to the estimation of initial values of some parameters of a context-based arithmetic codec (eg CABAC).In the embodiments presented herein, initial values of context-related parameters are dynamically estimated to improve coding efficiency.
[0117] Therefore, a method and apparatus for estimating initial values of context parameters are provided herein, which allow for better efficiency when entropy encoding bins of a frame, where the bins are associated with contexts. For example, these parameters may be any of the following: probabilities p0 and p1 associated with the context, update window sizes w0 and w1 for updating the probability of the context, and weight alpha in equation (3-55).
[0118] This article describes a method for determining the initial value of a parameter of a context associated with a bin to be entropy encoded / decoded. In an image or video codec, the method can be used for one or more contexts defined by an entropy codec. In any of the embodiments described herein, the entropy codec can be an arithmetic codec, such as a CABAC codec.
[0119] It should be understood that the term "initial values" refers to values used to initialize the parameters of a context adaptive entropy codec (e.g., a CABAC codec), the current values of some of these parameters may subsequently evolve over time as binary symbols are encoded / decoded, for example, to update the probability of a context after encoding / decoding a binary symbol.
[0120] In the present disclosure, the term "parameter" refers to a parameter associated with a context of a context adaptive entropy codec (e.g., a CABAC codec or any other entropy codec that operates using an adaptive context). In the present disclosure, parameter or CABAC parameter or context parameter may be used interchangeably. In the present disclosure, context or model, CABAC context or CABAC model may be used interchangeably.
[0121] Figure 7 An example of a method 700 for encoding an image or video according to an embodiment is shown. From an encoding module (eg, Figure 2 The encoding module of the encoding module 245 obtains a binary symbol (bin) sequence. The bin sequence is, for example, a symbol input to the entropy encoding module 245, in which non-binary symbols are binarized. Therefore, the binary symbol sequence represents the image or video being encoded.
[0122] While embodiments are described herein in the context of a context being associated with a bin sequence to be encoded, the embodiments may be applied to any context used by an arithmetic encoder and one or more of its parameters.
[0123] At 701, an initial value is obtained for at least one parameter of a considered context of an entropy codec. The initial value is obtained based on video data. Some variants described further below are used to determine the initial value. In a variant, the initial value is obtained based on a bit rate determination for entropy encoding a set of binary symbols associated with the context. The set of binary symbols can be binary symbols obtained from a slice that is a previous slice or the same slice as the slice under consideration.
[0124] At 702, at least one parameter is initialized with the initial value, and at 703, at least one binary symbol is entropy encoded using the at least one parameter initialized with the initial value.
[0125] Figure 8 An example of a method 800 for decoding an image or video according to an embodiment is shown. A sequence of bins (binary symbols) to be decoded is obtained, for example as Figure 3 The input of the entropy decoding module 330. The binary symbol sequence represents the image or video to be decoded.
[0126] At 801, an initial value is obtained for at least one parameter of the considered context of an entropy decoder. The initial value is obtained based on the video data. Some variants described further below are used to obtain the initial value at the decoder. In one variant, the initial value can be determined at the decoder in the same manner as in the encoder. In another variant, information representing the initial value is decoded from the video data.
[0127] At 802, at least one parameter is initialized with an initial value, and at 803, at least one binary symbol is entropy decoded using the at least one parameter initialized with the initial value.
[0128] In one variant, the initial values of the parameters can be determined at the encoder and decoder side. In this variant, the initial values are determined based on the first set of binary symbols and used to encode / decode the second set of binary symbols. For example, the first set of binary symbols is a bin generated when encoding the previous slice. In another variant, the first set of binary symbols is the same as the second set of binary symbols but the binary symbols of the previously encoded slice.
[0129] In these variants, the estimated optimal parameters are saved and used, for example, to initialize the next B or P slice (or the next frame of the same type and / or same QP).
[0130] This variant can be implemented on the decoder side to avoid transmitting the determined initial values for encoding the second set of binary symbols. This variant determines the best model parameters in terms of bit rate (i.e. the entropy encoding that provides the lowest bit rate) during decoding of the first set of bins in order to obtain alternative model parameters for further decoding of the second set of bins.
[0131] In another variant, the initial value of the parameter is determined on the encoder side and sent to the decoder. In this other variant, at 801, information representing the initial value of the parameter is decoded from data (such as a bitstream received by the decoder) for decoding an image or video accessed by the decoder. In this other variant, at the encoder, the first binary symbol set and the second binary symbol set can be the same, because the initial value determined at the encoder for initializing the entropy encoder is sent to the decoder. The information representing the initial value can be the initial value itself, or the difference between the determined initial value and the default value known to the decoder. In another variant, there are multiple initial value sets associated with one or more contexts available at the decoder, and the information representing the initial value indicates which initial value sets are to be used to entropy decode the bin sequence. The decoder can know multiple initial value sets, such as specified in the video standard, or sent together with the video data.
[0132] In another variant, the encoder transmits a flag at the beginning of each slice to signal whether the parameters of the entropy codec should indeed be updated (ie initialized with estimated initial values) or whether default parameters should be used upon initialization.
[0133] Fig. 9 A method 900 for encoding a sequence of binary symbols representing image or video data for at least one context of an entropy encoder of a video encoder according to an embodiment is shown. At 901, at least one initial value is determined for at least one parameter of the context based on previously processed binary symbols. For example, the previously processed binary symbol is a sequence of binary symbols associated with the same context that was generated when encoding a current frame ( Fig. 9 ) or the previous frame or slice of the slice ( Fig. 9 The initial value is generated when encoding the first frame in the encoding process. In this embodiment, the same mechanism is performed at the encoder and decoder to determine the initial value. Therefore, the determined initial value is not used here to encode the bin of the previous frame or slice.
[0134] At 902, RDO (Rate Distortion Optimization) is performed on the current frame or slice. The current frame or slice may be of the same type (I, B, or P) and / or the same QP as the previous frame or slice under consideration. RDO may be done using default initial values for the context or updated values determined at 901. RDO is performed to determine a coding decision for a block of the current frame or slice. The current frame is then encoded by applying the coding decision made by RDO for the block, thereby providing a sequence of binary symbols to be entropy encoded representing residuals and syntax elements.
[0135] At 903, after encoding the current frame and before writing to the bitstream, the binary symbols generated by encoding the current frame are entropy encoded using the updated values determined at 901. The binary symbols generated by encoding the current frame are also entropy encoded using default values. The best entropy encoding (i.e., the entropy encoding that provides the lowest bit rate) is selected. At 904, the entropy encoded bins generated by the selected entropy encoding and an indication (or flag) for signaling whether to use the updated values determined at 901 or the default values to encode the bins of the current frame are written to the bitstream.
[0136] In a variant, multiple update models are determined and saved at 901. In this variant, multiple initial values for the same parameter can be determined. For example, when initial values for multiple parameters for the same context are determined at 901, multiple sets of initial values for the parameters are available. These sets can be determined based on the first frame or different frames. At 903, each available model is evaluated and the model that provides the lowest bit rate is selected by the encoder and signaled to the decoder, for example, by an index.
[0137] refer to Fig. 9 The described mechanism can also be applied to another variant, where the initial values for the parameters are determined within a slice that is not necessarily of class B or P, and used to update the parameters within the same slice; for example, the update can be performed after a certain number of bins for the context are observed, or once the norm of the estimated gradient reaches a certain threshold. The update can be performed only once per context, or periodically for every N bins in the context (e.g., N is specified in the specification of the decoder or signaled to the decoder), or every time the norm of the estimated gradient reaches a certain threshold (at which time the gradient is reinitialized to 0).
[0138] Fig.10 A method 1000 for decoding a binary symbol sequence representing an image or video data for at least one context of an entropy codec of a video decoder according to an embodiment is shown. In this embodiment, the same mechanism is performed at the encoder and the decoder to determine the initial value. Therefore, step 901 of method 1000 is similar to the step performed for method 900. At 901, at least one initial value is determined for at least one parameter of the same context based on a binary symbol sequence associated with the context obtained when decoding a previous frame or slice. At 1002, an indication is decoded indicating whether to entropy decode the binary symbols of the current frame using the initial value obtained at 901, or whether to use a default initial value, such as a value hard-coded in the decoder or a value defined by a decoder standard specification. In a variant, step 1002 can be performed at the decoder before step 901, so that an update to the initial value is determined at 901 only if the decoded indication so indicates.
[0139] As in method 900, multiple update sets for initial values may be available at the decoder, and the decoded indication supports selection of an update set to be used for entropy decoding of binary symbols for the current frame. These available sets may be determined at 901 under different configurations, or may be known by the decoder (e.g., defined by a decoder standard specification). At 1003, the initial value indicated by the indication is used to entropy decode the binary symbols for the current frame.
[0140] Some of the following embodiments further specify how to determine the initial values for the parameters for the current slice. These embodiments can all be applied to any parameters of the context-based entropy codec: initial state probability, update window, offset relative to the update window used during encoding (see (3-53) and (3-54)), weight alpha (see (3-55)). These embodiments can be further adjusted by introducing a benchmark for estimating the initial values, for example, the bitrate gain in the current frame must be higher than a given value, and / or, at least a given number of bins of the parameters for the context under consideration must be encoded.
[0141] Complete Search
[0142] In an embodiment, the determination of the initial value is based on a complete search, where the bit rate estimates for all parameter combinations can be accurately calculated, and then the best combination is selected as the optimal combination. This embodiment has the most desirable advantages; however, the large number of combinations to be tested implies a huge computational overhead (both on the encoder and decoder side when the initial value is also determined at the decoder).
[0143] A variant that greatly simplifies the estimation task is to restrict the search to a subset of values for the parameters. For example, to determine the window size without having to test all possible window sizes, one can only test for +1 or -1 offsets relative to the original window (the default window known to the decoder).
[0144] When initial values for multiple parameters must be determined, another variant is to consider changes to only one parameter at a time. For the previous example, if windows w0 and w1 can both have an offset of +1 or -1, then instead of considering all 9 possible combinations, only one window needs to be changed at a time, testing 5 configurations.
[0145] Gradient-based Example
[0146] In another embodiment, the initial values for the parameters are determined by a gradient descent type method: considering the observed bin sequence as a constant, the bit rate can be expressed as a function of the context parameters F. In practice, the bit rate for N bits can be estimated by an entropy lower bound:
[0147]
[0148] The probability p n is the probability model used for encoding (see (3-55)), p n (b n ) represents the assignment to the observed binb nThe above expression is developed through equations (3-53), (3-54) and through the above update rule, which allows the bitrate to be expressed as a function F of the parameters (initial state, update window and weight alpha). The gradient of F with respect to different parameters can then be calculated: this is usually obtained recursively when entropy encoding the bins. The initial value is adjusted based on the gradient. For example, following the same idea as gradient descent, further adjustments in the opposite direction of the gradient should reduce the bitrate.
[0149] In one variant, the adjusted step size is proportional to the gradient: If x represents a parameter vector, then the corrected parameters are:
[0150]
[0151] in Represents the gradient of F with respect to parameter x (i.e., partial derivative vector), and a is a fixed positive number.
[0152] In another variation, each parameter is changed by a fixed amount only if the absolute value of the partial derivative of F with respect to that parameter is greater than some value.
[0153] Both variants can be further generalized by taking more than just one step in the opposite direction of the gradient: in this case, the gradient is re-evaluated before each step.
[0154] Signal
[0155] As in the previous section, it is proposed to determine better context parameters in order to obtain better coding efficiency than when using default initial values of the parameters. However, in this variant, the initial values to be used for the parameters are determined only on the encoder side, for example using any of the above embodiments. The encoder then signals the determined initial values to the decoder so that the two agree on the parameters used to encode the bins in each context. The initial value can be signaled as a correction to the default initial value, for example by signaling the difference between the determined initial value and the default initial value known to the decoder.
[0156] Fig.11An example of a method 1100 for encoding a binary symbol sequence representing an image or video data for at least one context of an entropy codec of a video encoder according to an embodiment is shown. At 1102, RDO (Rate Distortion Optimization) is performed to encode a frame / slice. In this embodiment, RDO is accomplished using default initial values of the context that can be obtained from the LUT at 1101. These default initial values are, for example, values defined by a video standard specification or values known between the encoder and decoder. RDO generates a binary symbol sequence at 1103. At 1104, an optimized initial value for the entropy codec is determined, for example based on any of the above embodiments (full search, gradient estimation). At 1105, it is determined whether the initial value determined at 1104 provides a lower bit rate than when the default initial value is used, and the initial value that provides the lowest bit rate is selected. At 1106, the initial value selected at 1105 ( Fig.11 The default initial value indicated by the dotted line or the updated initial value indicated by the long dashed line above is used to entropy encode the bin generated at 1103 to generate a bitstream (1107). An indication is also signaled in the bitstream, which signals whether the initial value determined at 1104 is used to entropy encode the bin of the current frame. If the initial value determined at 1104 is used to entropy encode the bin, information indicating the initial value is also signaled in the bitstream.
[0157] Fig.12 An example of a method 1200 for encoding a binary symbol sequence representing an image or video data for at least one context of an entropy codec of a video encoder according to another embodiment is shown. This variant is a multi-pass variant in which the encoder performs RDO using updated parameters (initial values determined for a frame) to further optimize the bitstream. At 1202, in a first pass, RDO is performed using default initial values of the context that can be obtained from the LUT at 1201. The first RDO pass generates a binary symbol sequence at 1203. At 1204, an optimized initial value for the entropy codec is determined, for example based on any of the above embodiments (full search, gradient estimation). At 1205, it is determined whether the initial value determined at 1204 provides a lower bit rate than when the default initial value is used, and the initial value that provides the lowest bit rate is selected.
[0158] If the selected initial value is the initial value determined at 1204 ( Fig.12 If the path is represented by the long dashed line in FIG. 1 ), a second RDO pass is performed at 1208 using the initial value determined at 1204. The second RDO pass generates a new binary symbol sequence at 1209. At 1206, the selected initial value is used to entropy encode the bin generated at 1209 to produce a bitstream (1207).
[0159] At 1205, if the selected initial value is the default value ( Fig.12 ), then at 1206, the default initial value is used to entropy encode the bin generated at 1203 to produce a bit stream (1207).
[0160] An indication is also signaled in the bitstream, which signals whether the initial value determined at 1204 is used for entropy encoding the bin of the current frame. If the initial value determined at 1204 is used for entropy encoding the bin, information indicating the initial value is also signaled in the bitstream.
[0161] Figure 16 to Fig.19 Further embodiments are provided for encoding and decoding a sequence of binary symbols representing image or video data, more specifically wherein the corrected initial values are passed to a decoder. In the following, embodiments are described for CABAC context / model parameters, but the described embodiments can be applied to any entropy codec based on context adaptive coding and decoding.
[0162] Fig.16A A method for encoding an image or video and a corresponding method for decoding an image or video according to an embodiment are shown, wherein the corrected initial values (or corrected parameters) determined for the CABAC context / model parameters for the current frame are passed to the future / next frame to be encoded or decoded. When the corrected initial values are provided to the future frame, these values can then be used during the RDO of the future frame.
[0163] Fig.16A An encoder block 1610 is included, which depicts RDO performed for a current frame and provides as output a sequence of binary symbols representing the coding decisions (1615) for blocks of the current frame determined by the RDO. Conventionally, the RDO selects (1611) the best coding mode in terms of rate / distortion for each block of the current frame. During the RDO for each block, the RDO generates a sequence of binary symbols representing the value provided by the coding selection (1611), and selects a CABAC context (1612) for each bin of the sequence to encode the bin, entropy encodes the bin sequence (1613), thereby providing a bit rate for the block (1614). The block is reconstructed according to the coding selection and the distortion is evaluated. The coding selection that provides the best rate / distortion tradeoff is selected as the best coding mode for the block. This process is repeated for each block of the current frame. In some variants, the RDO for the block can be done jointly, that is, the coding selections for multiple blocks are jointly optimized.
[0164] In the RDO block (1610), the CABAC model used in the entropy coding (1613) is initialized using default initial values, e.g., for the first frame in the video, the default initial values are initial values known to both the encoder and the decoder. For subsequent frames, the default initial values are updated (1628) using the initial values determined for the current frame in the RDO entropy coding (1620) performed for the current frame.
[0165] Fig.16A Also shown is an encoder block 1620, which depicts RDO entropy coding for encoding a bin sequence representing a coding decision (1615) for each block of the current frame. The RDO entropy coding searches for a new initial value for one or more parameters of one or more CABAC models that reduces the bit rate at which the bin sequence uses the CABAC model. The new initial value can be obtained using an offset i relative to a default initial value, for example, the default initial value is the initial value used during RDO (1610). Different new initial values can be evaluated for each parameter of the CABAC model for optimization. To this end, the RDO entropy coding loops over different offsets for the current parameter for optimization. For example, the best offset for the current parameter is initialized to 0. For each offset (1621), the CABAC model is initialized (1622) using the corresponding new initial value, and then the bin is entropy coded (1623) using the CABAC model, and it is checked whether the offset provides a lower bit rate for the bin (1624). If this is the case, the offset is stored as the best offset. Then, if there is one, another offset of the current parameter is evaluated, otherwise, RDO entropy coding switches to another parameter to optimize for the CABAC model or to another CABAC model for optimization until all parameters for each CABAC model are evaluated. In some variants, only a subset of the CABAC models are optimized. In other variants, the offset to be evaluated is within a given range.
[0166] Optimal offsets for CABAC model parameters are retrieved (1625), and a bin sequence of coding decisions (1615) is entropy encoded (1626) using a CABAC model initialized with new initial values obtained from the optimal offsets determined for the parameters to provide a bitstream (1627) representing an image or video. Information representing the optimal offsets is also encoded in the bitstream (1627).
[0167] In this embodiment, the new initial values obtained from the optimal offset are also used to initialize the CABAC model for the next frame (1628). Therefore, the new initial values are used for the RDO (1610) of the next frame, and these new initial values become the default initial values for the next frame.
[0168] Fig.16AA decoder block 1630 is also included, which depicts the decoding process of the bitstream. The optimal offset is decoded from the bitstream (1631) to obtain a new initial value for the CABAC model. The CABAC model is initialized (1632) using the obtained new initial value, and the bin sequence for the current frame is entropy decoded (1633) to obtain a value representing the encoding of the block. The block of the current frame is then decoded and reconstructed (1634) to provide a reconstructed current frame as an output. The new initial value obtained from the decoded offset is also used to update (1635) the CABAC model for the next frame. Since the offset represents a correction to the default initial value of the parameter for the CABAC model, the default initial value for the next frame must be updated with the new initial value of the current frame so that the offset signaled for the next frame is used to reconstruct the correct initial value for the next frame. This update is performed in the same manner as the update (1628) performed on the encoder side.
[0169] In a variant, when the corrected initial value determined for the current frame is used for a future frame, a constraint can be set to pass the corrected initial value to the next frame. For example, a constraint based on the temporal ID of the frame can be set, where the temporal ID of the frame is the index of the temporal level of the frame in the hierarchical temporal decomposition of the video frame to be encoded. In this variant, the corrected initial value determined for the current frame is provided to a future frame with the same temporal ID or a future frame with a higher temporal ID than the current frame. In this variant, when the video frame sequence is decomposed into hierarchical temporal layers, the initial value for updating each temporal level must be saved so that the CABAC model for the frame is initialized using the initial value corresponding to the temporal level of the frame. This variant can also be implemented in any of the embodiments described herein.
[0170] Fig. 16B A method 1600' for encoding an image or video and a corresponding method for decoding an image or video according to an embodiment are shown, wherein updated values of parameters of a CABAC model are passed to a future / next frame to be encoded or decoded. In other words, the final CABAC state of the CABAC model obtained after entropy encoding of the current frame is used to update the CABAC model of the next frame. In this embodiment, the optimal initial values for the CABAC parameters determined for entropy encoding the current frame in RDO entropy encoding (1620) are used to entropy encode the bins of the current frame, and the final state of the entropy encoding is used to update the CABAC model used in RDO for the next frame.
[0171] Fig. 16BAn encoder block 1610' is included that depicts RDO performed on the current frame and provides as output a sequence of binary symbols representing coding decisions (1615') for blocks of the current frame determined by the RDO. Blocks 1611' to 1615' in the RDO block 1610' are Fig.16A The RDO block 1610 is the same as blocks 1611 to 1615 shown in FIG.
[0172] Fig. 16B Also shown is an encoder block 1620', which depicts RDO entropy coding for encoding a sequence of bins representing coding decisions (1615') for each block of the current frame. Blocks 1621'-1627' in the RDO block 1620' are similar to Fig.16A The RDO block 1620 is the same as blocks 1621 to 1627 shown in FIG.
[0173] After entropy encoding (1626') the values of the current frame using the CABAC model initialized with the optimal initial values (1625'), the final CABAC state of the CABAC model is used to update (1628') the CABAC model used for the RDO for the next frame. That is, after entropy encoding (1626') the current frame, the parameters of the CABAC model in the RDO (1612') are initialized with the corresponding values of the final state of the CABAC model.
[0174] Fig. 16B Also included is a decoder block 1630', which depicts the decoding process of the bitstream. The optimal offset is decoded from the bitstream (1631') to obtain a new initial value for the CABAC model. The CABAC model is initialized using the obtained new initial value (1632'), and the bin sequence for the current frame is entropy decoded (1633') to obtain a value representing the encoding of the block. The block of the current frame is then decoded and reconstructed (1634') to provide a reconstructed current frame as output.
[0175] The final CABAC state of the entropy decoding is used to update (1635') the CABAC model for the next frame, i.e. the parameters of the CABAC model for the next frame are initialized with the corresponding values of the final state of the CABAC model after entropy decoding (1633') of the current frame. Since the offset represents a correction to the default initial values for the CABAC model parameters, the default initial values for the next frame must be updated in a similar way to what is done at the encoder side (1628') in order to reconstruct the correct initial values for the next frame and signal the offset for the next frame.
[0176] Fig.17A method 1700 for encoding an image or video and a corresponding method for decoding an image or video according to an embodiment are shown, wherein the original CABAC parameters are passed to the future / next frame to be encoded or decoded. In other words, in this embodiment, the final CABAC state obtained after the RDO of the CABAC model for the current frame is used to update the CABAC model for the next frame, while determining the optimized initial value for entropy encoding of the current frame. Fig.16A or Fig. 16B In contrast to the embodiment of FIG. 5 , the optimal initial values for the CABAC parameters determined for entropy encoding the current frame are not used for RDO for the next frame.
[0177] Fig.17 An encoder block 1710 is included, which depicts RDO performed on the current frame and provides as output a sequence of binary symbols representing the coding decisions (1715) for the blocks of the current frame determined by the RDO. Blocks 1711 to 1715 in the RDO block 1710 are similar to Fig.16A The RDO block 1610 is the same as the blocks 1611 to 1615 depicted.
[0178] After the RDO for the current frame is completed, a final CABAC state (1716) of the CABAC model is obtained to update the CABAC model for RDO for the next frame. The final CABAC state can be saved when performing RDO, or the values provided by the coding decision are entropy encoded using the same CABAC model as used in RDO (1712). The final CABAC state corresponds to the parameter state of the CABAC model after entropy encoding the bin sequence generated for the current frame using the coding decision (1715) using the default initial values used to initialize the CABAC model.
[0179] In the RDO block 1710, the CABAC model used in entropy coding (1713) is initialized using default initial values, e.g., for the first frame, the default initial values are values known to both the encoder and the decoder. For subsequent frames, the default initial values are updated using the final CABAC state (1716) determined after the RDO of the previous frame.
[0180] Fig.17 Also shown is an encoder block 1720, which depicts RDO entropy coding for encoding a bin sequence representing the coding decision (1715) for each block of the current frame. In this embodiment, the optimal initial values for the CABAC parameters are determined independently for each frame, and the optimal initial values are not carried over to the next frame. Blocks 1721 to 1727 in the RDO block 1720 are similar to Fig.16A The RDO block 1620 is the same as blocks 1621 to 1627 depicted in FIG.
[0181] Fig.17 Also included is a decoder block 1730, which depicts the decoding process of the bitstream. The optimal offset is decoded from the bitstream to obtain a new initial value for initializing the CABAC model (1731). The bin sequence for the current frame is entropy decoded (1732) to obtain a value representing the encoding of the block. The block of the current frame is then decoded and reconstructed (1733).
[0182] In this embodiment, the new initial value determined in the RDO entropy coding (1720) is encoded in the bitstream as an offset relative to the default initial value that the decoder should know so that the decoder reconstructs the same initial value as the initial value used on the encoder side. In this embodiment, the new initial value is obtained using an offset of the final CABAC state obtained using the default CABAC model used in RDO (1716) relative to the CABAC model of the previous frame. Therefore, the decoder block (1730) includes a final state CABAC block (1736) that entropy encodes the decoded value for the current frame provided by the entropy decoding (1732). The entropy coding (1736) uses the same default CABAC model used for the current frame in the RDO encoder (1712). This allows the final CABAC state that has been used on the encoder side to be obtained on the decoder side to update the default CABAC model for the next frame (1735). In this way, the default CABAC model for the next frame is updated and the offset decoded for the next frame can be used to reconstruct a new initial value for the next frame.
[0183] The above embodiment can be further modified so that at the next frame, the encoder tests the reference Fig.16A , 16B or any modification of the default CABAC model described in 17. This may be achieved in an embodiment by storing default CABAC models in a database, which are used as starting points to test possible modifications to the initial value of the starting point.
[0184] According to a variant, the database may include one default CABAC model at a time, which is updated at each frame or periodically before or after entropy encoding of the current frame using CABAC state values, wherein the initial values of the CABAC model are learned in RDO entropy encoding. In other variants, the database includes multiple default CABAC models. The CABAC models learned for one or more frames are added to the database as default CABAC models, and signaling is sent to the decoder to indicate which default CABAC models are used to reconstruct the initial values of the CABAC model parameters using the decoded offsets for the current frame.
[0185] Fig.18A method 1800 for encoding an image or video and a corresponding method for decoding an image or video according to this embodiment are shown, wherein a default CABAC model is saved in a database (1829) as a starting point for searching for a CABAC model for a future / next frame to be encoded or decoded.
[0186] Fig.18 An encoder block 1810 is included that depicts RDO performed on the current frame and provides as output a sequence of binary symbols representing the coding decisions (1815) for the blocks of the current frame determined by the RDO. Blocks 1811 to 1815 in the RDO block 1810 are similar to Fig.16A The RDO block 1610 is the same as the blocks 1611 to 1615 depicted in FIG. Fig.16A Or similar to what is done in 16B, in RDO, the default CABAC model used in entropy coding (1812) is initialized with default initial values, for example, for the first frame, the default initial values are values known to both the encoder and the decoder. Subsequently, the default initial values are updated using the best initial values determined from the previous frame in the RDO entropy coding of the previous frame (long dashed arrow, 1825), or using the value of the final CABAC state of the entropy coding (dotted arrow, 1826). The default initial values used in RDO are added to the database as new available starting models (1829).
[0187] Fig.18 Also shown is an encoder block 1820, which depicts RDO entropy coding for encoding a bin sequence representing the coding decision (1815) for each block of the current frame. In this embodiment, the best initial values of the CABAC parameters are searched from a CABAC model starting point selected from a CABAC model database (1829). The CABAC model database includes one or more CABAC parameter sets for one or more default CABAC models, and these CABAC parameters have given values. The CABAC model database is initially populated with the default CABAC model known at both the encoder and the decoder. When other initial values for the CABAC model parameters are determined by RDO entropy coding 1820, the CABAC model database is then populated.
[0188] During RDO entropy encoding, a default CABAC model is selected (1828) from a CABAC model database as a starting point for determining optimal initial values for the CABAC model. The optimal initial values are determined in the same manner as reference Fig.16A , 16B or the method described in the embodiment of 17. Blocks 1821 to 1827 in RDO block 1820 are similar to Fig.16AThe RDO block 1620 is the same as blocks 1621 to 1627 shown in FIG.
[0189] In this embodiment, an offset from the initial value of the CABAC model of the selected starting point (1828) is used to obtain a new initial value to be evaluated. The RDO entropy coding 1820 may be iterated for different CABAC models (1829) selected as starting points in the database, and the starting point that provides the lowest bit rate is selected. In this case, when there may be multiple starting points and the initial value is determined as an offset from the starting point value, information representing the starting point in the database is signaled in the bitstream (1827) so that the decoder knows which starting point to use.
[0190] Fig.18 A decoder block 1830 is also included, which depicts the decoding process of the bitstream. The best offset is decoded from the bitstream to obtain a new initial value (1831) for initializing the CABAC model (1832). If multiple starting points are available at the encoder, information representing the default CABAC model used as the starting point is decoded and used to identify the CABAC model used as the starting point for the current frame, and the new initial value is reconstructed based on the decoded offset.
[0191] The bin sequence for the current frame is entropy decoded (1833) to obtain a value representing the encoding of the block. The block of the current frame is then decoded and reconstructed (1834). Depending on the variant, the new initial value (long dashed arrow) obtained (1831) or the final CABAC state after entropy encoding (dotted arrow) is added to the database (1835) so that it can be used as the default CABAC model for the next frame (1835).
[0192] Fig.19 A method 1900 for encoding an image or video and a corresponding method for decoding an image or video according to an embodiment are shown, wherein multiple RDO passes are performed, and wherein the best initial value determined by RDO entropy coding is used for the second RDO pass, thereby further optimizing the bitstream and improving the compression rate. For other embodiments, Fig.19 The encoder RDO block 1910, the RDO entropy coding block 1920 and the decoder block 1930 are included. These blocks 1910, 1920 and 1930 can be Fig.16A , 16B , 17, 18, or any of the corresponding blocks in other related embodiments.
[0193] Fig.19Also included is an encoder block 1940 that depicts a second RDO performed on the current frame and provides as output a sequence of binary symbols representing coding decisions (1945) for blocks of the current frame determined by the second RDO. The second RDO is performed in a manner similar to the RDO block 1910, except that the CABAC model (1942) used in the entropy coding (1943) is initialized using the optimal initial value (1925) determined by the RDO entropy coding block (1920).
[0194] Optimal offsets for CABAC model parameters are retrieved (1925) and a bin sequence of coding decisions (1945) is entropy encoded using new initial values obtained from the optimal offsets for the parameters (1926) to provide a bitstream representing an image or video (1927). Information representing the optimal offsets is also encoded in the bitstream (1927).
[0195] Depending on the variant, the new initial value obtained from the optimal offset may be used to initialize the CABAC model for the next frame (long dashed line, 1912), or the final CABAC state of the entropy coding may be used (dashed line, 1926).
[0196] At the decoder side (1930), the same update should be done to the default CABAC model for the next frame.
[0197] In some of the above embodiments, information representing the determined initial values is signaled as a correction or offset relative to the default initial values of the CABAC model parameters. Some variants are described below for signaling corrections / offsets of CABAC model parameters. Any of the variants described below can be applied to any or all CABAC parameters (update windows w0 and w1, weight alpha, initial probability, shifted windows w0' and w1').
[0198] In a variant, the encoder signals parameter corrections for each CABAC context. In this variant, initial values for the parameters may be determined for all contexts of the entropy codec specified in the video encoder. Given the large number of contexts (e.g., 571 CABAC contexts in the ECM-6.0 reference software), this creates a bitrate overhead that is often unnecessary because many contexts are empty or associated with very few bins.
[0199] In another embodiment, not all contexts are updated, but only a subset of the entropy codec contexts are updated. In this other variant, an indication is signaled in the bitstream to identify the contexts to be updated. For example, the index of the context to be updated is signaled in the bitstream, such as at the beginning of each intraframe period or at the beginning of each slice. In a variant, this can be achieved by establishing a ranking of the most commonly used contexts, such as an ordered list specifying these contexts can be hard-coded in the specification of the decoder. Then, an indication is signaled in the bitstream, which signals a number of contexts in the ordered list that should be updated.
[0200] In another variant, the index of the context to be updated is hard-coded in the specification of the decoder.
[0201] In another variation, multiple context combinations may be available, and the encoder signals an indication of a context combination to be updated among the multiple context combinations.
[0202] In another embodiment, global signaling is performed, ie only one signaling for all CABAC models to be updated is transmitted.
[0203] In a variation of this embodiment, the signaling defines a parameter offset common to all CABAC contexts to be updated. For example, the signaling defines a same offset + 1 that applies to all update windows for all CABAC contexts. Thus, a single signal for the update windows for all CABAC contexts is transmitted.
[0204] In another variant, one signaling is used for all CABAC contexts / models, but the signaling is interpreted as a different offset for each context. This can be achieved by a lookup table (LUT) hardcoded in the specification. For example, the signaling of an offset of +1 means that the offset for the first context is +1, the offset for the second context is 0, the offset for the third context is -1, and so on. The following table is an example where one of the two possible global indices is signaled to correct the parameters of 6 CABAC contexts simultaneously.
[0205]
[0206] In another embodiment, the context is first divided into a given number of clusters: for example, the number of clusters and the assignment of each context to a given cluster may be hard-coded in the specification or signaled at the beginning of each intraframe period or frame. The encoder then transmits a signaling for each cluster.
[0207] In a variant, the signaling defines a parameter offset common to all CABAC contexts in the cluster. For example, the signaling defines an offset of +1 to all update windows for all CABAC contexts in the cluster.
[0208] In another variant, the same single signaling is interpreted as a different offset for each context in the cluster. This can be achieved by a lookup table (LUT) hard-coded in the specification. For example, the signaling defines an offset of +1 for the first context, 0 for the second context, -1 for the third context, and so on.
[0209] Fig.13 A block diagram of a system in which aspects of the present embodiment may be implemented is shown according to another embodiment. Fig.13 An embodiment of an apparatus 1300 for encoding or decoding an image or video according to any of the embodiments described herein is shown. The apparatus includes a processor 1310 and may be interconnected with a memory 1320 via at least one port. The processor 1310 and the memory 1320 may also have one or more additional interconnections with external connections.
[0210] Using any of the embodiments described herein, the processor 1320 is further configured to: obtain an initial value of at least one parameter for a context associated with at least one binary symbol in a binary symbol sequence to be arithmetically decoded, wherein the initial value is obtained based on video data; initialize at least one parameter to the initial value; and decode the binary symbol sequence based on the initialized at least one parameter. For example, the processor 1321 is configured using a computer program product including code instructions that implement any of the embodiments described herein.
[0211] In another embodiment, the processor 1320 is further configured using any of the embodiments described herein to: obtain an initial value of at least one parameter for a context associated with at least one binary symbol in a binary symbol sequence to be entropy encoded, wherein the initial value is obtained based on video data; initialize at least one parameter to the initial value; and encode the binary symbol sequence based on the initialized at least one parameter. For example, the processor 1321 is configured using a computer program product including code instructions that implement any of the embodiments described herein.
[0212] exist Fig.14 In the illustrated embodiment, in the context of a transmission between two remote devices A and B via a communication network NET, device A comprises a processor associated with memories RAM and ROM, which are configured to implement the following Figures 1 to 13 The method for encoding an image or video is described, and the device B includes a processor associated with a memory RAM and a ROM, which is configured to implement the following Figures 1 to 13 The method for decoding an image or video is described. According to an example, the network is a broadcast network adapted for broadcasting / transmitting a coded image or video from device A to a decoding device included in device B.
[0213] Fig.15 An example of the syntax of a signal transmitted via a packet-based transport protocol is shown. Each transmitted packet P includes a header H and a payload PAYLOAD. In some embodiments, the payload PAYLOAD may include image or video data according to any of the above embodiments. In a variant, the signal includes data representing any of the following:
[0214] - signaling an indication of whether at least one parameter of a context associated with at least one binary symbol of the sequence of binary symbols of an entropy codec is to be initialized with an initial value obtained from the video data;
[0215] - information representative of at least one initial value of at least one parameter of a context of an entropy codec associated with at least one binary symbol of the sequence of binary symbols; and
[0216] - indicating at least one context, wherein an initial value of at least one parameter for the at least one context is signaled.
[0217] Various implementations involve decoding. "Decoding" as used in this application may encompass, for example, all or part of a process performed on a received coded sequence to produce a final output suitable for display. In various embodiments, such a process includes one or more processes typically performed by a decoder, such as entropy decoding, inverse quantization, inverse transform, and differential decoding. In various embodiments, such a process also includes or alternatively includes a process performed by a decoder of various implementations described in this application, such as entropy decoding a binary symbol sequence to reconstruct image or video data.
[0218] As a further example, in an embodiment, "decoding" refers only to entropy decoding, in another embodiment, "decoding" refers only to differential decoding, in another embodiment, "decoding" refers to a combination of entropy decoding and differential decoding, and in another embodiment, "decoding" refers to the entire image reconstruction process including entropy decoding. Based on the context of the specific description, whether the phrase "decoding process" is intended to specifically refer to a subset of operations or generally refer to a broader decoding process will be apparent and is believed to be well understood by those skilled in the art.
[0219] Various implementations involve encoding. Similar to the above discussion about "decoding", "encoding" as used in this application can cover, for example, all or part of the processes performed on an input video sequence to produce an encoded bitstream. In various embodiments, such processes include one or more processes typically performed by an encoder, such as partitioning, differential encoding, transforms, quantization, and entropy encoding. In various embodiments, such processes also include or alternatively include processes performed by encoders of various implementations described in this application, such as determining resampling filter coefficients, resampling decoded images.
[0220] As a further example, in an embodiment, "encoding" refers only to entropy encoding, in another embodiment, "encoding" refers only to differential encoding, and in another embodiment, "encoding" refers to a combination of differential encoding and entropy encoding. Whether the phrase "encoding process" is intended to refer specifically to a subset of operations or generally to a broader encoding process will be clear based on the context of the specific description and is believed to be well understood by those skilled in the art.
[0221] It should be noted that the grammatical elements used in this article are descriptive terms. Therefore, they do not exclude the use of other grammatical element names.
[0222] This disclosure describes a variety of information, such as syntax, that can be transmitted or stored. The information can be packaged or arranged in a variety of ways, including, for example, ways commonly used in video standards, such as placing the information in an SPS, PPS, NAL unit, header (e.g., a NAL unit header or a slice header), or SEI message. Other ways can also be used, including, for example, ways commonly used by system-level or application-level standards, such as placing the information in one or more of the following:
[0223] a. SDP (Session Description Protocol): A format for describing multimedia communication sessions, used for session announcements and session invitations, such as described in RFCs and used in conjunction with RTP (Real-time Transport Protocol) transport;
[0224] b. DASH MPD (Media Presentation Description) descriptor: used, for example, in DASH and transmitted over HTTP, a descriptor is associated with a representation or a set of representations to provide additional characteristics to the content representation;
[0225] c.RTP header extension: used, for example, during RTP streaming;
[0226] d. ISO Base Media File Format: For example, in OMAF, it uses and utilizes boxes, which are object-oriented building blocks defined by a unique type identifier and length, also called "atoms" in some specifications;
[0227] e. HLS (HTTP Live Streaming) manifest transmitted via HTTP. The manifest may be associated with a version or a set of versions of the content, for example, to provide characteristics of the version or the set of versions.
[0228] When a diagram is presented as a flow chart, it should be understood that it also provides a block diagram of the corresponding device. Similarly, when a diagram is presented as a block diagram, it should be understood that it also provides a flow chart of the corresponding method / process.
[0229] Some embodiments relate to rate-distortion optimization. Specifically, in the encoding process, a balance or trade-off between rate and distortion is usually considered, usually in view of computational complexity constraints. Rate-distortion optimization is usually expressed as minimizing a rate-distortion function, which is a weighted sum of rate and distortion. There are different methods to solve the rate-distortion optimization problem. For example, these methods can be based on extensive testing of all coding options, including all considered modes or coding parameter values, and a complete evaluation of their coding costs and the associated distortion of the reconstructed signal after encoding and decoding. Faster methods can also be used to save coding complexity, in particular, based on prediction or prediction residual signals instead of reconstructed signals to calculate approximate distortion. The two methods can also be mixed, for example, using approximate distortion only for some possible coding options and using full distortion for other coding options. Other methods only evaluate a subset of possible coding options. More generally, many methods use any of a variety of techniques to perform optimization, but optimization is not necessarily a complete evaluation of coding costs and associated distortions.
[0230] The embodiments and aspects described herein can be implemented as, for example, methods or processes, devices, software programs, data streams or signals. Even if only discussed in the context of a single form of implementation (e.g., discussed only as a method), the implementation of the discussed features can also be implemented in other forms (e.g., devices or programs). The device can be implemented as appropriate hardware, software and firmware. The method can be implemented as a processor, for example, which generally refers to a processing device, such as a computer, a microprocessor, an integrated circuit or a programmable logic device. The processor also includes a communication device, such as a computer, a mobile phone, a portable / personal digital assistant ("PDA") and other devices that facilitate information communication between end users.
[0231] Reference to "an embodiment" or "an embodiment" or "an implementation" or "an implementation" and other variations thereof means that the specific features, structures, characteristics, etc. associated with the embodiment are included in at least one embodiment. Therefore, the phrases "in an embodiment" or "in an embodiment" or "in an implementation" or "in an implementation" and any other variations thereof appearing in multiple places in the present application do not necessarily refer to the same embodiment.
[0232] Furthermore, the present application may involve “determining” a variety of information. Determining information may include one or more of the following, such as estimating information, calculating information, predicting information, or retrieving information from a memory.
[0233] Furthermore, the present application may involve "accessing" various information. Accessing information may include one or more of receiving information, retrieving information (e.g., from a memory), storing information, moving information, copying information, calculating information, determining information, predicting information, or estimating information.
[0234] Furthermore, the present application may involve "receiving" a variety of information. Like "accessing," receiving is a broad term. Receiving information may include one or more of the following, such as accessing information or retrieving information (e.g., from a memory device). Furthermore, "receiving" generally involves in some way during an operation such as storing information, processing information, transmitting information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information.
[0235] It should be understood that the use of any of the following " / ", "and / or", and "at least one", such as in the case of "A / B", "A and / or B", and "at least one of A and B", is intended to cover selecting only the first listed option (A), or only the second listed option (B), or selecting both options (A and B). As a further example, in the case of "A, B, and / or C" and "at least one of A, B, and C", such wording is intended to cover selecting only the first listed option (A), or only the second listed option (B), or only the third listed option (C), or only the first and second listed options (A and B), or only the first and third listed options (A and C), or only the second and third listed options (B and C), or all three options (A and B and C). This can be extended to as many items as listed as will be apparent to one of ordinary skill in this and related arts.
[0236] In addition, as used herein, the term "signal" refers to, among other things, indicating something to a corresponding decoder. For example, in some embodiments, the encoder signals the use of some coding tools. Thus, in an embodiment, the same parameters are used on the encoder side and the decoder side. Thus, for example, the encoder can transmit (explicitly signal) specific parameters to the decoder so that the decoder can use the same specific parameters. On the contrary, if the decoder already has specific parameters as well as other parameters, signaling (implicit signaling) can be performed without transmission to simply allow the decoder to know and select specific parameters. Bit savings are achieved in various embodiments by avoiding transmission of any actual function. It should be understood that signaling can be done in a variety of ways. For example, in various embodiments, one or more grammatical elements, flags, etc. are used to signal information to the corresponding decoder. Although the verb form of the word "signal" is mentioned above, the word "signal" can also be used as a noun here.
[0237] As will be appreciated by one of ordinary skill in the art, implementations may generate a variety of formatted signals to carry information that may be stored or transmitted, for example. The information may include, for example, instructions for executing a method, or data generated by one of the implementations. For example, a signal may be formatted to carry an encoded video stream and an SEI message of the embodiment. Such a signal may, for example, be formatted as an electromagnetic wave (e.g., using a radio frequency portion of a spectrum) or a baseband signal. Formatting may, for example, include encoding a video stream and modulating a carrier with the encoded video stream. The information carried by the signal may, for example, be analog or digital information. As is well known, a signal may be transmitted over a variety of different wired or wireless links. The signal may be stored on a processor-readable medium.
[0238] A number of embodiments have been described above. The features of these embodiments may be provided alone or in any combination across various claim categories and types.
Claims
1. A method comprising: decoding information identifying at least one correction value; determining, using the at least one correction value, at least one initial value of at least one parameter of a context of an entropy codec, the context being associated with at least one binary symbol of a sequence of binary symbols representing an image or a video; Initializing the at least one parameter to the determined initial value; as well as The binary symbol sequence is entropy decoded based on the at least one initialized parameter.
2. An apparatus comprising one or more processors, wherein the one or more processors are operable to: decoding information identifying at least one correction value; determining, using the at least one correction value, at least one initial value of at least one parameter of a context of an entropy codec, the context being associated with at least one binary symbol of a sequence of binary symbols representing an image or a video; Initializing the at least one parameter to the determined initial value; as well as The binary symbol sequence is entropy decoded based on the at least one initialized parameter.
3. A method comprising: determining at least one initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol of a sequence of binary symbols representing an image or a video, wherein the at least one initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; Initializing the at least one parameter to the determined initial value; as well as The binary symbol sequence is entropy decoded based on the at least one initialized parameter.
4. An apparatus comprising one or more processors, wherein the one or more processors are operable to: determining at least one initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol of a sequence of binary symbols representing an image or a video, wherein the at least one initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; Initializing the at least one parameter to the determined initial value; as well as The binary symbol sequence is entropy decoded based on the at least one initialized parameter.
5. A method comprising: determining an initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol of a sequence of binary symbols representing an image or a video, wherein the initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; Initializing the at least one parameter to the initial value; as well as The at least one binary symbol is entropy encoded based on the at least one initialized parameter.
6. An apparatus comprising one or more processors, wherein the one or more processors are operable to: determining an initial value of at least one parameter of a context for an entropy codec, the context being associated with at least one binary symbol of a sequence of binary symbols representing an image or a video, wherein the initial value is determined based on a bit rate determination for entropy encoding a set of binary symbols associated with the context; Initializing the at least one parameter to the initial value; as well as The at least one binary symbol is entropy encoded based on the at least one initialized parameter.
7. The method of claim 5, further comprising encoding information for identifying at least one correction value for the at least one initial value, or the device of claim 6, wherein the one or more processors are further configured to encode information for identifying at least one correction value for the at least one initial value.
8. A method according to any one of claims 1 and 7, or an apparatus according to any one of claims 2 and 7, wherein the information comprises an indication for indicating at least one context, wherein for the at least one context, a correction value of at least one parameter for the at least one context is signaled in the image or video data.
9. The method or apparatus of claim 8, wherein the indication is signaled for an intra-frame period or a slice.
10. A method or apparatus according to claim 8, wherein the ordered list comprises one or more contexts, and wherein the indication is used to indicate a plurality of contexts in the ordered list, wherein correction values for the plurality of contexts are signaled in the image or video data.
11. The method or apparatus of claim 8, wherein the indication is for indicating a given context set of a plurality of context sets, wherein a correction value is signaled in the image or video data for the given context set.
12. The method according to claim 3 or 5, or the apparatus according to claim 4 or 6, wherein the set of binary symbols are binary symbols obtained from the same slice as the at least one binary symbol or from a previous slice.
13. A method according to any one of claims 1, 3, 5 and 7-12, or an apparatus according to any one of claims 2, 4 and 6 to 12, wherein the at least one parameter comprises at least one of: a probability value, a size of a window for updating the probability value after encoding or decoding a binary symbol, and a weight used in determining a weighted average of the probability values for encoding or decoding a binary symbol.
14. A method according to any one of claims 3, 5, 7 and 12, or an apparatus according to any one of claims 4, 6, 7 and 12, wherein determining the at least one initial value based on a bit rate determination is responsive to a given number of previously processed binary symbols associated with the context.
15. The method of any one of claims 3, 5, 7, and 12 to 14, or the apparatus of any one of claims 4, 6, 7, and 12 to 14, wherein determining the initial value based on a bit rate determination comprises: As said initial value, an initial value providing a lowest bit rate for entropy encoding a given number of previously processed binary symbols associated with said context is selected from a set of initial values.
16. The method of any one of claims 3, 5, 7, and 12 to 15, or the apparatus of any one of claims 4, 6, 7, and 12 to 15, wherein the bit rate is expressed as a function of the at least one parameter, and determining the at least one initial value based on the bit rate determination comprises: A gradient of the function with respect to the at least one parameter is determined, and a value of the initial value is adjusted based on the gradient.
17. A method according to any one of claims 5 and 7, or an apparatus according to any one of claims 6 and 7, wherein the method further comprises entropy encoding the set of binary symbols using the obtained initial value, or the one or more processors are further operable to entropy encode the set of binary symbols using the obtained initial value.
18. A method according to any one of claims 1, 3, 5 and 7 to 17, or an apparatus according to any one of claims 2, 4 and 6 to 17, wherein the at least one initial value for the at least one parameter is determined every time N binary symbols are processed for the context, where N is a positive integer.
19. A method according to any one of claims 1, 5 and 7 to 17, or an apparatus according to any one of claims 2, 4 and 6 to 17, wherein determining the at least one initial value for the at least one parameter is in response to determining that the norm of the gradient of the bit rate function with respect to the at least one parameter is above a given value.
20. A method according to any one of claims 1, 3, 5 and 7 to 19, or an apparatus according to any one of claims 2, 4 and 6 to 19, wherein the information includes an indication for determining whether to update the initial value of the at least one parameter of the context or to signal using a default initial value.
21. A method according to any one of claims 1, 3, 5 and 7 to 20, or an apparatus according to any one of claims 2, 4 and 6 to 20, wherein the information for identifying at least one correction value is an offset relative to a default initial value.
22. The method according to claim 21, or the apparatus according to claim 21, wherein the default initial value is updated using the determined initial value or using a value of the at least one parameter of the context obtained after entropy decoding the binary symbol sequence based on the initialized at least one parameter.
23. The method according to claim 21, or the apparatus according to claim 21, wherein the default initial value is a value of the at least one parameter of the context stored in a context database.
24. The method of claim 23, or the apparatus of claim 23, wherein the information comprises an indication identifying the context stored in the context database.
25. A computer program product comprising instructions for causing one or more processors to perform the method of any one of claims 1, 3, 5 and 7 to 24.
26. A non-transitory computer-readable medium storing executable program instructions, the executable program instructions being used to cause a computer executing the executable program instructions to perform the method according to any one of claims 1, 3, 5, and 7 to 24.
27. A bitstream comprising data representing an image or video encoded using the method of any one of claims 1, 3, 5 and 7 to 24.
28. A non-transitory computer-readable medium storing the bitstream according to claim 27.
29. An apparatus comprising: The device according to any one of claims 2 and 4; and At least one of: (i) an antenna configured to receive a signal, the signal comprising data representing an image or video; (ii) a band limiter configured to limit the signal to a frequency band comprising the data representing the image or video; or (iii) a display configured to display the image or video.
30. The device of claim 29, wherein the device comprises at least one of a television, a mobile phone, a tablet computer, and a set-top box.