OA18322A - Palette index grouping for high throughput cabac coding. - Google Patents

Palette index grouping for high throughput cabac coding. Download PDF

Info

Publication number
OA18322A
OA18322A OA1201700279 OA18322A OA 18322 A OA18322 A OA 18322A OA 1201700279 OA1201700279 OA 1201700279 OA 18322 A OA18322 A OA 18322A
Authority
OA
OAPI
Prior art keywords
syntax element
palette
syntax
video
mode
Prior art date
Application number
OA1201700279
Inventor
Wei PU
Marta Karczewicz
Vadim Seregin
Rajan Laxman Joshi
Original Assignee
Qualcomm Incorporated
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qualcomm Incorporated filed Critical Qualcomm Incorporated
Publication of OA18322A publication Critical patent/OA18322A/en

Links

Abstract

In an example, a method of decoding video data may include receiving a palette mode encoded block of video data of a picture. The method may include receiving encoded palette mode information for the palette mode encoded block of video data. The encoded palette mode information may include a plurality of instances of a first syntax element and a plurality of syntax elements that are different from the first syntax element. The method may include decoding, using bypass mode, the plurality of instances of the first syntax element before decoding the plurality of syntax elements that are different from the first syntax element using context mode. The method may include decoding, using context mode, the plurality of syntax elements that are different from the first syntax element after decoding the plurality of instances of the first syntax element using bypass mode.

Description

PALETTE INDEX GROUPING FOR HIGH THROUGHPUT CABAC CODING [0001] This application claims the benefit of U.S. Provisions] Patent Application No. 62/110,302 filed on January 30,2015, which is hereby incorporated by référencé herein in its entirety.
TECHNICAL F1ELD [0002] This disclosure relates to encoding and decoding content, and more specifïcally, encoding and decoding content according to a palette-based coding mode.
BACKGROUND [0003] Digital video capabilities can be incorporated into a wide range of devices, including digital télévisions, digital direct broadcast Systems, wireless broadcast Systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital caméras, digital recording devices, digital media players, video gamîng devices, video game consoles, cellular or satellite radio téléphonés, so-called “smart phones,” video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video compression 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. The video devices may transmit, receive, encode, décodé, and/or store digital video information more efïiciently by împlementing such video compression techniques.
[0004] Video compression techniques perform spatial (intra-pîcture) prédiction and/or temporal (inter-picture) prédiction to reduce or remove redundancy inhérent in video sequences. For block-based video coding, a video slice (i.e., a video frame or a portion of a video frame) may be partitioned into video blocks. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prédiction with respect to 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 prédiction with respect to reference samples in neighboring blocks in the same picture or temporal prédiction 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.
[0005] Spatial or temporal prédiction results in a prédictive block for a block to be coded. Residual data represents pixel différences between the original block to be coded and the prédictive block. An inter-coded block ts encoded according to a motion vector that points to a block of référencé samples forming the prédictive block, and the 5 residual data indicates the différence between the coded block and the prédictive block.
An intra-coded block is encoded according to an intra-coding mode and the residual data. For further compression, the residual data may be transformed from the pixel domain to a transform domain, resulting in residual coefficients, which then may be quantized. The quantized coefficients, initially arranged in a two-dimensional array, 10 may be scanned in order to produce a one-dimensional vector of coefficients, and entropy coding may be applied to achieve even more compression.
[0006] Content, such as an image, may be encoded and decoded using palette mode. Generally, palette mode is a technique involving use of a palette to represent content. Content may be encoded such that the content is represented by an index map that 15 includes values corresponding to the palette. The index map may be decoded to reconstruct the content.
SUMMARY [0007] Techniques of this disclosure relate to palette-based content coding. For example, in palette-based content coding, a content coder (e.g., a content coder such as a video encoder or a video décoder) may form a “palette” as a table of colors for representing the video data of the partïcular area (e.g., a given block). Palette-based content coding may, for example, be especïally useful for coding areas of video data having a relatively small number of colors. Rather than coding actual pixel values (or their resîduals), the content coder may code palette indices (e.g., index values) for one or more of the pixels that relate the pixels with entries in the palette representing the colors of the pixels. The techniques described ïn this disclosure may include techniques for various combinations of one or more of signaling palette-based coding modes, transmitting palettes, deriving palettes, deriving the value of non-transmitted syntax éléments, transmitting palette-based coding maps and other syntax éléments, predicting palette entries, coding runs of palette indices, entropy coding palette information, and various other palette coding techniques.
[0008] In one example, this disclosure describes a method of decoding video data comprising receiving, from an encoded video bitstream, a palette mode encoded block
of video data of a picture; receiving, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax 5 element; decoding, using bypass mode, the plurality of instances of the first syntax element before decoding the plurality of syntax éléments that are different from the first syntax element using context mode; decoding, using context mode, the plurality of syntax éléments that are different from the first syntax element after decoding the plurality of instances of thç first syntax element using bypass mode; and decoding the 1 o palette mode encoded block of video data using the decoded plurality of instances of the first syntax element and the decoded plurality of syntax éléments that are different from the first syntax element.
[0009] In another example, this dîsclosure describes a device for decoding video data comprising a memory configured to store the video data; and a video décoder in 15 communication with the memory configured to: receive, from an encoded video bitstream, a palette mode encoded block of video data of a picture; receive, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are 20 different from the first syntax element; décodé, using bypass mode, the plurality of instances ofthe first syntax element before decoding the plurality of syntax éléments that are different from the first syntax element using context mode; décodé, using context mode, the plurality of syntax éléments that are different from the first syntax element after decoding the plurality of instances of the first syntax element using bypass 25 mode; and décodé the palette mode encoded block of video data using the decoded plurality of instances of the first syntax element and the decoded plurality of syntax éléments that are different from the first syntax element.
[0010] In another example, this dîsclosure describes a non-transitory computer-readable storage medium having instructions stored thereon that, when executed, cause one or 30 more processors to receive, from an encoded video bitstream, a palette mode encoded block of video data of a picture; receive, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a plurality of instances ofa first syntax element and a plurality of syntax éléments that are different from the first syntax
element; décodé, using bypass mode, the plurality of instances ofthe first syntax element before decoding the plurality of syntax éléments that are different from the first syntax element using context mode; décodé, using context mode, the plurality of syntax éléments that are different from the first syntax element after decoding the plurality of instances of the first syntax element using bypass mode; and décodé the palette mode encoded block of video data using the decoded plurality of instances of the first syntax element and the decoded plurality of syntax éléments that are different from the first syntax element.
[0011] In another example, this disclosure describes a method of encoding video data 10 comprising determining that a block of video data is to be coded in palette mode;
encoding the block of video data using palette mode into an encoded bitstream, wherein encoding the block of video data using palette mode comprises: generating palette mode information for the block of video data, wherein the palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are 15 different from the first syntax element; encoding, using bypass mode, the plurality of instances of the first syntax element into the encoded bitstream before encoding the plurality of syntax éléments that are different from the first syntax element into the encoded bitstream using context mode; and encoding, using context mode, the plurality of syntax éléments that are different from the first syntax element into the encoded 20 bitstream after encoding the plurality of instances of the first syntax element using bypass mode into the encoded bitstream.
[0012] In another example, this disclosure describes a device for encoding video data, the device comprising a memory configured to store the video data; and a video encoder in communication with the memory, the video encoder configured to: détermine that a 25 block of video data stored in the memory is to be encoded in palette mode; encode the block of video data using palette mode into an encoded bitstream, wherein the video encoder being configured to encode the block of video data using palette mode comprises the video encoder being configured to: generate palette mode information for the block of video data, wherein the palette mode information includes a plurality of 30 instances of a first syntax element and a plurality of syntax cléments that are different from the first syntax element; encode, using bypass mode, the plurality of instances of the first syntax element into the encoded bitstream before encoding the plurality of syntax éléments that are different from the first syntax element into the encoded bitstream using context mode; and encode, using context mode, the plurality of syntax
éléments that are different from the first syntax element into the encoded bitstream after encoding the plurality of instances of the first syntax element using bypass mode into the encoded bitstream.
[0013] The details of one or more examples of the disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the disclosure will be apparent from the description and drawings, and from the daims.
BRIEF DESCRIPTION OF DRAWINGS [0014] FIG. 1 is a block diagram illustrating an example video coding System that may utilize the techniques described în thîs disclosure.
[0015] FIG. 2 is a block diagram illustrating an example video encoder that may perform the techniques described in this disclosure.
[0016] FIG. 3 îs a block diagram illustrating an example video décoder that may perform the techniques described in this disclosure.
[0017] FIG. 4 is a conceptual diagram illustrating an example of determining palette entries for palette-based video coding, consistent with techniques of this disclosure.
[0018] FIG. 5 is a conceptual diagram illustrating an example of determining indices to a palette for a block of pixels, consistent with techniques of this disclosure.
[0019] FIG. 6 is a conceptual diagram illustrating an example of determining maximum copy above run-length, assuming rester scanning order, consistent with techniques of this disclosure.
[0020] FIG. 7 is a table illustrating changes to coding order of syntax éléments for palette-mode.
[0021] FIG. 8 is a flowchart illustrating an example process for decoding video data consistent with techniques for palette-based video coding of this disclosure.
[0022] FIG. 9 îs a flowchart illustrating an example process for encoding video data consistent with techniques for palette-based video coding of this disclosure.
DETAILED DESCRIPTION [0023] Aspects of this disclosure are directed to techniques for content coding (e.g., video coding). In particular, this disclosure describes techniques for palette-based coding of content data (e.g., video data) and techniques for context-based adaptive binary arithmetic coding (CABAC) of palette coding information. In various examples
of this disclosure, techniques of this disclosure may be directed to processes of predicting or coding a block in palette mode to improve coding efficiency and/or reduce codée complexity, as described in greater detail below. For example, the disclosure describes techniques related to palette index grouping (such as advanced palette index grouping).
[0024] In a CAB AC process, e.g., as described in D. Marpe, H. Schwarz, and T. Wiegand, “Context-based adaptive binary arithmetic coding in the H.264/AVC video compression standard,” in IEEE Trans. Cir. & Sys. Video Tech., Vol. 13, No. 7, July 2003, there are two modes: (1) bypass mode and (2) context mode. In bypass mode, 10 there is no context update process. Therefore, bypass mode can achieve higher data throughput than context-based mode by exploiting hardware or ISA level parallelism. This benefît of bypass mode becomes larger as the number of bypass bins that can be processed together încreases.
[0025] In a current palette mode coding design, as described in R. Joshi and J. Xu, 15 “Hîgh efficient video coding (HEVC) screen content coding: Draft 2,” JCTVC-S1005, in screen content coding, the syntax éléments of palette_lndex_idc and palette_escape_val are CABAC bypass mode coded, and are interleaved with other syntax cléments such as palette_run_msb_ld_plusl which are CABAC context mode coded. This disclosure describes techniques of grouping the bypass mode coded syntax 20 éléments together. As used herein, “bypass mode coded” and “context mode coded” are respectively interchangeable with “bypass coded” and “context coded.” [0026] As used herein, instances of the term “content” may be changed to the term “video,” and instances of the term “video” may be changed to the term “content.” This is true regardless of whether the terms “content” or “video” are being used as an 25 adjective, noun, or other part of speech. For example, reference to a “content coder” also includes reference to a “video coder,” and reference to a “video coder” also includes reference to a “content coder.” Similarly, reference to “content” also includes reference to “video, and reference to “video” also includes référence to “content.” [0027] As used herein, “content” refers to any type of content. For example, “content” 30 may refer to video, screen content, image, any graphîcal content, any dîsplayable content, or any data corresponding thereto (e.g., video data, screen content data, image data, graphîcal content data, dîsplayable content data, and the like).
[0028] As used herein, the term “video” may refer to screen content, movable contenL a pluralîty of images that may be presented in a sequence, or any data corresponding
thereto (e.g., screen content data, movable content data, video data, image data, and the like).
[0029] As used herein, the term “image” may refer to a single image, one or more images, one or more images amongst a plurality of images corresponding to a video, 5 one or more images amongst a plurality of images not corresponding to a video, a plurality of images corresponding to a video (e.g., ail of the images corresponding to the video or less than ail ofthe images corresponding to the video), a sub-part ofa single image, a plurality of sub-parts of a single image, a plurality of sub-parts corresponding to a plurality of images, one or more graphies primitives, image data, graphical data, 10 and the like.
[0030] In traditional video coding, images are assumed to be continuous-tone and spatially smooth. Based on these assumptions, various tools hâve been developed such as block-based transforms, filtering, and other coding tools, and such tools hâve shown good performance for natural content videos. However, in applications like remote 15 desktop, collaborative work and wireless display, computer-generated screen content may be the dominant content to be compressed. This type of screen content tends to hâve discrete-tone, sharp fines, and high contrast object boundaries. The assumption of continuous-tone and smoothness may no longer apply, and thus, traditional video coding techniques may be inefficient in compressing content (e.g., screen content).
[0031] In one example of palette-based video coding, a video encoder may encode a block of video data by determining a palette for the block (e.g., coding the palette explicitly, predicting the palette, or a combination thereof), locating an entry in the palette to represent the value(s) of one or more pixels, and encoding both the palette and the block with index values that indicate the entry in the palette used to represent the pixel values of the block. In some examples, the video encoder may signal the palette and/or the index values in an encoded bitstream. In tum, a video décoder may obtain, from an encoded bitstream, a palette for a block, as well as index values for the individual pixels of the block. The video décoder may relate the index values of the pixels to entries ofthe palette to reconstruct the various pixel values ofthe block.
[0032] For example, a particular area of video data may be assumed to hâve a relatively small number of colors. A video coder (e.g., a video encoder or video décoder) may code (e.g., encode or décodé) a so-called “palette” to represent the video data of the particular area. The palette may be expressed as an index (e.g., table) of colors or pixel values representing the video data of the particular area (e.g., a given block). The video
coder may code the index, which relates one or more pixel values to the appropriate value in the palette. Each pixel may be associated with an entry in the palette that represents the color of the pixel. For example, the palette may include the most dominant pixel values in the given block. In some cases, the most dominant pixel values may include the one or more pixel values that occur most frequently within the block. Addîtionally, in some cases, a video coder may apply a threshold value to détermine whether a pixel value is to be included as one ofthe most dominant pixel values in the block. According to various aspects of palette-based coding, the video coder may code index values indicative of one or more of the pixels values ofthe current block, instead of coding actual pixel values or their residuals for a current block of video data. In the context of palette-based coding, the index values indicate respective entries in the palette that are used to represent indîvidual pixel values of the current block. The description above is intended to provide a general description of palette-based video coding.
[0033] Palette-based coding may be particularly suitable for screen generated content coding or other content where one or more tradîtional coding tools are inefficient. The techniques for palette-based coding of video data may be used with one or more other coding techniques, such as techniques for inter- or intra-predictive coding. For example, as described in greater detail below, an encoder or décoder, or combined encoder-decoder (codée), may be configured to perform inter- and intra-predictive coding, as well as palette-based coding.
[0034] In some examples, the palette-based coding techniques may be configured for use with one or more video coding standards. For example, High Efficiency Video Coding (HEVC) is a new video coding standard being devcloped by the Joint
Collaboration Team on Video Coding (JCT-VC) of ITU-T Video Coding Experts Group (VCEG) and ISO/IEC Motion Picture Experts Group (MPEG). The finalized HEVC standard document is published as “ITU-T H.265, SERIES H: AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure ofaudiovisual services - Coding of moving video - High efficiency video coding,” Télécommunication Standardization Sector of
International Télécommunication Union (ITU), April 2013.
[0035] To provide more efficient coding of screen generated content, the JCT-VC is developing an extension to the HEVC standard, referred to as the HEVC Screen Content Coding (SCC) standard. A recent working draft of the HEVC SCC standard, referred to as “HEVC SCC Draft 2” or “WD2,” is described in document JCTVC-S1005, R. Joshi
and J. Xu, “HEVC screen content coding draft text 2,” Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11,19* Meeting: Strasbourg, FR, 17-24 October 2014.
[0036] With respect to the HEVC framework, as an example, the palette-based coding techniques may be configured to be used as a coding unit (CU) mode. In other examples, the palette-based coding techniques may be configured to be used as a prédiction unit (PU) mode in the framework of HEVC. Accordingly, ail of the following disclosed processes described in the context of a CU mode may, additionally or altematively, apply to PU. However, these HEVC-based examples should not be considered a restriction or limitation of the palette-based coding techniques described herein, as such techniques may be applied to work independently or as part of other existing or yet to be developed systems/standards. In these cases, the unit for palette coding can be square blocks, rectangular blocks or even régions of non-rectangular shape.
[0037] In some examples, a palette may be derived for one or more CUs, PUs, or any région of data (e.g., any block of data). For example, a palette may comprise (and may consist of) the most dominant pixel values in the current CU, where CU is the région of data for this particular example. The sîze and the éléments of the palette are first transmitted from a video encoder to a video décoder. The size and/or the éléments of the palette can be directly coded or predictively coded using the size and/or the éléments of the palette in the neighboring CUs (e.g. above and/or left coded CU). After that, the pixel values in the CU are encoded based on the palette according to a certain scanning order. For each pixel location în the CU, a fiag (e.g., palettejlag or escape_flag) may be first transmitted to indicate whether the pixel value is included in the palette. For those pixel values that map to an entry in the palette, the palette index associated with that entry is signaled for the given pixel location in the CU. Instead of sending the fiag (e.g., palette_flag or escape_flag), for those pixel values that do not exist in the palette, a spécial index may be assigned to the pixel and the actual pixel value (possibly in quantized form) may be transmitted for the given pixel location in the CU. These pixels are referred to as “escape pixels.” An escape pixel can be coded using any existing entropy coding method such as fixed length coding, unary coding, etc. In some examples, one or more techniques described herein may utilize a fiag such as palettejlag or escape_flag. In other examples, one or more techniques described herein may not utilize a fiag such as palettejlag or escapejlag.
[0038] Samples in a block of video data may be processed (e.g., scanned) using a horizontal raster scanning order or other scanning order. For example, the video encoder may couvert a two-dimensional block of palette indices into a one-dimensional array by scanning the palette indices using a horizontal raster scanning order. Likewise, 5 the video décoder may reconstruct a block of palette indices using the horizontal raster scanning order. Accordingly, this disclosure may refer to a previous sample as a sample that précédés the sample currently being coded in the block in the scanning order. It should be appreciated that scans other than a horizontal raster scan, such as vertical raster scanning order, may also be applicable. The example above, as well as other 10 examples set forth in this disclosure, is intended to provide a general description of palette-based video coding.
[0039] FIG. 1 is a block diagram illustratîng an example video coding System 10 that may utilize the techniques ofthis disclosure. As used herein, the term “video coder” refers generically to both video encoders and video decoders. In this disclosure, the 15 terms “video coding” or “coding” may refer generically to video encoding or video decoding. Video encoder 20 and video décoder 30 of video coding System 10 represent examples of devices that may be configured to perform techniques for palette-based video coding and entropy coding (e.g., CABAC) in accordance with various examples described in this disclosure. For example, video encoder 20 and video décoder 30 may 20 be configured to selectively code various blocks of video data, such as CUs or PUs in
HEVC coding, using either palette-based coding or non-palette based coding. Nonpalette based coding modes may refer to various înter-predictive temporal coding modes or intra-predictive spatial coding modes, such as the various coding modes specified by the HEVC standard.
[0040] As shown in FIG. 1, video coding System 10 includes a source device 12 and a destination device 14. Source device 12 generates encoded video data. Accordingly, source device 12 may be referred to as a video encoding device or a video encoding apparatus. Destination device 14 may décodé the encoded video data generated by source device 12. Accordingly, destination device 14 may be refened to as a video decoding device or a video decoding apparatus. Source device 12 and destination device 14 may be examples of video coding devices or video coding apparatuses.
[0041] Source device 12 and destination device 14 may comprise a wide range of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, téléphoné handsets such as so-called
“smart” phones, télévisions, caméras, display devices, digital media players, video gaming consoles, in-car computers, or the like, [0042] Destination device 14 may receive encoded video data from source device 12 via a channel 16. Channel 16 may comprise one or more media or devices capable of moving the encoded video data from source device 12 to destination device 14. In one example, channel 16 may comprise one or more communication media that enable source device 12 to transmit encoded video data directly to destination device 14 in realtime. In this example, source device 12 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and to may transmit the modulated video data to destination device 14. The one or more communication media may include wireless and/or wired communication media, such as a radio frequency (RF) spectrum or one or more physical transmission lînes. The one or more communication media may form part of a packet-based network, such as a local area network, a wide-area network, or a global network (e.g., the Internet). The one or 15 more communication media may include routers, switches, base stations, or other equipment that facilitate communication from source device 12 to destination device 14. [0043] In another example, channel 16 may include a storage medium that stores encoded video data generated by source device 12. In this example, destination device 14 may access the storage medium via, for example, disk access or card access. The storage medium may include a variety of local ly-accessed data storage media such as Blu-ray dises, DVDs, CD-ROMs, flash memory, or other suitable digital storage media for storing encoded video data.
[0044] In a further example, channel 16 may include a file server or another intermediate storage device that stores encoded video data generated by source device 25 12. In this example, destination device 14 may access encoded video data stored at the file server or other intermediate storage device via streaming or download. The file server may be a type of server capable of storing encoded video data and transmitting the encoded video data to destination device 14. Example file servers include web servers (e.g., for a website), file transfer protocol (FTP) servers, network attached 30 storage (NAS) devices, and local disk drives.
[0045] Destination device 14 may access the encoded video data through a standard data connection, such as an Internet connection. Example types of data connections may include wireless channels (e.g., Wi-Fi connections), wired connections (e.g., DSL, cable modem, etc.), or combinations of both that are suitable for accessing encoded
video data stored on a file server. The transmission of encoded video data from the file server may be a streaming transmission, a download transmission, or a combination of both.
[0046] Source device 12 and destination device 14 may be confîgured to perform palette-based coding and entropy coding (e.g., CABAC) consistent with this disclosure. The techniques ofthis disclosure for palette-based coding or CABAC, however, are not Iimited to wireless applications or settings. The techniques may be applied to video coding in support of a variety of multimedia applications, such as over-the-air télévision broadcasts, cable télévision transmissions, satellite télévision transmissions, streaming 10 video transmissions, e.g., via the Internet, encoding of video data for storage on a data storage medium, decodîng of video data stored on a data storage medium, or other applications. In some examples, video coding system 10 may be confîgured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
[0047] Video coding system 10 illustrated in FIG. 1 is merely an example and the techniques ofthis disclosure may apply to video coding settings (e.g., video encoding or video decodîng) that do not necessarily include any data communication between the encoding and decodîng devices. In other examples, data is retrieved from a local memory, streamed over a network, or the like. A video encoding device may encode and store data to memory, and/or a video decodîng device may retrievc and décodé data from memory. In many examples, the encoding and decodîng is performed by devices that do not communicate with one another, but simply encode data to memoiy and/or retrieve and décodé data from memory.
[0048] In the example of FIG. 1, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. In some examples, output interface 22 may include a modulator/demodulator (modem) and/or a transmitter. Video source 18 may include a video capture device, e.g., a video caméra, a video archive containing previously-captured video data, a video feed interface to receive video data from a video content provider, and/or a computer graphies system for generating video data, or a combination of such sources of video data.
[0049] Video encoder 20 may encode video data from video source 18. In some examples, source device 12 directly transmits the encoded video data to destination device 14 via output interface 22. In other examples, the encoded video data may also
be stored onto a storage medium or a file server for later access by destination device 14 for decoding and/or playback.
[0050] In the example ofFIG. I, destination device 14 includes an înput interface 28, a video décoder 30, and a display device 32. In some examples, înput interface 28 includes a receiver and/or a modem. Input interface 28 may receive encoded video data over channel 16. Display device 32 may be integrated with or may be extemal to destination device 14. In general, display device 32 displays decoded video data. Display device 32 may comprise a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0051] This dîsclosure may generally refer to video encoder 20 “signaling” or “transmitting” certain information to another device, such as video décoder 30. The term “signaling” or “transmitting” may generally refer to the communication of syntax éléments and/or other data used to décodé the compressed video data. Such communication may occur in real- or near-real-time. Altemately, such communication may occur over a span of time, such as might occur when storing syntax éléments to a computer-readable storage medium in an encoded bitstream at the time of encoding, which then may be retrieved by a decoding device at any time after being stored to this medium. Thus, while video décoder 30 may be referred to as “receiving” certain information, the receiving of information does not necessarily occur in real- or nearreal-time and may be retrieved from a medium at some time after storage.
[0052] Video encoder 20 and video décoder 30 each may be implemented as any of a variety of suitable circuitry, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable 25 gâte arrays (FPGAs), discrète logic, hardware, or any combinations thereof. Ifthe techniques are implemented partially in software, a device may store instructions for the software in a suitable, non-transitory computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the techniques of this dîsclosure. Any of the foregoing (including hardware, software, a 30 combination of hardware and software, etc.) may be considered to be one or more processors. Each of video encoder 20 and video décoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in a respective device.
[0053] In some examples, video encoder 20 and video décoder 30 operate according to a video compression standard, such as HEVC standard mentioned above, and described in the HEVC standard. In addition to the base HEVC standard, there are ongoîng efforts to produce scalable video coding, multivîew video coding, and 3D coding extensions for
HEVC. In addition, palette-based coding modes, e.g., as described in this disclosure, may be provided for extension ofthe HEVC standard. In some examples, the techniques described in this disclosure for palette-based coding may be applied to encoders and decoders configured to operation according to other video coding standards. Accordingly, application of a palette-based coding mode for coding of coding units (CUs) or prédiction units (PUs) in an HEVC codée îs described for purposes of example.
[0054] In HEVC and other video coding standards, a video sequence typically includes a sériés of pictures. Pictures may also be referred to as “frames.” A picture may include three sample arrays, denoted Sl, Scb and Scr. Sl is a two-dimensional array (i.e., a block) of luma samples. Scb is a two-dimensional array ofCb chrominance samples. Scr is a two-dimensional array of Cr chrominance samples. Chrominance samples may also be referred to herein as “chroma” samples. In other instances, a picture may be monochrome and may only include an array of luma samples.
[0055] To generate an encoded représentation of a picture, video encoder 20 may generate a set of coding tree units (CTUs). Each of the CTUs may be a coding tree block of luma samples, two corresponding coding tree blocks of chroma samples, and syntax structures used to code the samples ofthe coding tree blocks. A coding tree block may be an NxN block of samples. A CTU may also be referred to as a “tree block” or a “largest coding unît” (LCU). The CTUs of HEVC may be broadly analogous to the macroblocks ofother standards, such as H.264/AVC. However, a CTU is not necessarily limited to a partîcular size and may include one or more coding units (CUs). A slice may include an integer number of CTUs ordered consecutively in the raster scan. A coded slice may comprise a slice header and slice data. The slice header of a slice may be a syntax structure that includes syntax éléments that provide information about the slice. The slice data may include coded CTUs of the slice. [0056] This disclosure may use the term “video unit” or “video block” or “block” to refer to one or more sample blocks and syntax structures used to code samples of the one or more blocks of samples. Example types of video units or blocks may include CTUs, CUs, PUs, transform units (TUs), macroblocks, macroblock partitions, and so
on. In some contexts, discussion of PUs may be interchanged with discussion of macroblocks or macroblock partitions.
[0057] To generate a coded CTU, video encoder 20 may recursîvely perform quad-tree partitioning on the coding tree blocks of a CTU to divide the coding tree blocks into coding blocks, hence the name “coding tree units.” A coding block is an NxN block of samples. A CU may be a coding block of luma samples and two corresponding coding blocks of chroma samples of a picture that has a luma sample array, a Cb sample array and a Cr sample array, and syntax structures used to code the samples of the coding blocks. Video encoder 20 may partition a coding block of a CU into one or more prédiction blocks. A prédiction block may be a rectangular (i.e., square or non-square) block of samples on which the same prédiction is applied. A prédiction unit (PU) of a CU may be a prédiction block of luma samples, two corresponding prédiction blocks of chroma samples of a picture, and syntax structures used to predict the prédiction block samples. Video encoder 20 may generate prédictive luma, Cb and Cr blocks for luma,
Cb and Cr prédiction blocks of each PU of the CU.
[0058] Video encoder 20 may use intra prédiction or inter prédiction to generate the prédictive blocks for a PU. If video encoder 20 uses intra prédiction to generate the prédictive blocks of a PU, video encoder 20 may generate the prédictive blocks of the PU based on decoded samples of the picture associated with the PU.
(0059] If video encoder 20 uses inter prédiction to generate the prédictive blocks of a
PU, video encoder 20 may generate the prédictive blocks ofthe PU based on decoded samples of one or more pictures other than the picture associated with the PU. Video encoder 20 may use uni-prediction or bi-predictîon to generate the prédictive blocks of a PU. When video encoder 20 uses uni-prediction to generate the prédictive blocks for a
PU, the PU may hâve a single motion vector (MV). When video encoder 20 uses biprediction to generate the prédictive blocks for a PU, the PU may hâve two MVs. [0060] After video encoder 20 generates prédictive blocks (e.g., prédictive luma, Cb and Cr blocks) for one or more PUs of a CU, video encoder 20 may generate residual blocks for the CU. Each sample in a residual block of the CU may indicate a différence between a sample în a prédictive block of a PU of the CU and a corresponding sample in a coding block of the CU. For example, video encoder 20 may generate a luma residual block for the CU. Each sample in the CU’s fuma residual block indicates a différence between a luma sample in one of the CU’s prédictive luma blocks and a corresponding sample in the CU’s original luma coding block. In addition, video
encoder 20 may generate a Cb residual block for the CU. Each sample in the CU’s Cb residual block may indicate a différence between a Cb sample in one ofthe CU’s prédictive Cb blocks and a corresponding sample in the CU’s original Cb coding block. Video encoder 20 may also generate a Cr residual block for the CU. Each sample in the 5 CU’s Cr residual block may indicate a différence between a Cr sample in one of the
CU’s prédictive Cr blocks and a corresponding sample in the CU’s original Cr coding block.
[0061] Furthermore, video encoder 20 may use quad-tree partitioning to décomposé the residual blocks (e.g., luma, Cb and Cr residual blocks) of a CU into one or more transform blocks (e.g., luma, Cb and Cr transform blocks). A transform block may be a rectangular block of samples on which the same transform is applied. A transform unit (TU) of a CU may be a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax structures used to transform the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. The luma transform block associated with the TU may be a sub-block of the CU’s luma residual block. The Cb transform block may be a sub-block of the CU’s Cb residual block. The Cr transform block may be a sub-block of the CU’s Cr residual block.
[0062] Video encoder 20 may apply one or more transforms to a transform block to generate a coefficient block for a TU. A coefficient block may be a two-dîmensional array of transform coefficients. A transform coefficient may be a scalar quantity. For example, video encoder 20 may apply one or more transforms to a luma transform block of a TU to generate a luma coefficient block for the TU. Video encoder 20 may apply one or more transforms to a Cb transform block of a TU to generate a Cb coefficient block for the TU. Video encoder 20 may apply one or more transforms to a Cr transform block of a TU to generate a Cr coefficient block for the TU.
[0063] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block or a Cr coefficient block), video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. After video encoder 20 quantizes a coefficient block, video encoder 20 may entropy encode syntax éléments indicating the quantized transform coefficients. For example, video encoder 20 may perform
Context-Adaptive Binary Arithmetic Coding (CABAC) on the syntax éléments indicating the quantized transform coefficients.
[0064] With respect to CABAC, as an example, video encoder 20 and video décoder 30 may select a probability model (also referred to as a context model) to code symbols associated with a block of video data based on context. For example, a context model (Ctx) may be an index or offset that is applied to select one of a plurality of different contexts, each of which may correspond to a particular probability model. Accordingly, a different probability model is typically defined for each context. After encoding or decoding the bin, the probability model is further updated based on a value of the bin to 10 reflect the most current probability estimâtes for the bin. For example, a probability model may be maintained as a state in a fi ni te state machine. Each particular state may correspond to a spécifie probability value. The next state, which corresponds to an update of the probability model, may dépend on the value of the current bin (e.g., the bin currently being coded). Accordingly, the sélection ofa probability model may be 15 influenced by the values of the previously coded bins, because the values indicate, at least in part, the probability of the bin having a given value. The context coding process described above may generally be referred to as a context-adaptive coding mode.
[0065] Hence, video encoder 20 may encode a target symbol using a probability model. Lîkewise, video décoder 30 may parse a target symbol using the probability model. In 20 some instances, video encoder 20 may code syntax éléments using a combination of context adaptive and non-context adaptive coding. For example, video encoder 20 may context code bins by selectîng a probability model or “context model” that opérâtes on context to code some of the bins. In contrast, for other bins, video encoder 20 may bypass code bins by bypassing, or omitting the regular arithmetic coding process when 25 coding the bins. In such examples, video encoder 20 may use a fixed probability model to bypass code the bins. That !s, bypass coded bins do not include context or probability updates.
[0066] Video encoder 20 may output a bitstream that includes the entropy-encoded syntax éléments. The bitstream may also include syntax éléments that are not entropy 30 encoded. The bitstream may include a sequence of bits that forms a représentation of coded pictures and associated data. The bitstream may comprise a sequence of network abstraction layer (NAL) units. Each of the NAL units includes a NAL unit header and encapsulâtes a raw byte sequence payload (RBSP). The NAL unît header may include a syntax element that indicates a NAL unît type code. The NAL unit type code specified
by the NAL unit header ofa NAL unit indicates the type ofthe NAL unit. A RBSP may be a syntax structure containing an integer number of bytes that is encapsulated within a NAL unit. In some instances, an RBSP includes zéro bits.
[0067] Different types ofNAL units may encapsulate different types of RBSPs. For example, a first type ofNAL unît may encapsulate an RBSP for a picture parameter set (PPS), a second type ofNAL unit may encapsulate an RBSP for a coded slice, a third type ofNAL unit may encapsulate an RBSP for supplémentai enhancement information (SEI), and so on. NAL units that encapsulate RBSPs for video coding data (as opposed to RBSPs for parameter sets and SEI messages) may be referred to as video coding layer 10 (VCL) NAL units.
[0068] Video décoder 30 may receive a bitstream generated by video encoder 20. In addition, video décoder 30 may parse the bitstream to décodé syntax éléments from the bitstream. Video décoder 30 may reconstruct the pictures of the video data based at least in part on the syntax éléments decoded from the bitstream. The process to reconstruct the video data may be generally reciprocal to the process performed by video encoder 20. For instance, video décoder 30 may use MVs of PUs to détermine prédictive blocks for the inter-predicted PUs of a current CU. Likewîse, video décoder 30 may generate intra-predicted blocks for PlTs of a current CU. In addition, video décoder 30 may inverse quantize transform coefficient blocks associated with TUs of the current CU. Video décoder 30 may perform inverse transforms on the transform coefficient blocks to reconstruct transform blocks associated with the TUs of the current CU. Video décoder 30 may reconstruct the coding blocks of the current CU by adding the samples ofthe prédictive blocks for PUs ofthe current CU to correspondîng residual values obtained from inverse quantization and inverse transformation of the transform blocks ofthe TUs ofthe current CU. By reconstructing the coding blocks for each CU of a picture, video décoder 30 may reconstruct the picture.
[0069] In some examples, video encoder 20 and video décoder 30 may be confîgured to perform palette-based coding. For example, in palette based coding, rather than performing the intra-predictive or inter-predictîve coding techniques described above, 30 video encoder 20 and video décoder 30 may code a so-called palette as a table of colors or pixel values representing the video data of a particular area (e.g., a given block). In this way, rather than coding actual pixel values or their residuals for a current block of video data, the video coder may code index values for one or more of the pixels values
of the current block, where the index values indicate entries in the palette that are used to represent the pixel values of the current block.
[0070] For exemple, video encoder 20 may encode a block of video data by determining a palette for the block, locating an entry in the palette to represent the value ofeach pixel, and encoding the palette and the index values for the pixels relating the pixel value to the palette. Video décoder 30 may obtain, from an encoded bitstream, a palette for a block, as well as index values for the pixels of the block. Video décoder 30 may match the index values of the individual pixels to entries of the palette to reconstruct the pixel values of the block. In instances where the index value associated with an to individual pixel does not match any index value of the corresponding palette for the block, video décoder 30 may identify such a pixel as an escape pixel, for the purposes of palette-based coding.
[0071] As described in more detail below, the basic idea of palette-based coding is that, for a given block of video data to be coded, video encoder 20 may dérivé a palette that includes the most dominant pixel values tn the current block. For instance, the palette may refer to a number of pixel values which are determined or assumed to be dominant and/or représentative for the current CU. Video encoder 20 may first transmit the size and the éléments of the palette to video décoder 30. Additionally, video encoder 20 may encode the pixel values in the given block according to a certain scanning order.
For each pixel included in the given block, video encoder 20 may signal the index value that maps the pixel value to a corresponding entry in the palette. If the pixel value is not included in the palette (i.e., no palette entry exîsts that spécifiés a particular pixel value of the palette-coded block), then such a pixel is defined as an “escape pixel.” In accordance with palette-based coding, video encoder 20 may encode and signal an index 25 value that is reserved for an escape pixel. In some examples, video encoder 20 may also encode and signal the pixel value (or a quantized version thereof) for an escape pixel included in the given block For example, video décoder 30 may be configured to détermine whether a pixel value matches or is otherwise close to a palette entry based on a distortion metric (e.g., MSE, SAD, and the like [0072] Upon receiving the encoded video bitstream signaled by video encoder 20, video décoder 30 may first détermine the palette based on the information received from video encoder 20. Video décoder 30 may then map the received index values associated with the pixel locations in the given block to entries of the palette to reconstruct the pixel values of the given block. In some instances, video décoder 30 may détermine that a
pixel of a palette-coded block is an escape pixel, such as by determining that the pixel is palette-coded with an index value reserved for escape pixels. In instances where video décoder 30 identifies an escape pixel in a palette-coded block, video décoder 30 may receive the pixel value (or a quantized version thereof) for an escape pixel included in the given block. Video décoder 30 may reconstruct the palette-coded block by mapping the individual pixel values to the corresponding palette entries, and by using the pixel value (or a quantized version thereof) to reconstruct any escape pixels included in the palette-coded block.
[0073] A stated above, in an example palette-coding mode, a palette may include entries 10 numbered by an index. Each entry may represent color component values or intensifies (for example, in color spaces such as YCbCr, RGB, YUV, CMYK, or other formats), which can be used as a predictor for a block or as final reconstructed block samples. As described in standard submission document JCTVC-Q0094 (Wei Pu et al., “AHG10: Suggested Software for Palette Coding based on RExtô.O,” JCTVC-Q0094, Valencîa, 15 ES, 27 March - 4 April 2014) a palette may include entries that are copied from a predictor palette. A predictor palette may include palette entries from blocks previously coded using palette mode or other reconstructed samples. For each entry in the predictor palette, a binary flag is sent to indicate whether that entry is copied to the current palette (indicated by flag = 1). This is referred to as the binary palette prédiction 20 vector. Additionally the current palette may comprise (e.g., consist of) new entries signaled explicitly. The number of new entries may be signaled as well.
[0074] As another example, in palette mode, a palette may include entries numbered by an index representing color component values that may be used as predictors for block samples or as final reconstructed block samples. Each entry in the palette may contain, 25 for example, one luma component (e.g., luma value), two chroma components (e.g., two chroma values), or three color components (e.g., RGB, YUV, etc.). Previously decoded palette entries may be stored in a list. This list may be used to predict palette entries in the current palette mode CU, for example. A binary prédiction vector may be signaled in the bitstream to indicate which entries in the list are re-used in the current palette. In 30 some examples, run-length coding may be used to compress the binary palate predictor.
For example, a run-length value may be coded using Oth order Exp-Golomb code.
[0075] In this disclosure, it will be assumed that each palette entry spécifiés the values for ail color components of a sample. However, the concepts of this disclosure are applicable to using a separate palette and/or a separate palette entry for each color
component. Also, it is assumed that samples in a block are processed using horizontal rester scanning order. However, other scans such as vertical rester scanning order are also applicable. As mentioned above, a palette may contain predicted palette entries, for example, predicted from the palette(s) used to code the previous block(s), and the new 5 entries which may be spécifie for the current block and are signaled explîcîtly. The encoder and décoder may know the number ofthe predicted and new palette entries and a sum of them may indicate the total palette size in a block.
[0076] As proposed in the example of JCTVC-Q0094 cited above, each sample in a block coded with the palette may belong to one of the three modes, as set forth below: 10 · Escape mode. In thîs mode, the sample value is not included into a palette as a palette entry and the quantized sample value is signaled explîcîtly for ail color components. It is similar to the signaling ofthe new palette entries, although for new palette entries, the color component values are not quantized.
• CopyAbove mode (also called CopyFromTop mode). In this mode, the palette entry index for the current sample is copied from the sample located dîrectly above the current sample in a block of samples. In other examples, for copy above mode, a block of video data may be trensposed so that the sample above the block is actually the sample to the left of the block.
• Value mode (also called index mode). In this mode, the value of the palette entry index is explicitly signaled.
[0077] As described herein, a palette entry index may be referred as a palette index or simply index. These terms can be used interchangeably to describe techniques of this disclosure. In addition, as described in greater detail below, a palette index may hâve one or more associated color or intensity values. For example, a palette index may hâve 25 a single associated color or intensity value associated with a single color or intensity component of a pixel (e.g., an Red component of RGB data, a Y component of YUV data, or the like). In another example, a palette Index may hâve multiple associated color or intensity values. In some instances, palette-based video coding may be applied to code monochrome video. Accordingly, “color value” may generally refer to any 30 color or non-color component used to generate a pixel value.
[0078] A run value may indicate a run of palette index values that are coded using the same palette-coding mode. For example, with respect to Value mode, a video coder (e.g., video encoder 20 or video décoder 30) may code an index value and a run value that indicates a number of consecutive subséquent samples in a scan order that hâve the
same index value and that are being coded with the palette index. With respect to CopyAbove mode, the video coder may code an indication that an index value for the current sample value is the same as an index value ofan above-neighboring sam pie (e.g., a sample that is positioned above the sample currently being coded in a block) and 5 a run value that indicates a number of consecutive subséquent samples in a scan order that also copy an index value from an above-neighboring sample. Accordingly, in the examples above, a run of palette index values refers to a run of palette values having the same value or a run of index values that are copied from above-neighboring samples. [0079J Hence, the run may specify, for a given mode, the number of subséquent samples that belong to the same mode. In some instances, signaling an index value and a run value may be similar to run-length coding. In an example for purposes of illustration, a string of consecutive palette index values of an index block corresponding to a block of video data may be 0,2,2,2,2,5. Each index value corresponds to a sample in the block of video data. In this example, a video coder may code the second sample (e.g., the first palette index value of “2”) using Value mode. After coding an index value of 2, the video coder may code a run of 3, which indicates that the three subséquent samples also hâve the same palette index value of 2. In a similar manner, coding a run of four palette indices after coding an index using CopyAbove mode may indicate that a total of five palette indices are copied from the corresponding palette index values in the row above the sample position currently being coded.
[0080] Using the palette, video encoder 20 and/or video décoder 30 may be configured to code a block of samples (e.g., a block of video data) into an index block, where the index block is a block including index values that map to one or more palette entries, and, in some examples, one or more escape pixel values. Video encoder 20 may be configured to entropy encode the index block to compress the index block. Similarly, video décoder 30 may be configured to entropy décodé an encoded index block to generate the index block from which video décoder 30 may generate a block of samples (e.g., the block of video data encoded by encoder 20). For example, run-length based entropy coding may be used to compress and decompress the index block. In some examples, video encoder 20 and video décoder 30 may be configured to respectively entropy encode and décodé the index block using CABAC.
[0081] To apply CABAC coding to information (e.g., a syntax element, an index block such as the index values of the index block, or other information), a video coder (e.g., video encoder 20 and video décoder 30) may perform binarizatîon on the information.
BÎnarization refers to the process ofconvertïng information into a sériés of one or more bits. Each sériés ofone or more bits may bereferredto as “bins.” BÎnarization is a lossless process and may include one or a combination of the following coding techniques: fixed length coding, unary coding, truncated unary coding, truncated Rice coding, Golomb coding, exponential Golomb coding, Golomb-Rice coding, any form of Golomb coding, any form of Rice coding, and any form ofentropy coding. For example, binarization may include representing the integer value of 5 as 00000101 using an 8-bit fixed length technique or as 11110 using a unary coding technique. [0082] After binarization, a video coder may identify a coding context. The coding context may identify probabilîtîes of coding bins having particular values. For instance, a coding context may indicate a 0.7 probabi lity of coding a 0-valued bin and a 03 probabilîty of coding a 1 -valued bin. After identifying the coding context, the video coder may arithmetically code that bin based on the context, which is known as context mode coding. Bins coded using a CABAC context mode coding may be referred to as “context bins.” [0083] Further, rather than performing context mode coding on ail bins, a video coder (e.g., video encoder 20 and video décoder 30) may code some bins using bypass CABAC coding (e.g., bypass mode coding). Bypass mode coding refers to the process of arithmetically coding a bin without using an adaptive context (e.g., a coding context). That is, the bypass coding engine does not select contexts and may assume a probabilîty of 0.5 for both symbols (0 and 1). Although bypass mode coding may not be as bandwidth-efiîcîent as context mode coding, it may be computationally less expensive to perform bypass mode coding on a bin rather than to perform context mode coding on the bin. Further, performing bypass mode coding may allow for a higher degree of parailelizatîon and throughput. Bins coded using bypass mode coding may be referred to as “bypass bins.” [0084] Video encoder 20 and video décoder 30 may be configured with a CABAC coder (e.g., a CABAC encoder and a CABAC décoder, respectively). A CABAC coder may include a context mode coding engine to perform CABAC context mode coding and a bypass mode coding engine to perform bypass mode coding. If a bin is context mode coded, the context mode coding engine is used to code this bin. The context mode coding engine may need more than two processing cycles to code a single bin. However, with proper pipeline design, a context mode coding engine may only need
n+M cycles to encode n bins, where M is the overhead to start the pipeline. M is usually greater than 0.
[0085] At the start of the CABAC coding process (i.c., every switch from bypass mode to context mode and vice versa), pipeline overhead is introduced. If a bin is bypass mode coded, the bypass mode coding engine is used to code this bin. The bypass'mode coding engine may be expected to need only one cycle to code n-bit information, where n may be greater than one. Thus, the total number of cycles to code a set of bypass bins and context bins may be reduced if ali of the bypass bins within the set are coded together and ail of the context bins within the set are coded together. In particular, coding the bypass bins together before or after transitioning to context mode coding can save the overhead required to restart the context mode coding engine. For example, video encoder 20 and video décoder 30 may be configured to switch between bypass mode to context mode while respectively encoding or decoding a block of video data using palette mode. In another example, video encoder 20 and video décoder 30 may be configured to reduce the number of times the encoding or decoding process switches between bypass mode to context mode when encoding or decoding a block of video data using palette mode.
[0086] The techniques descrîbed in this disclosure may include techniques for various combinations of one or more of signaling palette-based video coding modes, transmitting palettes, derivîng palettes, signaling scanning order, deriving scanning order, and transmitting palette-based video coding maps and other syntax éléments. For example, techniques of this disclosure may be directed to entropy coding palette information. In some examples, the techniques of this disclosure may, among other things, be used to încrease coding efficiency and reduce coding inefficiencies associated with palette-based video coding. Accordingly, as descrîbed in greater detail below, the techniques of this disclosure may, in some instances, improve efficiency and improve bitrate when coding video data using a palette mode.
[0087] As descrîbed above, în the current palette mode design in screen content coding, the syntax éléments of palette_index_idc and palette_escape_val are CABAC bypass coded, and are interleaved with other syntax éléments (e.g., palette_run_msb_id_plusl) that are CABAC context coded. However, it may be bénéficiai to group the bypass coded information (e.g., syntax éléments) together, which may improve coding efficiency and/or reduce codée complexity.
[0088] The syntax element of palettejndexjdc may be an indication of an index to the array represented by currentPaletteEntries, as defined in, for example, JCTVC· S1005. The value ofpalettejndexjdc may be in the range of0 to (adjustedlndexMax1), inclusive. The syntax element of palette_escape_val may specify the quantized escape coded sample value for a component, as defined in, for example, JCTVC-S1005. palette_run_msbjd_plusl minus 1 may specify the index of the most significant bit in the binary représentation of paletteRun, as defined in, for example, JCTVC-S1005. The variable paletteRun may specify the number of consecutive locations minus 1 with the same palette index as the position in the above row when palette_runjypejlag is equal to COPY_ABOVE_MODE or spécifiés the number of consecutive locations minus 1 with the same palette index when palette_run_type_flag is equal to COPYJNDEX_MODE, as defined in, for example, JCTVC-S1005. Addîtional details regarding palettejndexjdc, pa!ette_escape_val, palette_run_msbjd_plusl, currentPaletteEntries, adjustedlndexMax, and paletteRun may be found in JCTVCS1005.
[0089] In some examples, this disclosure describes a method ofgrouping ait ofthe syntax éléments palettejndexjdc at the front of the palette index block coding section to improve CABAC throughput. For instance, video encoder 20 may be configured to encode ail ofthe syntax éléments palettejndexjdc at the front ofthe palette index block coding section. For example, video encoder 20 may be configured to encode ail ofthe syntax éléments palettejndexjdc before encoding syntax éléments to be context mode encoded. Similarly, video décoder 30 may be configured to décodé ail of the syntax éléments palettejndexjdc at the front of the palette index block coding section. For example, video décoder 30 may be configured to décodé ail of the syntax éléments palettejndexjdc before decoding context mode encoded syntax éléments. [0090] As another example, video encoder 20 may be configured to bypass mode encode ail of the syntax éléments palettejndexjdc at the front of the palette index block coding section such that ait ofthe syntax éléments palettejndexjdc are encoded before encoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msbjd_plusl). Similarly, video décoder 30 may be configured to décodé ail of the syntax éléments palettejndexjdc for a block at the front of the palette index block coding section of the block such that ail ofthe syntax éléments palettejndexjdc are decoded before decoding syntax
element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msbjd_plusl).
[0091] syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or nin length (e.g., palette_run_msb_id_plusl) [0092] As another example, example, video encoder 20 may be configured to encode ail ofthe syntax éléments palette_index_ldc before context encoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_plusl). Similarly, video décoder 30 may be configured to décodé ali ofthe syntax éléments palette_index_idc before context decoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_plusl).
[0093] As another example, video encoder 20 may be configured to encode ail ofthe syntax éléments palettejndexjdc within the palette block coding section before encoding syntax éléments to be context mode encoded. Similarly, video décoder 30 may be configured to décodé ail of the syntax éléments palette_indexJdc within the palette block coding section before decoding context mode encoded syntax éléments. As another example, video encoder 20 may be configured to encode ail of the syntax éléments palettejndexjdc within the palette block coding section before context encoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msbjd_plusl). Similarly, video décoder 30 may be configured to décodé ail ofthe syntax cléments palettejndexjdc within the palette block coding section before context decoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msbJd_plus 1 ).
[0094] In general, video encoder 20 and video décoder 30 may be configured to not interleave the encoding or decoding of palettejndexjdc in bypass mode with syntax éléments that are to be encoded or decoded using context mode, respectively. For example, video encoder 20 and video décoder 30 may be configured to not interleave the encoding or decoding of palettejndexjdc in bypass mode with syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msbjd_plusl) that are to be encoded or decoded using context mode, respectively. As another example, video encoder 20 may be configured to bypass encode ail instances ofthe palettejndexjdc syntax element before context encoding a syntax element that requires context mode. Similarly, video décoder 30 may be
configured to bypass décodé ail instances ofthe palette_index_ldc syntax element before context decoding a syntax element that requires context mode. As another example, video encoder 20 may be configured to bypass encode ail instances of the palette_index_idc syntax element before context encoding syntax element(s) related to 5 palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_plusl). Similarly, video décoder 30 may be configured to bypass décodé ail instances of the palette_index_ldc syntax element before context decoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_plusl).
[0095] Video encoder 20 and video décoder 30 may also respectively encode and décodé a value representing the number of occurrences of palette_index_Idc. Video encoder 20 and video décoder 30 may use the value representing the number of occurrences of palette_index_idc to respectively encode or décodé each ofthe syntax éléments palette_index_idc. The techniques described in this dîsclosure may also remove the redundancy of palette run length related syntax éléments, and remove the redundancy of palette_run_type_flag and palettejndexjdc.
[0096] In some examples, this dîsclosure describes a method of groupîng ail of the syntax éléments palette_escape_val at the front of the palette index block coding section of a block (e.g., a PU or a CU) to improve CABAC throughput. For instance, 20 video encoder 20 may be configured to encode ail of the syntax éléments palette_escape_va! at the front of the palette index block coding section of a block For example, video encoder 20 may be configured to bypass mode encode ail of the syntax éléments palette_escape_val at the front ofthe palette index block coding section such that ail ofthe syntax éléments palette_escape_val are encoded before encoding syntax 25 element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_p!usl). Similarly, video décoder 30 may be configured to décodé ail ofthe syntax éléments palette_escape_val for a block at the front of the palette index block coding section of the block such that ail of the syntax éléments palette_escape_va! are decoded before decoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_ïd_plusl). As another example, video encoder 20 may be configured to encode ali ofthe syntax cléments palette_escape_va! before encoding syntax éléments to be context mode encoded. For example, video encoder 20 may be configured to encode ail ofthe syntax éléments palette_escape_val before context
encoding syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_plusl). Similarly, video décoder 30 may be configured to décodé ail of the syntax éléments palette_escape_val for a block at the front of the palette index block coding section of the block. For example, video décoder 30 may be configured to décodé ail of the syntax éléments palette_escape_val before decoding context mode encoded syntax éléments in a block.
[0097] As another example, video encoder 20 may be configured to encode ail of the syntax éléments palette_escape_va! within the palette block coding section of a block before encoding syntax éléments to be context mode encoded. Similarly, video décoder 10 30 may be configured to décodé ail of the syntax éléments palette_escape_val within the palette block coding section of a block before decoding context mode encoded syntax éléments of the block.
[0098] In general, video encoder 20 and video décoder 30 may be configured to not interleave the encoding or decoding of palette_escape_val for a block (e.g., a PU or a 15 CU) in bypass mode with syntax éléments that are to be encoded or decoded using context mode for the block, respectively. For example, video encoder 20 and video décoder 30 may be configured to not interleave the encoding or decoding of palette_e3cape_val in bypass mode with syntax element(s) related to palette run type (e.g., CopyAbove mode or index mode) and/or run length (e.g., palette_run_msb_id_plusl) that are to be encoded or decoded using context mode, respectively. As another example, video encoder 20 may be configured to bypass encode ail instances of the palette_escape_val syntax element for a block before context encoding a syntax element that requires context mode. Similarly, video décoder 30 may be configured to bypass décodé ail instances of the palette_escapc_val syntax element of a block (e.g., a PU or a CU) before context decoding a syntax element that requires context mode of the block [0099] Video encoder 20 and video décoder 30 may also respectively encode and décodé a value representing the number of occurrences of palette_escape_val for a block. Video encoder 20 and video décoder 30 may use the value representing the number of occurrences of palette_escape_val to respectively encode or décodé each of the syntax éléments palette_escape_va! for the block. The techniques described in this disclosure may reduce the dynamic range of palette_index_idc for a block, which may resuit in improved coding efficiency.
[0100J The techniques, aspects, and/or examples described herein may be utilized in conjunction with one another in any combination or separately from one another. For instance, video encoder 20 and video décoder 30 may be configured to perform any one or any suitable combination of one or more of the techniques, aspects, and/or examples 5 described herein.
[0101] In some exemples, to improve CABAC throughput, a video coder (e.g., video encoder 20) may be configured to group ait of the occurrences of the syntax element palettejndexjdc as described above. For example, the video coder (e.g., video encoder 20) may be configured to group ait of the occurrences of the syntax element palettejndexjdc in the current block (e.g., a PU or a CU) at the front of the index coding section for the current block. Similarly, a video décoder (e.g., video décoder 30) may be configured to décodé ail of the syntax éléments palettejndexjdc as described above. FIG. 7 illustrâtes one example where video encoder 20 may be configured to group ali of the occurrences of the syntax element palettejndexjdc in the current block (e.g., a CU) at, for example, the front of the index coding block relative to R. Joshl and J. Xu, “High efficient video coding (HEVC) screen content coding: Draft 2,” JCTVC-S1005, Section 7.3.3.8. This aspect of the disclosure is referred to as Aspect 1. Specifically, FIG. 7 illustrâtes an example of video encoder 20 relocatîng an instance of the syntax element palette_index_idc to the front of the index coding block (which may also be referred to as the palette block coding section or the front of the index coding block). By relocatîng the illustrated instance ofthe syntax element palettejndexjdc, video encoder 20 may be configured to improve CABAC throughput by coding ali instances of the syntax element palettejndexjdc using bypass mode and switching over to context mode to code palette information occurring after ail instances of the syntax element palettejndexjdc in the index coding block are bypass mode encoded.
[0102] According to the disclosure of JCTVC-S1005, one instance of palettejndexjdc would be coded in bypass mode, then one instance of a syntax element related to palette run type and one instance of palette_nin_msbjd_plusl would be coded in context mode, and the process would repeat while (scanPos < nCbS · 30 nCbS), meaning that the video encoder would switch back and forth between bypass mode coding and context mode coding because the syntax éléments to be coded using bypass mode are not grouped together. This is depicted in FIG. 7 with the ellipse immediately below the while loop of “while(scanPos<nCbS * nCbS)” (I.e., the ellipse excludes the information showing that a syntax element related to palette run type is
encoded using context mode), the box surrounding the if-statement with the conséquent of the palettejndexjdc syntax element being under the while loop of “whi!e(scanPos<nCbS · nCbS),” and the subséquent pseudo-code. However, as described above, FIG. 7 also depicts Aspect 1 of this disclosure, which is the grouping (which may also be referred to as the re-location) of one or more instances of the syntax element palettejndexjdc to, for example, the front of the index coding block. By relocating one or more syntax éléments (e.g., or other palette information) to be encoded using bypass mode, a video encoder (e.g., video encoder 20) may increase the throughput of entropy coding by reducing the number of times the video encoder or o video décoder must switch between bypass mode encoding and context mode encoding. Similarly, by re-locating one or more syntax éléments în such a manner, the throughput of a video décoder (e.g., video décoder 30) may increase because the number of times the video décoder must switch between bypass mode decoding and context mode decoding is reduced. In some examples ofthe techniques described in this disclosure, ail instances of the palette_lndex_ldc syntax element would be coded in bypass mode before an instance of pa!ettê_run_msb_id_plusl would be coded in context mode. [0103] In some examples, video encoder 20 may be configured to signal the number of occurrences (e.g., instances) ofthe syntax element palette_Index_idc using a syntax element named, for example, num_palettejndex. For example, video encoder 20 may signal a value for num_palettejndex in a bitstream, where the value Is représentative of the number of occurrences ofthe syntax element palette_index_ldc. In some examples, video encoder 20 may be configured to not signal an index value as palettejndexjdc. In such examples, video décoder 30 may be configured to infer the index value. For example, an occurrence of palette_lndex_idc may be counted în num_palette_index, which may be equal to the number of times a run type (e.g., COPY_INDEX_MODE) occurs În a particular block. Even when a run type (e.g., COPY_INDEX_MODE) is inferred or palettejndexjdc is inferred, it still counts towards num_palettejndex. As used herein, reference to a number of indices parsed, decoded, or remaining to be decoded may, in some examples, refer to the number of
COPY_INDEX_MODE irrespective of whether the mode or the index is inferred. Video décoder 30 may be configured to détermine the number of occurrences (e.g., instances) of syntax element palettejndexjdc by, for example, decoding an encoded value corresponding to the num_palettejndex syntax element from a bitstream. This aspect of the disclosure is referred to as Aspect 2. Video encoder 20 and video décoder
may be configured to implement Aspect l with Aspect 2 or without Aspect 2. Syntax wîse, Aspect 2 may, according to some examples, be defined as:
indices Îdc codîng() {
num palette lndex ae(v)
for (i 0; i < num palette lndex; I++)
palettejndexjdc ae(v)
1
[0104] In some examples, video encoder 20 and video décoder 30 may be configured to implement (e.g., by enabling) Aspects 1 and 2 only when the variable indexMax is greater than 1. This aspect of the disclosure is referred to as Aspect 3. The variable indexMax may specify the number of distinct values that a palette index has for the current coding unit. In some examples, indexMax may refer to the quantity of (palette size + palette_escape_val_present_fiag).
[0105] In some examples. Aspects 1 and 2 may be disabled when : (a) there is no escape pixel (i.e. palette_escape_val_present_flag = = 0) in the current block and the palette size is less than 2; or (b) there may be at least one escape pixel (i.e. palette_escape_val_present_flag = = 1) in the current block and the palette size is equal to 0. In other examples, video encoder 20 and video décoder 30 may be configured to implement (e.g., by enabling) Aspects 1 and 2 only when the variable indexMax is greater than 2. Similarly, in examples where indexMax is equal to (palette size + palette_escape_val_present_flag), Aspects 1 and 2 may be enabled (e.g., implemented) when indexMax is greater than 1. For example, if palette size is 0 and palette_escape_val_present_flag is 1, ail the pixels in the block are escape pixels; and, as such, the indices are already known. As another example, if palette_escape_val_present_flag is 0 and palette size is 1, again, each pixel has an index 0; and, as such, no signaling of indices may be necessary.
[0106] In some examples, video encoder 20 may be configured to implement Aspects 1 and 2 such that the last occurrence (e.g., instance) of the syntax element palette_run_type_flag[ xC ][ yC ] is sîgnaled by video encoder 20 at the front of the palette index block coding section. This aspect of the disclosure is referred to as Aspect 4. Specîfically, the syntax table may be updated by, according to some example, adding a new syntax element palettejast_run_type_flag as follows:
indicesJdc codîng() {
num pa1ette index ae(v)
for (i “ 0; 1 < num palette index; i++)
palettejndexjdc ae(v)
palette lajt nin type flag ae(v)
1
[0107] Video décoder 30 may be configured to détermine the last occurrence (e.g., instance) ofthe syntax element palette_nin_type_flag[ xC ][ yC ] by, for example, decoding an encoded palette_last_run_type_flag syntax element from a bitstream.
The syntax element of palette_last_run_type_flag may be bypass mode coded or context mode coded in, for example, CABAC. In examples where the palette_last_run_type_flag syntax element is context mode coded, the palette_last_run_type_flag syntax element may share the same context(s) with palette_run_type_flag[ xC ][ yC ], or the palette_last_nin_type_ilag syntax element may hâve its own context(s) that are independent from the context(s) of palette_run_type_flag[ xC ][ yC ].
[0108] In some examples, video décoder 30 may be configured to décodé the syntax element palette_index_idc such that the dynamic range adjustment process is disabled for the first occurrence (e.g., instance) ofthe palette_index_idc syntax element. Thîs aspect of the disclosure is referred to as Aspect 5. Specifically, a process very similar to the adjustedlndexMax variable’s dérivation procedure specified in JCTVC-SI005 Section 7.4.9.6 is used. For comparison purposes, JCTVC-S1005 describes that the variable adjustedlndexMax may be derived as follows:
adjustedlndexMax = indexMax if( scanPos > 0 ) adjustedlndexMax - = 1 [0109] However, according to Aspect 5 of this disclosure, the variable adjustlndexMax may be derived as set forth below. For example, for each block, a variable isFirstlndex is initialized to 1 before parsing. In some examples, the variable adjustedlndexMax may be derived as follows:
adjustedlndexMax = indexMax palette_index_idc
Γ
i f( isFirstlndex ) { adjustedlndexMax - = isFirstlndex isFirstlndex = 0 )
[0110] In some examples, video décoder 30 may be confîgured to check one or more conditions before parsing and decodîng the paletteRun. This aspect of the disclosure îs referred to as Aspect 6. The variable paletteRun may specify the number of consecutive locations minus I with the same palette index as the position in the above row when 10 palette_run_type_flag is equal to COPY_ABOVE_MODE or specify the number of consecutive locations minus 1 with the same palette index when palette_run_type_flag is equal to COPY_INDEX_MODE, as disclosed by JCTVC-S1005, for example.
[0111] Referring to the one or more conditions that video décoder 30 may be confîgured to check, if video décoder 30 détermines that one or more of the conditions are satîsfied, 15 video décoder 30 may be confîgured to bypass the parsîng and decodîng process for the syntax cléments related to the current paletteRun (i.e. palette_run_msb_id_plusl and palette_run_refïnement_bits). In such an cxampie, video décoder 30 may be confîgured to implicitly dérivé the current paletteRun as running to the end of the current block, i.e., equal to maxPaletteRun. The list of one or more conditions relating 20 to Aspect 6 include: (i) the number of parsed/decoded palette_index_ldc syntax éléments equal to num_palette_index; or, altematively, a variable palettelndicesLeft may be defîned that equals num_palette_index minus the number of indices received, and with such a définition, this condition may be stated as palettelndicesLeft is equal to zéro; and/or (ii) the current palette run type palette_run_type_flag[ xC ][ yC ] equals to 25 the last palette run type palette_last_mn_type_flag.
[0112] In some examples, if conditions (i) and (ii) set forth above for Aspect 6 are not satîsfîed simultaneously, video encoder 20 may be confîgured to code the palette run length into the bitstream. This aspect ofthe disclosure is referred to as Aspect 7. In other examples, if conditions (i) and (ii) set forth above for Aspect 6 are not satîsfîed 30 simultaneously, video encoder 20 may be confîgured to code the palette run length into the bitstream. According to the current draft spécification JCTVC-S1005, a parameter specifying the maximum achîevable run length is requîred as input, where the parameter is equal to maxPaletteRun = nCbS * nCbS - scanPos - 1. According to this disclosure, however, video encoder 20 may be confîgured to reduce the parameter specifying the 35 maximum achîevable run length to maxPaletteRun = nCbS · nCbS - scanPos -1 —
palettelndicesLeft to improve coding efficiency. As used herein, nCbS spécifiés the size ofthe current block.
[0113] In some examples, a normative constraint may be imposed on video encoder 20 requiring that it never signais a palette with unused entries if a block is not in palette share mode (i.e., pa!ette_shareJlag[xO][yO] = = 0). Thîs aspect ofthe disclosure is referred to as Aspect 8.
[0114] In some examples, for palette mode not using palette-share, video décoder 30 may be configured to bypass the decoding ofthe current occurrence (e.g., instance) of the syntax element palettejndexjdc when one or more ofthe following conditions are satisfied: condition 1 where Dum_palette_Index equals indexMax, and condition 2 where palettelndicesLeft = = 1. In such examples, video décoder 30 may be configured to împlicitly dérivé the value for the current occurrence of the syntax element palettejndexjdc as an index that is in the palette, but has yet to appear in the index map during the decoding process (e.g., has not appeared in the index map up to this point in the decoding process). This aspect ofthe disclosure is referred to as Aspect 9. [0115] Video décoder 30 may be configured to dérivé the value for the current occurrence of the syntax element palettejndexjdc as set forth above for Aspect 9 because condition l requires that every index between 0 and (indexMax -1), inclusively, be signaled and only be signaled once. Therefore, after the first (indexMax
-1) index values are signaled, video décoder 30 may be configured to dérivé the last index value as the number between 0 and (indexMax - 1), which has yet to appear during the decoding process for the current index map.
[0116] In some examples, video décoder 30 may be configured to bypass the decoding ofthe current occurrence (e.g., instance) ofthe syntax element palette_runjypejlag[ xC ][ yC ] when one or both of the following conditions are satisfied: condition 1 where palettelndicesLeft equals 0, and condition 2 where the current pixel is at the last position of the block in scanning order. In such examples, video décoder 30 may be configured to împlicitly dérivé the value for the current occurrence of the syntax element pa!ette_runjypejlag[ xC ][ yC ]. For example, when condition 1 is satisfied, palette_ninjypejlag[ xC ][ yC ] video décoder 30 may be configured to dérivé the value for the current occurrence of the syntax element palette_runjypejlag[ xC ][ yC ] as COPY_ABOVE_MODE. As another example, when condition 1 is satisfied, palette_runjypejlag[ xC ][ yC ] video décoder 30 may be configured to dérivé the value for the current occurrence of the syntax element
palette_run_type_flag[ xC ][ yC ] as COPY_INDEX_MODE if palettelndicesLeft > 0, and as COPY_ABOVE_MODE if palettelndicesLeft = 0. This aspect of the disclosure is referred to as Aspect 10.
[0117] As described herein, video encoder 20 and video décoder 30 may be configured to détermine when a condition is satisfied. For example, with respect to Aspect 10, video décoder 30 may be configured to détermine whether condition 1 is satisfied. Similarly, video décoder 30 may be configured to détermine whether condition 2 is satisfied. In response to determining that condition 1 or condition 2 is satisfied, video décoder 30 may be configured to dérivé the value for the current occurrence of the syntax element palette_run_type_flag[ xC ][ yC ] as set forth above.
[0118] In some exemples, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé the num_palette_index syntax element using any golomb code family. For example, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé the num_palette_index syntax element using, for example, Golomb Rice code, exponentiel Golomb code, Truncated Rice code, Unary code, or a concaténation of Golomb Rice and exponentiel Golomb code. This aspect of the disclosure is referred to as Aspect 11.
[0119] In other examples, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé the num_palctte_index syntax element using any truncated version of any golomb code family. For example, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé the num_palette_lndex syntax element using, for example, truncated Golomb Rice code, truncated Exponential Golomb code, truncated Truncated Rice code, truncated Unary code, or a concaténation of truncated Rice code and exponential Golomb code such as the code used to code coeff_absjevel_remaining syntax éléments. This aspect ofthe disclosure is referred to as Aspect 12.
[0120] In some examples, any golomb parameters relating to Aspects 11 or 12 dépend upon the CU size, indexMax, palette size, and/or palette_escape_val_present_flag. Such dependency may be expressed as équations or a lookup table. In some examples, 30 video encoder 20 may be configured to signal the lookup table or the parameters in the équations such that they are received by video décoder 30 in, for example, the SPS/PPS/Slice header. Altemativeïy or addîtionally, the parameters may be adaptively updated on a block-by-block basis. This aspect of the disclosure is referred to as Aspect 13. In some examples, the golomb parameter cRiceParam may dépend on
indexMax, palette size, and/or palette_escape_val_present_flag. The golomb parameter cRiceParam may change from block to block.
[0121] In some examples, video encoder 20 may be configured to predictively encode num_palette_index by signaling the différence between the value of num_palette_Index and an offset value, which may be expressed by a syntax element named, for example, numPalettelndexCoded. This aspect of the disclosure is referred to as Aspect 14. For example, video encoder 20 may be configured to predictively encode num_palette_Index by signaling a value for numPalettelndexCoded, where numPalettelndexCoded = numjpalette_Index - IndexOfïsetValue. Similarly, video décoder 30 may be configured to predictively décodé num_palette_index by, for example, determining a value for numPalettelndexCoded from a bitstream. Since numPalettelndexCoded = num_palette_index - IndexOffsetValue, video décoder 30 may be configured to détermine the value of num_palette_index based on the determined value of numPalettelndexCoded and the value of IndexOffsetValue.
[0122] In some examples, the variable IndexOffsetValue may be a constant. For example, IndexOffsetValue may equal a constant value of X for palette share mode or may equal a constant value of Y for non-palette share mode, where X and Y are integers. In some examples, X and Y may be the same (e.g., X equals Y such as equalîng 1). In other examples, X and Y may be different (e.g., X does not equal Y).
For example, IndexOffsetValue may equal 9 when palette share mode is used, and IndexOffsetValue may equal 33 when non-share mode is used. In some examples, the variable IndexOffsetValue may dépend on the syntax element palette_share_flag[ xO ][ yO ]. In other examples, the variable IndexOffsetValue may dépend on the variable indexMax. For example, IndexOffsetValue may equal indexMax. In some examples, video encoder 20 may be configured to signal IndexOffsetValue in the SPS/PPS/Slîce header. Altematively or additionaliy, the variable IndexOffsetValue may be adaptîvely updated block-by-block, meanîng that the value corresponding to the variable IndexOffsetValue may be adaptively updated blockby-block.
[0123] In some examples, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé numPalettelndexCoded may be coded using any golomb code family or any truncated golomb family, such as a concaténation of Golomb Rice and exponentiel Golomb code. For example, when IndexOffsetValue equals 1, numPalettelndexCoded equals num_palette_index - I.
[0124] In some examples, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé numPalettelndexCoded using any golomb code family. For example, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé numPalettelndexCoded using, for example, Golomb Rice code, exponential Golomb code, Truncated Rice code, Unary code, or a concaténation of
Golomb Rice and exponential Golomb code.
[0125] In other examples, video encoder 20 and video décoder 30 may be configured to respectively encode or décodé numPalettelndexCoded using any truncated version of any golomb code family. For example, video encoder 20 and video décoder 30 may be 10 configured to respectively encode or décodé numPalettelndexCoded using, for example, truncated Golomb Rice code, truncated Exponential Golomb code, truncated Truncated Rice code, truncated Unary code, or a concaténation of truncated Rice code and exponential Golomb code such as the code used to code coeff_absjevel_remaining syntax éléments.
[0126] To code numPalettelndexCoded, video encoder 20 may be configured to détermine the sign of numPalettelndexCoded. Video encoder 20 may be configured to signal a fiag indicating whether the value of numPalettelndexCoded is négative or not (e.g., whether the determined sign is positive or négative). This aspect of the disclosure is referred to as Aspect 15. In some examples, video encoder 20 may be configured to signal the fiag, and then signal the value ofnumPalettelndexCoded. In other examples, video encoder 20 may be configured to signal the value of numPalettelndexCoded, and then signal the fiag. Video encoder 20 may be configured to encode the fiag using bypass mode or context mode. If context coded, the contexts may dépend on CU size, îndexMax, palette size, and/or palette_escape_val_present_flag.
[0127] As described above, video encoder 20 may be configured to détermine the sign ofnumPalettelndexCoded according to some examples. Ifthe determined sign of numPalettelndexCoded is négative, video encoder 20 may be configured to encode the value of(1 - numPalettelndexCoded) into the bitstream. Ifthe determined sign of numPalettelndexCoded is positive, video encoder 20 may be configured to encode the value of numPalettelndexCoded into the bitsteam. Video encoder 20 may be configured to encode the value of (1 - numPalettelndexCoded) or the value numPalettelndexCoded) using diffemet golomb code parameters depending on, for example, the sign of numPalettelndexCoded, CU size, indexMax, palette size, and/or palette_escape_val_present_flag.
[0128] In some examples, video encoder 20 may be configured to represent the négative parts of numPalettelndexCoded using a mapping operation, which may be in addition to or may be an alternative to Aspect 15. This aspect of the disclosure is referred to as Aspect 16. For example, a mapping interval may be introduced and defined as a variable maplnterval. Video encoder 20 may be configured to, using variable maplnterval, map négative values of numPalettelndexCoded to equally spaced positive valuesequal to: maplnterval x (-numPalettelndexCoded)-1. Thecorresponding positive value of numPalettelndexCoded may be shifted accordingly to accommodate the positions taken by the mapped négative values.
[0129] For example, if maplnterval = 2, and numPalettelndexCoded is chosen from {-3,
-2, -1,0,1,2,3], then the mapping can be illustrated as in Table I below. In this example, video encoder 20 may be configured to encode the values of numPalettelndexCode using the mapped values in Table I. For example, video encoder 20 may be configured to entropy encode the mapped values into binary form.
Table I. Codeword Mapping Example
numPalettelndexCoded mapped value
-3 5
-2 3
-1 1
0 0
1 2
2 4
3 6
[0130] In some examples, video encoder 20 may be configured to represent the négative parts of numPalettelndexCoded using a mapping operation as descrîbed with respect to Aspect 16. Video encoder 20 may also be configured to remove one or more redundancies that may be présent when implementing Aspect 16. This aspect of the disclosure îs referred to as Aspect 17. For example, the number of négative values of numPalettelndexCoded may range from/4=(-1, -2,.,., -IndexOfîsetValue + 1}. As another example, the number of négative values of numPalettelndexCode may range from /1=(-1, -2,..., -IndexOffsetValue + 1, IndexOffsetValue}. In either ofthese examples, the mapped value only needs to reserve (IndexOffsetValue -1 ) or IndexOffsetValue positions for the négative numPalettelndexCoded values. For example, if maplnterval = 2, and numPalettelndexCoded is chosen form (-3, -2,-1,0,1,
2,3,4,5,6,7,8}, the mapping is illustrated in Table II below. In this example, video encoder 20 may be configured to encode the values of numPalettelndexCode using the mapped values in Table Π. For example, video encoder 20 may be configured to entropy encode the mapped values into binary form.
Table II. Codeword Mapping Example
numPalettelndexCoded mapped value
-3 5
-2 3
-1 1
0 0
1 2
2 4
3 6
4 7
5 8
6 9
7 10
8 11
[0131] As shown in Table II above, video encoder 20 may be configured to encode the mapped values corresponding to the values of numPalettelndexCode such that négative and positive values of numPalettelndexCode are not interleaved after a certain value. For example, in the example of Table II above, there is no interleaving of positive and négative values of numPalettelndexCoded via the mapped values beginnîng with value 3 of numPalettelndexCoded (i.e., positive values 3-8 of numPalettelndexCoded map to mapped values 6-11).
[0132] As described above, video encoder 20 may also be configured to remove one or more redundancies that may be présent when împlementing Aspect 16. Another redundancy example different from the redundancy example described above includes: As num_palette_index is upper bounded by the total number of pixels in the current block, numPalettelndexCoded is also upper bounded. Therefore, after allocating the positions for ail ofthe possibilities ofthe positive codeword, the négative values can be mapped to the following positions without interleaving. For example, if maplnterval = 2, and numPalettelndexCoded is chosen form {-5, -4, -3, -2, -1,0,1,2,3), the mapping Es illustrated in Table III below. In this example, video encoder 20 may be configured to encode the values of numPalettelndexCode using the mapped values in Table III. For
example, video encoder 20 may be configured to entropy encode the mapped values into binary form.
Table III. Codeword Mapping Example
numPalettelndexCoded mapped value
-5 8
-4 7
-3 5
-2 3
-1 1
0 0
1 2
2 4
3 6
[0133] As shown in Table III above, video encoder 20 may be configured to encode the mapped values corresponding to the values of numPalettelndexCode such that négative and positive values of numPalettelndexCode are not interleaved after a certain value. For exemple, in the example of Table III above, there is no interleaving of positive and 10 négative values of numPalettelndexCoded via the mapped values beginning with value of numPalettelndexCoded (i.e., négative values -4 and -5 of numPalettelndexCoded map to mapped values 7 and 8).
[0134] In some examples, video encoder 20 may be configured to further découplé the relationship between palette index and palette run. This aspect ofthe disclosure is 15 referred to as Aspect 18. For example, instead of allowing the palette run coding’s contexts dépend on parsed or decoded indices, video encoder 20 may be configured to make the palette run coding’s contexts dépend on the previous palette run length or dépend on the previous run’s palette_run_msb_ld_plusl, indexMax, and/or CU size. [0135] In some examples, to further group bypass bins, video encoder 20 may be 20 configured to signal the number of escape indices in a palette block as well as escape values before signaling the palette run type (i.e. palette_run_type_flag[ xC ][ yC ]) as follows. This aspect ofthe disclosure is referred to as Aspect 19. Italicized portions illustrate changes relative to previous version(s) of JCT-VC S1005, and bolded portions as well as the Mae(v)” in the right column indicate the signaling of a syntax element.
...
if( currentPaletteSize !” 0 )
palette escape va1 present flag ae(v)
if( palette jtscape valjtresentJlag 11 (IndexMax > 0))
escape idc codingO
if( palette_escape_val_prescnt_flag ) {
if( cu_qp_delta_enabled_flag && IIsCuQpDeltaCoded ) {
cu_qp_delta_palette_abs ae(v)
if( cu_qp_delta_palette_abs )
cu_qp_delta_palette_slgn_flag ae(v)
}
if( cujchroma_qp_offset_enabled_flag && HsCuChromaQpOflfsetCoded ) {
cu_chroma_qp_palette_offsei_flag ae(v)
if( cu_chroma_qp_ofiset_flag && chrorna_qp_offsetjistjen_minusl >0)
cu_chroma_qp_palette_ofTset_idx ae(v)
}
}
ifl indexMax > 0)
pa!ette transpcee flag ae(v)
scanPos ” 0
whilef scanPos < nCbS * nCbS ) {
...
[0136] In the example above, escape_idc_codingO consiste of signaling the number of escape indices and escape values corresponding to each escape index. The number of escape indices in a palette block may not be signaled if palette_escape_val_present_flag is 0 or if indexMax is equal to 0. In the former case, the number of escape indices is inferred to be 0 and no escape values are signaled. In the latter case of indexMax equal to 0, the number of escape indices is inferred to be equal to the block size when palette_escape_val_present_flag equals l and escape values are signaled, or the number of escape indices is inferred to be zéro when palette_escape_val_present_flag equals 0.
[0137] In some examples, video encoder 20 may be configured to signal the number of escape indices using golomb code family. This aspect ofthe disclosure is referred to as
Aspect 20. For example, video encoder 20 may be configured to signa! the number of escape indices using, for example, Golomb Rice code, exponential Golomb code, Truncated Rice code, Unary code, or a concaténation of Golomb Rice and exponential Golomb code. Truncated versions of the above codes may be used with maximum set 5 equal to the block size.
[0138] In some examples, it is proposed to enforce a normative restriction on palette_escape_val_present_flag that when palette_escape_val_present_flag equals to 0, there is no escape pixel in the current block. This aspect of the dîsclosure is referred to as Aspect 21. When palette_escape_valjpresent_flag equals to 1, there is 10 at least one escape pixel in the current block With this restriction, in escape_idç_coding0, the number of escape indices minus 1 can be coded înstead of number of escape indices to improve coding efïîciency. In that case, the maximum value for truncated golomb code family may be adjusted to (blockSize-1), accordingly. [0139] In some examples, when the number ofescape indices is signaled before coding 15 the indices map block and when ail of the escape indices hâve already been coded, then indexMax may be reduced by 1. Furthermore, if indexMax becomes 1, the index, run and mode coding is terminated since the indices for ail the remaining samples may be inferred. This aspect of the dîsclosure is referred to as Aspect 22. As one example of Aspect 22, assume palette size equals 1 and pa!ette_escape_val_present_flag equals 1.
Ordînarily, the possible index values are 0 and 1, where 1 is used for escape samp!e(s). Under Aspect 22, video encoder 20 may be configured to signal the number of escape values/samples. Then, when the indices are being signaled and the last escape value/sample is encountered, both video encoder 20 and/or video décoder 30 may be configured to infer (e.g., détermine) that there are no more escape values/samples. As such, video encoder 20 and/or video décoder 30 may be configured to détermine that the only index value that can occur from the last escape value/sample to the end of the block is 0, meaning that video encoder 20 may be configured to not signal the mode, index value, and/or run value from the last escape value/sample to the end ofthe block. [0140] In some examples, escape_îdc_codîngO is used in combination with indîces_idc_coding0· This aspect of the dîsclosure is referred to as Aspect 23. In one example, the number of escape indices may be signaled before signaling the number of indices. In this case, only the number ofnon-escape indices need to be signaled in indices_idc_codingQ. In one example, the number ofescape indices may be signaled
after signaling the number of indices. In this case, the maximum value for truncated golomb code family may be adjusted to num_palette_index, accordingly.
[0141] Video encoder 20 and/or video décoder 30 may be configured to operate according to the techniques described in this disclosure. In general, video encoder 20 5 and/or video décoder 30 may be configured to détermine that a current block is coded in palette mode, bypass mode code a pluralîty of instances of a first syntax element for reconstructing the current block, and after bypass mode code a pluralîty of instance of the first syntax element, context mode decoding a pluralîty of instances of a second syntax element for reconstructing the current block.
[0142] FIG. 2 is a block diagram illustratîng an example video encoder 20 that may implement the techniques ofthis disclosure. FIG. 2 îs provided for purposes of explanation and should not be considered Iimîting ofthe techniques as broadly exemplified and described in this disclosure. For purposes of explanation, this disclosure describes video encoder 20 in the context of HEVC coding and, for example, the SCC extension of HEVC. However, the techniques of this disclosure may be applicable to other coding standards or methods.
[0143] Video encoder 20 represents an example of a device that may be configured to perform techniques for palette-based coding and entropy coding (e.g., CABAC) in accordance with various examples described in this disclosure.
[0144] In the example of FIG. 2, video encoder 20 includes a block encoding unit 100, video data memory 101, a residual génération unit 102, a transform processing unit 104, a quantization unit 106, an inverse quantization unit 108, an inverse transform processing unît 110, a reconstruction unit 112, a filter unit 114, a decoded picture buffer 116, and an entropy encoding unit 118. Block encoding unit 100 includes an Inter25 prédiction processing unit 120 and an intra-prediction processing unit 126. Interprediction processing unit 120 includes a motion estimation unit and a motion compensation unit (not shown). Video encoder 20 also includes a palette-based encoding unit 122 configured to perform various aspects ofthe palette-based coding techniques described in this disclosure. In other examples, video encoder 20 may include more, fewer, or different functional components.
[0145] Video data memory 101 may store video data to be encoded by the components of video encoder 20. The video data stored in video data memory 101 may be obtained, for example, from video source 18. Decoded picture buffer 116 may be a reference picture memory that stores reference video data for use in encoding video data by video
encoder 20, e.g., in intra- or inter-coding modes. Video data memory 101 and decoded picture bufTer 116 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), résistive RAM (RRAM), or other types of memory 5 devices. Video data memory 101 and decoded picture buffer 116 may be provided by the same memory device or separate memory devices. In various examples, video data memory 101 may be on-chip with other components of video encoder 20, or off-chip relative to those components.
[0146] Video encoder 20 may receive video data. Video encoder 20 may encode each 10 CTU in a slice of a picture of the video data. Each of the CTUs may be associated with equally-sized luma coding tree blocks (CTBs) and corresponding CTBs of the picture.
As part of encoding a CTU, block encoding unit 100 may perform quad-tree partitioning to divide the CTBs ofthe CTU into progressively-smaller blocks. The smaller block may be coding blocks of CUs. For exampie, block encoding unit 100 may partition a
CTB associated with a CTU into four equally-sized sub-blocks, partition one or more of the sub-blocks into four equally-sized sub-sub-blocks, and so on.
[0147] Video encoder 20 may encode CUs of a CTU to generate encoded représentations of the CUs (i.e., coded CUs). As part of encoding a CU, block encoding unit 100 may partition the coding blocks associated with the CU among one or more
PUs ofthe CU. Thus, each PU may be associated with a luma prédiction block and corresponding chroma prédiction blocks. Video encoder 20 and video décoder 30 may support PUs having various sîzes. As indîcated above, the size of a CU may refer to the size of the luma coding block of the CU and the size of a PU may refer to the size of a luma prédiction block of the PU. Assuming that the size ofa particular CU is 2Nx2N, video encoder 20 and vîdeo décoder 30 may support PU sîzes of 2Nx2N or NxN for intra prédiction, and symmetric PU sîzes of 2Nx2N, 2NxN, Nx2N, NxN, or simîlar for inter prédiction. Video encoder 20 and vîdeo décoder 30 may also support asymmetric partitioning for PU sîzes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prédiction. [0148] Inter-prediction processing unît 120 may generate prédictive data for a PU by performing inter prédiction on each PU of a CU. The prédictive data for the PU may include prédictive blocks of the PU and motion information for the PU. Inter-prediction unit 121 may perform different operations for a PU of a CU depending on whether the PU is in an I slice, a P slice, or a B slice. In an I slice, aü PUs are intra predicted. Hence, ifthe PU is în an I slice, inter-prediction unit 121 does not perform inter
prédiction on the PU. Thus, for blocks encoded in I-mode, the predicted block is formed using spatial prédiction from prevîously-en coded neighboring blocks within the same trame.
[0149] If a PU is in a P slice, the motion estimation unit of inter-prediction processing unit 120 may search the reference pictures in a list of reference pictures (e.g., “RefPicListO”) for a reference région for the PU. The reference région for the PU may be a région, within a reference picture, that contains sample blocks that most closely corresponds to the sample blocks ofthe PU. The motion estimation unit of interprediction processing unit 120 may generate a reference index that indicates a position in RefPicListO of the reference picture containing the reference région for the PU. In addition, the motion estimation unit may generate an MV that indicates a spatial displacement between a coding block ofthe PU and a reference location associated with the reference région. For instance, the MV may be a two-dimensional vector that provides an offset from the coordînates in the current decoded picture to coordinates in 15 a reference picture. The motion estimation unît may output the reference index and the MV as the motion information of the PU. The motion compensation unit of interprediction processing unît 120 may generate the prédictive blocks ofthe PU based on actual or interpolated samples at the reference location indicated by the motion vector of the PU.
[0150] If a PU is in a B slice, the motion estimation unit may perform uni-prédiction or bi-prediction for the PU. To perform uni-predictîon for the PU, the motion estimation unit may search the reference pictures of RefPicListO or a second reference picture lîst (“RefPicListl”) for a reference région for the PU. The motion estimation unît may output, as the motion information ofthe PU, a référencé index that indicates a position in RefPicListO or RefPicListl ofthe reference picture that contains the reference région, an MV that indicates a spatial displacement between a prédiction block ofthe PU and a reference location associated with the reference région, and one or more prédiction direction indicators that indicate whether the reference picture is in RefPicListO or RefPicListl. The motion compensation unit of inter-prediction processing unit 120 may generate the prédictive blocks of the PU based at least in part on actual or interpolated samples at the reference région indicated by the motion vector ofthe PU. [0151] To perform bi-directional inter prédiction for a PU, the motion estimation unit may search the reference pictures in RefPicListO for a reference région for the PU and may also search the reference pictures in RefPicListl for another reference région for the PU. The motion estimation unit may generate reference picture indexes that indicate positions in RefPicListO and RefPicLîstl ofthe reference pictures thatcontain the reference régions. In addition, the motion estimation unit may generate MVs that indicate spatial displacements between the reference location associated with the reference régions and a sample block of the PU. The motion information of the PU may include the reference indexes and the MVs of the PU. The motion compensation unît may generate the prédictive blocks of the PU based at least in part on actual or interpolated samples at the reference régions indicated by the motion vectors ofthe PU. [0152] In accordance with various examples of this disclosure, video encoder 20 may be 10 configured to perform palette-based coding. With respect to the HEVC framework, as an example, the palette-based coding techniques may be configured to be used at the CU level. In other examples, the palette-based video coding techniques may be configured to be used at the PU level. In other examples, the palette-based coding techniques may be configured to be used at the sub-prediction unit (sub-PU) level (e.g., a sub-block ofa 15 prédiction unit). Accordingly, ail of the disclosed processes described herein (throughout this disclosure) în the context of a CU level may, additionally or altematively, apply to a PU level or a sub-PU level. However, these HEVC-based examples should not be considered a restriction or limitation ofthe palette-based video coding techniques described herein, as such techniques may be applied to work independently or as part of other existing or yet to be developed systems/standards. In these cases, the unit for palette coding can be square blocks, rectangular blocks or even régions of non-rectangular shape.
[0153] Palette-based encoding unit 122, for example, may perform palette-based decoding when a palette-based encoding mode is selected, e.g., for a CU or PU. For 25 example, palette-based encoding unit 122 may be configured to generate a palette having entries indicating pixel values, select pixel values în a palette to represent pixel values ofat least some positions ofa block of video data, and signal information associating at least some of the positions of the block of video data with entries in the palette corresponding, respectively, to the selected pixel values. Although various 30 fonctions are described as being performed by palette-based encoding unit 122, some or ail of such fonctions may be performed by other processing units, or a combination of different processing units.
[0154] According to aspects of this disclosure, palette-based encoding unit 122 may be confîgured to perform any combination of the techniques for palette coding described herein.
[0155] Intra-predîction processing unit 126 may generate prédictive data for a PU by performing intra prédiction on the PU. The prédictive data for the PU may include prédictive blocks for the PU and various syntax éléments. Intra-prediction processing unit 126 may perform intra prédiction on PUs in I slices, P slices, and B sliccs. [0156] To perform intra prédiction on a PU, intra-prediction processing unit 126 may use multiple intra prédiction modes to generate multiple sets of prédictive data for the
PU. Intra-prediction processing unit 126 may use samples from sample blocks of neighboring PUs to generate a prédictive block for a PU. The neighboring PUs may be above, above and to the right, above and to the left, or to the left of the PU, assuming a lefl-to-right, top-to-bottom encoding order for PUs, CUs, and CTUs. Intra-prediction processing unit 126 may use various numbers of intra prédiction modes, e.g., 33 directional intra prédiction modes. In some examples, the number of intra prédiction modes may dépend on the size of the région associated with the PU.
[0157] Block encoding unit 100 may select the prédictive data for PUs of a CU from among the prédictive data generated by inter-predictîon processing unît 120 for the PUs or the prédictive data generated by intra-prediction processing unit 126 for the PUs. In 20 some examples, block encoding unit 100 selects the prédictive data for the PUs of the
CU based on rate/distortion metrics of the sets of prédictive data. The prédictive blocks of the selected prédictive data may be referred to herein as the selected prédictive blocks.
[0158] Residual génération unit 102 may generate, based on the luma, Cb and Cr coding 25 block of a CU and the selected prédictive luma, Cb and Cr blocks of the PUs of the CU, a luma, Cb and Cr residual blocks ofthe CU. For instance, residual génération unit 102 may generate the residual blocks of the CU such that each sample in the residual blocks has a value equal to a différence between a sample in a coding block of the CU and a corresponding sample in a corresponding selected prédictive block ofa PU ofthe CU.
[0159] Transform processing unit 104 may perform quad-tree partitioning to partition the residual blocks associated with a CU into transform blocks associated with TUs of the CU. Thus, in some examples, a TU may be associated with a luma transform block and two chroma transform blocks. The sizes and positions ofthe luma and chroma transform blocks of TUs of a CU may or may not be based on the sizes and positions of
prédiction blocks of the PUs of the CU. A quad-tree structure known as a “residual quad-tree” (RQT) may include nodes associated with each of the régions. The TUs of a CU may correspond to leaf nodes ofthe RQT.
[0160] Transform processing unit 104 may generate transform coefficient blocks for each TU of a CU by applying one or more transforms to the transform blocks of the TU.
Transform processing unit 104 may apply various transforms to a transform block associated with a TU. For example, transform processing unît 104 may apply a discrète cosine transform (DCT), a directiona! transform, or a conceptually similar transform to a transform block. In some examples, transform processing unit 104 does not apply 10 transforms to a transform block. In such examples, the transform block may be treated as a transform coefficient block.
[0161] Quantization unit 106 may quantize the transform coefficients in a coefficient block. The quantization process may reduce the bit depth associated with some or ali of the transform coefficients. For example, an n-bit transform coefficient may be rounded 15 down to an m-bit transform coefficient during quantization, where n is greater than m.
Quantization unit 106 may quantize a coefficient block associated with a TU of a CU based on a quantization parameter (QP) value associated with the CU. Video encoder 20 may adjust the degree of quantization applied to the coefficient blocks associated with a CU by adjusting the QP value associated with the CU. Quantization may 20 introduce loss of information, thus quantized transform coefficients may hâve lower précision than the original ones.
[0162] Inverse quantization unit 108 and inverse transform processing unit 110 may apply inverse quantization and inverse transforms to a coefficient block, respectively, to reconstruct a residual block from the coefficient block. Reconstruction unit 112 may 25 add the reconstructed residual block to corresponding samples from one or more prédictive blocks generated by block encoding unit 100 to produce a reconstructed transform block associated with a TU. By reconstructing transform blocks for each TU of a CU în this way, video encoder 20 may reconstruct the coding blocks of the CU. [0163] Filter unit 114 may perform one or more deblocking operations to reduce 30 blockîng artifacts in the coding blocks associated with a CU. Filter unit 114 may perform other filtering operations, including sample adaptive offset (SAO) fi Itering and/or adaptive loop filtering (ALF). Decoded picture buffer 116 may store the reconstructed coding blocks after filter unit 114 performs the one or more deblocking operations on the reconstructed coding blocks. Inter-prediction processing unit 120 may
use a reference picture that contains the reconstructed coding blocks to perform inter prédiction on PUs of other pictures. In addition, intra-prediction processing unit 126 may use reconstructed coding blocks in decoded picture buffer 116 to perform intra prédiction on other PUs in the same picture as the CU.
[0164] Entropy encoding unit 118 may receive data from other functional components of video encoder 20. For example, entropy encoding unit 118 may receive coefficient blocks from quantization unit 106 and may receive syntax éléments from block encoding unit 100. Entropy encoding unit 118 may perform one or more entropy encoding operations on the data to generate entropy-encoded data. For example, entropy encoding unit 118 may perform a context-adaptive coding operation, such as a CABAC operation, context-adaptive variable length coding (CAVLC) operation, a variable-to-variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a Probabilîty Interval Partitioning Entropy (PIPE) coding operation, an Exponential-Golomb encoding operation, or another type of 15 entropy encoding operation on the data. Video encoder 20 may output a bitstream that includes entropy-encoded data generated by entropy encoding unit 118. For instance, the bitstream may include data that represents a RQT for a CU.
[0165] In some examples, residual coding is not performed with palette coding. Accordingly, video encoder 20 may not perform transformation or quantization when 20 coding using a palette coding mode. In addition, video encoder 20 may entropy encode data generated using a palette coding mode separately from residual data.
[0166] According to one or more of the techniques of this disclosure, video encoder 20, and specifîcally palette-based encoding unit 122, may perform palette-based video coding of predicted video blocks. As described above, a palette generated by video encoder 20 may be explicitly encoded and sent to video décoder 30, predicted from previous palette entries, predicted from previous pixel values, or a combination thereof. [0167] In accordance with one or more techniques of this disclosure, video encoder 20 may be configured to détermine that a current block is coded in palette mode, bypass mode encode a plurality of instances of a first syntax element for reconstructing the current block, and after bypass mode encode a plurality of instance of the first syntax element, context mode encode a plurality of instances of a second syntax element for reconstructing the current block, e.g., using a CABAC coding process. Video encoder 20 may be configured to bypass mode encode any two instances of the plurality of instances of the first syntax element, e.g., using a bypass mode of a CABAC coding
process, without interleaving with the context mode encoding of any one instance of the plurality of instances ofthe second syntax element. In one example, the first syntax element comprises one of a palettejndexjdc syntax element or palette_escape_val syntax element, and the second syntax element comprises a palette_run_msbjd_plusl syntax element. Video encoder 20 may be configured to bypass encode the plurality of instances of the first syntax element at a front of an index block coding section for the current block.
[0168] Video encoder 20 may be configured to encode a third syntax element indicating a number of instances of the first syntax element, wherein bypass mode encoding the 10 plurality of instances of the first syntax element comprises bypass mode encoding the plurality of instances ofthe first syntax element based on the third syntax element.
Video encoder 20 may encode the third syntax element using one of a Golomb Rice code, exponential Golomb code, Truncated Rice code, Unary code, a concaténation of Golomb Rice and exponential Golomb code, or a truncated version of any of the 15 previous codes.
[0169] FIG. 3 is a block diagram illustrating an example video décoder 30 that is configured to perform the techniques of this disclosure. FIG. 3 is provided for purposes of explanation and is not limiting on the techniques as broadly exemplîfied and described in this disclosure. For purposes ofexplanation, this disclosure describes 20 video décoder 30 in the context of HEVC cod ing. However, the techniques of this disclosure may be applicable to other coding standards or methods.
[0170] The details of palette coding described above with respect to encoder 20 are not repeated here with respect to décoder 30, but it is understood that décoder 30 may perform the reci procal decoding process relative to any encoding process described 25 herein with respect to encoder 20.
[0171] Video décoder 30 represents an example of a device that may be configured to perform techniques for palette-based coding and entropy coding (e.g., CABAC) in accordance with various examples described in this disclosure.
[0172] In the example of FIG. 3, video décoder 30 includes an entropy decoding unit 30 150, video data memory 151, a block decoding unit 152, an inverse quantization unit
154, an inverse transform processing unit 156, a reconstruction unît 158, a filter unit 160, and a decoded picture buffer 162. Block decoding unit 152 includes a motion compensation unit 164 and an intra-prediction processing unît 166. Video décoder 30 also includes a palette-based decoding unit 165 configured to perform various aspects of
the palette-based coding techniques described in this disclosure. In other examples, video décoder 30 may include more, fewer, or different functional components. [0173] Video data memory 151 may store video data, such as an encoded video bitstream, to be decoded by the components of video décoder 30. The video data stored 5 in video data memory 151 may be obtained, for example, from computer-readable medium 16, e.g., from a local video source, such as a caméra, via wired or wireless network communication of video data, or by accessing physical data storage media. Video data memory 151 may form a coded picture buffer (CPB) that stores encoded vtdeo data from an encoded video bitstream. Decoded picture buffer 162 may be a reference picture memory that stores reference video data for use in decoding video data by video décoder 30, e.g., in intra- or inter-coding modes. Video data memory 151 and decoded picture buffer 162 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), résistive RAM (RRAM), or other types of memory devices. Video data memory 151 and decoded picture buffer 162 may be provided by the same memory device or separate memory devices. In various examples, video data memory 151 may be on-chip with other components of video décoder 30, or off-chip relative to those components.
[0174] A coded picture buffer (CPB), which may be provided by video data memory
151, may receive and store encoded video data (e.g., NAL units) of a bitstream.
Entropy decoding unit 150 may receive encoded video data (e.g., NAL units) from the CPB and parse the NAL units to décodé syntax éléments. Entropy decoding unit 150 may entropy décodé entropy-encoded syntax éléments in the NAL unîts. Block decoding unit 152, inverse quantization unit 154, inverse transform processing unit 156, 25 reconstruction unit 158, and filter unît 160 may generate decoded video data based on the syntax éléments extracted from the bitstream.
[0175] Video décoder 30 may be configured to perform a process generally reciprocal to that of video encoder 20 described herein. Sîmilarly, video encoder 20 may be configured to perform a process generally reciprocal to that of video décoder 30 described herein. For example, disclosure that video décoder 30 may be configured to décodé an encoded syntax element in a bitstream likewise necessarily discloses that video encoder 20 may be configured to encode the syntax element into the bitstream. [0176] As another example, entropy decoding unit 150 may be configured to perform a process generally reciprocal to that of entropy encoding unit 118 described herein.
According to aspects of thîs disclosure, entropy decoding unit 150 may be configured to entropy décodé any code words generated by entropy encoding unit 118. For example, entropy decoding unit 150 may be configured to entropy décodé uniform and nonuniform kth order truncated Exp-Golomb (TEGkj-encoded values, such as a bînary palette prédiction vector and/or a palette map for a CU. As another example, entropy decoding unit 150 may be configured to entropy décodé a kth order Exp-Golomb (EGk) code word, a kth order truncated Exp-Golomb (TEGk) code word, a kth order nonuni form truncated Exp-Golomb (TEGk) code word, or any combination thereof.
[0177] The NAL units of the bitstream may include coded slice NAL units. As part of 10 decoding the bitstream, entropy decoding unit 150 may extract and entropy décodé syntax éléments from the coded slice NAL units. Each ofthe coded slices may include a slice header and slice data. The slice header may contain syntax éléments pertaining to a slice. The syntax éléments in the slice header may include a syntax element that identifies a PPS associated with a picture that contaîns the slice.
[0178] In addition to decoding syntax éléments from the bitstream, video décoder 30 may perform a reconstruction operation on a non-partitioned CU. To perform the reconstruction operation on a non-partitioned CU, video décoder 30 may perform a reconstruction operation on each TU of the CU. By performîng the reconstruction operation for each TU of the CU, video décoder 30 may reconstruct residual blocks of 20 the CU.
[0179] As part of performing a reconstruction operation on a TU of a CU, inverse quantizatîon unît 154 may inverse quantize, i.e., de-quantize, coefficient blocks associated with the TU. Inverse quantizatîon unit 154 may use a QP value associated with the CU of the TU to détermine a degree of quantizatîon and, lîkewise, a degree of 25 inverse quantizatîon for inverse quantizatîon unit 154 to apply. That is, the compression ratio, i.e., the ratio of the number of bits used to represent original sequence and the compressed one, may be controlled by adjustîng the value of the QP used when quantizing transform coefficients. The compression ratio may also dépend on the method of entropy coding emptoyed.
[0180] After inverse quantizatîon unît 154 inverse quantizes a coefficient block, inverse transform processing unit 156 may apply one or more inverse transforms to the coefficient block in order to generate a residual block associated with the TU. For example, inverse transform processing unît 156 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational
transform, an inverse directional transform, or another inverse transform to the coefficient block.
[0181] If a PU is encoded using intra prédiction, intra-prediction processîng unît 166 may perform intra prédiction to generate prédictive blocks for the PU. Intra-prediction processîng unît 166 may use an intra-prediction mode to generate the prédictive luma, Cb and Cr blocks for the PU based on the prédiction blocks of spatially-neighboring PUs. Intra-prediction processîng unit 166 may détermine the intra prédiction mode for the PU based on one or more syntax éléments decoded from the bitstream.
[0182] Block decoding unit 152 may construct a first référencé picture list (RefPicListO) 10 and a second référencé picture list (RefPicList 1 ) based on syntax éléments extracted from the bitstream. Furthermore, if a PU is encoded using inter prédiction, entropy decoding unit 150 may extract motion information for the PU. Motion compensation unit 164 may détermine, based on the motion information ofthe PU, one or more référencé régions for the PU. Motion compensation unit 164 may generate, based on samples blocks at the one or more référencé blocks for the PU, prédictive luma, Cb and Cr blocks for the PU.
[0183] Reconstruction unit 158 may use the luma, Cb and Cr transform blocks associated with TUs of a CU and the prédictive luma, Cb and Cr blocks of the PUs of the CU, l.e., eîther intra-prediction data or inter-prediction data, as applicable, to reconstruct the luma, Cb and Cr coding blocks of the CU. For example, reconstruction unit 158 may add samples ofthe luma, Cb and Cr transform blocks to corresponding samples of the prédictive luma, Cb and Cr blocks to reconstruct the luma, Cb and Cr coding blocks of the CU.
[0184] Filter unit 160 may perform a deblocking operation to reduce blockîng artifacts 25 associated with the luma, Cb and Cr coding blocks of the CU. Video décoder 30 may store the luma, Cb and Cr coding blocks ofthe CU in decoded picture buffer 162. Decoded picture buffer 162 may provide référencé pictures for subséquent motion compensation, intra prédiction, and présentation on a display device, such as display device 32 of FIG. 1. For instance, video décoder 30 may perform, based on the luma,
Cb, and Cr blocks in decoded picture buffer 162, intra prédiction or Inter prédiction operations on PUs of other CUs.
[0185] In accordance with various examples of this disclosure, video décoder 30 may be configured to perform palette-based coding. Palette-based decoding unit 165, for example, may perform palette-based decoding when a palette-based decoding mode is
selected, e.g., for a CU or PU. For example, palette-based decoding unit 165 may be configured to generate a palette having entries indicating pixel values, receive information associating at least some pixel locations in a block of video data with entries in the palette, select pixel values in the palette based on the information, and reconstruct pixel values of the block based on the selected pixel values în the palette.
Although various fonctions are descrîbed as being performed by palette-based decoding unît 165, some or ail of such fonctions may be performed by other processing units, or a combination of different processing units.
[0186] Palette-based decoding unit 165 may receive palette coding mode information, 10 and perform the above operations when the palette coding mode information indicates that the palette coding mode applies to the block. When the palette coding mode information indicates that the palette coding mode does not apply to the block, or when other mode information indicates the use of a different mode, palette-based decoding unit 165 décodés the block of video data using a non-palette based coding mode, e.g., 15 such as an HEVC inter-predictive or intra-predictive coding mode. The block of video data may be, for example, a CU or PU generated according to an HEVC coding process.
The palette-based coding mode may comprise one of a plurality of different palettebased coding modes, or there may be a single palette-based coding mode.
[0187] According to aspects of this disclosure, palette-based decoding unit 165 may be 20 configured to perform any combination of the techniques for palette coding descrîbed herein. The details of palette coding descrîbed above with respect to encoder 20 are not repeated here with respect to décoder 30, but it is understood that décoder 30 may perform the reciprocal palette-based decoding process relative to any palette-based encoding process descrîbed herein with respect to encoder 20.
[0188] Vîdeo décoder 30 may be configured to détermine that a current block is coded in palette mode, bypass mode décodé a plurality of instances of a first syntax element for reconstructing the current block, e.g., using a bypass mode of a CABAC coding process, and after bypass mode decoding a plurality of instance of the first syntax element, context mode décodé a plurality of instances of a second syntax element for reconstructing the current block, e.g., using a CABAC coding process. Video décoder may bypass mode décodé any two instances of the plurality of instances ofthe first syntax element without interleaving with the context mode decoding of any one instance of the plurality of instances of the second syntax element. In some examples, the first syntax element comprises one of a palette_index_îdc syntax element or
palette_escape_val syntax element, and the second syntax element comprises a palette_run_msb_id_p!usl syntax element. Video décoder 30 may bypass décodé the plurality of instances of the first syntax element at a front of an index block coding section for the current block.
[0189] Video décoder 30 may décodé a third syntax element indicating a number of instances of the first syntax element, wherein bypass mode decoding the plurality of instances of the first syntax element comprises bypass mode decoding the plurality of instances of the first syntax element based on the third syntax element. Video décoder 30 may décodé the third syntax element using one of a Golomb Rice code, exponential 10 Golomb code, Truncated Rice code, Unary code, a concaténation of Golomb Rice and exponential Golomb code, or a truncated version of any of the previous codes.
[0190] FIG. 4 is a conceptual diagram illustrating an example of determining a palette for coding video data, consistent with techniques of this disclosure. The example of FIG. 4 includes a picture 178 having a first PAL (palette) coding unit (CU) 180 that is associated with first palettes 184 and a second PAL CU 188 that is associated with second palettes 192. As described in greater detail below and in accordance with the techniques of this disclosure, second palettes 192 are based on first palettes 184. Picture 178 also includes block 196 coded with an intra-prediction coding mode and block 200 that ts coded with an inter-prediction coding mode.
[0191] The techniques of FIG. 4 are described in the context of video encoder 20 (FIG. 1 and FIG. 2) and video décoder 30 (FIG. 1 and FIG. 3) and with respect to the HEVC video coding standard for purposes of explanation. However, it should be understood that the techniques of this disclosure are not limited in this way, and may be appiied by other video coding processors and/or devices in other video coding processes 25 and/or standards.
[0192] In general, a palette refers to a number of pixel values that are dominant and/or représentative for a CU cunently being coded, CU 188 in the example of FIG. 4. First palettes 184 (which may also be referred to as indexes/indices 184) and second palettes 192 (which may also be referred to as indexes/indices 192) are shown as including multiple palettes (which may also be referred to as multiple indexes). In some examples, according to aspects of this disclosure, a video coder (such as video encoder 20 or video décoder 30) may code palettes (e.g., indexes) separately for each color component of a CU. For example, video encoder 20 may encode a palette for a luma (Y) component of a CU, another palette for a chroma (U) component of the CU, and yet
another palette for the chroma (V) component of the CU. In this example, entries of the Y palette may represent Y values of pixels of the CU, entries of the U palette may represent U values of pixels of the CU, and entries of the V palette may represent V values of pixels ofthe CU.
[0193] In other examples, video encoder 20 may encode a single palette for ail color components of a CU. In this example, video encoder 20 may encode a palette having an i-th entry that is a triple value, including Yi, Ui, and Vi. In this case, the palette includes values for each of the components of the pixels. Accordingly, the représentation of palettes 184 and 192 as a set of palettes having multiple individual palettes is merely one example and not întended to be lîm îtîng.
[0194] In the example of FIG. 4, first palettes 184 includes three entries 202*206 having entry index value 1, entry index value 2, and entry index value 3, respectively. First palettes 184 relate the index values (e.g., the values shown in the left column of first palettes 184) to pixel values. For example, as shown ïn FIG. 4, one of first palettes 184 relates index values 1,2, and 3 to pixel values A, B, and C, respectively. As described herein, rather than coding the actual pixel values of first CU 180, a video coder (such as video encoder 20 or video décoder 30) may use palette-based coding to code the pixels of the block using the indices 1-3 (which may also be expressed as index values 1-3). That îs, for each pixel position of first CU 180, video encoder 20 may encode an index value for the pixel, where the index value is associated with a pixel value in one or more of first palettes 184. Video décoder 30 may obtain the index values from a bitstream and reconstruct the pixel values using the index values and one or more of first palettes 184. Thus, first palettes 184 are transmitted by video encoder 20 in an encoded video data bitstream for use by video décoder 30 in palette-based decoding.
[0195] In some examples, video encoder 20 and video décoder 30 may détermine second palettes 192 based on first palettes 184. For example, video encoder 20 and/or video décoder 30 may locate one or more blocks from which the prédictive palettes, in this example, first palettes 184, are determined. In some examples, such as the example lllustrated in FIG. 4, video encoder 20 and/or video décoder 30 may locate the previously coded CU such as a left neighboring CU (first CU 180) when determining a prédictive palette for second CU 188.
[0196] In the example of FIG. 4, second palettes 192 include three entries 208-212 having entry index value 1, entry index value 2, and entry index value 3, respectively.
Second palettes 192 relate the index values (e.g., the values shown in the left column of
first palettes 192) to pixel values. For example, as shown in FIG. 4, one of the second palettes 192 relates index values 1,2, and 3 to pixel values A, B, and D, respectively. In this example, video encoder 20 may code one or more syntax éléments indicating which entries of first palettes 184 are included in second palettes 192. In the example of
FIG. 4, the one or more syntax éléments are illustrated as a vector 216. Vector 216 has a number of associated bins (or bits), with each bin indicating whether the palette predîctor associated with that bin is used to predict an entry of the current palette. For example, vector 216 indicates that the first two entries of first palettes 184 (202 and 204) are included in second palettes 192 (a value of “1” in vector 216), while the third to entry of first palettes 184 is not included în second palettes 192 (a value of “0” in vector 216). In the example ofFIG. 4, the vector is a Boolean vector.
[0197] In some examples, video encoder 20 and video décoder 30 may détermine a palette predîctor list (which may also be referred to as a palette predîctor table) when performing palette prédiction. The palette predîctor list may Include entries from palettes of one or more neighboring blocks that are used to predict one or more entries of a palette for coding a current block. Video encoder 20 and video décoder 30 may construct the list in the same manner. Video encoder 20 and video décoder 30 may code data (such as vector 216) to indicate which entries of the palette predîctor list are to be included in a palette for coding a current block.
[0198] FIG. 5 is a conceptual diagram illustrating an example of determining indices to a palette for a block of pixels, consistent with techniques of this disclosure. For example, FIG. 5 includes an index block 240 (which may also be referred to as map 240 or index map 240) including index values (e.g., index values 1,2, and 3) that relate respective positions of pixels associated with the index values to an entry of palettes
244.
[0199] While index block 240 is illustrated in the example of FIG. 5 as including an index value for each pixel position, it should be understood that in other examples, not ail pixel positions may be associated with an index value relating the pixel value to an entry of palettes 244. That is, as noted above, în some examples, video encoder 20 may 30 encode (and video décoder 30 may obtain, from an encoded bitstream) an indication of an actual pixel value (or its quantized version) for a position in index block 240 if the pixel value is not included în palettes 244.
[0200] In some examples, video encoder 20 and video décoder 30 may be configured to code an additional map indicating which pixel positions are associated with which index
values. For example, assume that the (i, j) entry în the index block 240 corresponds to the (i, j) position of a CU. Video encoder 20 may encode one or more syntax éléments for each entry of the index block (i.e., each pixel position) indicating whether the entry has an associated index value. For example, video encoder 20 may encode a flag having 5 a value of one to indicate that the pixel value at the (i, j) location in the CU is one of the values in palettes 244.
[0201] Video encoder 20 may, in such an example, also encode a palette (shown in the example of FIG. 5 as 244). In instances in which palettes 244 include a single entry and associated pixel value, video encoder 20 may skîp the signaling of the index value.
Video encoder 20 may encode the flag to hâve a value of zéro to indicate that the pixel value at the (i, j) location in the CU is not one of the values in palettes 244. In this example, video encoder 20 may also encode an indication ofthe pixel value for use by video décoder 30 in reconstructing the pixel value. In some instances, the pixel value may be coded în a lossy manner.
[0202] The value of a pixel in one position of a CU may provide an indication of values of one or more other pixels în other positions of the CU. For example, there may be a relatively hîgh probability that neighboring pixel positions of a CU will hâve the same pixel value or may be mapped to the same index value (in the case of lossy coding, in which more than one pixel value may be mapped to a single index value).
[0203] Accordingly, video encoder 20 may encode one or more syntax éléments indicating a number of consecutive pixels or index values in a given scan order that hâve the same pixel value or index value. As noted above, the string of like-valued pixel or index values may be referred to herein as a run. In an example for purposes of illustration, if two consecutive pixels or indices in a given scan order hâve different values, the run is equal to zéro. If two consecutive pixels or indices în a given scan order hâve the same value but the third pixel or index in the scan order has a different value, the run is equal to one. For three consecutive indices or pixels with the same value, the run is two, and so forlh. Video décoder 30 may obtain the syntax éléments indicating a run from an encoded bitstream and use the data to détermine the number of 30 consecutive locations that hâve the same pixel or index value.
[0204] In some examples in accordance with the techniques of this disclosure, entropy encoding unît 118 and entropy decoding unit 150 may be configured to entropy code index block 240. For example, entropy encoding unit 118 and entropy decoding unit
150 may be configured to entropy code run-lengths (e.g., run-length values or codes) and/or a binary palette prédiction vector relating to an index block in palette mode. [0205] FIG. 6 is a conceptuel diagram iHustrating an example of determining maximum copy above run-length, assuming an example of a raster scanning order, consistent with techniques ofthis dîsclosure. In the example of FIG. 6, if none ofthe pixels encompassed by dashed fines 280 is coded as an escape sample, the maximum possible run-length is 35 (Le. the number of unshaded pixel positions). If one or more of the pixels within dashed lines 280 is coded as an escape sample, assuming that the pixel marked as the escape pixel (the pixel position with the “X”) is the first escape pixel within dashed lines 280 in scanning order, then the maximum possible coded copy above run-length is five.
[0206] In some examples, video décoder 30 may only détermine the run mode (e.g., the palette mode in which the pixels are coded) for the pixels within dashed lines 280. Hence, in the worst case, video décoder 30 makes the détermination for BlockWîdth-1 15 pixels. In some examples, vîdeo décoder 30 may be configured to implement certain restrictions regarding the maximum of number of pixels for which the run mode is checked. For example, video décoder 30 may only check the pixels within dashed lines 280 îf the pixels are in the same row as the current pixel. Video décoder 30 may infer that ali other pixels within dashed lines 280 are not coded as escape samples. The 20 example în FIG. 6 assumes a raster scanning order. The techniques however, may be applied to other scanning orders, such as vertical, horizontal traverse, and vertical traverse.
[0207] In accordance with an example of this dîsclosure, if the current run mode is ‘copy above,’ the run-length*s contexts for a current pixel may dépend on the index 25 value of the above-neïghboring pixel’s index relative to the current pixel. In this example, ifthe above-neighboring pixel relative to the current pixel is outside ofthe current CU, the video décoder assumes that the corresponding index equals to a predefîned constant k. In some examples, k = 0.
[0208] During entropy coding, an entropy encoder or décoder may place bits of a symbol to be encoded or decoded into one or more bïns. The bins may indicate whether a value of a symbol is equal to zéro. The entropy coder or entropy décoder may use the values of the bins to adjust entropy coding process. In some examples, an entropy encoder or décoder may also use bins to indicate whether a values is greater than a spécifie value, e.g., greater than zéro, greater than one, etc.
[0209] In some examples, ifthe current mode îs ‘copy above,’ the first bin ofthe runlength codeword selects one of the two candidate CABAC contexts based on whether the above-neighboring sample (e.g., pixel) relative to the current sample (e.g., pixel) equals to 0 or not.
[0210] As another example, if the current mode is ‘copy previous,’ the first bin of the run-length codeword selects one ofthe four candidate CABAC contexts based on whether the index value equals to 0, equals 1, equals to 2, or larger than 2.
[0211] FIG. 8 îs a fiowchart illustrating an example process for decodîng video data consistent with techniques of this disclosure. The process of FIG. 8 is generally 10 described as being performed by video décoder 30 for purposes of illustration, although a varîety of other processors may also carry out the process shown in FIG. 8. In some examples, block decodîng unit 152, palette-based decodîng unit 165, and/or entropy decodîng unit 150 may perform one or more processes shown in FIG. 8.
[0212] In the example of FIG. 8, video décoder 30 may be confîgured to receive, from an encoded video bitstream, a palette mode encoded block of video data of a pîcture (800). Video décoder 30 may be confîgured to receive, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data (802). In some examples, the encoded palette mode information may include a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax element. For example, the first syntax element may include palette_index_idc or palette_escape_val, and the plurality of syntax éléments that are different from the first syntax element may include a palette_run_msb_id_plusl syntax element. As another example, the first syntax element may be an indication of an index to an array of palette entries or the first syntax element may specify a quantized escape coded sample value for a color component corresponding to an escape sample. The plurality of syntax éléments that are different from the first syntax element may include a syntax element that spécifiés an index of a most signîficant bit in a binary représentation of a variable representing run length and a syntax element that spécifiés a run type mode.
[0213] As another example, the plurality of syntax éléments that are different from the first syntax element may be any and ail syntax éléments that are different from the first syntax element. As described herein with respect to some examples, the plurality of syntax éléments that are different from the first syntax element may also be different from second, third, and/or fourth syntax éléments. In such examples, the plurality of
syntax éléments that are different from the first, second, third, and fourth syntax éléments may be any and ail syntax éléments that are different from the first, second, third, and/or fourth syntax éléments. In some examples, the plurality ofsyntax éléments that are different from the first syntax element may be any and ail syntax éléments that 5 are not bypass mode decoded and/or that are not to be bypass mode decoded.
[0214] Video décoder 30 may be configured to décodé, using bypass mode, e.g., the bypass mode of a CABAC coding process, the plurality of instances of the first syntax element before decoding the plurality of syntax éléments that are different from the first syntax element using context mode (804). Video décoder 30 may be configured to 10 décodé, using context mode, e.g., the regular CABAC mode (rather than the bypass mode), the plurality of syntax éléments that are different from the first syntax element after decoding the plurality of instances of the first syntax element using bypass mode (806). In some examples, the plurality of instances of the first syntax element includes ail instances of the first syntax element for the palette mode encoded block of video 15 data. In such examples, ail instances of the first syntax element are decoded using bypass mode before decoding any subséquent data, such as the plurality of syntax éléments that are different from the first syntax element. Otherwise stated, video décoder 30 may be configured to décodé, using context mode, the plurality of syntax éléments that are different from the first syntax element after decoding ail instances of 20 the first syntax element for the palette mode encoded block of video data using bypass mode.
[0215] Video décoder 30 may be configured to décodé the palette mode encoded block of video data using the decoded plurality of instances of the first syntax element and the decoded plurality of syntax éléments that are different from the first syntax element 25 (808). In some examples, the plurality of instances of the first syntax element are grouped together such that switching between bypass mode and context mode while decoding the palette mode encoded block of video data is reduced.
[0216] In some examples, the encoded palette mode information may include a second syntax element indicating a number of instances of the first syntax element (e.g., 30 indicating how many instances of the first syntax element there are for the palette mode encoded block of video data). The plurality of syntax éléments that are different from the first syntax element may also be different from the second syntax element. In such examples, video décoder 30 may be configured to décodé, using bypass mode, the second syntax element before decoding the plurality of syntax éléments that are
different from the first syntax element and the second syntax element. In some examples, no instance of the second syntax element is interleaved between any two instances of the first syntax element for the palette mode encoded block of video data. In some examples, video décoder 30 may be configured to détermine, after decoding a 5 number of instances of the first syntax element equal to the number indicated by the second syntax element, that subséquent data in the encoded video bitstream following the number of instances of the first syntax element correspond to the pluralîty of syntax éléments that are different from the first syntax element and the second syntax element. In some examples, video décoder 30 may be configured to décodé the second syntax 10 element using a concaténation of truncated Rice code and exponential Golomb code.
[0217] In some examples, the encoded palette mode information may include a third syntax element and a fourth syntax element. In such examples, video décoder 30 may be configured to décodé the third syntax element to détermine a value corresponding to the third syntax element indicative of whether the palette mode encoded block of video 15 data includes an escape pixel. Video décoder 30 may be configured to décodé the fourth syntax element to détermine a value corresponding to the fourth syntax element indicative of palette size. Video décoder 30 may be configured to décodé, based on the determined values respectively corresponding to the third and fourth syntax éléments, the pluralîty of syntax éléments that are different from the first syntax element and the 20 second syntax element using context mode after decoding the pluralîty of instances of the first syntax element and the second syntax element using bypass mode.
[0218] In some exemples, the encoded palette mode information may include another syntax element, and video décoder 30 may be configured to décodé this other syntax element to détermine a value corresponding to this other syntax element that spécifiés a 25 number of distinct values that a palette index has for the palette mode encoded block of video data. Video décoder 30 may be configured to décodé, based on the determined value corresponding to this other syntax element, the pluralîty of syntax éléments that are different from the fîrst syntax element and the second syntax element using context mode after decoding the pluralîty of instances of the first syntax element and the second 30 syntax element using bypass mode.
[0219] In some examples, the encoded palette mode information may include another syntax element, and vîdeo décoder 30 may be configured to décodé this other syntax element to détermine a value corresponding to this other syntax element indicative of a
last instance of a syntax element of palette_run_type_flag[ xC ][ yC ] for the palette mode encoded block of video data.
[0220] In some examples, video décoder 30 may be configured to détermine the encoded block of video data has one or more escape samples. In such examples, video 5 décoder 30 may be configured to décodé a last escape sample in the encoded block of video data among the one or more escape samples. Video décoder 30 may be configured to infer an index value that applies to samples of the encoded block of video data following the last escape sample. Video décoder 30 may be configured to décodé the samples of the encoded block of video data following the last escape sample using 10 the inferred index value for each sample of the samples following the last escape sample.
[0221] In some examples, video décoder 30 may be configured to détermine a number of palette indices received. In such examples, video décoder 30 may be configured to détermine a number of palette indices left based on the number of palette indices 15 received and the number of instances of the first syntax element. Video décoder 30 may be configured to détermine a maximum possible run value for the encoded block of video data based on the number of palette indices received and the number of instances of the first syntax element. In some examples, video décoder 30 may be configured to détermine the maximum possible run value for the encoded block of video data 20 according to: nCbS · nCbS - scanPos - 1 - palettelndicesLeft, where nCbS spécifiés a size of the encoded block of video data, scanPos spécifiés scan position, and palettelndicesLeft spécifiés the number of palette indices left.
[0222] FIG. 9 is a flowchart îllustrating an example process for encoding video data consistent with techniques of this disclosure. The process of FIG. 9 is generally 25 described as being performed by video encoder 20 for purposes of illustration, although a variety of other processors may also carry out the process shown in FIG. 9. In some examples, block encoding unit 100, palette-based encoding unit 122, and/or entropy encoding unit 118 may perform one or more processes shown in FIG. 9.
[0223] In the example of FIG. 9, video encoder 20 may be configured to détermine that 30 a block of video data is to be encoded tn palette mode (900). Video encoder 20 may be configured to encode the block of video data using palette mode into an encoded bitstream (902). In some examples, video encoder 20 may be configured to generate palette mode information for the block of video data (904). The palette mode information may include a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax element. For example, the first syntax element may include palettejndexjdc or palette_escape_val, and the plurality of syntax éléments that are different from the first syntax element may include a palette_run_msb_id_plusl syntax element. As another example, the first syntax 5 element may be an indication of an index to an array of palette entries or the first syntax element may specify a quantized escape coded sample value for a color component corresponding to an escape sample. The plurality of syntax éléments that are different from the first syntax element may include a syntax element that spécifiés an index of a most significant bit in a binary représentation of a variable representing run length and a 10 syntax element that spécifiés a run type mode.
[0224] As another example, the plurality of syntax éléments that are different from the first syntax element may be any and ail syntax éléments that are different from the first syntax element. As described herein with respect to some examples, the plurality of syntax éléments that are different from the first syntax element may also be different 15 from second, third, and/or fourth syntax éléments. In such examples, the plurality of syntax éléments that are different from the first, second, third, and fourth syntax éléments may be any and ail syntax éléments that are different from the first, second, third, and/or fourth syntax éléments. In some examples, the plurality of syntax éléments that are different from the first syntax element may be any and ail syntax éléments that 20 are not bypass mode encoded and/or that are not to be bypass mode encoded.
[0225] Video encoder 20 may be configured to encode, using bypass mode, e.g., the bypass mode of a CAB AC coding process, the plurality of instances of the first syntax element into the encoded bitstream before encoding the plurality of syntax éléments that are different from the first syntax element into the encoded bitstream using context 25 mode (906). Video encoder 20 may be configured to encode, using context mode, e.g., the regular CABAC context-based mode, the plurality of syntax éléments that are different from the first syntax element into the encoded bitstream after encoding the plurality of instances of the first syntax element using bypass mode into the encoded bitstream (908). In some examples, the plurality of instances ofthe first syntax element 30 are grouped together such that switching between bypass mode and context mode whîle encoding the palette mode encoded block of video data is reduced.
[0226] In some examples, the plurality of instances of the first syntax element includes ail instances of the first syntax element for the block of video data. In such examples, ail instances of the first syntax element are encoded using bypass mode before encoding any subséquent data, such as the plurality of syntax éléments that are different from the first syntax element Otherwise stated, video encoder 20 may be configured to encode, using context mode, the plurality of syntax éléments that are different from the first syntax element after encoding ail instances of the first syntax element for the block of 5 video data using bypass mode.
[0227] In some examples, the palette mode information may include a second syntax element indicating a number of instances of the first syntax element (e.g., indicating how many instances of the first syntax element there are for the block of video data). The plurality of syntax éléments that are different from the first syntax element may 10 also be different from the second syntax element. In such examples, video encoder 20 may be configured to encode, using bypass mode, the second syntax element into the encoded bitstream before the encoding of the plurality of syntax éléments that are different from the first syntax element and the second syntax element. In some examples, video encoder 20 may be configured to encode the plurality of instances of 15 the first syntax element such that no instance of the second syntax element is interleaved between any two instances of the first syntax element for the palette mode encoded block of video data in the encoded bitstream. In some examples, video encoder 20 may be configured to encode the second syntax element into the encoded bitstream after the encoded plurality of instances of the first syntax element in the encoded bitstream. For 20 example, video encoder 20 may be configured to first encode ail instances of the first syntax elemenL and then encode the second syntax element into the encoded bitstream.
In some examples, video encoder 20 may be configured to encode the second syntax element using a concaténation of truncated Rice code and exponential Golomb code.
[0228] In some examples, the palette mode information may include a third syntax 25 element and a fourth syntax element. In such examples, video encoder 20 may be configured to encode a value corresponding to the third syntax element indicative of whether the block of video data includes an escape pixel into the encoded bitstream.
Video encoder 20 may be configured to a value corresponding to the fourth syntax element indicative of palette size into the encoded bitstream. In some examples, the 30 palette mode information may include another syntax element, and video encoder 20 may be configured to encode a value corresponding to this other syntax element that spécifiés a number of distinct values that a palette index has for the block of video data into the encoded bitstream.
[0229] In some examples, the encoded palette mode information may include another syntax element, and video encoder 20 may be configured to encode a value conesponding to this other syntax element indicative of a last instance of a syntax element of palette_run_type_flag[ xC ][ yC ] for the block of video data.
[0230] In some examples, video encoder 20 may be configured to encode a last escape sample in the block of video data among the one or more escape samples. In such examples, video encoder 20 may be configured to infer an index value that applies to samples of the block of video data following the last escape sample. Video encoder 20 may be configured to encode the samples of the block of video data following the last 10 escape sample using the inferred index value for each sample of the samples following the last escape sample.
[0231] It should be understood that ail ofthe techniques descrîbed herein may be used indîvîdually or in combination. For example, video encoder 20 and/or one or more components thereof and video décoder 30 and/or one or more components thereof may 15 perform the techniques descrîbed în this disclosure in any combination.
[0232] It is to be recognized that dependîng on the example, certain acts or events of any of the techniques descrîbed herein can be performed in a different sequence, may be added, merged, or left out altogether (e.g., not ail descrîbed acts or events are necessary for the practice of the techniques). Moreover, in certain examples, acts or events may be performed concurrently, e.g., through multi-threaded processing, interrupt processing, or multiple processors, rather than sequentially. In addition, while certain aspects of this disclosure are descrîbed as being performed by a single module or unit for purposes of clarity, it should be understood that the techniques of this disclosure may be performed by a combination of unîts or modules associated with a video coder.
[0233] Certain aspects of this disclosure hâve been descrîbed with respect to the developing HEVC standard for purposes of illustration. However, the techniques descrîbed in this disclosure may be usefùl for other video coding processes, including other standard or proprietary video coding processes not yet developed.
[0234] The techniques descrîbed above may be performed by video encoder 20 (FIGS.
1 and 2) and/or video décoder 30 (FIGS. 1 and 3), both of which may be generally referred to as a video coder. Likewise, video codîng may refer to video encoding or video decoding, as applicable.
[0235] In accordance with this disclosure, the term “or” may be intenupted as “and/or” where context does not dictate otherwise. Additionally, while phrases such as “one or
more” or “at least one” or the like may hâve been used for some features disclosed herein but not others; the features for which such language was not used may be Interpreted to hâve such a meaning implied where context does not dictate otherwîse. [0236] Whtle particular combinations of various aspects of the techniques are described 5 above, these combinations are provided mercly to illustrate examples of the techniques described in this disclosure. Accordingly, the techniques ofthis disclosure should not be limited to these example combinations and may encompass any conceivable combination of the various aspects of the techniques described in this disclosure.
[0237] In one or more examples, the functions described may be implemented in to hardware, software, fïrmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over, as one or more instructions or code, a computer-readable medium and executed by a hardware-based processîng unit. Computer-readable media may include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media 15 Including any medium that facilitâtes transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computerreadable media generally may correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by 20 one or more computers or one or more processors to retrieve instructions, code and/or data structures for implémentation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0238] By way of example, and not limitation, such computer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic 25 disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted 30 pair, digital subscriber line (DSL), or wireless technologies such as tnfrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the définition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signais, or other transient
media, but are instead directed to non-transîent, tangible storage media. Disk and dise, as used herein, includes compact dise (CD), laser dise, optical dise, digital versatile dise (DVD), floppy disk and Blu-ray dise, where disks usually reproduce data magnetically, while dises reproduce data optïcally with lasers. Combinations ofthe above should also 5 be included within the scope of computer-readable media.
[0239] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application spécifie ïntegrated circuits (ASICs), field programmable gâte arrays (FPGAs), or other équivalent ïntegrated or discrète logic circuîtry. Accordingly, the term “processor,” as 10 used herein may refer to any of the foregoing structure or any other structure suîtable for implémentation ofthe techniques described herein. In addition, in some aspects, the fonctionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codée. Also, the techniques could be fuily implemented in one or more circuits or logic 15 éléments.
[0240] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an Ïntegrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, various units may be combined in a codée hardware unit or provided by a collection of înteroperative hardware units, including one or more processors as described above, in conjonction with suîtable software and/or fïrmware. [0241] Various examples hâve been described herein. Any combination of the described Systems, operations, fonctions, or examples is contemplated. These and other examples are within the scope ofthe following claims.

Claims (30)

  1. Claims
    l. A method of decoding video data, the method comprising: receiving, from an encoded video bitstream, a palette mode encoded block of video data of a picture;
  2. 2. The method of claîm 1, wherein the pluralîty ofinstances ofthe first syntax element includes ail instances ofthe first syntax element for the palette mode encoded block of video data.
  3. 3. The method of claim 1, wherein the first syntax element îs palette_index_idc or 30 palette_escape_val, and wherein the pluralîty of syntax éléments that are different from the first syntax element includes a palettejrun_msb_îd_plusl syntax element.
  4. 4. The method of claim 1, wherein the pl ural ity of instances of the first syntax element are grouped together such that switchîng between the entropy coding bypass mode and the entropy coding context mode while decoding the palette mode encoded block of video data is reduced.
  5. 5 42. A device for encoding video data, the device comprising:
    a memory configured to store the video data; and a video encoder în communication with the memory, the video encoder configured to:
    détermine that a block of video data stored in the memory is to be
    5 third syntax element indicative of whether the palette mode encoded block of video data includes an escape sample;
    decoding the fourth syntax element to détermine a value corresponding to the fourth syntax element indicative of palette size; and decoding, based on the determined values respectively corresponding to the third 10 and fourth syntax éléments, the plurality of syntax éléments that are different from the first syntax element and the second syntax element using the entropy coding context mode after decoding the plurality of instances of the first syntax element and the second syntax element using the entropy coding bypass mode.
    15
    5· The method of claim 1, wherein the encoded palette mode information includes a second syntax element indicatîng a number of instances ofthe first syntax element, wherein the plurality of syntax éléments that are different from the first syntax element are different from the second syntax element, and wherein the method further
    5 receiving, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a pluralîty of instances of a first syntax element and a pluralîty of syntax éléments that are different from the first syntax element, wherein the first syntax element is an indication of an index to an array of palette entries or spécifiés a quantized 10 escape coded sample value for a color component corresponding to an escape sample, and wherein the pluralîty of syntax éléments that are different from the first syntax element includes a syntax element that spécifiés an index of a most significant bit in a binary représentation of a variable representing run length and a syntax element that spécifiés a run type mode;
  6. 6. The method of claim 5, wherein no instance of the second syntax element is interleaved between any two instances ofthe first syntax element for the palette mode encoded block of video data.
  7. 7. The method of claim 5, further comprising:
  8. 8. The method of claim 5, wherein the encoded palette mode information includes a third syntax element and a fourth syntax element, wherein the method further comprises:
    decoding the third syntax element to déterminé a value corresponding to the
  9. 9. The method ofclaim 5, wherein the encoded palette mode information includes a third syntax element, wherein the method further comprises:
    decoding the third syntax element to détermine a value corresponding to the third syntax element that spécifiés a number of distinct values that a palette index has for the palette mode encoded block of video data; and
  10. 10 encoded in palette mode;
    encode the block of video data using palette mode into an encoded bitstream, wherein the video encoder being configured to encode the block of video data using palette mode comprises the video encoder being configured to: generate palette mode information for the block of vîdeo data, wherein 15 the palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax element, wherein the first syntax element is an indication ofan index to an array of palette entries or spécifiés a quantized escape coded sample value for a color component corresponding to an escape sample, and wherein the plurality of
    10 encoding a value corresponding to the fourth syntax element indicative of palette size into the encoded bitstream.
    38. The method of claim 34, wherein the palette mode information includes a third syntax element, wherein the method further comprises:
    10 syntax éléments that are different from the first syntax element includes a syntax element that spécifiés an index of a most significant bit in a binary représentation of a variable representîng run length and a syntax element that spécifiés a run type mode; décodé, using an entropy coding bypass mode, the plurality of instances of the first syntax element before decoding the plurality of syntax éléments that are different
    10. The method of claim 5, wherein the encoded palette mode information includes a thîrd syntax element, wherein the method further comprises:
    decoding the third syntax element to détermine a value corresponding to the third syntax element indicative of a last instance of a syntax element of
    30 palette_run_type_flag[ xC ][ yC ] for the palette mode encoded block of video data.
    10 comprises:
    decoding, using the entropy coding bypass mode, the second syntax element before the decoding of the plurality of syntax éléments that are different from the first syntax element and the second syntax element.
    15
  11. 11. The method of claim 5, further comprising:
    decoding the second syntax element using a concaténation of truncated Rice code and exponential Golomb code.
  12. 12. The method of claim 1, further comprising:
    determining that the encoded block of video data has one or more escape samples;
    decoding a last escape sample in the encoded block of vîdeo data among the one or more escape samples;
    înferring an index value that applies to samples of the encoded block of video data following the last escape sample; and decodîng the samples of the encoded block of video data following the last escape sample using the inferred index value for each sample of the samples following the last escape sample.
  13. 13. The method of claim 5, further comprising:
    determining a number of palette indices received;
    determining a number of palette indices left based on the number of palette indices received and the number of instances of the first syntax element; and determining that a value for the variable representing run length is equal to a maximum possible run value for the encoded block of video data based on the number of palette indices received and the number of instances of the first syntax element.
  14. 14. The method of claim 13, wherein the maximum possible run value for the encoded block of video data is equal to: nCbS * nCbS - scanPos -1 palettelndicesLeft, wherein nCbS spécifiés a size of the encoded block of video data, scanPos spécifiés scan position, and palettelndicesLeft spécifiés the number of palette indices left.
  15. 15 encoding a value corresponding to the third syntax element that spécifiés a number of distinct values that a palette index has for the block of video data into the encoded bitstream.
    39. The method of claim 34, wherein the palette mode information includes a third
    15 from the first syntax element using an entropy coding context mode;
    décodé, using the entropy coding context mode, the plurality of syntax éléments that are different from the first syntax element after decoding the plurality of instances of the first syntax element using the entropy coding bypass mode; and décodé the palette mode encoded block of video data using the decoded plurality 20 of instances of the first syntax element and the decoded plurality of syntax éléments that are different from the first syntax element.
    30. A method of encoding video data, the method comprising: determining that a block of video data is to be coded in palette mode;
    15 décodé, using the entropy coding bypass mode, the second syntax element before the decodîng of the plurality of syntax éléments that are different from the first syntax element and the second syntax element.
    15. A dev ice for decod ing v ideo data, the device compris ing:
    a memory configured to store the video data; and a video décoder in communication with the memory, the video décoder configured to:
    receive a palette mode encoded block of video data of a picture from the memory;
    receive encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax element, wherein the first syntax element is an indication of an index to an array of palette entries or spécifiés a quantized escape coded sample value for a color component corresponding to an escape sample, and wherein the plurality of syntax éléments that are different from the first syntax element includes a syntax element that spécifiés an index of a most significant bit in a binary représentation of a variable representing run length and a syntax element that spécifiés a run type mode;
    décodé, using an entropy coding bypass mode, the plurality of instances of the first syntax element before decoding the plurality of syntax éléments that are different from the first syntax element using an entropy coding context mode;
    décodé, using the entropy coding context mode, the plurality of syntax éléments that are different from the first syntax element after decoding the plurality of instances of the first syntax element using the entropy coding bypass mode; and décodé the palette mode encoded block of video data using the decoded syntax éléments that are different from the fïrst syntax element.
    15 decoding, using an entropy coding bypass mode, the pluralîty of instances of the first syntax element before decoding the pluralîty of syntax éléments that are different from the first syntax element using an entropy coding context mode;
    decoding, using the entropy coding context mode, the pluralîty of syntax éléments that are different from the first syntax element after decoding the pluralîty of 20 instances of the first syntax element using the entropy coding bypass mode; and decoding the palette mode encoded block of video data using the decoded pluralîty of instances of the first syntax element and the decoded pluralîty of syntax éléments that are different from the first syntax element.
    25
  16. 16. The device of claim 15, wherein the plurality of instances of the first syntax element includes ail instances of the first syntax element for the palette mode encoded block of video data.
  17. 17. The device of claim 15, wherein the first syntax element is palette_index_idc or palette_escape_val, and wherein the plurality of syntax éléments that are different from the first syntax element includes a palette_run_msb_id_plusl syntax element.
    5
  18. 18. The device of claim 15, wherein the plurality of instances of the first syntax element are grouped together such that switching between the entropy coding bypass mode and the entropy coding context mode while decodîng the palette mode encoded block of video data is reduced.
    10
  19. 19. The device of claim 15, wherein the encoded palette mode information includes a second syntax element indicating a number of instances of the first syntax element, wherein the plurality of syntax éléments that are different from the first syntax element are different from the second syntax element, and wherein the video décoder is further confîgured to:
  20. 20 syntax éléments that are different from the first syntax element includes a syntax element that spécifiés an index of a most significant bit in a binary représentation of a variable representing run length and a syntax element that spécifiés a run type mode;
    encode, using an entropy coding bypass mode, the plurality of instances 25 of the first syntax element into the encoded bitstream before encoding the plurality of syntax éléments that are different from the first syntax element into the encoded bitstream using an entropy coding context mode; and encode, using the entropy coding context mode, the plurality of syntax éléments that are different from the first syntax element into the encoded
    20 syntax element, wherein the method further comprises:
    encoding a value corresponding to the third syntax element indicative of a last instance of a syntax element of palette_run_type_flag[ xC ][ yC ] for the block of video data.
    25
    40. The method of claim 34, further comprising:
    encoding the second syntax element using a concaténation of truncated Rice code and exponential Golomb code.
    41. The method of claim 30, further comprising:
    30 encoding a last escape sample în the block of video data among the one or more escape samples;
    inferring an index value that applies to samples of the block of video data following the last escape sample; and encoding the samples of the block of vîdeo data following the last escape sample using the infened index value for each sample of the samples following the last escape sample.
    20 element are grouped together such that switching between the entropy coding bypass mode and the entropy coding context mode while encoding the palette mode encoded block of video data is reduced.
    34. The method of claim 30, wherein the palette mode information includes a second
    20. The device ofclaim 19, wherein no instance ofthe second syntax element is 20 interleaved between any two instances of the first syntax element for the palette mode encoded block of video data.
    20 decoding, based on the determined value corresponding to the third syntax element, the plurality of syntax éléments that are different from the first syntax element and the second syntax element using the entropy coding context mode after decoding the plurality of instances ofthe first syntax element and the second syntax element using the entropy coding bypass mode.
    20 determining, aller decoding a number of instances of the first syntax element equal to the number indicated by the second syntax element, that subséquent data in the encoded video bitstream following the number of instances of the first syntax element correspond to the plurality of syntax éléments that are different from the first syntax element and the second syntax element.
  21. 21. The device of claim 19, wherein the video décoder is further confîgured to détermine, after decodîng a number of instances of the first syntax element equal to the
  22. 22. The device of daim 19, wherein the encoded palette mode information includes a third syntax element and a fourth syntax element, wherein the video décoder is further configured to:
    décodé the third syntax element to détermine a value corresponding to the third syntax element indicative of whether the palette mode encoded block of video data includes an escape sample;
    décodé the fourth syntax element to détermine a value corresponding to the fourth syntax element indicative of palette size; and décodé, based on the determined values respectively corresponding to the third and fourth syntax éléments, the plurality of syntax éléments that are different from the first syntax element and the second syntax element using the entropy coding context mode after decoding the plurality of instances of the first syntax element and the second syntax element using the entropy coding bypass mode.
  23. 23. The device of claim 19, wherein the encoded palette mode information includes a third syntax element, wherein the video décoder is further configured to:
    décodé the third syntax element to détermine a value corresponding to the third syntax element that spécifiés a number of distinct values that a palette index has for the palette mode encoded block of video data; and décodé, based on the determined value corresponding to the third syntax element, the plurality of syntax éléments that are different from the first syntax element and the second syntax element using the entropy coding context mode after decoding the plurality of instances ofthe first syntax element and the second syntax element using the entropy coding bypass mode.
  24. 24. The device of claim 19, wherein the encoded palette mode information includes a third syntax element, wherein the video décoder is further configured to:
    décodé the third syntax element to détermine a value corresponding to the third syntax element indicative of a last instance of a syntax element of palette_runjype_f!ag[ xC ][ yC ] for the palette mode encoded block of video data.
  25. 25 syntax element indîcating a number of instances of the first syntax element, wherein the pluralîty of syntax éléments that are different from the first syntax element are different from the second syntax element, and wherein the method further comprises:
    encoding, using the entropy coding bypass mode, the second syntax element into the encoded bitstream before the encoding of the pluralîty of syntax éléments that are 30 different from the first syntax element and the second syntax element.
    35. The method of claim 34, wherein no instance of the second syntax element is interleaved between any two instances of the first syntax element for the block of video data.
    36. The method of claim 34, further comprising:
    encoding the second syntax element into the encoded bitstream after the encoded plurality of instances of the first syntax element in the encoded bitstream.
    37. The method of claim 34, wherein the palette mode information includes a third syntax element and a fourth syntax element, wherein the method further comprises:
    encoding a value corresponding to the third syntax element indicative of whether the block of video data includes an escape sample into the encoded bitstream; and
    25 encoding the block of video data using palette mode into an encoded bitstream, wherein encoding the block of video data using palette mode comprises: generating palette mode information for the block of video data, wherein the palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax element, wherein the 30 first syntax element is an indication of an index to an array of palette entries or spécifiés a quantized escape coded sample value for a color component corresponding to an escape sample, and wherein the plurality of syntax éléments that are different from the first syntax element includes a syntax element that spécifiés an index of a most significant bit in a binary représentation of a variable representîng run length and a syntax element that spécifiés a run type mode;
    encoding, using an entropy coding bypass mode, the pluralîty of instances of the first syntax element into the encoded bitstream before encoding the pluralîty of syntax 5 éléments that are different from the first syntax element into the encoded bitstream using an entropy coding context mode; and encoding, using the entropy coding context mode, the pluralîty of syntax éléments that are different from the first syntax element into the encoded bitstream after encoding the pluralîty of instances of the first syntax element using the entropy coding 10 bypass mode into the encoded bitstream.
    31. The method of claîm 30, wherein the pluralîty of instances of the first syntax element includes ail instances of the first syntax element for the block of video data.
    15
    32. The method of claim 30, wherein the first syntax element is palettejndexjdc or palette_escape_val, and wherein the pluralîty of syntax éléments that are different from the first syntax element includes a palette_run_msb_id_plusl syntax element.
    33. The method of claim 30, wherein the pluralîty of instances of the first syntax
    25. The device of claim 19, wherein the video décoder is further configured to:
    décodé the second syntax element using a concaténation of truncated Rice code and exponential Golomb code.
    25 number indicated by the second syntax element, that subséquent data in the encoded video bitstream following the number of instances of the first syntax element correspond to the plurality of syntax éléments that are different from the first syntax element and the second syntax element.
  26. 26. The device of claim 15, wherein the video décoder is further configured to: détermine that the encoded block of video data has one or more escape samples; décodé a last escape sample in the encoded block of video data among the one or more escape samples;
    infer an index value that applies to samples of the encoded block of video data following the last escape sample; and décodé the samples ofthe encoded block of video data following the last escape sample using the inferred index value for each sample of the samples following the last escape sample.
  27. 27. The device of claim 19, wherein the video décoder is further configured to: détermine a number of palette indices received;
    détermine a number of palette indices left based on the number of palette indices received and the number of instances of the first syntax element; and détermine that a value for the variable representing run length is equal to a maximum possible run value for the encoded block of video data based on the number of palette indices received and the number of instances of the first syntax element.
  28. 28. The device of claim 27, wherein the maximum possible run value for the encoded block of video data is equal to: nCbS * nCbS - scanPos -1 palettelndicesLeft, wherein nCbS spécifiés a size of the encoded block of video data, scanPos spécifiés scan position, and palettelndicesLeft spécifiés the number of palette indices left.
  29. 29. A non-transi tory computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to:
    receive a palette mode encoded block of video data of a picture from a memory; receive encoded palette mode information for the palette mode encoded block of 5 video data, wherein the encoded palette mode information includes a plurality of instances of a first syntax element and a plurality of syntax éléments that are different from the first syntax element, wherein the first syntax element is an indication ofan index to an array of palette entries or spécifiés a quantized escape coded sample value for a color component corresponding to an escape sample, and wherein the plurality of
  30. 30 bitstream after encoding the plurality of instances of the first syntax element using the entropy coding bypass mode into the encoded bitstream.
    F' Γ 18322
OA1201700279 2015-01-30 2016-01-29 Palette index grouping for high throughput cabac coding. OA18322A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US62/110,302 2015-01-30
US15/009,477 2016-01-28

Publications (1)

Publication Number Publication Date
OA18322A true OA18322A (en) 2018-10-03

Family

ID=

Similar Documents

Publication Publication Date Title
AU2016211327B2 (en) Palette index grouping for high throughput CABAC coding
US10097842B2 (en) Restriction of escape pixel signaled values in palette mode video coding
CA2945039C (en) Maximum palette parameters in palette-based video coding
EP3308542B1 (en) Grouping palette bypass bins for video coding
AU2016219428B2 (en) Restriction on palette block size in video coding
AU2016211797B2 (en) Palette mode coding for video coding
EP3146723B1 (en) Coding runs in palette-based video coding
CA2945036C (en) Escape sample coding in palette-based video coding
EP3158741A1 (en) Copy from previous rows for palette mode coding
JP2017532896A (en) Reducing parse dependencies for coding pallet indexes
WO2016057504A1 (en) Non-uniform exponential-golomb codes for palette mode coding
OA18322A (en) Palette index grouping for high throughput cabac coding.
OA18393A (en) Restriction on palette block size in video coding.