TECHNICAL FIELD

This disclosure relates to video encoding and video decoding.

BACKGROUND

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 gaming devices, video game consoles, cellular or satellite radio telephones, so-called “smart phones,” video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video coding techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265/High Efficiency Video Coding (HEVC), and extensions of such standards, as well as proprietary video codecs/formats such as AOMedia Video 1 (AV1) that was developed by the Alliance for Open Media. The video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing such video coding techniques.

Video coding techniques include spatial (intra picture) prediction and/or temporal (inter picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice or a video tile (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 coding blocks, superblocks, coding tree units (CTUs), coding units (CUs) and/or coding nodes. Video blocks in an intra coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples (also called prediction samples) in neighboring blocks in the same picture. Video blocks in an inter coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames.

SUMMARY

In general, this disclosure describes techniques for reducing the amount of memory that is reserved for palette mode coding. In palette mode coding, a video coder (e.g., video encoder or video decoder) may generate a palette token block that includes a plurality of palette token values. Each palette token value is an index into a list of palette colors for a palette predictor block used for palette mode coding a current block.

The palette token values may be entropy coded and neighboring palette token values may be contexts used to determine the probability for coding a current palette token value. This disclosure describes example techniques to reduce the overall amount of memory that is needed for entropy coding the palette token values, while ensuring that the neighboring palette token values used as contexts for determining probability for coding a current palette token value is available.

For example, this disclosure describes a first line buffer and a second line buffer, where each memory location in the first line buffer and the second line buffer corresponds to a row or column of the palette token block. The first line buffer and the second line buffer may be one-dimensional buffers (e.g., an array of memory locations).

The first line buffer may store two of the neighboring palette token values (e.g., above and left palette token values), and the second line buffer may store one of the neighboring palette token value (e.g., above-left). As the video coder is coding palette token values, the video coder may shift values stored in the first line buffer to the overwrite a memory location in the second line buffer, and overwrite values stored in the first line buffer based in part on the row or column of the palette token block to which the memory locations in the first and second line buffer correspond. In this way, the amount of memory used for storing neighboring palette token values may be reduced, as compared to techniques that store all palette token value for the entire palette token block for entropy coding.

In one example, this disclosure describes an apparatus configured to code video data includes a first line buffer, reserved in memory, configured to store a first palette token value of a first neighboring palette token to a current palette token of a palette token block of a current block in a first location of the first line buffer and configured to store a second palette token value of a second neighboring palette token to the current palette token of the palette token block of the current block in a second location of the first line buffer; a second line buffer, reserved in the memory, configured to store a third palette token value of a third neighboring palette token to the current palette token of the palette token block of the current block in a third location of the second line buffer, wherein the first palette token value, the second palette token value, and the third palette token value are each an index into a list of palette colors for a palette predictor block used for palette mode coding the current block; and one or more processors implemented in circuitry and in communication with the first line buffer and the second line buffer, the one or more processors configured to: access the first palette token value and the second palette token value from the first line buffer and the third token value from the second line buffer; and arithmetic code a current palette token value for the current palette token based on the first palette token value, the second palette token value, and the third palette token value.

In another example, this disclosure describes a method of coding video data includes storing, in a first line buffer reserved in memory, a first palette token value of a first neighboring palette token to a current palette token of a palette token block of a current block in a first location of the first line buffer and a second palette token value of a second neighboring palette token to the current palette token of the palette token block of the current block in a second location of the first line buffer; storing, in a second line buffer reserved in the memory, a third palette token value of a third neighboring palette token to the current palette token of the palette token block of the current block in a third location of the second line buffer, wherein the first palette token value, the second palette token value, and the third palette token value are each an index into a list of palette colors for a palette predictor block used for palette mode coding the current block; accessing the first palette token value and the second palette token value from the first line buffer and the third token value from the second line buffer; and arithmetic coding a current palette token value for the current palette token based on the first palette token value, the second palette token value, and the third palette token value.

In another example, this disclosure describes a device of coding video data includes means for storing, in a first line buffer reserved in memory, a first palette token value of a first neighboring palette token to a current palette token of a palette token block of a current block in a first location of the first line buffer and configured to store a second palette token value of a second neighboring palette token to the current palette token of the palette token block of the current block in a second location of the first line buffer; means for storing, in a second line buffer reserved in the memory, a third palette token value of a third neighboring palette token to the current palette token of the palette token block of the current block in a third location of the second line buffer, wherein the first palette token value, the second palette token value, and the third palette token value are each an index into a list of palette colors for a palette predictor block used for palette mode coding the current block; means for accessing the first palette token value and the second palette token value from the first line buffer and the third token value from the second line buffer; and means for arithmetic coding the current palette token value for the current palette token based on the first palette token value, the second palette token value, and the third palette token value.

In another example, this disclosure describes a computer-readable storage medium storing instructions thereon that when executed cause one or more processors to: store, in a first line buffer reserved in memory, a first palette token value of a first neighboring palette token to a current palette token of a palette token block of a current block in a first location of the first line buffer and configured to store a second palette token value of a second neighboring palette token to the current palette token of the palette token block of the current block in a second location of the first line buffer; store, in a second line buffer reserved in the memory, a third palette token value of a third neighboring palette token to the current palette token of the palette token block of the current block in a third location of the second line buffer, wherein the first palette token value, the second palette token value, and the third palette token value are each an index into a list of palette colors for a palette predictor block used for palette mode coding the current block; access the first palette token value and the second palette token value from the first line buffer and the third token value from the second line buffer; and arithmetic code the current palette token value for the current palette token based on the first palette token value, the second palette token value, and the third palette token value.

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.

