Temporal initialization points for context-based arithmetic coding
By managing the time initialization point in the buffer based on the time stamp value and quantization parameter value during video encoding and decoding, the problem of video decoding efficiency and scalability under memory constraints is solved, and more efficient video encoding and decoding performance is achieved.
Patent Information
- Application Number
- CN202380023674.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-01
- Filing Date
- 2023-03-02
- Publication Date
- 2024-10-11
AI Technical Summary
In the process of video encoding and decoding, memory size limitations make it difficult to manage time initialization points, affecting video decoding efficiency and scalability. In particular, in context-based arithmetic decoding, existing technologies struggle to effectively manage and utilize the set of time initialization points.
By managing the set of time initialization points in the buffer based on the time stamp values and quantization parameter values of slices or images, it determines which points can be removed and stored, ensuring that the most suitable set of initialization points is retained within memory constraints for subsequent encoding or decoding of slices or images.
It improves video decoding efficiency and scalability, reduces the probability of unavailable time initialization points, ensures efficient encoding and decoding performance, and optimizes memory usage.
Smart Images

Figure CN118765504A_ABST
Abstract
Description
[0001] This application claims the benefit of U.S. Patent Application No. 18 / 176,863 filed on March 1, 2023, U.S. Provisional Application No. 63 / 268,844 filed on March 3, 2022, and U.S. Provisional Application No. 63 / 362,118 filed on March 29, 2022, the entire contents of which are hereby incorporated by reference. U.S. Patent Application No. 18 / 176,863 filed on March 1, 2023 claims the benefit of U.S. Provisional Application No. 63 / 268,844 filed on March 3, 2022, and U.S. Provisional Application No. 63 / 362,118 filed on March 29, 2022. Technical Field
[0002] The present disclosure relates to video encoding and video decoding. Background Art
[0003] Digital video capabilities may be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC) standards, ITU-T H.265 / Versatile Video Coding (VVC), as well as extensions to such standards, and proprietary video codecs / formats such as AO Media Video 1 (AV1) developed by the Alliance for Open Media. Video devices may more efficiently transmit, receive, encode, decode and / or store digital video information by implementing such video decoding techniques.
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove inherent redundancy in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) can be divided into video blocks, which can also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture can use spatial prediction relative to reference samples in neighboring blocks in the same picture, or temporal prediction relative to reference samples in other reference pictures. Pictures can be referred to as frames, and reference pictures can be referred to as reference frames. Summary of the invention
[0005] In general, this disclosure describes techniques for determining an initialization point for one or more contexts used in context-based arithmetic coding, such as context adaptive binary arithmetic coding (CABAC). The initialization point may be considered a starting point for the one or more contexts and may include one or more context states, window or rate adaptation parameters, and other parameters used in the arithmetic coding operation.
[0006] In some examples, the initialization point for one or more contexts of video data in the current slice or current picture can be based on the initialization point of one or more contexts of video data in the previous picture. Such an initialization point is called a temporal initialization point.
[0007] This disclosure describes example techniques for determining a temporal initialization point for a current slice or picture. In some examples, a video coder (e.g., a video encoder or a video decoder) may determine the temporal initialization point using a temporal identification (ID) value and / or a quantization parameter (QP) value. In some examples, the video coder may determine an initialization point for a current slice based on an initialization point of a previous slice at a corresponding position.
[0008] Due to memory size limitations, there may be limits on how many temporal initialization points can be stored. When a new set of temporal initialization points is to be stored, an already stored set of temporal initialization points may be removed. The present disclosure describes example techniques for memory management for inserting and removing temporal initialization points based on time identification values and / or QP values that balance memory size limitations while ensuring that temporal initialization points that obtain timely decoding remain in a buffer.
[0009] In one example, the present disclosure describes a method for processing video data, the method comprising: determining one or more context values of at least one context for encoding or decoding a current slice or picture; determining that a buffer for storing a set of time initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of time initialization points is associated with a slice or picture in the two or more slices or pictures and includes one or more time initialization points; determining a first set of time initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a time identifier value, or a quantization parameter (QP) value of the slice or picture; removing the first set of time initialization points associated with the slice or picture from the buffer; and storing a second set of time initialization points associated with the current slice or picture in the buffer, wherein the second set of time initialization points is based on the determined one or more context values.
[0010] In one example, the present disclosure describes a device for processing video data, the device comprising: a buffer configured to store a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding; and a processing circuit coupled to the buffer, the processing circuit configured to: determine one or more context values of at least one context for encoding or decoding a current slice or picture; determine that the buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture in the two or more slices or pictures and includes one or more temporal initialization points; determine a first set of temporal initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a temporal identifier value, or a quantization parameter (QP) value of the slice or picture; remove the first set of temporal initialization points associated with the slice or picture from the buffer; and store a second set of temporal initialization points associated with the current slice or picture in the buffer, wherein the second set of temporal initialization points is based on the determined one or more context values.
[0011] In one example, the present disclosure describes a computer-readable storage medium storing instructions thereon, which, when executed, causes one or more processors to: determine one or more context values of at least one context for encoding or decoding a current slice or picture; determine that a buffer for storing a set of time initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of time initialization points is associated with a slice or picture in the two or more slices or pictures and includes one or more time initialization points; determine a first set of time initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a time identifier value, or a quantization parameter (QP) value of the slice or picture; remove the first set of time initialization points associated with the slice or picture from the buffer; and store a second set of time initialization points associated with the current slice or picture in the buffer, wherein the second set of time initialization points is based on the determined one or more context values.
[0012] In one example, the present disclosure describes a device for processing video data, the device comprising: a unit for determining one or more context values of at least one context for encoding or decoding a current slice or picture; a unit for determining that a buffer for storing a set of time initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of time initialization points is associated with a slice or picture in the two or more slices or pictures and includes one or more time initialization points; a unit for determining a first set of time initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a time identifier value, or a quantization parameter (QP) value of the slice or picture; a unit for removing the first set of time initialization points associated with the slice or picture from the buffer; and a unit for storing a second set of time initialization points associated with the current slice or picture in the buffer, wherein the second set of time initialization points is based on the determined one or more context values.
[0013] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0015] Figure 2is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0016] Figure 3 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0017] Figure 4 is a flowchart illustrating an example method for encoding a current block according to techniques of this disclosure.
[0018] Figure 5 is a flow chart illustrating an example method for decoding a current block according to techniques of this disclosure.
[0019] Figure 6 is a flow chart illustrating an example method for processing video data.
[0020] Figure 7 is a flow chart illustrating another example method for processing video data.
[0021] Figure 8 is a flow chart illustrating another example method for processing video data. DETAILED DESCRIPTION
[0022] In video coding (e.g., context-based arithmetic coding), a video coder (e.g., a video encoder or a video decoder) uses an initialization point to initialize a current picture or slice. For example, for context-based arithmetic coding (which includes context-adaptive binary arithmetic coding (CABAC)), an initialization point may be used for each context. The initialization point may include one or more context states, window or rate adaptation parameters, and other parameters required for arithmetic coding operations.
[0023] Initialization points may be predefined. However, in some examples, in addition to or instead of using predefined initialization points, the video decoder may utilize temporal initialization points. The temporal initialization point may refer to an initialization point of a previous picture in the decoding order used to determine (e.g., select) an initialization point for a current picture. For example, the temporal initialization point may be one or more context values of at least one context used to encode or decode the current picture, or derived based on the one or more context values, which are then used to initialize context values of at least one context of a subsequent picture.
[0024] There may be certain issues with using temporal initialization points. For example, a buffer storing temporal initialization points may have a finite size, and a video decoder may remove a set of temporal initialization points (e.g., one or more temporal initialization points) to allow another set of temporal initialization points to be stored. The present disclosure describes example techniques for determining which set of temporal initialization points to remove in a manner that ensures that the set of temporal initialization points that are retained facilitates efficient encoding and decoding.
[0025] In one or more examples, the video coder stores a corresponding set of temporal initialization points for a slice or picture in a buffer (e.g., after decoding the slice or picture). The set of temporal initialization points may include one or more initialization points as described above, and the initialization point may be a context value of a context, or may be derived from a context value of a context used to decode the current slice or picture.
[0026] For example, the video decoder stores a first set of temporal initialization points associated with a first slice or picture in a buffer (e.g., after decoding the first slice or picture), stores a second set of temporal initialization points associated with a second slice or picture in a buffer (e.g., after decoding the second slice or picture), and so on. In this way, the buffer stores sets of temporal initialization points from two or more slices or pictures for context-based arithmetic coding. Each set of temporal initialization points is associated with a slice or picture in two or more slices or pictures.
[0027] Each slice or picture can have a time identification (ID) value and / or a quantization parameter (QP) value. Each slice can also be associated with a slice type. The time ID value of a previous picture can indicate whether the previous picture can be used for inter-frame prediction of the current picture. For example, only pictures with the same or lower time ID value as the current picture can be used for inter-frame prediction of the current picture. In this way, based on bandwidth availability or processing power, pictures with time ID values higher than a certain threshold can be discarded or not decoded from the bitstream without affecting the ability to decode pictures with time IDs less than the threshold. The QP value indicates the amount of quantization applied during the encoding process.
[0028] In one or more examples, if a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, the video decoder may determine (e.g., identify) a first set of temporal initialization points associated with a slice or picture of the two or more slices or pictures from the buffer based on at least one of a slice type, a temporal identification value, or a quantization parameter (QP) value of the slice or picture. For example, the video decoder may determine (e.g., identify) a first set of temporal initialization points associated with a slice or picture of the two or more slices or pictures having at least one of the following from the buffer: a minimum temporal identification value or a quantization parameter (QP) value.
[0029] In some examples, the first set of temporal initialization points may be associated with a slice of a slice type different from a slice type of a current slice to be encoded or decoded. In some examples, multiple sets of temporal initialization points may be stored for a slice type. In such examples, the video decoder may determine a grouping of sets of temporal initialization points associated with slices of the same slice type as the current slice. The video decoder may determine the first set of temporal initialization points (e.g., those temporal initialization points associated with a slice or picture having a minimum temporal identifier value or QP value) from the grouping of sets of temporal initialization points associated with slices of the same slice type as the current slice.
[0030] The video coder may remove the first set of temporal initialization points associated with the slice or picture from the buffer. The video coder may store a second set of temporal initialization points associated with the current slice or picture in the buffer based on the determined one or more context values of the current slice or picture.
[0031] In one or more examples, the video decoder may determine (e.g., select) a set of temporal initialization points stored in a buffer, and based on the determined set of temporal initialization points, initialize one or more context values for at least one context for encoding or decoding a subsequent slice or picture. To determine the set of temporal initialization points, the video decoder may determine a slice or picture whose time identification value and / or QP value is closest to the time identification value and / or QP value of the subsequent slice or picture, and in some cases, has the same slice type. For example, if the QP value of the subsequent picture is X, the video decoder may determine which set of temporal initialization points is associated with a picture whose QP value is X or closest to X. The video decoder may select the determined set of temporal initialization points. The video decoder may perform context-based arithmetic encoding or decoding on the subsequent slice or picture.
[0032] By removing the set of temporal initialization points associated with the slice or picture with the smallest temporal marker value or QP value, there may be a coding gain. In one or more examples, pictures with smaller temporal marker values and / or QP values tend to have more transform coefficients (e.g., due to less quantization) than pictures with higher temporal marker values and / or QP values tend to have fewer transform coefficients. If there is a relatively high number of transform coefficients (e.g., due to a lower QP value), the context value of the context can be updated relatively quickly and used for the remainder of the slice (e.g., the context can be adjusted at the beginning of slice decoding, and the remainder of the slice will be efficiently decoded).
[0033] However, if there are relatively few transform coefficients (e.g., due to a higher QP value), the context values of the context are updated relatively slowly. That is, slices with higher QP values have fewer transform coefficients, and context adaptation will be slower, so fewer blocks of the slice will be efficiently coded.
[0034] In one or more examples, the set of time initialization points stored in the buffer may be closer (e.g., after some mapping or scaling) to the context value used to decode subsequent slices or pictures. Therefore, if the set of time initialization points stored in the buffer is associated with pictures with higher time identification values or QP values, these time initialization point sets will be more likely to be used for subsequent pictures with higher time identification values and QP values. In other words, in some examples, the time initialization points can be used to achieve higher decoding efficiency gains for slices or pictures with higher time identification values or QP values. Therefore, by storing the time initialization points of pictures with higher time identification values or QP values and removing the time initialization points of pictures with lower time identification values and QP values (due to buffer size limitations), the example technology can improve decoding efficiency without requiring a large size buffer.
[0035] There may be other problems with using the time initialization point. As mentioned above, each picture can be associated with a time identification (ID) value. However, if the time initialization point of the picture with a higher time ID value is used to determine the initialization point of the current picture, there may be errors, because the time initialization point of the picture with the higher time ID value may not be available.
[0036] As described in more detail, this disclosure describes example techniques that use a picture's temporal ID value to determine whether a subsequent picture can utilize the picture's temporal initialization point. In this way, the likelihood that a video decoder will depend on an unavailable temporal initialization point is reduced.
[0037] In some examples, the temporal initialization point of a picture may differ from slice to slice. In this case, the temporal initialization point of a slice of a current picture may overwrite the temporal initialization point of a slice of a previous picture when the temporal initialization point of the slice of the previous picture is available. This disclosure describes example techniques for minimizing the negative effects of overwriting temporal initialization point information and ensuring that the correct temporal initialization point is stored.
[0038] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure are generally directed to decoding (encoding and / or decoding) video data. In general, video data includes any data used to process video. Thus, video data can include original, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (such as signaling data).
[0039] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a target device 116. In particular, source device 102 provides the video data to target device 116 via computer-readable medium 110. Source device 102 and target device 116 may include any of a wide range of devices, including desktop computers, notebook computers (i.e., laptop computers), mobile devices, tablet computers, set-top boxes, telephone handsets (such as smartphones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and target device 116 may be equipped for wireless communication, and thus may be referred to as wireless communication devices.
[0040] exist Figure 1 In the example of, source device 102 includes video source 104, memory 106, video encoder 200 and output interface 108. Target device 116 includes input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of target device 116 can be configured to apply the technology of time initialization point of one or more contexts used in context-based arithmetic decoding of video data of current picture or slice. Therefore, source device 102 represents an example of video encoding device, and target device 116 represents an example of video decoding device. In other examples, source device and target device may include other components or arrangements. For example, source device 102 may receive video data from an external video source (such as an external camera). Similarly, target device 116 may be connected to an external display device, rather than including an integrated display device.
[0041] like Figure 1 The system 100 shown is only an example. In general, any digital video encoding and / or decoding device can perform one or more context-based arithmetic decoding techniques used in the context-based arithmetic decoding of the video data of the current picture or slice. The source device 102 and the target device 116 are only examples of such decoding devices as follows: the source device 102 generates a decoding device for the decoded video data for transmission to the target device 116. The present disclosure refers to a "decoding" device as a device that performs decoding (encoding and / or decoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of decoding devices, in particular video encoders and video decoders, respectively. In some examples, the source device 102 and the target device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the target device 116 includes a video encoding component and a video decoding component. Therefore, the system 100 can support one-way video transmission or two-way video transmission between the source device 102 and the target device 116, for example, for video streaming, video playback, video broadcasting or video telephony.
[0042] In general, the video source 104 represents the source of video data (i.e., the original, undecoded video data) and a sequential series of pictures (also referred to as "frames") that provide the video data to the video encoder 200, which encodes the data for the pictures. The video source 104 of the source device 102 may include a video capture device (such as a camera, a video archive containing previously captured raw video, and / or a video feed interface) to receive video from a video content provider. As a further alternative, the video source 104 may generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the pictures from the order in which they are received (sometimes referred to as the "display order") to a decoding order for decoding. The video encoder 200 may generate a bitstream comprising the encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of target device 116 .
[0043] The memory 106 of the source device 102 and the memory 120 of the target device 116 represent general purpose memories. In some examples, the memory 106, memory 120 can store original video data, for example, original video from the video source 104 and original, decoded video data from the video decoder 300. Additionally or alternatively, the memory 106, memory 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although the memory 106 and memory 120 are shown separately from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memories for functionally similar or equivalent purposes. In addition, the memory 106, memory 120 can store encoded video data, for example, output from the video encoder 200 and input to the video decoder 300. In some examples, a portion of memory 106, memory 120 may be allocated as one or more video buffers, eg, to store raw, decoded, and / or encoded video data.
[0044] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded video data from the source device 102 to the target device 116. In one example, the computer-readable medium 110 represents a communication medium so that the source device 102 can directly send the encoded video data to the target device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate the transmission signal including the encoded video data, and the input interface 122 may demodulate the received transmission signal according to a communication standard (such as a wireless communication protocol). The communication medium may include any wireless communication medium or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a part of a packet-based network, such as a local area network, a wide area network, or a global network (such as the Internet). The communication medium may include a router, a switch, a base station, or any other equipment that may be used to facilitate communication from the source device 102 to the target device 116.
[0045] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, target device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0046] In some examples, source device 102 may output the encoded video data to file server 114 or another intermediate storage device that may store the encoded video data generated by source device 102. Target device 116 may access the stored video data from file server 114 via streaming or downloading.
[0047] The file server 114 may be any type of server device capable of storing and sending the encoded video data to the target device 116. The file server 114 may represent a network server (e.g., for a website), a server configured to provide a file transfer protocol service (such as the File Transfer Protocol (FTP) or the File Delivery over Unidirectional Transport (FLUTE) protocol), a content delivery network (CDN) device, a hypertext transfer protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or an enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The file server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Real-Time Streaming (HLS), Real-Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.
[0048] The target device 116 may access the encoded video data from the file server 114 through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server 114. The input interface 122 may be configured to operate according to any one or more of the various protocols discussed above for retrieving or receiving media data from the file server 114 or other such protocols for retrieving media data.
[0049] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data (e.g., encoded video data) according to a cellular communication standard (e.g., 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc.). In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data (e.g., encoded video data) according to other wireless standards (e.g., IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee specifications), or ... TM(Zigbee TM )),Bluetooth TM Standards, etc.) to transmit data (such as encoded video data). In some examples, source device 102 and / or target device 116 may include respective system-on-chip (SoC) devices. For example, source device 102 may include a SoC device to perform functions attributed to video encoder 200 and / or output interface 108, and target device 116 may include a SoC device to perform functions attributed to video decoder 300 and / or input interface 122.
[0050] The techniques of the present disclosure may be applied to support video decoding for any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, Internet streaming video transmissions such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0051] The input interface 122 of the target device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200, which is also used by the video decoder 300, such as syntax elements with values describing characteristics of video blocks or other decoded units (e.g., slices, pictures, groups of pictures, sequences, etc.) and / or processing of video blocks or other decoded units. The display device 118 displays the decoded pictures of the decoded video data to the user. The display device 118 can represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0052] Although not in Figure 1 , but in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams of both audio and video included in a common data stream.
[0053] The video encoder 200 and the video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the device can store instructions for the software in a suitable, non-transitory computer-readable medium, and execute instructions in hardware using one or more processors to perform the technology of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (CODEC) in the respective device. The device including the video encoder 200 and / or the video decoder 300 can include an integrated circuit, a microprocessor, and / or a wireless communication device, such as a cellular phone.
[0054] The video encoder 200 and the video decoder 300 may operate in accordance with a video coding standard, such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or an extension thereof, such as multi-view and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate in accordance with other proprietary or industry standards, such as ITU-T H.266, also known as Versatile Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate in accordance with a proprietary video codec / format, such as AOMedia Video 1 (AV1), an extension to AV1, and / or a successor version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate in accordance with other proprietary formats or industry standards. However, the techniques of the present disclosure are not limited to any particular coding standard or format.
[0055] In general, the video encoder 200 and the video decoder 300 may be configured to perform the techniques of the present disclosure in conjunction with any video decoding techniques that use one or more context-based temporal initialization points used in context-based arithmetic decoding of video data of a current picture or slice. For example, the multiple temporal initialization points are included in the video data of one or more previous slices or pictures that precede the current slice or picture in decoding order.
[0056] A temporal initialization point may be associated with a slice or picture. Thus, for each slice or picture, there may be multiple temporal initialization point sets. For example, a first temporal initialization point set may be associated with a first slice or picture, a second temporal initialization point set may be associated with a second slice or picture, and so on.
[0057] Each temporal initialization point set may be a context value of at least one context of a slice or picture, or may be a value derived from a context value of at least one context of a slice or picture. If context-based arithmetic coding enables temporal initialization, the video encoder 200 and the video decoder 300 may use a stored temporal initialization point set (e.g., for a previously encoded or decoded slice or picture) to initialize a context value for at least one context of a subsequent slice or picture. When the video encoder 200 and the video decoder 300 encode or decode a block of a subsequent slice or picture, the video encoder 200 or the video decoder 300 may update the context value after initialization using the initialization point set.
[0058] As described in more detail, in one or more examples, the buffer stores a set of temporal initialization points. However, the number of possible sets of temporal initialization points may be relatively large, and there may be size limitations on the buffer. Therefore, the video encoder 200 and the video decoder 300 may be configured to perform buffer management, wherein the video encoder 200 and the video decoder 300 selectively determine which initialization point set to remove in order to free up memory space for a new initialization point set to be inserted into the buffer.
[0059] This disclosure describes example techniques for such buffer management. For example, if the buffer is full, the video encoder 200 and the video decoder 300 may evaluate a temporal identification (ID) value and / or a QP value for a slice or picture associated with a temporal initialization point stored in the buffer, and possibly along with a slice type. For example, in addition to storing a set of temporal initialization points, the buffer may also store information indicating a temporal ID value and / or a QP value for a slice or picture, and a slice type (e.g., I slice, B slice, P slice) that may be associated with each set of temporal initialization points.
[0060] The video encoder 200 and the video decoder 300 may compare the temporal ID values and / or QP values of the slices or pictures associated with the temporal initialization point sets stored in the buffer. Based on the comparison, the video encoder 200 and the video decoder 300 may determine the temporal initialization point set associated with the slice or picture based on the temporal ID value or QP value of the slice or picture. For example, the video encoder 200 and the video decoder 300 may determine the temporal initialization point set associated with the slice or picture having at least one of the minimum temporal ID value or QP value. The video encoder 200 and the video decoder 300 may remove the first temporal initialization point set to make room in memory for a second temporal initialization point set associated with the current slice or picture (e.g., a slice or picture that has just been encoded or decoded). The second temporal initialization point set may be based on one or more context values determined for the current slice or picture.
[0061] In one or more examples, the video encoder 200 and the video decoder 300 may also determine a set of temporal initialization points to be removed based on the slice type. In some examples, if the buffer stores a set of temporal initialization points associated with a slice having the same slice type as the current slice, the video encoder 200 and the video decoder 300 may remove the set of temporal initialization points. In some cases, the video encoder 200 and the video decoder 300 may remove the set of temporal initialization points even if there is a set of temporal initialization points associated with a slice or picture having a lower time identification value and / or QP value.
[0062] For example, in order to remove the time initialization point set, the video encoder 200 and the video decoder 300 may first determine whether there is a time initialization point set associated with a slice having the same slice type as the current slice. If so, the video encoder 200 and the video decoder 300 may remove the time initialization point set. If not, the video encoder 200 and the video decoder 300 may add the time initialization point set of the current slice to the buffer (assuming that the buffer is not full). In the above example, the video encoder 200 and the video decoder 300 give priority to the slice type, but the example technology is not limited thereto. In some examples, in order to remove the time initialization point set, the video encoder 200 and the video decoder 300 may first determine whether there is a time initialization point set associated with a slice having the same time identification value or QP value as the time identification value or QP value of the current slice, regardless of the slice type. If so, the video encoder 200 and the video decoder 300 may remove the time initialization point set.
[0063] However, in the event that the buffer is full and the temporal initialization point sets have been removed, the video encoder 200 and the video decoder 300 may perform the example techniques described in the present disclosure, such as determining a temporal initialization point set associated with a slice or picture having at least one of a minimum temporal ID value or a QP value, and then removing the temporal initialization point set.
[0064] As described in more detail, the video encoder 200 and the video decoder 300 may determine (e.g., select) at least one of the multiple temporal initialization point sets based on corresponding temporal identification (ID) values and / or quantization parameter (QP) values of slices or pictures associated with the multiple temporal initialization point sets and a temporal ID value or QP value of a current picture or slice. In this way, the probability of having no available temporal initialization point for the current picture (e.g., when a picture having a higher temporal ID value than the current picture is removed from the bitstream or not processed) may be reduced.
[0065] The video encoder 200 and the video decoder 300 may perform block-based decoding of a picture. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. In general, the video encoder 200 and the video decoder 300 may decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 may decode luminance components and chrominance components instead of decoding red, green, and blue (RGB) data for samples of a picture, wherein the chrominance component may include both a red hue chrominance component and a blue hue chrominance component. In some examples, the video encoder 200 converts the received RGB format data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, a pre-processing unit and a post-processing unit (not shown) may perform these conversions.
[0066] The present disclosure may generally refer to the decoding (e.g., encoding and decoding) of a picture to include the process of encoding or decoding data for the picture. Similarly, the present disclosure may refer to the decoding of a block of a picture to include the process of encoding or decoding data for the block, for example, prediction and / or residual decoding. The encoded video bitstream typically includes a series of values for syntax elements that represent decoding decisions (e.g., decoding modes) and partitioning of the picture into blocks. Therefore, references to decoding a picture or a block should generally be understood as decoding values for syntax elements that form a picture or a block.
[0067] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (such as the video encoder 200) divides a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video decoder divides the CTU and the CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without a child node may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video decoder may further divide the PU and TU. For example, in HEVC, the residual quadtree (RQT) represents the division of the TU. In HEVC, PU represents inter-frame prediction data, and TU represents residual data. The intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.
[0068] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video decoder (such as the video encoder 200) divides a picture into a plurality of coding tree units (CTUs). The video encoder 200 may divide the CTU according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concept of multiple partition types, such as the separation between CU, PU, and TU of HEVC. The QTBT structure includes two levels: a first level divided according to quadtree partitioning, and a second level divided according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to the coding units (CUs).
[0069] In the MTT partition structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) (also called ternary tree type (TT)) partitioning. A ternary tree or ternary tree type partitioning is a partitioning of a block into three sub-blocks. In some examples, a ternary tree or ternary tree type partitioning divides a block into three sub-blocks without dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0070] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 can be configured to decode the video data in the form of blocks. In AV1, the largest decoding block that can be processed is called a super block. In AV1, a super block can be 128x128 luminance samples or 64x64 luminance samples. However, in subsequent video decoding formats (e.g., AV2), super blocks can be defined by different (e.g., larger) luminance sample sizes. In some examples, the super block is the top layer of the block quadtree. The video encoder 200 can further divide the super block into smaller decoding blocks. The video encoder 200 can use square or non-square partitioning to divide the super block and other decoding blocks into smaller blocks. Non-square blocks can include N / 2xN, NxN / 2, N / 4xN and NxN / 4 blocks. The video encoder 200 and the video decoder 300 can perform separate prediction and transformation processes for each decoding block.
[0071] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that can be decoded independently of other tiles. That is, the video encoder 200 and the video decoder 300 can encode and decode decoded blocks within a tile, respectively, without using video data from other tiles. However, the video encoder 200 and the video decoder 300 can perform filtering across tile boundaries. The size of the tile can be uniform or non-uniform. Tile-based decoding can achieve parallel processing and / or multi-threading implemented by the encoder and decoder.
[0072] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma component and the chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for respective chroma components).
[0073] The video encoder 200 and the video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, super block partitioning, or other partitioning structures.
[0074] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples of a picture with three sample arrays, or a CTB of samples of a monochrome picture or a picture coded using three independent color planes and syntax structures for coding the samples. A CTB can be an NxN block of samples for some value of N, so that the partitioning of the constituent elements into the CTB is a partitioning. The constituent elements are arrays or single samples of one of the three arrays (luminance and two chroma) that make up a picture of 4:2:0, 4:2:2, or 4:4:4 color format, or the array or single sample of the array that makes up a picture of monochrome format. In some examples, the coding block is an MxN block of samples for some values of M and N, so that the partitioning of the CTB into the coding block is a partitioning.
[0075] Blocks (e.g., CTUs or CUs) may be grouped in a picture in various ways. For example, a brick may refer to a CTU row of a rectangular area within a particular tile in a picture. A tile may be a rectangular area of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a CTU of a rectangular area with a height equal to the height of the picture and a width specified by a syntax element (e.g., such as given in a picture parameter set). A tile row refers to a CTU of a rectangular area with a height specified by a syntax element (e.g., such as given in a picture parameter set) and a width equal to the width of the picture.
[0076] In some examples, a tile can be divided into multiple bricks, each of which can include one or more CTU rows within the tile. Tiles that are not divided into multiple bricks can also be called bricks. However, a brick that is a true subset of a tile cannot be called a tile. Bricks in a picture can also be arranged in slices. A slice can be an integer number of bricks in a picture that can be exclusively contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes multiple complete tiles, or only a continuous sequence of bricks of a tile.
[0077] The present disclosure may use "NxN" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions, for example, 16x16 samples or 16 by 16 samples. In general, a 16x16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxN CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. Furthermore, a CU need not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include NxM samples, where M is not necessarily equal to N.
[0078] The video encoder 200 encodes video data representing prediction and / or residual information and other information for a CU. The prediction information indicates how to predict the CU in order to form a prediction block for the CU. The residual information generally represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.
[0079] In order to predict a CU, the video encoder 200 can generally form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU from data of a previously decoded picture, while intra-frame prediction generally refers to predicting a CU from previously decoded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate a prediction block. The video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, according to the difference between the CU and the reference block. The video encoder 200 can use the sum of absolute differences (SAD), the sum of squared errors (SSD), the mean absolute difference (MAD), the mean square error (MSD) or other such differential calculations to calculate the differential metric to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional prediction or bidirectional prediction to predict the current CU.
[0080] Some examples of VVC also provide an affine motion compensation mode, which can be considered an inter-prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.
[0081] To perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of VVC provide sixty-seven intra prediction modes, including modes of various directions as well as a plane mode and a DC mode. In general, the video encoder 200 determines an intra prediction mode that describes, for a current block (e.g., a block of a CU), neighboring samples from which the samples of the current block are predicted. Assuming that the video encoder 200 decodes CTUs and CUs in a raster scan order (left to right, top to bottom), such samples can typically be above, above and to the left, or to the left of the current block in the same picture as the current block.
[0082] The video encoder 200 encodes data representing a prediction mode for the current block. For example, for an inter-frame prediction mode, the video encoder 200 may encode data representing which inter-frame prediction mode is used among various available inter-frame prediction modes and motion information for the corresponding mode. For unidirectional inter-frame prediction or bidirectional inter-frame prediction, for example, the video encoder 200 may encode motion vectors using improved motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode motion vectors for affine motion compensation mode.
[0083] AV1 includes two general techniques for encoding and decoding coded blocks of video data. The two general techniques are intra prediction (e.g., intra prediction or spatial prediction) and inter prediction (e.g., inter prediction or temporal prediction). In the context of AV1, when an intra prediction mode is used to predict a block of a current frame of video data, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. For most intra prediction modes, the video encoder 200 encodes a block of the current frame based on the difference between the sample values in the current block and the prediction values generated from the reference samples in the same frame. The video encoder 200 determines the prediction values generated from the reference samples based on the intra prediction mode.
[0084] After prediction (such as intra-frame prediction or inter-frame prediction of a block), the video encoder 200 can calculate residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the predicted block formed using the corresponding prediction mode for the block. The video encoder 200 can apply one or more transforms to the residual block to generate transformed data in a transform domain rather than a sample domain. For example, the video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 can apply a secondary transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after the application of one or more transforms.
[0085] As described above, after any transformation to produce transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 can round down an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bitwise right shift of the value to be quantized.
[0086] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place higher energy (and therefore lower frequency) transform coefficients in front of the vector, and lower energy (and therefore higher frequency) transform coefficients in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy encode the values of the syntax elements for describing metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0087] To perform CABAC, the video encoder 200 may assign one or more context values of a context within a context model to a symbol to be transmitted. The context value may relate to, for example, whether the value of a neighbor of the symbol is a zero value. The probability determination (e.g., context value) may be based on the context assigned to the symbol.
[0088] The video encoder 200 may further generate syntax data (such as block-based syntax data, picture-based syntax data, and sequence-based syntax data) to the video decoder 300, for example, in a picture header, a block header, a slice header, or other syntax data (such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). The video decoder 300 may likewise decode such syntax data to determine how to decode the corresponding video data.
[0089] In this way, the video encoder 200 can generate a bitstream including the encoded video data, for example, a syntax element describing the partition of the picture into blocks (e.g., CU) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0090] In general, the video decoder 300 performs a reciprocal process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode the values of the syntax elements for the bitstream using CABAC in a manner substantially similar to (albeit reciprocal to) the CABAC encoding process of the video encoder 200. The syntax elements may define partitioning information for the partitioning of the picture into CTUs and the partitioning of each CTU according to a corresponding partitioning structure (such as a QTBT structure) to define CUs of the CTUs. The syntax elements may further define prediction information and residual information for a block (e.g., a CU) of video data.
[0091] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame prediction or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0092] The present disclosure may generally refer to "signaling" certain information (such as syntax elements). The term "signaling" may generally refer to the communication of values for syntax elements and / or other data used to decode the encoded video data. That is, the video encoder 200 may signal values for syntax elements in a bitstream. Generally speaking, signaling refers to generating values in a bitstream. As described above, the source device 102 may transmit the bitstream to the target device 116 substantially in real time or in non-real time, such as may occur when storing syntax elements to the storage device 112 for later retrieval by the target device 116.
[0093] In the following document, a method for CABAC initialization of a current picture or slice using a previous encoding / decoding order CABAC (context adaptive binary arithmetic coding) initialization point is described: JVET-Y0181: "AHG12: CABAC initialization based on previous slice intervals", Seregin et al., Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29, 25th teleconference, January 12-21, 2022. Although described with respect to CABAC, these example techniques are also applicable to context-based arithmetic coding. For example, CABAC arithmetic coding may require a starting point for each context, and the starting point is called an initialization point. The starting point (e.g., an initialization point) may include one or more context states, window or rate adaptation parameters, and other parameters required for the arithmetic decoding operation. For example, there may be one or more initialization points for one or more context values for a context, and the one or more initialization points may be values (e.g., initial values) for the one or more context values.
[0094] In a video codec, typically these initialization points are predefined and known to both the video encoder 200 and the video decoder 300, for example in HEVC and VVC, the initialization points are defined in the initialization table for each slice type, I slice, P slice and B slice.
[0095] In temporal CABAC initialization, in addition to or instead of using predefined initialization points, initialization points may be stored at specific CTUs of a picture or slice, and these stored initialization points may be used to initialize the next picture or slice instead of or in addition to the predefined initialization points. That is, in some examples, the temporal initialization points are included in the video data of one or more previous slices or pictures that precede the current slice or picture in the decoding order, and may be for one or more contexts used in context-based arithmetic decoding of the video data of the current slice or picture.
[0096] The video encoder 200 or the video decoder 300 may store the CTU of the initialization point that may change, and may signal the information indication of the CTU. For example, the video encoder 200 and the video decoder 300 may store the initialization point of the slice in the middle of the picture. That is, when the video encoder 200 encodes the slice or the video decoder 300 decodes the slice, when the video encoder 200 encodes the CTU in the middle of the slice or the video decoder 300 decodes the CTU in the middle of the slice, the video encoder 200 or the video decoder 300 may store the current one or more context values of the context as initialization points, which are used to encode or decode the syntax elements in subsequent slices or pictures. For example, when the video encoder 200 or the video decoder 300 starts encoding or decoding subsequent slices or pictures, the video encoder 200 or the video decoder 300 may set the initial value of the context value of the context to be equal to or based on the stored initialization point (e.g., using mapping, scaling, weighting, etc.). Then, when the video encoder 200 and the video decoder 300 are encoding or decoding a subsequent slice or picture, the video encoder 200 or the video decoder 300 may update the context value from the initial value based on the most recently encoded or decoded video data.
[0097] In some examples, the video encoder 200 and the video decoder 300 may store the initialization point after decoding the CABAC state, window, and other parameters for a particular CTU. For example, for a certain CTU, the storage unit is used to store after decoding the CABAC state, window, and other parameters for initialization. For example, compared to the predefined initialization point, the parameters applicable to the decoded content in the previous picture may better represent the starting initialization point of the video data of the current picture.
[0098] The storage may be performed separately for each slice type and slice quantization parameter (QP).In some examples, an initialization with the same slice type and the same QP as the current slice may be used for CABAC initialization of the current slice.
[0099] There may be some issues with the temporal initialization point for context-based arithmetic decoding. For example, since slices of the current picture can be decoded independently and pictures with temporal identifier (ID) values above a threshold can be removed as part of temporal scalability, the technique of utilizing the temporal initialization point can be refined to allow temporal scalability while ensuring that a usable temporal initialization point is available.
[0100] In some examples, multiple initialization points may be stored from previous pictures in decoding order, such as in a FIFO buffer where the top initialization point is from a previous picture closest to the current picture. For example, the buffer may store a first set of initialization points for one or more context values for a context of a first slice or picture, a second set of initialization points for one or more context values for a context of a second slice or picture, and so on.
[0101] An index may be introduced to indicate which initialization point to use from the FIFO buffer, and the initialization index may be signaled in the bitstream (e.g., in a picture or slice header). For example, the video encoder 200 may signal and the video decoder 300 may receive an index in the buffer indicating which initialization point set to use to initialize one or more context values of the context of the slice or picture currently being decoded. The video decoder 300 may retrieve the initialization point set, and the one or more context values for the initialized context based on the index. For example, the video decoder 300 may set the initial value of one or more context values to be equal to the retrieved initialization point set. As another example, the video decoder 300 may map, scale, weight, or perform some other operation on the retrieved initialization point set to determine the initial value of one or more context values.
[0102] Temporal scalability is described below, as well as the use of temporal initialization points to achieve temporal scalability. Each decoded picture may have a temporal ID value assigned by the video encoder 200. The video encoder 200 may signal the temporal ID value in a network abstraction layer unit (NALU) header. The temporal ID value is used for temporal scalability, where certain pictures may be ignored (e.g., removed from the bitstream or not processed), while other pictures may be decoded without the removed or not processed pictures.
[0103] In one example, temporal scalability can be achieved by setting a restriction that pictures with lower temporal ID values cannot use inter-frame prediction with higher temporal ID values. In this case, the video decoder 300 is able to decode pictures with lower temporal ID values without using pictures with higher temporal ID values, because pictures with higher temporal ID values cannot be used for inter-frame prediction of pictures with lower temporal ID values. Therefore, pictures with higher temporal ID values can be removed from the bitstream or not processed (e.g., ignored). When temporal initialization of context-based arithmetic decoding is applied, the video encoder 200 and the video decoder 300 can use the temporal ID value to identify available storage initialization points for initialization of the current slice / picture.
[0104] In one or more examples, the video encoder 200 and the video decoder 30 may store a temporal ID value with an initialization point. For example, each initialization point set (wherein a set includes one or more initialization points) may be associated with a slice or picture. The video encoder 200 and the video decoder 300 may store an initialization point set and information indicating a temporal ID value of a slice or picture associated with the initialization point set. For example, a first initialization point set may be associated with a first slice or picture having a first temporal ID value, and a second initialization point set may be associated with a second slice or picture having a second temporal ID value. The video encoder 200 and the video decoder 300 may store the first initialization point set and the first temporal ID value, and information that the value of the first temporal ID is used for the first slice or picture associated with the first initialization point set (e.g., associating the first temporal ID with the first initialization point set). The video encoder 200 and the video decoder 300 may store the second initialization point set and the second temporal ID value, and information that the second temporal ID value is used for the second slice or picture associated with the second initialization point set (e.g., associating the second temporal ID value with the second initialization point set).
[0105] To determine (e.g., select) an initialization point based on the temporal ID value of the stored initialization point set, the video encoder 200 and the video decoder 300 may compare the temporal ID value with the current slice / picture temporal ID. For example, the video encoder 200 and the video decoder 300 may select at least one of the multiple temporal initialization point sets based on the corresponding temporal ID values associated with the multiple temporal initialization point sets and the temporal ID value of the current picture or slice.
[0106] An initialization point set whose time ID is equal to or less than the current time ID is selected as an available point. For example, in order to determine at least one time initialization point set, the video encoder 200 and the video decoder 300 may determine a time initialization point set from the multiple time initialization point sets, wherein the corresponding time ID value of the time initialization point set is less than or equal to the time ID value of the current picture or slice. The video encoder 200 and the video decoder 300 may select a time initialization point set from the time initialization point set.
[0107] In one example, only the initialization point set with the same time ID as the current slice / picture time ID is selected as the available initialization points. For example, since a smaller time ID usually has a lower QP, the initialization point from the previous picture with a lower time ID value may not correctly represent the initialization point of the slice of the current picture. In some examples, in order to determine the at least one time initialization point set, the video encoder 200 and the video decoder 300 can determine a group of time initialization points from the multiple time initialization point sets, wherein the corresponding time ID values of the time initialization points in the group of time initialization points are equal to the time ID value of the current picture or slice. The video encoder 200 and the video decoder 300 can select at least one time initialization point set from the group of time initialization points.
[0108] In another example, an initialization point with the same time ID is searched, and if the initialization point is not available, a smaller time ID (e.g., current time ID value minus 1) is checked, and if not available, the current time ID value minus 2 is checked, and so on. The found initialization point set is used for initialization.
[0109] For example, to determine at least one set of time initialization points, the video encoder 200 and the video decoder 300 may determine that none of the multiple sets of time initialization points has a time ID equal to the time ID value of the current picture or slice. Based on determining that none of the multiple sets of time initialization points has a time ID value equal to the time ID value of the current picture or slice, the video encoder 200 and the video decoder 300 may determine whether any of the multiple sets of time initialization points has a time ID less than one than the time ID value of the current picture or slice. Based on determining that one or more time initialization points have a time ID less than one than the time ID value of the current picture or slice, the video encoder 200 and the video decoder 300 may select at least one set of time initialization points from one or more sets of time initialization points having a time ID value less than one than the time ID value of the current picture or slice.
[0110] Similarly, instead of using the same QP initialization, when not available, search for QP-1 or QP+1, use if stored, if not available, check QP-2 or QP+2, and so on. Use the found result for initialization. When the same temporal ID and QP initialization point are not available, the temporal ID and QP search can be combined.
[0111] For example, in one or more examples, the video encoder 200 and the video decoder 30 may store QP values with initialization points. For example, each initialization point set (where a set includes one or more initialization points) may be associated with a slice or a picture. The video encoder 200 and the video decoder 300 may store an initialization point set and information indicating a QP value of a slice or a picture associated with the initialization point set. For example, a first initialization point set may be associated with a first slice or a picture having a first QP value, and a second initialization point set may be associated with a second slice or a picture having a second QP value. The video encoder 200 and the video decoder 300 may store the first initialization point set and the first QP value, and information that the first QP value is used for the first slice or picture associated with the first initialization point set (e.g., associating the first QP value with the first initialization point set). The video encoder 200 and the video decoder 300 may store the second initialization point set and the second QP value, and information that the second QP value is used for the second slice or picture associated with the second initialization point set (e.g., associating the second QP with the second initialization point set).
[0112] In one example, only a set of initialization points having the same QP value as the current slice / picture QP value is selected as the available initialization points. In some examples, in order to determine the at least one set of temporal initialization points, the video encoder 200 and the video decoder 300 may determine a set of temporal initialization points from the plurality of sets of temporal initialization points, wherein the corresponding QP values of the temporal initialization points in the set of temporal initialization points are equal to the QP value of the current picture or slice. The video encoder 200 and the video decoder 300 may select at least one set of temporal initialization points from the set of temporal initialization points.
[0113] In another example, an initialization point with the same QP value is searched, and if the initialization point is not available, the most recent QP value is checked, such as the current QP value plus 1 or minus 1, and if not available, the current QP value is checked plus 2 or minus 2, and so on. The found initialization point set is used for initialization.
[0114] For example, in order to determine at least one temporal initialization point set, the video encoder 200 and the video decoder 300 may determine that none of the multiple temporal initialization point sets has a QP value equal to the QP value of the current picture or slice. Based on determining that none of the multiple temporal initialization point sets has a QP value equal to the QP value of the current picture or slice, the video encoder 200 and the video decoder 300 may determine whether any of the multiple temporal initialization point sets has a QP value less than one or greater than one than the QP value of the current picture or slice. Based on determining that there are one or more temporal initialization points having a QP value less than one or greater than one than the QP value of the current picture or slice, the video encoder 200 and the video decoder 300 may select at least one temporal initialization point set from one or more temporal initialization point sets having a QP value less than one or greater than one than the QP value of the current picture or slice.
[0115] Thus, in one or more examples, the video encoder 200 and the video decoder 300 may be configured to determine (e.g., select) a set of time initialization points stored in a buffer, and to initialize one or more context values for at least one context for encoding or decoding a subsequent slice or picture based on the selected set of time initialization points. The video encoder 200 and the video decoder 300 may perform context-based arithmetic encoding or decoding on subsequent slices or pictures. For example, the video encoder 200 and the video decoder 300 may set an initial value for a context value based on an initialization point, and use the initial value to encode or decode one or more syntax values of a subsequent slice or picture. The video encoder 200 and the video decoder 300 may update the context value from the initial value.
[0116] An example manner of selecting a time initialization point set may include: the video encoder 200 and the video decoder 300 determine a time identification value for a subsequent slice or picture. The video encoder 200 and the video decoder 300 may determine that none of the two or more slices or pictures having an associated time initialization point set stored in the buffer has a time identification value equal to the time identification value of the subsequent slice or picture. In this case, the video encoder 200 and the video decoder 300 may determine, from the two or more slices or pictures, a slice or picture whose time identification value is closest to and less than the time identification value of the subsequent slice or picture. In order to select a time initialization point set, the video encoder 200 and the video decoder 300 may select a time initialization point set associated with the determined slice or picture, which has a time identification value that is closest to and less than the time identification value of the subsequent slice or picture.
[0117] Another example manner of selecting a temporal initialization point set may include the video encoder 200 and the video decoder 300 determining a QP value for a subsequent slice or picture. The video encoder 200 and the video decoder 300 may determine that none of the two or more slices or pictures having an associated temporal initialization point set stored in the buffer has a QP value equal to the QP value of the subsequent slice or picture. In this case, the video encoder 200 and the video decoder 300 may determine a slice or picture having a QP value closest to the subsequent slice or picture from the two or more slices or pictures. In this case, the closest QP value may be greater than the QP value of the current slice or picture. In order to select a temporal initialization point set, the video encoder 200 and the video decoder 300 may select an initialization point set associated with a QP value having a QP value closest to the QP value of the subsequent slice or picture.
[0118] In the above examples, the video encoder 200 and the video decoder 300 may determine an initialization point set associated with a slice or picture having a time identification value that is closest to the time identification value of the subsequent slice or picture and / or an initialization point set associated with a slice or picture having a QP value that is closest to the QP of the subsequent slice or picture, but not greater than the time identification value of the current slice. In some examples, the video encoder 200 and the video decoder 300 may also consider the slice type when determining which set of temporal initialization points to use. For example, the set of temporal initialization points may be associated with a slice type that is the same as the slice type of the subsequent slice.
[0119] The storage of initialization points is described below. As described above, slices of the same picture can be decoded independently (i.e., the next slice of the same picture cannot depend on the previous slice of the same picture). Therefore, the initialization point stored in the previous slice of the same picture cannot be used for any slice in the same picture.
[0120] To achieve this, in one example, an initialization point (e.g., an initialization point set, where the initialization point set may include one or more initialization points) is temporarily stored in a temporary buffer and added to the storage buffer from the temporary buffer only after all slices of the same picture are processed (encoded, decoded, parsed). In this way, the initialization point in the temporary buffer can be updated until all slices of the same picture are processed, and then the storage buffer receives the initialization point from the temporary buffer.
[0121] When adding initialization points, previously stored initialization points can be deleted / replaced. This is because the buffer is limited. If there is an update when processing slices of the same picture, the appropriate initialization point of the previous picture can be replaced with the previous slice of the same picture. That is, if a temporary buffer is not used, initialization points that should be retained in the storage buffer may be overwritten. By using a temporary buffer, overwriting initialization points that should be retained in the storage buffer can be avoided, and the storage buffer is overwritten with the initialization points in the temporary buffer only after processing slices of the same picture.
[0122] Therefore, there may be some benefit in storing the initialization point separately in a temporary buffer and using the temporary buffer to update the storage buffer only after all slices of the picture have been processed. To check the end of the picture, it can be checked whether the CTU address is equal to the last CTU or whether the slice index is the last slice of the picture.
[0123] For example, the video encoder 200 and the video decoder 300 may store one or more temporal initialization points of one or more contexts used in context-based arithmetic decoding of video data of one or more previous pictures in a first buffer. The video encoder 200 and the video decoder 300 may store temporal initialization points (e.g., a set of temporal initialization points) of one or more contexts used in context-based arithmetic decoding of a slice of a current picture in a second buffer, wherein storing in the second buffer includes: storing in the second buffer during decoding of the video data of the current picture. The video encoder 200 and the video decoder 300 may store the temporal initialization points stored in the second buffer in the first buffer after processing the last coding tree unit (CTU) or slice of the current picture.
[0124] In another example, the initialization point may be signaled in an adaptive parameter set (APS), e.g., similar to an adaptive loop filter parameter set that carries filter coefficients. The APS may already have restrictions defined for temporal ID value processing and not use an APS derived from the current picture for the same picture decoding.
[0125] In one or more examples, the initialization point can be stored at various picture locations (eg, the center or the end of the picture). Other locations in the picture can also be used.
[0126] The selection of which storage location to use may be signaled in the bitstream. In one example, the video encoder 200 may signal such an indication, and the video decoder 300 may parse such an indication in a picture or slice header, or any other parameter set or elsewhere. The picture header may be an example signaling location because the picture header is shared by all slices of a picture, and the storage selection may not need to be signaled in each slice to achieve picture level adaptation.
[0127] There may be multiple syntax elements in a picture or slice header for temporal CABAC, such as whether temporal initialization is applied to a picture or slice, storage location signaling, or how to remove entries from a storage initialization buffer, etc. Such syntax elements signaled in a picture or slice header may be regulated by higher level indications, such as by syntax signaled in an SPS or PPS indicating whether temporal CABAC initialization is used.
[0128] The signaling of syntax elements in the picture or slice header may also depend on whether there is an initialization entry in the buffer that can be used for the slice. If there is no such entry in the buffer, temporal initialization may not be applied and syntax elements associated with temporal initialization may be signaled in the slice or picture header.
[0129] The entry identification may be performed by comparing the temporal ID and / or QP value of the slice to be decoded and the entry value in the buffer. That is, in one or more examples, the video decoder 300 may compare the temporal ID and / or QP value of the slice or picture being decoded with the temporal ID and / or QP value associated with each temporal initialization point set to select an initialization point set for initializing the context value of the context for encoding or decoding the slice or picture.
[0130] In some examples, the initialization storage may be limited to a certain number of entries for implementation purposes, because storing the initialization storage (e.g., initialization point, but other storage information is possible) for each temporal ID and QP may be expensive, such as requiring a larger buffer size. For example, the buffer size may be limited to N for each slice type. In this case, when the buffer is full (i.e., when all N entries are added to the buffer), an entry should be deleted before the next entry is added. In one example, the number N may be set equal to 5, as it represents a typical GOP32 decoding.
[0131] Entry removal may be performed by the video encoder 200 and the video decoder 300 according to a specific rule based on the temporal ID value and / or QP value of the buffered entry. For example, the rule may be as follows: remove the entry with the smallest temporal ID, and / or remove the entry with the smallest temporal ID and the smallest QP.
[0132] In some examples, if there is an entry of a temporal initialization point set associated with a slice having the same slice type as a subsequent slice, the video encoder 200 and the video decoder 300 may remove the entry of the temporal initialization point set even if there is an entry of an initialization point set associated with a slice or picture having a smaller temporal ID or a smaller QP in the buffer. In some examples, the entry with the smallest temporal ID and / or smallest QP may be used for the temporal initialization point set associated with a slice having a slice type different from the slice type of the subsequent slice.
[0133] In some examples, there may be multiple entries for a slice type. For example, for slice type I slices, the buffer can store up to 5 time initialization point sets, for slice type P slices, the buffer can store up to 5 time initialization point sets, and for slice type B slices, the buffer can store up to 5 time initialization point sets. In such an example, the video encoder 200 and the video decoder 300 can first determine the time initialization point set associated with the slice type that is the same as the slice type of the subsequent slice. Then, the video encoder 200 and the video decoder 300 can determine the time initialization point set with the minimum time identification value and / or QP value within the determined time initialization point set, and determine that the time initialization point set with the minimum time identification value and / or QP value should be removed from the time initialization point set with the same slice type as the subsequent slice.
[0134] Removing the entry with the minimum QP may be because the minimum QP slice has more transform coefficients (less quantization), so the context can be adjusted at the start of slice decoding, and the rest of the slice will be efficiently decoded. Slices with higher QPs have fewer transform coefficients, and context adaptation may be slower, so fewer blocks of the slice will be efficiently decoded.
[0135] In other words, having a temporal initialization point allows context values to be initialized, which can then be adjusted as part of encoding or decoding. If context values for a slice can be adjusted relatively quickly (e.g., slices with lower QP values), then having a temporal initialization point may have some benefit. However, such benefit may be reduced because context values for slices with lower QP values may be adjusted relatively quickly even if not properly initialized. For slices where context values do not adapt relatively quickly (e.g., slices with higher QP values), there may be more benefit in properly initializing context values.
[0136] As an example, assume that the context values of a first slice with a lower QP value tend to adapt quickly, while the context values of a second slice with a higher QP value tend not to adapt quickly. If a temporal initialization point for the first slice is available, there may be some benefit in speeding up the adjustment of the context values. However, such benefit may not be significant because the context values of the first slice tend to adapt quickly even if not properly initialized.
[0137] If the temporal initialization point is available for the second slice, there may be a greater benefit in speeding up the adaptation of the context value compared to the first slice. For example, by initializing the context value for the second slice, the adaptation of the context value starts from a value that is closer to the final value, and thus, the blocks in the second slice have better compression than if the temporal initialization point is not available.
[0138] As described above, slices with higher QP values tend to be slices whose context values adapt more slowly. Therefore, if the temporal initialization points of slices with higher QP values are stored in the buffer, such temporal initialization points will be available for future slices where the benefit of having the temporal initialization points is more obvious. As a result, keeping the initialization entries with higher QP can provide efficient decoding for future pictures.
[0139] Similarly, lower time ID entries can be removed because lower time ID slices are typically decoded with a smaller QP. For example, similar to the above, having a time initialization point allows context values to be initialized, which can then be adjusted as part of encoding or decoding. If the context values of a slice can be adapted relatively quickly (e.g., a slice with a lower time identifier value), then having a time initialization point may have some benefit. However, this benefit may be reduced because the context values of slices with lower time identifier values can be adapted relatively quickly even if they are not initialized correctly. For slices whose context values do not adapt relatively quickly (e.g., slices with higher time identifier values), properly initializing the context values may have more benefits.
[0140] As an example, assume that the context values of a first slice having a lower time-stamp value tend to adapt quickly, while the context values of a second slice having a higher time-stamp value tend not to adapt quickly. If a time initialization point for the first slice is available, there may be some benefit in speeding up the adjustment of the context values. However, such benefit may not be significant because the context values of the first slice tend to adapt quickly even if not properly initialized.
[0141] If the temporal initialization point is available for the second slice, there may be a greater benefit in speeding up the adaptation of the context value compared to the first slice. For example, by initializing the context value for the second slice, the adaptation of the context value starts from a value that is closer to the final value, and thus, the blocks in the second slice have better compression than if the temporal initialization point is not available.
[0142] As described above, slices with higher temporal ID values tend to be slices whose context values adapt more slowly. Therefore, if temporal initialization points for slices with higher temporal ID values are stored in the buffer, such temporal initialization points will be available for future slices where the benefit of having a temporal initialization point is more obvious. As a result, keeping initialization entries with higher temporal IDs can provide efficient decoding for future pictures.
[0143] Other rules based on temporal ID value, QP value, or slice type are possible, and the present disclosure is not limited to the example rules of temporal ID value and QP value or slice type. The selection of this rule can be signaled in the bitstream in the picture or slice header, or in any other parameter set, or elsewhere.
[0144] Thus, in one or more examples, the video encoder 200 and the video decoder 300 may be configured to process video data. To process the video data, the video encoder 200 and the video decoder 300 may be configured to determine one or more context values for at least one context for encoding or decoding a current slice or picture.
[0145] The video encoder 200 and the video decoder 300 may determine that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full (e.g., N entries in a buffer that can store N entries). As described above, each set of temporal initialization points is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points.
[0146] The video encoder 200 and the video decoder 300 may determine (e.g., identify) a first set of time initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a time identifier value, or a quantization parameter (QP) value of the slice or picture. The video encoder 200 and the video decoder 300 may remove the first set of time initialization points associated with the slice or picture from the buffer, and store a second set of time initialization points associated with the current slice or picture in the buffer. The second set of time initialization points may be based on the determined one or more context values (e.g., the second set of time initialization points is equal to one or more context values of the context, or is generated based on one or more context values of the context).
[0147] For example, in order to determine a first set of temporal initialization points (e.g., a set of temporal initialization points to be removed), the video encoder 200 and the video decoder 300 may determine, from two or more slices or pictures, a first set of temporal initialization points associated with a slice or picture having at least one of a minimum temporal identification value or a quantization parameter (QP) value. For example, the video encoder 200 and the video decoder 300 may determine a slice or picture having a minimum temporal identification value from the temporal identification values of the two or more slices or pictures, or may determine a slice or picture having a minimum QP value. In some cases, the slice associated with the first set of temporal initialization points may have a slice type different from a slice type of a current slice in the QP values of the two or more slices or pictures.
[0148] In some examples, if the buffer is full, or possibly even if the buffer is not full, the video encoder 200 and the video decoder 300 may remove duplicate entries before removing the initialization point set associated with the slice or picture having the smallest time identification value or QP value. For example, if the buffer is full, or possibly even if the buffer is not full, before storing the initialization point set in the buffer associated with the current slice or picture, the video encoder 200 and the video decoder 300 may determine whether there are any initialization point sets in the buffer associated with a slice or picture having the same time identification value or QP value as the current slice or picture, and / or having the same slice type.
[0149] If an initialization point set exists in a buffer associated with a slice or picture having the same time identification value, QP value, or slice type as the current slice or picture, the video encoder 200 and the video decoder 300 may remove the initialization point set even if there are other initialization point sets associated with slices or pictures having lower time identification values or QP values. If there is no initialization point set in a buffer associated with a slice or picture having the same time identification value, QP value, or slice type as the current slice or picture, the video encoder 200 and the video decoder 300 may remove the initialization point set having the smallest time identification value or QP value.
[0150] In some examples, the removed initialization point set with the smallest time identification value or QP value may have a slice type different from the current slice. In some examples, for example, where multiple time initialization point sets can be stored for a slice type, the video encoder 200 and the video decoder 300 can determine a grouping of time initialization point sets associated with slices of the same slice type as the current slice. Then, the video encoder 200 and the video decoder 300 can determine the time initialization point set with the smallest time identification value or QP value within the grouping as the time initialization point set to be removed.
[0151] Thus, the video encoder 200 and the video decoder 300 may determine that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each slice or picture in two or more slices or pictures having an associated time initialization point set stored in the buffer. In such an example, the video encoder 200 and the video decoder 300 may remove the first time initialization point set based on determining that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each slice or picture in the two or more slices or pictures. For example, the time identification value or QP value of the slice or picture associated with the first time initialization point set is different from the time identification value or QP value in the current slice or picture.
[0152] For example, assume that the current slice or picture is a first slice or picture. In this example, the video encoder 200 and the video decoder 300 may determine one or more context values for at least one context for encoding or decoding a second slice or picture. The video encoder 200 and the video decoder 300 may determine a third slice or picture from two or more slices or pictures, wherein the third slice or picture has at least one of the same time identification value or QP value as the time identification value or QP value of the second slice or picture. In this example, the video encoder 200 and the video decoder 300 may remove a third time initialization point set associated with the third slice or picture from the buffer, and store a fourth time initialization point set associated with the second slice or picture in the buffer based on the one or more context values determined for at least one context for encoding or decoding the second slice or picture.
[0153] The initialization point may include multiple parameters, such as multiple context states and multiple adaptation rates or adaptation windows (used to indicate how fast the context state can be adapted after each binary encoding). The initialization storage buffer may be reduced by storing quantized values of these parameters to reduce the dynamic range of possible values, which may require fewer bits to store these parameters. In one example, the video encoder 200 and the video decoder 300 may store the sum of the states and the sum of the adaptation rates. The video encoder 200 and the video decoder 300 may assign state values by dividing the sum of the states by the number of states (average state). The video encoder 200 and the video decoder 300 may assign the adaptation rate (adaptation window) value as the sum of the adaptation rates divided by the number of adaptation rates (average adaptation rate).
[0154] In another example, the video encoder 200 and the video decoder 300 may store only certain parameters (e.g., store only some initialization points). In such an example, the video encoder 200 and the video decoder 300 may initialize other parameters according to default values. For example, only one state and one adaptive rate are stored. When initialization is performed, the stored values are respectively assigned to the first state and the first adaptive rate, and the second state and the second adaptive rate are assigned from the default initial values (e.g., the initialization points stored for each I slice, P slice, B slice described above) that may have been stored in the codec (e.g., the video encoder 200 and the video decoder 300). Other value encapsulation mechanisms applied to state and adaptive rate values may also be applied.
[0155] Multiple initialization points are described below. Multiple initialization points may be stored for each picture. That is, for a picture or slice, there may be a set of initialization points, where the set of initialization points will include one initialization point or multiple initialization points. In one example, when more than one slice is used in a picture, multiple initialization points may be used. For example, one initialization point may be stored for each slice.
[0156] Slices have relative positions within a picture, so an initialization point is stored from a previous picture corresponding to the current slice position. In one example, an initialization point is stored in the middle of each slice in the previous picture and used to initialize the corresponding current slice.
[0157] The slice boundaries of the current picture and the previous picture do not have to be aligned. In one example, the location of the storage initialization point is driven by the slice boundary of the current picture.
[0158] In another example, an initialization point is stored for each slice of the current picture at a specific location, and subsequent pictures can decide which initialization point to use based on a specific rule. For example, such a rule can be to check the coordinates of the stored initialization and compare it to whether the location belongs to the current slice, and if so, such initialization can be used. In another example, the initialization point of each slice can also be stored in a buffer, and the index of the current slice is signaled to identify which initialization point to use.
[0159] For example, the video encoder 200 and the video decoder 300 may store a previous temporal initialization point corresponding to one or more contexts used in context-based arithmetic decoding of video data of a previous slice in a previous picture. For a current slice, the video encoder 200 and the video decoder 300 may determine that a current slice in a current picture has a position in the current picture corresponding to a position of a previous slice in a previous picture. Based on the current slice having a position in the current picture corresponding to the position of the previous slice in the previous picture, the video encoder 200 and the video decoder 300 may determine a current temporal initialization point for the current slice based on the previous temporal initialization point.
[0160] Figure 2 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 2For the purpose of explanation, it should not be considered as limiting the techniques widely illustrated and described in the present disclosure. For the purpose of explanation, the present disclosure describes the video encoder 200 according to VCC technology (ITU-T H.266 under development) and HEVC (ITU-T H.265) technology. However, the techniques of the present disclosure can be performed by a video encoding device configured to implement other video coding standards and video coding formats (e.g., AV1 and successors of the AV1 video coding format).
[0161] exist Figure 2 In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any one or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 can be implemented in one or more processors or in processing circuits. For example, the units of the video encoder 200 can be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these functions and other functions.
[0162] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data from, for example, the video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB218 can act as a reference picture memory, which stores reference video data for use when video encoder 200 predicts subsequent video data. Video data memory 230 and DPB 218 can be formed by any one of a variety of memory devices (e.g., dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM) or other types of storage devices). Video data memory 230 and DPB 218 can be provided by the same storage device or different storage devices. In various examples, video data memory 230 can be on chip with other components of video encoder 200, as shown, or off chip relative to those components.
[0163] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory inside the video encoder 200 (unless specifically described as such), nor should they be interpreted as limited to memory outside the video encoder 200 (unless specifically described as such). Rather, references to the video data memory 230 should be understood as a reference memory storing video data, where the video encoder 200 receives the video data (e.g., video data of a current block to be encoded) for encoding. Figure 1 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .
[0164] Shows Figure 2 The various units of the video encoder 200 are described to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functions and are pre-set on the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., for receiving parameters or outputting parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of these units may be different circuit blocks (fixed function or programmable), and in some examples, the one or more units may be integrated circuits.
[0165] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store instructions (eg, object code) for software received and executed by the video encoder 200, or another memory (not shown) in the video encoder 200 may store such instructions.
[0166] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve pictures of video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be original video data to be encoded.
[0167] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. For example, the mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, and the like.
[0168] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and final rate-distortion values for such combinations. The encoding parameters may include: CTU to CU partitioning, prediction mode for CU, transform type for residual data of CU, quantization parameter for residual data of CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0169] The video encoder 200 may divide the picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a segment. The mode selection unit 202 may divide the CTUs of the picture according to a tree structure (e.g., the MTT structure, QTBT structure, super block structure, or quadtree structure described above). As described above, the video encoder 200 may form one or more CUs by dividing the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0170] Typically, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TU). For inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value indicating how similar a potential reference block is to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), and the like. The motion estimation unit 222 may typically perform these calculations using the sample-by-sample differences between the current block and the reference block being considered. The motion estimation unit 222 may identify the reference block having the minimum value produced by these calculations, which indicates the reference block that most closely matches the current block.
[0171] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vector has fractional sampling accuracy, the motion compensation unit 224 may interpolate the values for the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by corresponding motion vectors, for example, by sample-by-sample averaging or weighted averaging, and combine the retrieved data.
[0172] When operating according to the AV1 video coding format, the motion estimation unit 222 and the motion compensation unit 224 may be configured to encode coding blocks of video data (e.g., luma and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or composite intra prediction.
[0173] As another example, for intra prediction or intra prediction decoding, the intra prediction unit 226 can generate a prediction block based on samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values of adjacent samples and fill these calculated values across the current block in a defined direction to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average value of adjacent samples to the current block and generate a prediction block to include the resulting average value for each sample of the prediction block.
[0174] When operating according to the AV1 video coding format, the intra prediction unit 226 can be configured to encode coding blocks of video data (e.g., luma and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filtering intra prediction, chroma from luma (CFL) prediction, intra block copy (IBC), and / or palette mode. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes.
[0175] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0176] In the example where the mode selection unit 202 divides the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As described above, the size of the CU may refer to the size of the luma coding block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra-frame prediction, and support symmetric PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, etc. for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-frame prediction.
[0177] In an example where the mode selection unit 202 does not further divide the CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2Nx2N, 2NxN, or Nx2N.
[0178] For other video coding techniques (e.g., intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, to name a few examples), the mode selection unit 202 generates a prediction block for the current block being encoded via various units associated with the coding technique. In some examples (e.g., palette mode coding), the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements that indicate how to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0179] As described above, the residual generation unit 204 receives video data for a current block and a corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0180] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 can apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 can perform multiple transforms (e.g., a primary transform and a secondary auxiliary transform (e.g., a rotation transform)) on the residual block. In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0181] When operating according to AV1, the transform processing unit 206 may apply one or more transforms to the residual block to generate a transform coefficient block (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a horizontal / vertical transform combination, which may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), a flipped ADST (e.g., an inverse ADST), and an identity transform (IDTX). When an identity transform is used, a transform may be skipped in one of the vertical or horizontal directions. In some examples, the transform process may be skipped.
[0182] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may result in a loss of information, and therefore, the precision of the quantized transform coefficients may be lower than the precision of the original transform coefficients produced by the transform processing unit 206.
[0183] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although it may have a certain degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples in the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0184] Filter unit 216 may perform one or more filtering operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0185] When operating according to AV1, filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce block artifacts along the edge of the CU. In other examples, filter unit 216 may apply a constrained direction enhancement filter (CDEF), which may be applied after deblocking and may include applying an inseparable nonlinear low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop recovery filter applied after CDEF, and may include a separable symmetric normalized Wiener filter or a dual self-guided filter.
[0186] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in an example where the operation of the filter unit 216 is not performed, the reconstruction unit 214 can store the reconstructed blocks in the DPB 218. In an example where the operation of the filter unit 216 is performed, the filter unit 216 can store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture from the DPB 218, which is formed by the reconstructed (and possibly filtered) blocks to perform inter-frame prediction on subsequently encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks in the DPB 218 of the current picture to perform intra-frame prediction on other blocks in the current picture.
[0187] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode the quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-encoded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) length decoding operation, a syntax-based context-adaptive binary arithmetic decoding (SBAC) operation, a probability interval partitioning entropy (PIPE) decoding operation, an exponential Grunb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode where the syntax elements are not entropy-encoded.
[0188] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required for reconstructing blocks of a slice or picture. Specifically, the entropy encoding unit 220 may output a bitstream.
[0189] According to AV1, the entropy coding unit 220 may be configured as a symbol-to-symbol adaptive multi-symbol arithmetic decoder. The syntax elements in AV1 include an alphabet of N elements, and the context (e.g., a probability model) includes a set of N probabilities. The entropy coding unit 220 may store the probabilities as an n-bit (e.g., 15-bit) cumulative distribution function (CDF). The entropy coding unit 220 may perform recursive scaling using an update factor based on the alphabet size to update the context.
[0190] The operations described above are described with respect to blocks. Such descriptions should be understood as operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are the luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are the luma components and chroma components of a PU.
[0191] In some examples, operations performed for luma coding blocks do not need to be repeated for chroma coding blocks. For one example, operations for identifying a motion vector (MV) and reference picture for a luma coding block do not need to be repeated to identify an MV and reference picture for a chroma block. Instead, the MV for the luma coding block may be scaled to determine the MV for the chroma block, and the reference picture may be the same. For another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.
[0192] In one or more examples, for entropy coding such as context-based arithmetic coding, the entropy coding unit 220 can determine context values for one or more contexts. During encoding of a slice or picture, the entropy coding unit 220 can update the context values (e.g., probability values). However, at the beginning of a slice or picture, the context values may be undefined. The entropy coding unit 220 can use a predefined initialization point (e.g., an initial value stored in the DPB 218, the video data memory 230, or some other memory) to initialize one or more context values, rather than starting from an undefined context value.
[0193] In one or more examples, instead of or in addition to using a predefined initialization point, the entropy coding unit 220 may use one or more context values of a previously encoded slice or picture, or a mapped, scaled, weighted, etc. version of one or more context values, as an initialization point. For example, the entropy coding unit 220 may store one or more context values of a context of an encoded slice or picture (e.g., after encoding the last CTU of the slice or picture) in a buffer (e.g., DPB 218, video data memory 230, or some other memory) as a set of initialization points. The entropy coding unit 220 may utilize the set of initialization points (e.g., context values or values based on context values of a previously encoded slice or picture) to initialize context values for contexts used to encode subsequent slices or pictures.
[0194] The entropy coding unit 220 may store initialization point sets of a plurality of previously encoded slices or pictures. For example, the buffer may store a first initialization point set associated with a first slice or picture, a second initialization point set associated with a second slice or picture, and so on. In addition, in order to determine (e.g., select) which initialization point set the entropy coding unit 220 may use for a subsequent slice or picture, the entropy coding unit 220 may also store information of a time identification value and / or a QP value of a slice or picture associated with each initialization point in each initialization point set.
[0195] The video encoder 200 represents an example of a device configured to encode video data, the device including a memory configured to store video data, and one or more processing units implemented using circuits, the one or more processing units being configured to perform the example techniques described in the present disclosure. For example, in one or more examples, when the buffer is full, the entropy coding unit 220 may determine which initialization point set to remove to make room for the initialization point set just determined. For example, the entropy coding unit 220 may determine one or more context values of at least one context for encoding the current slice or picture. The entropy coding unit 220 may determine that the buffer for storing a temporal initialization point set from two or more slices or pictures for context-based arithmetic decoding is full. As described above, each temporal initialization point set is associated with a slice or picture in the two or more slices or pictures and includes one or more temporal initialization points.
[0196] The entropy coding unit 220 may determine a first set of time initialization points associated with a slice or picture of the two or more slices or pictures based on a time identification value or a quantization parameter (QP) value of the slice or picture. The entropy coding unit 220 may remove the first set of time initialization points associated with the slice or picture from the buffer and store a second set of time initialization points associated with the current slice or picture in the buffer. The second set of time initialization points is based on the determined one or more context values (e.g., equal to one or more context values of at least one context of the determined current slice or picture, or derived from one or more context values of at least one context of the current slice or picture).
[0197] Therefore, the entropy coding unit 220 can use the time identification value and / or QP value to determine which initialization point set (including possible slice types) to remove, rather than using when the slice or picture is encoded as the only factor for determining (e.g., selecting) which initialization point set should be removed from the buffer. For example, in order to determine the first time initialization point set, the entropy coding unit 220 can determine a first time initialization point set associated with a slice or picture from the two or more slices or pictures, wherein the slice or picture has at least one of the minimum time identification value or QP value among the time identification values or quantization parameter (QP) values of the two or more slices or pictures. For example, the entropy coding unit 220 can determine the slice or picture with the minimum time identification value from the time identification values of the two or more slices or pictures, or determine the slice or picture with the minimum QP value from the QP values of the two or more slices or pictures. Then, the entropy coding unit 220 can remove the initialization point set associated with the determined slice or picture (e.g., the initial point with the minimum time identification value or QP value) from the buffer.
[0198] In one or more examples, the entropy coding unit 220 may remove the set of initialization points associated with the slice or picture having the smallest time identification value or QP value if none of the initialization points in the set of initialization points is associated with the following slice or picture: the slice or picture has the same time identification value or QP value as the time identification value or QP value of the current slice or picture. For example, the entropy coding unit 220 may determine that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each of the two or more slices or pictures. In this example, the entropy coding unit 220 may remove the first set of time initialization points based on determining that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each of the two or more slices or pictures. For example, the time identification value or QP value of the slice or picture associated with the first set of time initialization points is different from the time identification value or QP value of the current slice or picture.
[0199] For example, assume that the current slice or picture is a first slice or picture. In this example, the entropy coding unit 220 may determine one or more context values for at least one context for encoding a second slice or picture, and determine a third slice or picture having at least one of the same time identification value or QP value as the time identification value or QP value of the second slice or picture from the two or more slices or pictures. In this example, the entropy coding unit 220 may remove a third time initialization point set associated with the third slice or picture from the buffer, and store a fourth time initialization point set associated with the second slice or picture in the buffer based on the determined one or more context values for at least one context for encoding the second slice or picture.
[0200] Then, to encode the subsequent picture, the entropy coding unit 220 may determine (e.g., select) a set of time initialization points stored in the buffer, and initialize one or more context values of at least one context for encoding the subsequent slice or picture based on the selected set of time initialization points. For example, the entropy coding unit 220 may assign initial values of one or more context values to be equal to the selected set of time initialization points, or derive initial values of one or more context values based on (e.g., by mapping, scaling, weighting, etc.) the selected set of time initialization points. The entropy coding unit 220 may perform context-based arithmetic coding on the subsequent slice or picture. For example, the entropy coding unit 220 may encode the syntax elements of the subsequent slice or picture using the initial values of the context values, and update the context values during the encoding of the subsequent slice or picture.
[0201] In one or more examples, the video encoder 200 may also be configured to store multiple time initialization points for one or more contexts used in context-based arithmetic decoding of video data of a current picture or slice (wherein the multiple time initialization points are included in video data of one or more previous pictures that precede the current picture in decoding order), store a corresponding time identification (ID) value associated with each of the multiple time initialization points, select at least one of the multiple time initialization points based on the respective time ID values associated with the multiple time initialization points and the time ID value of the current picture or slice, and perform context-based arithmetic encoding on the video data of the current picture or slice based on the selected at least one time initialization point.
[0202] The video encoder 200 may be configured to store, in a first buffer, one or more temporal initialization points for one or more contexts used in context-based arithmetic decoding of video data of one or more previous pictures, and to store, in a second buffer, temporal initialization points for one or more contexts used in context-based arithmetic decoding of a slice of video data of a current picture, wherein storing in the second buffer comprises storing in the second buffer during decoding of the video data of the current picture, and storing in the second buffer the temporal initialization points stored in the first buffer after processing a last coding tree unit (CTU) or slice of the current picture.
[0203] The video encoder 200 can be configured to store a previous time initialization point corresponding to one or more contexts used in context-based arithmetic decoding of video data of a previous slice in a previous picture (for the current slice), determine that the current slice in the current picture has a position in the current picture corresponding to the position of the previous slice in the previous picture, and determine the current time initialization point of the current slice based on the previous time initialization point.
[0204] Figure 3 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 3 For the purpose of explanation, it should not be considered as limiting the techniques widely exemplified and described in the present disclosure. For the sake of explanation, the present disclosure describes the video decoder 300 according to VVC technology (ITU-T H.266 under development) and HEVC technology (ITU-T H.265). However, the techniques of the present disclosure can be performed by a video decoding device configured to implement other video decoding standards.
[0205] exist Figure 3In the example of , the video decoder 300 includes a decoded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 can be implemented in one or more processors or in processing circuits. For example, the units of the video decoder 300 can be implemented as one or more circuits or logic elements, as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. In addition, the video decoder 300 can include additional or alternative processors or processing circuits to perform these functions and other functions.
[0206] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units for performing predictions according to other prediction modes. For example, the prediction processing unit 304 may include a palette unit, an intra-block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0207] When operating according to AV1, the motion compensation unit 316 can be configured to decode the coding blocks of the video data (e.g., both the luma coding blocks and the chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or composite inter-intra prediction, as described above. The intra prediction unit 318 can be configured to decode the coding blocks of the video data (e.g., both the luma coding blocks and the chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filtering intra prediction, CFL, intra block copy (IBC), and / or palette mode, as described above.
[0208] CPB memory 320 may store video data (eg, an encoded video bitstream) to be decoded by components of video decoder 300. For example, the video bitstream may be obtained from computer readable medium 110 ( Figure 1) to obtain video data stored in the CPB memory 320. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Moreover, the CPB memory 320 may store video data other than syntax elements of decoded pictures, for example, temporary data representing outputs from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, and the video decoder 300 may output and / or use the decoded pictures as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed by any of a variety of memory devices such as DRAM (including SDRAM), MRAM, RRAM, or other types of storage devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or different memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.
[0209] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) to retrieve the decoded video data. That is, memory 120 may store data, as discussed above with reference to CPB memory 320. Likewise, when some or all of the functionality of video decoder 300 is implemented using software executed by processing circuitry of video decoder 300, memory 120 may store instructions to be executed by video decoder 300.
[0210] Shows Figure 3 The various units are described to help understand the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 2 , fixed-function circuits refer to circuits that provide specific functions and are pre-set in the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., for receiving parameters or outputting parameters), but the types of operations performed by fixed-function circuits are generally immutable. In some examples, one or more of these units may be different circuit blocks (fixed-function or programmable), and in some examples, the one or more units may be integrated circuits.
[0211] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on a programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0212] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0213] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (wherein a block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0214] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block, as well as transform information such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization, and likewise, determine a degree of inverse quantization for the inverse quantization unit 306 to apply. For example, the inverse quantization unit 306 may perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0215] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block.
[0216] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 can generate a prediction block. In this case, the prediction information syntax element can indicate a reference picture in DPB 314 from which the reference block is retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in the same manner as described for motion compensation unit 224 ( Figure 2) to perform inter-frame prediction processing in a manner substantially similar to that described herein.
[0217] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 can generally generate a prediction block in the same manner as the intra-prediction unit 226 ( Figure 2 The intra prediction process is performed in a manner substantially similar to that described in the foregoing description. The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.
[0218] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.
[0219] The filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 may not necessarily be performed in all examples.
[0220] The video decoder 300 may store the reconstructed blocks in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed blocks in the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation. In addition, the video decoder 300 may output a decoded picture (e.g., a decoded video) from the DPB 314 for subsequent use in, for example, Figure 1 The display device is presented on a display device such as display device 118.
[0221] In this way, the video decoder 300 represents an example of a video decoding device, which includes a memory configured to store video data, and one or more processing units implemented in a circuit, wherein the one or more processing units are configured to perform the example techniques described in the present disclosure. For example, for entropy decoding such as context-based arithmetic decoding, the entropy decoding unit 302 can determine context values for one or more contexts. During decoding of a slice or picture, the entropy decoding unit 302 can update the context value (e.g., probability value). However, at the beginning of a slice or picture, the context value may be undefined. The entropy decoding unit 302 can use a predefined initialization point (e.g., an initial value stored in the DPB 314, the CPB memory 320, or some other memory) to initialize one or more context values, rather than starting from an undefined context value.
[0222] In one or more examples, in addition to or instead of using a predefined initialization point, the entropy decoding unit 302 may use one or more context values of a previously decoded slice or picture, or a mapped, scaled, weighted, etc. version of one or more context values as an initialization point. For example, the entropy decoding unit 302 may store one or more context values of a context of a decoded slice or picture (e.g., after decoding the last CTU of the slice or picture) in a buffer (e.g., DPB 314, CPB memory 320, or some other memory) as a set of initialization points. The entropy decoding unit 302 may utilize the set of initialization points (e.g., context values or values based on context values of a previously decoded slice or picture) to initialize context values for contexts used to decode subsequent slices or pictures.
[0223] The entropy decoding unit 302 may store initialization point sets for a plurality of previously decoded slices or pictures. For example, the buffer may store a first initialization point set associated with a first slice or picture, a second initialization point set associated with a second slice or picture, and so on. In addition, in order to determine (e.g., select) which initialization point set the entropy decoding unit 302 may use for a subsequent slice or picture, the entropy decoding unit 302 may also store information of a time identification value and / or a QP value of a slice or picture associated with each initialization point in each initialization point set.
[0224] In one or more examples, when the buffer is full, the entropy decoding unit 302 can determine which initialization point set to remove to make room for the initialization point set just determined. For example, the entropy decoding unit 302 can determine one or more context values for at least one context for decoding the current slice or picture. The entropy decoding unit 302 can determine that the buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full. As described above, each temporal initialization point set is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points.
[0225] The entropy decoding unit 302 may determine a first set of time initialization points associated with a slice or picture of the two or more slices or pictures based on a time identification value or a quantization parameter (QP) value of the slice or picture. The entropy decoding unit 302 may remove the first set of time initialization points associated with the slice or picture from the buffer and store a second set of time initialization points associated with the current slice or picture in the buffer. The second set of time initialization points is based on the determined one or more context values (e.g., equal to one or more context values of at least one context of the determined current slice or picture, or derived from one or more context values of at least one context of the current slice or picture).
[0226] Therefore, the entropy decoding unit 302 may use the time identification value and / or QP value to determine which initialization point set to remove, rather than using when the slice or picture is decoded as the only factor for determining (e.g., selecting) which initialization point set should be removed from the buffer. For example, in order to determine the first time initialization point set, the entropy decoding unit 302 may determine a first time initialization point set associated with a slice or picture from the two or more slices or pictures, wherein the slice or picture has at least one of the minimum time identification value or QP value among the time identification values or quantization parameter (QP) values of the two or more slices or pictures. For example, the entropy decoding unit 302 may determine the slice or picture with the minimum time identification value from the time identification values of the two or more slices or pictures, or determine the slice or picture with the minimum QP value from the QP values of the two or more slices or pictures. Then, the entropy decoding unit 302 may remove the initialization point set associated with the determined slice or picture (e.g., an initialization point with the minimum time identification value or QP value) from the buffer.
[0227] In one or more examples, the entropy decoding unit 302 may remove the initialization point set associated with the slice or picture having the smallest time identification value or QP value if none of the initialization points in the initialization point set is associated with the following slice or picture: the slice or picture has the same time identification value or QP value as the time identification value or QP value of the current slice or picture. For example, the entropy decoding unit 302 may determine that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each of the two or more slices or pictures. In this example, the entropy decoding unit 302 may remove the first time initialization point set based on determining that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each of the two or more slices or pictures. For example, the time identification value or QP value of the slice or picture associated with the first time initialization point set is different from the time identification value or QP value of the current slice or picture.
[0228] For example, assume that the current slice or picture is a first slice or picture. In this example, the entropy decoding unit 302 may determine one or more context values for at least one context for decoding a second slice or picture, and determine a third slice or picture having at least one of the same time identification value or QP value as the time identification value or QP value of the second slice or picture from the two or more slices or pictures. In this example, the entropy decoding unit 302 may remove a third time initialization point set associated with the third slice or picture from the buffer, and store a fourth time initialization point set associated with the second slice or picture in the buffer based on the determined one or more context values for at least one context for decoding the second slice or picture.
[0229] Then, to decode the subsequent picture, the entropy decoding unit 302 may determine (e.g., select) a set of time initialization points stored in the buffer, and initialize one or more context values of at least one context for decoding the subsequent slice or picture based on the selected set of time initialization points. For example, the entropy decoding unit 302 may assign initial values of one or more context values to be equal to the selected set of time initialization points, or derive initial values of one or more context values based on (e.g., by mapping, scaling, weighting, etc.) the selected set of time initialization points. The entropy decoding unit 302 may perform context-based arithmetic decoding on the subsequent slice or picture. For example, the entropy decoding unit 302 may utilize the initial values of the context values to decode the syntax elements of the subsequent slice or picture, and update the context values during decoding of the subsequent slice or picture.
[0230] In one or more examples, the video decoder 300 may also be configured to store multiple time initialization points for one or more contexts used in context-based arithmetic decoding of video data of a current picture or slice (wherein the multiple time initialization points are included in video data of one or more previous pictures that precede the current picture in decoding order), store a corresponding time identification (ID) value associated with each of the multiple time initialization points, select at least one of the multiple time initialization points based on the respective time ID values associated with the multiple time initialization points and the time ID value of the current picture or slice, and perform context-based arithmetic decoding on the video data of the current picture or slice based on the selected at least one time initialization point.
[0231] The video decoder 300 may be configured to store, in a first buffer, one or more temporal initialization points for one or more contexts used in context-based arithmetic decoding of video data of one or more previous pictures, and to store, in a second buffer, temporal initialization points for one or more contexts used in context-based arithmetic decoding of a slice of video data of a current picture, wherein storing in the second buffer comprises storing in the second buffer during decoding of the video data of the current picture, and storing the temporal initialization points stored in the second buffer in the first buffer after processing a last coding tree unit (CTU) or slice of the current picture.
[0232] The video decoder 300 may be configured to store previous temporal initialization points for one or more contexts used in context-based arithmetic decoding of video data of a previous slice in a previous picture (for a current slice), determine, based on the current slice having a position in the current picture corresponding to the position of the previous slice in the previous picture, that the current slice in the current picture has a position in the current picture corresponding to the position of the previous slice in the previous picture, and determine a current temporal initialization point for the current slice based on the previous temporal initialization points.
[0233] Figure 4 2 is a flowchart illustrating an example method for encoding a current block according to the techniques of the present disclosure. The current block may include a current CU. Figure 1 and Figure 2 ), but it should be understood that other devices may also be configured to perform the same Figure 4 Similar approach.
[0234] In this example, the video encoder 200 initially predicts a current block (400). For example, the video encoder 200 may form a prediction block for the current block. Then, the video encoder 200 may calculate a residual block for the current block (402). In order to calculate the residual block, the video encoder 200 may calculate the difference between the original unencoded block and the prediction block of the current block. Subsequently, the video encoder 200 may transform the residual block and quantize the transform coefficients of the residual block (404). Next, the video encoder 200 may scan the quantized coefficients of the residual block (406). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (408). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. According to one or more examples, the video encoder 200 may encode the transform coefficients using context values determined using the techniques described in the present disclosure. Then, the video encoder 200 may output the entropy encoded data of the block (410).
[0235] Figure 5 1 is a flowchart illustrating an example method for decoding a current block of video data according to the techniques of the present disclosure. The current block may include a current CU. Figure 1 and 3 ), but it should be understood that other devices may also be configured to perform the same Figure 5 Similar approach.
[0236] The video decoder 300 may receive entropy-encoded data (e.g., entropy-encoded prediction information and entropy-encoded data for transform coefficients of a residual block corresponding to the current block) (500). The video decoder 300 may entropy decode the entropy-encoded data to determine the prediction information of the current block and reproduce the transform coefficients of the residual block (502). According to one or more examples, the video decoder 300 may decode the encoded data using context values determined using the techniques described in the present disclosure. The video decoder 300 may predict the current block (504), for example, using an intra-frame or inter-frame prediction mode as indicated by the prediction information for the current block to calculate a prediction block for the current block. The video decoder 300 may then inverse scan the reproduced transform coefficients (506) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (508). The video decoder 300 may ultimately decode the current block (510) by combining the prediction block and the residual block.
[0237] Figure 6is a flow chart illustrating an example method for processing video data. For ease of explanation, the processing circuit and buffer are described Figure 6 Examples of processing circuits include processing circuits of the video encoder 200 and the video decoder 300, and examples of buffers include the memory 106, the memory 120, the video data memory 230, the DPB 218, the CPB memory 320, the DPB 314, or any other memory for the video encoder 200 or the video decoder 300.
[0238] The processing circuitry may be configured to determine one or more context values for at least one context for encoding or decoding a current slice or picture (600). For example, when the video encoder 200 and the video decoder 300 are encoding or decoding a current slice or picture, the video encoder 200 or the video decoder 300 may update the context value for the most recently encoded or decoded video data for the slice or picture based on the context.
[0239] The processing circuit may determine that a buffer for storing sets of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full (602). As described above, each set of temporal initialization points is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points. For example, there may be a limit on the number of sets of temporal initialization points that the buffer can store to keep the size of the buffer practical. As an example, the buffer can store up to five sets of temporal initialization points.
[0240] The processing circuit may determine (e.g., identify) a first set of temporal initialization points associated with a slice or picture from the two or more slices or pictures based on at least one of a slice type, a time identification value, or a quantization parameter (QP) value of the slice or picture (604). For example, the buffer may also store time identification values, QP values, and / or slice type information of slices and pictures associated with respective initialization point sets stored in the buffer.
[0241] For example, in order to determine the first time initialization point set, the processing circuit can be configured to determine, from the two or more slices or pictures, a first time initialization point set associated with a slice or picture, which has at least one of the minimum time identification value or quantization parameter (QP) value among the time identification values or QP values of the two or more slices or pictures. For example, the processing circuit can determine the slice or picture with the minimum time identification value from the time identification values of the two or more slices or pictures, and / or determine the slice or picture with the minimum QP value from the QP values of the two or more slices or pictures.
[0242] In some examples, the first initialization point set with the minimum time identification value or QP value may have a slice type different from the current slice. In some examples, such as when multiple time initialization point sets are stored for a slice type, the video encoder 200 and the video decoder 300 may determine a grouping of time initialization point sets associated with slices having the same slice type as the current slice. Then, the video encoder 200 and the video decoder 300 may determine the time initialization point set with the minimum time identification value or QP value within the grouping as the first time initialization point set.
[0243] The processing circuitry may remove a first set of temporal initialization points associated with the slice or picture from the buffer (606). The processing circuitry may store a second set of temporal initialization points associated with the current slice or picture in the buffer (608). The second set of temporal initialization points is based on the determined one or more context values (e.g., equal to or derived from the determined one or more context values for the context for the current slice or picture). In some examples, the processing circuitry may store the second set of temporal initialization points after processing a last coding tree unit (CTU) of the current slice or picture.
[0244] In one or more examples, for a subsequent slice or picture in a decoding order, the processing circuit may determine (e.g., select) a set of time initialization points stored in a buffer. The processing circuit may initialize one or more context values of at least one context for encoding or decoding the subsequent slice or picture based on the selected set of time initialization points (e.g., setting the initial value of the context value to be equal to the selected set of time initialization points, or deriving the initial value of the context value based on the selected set of time initialization points). The processing circuit may perform context-based arithmetic encoding or decoding on the subsequent slice or picture.
[0245] Figure 7 is a flow chart showing another example method for processing video data. For ease of explanation, the processing circuit and buffer are described. Figure 7 Examples of processing circuits include processing circuits of the video encoder 200 and the video decoder 300, and examples of buffers include the memory 106, the memory 120, the video data memory 230, the DPB 218, the CPB memory 320, the DPB 314, or any other memory used for the video encoder 200 or the video decoder 300.
[0246] As described above, the processing circuitry may remove the set of temporal initialization points associated with the slice or picture having the smallest temporal identification value or QP value. However, in some examples, the processing circuitry may perform such removal if there is no set of temporal initialization points associated with a slice or picture having the same temporal identification value, QP value, or slice type as the current slice or picture.
[0247] For example, suppose Figure 6 The current slice or picture is the first slice or picture. In this example, the processing circuit can determine one or more context values for at least one context for encoding or decoding the second slice or picture (700). That is, the processing circuit can perform similar encoding or decoding operations on the second slice or picture and update the context value as described above.
[0248] The processing circuitry may determine a third slice or picture from two or more slices or pictures, the third slice or picture having at least one of a time identification value, a QP value, and a slice type that is the same as a time identification value, a QP value, or a slice type as a second slice or picture (702). In this example, the processing circuitry may remove a third set of temporal initialization points associated with the third slice or picture from the buffer instead of removing the set of initialization points associated with the slice or picture having the smallest time identification value or QP value (704). The processing circuitry may store a fourth set of temporal initialization points associated with the second slice or picture in the buffer based on one or more context values of at least one context determined for encoding or decoding the second slice or picture (706).
[0249] Figure 7 The examples are for illustration purposes only and should not be considered limiting. In some examples, the processing circuit may not perform Figure 7 Instead, the processing circuit may remove the initialization point set (e.g., the temporal initialization point set associated with the slice or picture with the smallest temporal identifier value or QP value) based on the temporal identifier value or QP value. In addition, the slice type may not be considered as one of these factors. That is, the processing circuit may remove the entries of the temporal initialization point set having the same slice type and / or the same temporal identifier value and / or the same QP value as the current slice or picture.
[0250] Figure 8 is a flowchart showing another example method for processing video data. For ease of description, the processing circuit and buffer are described. Figure 8Examples of processing circuits include processing circuits of the video encoder 200 and the video decoder 300, and examples of buffers include the memory 106, the memory 120, the video data memory 230, the DPB 218, the CPB memory 320, the DPB 314, or any other memory used for the video encoder 200 or the video decoder 300.
[0251] Similar to Figure 6 and Figure 7 , the processing circuitry may determine one or more context values for at least one context for encoding or decoding a current slice or picture (800). In one or more examples, the processing circuitry may determine whether the buffer already stores a set of temporal initialization points for a slice or picture having the same temporal identification value or QP value as the current slice or picture (802).
[0252] If the buffer already stores a set of temporal initialization points for a slice or picture having the same temporal identification value or QP value as the current slice or picture ("Yes" at 802), the processing circuitry may overwrite (804) the stored set of temporal initialization points (e.g., the determined one or more context values or derived from the one or more context values) with the temporal initialization point of the current slice or picture. The processing circuitry may then set the next slice or picture as the current slice or picture and return one or more context values for determining at least one context for encoding or decoding the current slice or picture (800).
[0253] If the buffer does not already store a set of temporal initialization points for a slice or picture having the same temporal identification value or QP value as the current slice or picture ("No" at 802), the processing circuitry may determine whether the buffer is full (806). If the buffer is not full ("No" at 806), the processing circuitry may store the temporal initialization point (e.g., a context value for the current slice or picture, or a value derived from the context value for the current slice or picture) in the buffer (808). The processing circuitry may then set the next slice or picture as the current slice or picture and return one or more context values for determining at least one context for encoding or decoding the current slice or picture (800).
[0254] If the buffer is full ("yes" at 806), the processing circuitry may determine (e.g., identify) a first set of temporal initialization points associated with a slice or picture from two or more slices or pictures that has at least one of a minimum temporal identification value or a quantization parameter (QP) value among the temporal identification values or QP values of the two or more slices or pictures (810). Figure 6The processing circuit can remove a first set of time initialization points associated with the slice or picture from the buffer (812) and store a second set of time initialization points associated with the current slice or picture in the buffer, wherein the second set of time initialization points is based on the determined one or more context values (814).
[0255] exist Figure 8 The example order of operations shown in and performed by the processing circuit should not be considered limiting. For example, the processing circuit may first determine whether the buffer is full (806), and if the buffer is not full, the processing circuit may store the initialization point (808), even if the buffer already stores a temporal initialization point for a slice or picture having the same time identification value or QP value as the current slice or picture. As another example, if the buffer is full, the processing circuit may remove the set of temporal initialization points associated with the slice or picture having the smallest time identification value or QP value, even if the buffer already stores a temporal initialization point for a slice or picture having the same time identification value and QP value as the current slice or picture. Other modifications to the order of operations may be made.
[0256] The techniques shown in reference numerals 804 and 812 include an example of removing an initialization point set. In general, the processing circuit may first determine whether the buffer stores a temporal initialization point with the same temporal ID or QP value as the current slice or picture, and if so, remove the temporal initialization point set and write the temporal initialization point of the current slice or picture. Otherwise, the processing circuit may remove the determined (e.g., identified) initialization point set, wherein the determined initialization point set is associated with the slice or picture with the smallest temporal identification value or QP value.
[0257] Described below are example techniques that may be performed together or separately.
[0258] Clause 1. A method of decoding video data, the method comprising: storing a plurality of temporal initialization points for one or more contexts used in context-based arithmetic decoding of video data of a current picture or slice, wherein the plurality of temporal initialization points are included in video data of one or more previous pictures preceding the current picture in decoding order; storing respective time identification (ID) values associated with each of the plurality of temporal initialization points; selecting at least one (e.g., if available) of the plurality of temporal initialization points based on the respective temporal ID values associated with the plurality of temporal initialization points and the temporal ID value of the current picture or slice; and performing context-based arithmetic decoding of the video data of the current picture or slice based on the selected at least one temporal initialization point.
[0259] Clause 2. The method according to clause 1, wherein selecting the at least one time initialization point comprises: determining a set of time initialization points from the multiple time initialization points, wherein each time ID value of the time initialization point in the set of time initialization points is less than or equal to the time ID value of the current picture or slice; and selecting the at least one time initialization point from the set of time initialization points.
[0260] Clause 3. The method according to clause 1, wherein selecting the at least one time initialization point comprises: determining a set of time initialization points from the multiple time initialization points, wherein each time ID value of the time initialization point in the set of time initialization points is equal to the time ID value of the current picture or slice; and selecting the at least one time initialization point from the set of time initialization points.
[0261] Clause 4. A method according to clause 1, wherein selecting the at least one time initialization point comprises: determining that none of the multiple time initialization points has a time ID value equal to the time ID value of the current picture or slice; based on the determination that none of the multiple time initialization points has a time ID value equal to the time ID value of the current picture or slice, determining whether any of the multiple time initialization points has a time ID value less than one than the time ID value of the current picture or slice; and based on determining that there are one or more time initialization points whose time ID values are one less than the time ID value of the current picture or slice, selecting the at least one time initialization point from the one or more time initialization points that will have a time ID value less than one than the time ID value of the current picture or slice.
[0262] Clause 5. A method of decoding video data, the method comprising: storing in a first buffer one or more temporal initialization points for one or more contexts used in context-based arithmetic decoding of the video data of one or more previous pictures; storing in a second buffer temporal initialization points for one or more contexts used in context-based arithmetic decoding of the video data of a slice of a current picture, wherein storing in the second buffer comprises: storing in the second buffer during decoding of the video data of the current picture; and storing the temporal initialization points stored in the second buffer in the first buffer after processing a last coding tree unit (CTU) or slice of the current picture.
[0263] Clause 6. The method of any one of clauses 1-4, wherein storing the plurality of time initialization points comprises: storing the plurality of time initialization points according to the method of clause 5.
[0264] Clause 7. A method for decoding video data, the method comprising: storing previous temporal initialization points corresponding to one or more contexts used in context-based arithmetic decoding of the video data of a previous slice in a previous picture; for a current slice, determining that the current slice in the current picture has a position in the current picture corresponding to the position of the previous slice in the previous picture; and determining a current temporal initialization point for the current slice based on the previous temporal initialization points based on the current slice having a position in the current picture corresponding to the position of the previous slice in the previous picture.
[0265] Clause 8. A method of decoding video data comprising a combination according to any of clauses 1-7.
[0266] Clause 9. A method as recited in any of clauses 1-8, wherein context-based arithmetic coding comprises context-adaptive binary arithmetic coding (CABAC).
[0267] Clause 10. The method of any of clauses 1-9, wherein context-based arithmetic coding comprises context-based arithmetic decoding.
[0268] Clause 11. A method as recited in any one of clauses 1-9, wherein context-based arithmetic decoding comprises context-based arithmetic coding.
[0269] Clause 12. An apparatus for decoding video data, the apparatus comprising: a memory configured to store the video data; and a processing circuit configured to perform the method according to any one or combination of clauses 1-11.
[0270] Clause 13. The device of clause 12, wherein the device comprises a video decoder.
[0271] Clause 14. The apparatus of any of clauses 12 and 13, wherein the apparatus comprises a video encoder.
[0272] Clause 15. The apparatus of any of clauses 12-14, further comprising a display configured to display the decoded video data.
[0273] Clause 16. The device of any of clauses 12-15, wherein the device comprises one or more of: a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0274] Clause 17. A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to perform the method of any of clauses 1-11.
[0275] Clause 18. An apparatus for decoding video data, the apparatus comprising: means for performing the method according to any one or combination of clauses 1-11.
[0276] Clause 1A. A method of processing video data, the method comprising: determining one or more context values for at least one context for encoding or decoding a current slice or picture; determining that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture from the two or more slices or pictures and includes one or more temporal initialization points; determining a first set of temporal initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a temporal identifier value, or a quantization parameter (QP) value of the slice or picture; removing the first set of temporal initialization points associated with the slice or picture from the buffer; and storing in the buffer a second set of temporal initialization points associated with the current slice or picture, wherein the second set of temporal initialization points is based on the determined one or more context values.
[0277] Clause 2A. The method of clause 1A, wherein determining the first set of temporal initialization points comprises determining, from the two or more slices or pictures, the first set of temporal initialization points associated with the slice or picture having at least one of a minimum temporal identifier value or a quantization parameter (QP) value among temporal identifier values or QP values of the two or more slices or pictures.
[0278] Clause 3A. The method of clause 2A, wherein determining the slice or picture having at least one of the minimum time-stamp value or the QP value from the two or more slices or pictures comprises determining the slice or picture having the minimum time-stamp value from the time-stamp values of the two or more slices or pictures.
[0279] Clause 4A. The method of clause 2A, wherein determining the slice or picture having at least one of a minimum temporal marker value or a QP value from among the two or more slices or pictures comprises determining the slice or picture having a minimum QP value from among the QP values of the two or more slices or pictures.
[0280] Clause 5A. The method of any of clauses 1A-4A, further comprising: determining that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value or QP value of each of the two or more slices or pictures, wherein the time identification value or QP value of the slice or picture associated with the first set of time initialization points is different from the time identification value or QP value of the current slice or picture, and wherein removing the first set of time initialization points comprises: removing the first set of time initialization points based on determining that at least one of the time identification value or QP value of the current slice or picture is different from the time identification value and QP value of each of the two or more slices or pictures.
[0281] Clause 6A. A method according to any of clauses 1A-5A, wherein the current slice or picture is a first slice or picture, and the method further comprises: determining one or more context values for at least one context for encoding or decoding a second slice or picture; determining, from the two or more slices or pictures, a third slice or picture having at least one of the same time identifier value, QP value, or slice type as the time identifier value, QP value, or slice type of the second slice or picture; removing from the buffer a third set of time initialization points associated with the third slice or picture; and storing in the buffer a fourth set of time initialization points associated with the second slice or picture based on the determined one or more context values for at least one context for encoding or decoding the second slice or picture.
[0282] Clause 7A. The method according to any one of clauses 1A-6A further comprising: determining a set of time initialization points stored in the buffer; initializing one or more context values of at least one context for encoding or decoding a subsequent slice or picture based on the determined set of time initialization points; and performing context-based arithmetic encoding or decoding on the subsequent slice or picture.
[0283] Clause 8A. The method according to clause 7A further includes: determining a time identification value for the subsequent slice or picture; determining that none of two or more slices or pictures having an associated time initialization point set stored in the buffer has a time identification value equal to the time identification value of the subsequent slice or picture; and determining, from the two or more slices or pictures, a second slice or picture having a time identification value closest to and less than the time identification value of the subsequent slice or picture, wherein determining the time initialization point set includes: selecting the time initialization point set associated with the second slice or picture.
[0284] Clause 9A. The method of clause 7A further comprising: determining a QP value for the subsequent slice or picture; determining that none of two or more slices or pictures having an associated set of temporal initialization points stored in the buffer has a QP value equal to the QP value for the subsequent slice or picture; and determining, from the two or more slices or pictures, a second slice or picture having a QP value closest to the QP value for the subsequent slice or picture, wherein determining the set of temporal initialization points comprises: selecting the set of initialization points associated with the second slice or picture.
[0285] Clause 10A. The method of clauses 1A-9A, wherein storing the second set of initialization points comprises storing the second set of temporal initialization points after processing a last coding tree unit (CTU) of the current slice or picture.
[0286] Clause 11A. An apparatus for processing video data, the apparatus comprising: a buffer configured to store a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding; and processing circuitry coupled to the buffer, the processing circuitry configured to: determine one or more context values of at least one context for encoding or decoding a current slice or picture; determine that the buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture from the two or more slices or pictures and includes one or more temporal initialization points; determine a first set of temporal initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a temporal identification value, or a quantization parameter (QP) value of the slice or picture; remove the first set of temporal initialization points associated with the slice or picture from the buffer; and store in the buffer a second set of temporal initialization points associated with the current slice or picture, wherein the second set of temporal initialization points is based on the determined one or more context values.
[0287] Clause 12A. The apparatus of clause 11A, wherein, to determine the first set of temporal initialization points, the processing circuit is configured to: determine, from the two or more slices or pictures, the first set of temporal initialization points associated with the slice or picture having at least one of a minimum temporal identifier value or a quantization parameter (QP) value among temporal identifier values or QP values of the two or more slices or pictures.
[0288] Clause 13A. The apparatus of clause 12A, wherein, to determine the slice or picture having at least one of the minimum time-stamp value or the QP value from the two or more slices or pictures, the processing circuit is configured to: determine the slice or picture having the minimum time-stamp value from the time-stamp values of the two or more slices or pictures.
[0289] Clause 14A. The apparatus of clause 12A, wherein, to determine the slice or picture having at least one of a minimum time-stamp value or a QP value from the two or more slices or pictures, the processing circuitry is configured to: determine the slice or picture having the minimum QP value from the QP values of the two or more slices or pictures.
[0290] Clause 15A. An apparatus as described in any of clauses 11A-14A, wherein the processing circuit is configured to: determine that at least one of the time identification value or the QP value of the current slice or picture is different from the time identification value or the QP value of each of the two or more slices or pictures, wherein the time identification value or the QP value of the slice or picture associated with the first set of time initialization points is different from the time identification value or the QP value of the current slice or picture, and wherein, to remove the first set of time initialization points, the processing circuit is configured to: remove the first set of time initialization points based on determining that at least one of the time identification value or the QP value of the current slice or picture is different from the time identification value and the QP value of each of the two or more slices or pictures.
[0291] Clause 16A. An apparatus according to any of clauses 11A-15A, wherein the current slice or picture is a first slice or picture, and wherein the processing circuit is configured to: determine one or more context values for at least one context for encoding or decoding a second slice or picture; determine, from the two or more slices or pictures, a third slice or picture having at least one of a time identifier value, a QP value, or a slice type that is the same as the time identifier value, the QP value, or the slice type of the second slice or picture; remove from the buffer a third set of time initialization points associated with the third slice or picture; and based on the determined one or more context values for at least one context for encoding or decoding the second slice or picture, store in the buffer a fourth set of time initialization points associated with the second slice or picture.
[0292] Clause 17A. An apparatus as described in any of clauses 11A-16A, wherein the processing circuit is configured to: determine a set of time initialization points stored in the buffer; initialize one or more context values for at least one context for encoding or decoding a subsequent slice or picture based on the determined set of time initialization points; and perform context-based arithmetic encoding or decoding on the subsequent slice or picture.
[0293] Clause 18A. An apparatus according to clause 17A, wherein the processing circuit is configured to: determine a time identification value for the subsequent slice or picture; determine that none of two or more slices or pictures having an associated set of time initialization points stored in the buffer has a time identification value equal to the time identification value of the subsequent slice or picture; and determine, from the two or more slices or pictures, a second slice or picture having a time identification value that is closest to and less than the time identification value of the subsequent slice or picture, wherein, to determine the set of time initialization points, the processing circuit is configured to: select the set of time initialization points associated with the second slice or picture.
[0294] Clause 19A. The apparatus of clause 17A, wherein the processing circuitry is configured to: determine a QP value for the subsequent slice or picture; determine that none of two or more slices or pictures having an associated set of temporal initialization points stored in the buffer has a QP value equal to the QP value for the subsequent slice or picture; and determine, from the two or more slices or pictures, a second slice or picture having a QP value closest to the QP value for the subsequent slice or picture, wherein, to determine the set of temporal initialization points, the processing circuitry is configured to: select the set of initialization points associated with the second slice or picture.
[0295] Clause 20A. The apparatus of any of clauses 11A-19A, wherein, to store the second set of initialization points, the processing circuitry is configured to: store the second set of temporal initialization points after processing a last coding tree unit (CTU) of the current slice or picture.
[0296] Clause 21A. The device of any of clauses 11A-20A, wherein the device comprises one or more of: a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0297] Clause 22A. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the following operations: determine one or more context values for at least one context for encoding or decoding a current slice or picture; determine that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture from the two or more slices or pictures and includes one or more temporal initialization points; determine a first set of temporal initialization points associated with a slice or picture from the two or more slices or pictures based on at least one of a slice type, a temporal identifier value, or a quantization parameter (QP) value of the slice or picture; remove the first set of temporal initialization points associated with the slice or picture from the buffer; and store in the buffer a second set of temporal initialization points associated with the current slice or picture, wherein the second set of temporal initialization points is based on the determined one or more context values.
[0298] Clause 23A. The computer-readable storage medium of Clause 22A, further comprising instructions for causing the one or more processors to perform the method of any of Clauses 1A-10A.
[0299] Clause 24A. An apparatus for processing video data, the apparatus comprising: means for determining one or more context values for at least one context for encoding or decoding a current slice or picture; means for determining that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture from the two or more slices or pictures and comprises one or more temporal initialization points; means for determining a first set of temporal initialization points associated with the slice or picture from the two or more slices or pictures based on at least one of a slice type, a temporal identifier value, or a quantization parameter (QP) value of the slice or picture; means for removing the first set of temporal initialization points associated with the slice or picture from the buffer; and means for storing in the buffer a second set of temporal initialization points associated with the current slice or picture, wherein the second set of temporal initialization points is based on the determined one or more context values.
[0300] Clause 25A. The apparatus of Clause 24A, further comprising instructions for causing the one or more processors to perform the method of any of Clauses 1A-10A.
[0301] It is to be appreciated that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different sequence, may be added together, merged, or omitted (e.g., not all described actions or events are necessary for practicing the techniques). In addition, in some examples, actions or events may be performed simultaneously, for example, through multithreading, interrupt processing, or multiple processors, rather than sequentially.
[0302] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored in or sent via a computer-readable medium as one or more instructions or codes, and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium (such as a data storage medium), or a communication medium including any medium that facilitates the transmission of a computer program from one place to another, for example, according to a communication protocol. In the manner described, a computer-readable medium may generally correspond to (1) a non-temporary tangible computer-readable storage medium or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for the implementation of the technology described in the present disclosure. A computer program product may include a computer-readable medium.
[0303] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory or any other medium that can be used to store desired program codes and can be accessed by a computer in the form of instructions or data structures. In addition, any connection is appropriately referred to as a computer-readable medium. For example, if instructions are sent from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave), then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are instead directed to non-temporary, tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical disks, digital versatile disks (DVDs) and blue-ray disks, wherein disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0304] Instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated logic circuits or discrete logic circuits. Therefore, the terms "processor" and "processing circuit" as used herein may refer to any of the aforementioned structures or any other structure suitable for the implementation of the techniques described herein. In addition, in some aspects, the functions described herein may be provided within dedicated hardware modules and / or software modules configured for encoding and decoding, or incorporated into a combined codec. In addition, the techniques may be fully implemented in one or more circuits or logic elements.
[0305] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or collections of ICs (e.g., chipsets). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but are not necessarily required to be implemented by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, or provided by a group of interoperable hardware units (including one or more processors as described above) in conjunction with appropriate software and / or firmware.
[0306] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for processing video data, the method comprising: determining one or more context values for at least one context for encoding or decoding a current slice or picture; determining that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points; Determining, from the two or more slices or pictures, a first set of temporal initialization points associated with the slice or picture based on at least one of a slice type, a temporal identification value, or a quantization parameter (QP) value of the slice or picture; removing, from the buffer, the first set of temporal initialization points associated with the slice or picture; and In the buffer, a second set of temporal initialization points associated with the current slice or picture is stored, wherein the second set of temporal initialization points is based on the determined one or more context values.
2. The method according to claim 1, wherein: Determining the first set of time initialization points includes: determining, from the two or more slices or pictures, the first set of time initialization points associated with the slice or picture having at least one of the minimum time identification value or quantization parameter (QP) value among the time identification values or QP values of the two or more slices or pictures.
3. The method according to claim 2, wherein: Determining the slice or picture having at least one of the minimum time identification value or the QP value from the two or more slices or pictures includes: determining the slice or picture having the minimum time identification value from the time identification values of the two or more slices or pictures.
4. The method according to claim 2, wherein: Determining the slice or picture having at least one of a minimum time identification value or a QP value from the two or more slices or pictures includes: determining the slice or picture having a minimum QP value from the QP values of the two or more slices or pictures.
5. The method according to claim 1, further comprising: determining that at least one of a time stamp value or a QP value for the current slice or picture is different from a time stamp value or a QP value for each of the two or more slices or pictures, wherein the time identification value or QP value of the slice or picture associated with the first time initialization point set is different from the time identification value or QP value of the current slice or picture, and Among them, removing the first set of time initialization points includes: removing the first set of time initialization points based on determining that at least one of the time identification value or QP value for the current slice or picture is different from the time identification value and QP value for each of the two or more slices or pictures.
6. The method according to claim 1, wherein: The current slice or picture is a first slice or picture, and the method further includes: determining one or more context values for at least one context for encoding or decoding a second slice or picture; Determine, from the two or more slices or pictures, a third slice or picture having at least one of a time stamp value, a QP value, or a slice type that is the same as a time stamp value, a QP value, or a slice type of the second slice or picture; removing from the buffer a third set of temporal initialization points associated with the third slice or picture; and Based on the determined one or more context values of at least one context for encoding or decoding the second slice or picture, a fourth set of temporal initialization points associated with the second slice or picture is stored in the buffer.
7. The method according to claim 1, further comprising: determining a set of time initialization points stored in the buffer; Initializing, based on the determined set of temporal initialization points, one or more context values for at least one context used for encoding or decoding a subsequent slice or picture; as well as The subsequent slice or picture is subjected to context-based arithmetic coding or decoding.
8. The method according to claim 7, further comprising: Determining a time stamp value for the subsequent slice or picture; determining that none of two or more slices or pictures having an associated set of temporal initialization points stored in the buffer has a time identification value equal to the time identification value for the subsequent slice or picture; as well as determining, from the two or more slices or pictures, a second slice or picture having a time identification value that is closest to and smaller than the time identification value of the subsequent slice or picture, The determining of the time initialization point set includes: selecting the time initialization point set associated with the second slice or picture.
9. The method according to claim 7, further comprising: Determining a QP value for the subsequent slice or picture; determining that none of two or more slices or pictures having an associated set of temporal initialization points stored in the buffer has a QP value equal to the QP value for the subsequent slice or picture; as well as determining, from the two or more slices or pictures, a second slice or picture having a QP value closest to the QP value of the subsequent slice or picture, The determining of the temporal initialization point set includes: selecting the initialization point set associated with the second slice or picture.
10. The method according to claim 1, wherein: Storing the second set of initialization points includes storing the second set of temporal initialization points after processing a last coding tree unit (CTU) of the current slice or picture.
11. A device for processing video data, the device comprising: a buffer configured to store a set of temporal initialization points from two or more slices or pictures for context-based arithmetic coding; as well as a processing circuit coupled to the buffer, the processing circuit being configured to: determining one or more context values for at least one context for encoding or decoding a current slice or picture; determining that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points; Determining, from the two or more slices or pictures, a first set of temporal initialization points associated with the slice or picture based on at least one of a slice type, a temporal identification value, or a quantization parameter (QP) value of the slice or picture; removing, from the buffer, the first set of temporal initialization points associated with the slice or picture; and In the buffer, a second set of temporal initialization points associated with the current slice or picture is stored, wherein the second set of temporal initialization points is based on the determined one or more context values.
12. The device according to claim 11, wherein In order to determine the first set of time initialization points, the processing circuit is configured to: determine, from the two or more slices or pictures, the first set of time initialization points associated with the slice or picture having at least one of the minimum time identification value or quantization parameter (QP) value among the time identification values or QP values of the two or more slices or pictures.
13. The device according to claim 12, wherein: In order to determine the slice or picture having at least one of the minimum time identification value or the QP value from the two or more slices or pictures, the processing circuit is configured to: determine the slice or picture having the minimum time identification value from the time identification values of the two or more slices or pictures.
14. The apparatus according to claim 12, wherein: In order to determine the slice or picture having at least one of a minimum time identification value or a QP value from the two or more slices or pictures, the processing circuit is configured to: determine the slice or picture having the minimum QP value from the QP values of the two or more slices or pictures.
15. The apparatus according to claim 11, wherein: The processing circuit is configured to: determining that at least one of a time stamp value or a QP value for the current slice or picture is different from a time stamp value or a QP value for each of the two or more slices or pictures, wherein the time identification value or QP value of the slice or picture associated with the first time initialization point set is different from the time identification value or QP value of the current slice or picture, and In which, in order to remove the first set of time initialization points, the processing circuit is configured to: remove the first set of time initialization points based on determining that at least one of the time identification value or QP value for the current slice or picture is different from the time identification value and QP value for each of the two or more slices or pictures.
16. The apparatus according to claim 11, wherein: The current slice or picture is a first slice or picture, and wherein the processing circuit is configured to: determining one or more context values for at least one context for encoding or decoding a second slice or picture; Determine, from the two or more slices or pictures, a third slice or picture having at least one of a time stamp value, a QP value, or a slice type that is the same as a time stamp value, a QP value, or a slice type of the second slice or picture; removing from the buffer a third set of temporal initialization points associated with the third slice or picture; and Based on the determined one or more context values of at least one context for encoding or decoding the second slice or picture, a fourth set of temporal initialization points associated with the second slice or picture is stored in the buffer.
17. The apparatus according to claim 11, wherein: The processing circuit is configured to: determining a set of time initialization points stored in the buffer; Initializing, based on the determined set of temporal initialization points, one or more context values for at least one context used for encoding or decoding a subsequent slice or picture; as well as The subsequent slice or picture is subjected to context-based arithmetic coding or decoding.
18. The apparatus according to claim 17, wherein: The processing circuit is configured to: Determining a time stamp value for the subsequent slice or picture; determining that none of two or more slices or pictures having an associated set of temporal initialization points stored in the buffer has a time identification value equal to the time identification value for the subsequent slice or picture; as well as determining, from the two or more slices or pictures, a second slice or picture having a time identification value that is closest to and smaller than the time identification value of the subsequent slice or picture, In order to determine the time initialization point set, the processing circuit is configured to: select the time initialization point set associated with the second slice or picture.
19. The apparatus according to claim 17, wherein: The processing circuit is configured to: Determining a QP value for the subsequent slice or picture; determining that none of two or more slices or pictures having an associated set of temporal initialization points stored in the buffer has a QP value equal to the QP value for the subsequent slice or picture; as well as determining, from the two or more slices or pictures, a second slice or picture having a QP value closest to the QP value of the subsequent slice or picture, In order to determine the temporal initialization point set, the processing circuit is configured to: select the initialization point set associated with the second slice or picture.
20. The apparatus of claim 11, wherein: To store the second set of initialization points, the processing circuit is configured to: store the second set of temporal initialization points after processing a last coding tree unit (CTU) of the current slice or picture.
21. The apparatus according to claim 11, wherein: The device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
22. A computer-readable storage medium having stored thereon instructions which, when executed, cause one or more processors to: determining one or more context values for at least one context for encoding or decoding a current slice or picture; determining that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points; Determining, from the two or more slices or pictures, a first set of temporal initialization points associated with the slice or picture based on at least one of a slice type, a temporal identification value, or a quantization parameter (QP) value of the slice or picture; removing, from the buffer, the first set of temporal initialization points associated with the slice or picture; and In the buffer, a second set of temporal initialization points associated with the current slice or picture is stored, wherein the second set of temporal initialization points is based on the determined one or more context values.
23. A device for processing video data, the device comprising: means for determining one or more context values for at least one context for encoding or decoding a current slice or picture; means for determining that a buffer for storing a set of temporal initialization points from two or more slices or pictures for context-based arithmetic decoding is full, wherein each set of temporal initialization points is associated with a slice or picture of the two or more slices or pictures and includes one or more temporal initialization points; means for determining, from the two or more slices or pictures, a first set of temporal initialization points associated with the slice or picture based on at least one of a slice type, a temporal identification value, or a quantization parameter (QP) value of the slice or picture; means for removing, from the buffer, the first set of temporal initialization points associated with the slice or picture; and Means for storing, in the buffer, a second set of temporal initialization points associated with the current slice or picture, wherein the second set of temporal initialization points is based on the determined one or more context values.
