Predictive coefficient coding and decoding
By copying adjacent coefficients or selecting coefficients from the coefficient value list, the problem of low encoding and decoding efficiency in processing non-transformed blocks is solved, and efficient encoding and decoding of blocks with few zero coefficient residuals is achieved.
Patent Information
- Application Number
- CN202510049771.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-10
- Filing Date
- 2020-02-11
- Publication Date
- 2025-03-21
AI Technical Summary
When existing video encoding and decoding techniques deal with non-transformed blocks with few zero coefficients, the encoding and decoding efficiency is not high, and traditional techniques assume that transformation coefficients equal to zero or equal to one, resulting in unsuitable for non-transformed blocks.
Codecs are especially suitable for screen content or residual blocks without transformation by copying adjacent coefficients or selecting coefficients from a predefined list of coefficient values.
The encoding and decoding efficiency is improved when encoding and decoding residual blocks with few zero coefficients, and is suitable for blocks that code in transform skip mode.
Smart Images

Figure CN119676430A_ABST
Abstract
Description
[0001] This application is a divisional application of a Chinese patent application filed on February 11, 2020, with application number 202080012517.6 and invention name “Predictive Coefficient Coding and Decoding”.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS
[0003] This application claims priority to U.S. Application No. 16 / 786,792, filed on February 10, 2020, which claims the benefit of U.S. Provisional Application No. 62 / 804,064, filed on February 11, 2019, the entire contents of each of which are incorporated herein by reference. Technical Field
[0004] The present disclosure relates to video encoding and video decoding. Background Art
[0005] Digital video capabilities can 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 radio telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video codec technologies, 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 Codec (AVC), High Efficiency Video Codec (HEVC) standards, ITU-T h.265 / High Efficiency Video Codec (HEVC), and extensions of these standards. By implementing such video codec technologies, video devices can more efficiently send, receive, encode, decode and / or store digital video information.
[0006] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or eliminate redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as codec tree units (CTUs), codec units (CUs), and / or codec nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial predictions of reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial predictions of reference samples in neighboring blocks in the same picture or temporal predictions of reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention
[0007] The present disclosure describes predictive coefficient coding techniques, in which coefficients can be coded by copying adjacent coefficients or selecting coefficients from a predefined list of coefficient values (e.g., a dictionary). These techniques can be used to achieve better coefficient coding, particularly for screen content or residual blocks that are coded without transformation, such as residual blocks coded in transform skip mode. When a residual block is coded in transform skip mode, the coefficients of the block are not transformed, which typically results in a block with relatively more non-zero coefficients. Although there are various techniques for efficiently coding and decoding transform coefficient blocks, these coding techniques are based on the assumption that a large number of transform coefficients will be equal to zero or sometimes equal to one. Therefore, these techniques are not necessarily applicable to non-transform blocks with few coefficients equal to zero. The present disclosure describes techniques that can improve coding efficiency when coding and decoding residual blocks with few zero coefficients.
[0008] According to one example, a method for decoding video data includes: determining a predictive block of a current block of the video data; determining a residual block of the current block, wherein determining the residual block of the current block includes determining a coefficient group of the current block, the coefficient group including multiple coefficients, and wherein determining the coefficient group includes: receiving a flag of the video data, the flag indicating whether one or more coefficients of the coefficients of the coefficient group are copied from a coefficient list or from adjacent coefficients; in response to the flag being set to a first value, copying coefficient values of adjacent coefficients of a first coefficient of the coefficients; in response to the flag being set to a second value, determining the coefficient value of the first coefficient from the coefficient value list; and adding the predictive block to the residual block to determine a reconstructed block of the current block.
[0009] According to one example, a method for decoding video data includes: determining a predictive block for a current block of the video data; determining a residual block for the current block, wherein determining the residual block for the current block includes: for a first coefficient of a coefficient group, receiving a first instance of a flag, wherein the first instance of the flag is set to a first value; in response to the first instance of the flag being set to the first value, copying coefficient values of adjacent coefficients of the first coefficient; for a second coefficient of the coefficient group, receiving a second instance of the flag, wherein the second instance of the flag is set to a second value; in response to the second instance of the flag being set to the second value, receiving an index in a coefficient value list; determining a value corresponding to the index from the coefficient value list; and setting the value of the second coefficient to the value corresponding to the index; and adding the predictive block to the residual block to determine a reconstructed block for the current block.
[0010] According to another example, a device for decoding video data includes: a memory configured to store video data; and one or more processors implemented in a circuit, configured to: determine a predictive block of a current block of the video data; determine a residual block of the current block, wherein in order to determine the residual block of the current block, the one or more processors are also configured to determine a coefficient group for the current block, the coefficient group including multiple coefficients, and wherein in order to determine the coefficient group, the one or more processors are also configured to: receive a flag of the video data, the flag indicating whether one or more coefficients of the coefficients of the coefficient group are copied from a coefficient list or from adjacent coefficients; in response to the flag being set to a first value, copy the coefficient value of an adjacent coefficient of a first coefficient of the coefficients; in response to the flag being set to a second value, determine the coefficient value of the first coefficient from the coefficient value list; and add the predictive block to the residual block to determine a reconstructed block of the current block.
[0011] According to another example, a device for decoding video data includes: a memory configured to store video data; and one or more processors implemented in a circuit, configured to: determine a predictive block for a current block of the video data; determine a residual block for the current block, wherein in order to determine the residual block for the current block, the one or more processors are further configured to: for a first coefficient of a coefficient group, receive a first instance of a flag, wherein the first instance of the flag is set to a first value; in response to the first instance of the flag being set to the first value, copy the coefficient value of an adjacent coefficient of the first coefficient; for a second coefficient of the coefficient group, receive a second instance of the flag, wherein the second instance of the flag is set to a second value; in response to the second instance of the flag being set to the second value, receive an index in a coefficient value list; determine a value corresponding to the index from the coefficient value list; and set the value of the second coefficient to the value corresponding to the index; and add the predictive block to the residual block to determine a reconstructed block for the current block.
[0012] According to another example, a computer-readable medium storing instructions, when the instructions are executed by one or more processors, causes the one or more processors to: determine a predictive block of a current block of the video data; determine a residual block of the current block, wherein determining the residual block of the current block includes determining a coefficient group of the current block, the coefficient group including multiple coefficients, and wherein determining the coefficient group includes: receiving a flag of the video data, the flag indicating whether one or more coefficients of the coefficients of the coefficient group are copied from a coefficient list or from a neighboring coefficient; in response to the flag being set to a first value, copying the coefficient value of a neighboring coefficient of a first coefficient of the coefficients; in response to the flag being set to a second value, determining the coefficient value of the first coefficient from the coefficient value list; and adding the predictive block to the residual block to determine a reconstructed block of the current block.
[0013] According to another example, a computer-readable medium storing instructions, when the instructions are executed by one or more processors, causes the one or more processors to: determine a predictive block for a current block of video data; determine a residual block for the current block, wherein to determine the residual block for the current block, the instructions cause the one or more processors to: for a first coefficient of a coefficient group, receive a first instance of a flag, wherein the first instance of the flag is set to a first value; in response to the first instance of the flag being set to the first value, copy the coefficient value of a neighboring coefficient of the first coefficient; for a second coefficient of the coefficient group, receive a second instance of the flag, wherein the second instance of the flag is set to a second value; in response to the second instance of the flag being set to the second value, receive an index in a coefficient value list; determine a value corresponding to the index from the coefficient value list; and set the value of the second coefficient to the value corresponding to the index; and add the predictive block to the residual block to determine a reconstructed block for the current block.
[0014] According to another example, a device includes: a component for determining a predictive block of a current block of the video data; a component for determining a residual block of the current block, wherein the component for determining the residual block of the current block includes a component for determining a coefficient group of the current block, the coefficient group including multiple coefficients, and wherein the component for determining the coefficient group includes: a component for receiving a flag of the video data, the flag indicating whether one or more coefficients of the coefficients of the coefficient group are copied from a coefficient list or from a neighboring coefficient; a component for copying coefficient values of neighboring coefficients of a first coefficient of the coefficients in response to the flag being set to a first value; and a component for determining the coefficient value of the first coefficient from the coefficient value list in response to the flag being set to a second value; and a component for adding the predictive block to the residual block to determine a reconstructed block of the current block.
[0015] According to another example, an apparatus includes: a component for determining a predictive block for a current block of video data; a component for determining a residual block for the current block, wherein the component for determining the residual block for the current block includes: a component for receiving a first instance of a flag for a first coefficient of a coefficient group, wherein the first instance of the flag is set to a first value; a component for copying coefficient values of neighboring coefficients of the first coefficient in response to the first instance of the flag being set to the first value; a component for receiving a second instance of the flag for a second coefficient of the coefficient group, wherein the second instance of the flag is set to a second value; a component for receiving an index in a coefficient value list in response to the second instance of the flag being set to the second value; a component for determining a value corresponding to the index from the coefficient value list; a component for setting the value of the second coefficient to the value corresponding to the index; and a component for adding the predictive block to the residual block to determine a reconstructed block for the current block.
[0016] 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, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0018] Figure 2A and Figure 2B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding codec tree unit (CTU).
[0019] Figure 3A The coefficients copied from the left neighbor are shown.
[0020] Figure 3B The coefficients copied from the top neighbor are shown.
[0021] Figure 4A The coefficients copied from the top neighbor or the left neighbor of the raster scan are shown.
[0022] Figure 4B The coefficients copied from the bottom neighbor or the right neighbor of the diagonal scan are shown.
[0023] Figure 5 It is shown that coefficients can be predicted from neighbors and / or coefficient lists.
[0024] Figure 6 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0025] Figure 7 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0026] Figure 8 is a flow chart illustrating a video encoding process.
[0027] Fig. 9 is a flow chart showing the video decoding process.
[0028] Fig.10 is a flow chart showing the video decoding process.
[0029] Fig.11 is a flow chart showing the video decoding process. DETAILED DESCRIPTION
[0030] Video coding (e.g., video encoding and / or video decoding) typically involves predicting a block of video data from a block of already coded video data in the same picture (e.g., intra-frame prediction) or a block of already coded video data in a different picture (e.g., inter-frame prediction). In some cases, the video encoder also calculates residual data by comparing the predictive block (also referred to as the prediction block) with the original block. Therefore, the residual data represents the difference between the predictive block and the original block of video data. In some coding scenarios, in order to reduce the number of bits required to signal the residual data, the video encoder transforms and quantizes the residual data, and signals the transformed and quantized residual data in the encoded bitstream. The compression achieved by the transform and quantization process may be lossy, which means that the transform and quantization process may introduce distortion into the decoded video data.
[0031] The video decoder decodes the residual data and adds it to the predictive block to produce a reconstructed video block that more closely matches the original video block than the predictive block alone. The reconstructed block may have distortion or artifacts due to losses introduced by the transformation and quantization of the residual data. One common type of artifact or distortion is known as blocking, where the boundaries of the blocks used to encode and decode the video data are visible.
[0032] To further improve the quality of the decoded video, the video decoder may perform one or more filtering operations on the reconstructed video blocks. For example, as part of performing one or more filtering operations, the video decoder may perform one or more of deblocking filtering, sample adaptive offset (SAO) filtering, and adaptive loop filtering (ALF). The parameters of these filtering operations may be determined by the video encoder and explicitly signaled in the encoded video bitstream, or may be implicitly determined by the video decoder without explicitly signaling these parameters in the encoded video bitstream.
[0033] The present disclosure describes predictive coefficient coding techniques, in which coefficients can be coded by copying adjacent coefficients or selecting coefficients from a predefined list of coefficient values (e.g., a dictionary). These techniques can be used to achieve better coefficient coding, particularly for screen content or residual blocks that are coded without transformation, such as residual blocks coded in transform skip mode. When a residual block is coded in transform skip mode, the coefficients of the block are not transformed, which typically results in a block with relatively more non-zero coefficients. Although there are various techniques for efficiently coding and decoding transform coefficient blocks, these coding techniques are based on the assumption that a large number of transform coefficients will be equal to zero or sometimes equal to one. Therefore, these techniques are not necessarily applicable to non-transform blocks with few coefficients equal to zero. The present disclosure describes techniques that can improve coding efficiency when coding and decoding residual blocks with few zero coefficients.
[0034] 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 encoding and decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Therefore, video data may include original, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as signaling data.
[0035] 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 destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may each include any of a variety of devices, including a desktop computer, a notebook (i.e., laptop) computer, a tablet computer, a set-top box, a broadcast receiver device, a telephone handset such as a smartphone, a television, a camera, a display device, a digital media player, a video game console, a video streaming device, a mobile device, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and, therefore, may be referred to as wireless communication devices.
[0036] exist Figure 1 In the example of , the source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. The destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to the present disclosure, the video encoder 200 of the source device 102 and the video decoder 300 of the destination device 116 can be configured to apply the coefficient encoding and decoding techniques described herein. Therefore, the source device 102 represents an example of a video encoding device, and the destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, the source device 102 can receive video data from an external video source (e.g., an external camera). Similarly, the destination device 116 can interface with an external display device instead of including an integrated display device.
[0037] Figure 1The system 100 shown is only an example. In general, any digital video encoding and / or decoding device can perform the coefficient coding and decoding technology described herein. The source device 102 and the destination device 116 are only examples of such coding and decoding devices, wherein the source device 102 generates coded and decoded video data for transmission to the destination device 116. The present disclosure refers to a "coding and decoding" device as a device that performs data coding and decoding (coding and / or decoding). Therefore, the video encoder 200 and the video decoder 300 represent examples of coding and decoding devices, specifically, video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the destination device 116 includes a video coding and decoding component. Therefore, the system 100 can support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting or video telephony.
[0038] Typically, the video source 104 represents the source of video data (i.e., the original, unencoded video data) and provides a continuous series of pictures (also referred to as "frames") of the video data to the video encoder 200, which encodes the data of the images. 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 original video, and / or a video feed interface that receives 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 images from the receiving order (sometimes referred to as the "display order") into the encoding order for encoding and decoding. The video encoder 200 may generate a bitstream including the encoded video data. The source device 102 may then output the encoded video data to the computer-readable medium 110 via the output interface 108 for reception or retrieval by, for example, the input interface 122 of the destination device 116.
[0039] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 106, 120 can store raw video data, for example, raw video from the video source 104 and raw, decoded video data from the video decoder 300. Additionally or alternatively, the memory 106 and the memory 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although in this example, the memory 106 and the memory 120 are shown as separate from the video encoder 200 and the video decoder 300, 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 memories 106, 120 can store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 can be allocated as one or more video buffers, for example, to store raw, decoded and / or encoded video data.
[0040] 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 destination device 116. In one example, the computer-readable medium 110 represents a communication medium to enable the source device 102 to send the encoded video data directly to the destination device 116 in real time (e.g., via a radio frequency network or a computer-based network). The output interface 108 may modulate a 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 or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form 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 device that facilitates communication from the source device 102 to the destination device 116.
[0041] In some examples, computer-readable medium 110 may include storage device 112. Source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination 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, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0042] In some examples, computer-readable medium 110 may include file server 114 or another intermediate storage device that may store the encoded video data generated by source device 102. Source device 102 may output the encoded video data to file server 114 or another intermediate storage device that may store the encoded video generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or downloading. File server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to destination device 116. File server 114 may represent a network server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. Destination device 116 may access the encoded video data from file server 114 via any standard data connection including an Internet connection, etc. This may include a wireless channel (e.g., a Wi-Fi connection or a different connection according to a wireless communication standard), 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 file server 114. The file server 114 and the input interface 122 may be configured to operate according to a streaming transfer protocol, a download transfer protocol, or a combination thereof.
[0043] Output interface 108 and input interface 122 may represent wireless transmitters, receivers, transceivers, modems, wired network 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, such as encoded video data, according to a cellular communication standard (e.g., 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 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, such as encoded video data, according to other wireless standards (e.g., IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ), Bluetooth TM In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include an SoC device to perform functions belonging to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device to perform functions belonging to video decoder 300 and / or input interface 122.
[0044] The techniques disclosed herein can be applied to video encoding and decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as HTTP Dynamic Adaptive Streaming (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0045] The input interface 122 of the destination device 116 receives an 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 (e.g., syntax elements with values describing characteristics and / or processing of video blocks or other codec units (e.g., slices, pictures, groups of pictures, sequences, etc.) and used by the video decoder 300. The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may 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 display (OLED), or another type of display device.
[0046] although Figure 1 Not shown, 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 a multiplexed stream including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
[0047] 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 these techniques are partially implemented in software, the device can store the instructions of the software in a suitable non-temporary computer-readable medium, and use one or more processors to execute the instructions in hardware to perform the techniques 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 a corresponding device. A 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.
[0048] The video encoder 200 and the video decoder 300 may operate according to a video codec standard (e.g., ITU-T H.265, also known as High Efficiency Video Codec (HEVC), or extensions thereof, such as multi-view and / or scalable video codec extensions). Alternatively or additionally, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards (e.g., the Joint Exploration Test Model (JEM) or the Versatile Video Codec (VVC)). An early draft of VVC is shown in document JVET-L1001 “Versatile Video Codec (Draft 3)”, and its algorithm description is shown in document JVET-L1002 “Algorithm Description of Versatile Video Codec and Test Model 3 (VTM 3)”. Another recent draft of the VVC standard is Bross et al., "Versatile Video Codec (Draft 8)", Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 17th Meeting: Brussels, Belgium, January 7-17, 2020, JVET-Q2001-vA (hereinafter referred to as "VVC Draft 8"). However, the technology of the present disclosure is not limited to any particular codec standard.
[0049] Typically, the video encoder 200 and the video decoder 300 can perform block-based image encoding and decoding. The term "block" generally refers to a structure that includes data to be processed (e.g., to be encoded, to be decoded, or otherwise used for encoding and / or decoding processes). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can encode and decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can encode and decode luminance and chrominance components instead of encoding and decoding red, green, and blue (RGB) data of samples of a picture, where the chrominance components may include red hue and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB format data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) can perform these conversions.
[0050] The present disclosure may generally refer to the encoding and decoding of a picture (e.g., encoding and decoding) to include the process of encoding or decoding the data of a picture. Similarly, the present disclosure may refer to the encoding and decoding of a block of a picture to include the process of encoding or decoding the data of the block (e.g., prediction and / or residual encoding and decoding). The encoded video bitstream generally includes a series of values of syntax elements that represent codec decisions (e.g., codec mode) and the partitioning of the picture into blocks. Therefore, references to encoding and decoding a picture or block should generally be understood as encoding and decoding the values of the syntax elements that form the picture or block.
[0051] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video encoder (e.g., video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes 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 codec may further partition the PU and TU. For example, in HEVC, the residual quadtree (RQT) represents the partitioning 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.
[0052] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video encoder (e.g., video encoder 200) partitions a picture into multiple codec tree units (CTUs). The video encoder 200 may partition 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 (e.g., the separation between CU, PU, and TU of HEVC). The QTBT structure includes two levels: a first level for partitioning according to quadtree partitioning, and a second level for partitioning 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 codec units (CUs).
[0053] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) (also known as ternary tree (TT)) partitioning. Trinary or ternary tree partitioning is a partitioning in which a block is divided into three sub-blocks. In some examples, the ternary or ternary tree partitioning divides the 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.
[0054] 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 and 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 corresponding chroma components).
[0055] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures in accordance with HEVC. For purposes of explanation, the description of the disclosed technology is presented with respect to QTBT segmentation. However, it should be understood that the disclosed technology may also be applied to a video codec configured to use quadtree segmentation or other types of segmentation.
[0056] Blocks (e.g., CTUs or CUs) may be grouped in various ways in a picture. As an example, a brick may refer to a rectangular area of a CTU row 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 rectangular area of a CTU having a height equal to the picture height and a width specified by a syntax element (e.g., in a picture parameter set). A tile row refers to a rectangular area of a CTU having a height specified by a syntax element (e.g., in a picture parameter set) and a width equal to the width of the picture.
[0057] In some examples, a tile may be partitioned into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a proper subset of a tile cannot be referred to as a tile.
[0058] Tiles in a picture can also be arranged in slices. A slice can be an integer number of tiles of 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 a continuous sequence of complete tiles of only one tile.
[0059] The present disclosure may use "N×N" 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, 16×16 samples or 16 by 16 samples. Typically, a 16×16 CU has 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N 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. In addition, a CU does not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.
[0060] The video encoder 200 encodes the video data of the CU representing the prediction and / or residual information and other information. The prediction information indicates how to predict the CU in order to form the prediction block of the CU. The residual information generally indicates the sample-by-sample difference between the CU sample before encoding and the prediction block.
[0061] In order to predict a CU, the video encoder 200 can generally form a prediction block (also referred to as a predictive block) of the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU from data of a previously coded picture, while intra-frame prediction generally refers to predicting a CU from previously coded 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, based on the difference between the CU and the reference block. The video encoder 200 can use the sum of absolute differences (SAD), the sum of square differences (SSD), the mean absolute difference (MAD), the mean square difference (MSD), or other such difference calculations to calculate a difference 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.
[0062] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion (e.g., zooming in or out, rotation, perspective motion, or other irregular motion types).
[0063] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as a planar mode and a DC mode. Typically, the video encoder 200 selects an intra prediction mode that describes a neighboring sample of a current block (e.g., a block of a CU), and predicts the sample of the current block from the neighboring sample. Assuming that the video encoder 200 encodes and decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples may typically be above, to the upper left, or to the left of the current block in the same picture as the current block.
[0064] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for the inter-frame prediction mode, the video encoder 200 may encode data representing which of the various available inter-frame prediction modes is used and the motion information of the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode the motion vector using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode the motion vector of the affine motion compensation mode.
[0065] 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. Residual data such as a residual block represents the sample-by-sample difference between the block and a predicted block (i.e., a predictive block) formed using a corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to produce 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 primary 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 applying one or more transforms.
[0066] Although the examples of performing transformations are described above, in some examples, transformations may be skipped. For example, the video encoder 200 may implement a transformation skip mode in which the transformation operation is skipped. In the example of skipping transformations, the video encoder 200 may output coefficients corresponding to residual values instead of transformation coefficients. In the following description, the term "coefficient" should be interpreted as including coefficients corresponding to residual values or transformation coefficients generated from transformation results.
[0067] As described above, after any transform or in the case where a transform is skipped to generate coefficients, the video encoder 200 can perform quantization of the coefficients. In some examples, when a transform is skipped, quantization can also be skipped. Quantization generally refers to the process of quantizing coefficients to reduce as much as possible the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all 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 bit-by-bit right shift on the value to be quantized.
[0068] After quantization, the video encoder 200 may scan the coefficients (e.g., generated from the transform result or due to a transform skip) to generate a one-dimensional vector from a two-dimensional matrix including the quantized coefficients. The scan may be designed to place coefficients with higher energy (and therefore lower frequency) in front of the vector and coefficients with lower energy (and therefore higher frequency) in the back of the vector. In the example of skipping the transform, the result of the scan may not be that the coefficients with higher energy are in front of the vector and the coefficients with lower energy are in the back of the vector. In some examples, the video encoder 200 may scan the quantized coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized coefficients of the vector. In other examples, the video encoder 200 may perform adaptive scanning. After scanning the quantized coefficients to form a one-dimensional vector, the video encoder 200 may entropy encode the one-dimensional vector, for example, according to context adaptive binary arithmetic coding and decoding (CABAC). The video encoder 200 may also entropy encode the values of the syntax elements describing the metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.
[0069] As described above, the video encoder 200 encodes the residual data in the TU. Depending on the expected characteristics of the residual data in the TU, the video encoder 200 can encode the TU in different modes (e.g., transform mode or transform skip mode), and different modes use different coefficient coding schemes. Some coefficient coding schemes use coefficient groups to encode TUs. A coefficient group is typically a subset of the coefficients in a TU. For example, the video encoder 200 can encode a 16×16 TU into four 4×4 coefficient groups.
[0070] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. For example, the context may relate to whether the neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0071] The video encoder 200 may also generate syntax data (in a picture header, a block header, a slice header), such as block-based syntax data, picture-based syntax data, and sequence-based syntax data or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS) to the video decoder 300. The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0072] In this way, the video encoder 200 can generate a bitstream that includes the encoded video data, such as syntax elements describing the partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information of the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0073] In general, the video decoder 300 performs a process that is the reverse of the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC to decode the values of the syntax elements of the bitstream in a manner substantially similar to but reverse to the CABAC encoding process of the video encoder 200. The syntax elements can define partitioning information for partitioning a picture into CTUs and partitioning each CTU according to a corresponding partitioning structure (e.g., a QTBT structure) to define CUs of the CTU. The syntax elements can also define prediction and residual information for a block (e.g., a CU) of video data.
[0074] The residual information may be represented by, for example, a coefficient representing a quantization of a residual value or a transform coefficient. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce the residual block of the block. In an example where the video encoder 200 skips a transform operation (e.g., a transform skip mode), the video decoder 300 may skip an inverse transform operation. The video decoder 300 uses the signaled prediction mode (intra-frame or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block (i.e., a predictive block) of 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 block boundaries.
[0075] 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 of syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal the values of syntax elements in a bitstream. Generally, signaling refers to generating values in a bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 in substantially real time, or (such as may occur when the syntax elements are stored to the storage device 112 for later retrieval by the destination device 116) transmit the bitstream to the destination device 116 in non-real time.
[0076] As described above, the video encoder 200 can signal the coefficients that can be quantized. These coefficients can be the result of a transform operation or the result of skipping a transform. In some examples, two adjacent coefficients may have the same value. Therefore, the coding efficiency can be achieved by the video encoder 200 indicating to the video decoder 300 to copy the coefficient values of the adjacent blocks, rather than signaling the coefficient values of the two adjacent coefficients. Specifically, this technology can improve the coding efficiency of residual blocks with certain characteristics (e.g., many coefficients with similar values but not equal to zero).
[0077] In addition, even if the coefficient value is different from the coefficient value of the adjacent coefficient, there may be a possibility of improvement in coding efficiency. For example, the video encoder 200 and the video decoder 300 can each maintain a list of coefficient values. In some examples, the video encoder 200 can signal an index into the coefficient value list instead of signaling the actual coefficient value. The video decoder 300 can determine the coefficient value based on the index into the coefficient value list. The video encoder 200 and the video decoder 300 can be configured to add the values of the copied adjacent blocks to the list so that the list includes coefficient values with a high probability corresponding to the coefficient value being encoded and decoded.
[0078] In some examples, the coefficient value list may be fixed, but in other examples, the coefficient value list may be modified or adaptive. For example, a particular coefficient value of a coefficient may not be present in the coefficient value list. In such an example, the video encoder 200 may signal an index corresponding to an "escape code". In response to receiving such an "escape code", the video decoder 300 may determine that the coefficient value of the coefficient is not available in the coefficient value list. The video decoder 300 may then receive the coefficient value of the coefficient, and in some examples, update the coefficient value list to include the newly received coefficient value. As part of updating the list, the video decoder 300 may add the coefficient value of the coefficient to a position in the list with an associated index.
[0079] There may be various ways in which the video encoder 200 may indicate to the video decoder 300 whether to utilize the coefficient values of the neighboring coefficients or to utilize the coefficient values from the coefficient value list. As an example, the video encoder 200 may signal a flag having a first value and a second value for the coefficient. If the flag has the first value, the video decoder 300 may determine that the coefficient values of the neighboring coefficients will be used, and if the flag has the second value, the video decoder 300 may determine that the coefficient values from the coefficient value list will be used.
[0080] Figure 2A and Figure 2B 1 is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure 130 and a corresponding CTU 132. Solid lines represent quadtree partitions and dashed lines indicate binary tree partitions. At each partition (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where 0 indicates horizontal partition and 1 indicates vertical partition in this example. For quadtree partitions, there is no need to indicate the partition type because the quadtree node divides the block horizontally and vertically into 4 sub-blocks of equal size. Therefore, the video encoder 200 can encode syntax elements (e.g., partition information) for the region tree level (e.g., first level) (i.e., solid line) of the QTBT structure 130 and syntax elements (e.g., partition information) for the prediction tree level (i.e., second level) (i.e., dashed line) of the QTBT structure 130, and the video decoder 300 can decode it. The video encoder 200 may encode data (eg, prediction and transform data) of a CU represented by a terminal leaf node of the QTBT structure 130 , and the video decoder 300 may decode it.
[0081] generally, Figure 2B The CTU 132 may be associated with parameters defining the size of blocks corresponding to nodes of the QTBT structure 130 at the first level and the second level. These parameters may include a CTU size (indicating the size of the CTU 132 in a sample), a minimum quadtree size (MinQTSize, indicating the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, indicating the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, indicating the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, indicating the minimum allowed binary tree leaf node size).
[0082] The root node of the QTBT structure corresponding to the CTU may have four child nodes at the first level of the QTBT structure, and each child node may be segmented according to the quadtree segmentation. That is, the nodes at the first level are either leaf nodes (without child nodes) or have four child nodes. The example of the QTBT structure 130 represents such nodes as including a parent node and a child node with a solid line for branching. If the nodes at the first level are not larger than the maximum allowed binary tree root node size (MaxBTSize), the nodes may be further segmented by the corresponding binary tree. The binary tree segmentation of a node may be iterated until the node generated by the partition reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such nodes as having a dotted line for branching. The binary tree leaf node is called a codec unit (CU), which is used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further segmentation. As described above, a CU may also be referred to as a "video block" or "block".
[0083] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance sample and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate a quadtree leaf node. The quadtree leaf node can have a size from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the quadtree leaf node is 128×128, the quadtree leaf node will not be further divided by the binary tree because its size exceeds MaxBTSize (i.e., 64×64 in this example). Otherwise, the quadtree leaf node will be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this case), no further splitting is allowed. A binary tree node with a width equal to MinBTSize (4 in this case) means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for the binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further segmentation.
[0084] The coefficient coding scheme of VTM 3.0 is optimized for coding scenarios where coefficients are obtained from a transform of a residual block. Transforms typically result in a large number of coefficients that are equal to zero or sometimes equal to one. However, JVET-M0464 (“Non-CE8: Unified Transform Type Signaling and Residual Coding and Decoding for Transform Skipping”, Bross et al., January 2019) shows that for coding scenarios where residual samples are encoded and decoded without applying a transform, such as when residual samples are encoded and decoded in transform skip mode, better coding and decoding gains can be achieved by using different coefficient coding techniques. Skipping the transform process typically results in fewer coefficients that are equal to zero and / or one. The present disclosure describes additional or alternative coefficient coding techniques that may be better suited for coding and decoding groups of coefficients having relatively few coefficients that are equal to zero or one, such as coefficients obtained from residual samples without applying a transform.
[0085] According to the techniques of this disclosure, as part of encoding and decoding a residual block, video encoder 200 and video decoder 300 may be configured to predict coefficients of the residual block.
[0086] Figure 3A The coefficients copied from the left neighbor are shown. Figure 3A , coefficient group 140 is a 4×4 coefficient group. As will be described in more detail below, video encoder 200 and video decoder 300 may determine that the value of coefficient 142 is equal to the value of left neighboring coefficient 144. Shaded squares represent coefficients that have already been encoded and decoded.
[0087] Figure 3B The coefficients copied from the top neighbor are shown. Figure 3B , coefficient group 150 is a 4×4 coefficient group. As will be described in more detail below, video encoder 200 and video decoder 300 may determine that the value of coefficient 152 is equal to the value of top neighboring coefficient 154. Shaded squares represent coefficients that have already been encoded and decoded.
[0088] Figure 4A Coefficients are copied from the top or left neighbor of the raster scan coefficient group. Figure 4A , coefficient group 160 is a 4×4 coefficient group. As will be described in more detail below, video encoder 200 and video decoder 300 may determine that the value of coefficient 162 is equal to the value of left neighboring coefficient 164 or top neighboring coefficient 166. Shaded squares represent coefficients that have been encoded and decoded. Arrows 168A-168C represent scan directions.
[0089] Figure 4B Coefficients are copied from the bottom or right neighbor of a diagonally scanned coefficient group. Figure 4B, coefficient group 170 is a 4×4 coefficient group. As will be described in more detail below, video encoder 200 and video decoder 300 may determine that the value of coefficient 172 is equal to the value of right adjacent coefficient 174 or bottom adjacent coefficient 176. Shaded squares represent coefficients that have been encoded and decoded. Arrows 178A and 178B represent scan directions.
[0090] Figure 5 The coefficients that can be predicted from neighbors and / or coefficient lists are shown. Figure 5 , coefficient group 180 is a 4×4 coefficient group. As will be described in more detail below, video encoder 200 and video decoder 300 may determine that the value of coefficient 182 is equal to the value of left-neighboring coefficient 184. Video encoder 200 and video decoder 300 may also determine the value of coefficient 182 from list 186, which is a list of coefficient values. The shaded squares in coefficient group 180 represent coefficients that have already been encoded and decoded, and the shaded squares in list 186 represent the values of list 186 that have already been determined.
[0091] This disclosure describes techniques for predictive coefficient coding. In this context, predictive coefficient coding refers to determining the value of a coefficient based on the value of an already coded coefficient. The suggested techniques described below may be applied individually or in any combination thereof.
[0092] The video decoder 300 may be configured to predict coefficients in a coefficient group or TU by copying one of the previously coded coefficients. Figure 3A and 3B As shown, if the coding order follows raster scanning, the video decoder 300 can copy the predictive value of the coefficient from the left or upper neighboring coefficient that has been previously coded. Depending on the coding order (e.g., scanning order), the copied coefficient can come from the top, left, right or bottom neighboring coefficient. Figure 4A and Figure 4B Two examples using raster scanning and diagonal scanning are shown respectively.
[0093] Scanning (e.g., the encoding and decoding order of coefficients) may depend on the intra / inter prediction mode. For example, for a TU using a horizontal prediction mode or a vertical prediction mode, a horizontal scanning order or a vertical scanning order may be used, respectively. The position of coefficients used for prediction (i.e., copying) may also depend on the intra / inter prediction mode. For example, if a horizontal (or vertical) intra prediction mode is used, coefficients in a TU may be copied from the left (or top) neighbor.
[0094] like Figure 5As shown, in a coefficient group or TU, in addition to predicting coefficients from adjacent coefficients, the video decoder 300 can be configured to predict coefficients from a predefined coefficient list. In this context, predefined means that for a specific coefficient, the video decoder 300 defines the list in a specific way based on information known (e.g., already determined) before decoding the specific coefficient. During the video encoding process, the video encoder 200 can be configured to define the same list in the same way. As will be explained in more detail below, the video encoder 200 and the video decoder 300 can be configured to generate a list using one or a combination of fixed entries and dynamically updated entries.
[0095] Since the video encoder 200 and the video decoder 300 are configured to generate the same list, the video encoder 200 can signal the video decoder 300 with the index value corresponding to the coefficient value for the prediction coefficient in the list. In some examples, the coefficient list can contain a set of fixed coefficient values that are not updated or removed from the list. For example, common values can be included in the list as fixed coefficient values. In some examples, the video decoder 300 can be configured to update the coefficient list on a per-coefficient basis if a unique coefficient is observed during encoding and decoding. In this context, a unique coefficient generally refers to a coefficient value that has not yet been included in the list. In this case, the video encoder 200 and the video decoder 300 can be configured to add the value of the unique coefficient to the list as an additional entry in the list or as a replacement value for the current entry in the list.
[0096] In some cases, the video encoder 200 may signal an index value corresponding to the escape code to the video decoder 300. For example, if the list has 7 entries, where the index ranges from 0 to 6, then an index of 7 may represent an escape code. The escape code indicates that the value of the coefficient is not included in the list. Therefore, in conjunction with the escape code, the video encoder 200 may signal additional syntax to the video decoder 300 that identifies the value of the coefficient. The video encoder 200 and the video decoder 300 may be configured to add the value indicated by the additional syntax to the list as an additional entry in the list or as a replacement value for a current entry in the list.
[0097] The video decoder 300 may be configured to sort the coefficient list depending on how often the coefficient values are copied. Thus, more frequently used coefficient values may be associated with lower indices, which may enable those indices to be signaled using fewer bits. For example, the video encoder 200 may encode a truncated unary code corresponding to the index, and the video decoder 300 may decode the truncated unary code. The video encoder 200 may signal a flag to the video decoder 300 to indicate whether the coefficient value is copied from the list or from an adjacent coefficient. A combination of adjacent coefficients and coefficients in the list may be used to derive context as well as prediction coefficients.
[0098] In some examples, one or a combination of the above techniques may be used only when a transform is skipped (e.g., the transform skip flag is enabled). In some examples, one or a combination of the above techniques may be used for a coefficient group or TU. In some examples, one or a combination of the above techniques may be used only for intra-predicted TUs. In some examples, one or a combination of the above techniques may be used only for inter-predicted TUs. In some examples, one or a combination of the above techniques may be used for intra- and inter-predicted TUs. In some examples, one or a combination of the above techniques may be used only for one of the luma or chroma channels (i.e., only for the luma blocks of the CU or only for the chroma blocks of the CU), while in other examples, one or a combination of the above techniques may be used for both the luma channel and the chroma channels (i.e., for both luma blocks and chroma blocks).
[0099] Figure 6 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 6 The present disclosure is provided for the purpose of explanation and should not be considered as limiting the techniques broadly illustrated and described in the present disclosure. For the purpose of explanation, the present disclosure describes the video encoder 200 in the context of video codec standards such as the HEVC video codec standard and the H.266 video codec standard under development. However, the techniques of the present disclosure are not limited to these video codec standards and are generally applicable to video encoding and decoding.
[0100] exist Figure 6 In the example, 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 encoding unit 220.
[0101] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data from, for example, video source 104 ( Figure 1 ) receives the video data stored in the video data memory 230. DPB 218 can act as a reference picture memory, which stores reference video data for use when the video encoder 200 predicts subsequent video data. Video data memory 230 and DPB 218 can be formed by any of a variety of memory devices, such as DRAM or other types of memory devices including SDRAM, MRAM, RRAM. Video data memory 230 and DPB 218 can be provided by the same memory device or a separate memory device. In various examples, as shown in the figure, video data memory 230 can be on the chip together with other components of the video encoder 200, or off the chip relative to these components.
[0102] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory internal to the video encoder 200, unless specifically described as such, or to memory external to the video encoder 200, unless specifically described as such. Instead, references to the video data memory 230 should be understood as references to memory storing video data received by the video encoder 200 for encoding (e.g., video data of a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage of outputs from the various units of the video encoder 200 .
[0103] Figure 6 Various units are shown 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 preset on operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions in operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0104] 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 object code for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0105] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve the picture of the 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 the original video data to be encoded.
[0106] 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. As an 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, etc.
[0107] The mode selection unit 202 generally coordinates multiple encoding processes to test combinations of encoding parameters and rate-distortion values of the results of such combinations. The encoding parameters may include the partitioning of CTUs into CUs, the prediction mode of the CUs, the transform type of the residual data of the CUs, the quantization parameter of the residual data of the CUs, 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.
[0108] The video encoder 200 may partition the picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure (e.g., the QTBT structure or quadtree structure of HEVC described above). As described above, the video encoder 200 may form one or more CUs from the partitioned CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0109] 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 superimposed portion of the PU and TU). For inter prediction of the current block, the motion estimation unit 222 can 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 coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate a value indicating how similar the 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), etc. The motion estimation unit 222 can generally perform these calculations using the sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 can identify the reference block having the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.
[0110] 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 the position of 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 vectors have fractional sample precision, the motion compensation unit 224 may interpolate the values of 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 the corresponding motion vectors and combine the retrieved data by, for example, sample-by-sample averaging or weighted averaging.
[0111] As another example, for intra prediction or intra prediction codec, the intra prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values of the adjacent samples and pad these calculated values in a defined direction across the current block to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average of the adjacent samples of the current block and generate a prediction block to include the resulting average for each sample of the prediction block.
[0112] 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.
[0113] In the example where the mode selection unit 202 partitions 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 codec 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 2N×2N, the video encoder 200 may support PU sizes of 2N×2N or N×N for intra-frame prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N or the like for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.
[0114] In an example where the mode selection unit 202 does not further partition the CU into PUs, each CU may be associated with a luma codec block and a corresponding chroma codec block. As described above, the size of a CU may refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2N×2N, 2N×N, or N×2N.
[0115] For other video codec techniques, such as intra block copy mode codec, affine mode codec, and linear model (LM) mode codec, as a few examples, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the codec technique. In some examples, such as palette mode codec, the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how to reconstruct the block based on the selected palette. In this mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0116] As described above, the residual generation unit 204 receives video data of a current block and a corresponding prediction block. The residual generation unit 204 then 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.
[0117] 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 Karl-Lof transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 can perform multiple transforms on the residual block, such as a primary transform and a secondary transform, such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block. In this case, the transform processing unit 206 can output a block of coefficients, where the coefficients correspond to residual values rather than transform coefficients.
[0118] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. For blocks encoded in transform skip mode, the quantization unit 208 may quantize the coefficients in the coefficient block to produce a quantized coefficient block. The quantization unit 208 may quantize the coefficients or transform coefficients 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 by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the quantized coefficients or transform coefficients may have lower precision than the original coefficients or transform coefficients generated by the transform processing unit 206.
[0119] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized coefficient block, respectively, to reconstruct a residual block from the 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 of the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0120] 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 blocking artifacts along the edge of the CU. In some examples, the operation of filter unit 216 may be skipped.
[0121] The video encoder 200 stores the reconstructed block 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 block to 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 block to 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) block to perform inter-frame prediction on the block of the subsequently encoded picture. In addition, the intra-frame prediction unit 226 can use the reconstructed block in the DPB 218 of the current picture to intra-frame predict other blocks in the current picture.
[0122] 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 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 prediction or intra mode information for intra prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on the syntax elements as another example of video data to generate entropy-coded 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 coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode, where syntax elements are not entropy encoded.
[0123] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required to reconstruct a block of a slice or a picture. Specifically, the entropy encoding unit 220 may output a bitstream.
[0124] The operations described above are described with respect to blocks. Such descriptions should be understood as operations of a luma codec block and / or a chroma codec block. As described above, in some examples, the luma codec block and the chroma codec block are the luma and chroma components of a CU. In some examples, the luma codec block and the chroma codec block are the luma and chroma components of a PU.
[0125] In some examples, operations performed on the luma codec block do not need to be repeated for the chroma codec block. As an example, operations to identify the motion vector (MV) and reference picture of the luma codec block do not need to be repeated for identifying the MV and reference picture of the chroma block. Instead, the MV of the luma codec block can be scaled to determine the MV of the chroma block, and the reference picture can be the same. As another example, the intra prediction process can be the same for the luma codec block and the chroma codec block.
[0126] Figure 7 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 7 It is provided for the purpose of explanation and does not limit the techniques broadly illustrated and described in this disclosure. Figure 7 In the example of , the video decoder 300 includes a coded 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. 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 to perform predictions according to other prediction modes. As an 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.
[0127] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. For example, the video data stored in the CPB memory 320 may be, for example, from the computer-readable medium 110 ( Figure 1). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. In addition, the CPB memory 320 may store video data other than syntax elements of encoded and decoded pictures, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, which may be output and / or used as reference video data when the video decoder 300 decodes 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 dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM)) or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or a separate memory device. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to these components.
[0128] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) retrieves the encoded and decoded video data. That is, the memory 120 may utilize the CPB memory 320 to store data as described above. Similarly, when some or all of the functions of the video decoder 300 are implemented in software to be executed by the processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.
[0129] Figure 7 The various units shown are shown to aid in understanding the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 6 , fixed-function circuits refer to circuits that provide specific functions and are preset 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 so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0130] 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.
[0131] 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.
[0132] Typically, the video decoder 300 reconstructs an image on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0133] The entropy decoding unit 302 may entropy decode syntax elements defining quantized coefficients of the quantized coefficient block, and transform information, such as a quantization parameter (QP) and / or (multiple) transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized coefficient block to determine a degree of quantization, and similarly, determine a degree of inverse quantization to be applied by the inverse quantization unit 306. For example, the inverse quantization unit 306 may perform a bitwise left shift operation to inverse quantize the transform coefficients. The inverse quantization unit 306 may thereby form a coefficient block including the coefficients.
[0134] After the inverse quantization unit 306 forms the coefficient block for the transformed 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 Karl-Lof transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block. For blocks encoded and decoded in transform skip mode, the inverse transform processing unit 308 may not perform an inverse transform and, in these encoding and decoding scenarios, may be viewed as a pass-through unit for blocks that do not process or change coefficients.
[0135] In addition, prediction processing unit 304 generates a prediction block (i.e., a predictive 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 the 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 position of the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in a manner substantially similar to that described with respect to motion compensation unit 224 ( Figure 6 ) describes the method to perform the inter-frame prediction process.
[0136] 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. Likewise, the intra-prediction unit 318 can generally generate a prediction block in a manner substantially similar to that described with respect to the intra-prediction unit 226 ( Figure 6 The intra prediction process is performed in the manner described in ). The intra prediction unit 318 can retrieve the data of the neighboring samples of the current block from the DPB 314.
[0137] 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.
[0138] 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 need not be performed in all examples.
[0139] The video decoder 300 may store the reconstructed block 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 block to 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 block to 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 image for intra-frame prediction and previously decoded pictures for subsequent motion compensation. In addition, the video decoder 300 may output a decoded image from the DPB for subsequent display on a display device (e.g., Figure 1 The display device 118) is presented.
[0140] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in a circuit, the one or more processing units configured to determine a predictive block for a current block of the video data; determine a residual block for the current block; and add the predictive block to the residual block to determine a reconstructed block for the current block. To determine the residual block for the current block, the one or more processing units of the video decoder 300 are further configured to: for a first coefficient of a coefficient group, receive a first instance of a flag, wherein the first instance of the flag is set to a first value; in response to the first instance of the flag being set to the first value, copy the coefficient value of an adjacent coefficient of the first coefficient; for a second coefficient of the coefficient group, receive a second instance of the flag, wherein the second instance of the flag is set to a second value; in response to the second instance of the flag being set to the second value, receive an index; determine a value corresponding to the index from a list of coefficient values; and set the value of the second coefficient to the value corresponding to the index.
[0141] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in a circuit, the one or more processing units configured to determine a predictive block for a current block of video data; determine a residual block for the current block of video data by determining a predicted value of a coefficient of the residual block; and add the predictive block to the residual block to determine a reconstructed block of the current block. For example, the one or more processing units may determine the residual block in response to determining that the current block is encoded using a transform skip mode.
[0142] In order to determine the residual block of the current block, one or more processing units are configured to determine the difference of the coefficients of the residual block, and add the difference of the coefficients of the residual block to the predicted values of the coefficients of the residual block to determine the actual values of the coefficients of the residual block. In order to determine the predicted values of the coefficients of the residual block, one or more processing units can copy the values of adjacent coefficients. In order to determine the predicted values of the coefficients of the residual block, one or more processing units can determine values from a predefined list. In order to determine the predicted values of the coefficients of the residual block, one or more processing units can determine values from a maintained list updated based on the values of the previously decoded coefficients. One or more processing units can also perform one or more filtering operations on the reconstructed block.
[0143] Figure 8 2 is a flowchart illustrating an example process for encoding a current block. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and Figure 6 It should be understood that other devices may be configured to perform similar Figure 8 process.
[0144] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between the original, unencoded block and the prediction block for the current block. The video encoder 200 may then transform (or skip transforming) and quantize the coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the coefficients (358). For example, the video encoder 200 may encode the coefficients using CAVLC or CABAC. The video encoder 200 may then output the entropy encoded data of the block (360).
[0145] Fig. 9 is a flowchart illustrating an example process for decoding a current block of video data. The current block may include a current CU. Although with respect to the video decoder 300 ( Figure 1 and Figure 7 ), it should be understood that other devices may be configured to perform similar Fig. 9 process.
[0146] The video decoder 300 may receive entropy-encoded data of the current block, such as entropy-encoded prediction information and entropy-encoded data corresponding to coefficients of a residual block of the current block (370). The video decoder 300 may entropy decode the entropy-encoded data to determine prediction information of the current block and reproduce coefficients of the residual block (372). The video decoder 300 may predict the current block (374), such as calculating a prediction block of the current block using an intra-frame or inter-frame prediction mode indicated by the prediction information of the current block. The video decoder 300 may then inverse scan the reproduced coefficients (376) to create a quantized transform coefficient block. The video decoder 300 may then inverse quantize and inverse transform (or skip inverse transform) the coefficients to generate a residual block (378). The video decoder 300 may finally decode the current block (380) by combining the prediction block and the residual block.
[0147] Fig.10 3 is a flowchart illustrating an example process for decoding video data. Although described with respect to video decoder 300 ( Figure 1 and Figure 7 ), it should be understood that other devices may be configured to perform similar Fig.10 The video decoder 300 determines a predictive block for a current block of video data (402).
[0148] Video decoder 300 determines a residual block for the current block (404). For example, the residual block may be a coefficient group or a transform unit including multiple coefficient groups. In some examples, for a block encoded in a transform skip mode, video decoder 300 may determine the residual block in the manner described for step 404.
[0149] As part of determining a residual block for the current block, for a first coefficient of the coefficient group, the video decoder 300 receives a first instance of a flag set to a first value (406). In response to the first instance of the flag being set to the first value, the video decoder 300 copies coefficient values of neighboring coefficients of the first coefficient (408). In this regard, the video decoder 300 "copies" the coefficient values of the neighboring coefficients by setting the value of the first coefficient equal to the coefficient values of the neighboring coefficients.
[0150] For a second coefficient of the coefficient group, video decoder 300 receives a second instance of the flag set to a second value (410). In response to the second instance of the flag being set to the second value, video decoder 300 receives an index (412). The index may be referred to as a first index to distinguish it from subsequently received indexes. Video decoder 300 determines a value corresponding to the index from the list of coefficient values (414). Video decoder 300 sets the value of the second coefficient to the value corresponding to the index (416).
[0151] After determining the residual block, or partially in parallel with determining the residual block, the video decoder 300 adds the predictive block to the residual block to determine a reconstructed block for the current block (418). For example, the video decoder 300 can output the reconstructed block as part of the decoded video. The video decoder 300 can output the video by displaying a picture with the reconstructed block, storing the picture with the reconstructed block for later display, and / or storing the picture with the reconstructed block for use in a later decoding operation. In some examples, the video decoder 300 can also perform one or more filtering operations on the reconstructed block and output a filtered version of the reconstructed block.
[0152] In order to determine the residual block of the current block, for a third coefficient of the coefficient group, the video decoder 300 may also receive a third instance of the flag, wherein the third instance of the flag is set to a second value; in response to the third instance of the flag being set to the second value, receive a second index in the coefficient value list; based on the received second index, determine that the value of the third coefficient is a value not included in the coefficient value list; update the coefficient value list to include the value of the third coefficient; for a fourth coefficient of the coefficient group, receive a fourth instance of the flag, wherein the fourth instance of the flag is set to the second value; in response to the fourth instance of the flag being set to the second value, receive an index corresponding to the value of the third coefficient in the coefficient value list; and set the value of the fourth coefficient to the value of the third coefficient.
[0153] Fig.11 1 is a flowchart illustrating an example process for determining a residual block of video data. For example, a residual block of video data may be a coefficient group or a transform unit including a plurality of coefficient groups. Figure 1 and Figure 7 ), it should be understood that other devices may be configured to perform similar Fig.11 process.
[0154] For the coefficients of the residual block, the video decoder 300 receives a flag (420). If the flag is set to a first value (422, yes), the video decoder 300 sets the value of the coefficient equal to the value of the adjacent coefficient (424). If the flag is set to a second value (422, no), the video decoder 300 receives an index in the coefficient value list (426). If the index is not an escape code (428, no), the video decoder 300 determines the value corresponding to the index from the coefficient value list (430). The video decoder 300 sets the value of the coefficient to the value corresponding to the index. If the index is an escape code (428, yes), the video decoder 300 receives the coefficient value (432). The video decoder 300 sets the value of the coefficient to the received coefficient value. The video decoder 300 also updates the coefficient value list to include the received coefficient value (434). In the case where the value of the adjacent coefficient is copied (424) and the value of the adjacent coefficient is not in the coefficient value list (436, no), the video decoder 300 may also update the coefficient value list to include the value of the adjacent coefficient (434).
[0155] It should be appreciated that, depending on the examples, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for the practice of the techniques). In addition, in some examples, actions or events may be performed simultaneously, e.g., by multithreading, interrupt handling, or multiple processors, rather than being performed sequentially.
[0156] 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 on or transmitted through a computer-readable medium as one or more instructions or codes and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media corresponding to tangible media such as data storage media, or communication media including any media that facilitates (e.g., according to a communication protocol) transferring a computer program from one place to another. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures to implement the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0157] As an 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 in the form of instructions or data structures and can be accessed by a computer. In addition, any connection is properly referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit instructions from a website, server or other remote source, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) is included in the definition of the 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 directed to non-temporary tangible storage media. The disk and optical disk used herein include compact discs (CDs), laser optical discs, optical optical discs, digital versatile discs (DVDs), floppy disks and blue-ray discs, wherein the disks usually reproduce data magnetically, and the optical discs reproduce data optically with lasers. The above combination should also be included in the scope of computer-readable media.
[0158] Instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. In addition, these techniques may be fully implemented in one or more circuits or logic elements.
[0159] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or sets 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 do not necessarily need to be implemented by different hardware units. Instead, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units including one or more processors as described above in combination with appropriate software and / or firmware.
[0160] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for decoding video data, the method comprising: determining a predictive block for a current block of the video data; determining a residual block for the current block, wherein determining the residual block for the current block comprises determining a coefficient group for the current block, the coefficient group comprising a plurality of coefficients, and wherein determining the coefficient group comprises: receiving a flag of the video data, the flag indicating whether one or more coefficients of the coefficients of the coefficient group are copied from a coefficient list or from a neighboring coefficient; In response to the flag being set to a first value, copying coefficient values of adjacent coefficients of a first one of the coefficients; In response to the flag being set to a second value, determining a coefficient value for the first coefficient from the coefficient value list; and The predictive block is added to the residual block to determine a reconstructed block of the current block.
2. The method according to claim 1, wherein: The coefficient value list includes a set of fixed coefficient values.
3. The method according to claim 1, wherein: Determining the residual block is in response to determining that the current block is encoded using a transform skip mode.
4. The method according to claim 1, wherein: Determining the residual block of the current block also includes: In response to being set to the second value, an index into the list of coefficient values is received.
5. The method according to claim 4, wherein: Receiving the index includes: receiving a truncated unary code; and The index is determined from the truncated unary code.
6. The method according to claim 1, further comprising: One or more filtering operations are performed on the reconstructed block.
7. The method according to claim 1, wherein: The residual block includes a transform unit.
8. A device for decoding video data, the device comprising: a memory configured to store video data; as well as One or more processors implemented in circuitry configured to: determining a predictive block for a current block of the video data; determining a residual block for the current block, wherein to determine the residual block for the current block, the one or more processors are further configured to determine a coefficient group for the current block, the coefficient group comprising a plurality of coefficients, and wherein to determine the coefficient group, the one or more processors are further configured to: receiving a flag of the video data, the flag indicating whether one or more coefficients of the coefficients of the coefficient group are copied from a coefficient list or from a neighboring coefficient; In response to the flag being set to a first value, copying coefficient values of adjacent coefficients of a first one of the coefficients; as well as in response to the flag being set to a second value, determining a coefficient value for the first coefficient from the coefficient value list; as well as The predictive block is added to the residual block to determine a reconstructed block of the current block.
9. The device according to claim 8, wherein: The coefficient value list includes a set of fixed coefficient values.
10. The device according to claim 8, wherein: The one or more processors are further configured to determine the residual block in response to determining that the current block is encoded using a transform skip mode.
11. The device according to claim 8, wherein: The one or more processors are further configured to: In response to a second instance of the flag being set to the second value, an index into the list of coefficient values is received.
12. The apparatus of claim 11, wherein to receive the index, the one or more processors are further configured to: receiving a truncated unary code; and The index is determined from the truncated unary code.
13. The apparatus according to claim 8, wherein: The one or more processors are further configured to: One or more filtering operations are performed on the reconstructed block.
14. The apparatus according to claim 8, wherein: The residual block includes a transform unit.
15. The apparatus according to claim 8, wherein: The apparatus comprises a wireless communication device further comprising a receiver configured to receive encoded video data.
16. The device of claim 15, wherein the wireless communication device comprises a telephone handset, and wherein the receiver is configured to demodulate a signal comprising the encoded video data in accordance with a wireless communication standard.
17. The apparatus according to claim 8, further comprising: A display is configured to display the decoded video data.
18. The apparatus according to claim 8, further comprising: One or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
19. A device for decoding video data, the device comprising: a memory configured to store video data; as well as One or more processors implemented in circuitry configured to: determining a predictive block for a current block of the video data; determining a residual block of the current block, wherein to determine the residual block of the current block, the one or more processors are further configured to determine a coefficient group including a first coefficient, a second coefficient, and a neighboring coefficient of the first coefficient, and wherein to determine the coefficient group the one or more processors are further configured to: For the first coefficient of the coefficient group, a first instance of a flag is received, wherein A first instance of the flag is set to a first value; responsive to a first instance of the flag being set to the first value, copying coefficient values of the neighboring coefficients of the first coefficient; receiving, for said second coefficient of said coefficient group, a second instance of said flag, wherein a second instance of the flag is set to a second value; receiving an index into a list of coefficient values in response to a second instance of the flag being set to the second value; determining a value corresponding to the index from the list of coefficient values; as well as Setting the value of the second coefficient to the value corresponding to the index; as well as The predictive block is added to the residual block to determine a reconstructed block of the current block.