Signaling of multiple predictive BVD / MVD suffix options

The method optimizes video encoding by deriving block offset vector differences using flag-based encoding for suffixes and prefixes, enhancing efficiency and accuracy in MPEG encoding.

JP2026511999APending Publication Date: 2026-04-14KONINKLIJKE PHILIPS NV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
KONINKLIJKE PHILIPS NV
Filing Date
2024-03-20
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing video encoding technologies face challenges in efficiently reducing bit compression and improving encoding of vector differences and motion vectors, particularly in MPEG encoding, due to increased processing power of decoders and the need for more efficient bit representation.

Method used

A method is provided to derive block offset vector differences and predictions using a flag-based approach, where the flag determines the encoding method for suffixes and prefixes in the bitstream, allowing for context-adaptive binary arithmetic coding (CABAC) bypass or context-encoded symbols, to optimize encoding and decoding of video sequences.

Benefits of technology

This method enhances video encoding efficiency by reducing the number of bits required for encoding vector differences, improving decoding accuracy, and optimizing bit representation, especially in MPEG encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026511999000001_ABST
    Figure 2026511999000001_ABST
Patent Text Reader

Abstract

To improve the encoding and subsequent decoding of block offset vector differences of motion vectors for inter-prediction or block vectors for intra-prediction of video sequences, a method for deriving a block offset vector difference to predict a second pixel color of a second block based on a first pixel color of a first block of a first picture located offset from a second block of a second picture, based on a block offset vector difference 1810 and a block offset vector prediction 1808, comprising the steps of obtaining at least one prefix of the magnitude of the block offset vector difference based on one or more symbols of a first in the bitstream, a flag, and a second in the bitstream The process includes the step of determining at least one suffix of size based on one or more symbols of 2, wherein the step of determining the suffix includes, if the value of the flag is a first value, the step of determining one or more candidate values ​​for the suffix based on the prefix, and the step of selecting a candidate value to use for determining the suffix from one or more candidate values ​​for the suffix using an index value encoded in one or more second symbols, or, if the value of the flag is a second value, the step of determining the suffix based on at least one context-encoded symbol of one or more bits of the suffix contained in one or more second symbols, the size being based on the concatenation of the prefix and the suffix.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to reducing the amount of bit compression encoding and associated decoding of video images of a type similar to MPEG encoding. In particular, the present invention relates to the optimal encoding of vector differences, such as block vector differences for intra-prediction based on blocks at already decoded positions in the current image being decoded, or motion vectors for inter-prediction based on similar blocks in the already decoded image corresponding to another display time in the video. [Background technology]

[0002] Video encoding has enabled significant compression, making various applications possible, such as storing video in limited memory or communicating via communication mechanisms with limited bandwidth.

[0003] One principle is that for video characteristics that can be faithfully predicted by the decoder, little to no bits are needed to describe them. For example, if a block containing a sequence of text characters already exists at a previous location (if decoded correctly), fewer bits are needed to encode the location where that block can be retrieved and copy it to the one currently being decoded, rather than fully encoding the pixel color of the block. For example, if the background, such as multiple houses on a street, is panning, there is no need to transmit a separate motion vector for each block (which would mean many bits are spent encoding the motion vector, as was the case with older MPEG codecs), and most blocks are predictable from the global panning motion vector.

[0004] In later codecs, the processing power of decoders has improved (even in small devices like mobile phones), and there is a trend towards research that allows the decoder itself to accomplish as much as possible, sometimes even eliminating the need for instruction bits. For example, if the same wallpaper pattern is always displayed on the screen, the decoder can determine that subsequent blocks will also contain that wallpaper pattern, unless it is notified that other elements, such as people, are included in the block. If it is notified that people or other elements are included, it can then use a more explicit encoding method than usual.

[0005] In this first part, prediction and correction, it is also taken into consideration that some minor errors may not be visually significant to viewers of a video (e.g., a movie or television broadcast, or a video conference), and therefore some correction bits can be saved by not saving or transmitting them.

[0006] The final part of the codec utilizes mathematical techniques to transform the data elements from the first part (e.g., DCT coefficients that encode prediction errors called residuals) in a way that saves bits without introducing approximation errors. This can be achieved by utilizing the probabilities of the data elements. For example, if we know that the character "Q" does not appear as frequently as the character "A", instead of assigning an 8-bit word to every character, we can assign a codeword length below average (e.g., "10") to the character "A" and a length above average (e.g., "111110000111001") to the character "Q". For a long sequence containing N data elements, such an entropy coding algorithm requires fewer than N*8 bits. Naturally, it is necessary to have a technically sufficient understanding of the various data elements resulting from the initial prediction and correction algorithms and to probabilistically model them.

[0007] As the number of alternative predictions increases, there is always a desire to devise better algorithms that can save even more bits in the representation and entropy coding of data elements (especially vector differences). [Overview of the Initiative]

[0008] To improve the encoding of video sequences, a method is provided to derive the block offset vector difference (1810) and block offset vector prediction (1808) in order to predict the second pixel color of the second block of the first picture based on the first pixel color of the first block of the first picture, which is offset from the second block of the second picture. A step of obtaining at least one prefix (3514) of the magnitude of the block offset vector difference based on one or more first symbols in the bitstream, The process includes the step of determining at least one suffix of size based on a flag and one or more second symbols in the bitstream, wherein the step of determining the suffix is: If the flag value is the first value, A step of determining one or more candidate values ​​for the suffix based on the prefix, The steps include selecting a candidate value to use in determining the suffix from one or more candidate values ​​for the suffix, using an index value encoded in one or more second symbols, or If the value of the flag is the second value, the step includes determining the suffix based on at least one context-encoded symbol of one or more bits of the suffix contained in one or more symbols of the second, The size is based on the combination of prefixes and suffixes.

[0009] This method can be used in video decoding, for example, when receiving compressed video such as MPEG, to establish a vector difference to determine which block to predict (either intra-prediction or inter-prediction) for the block currently being decoded. This principle can be used in encoders with the necessary modifications. The encoder emulates how the decoder decodes and uses this for encoding (typically, the encoder selects the best block for prediction from the original video data based on a rate-distortion metric that balances bit depth and reconstruction quality).

[0010] The following are some examples of embodiments of the basic concept.

[0011] One method is described above where the second picture is identical to the first picture (i.e., blocks are intra-predicted from already reconstructed blocks at higher positions within the same image).

[0012] If the flag value is the first value, A step of searching for at least one candidate block for predicting a second block in at least one reference region within a first picture, wherein the at least one reference region is determined based on at least a prefix value. If multiple candidate blocks exist, the steps include ordering the multiple candidate blocks according to the degree of matching between the first template surrounding a candidate block and the corresponding second template surrounding a second block, The steps include selecting one of at least one candidate block based on the index value, The above method includes the step of determining at least one suffix based on the selected candidate block.

[0013] The above method is such that if the flag has a first value, at least one of the second or more symbols encoding the suffix is ​​CABAC bypass encoded.

[0014] The above method is such that if the flag has a second value, at least one of the second set of symbols encoding the suffix is ​​CABAC bypass encoded.

[0015] If the flag has a second value, then there is a method in which at least one context-coded symbol is an indication of whether the symbol prediction matches the corresponding symbol of the block offset vector difference.

[0016] The above method involves at least one of the symbols to be binarized being Golomb coded.

[0017] The above method includes a flag that indicates whether one or more components of the suffix are zero or greater than zero.

[0018] The steps include receiving a video sequence (108), There is a video coding method which includes the step of compressing a video sequence by predicting blocks of images in the video sequence, wherein the compression step includes a method for deriving block offset vector differences as in one of the above embodiments of the method for deriving block offset vector differences (1810).

[0019] The steps include receiving a compressed bitstream (110), There is a video decoding method which includes the step of decoding a compressed bitstream to obtain a reconstructed video sequence, wherein the decoding step includes one of the above embodiments of a method for deriving a block offset vector difference (1810).

[0020] There is a video encoder (114) having a circuit connected to memory, wherein the circuit is configured to perform one of the above embodiments of a method for deriving a block offset vector difference (1810).

[0021] There is a video decoder (120) having a circuit connected to memory, the circuit being configured to perform one embodiment of a method for deriving a block offset vector difference (1810).

[0022] A video signal comprising a data structure including encoded video data representing the magnitude of a block offset vector difference (1810), wherein the block offset vector difference represents the difference between, firstly, a block offset vector (1802) specifying the positional distance of a first block for predicting a second block, and secondly, a block offset vector prediction (1808), and the magnitude is encoded as first data encoding the prefix portion of the magnitude and second data encoding the suffix portion. The video signal further includes a flag, which, if it has a first value, indicates that the second data contains an index value that specifies one of a set of candidate vectors that specify the suffix portion, and if it has a second value, indicates that the second data contains at least one context-encoded symbol that directly encodes one or more bits of the suffix. [Brief explanation of the drawing]

[0023] Some examples of various embodiments of this disclosure will be described with reference to the drawings. [Figure 1] Figure 1 shows an exemplary video coding / decoding system to which embodiments of the present invention may be applied. [Figure 2] Figure 2 shows an exemplary encoder in which an embodiment of the present invention may be implemented. [Figure 3] Figure 3 shows an exemplary decoder in which an embodiment of the present invention may be implemented. [Figure 4] Figure 4 shows an example of a quadtree partition of a coding tree block (CTB) according to an embodiment of this disclosure. [Figure 5] Figure 5 shows a quadtree corresponding to an example of the quadtree partitioning of the CTB in Figure 4, according to an embodiment of this disclosure. [Figure 6] Figure 6 shows examples of binary and ternary tree partitioning according to the embodiments of this disclosure. [Figure 7] Figure 7 shows an example of a quadtree + multi-type tree partitioning of a CTB according to the embodiment of this disclosure. [Figure 8] Figure 8 shows a quadtree + multitype tree corresponding to an exemplary quadtree + multitype tree partition of the CTB in Figure 7, according to an embodiment of the present disclosure. [Figure 9] Figure 9 shows an example of a set of reference samples determined for intra-prediction of the current block to be encoded or decoded, according to an embodiment of the present disclosure. [Figure 10A] Figure 10A shows 35 intra-prediction modes supported by HEVC according to the embodiments of this disclosure. [Figure 10B] Figure 10B shows 67 intra-prediction modes supported by HEVC according to the embodiments of this disclosure. [Figure 11] Figure 11 shows the current block and reference sample of Figure 9 on a two-dimensional x-y plane according to an embodiment of the present disclosure. [Figure 12] Figure 12 shows an example of angular mode prediction for the current block in Figure 9 according to an embodiment of the present disclosure. [Figure 13A] Figure 13A shows an example of interpretation performed on the current block in the current picture being encoded, according to an embodiment of the present disclosure. [Figure 13B] Figure 13B shows examples of the horizontal and vertical components of a motion vector according to the embodiments of this disclosure. [Figure 14] Figure 14 shows an example of a double prediction performed on the current block according to an embodiment of this disclosure. [Figure 15A] Figure 15A shows an example of the locations of five spatial candidate neighboring blocks relative to the current block being encoded, according to an embodiment of the present disclosure. [Figure 15B] Figure 15B shows an example of the positions of two blocks that are temporally contemporaneous with respect to the current block being encoded, according to an embodiment of the present disclosure. [Figure 16]Figure 16 shows an example of IBC applied to screen content according to the embodiments of this disclosure. [Figure 17] Figure 17 shows an example implementation of a context-based adaptive binary arithmetic coding (CABAC) encoder according to the embodiment of this disclosure. [Figure 18A] Figure 18A shows an example of an IBC according to the present disclosure. [Figure 18B] Figure 18B shows an example of a BVD candidate used to entropy encode the size symbol of a BVD according to an embodiment of the present disclosure. [Figure 18C] Figure 18C shows an example of entropy coding an indication of whether the size symbol value of a BVD matches the size symbol value of a BVD candidate used as a predictor, according to an embodiment of the present disclosure. [Figure 18D] Figure 18D shows an example of an embodiment of the present disclosure in which the representation of whether the size symbol value of the BVD matches the size symbol value of a BVD candidate used as a predictor is entropy-decoded, and the BVD size symbol is determined using that representation. [Figure 19A] Figure 19A shows an example of applying the BVD encoding method described in Figure 18 to BVD code symbols according to an embodiment of this disclosure. [Figure 19B] Figure 19B shows an example of applying the BVD encoding method described in Figure 18 to BVD code symbols according to an embodiment of this disclosure. [Figure 19C] Figure 19C shows an example of applying the BVD encoding method described in Figure 18 to BVD code symbols according to an embodiment of this disclosure. [Figure 19D] Figure 19D shows an example of an embodiment of the present disclosure in which an instruction is entropy-decoded to determine whether the value of the code symbol of a BVD matches the value of the code symbol of a BVD candidate used as a predictor, and the code symbol of the BVD is determined using that instruction. [Figures 20A-20B] Figures 20A and 20B show examples of BVD representations. [Figure 21] Figure 21 shows a representation of a BVD according to a partial embodiment of this disclosure. [Figure 22A] Figure 22A shows a flowchart for decoding a BVD such as the BVD in Figure 21, according to some embodiments of this disclosure. [Figure 22B] Figure 22B shows a flowchart for encoding a BVD such as the BVD in Figure 21, according to some embodiments of this disclosure. [Figure 22C] Figure 22C shows a flowchart illustrating one aspect of the encoding method shown in Figure 22B. [Figure 22D] Figure 22D schematically shows a flowchart for determining the search region and template matching search used to determine the BVD during decoding or encoding of the BVD, as shown in Figure 22A or Figure 22B. [Figures 23A-23B] Figures 23A and 23B show alternative BVD representations of certain embodiments of this disclosure. [Figure 24A] Figure 24A shows a flowchart for decoding a BVD such as the BVD in Figures 23A and 23B, according to some embodiments of this disclosure. [Figure 24B] Figure 24B shows a flowchart for encoding a BVD such as the BVD in Figures 23A and 23B, according to some embodiments of this disclosure. [Figure 24C] Figure 24C shows a flowchart illustrating one aspect of the encoding method shown in Figure 24B. [Figures 25A-25B] Figures 25A and 25B show alternative BVD representations of certain embodiments of this disclosure. [Figure 26A] Figure 26A shows a flowchart for decoding a BVD such as the BVD in Figures 25A and 25B, according to some embodiments of this disclosure. [Figure 26B] Figure 26B shows a flowchart for encoding a BVD such as the BVD in Figures 25A and 25B, according to some embodiments of this disclosure. [Figure 27A] Figure 27A shows a flowchart of a BVD decoding method according to a partial embodiment of this disclosure. [Figure 27B]Figure 27B shows a flowchart of a BVD encoding method according to a partial embodiment of this disclosure. [Figures 28A-28B] Figures 28A and 28B show examples of how BVD size suffix information can be represented in some embodiments of this disclosure. [Figure 29A] Figure 29A shows a flowchart of a method for decoding a BVD that may include a representation of suffix information similar to that in Figure 28A or Figure 28B, according to some embodiments of the present disclosure. [Figure 29B] Figure 29B shows a flowchart of a method for encoding a BVD which may include a representation of suffix information similar to that in Figure 28A or Figure 28B, according to some embodiments of this disclosure. [Figures 30A-30B] Figures 30A and 30B show a flowchart illustrating one aspect of the method of Figure 29A for decrypting a BVD, according to a subset of the embodiments of this disclosure. [Figures 30C-30D] Figures 30C and 30D show flowcharts illustrating one aspect of the method of Figure 29B according to a partial embodiment of this disclosure. [Figure 30E] Figure 30E shows a flowchart of a template matching search performed during BVD encoding according to one embodiment of the present disclosure. [Figure 30F] Figure 30F shows a flowchart of a template matching search performed during BVD decoding according to one embodiment of the present disclosure. [Figure 31] Figure 31 shows another representation of the BVD size similar to Figures 29A and 29B, according to a subset of embodiments of this disclosure. [Figures 32A-32B] Figures 32A and 32B show a flowchart of the method of Figure 29A for decrypting a BVD, according to a subset embodiment of the present disclosure. [Figures 32C-32D] Figures 32C and 32D show a side view flowchart of the method of Figure 29B for encoding BVD according to a subset embodiment of the present disclosure. [Figure 33] Figure 33 shows another representation of the BVD size similar to Figures 29A and 29B, according to a subset of embodiments of this disclosure. [Figures 34A-34B] Figures 34A and 34B show a flowchart of the method of Figure 29A for decrypting a BVD, according to a subset of embodiments of this disclosure. [Figures 34C-34D] Figures 34C and 34D show a side view flowchart of the method of Figure 29B for encoding BVD according to a subset embodiment of the present disclosure. [Figure 35] Figure 35 shows another representation of BVD size similar to Figures 29A and 29B, according to a subset of embodiments of this disclosure. [Figures 36A-36B] Figures 36A and 36B show a side view flowchart of the method of Figure 29A for decrypting a BVD, according to a subset embodiment of the present disclosure. [Figures 36C-36D] Figures 36C and 36D show a side view flowchart of the method of Figure 29B for encoding BVD according to a subset embodiment of the present disclosure. [Figure 37] Figure 37 shows another representation of the BVD size similar to Figures 29A and 29B, according to a subset of embodiments of this disclosure. [Figures 38A-38B] Figures 38A and 38B show a flowchart of the method of Figure 29A for decoding a BVD, according to a subset of embodiments of this disclosure. [Figures 38C-38D] Figures 38C and 38D show a side view flowchart of the method of Figure 29B for encoding BVD according to a subset embodiment of the present disclosure. [Figure 39] Figure 39 shows a block diagram of an exemplary computer system capable of implementing embodiments of the present disclosure. [Modes for carrying out the invention]

[0024] The descriptions of “one embodiment,” “embodiment,” and “exemplary embodiment” in this specification indicate that such embodiments may include certain functions, structures, or characteristics, but not all embodiments necessarily include such functions, structures, or characteristics. Furthermore, if a particular function, structure, or characteristic is described in relation to an embodiment, it is within the knowledge of a person skilled in the art to apply it in relation to other embodiments, even if not explicitly described, if such function, structure, or characteristic is expected to function with the necessary modifications.

[0025] Furthermore, it should be noted that individual embodiments may be described as processes shown as flowcharts, flow diagrams, data flow diagrams, structural diagrams, or block diagrams. While flowcharts may represent operations as sequential processes, many operations can be performed in parallel or simultaneously. Also, the order of operations may change in some cases. A process terminates when its operations are complete, but it may include additional steps not illustrated. A process may correspond to a method, function, procedure, subroutine, subprogram, etc. If a process corresponds to a function, its termination may correspond to the function returning to its calling function or the main function.

[0026] The term “computer-readable media” includes, but is not limited to, portable and non-portable storage devices, as well as various other media capable of storing, holding, or transporting instructions and / or data. Computer-readable media may also include non-transient media capable of storing data and that do not contain carrier waves and / or transient electronic signals propagating over wireless or wired connections. Examples of non-transient media include, but are not limited to, optical storage media such as magnetic disks or tapes, compact discs (CDs) or digital multipurpose discs (DVDs), flash memory, memory, or memory devices. Computer-readable media may contain code and / or machine-executable instructions representing any combination of procedures, functions, subprograms, programs, routines, subroutines, modules, software packages, classes, or instructions, data structures, or program descriptions. Code segments may be coupled to other code segments or hardware circuits by passing or receiving information, data, arguments, parameters, or memory contents. Information, arguments, parameters, data, etc., may be passed, transferred, or transmitted via appropriate means such as memory sharing, message passing, token passing, or network transmission.

[0027] Furthermore, embodiments can be implemented by hardware, software, firmware, middleware, microcode, hardware description language, or any combination thereof. When implemented by software, firmware, middleware, or microcode, program code or code segments (e.g., a computer program product) for performing the required tasks may be stored in a computer-readable or machine-readable medium. A processor may perform the required tasks.

[0028] Representing a video sequence in digital format may require a large number of bits. The data size of a video sequence in digital format can be too large for storage and / or transmission in many applications. Video encoding may be used to compress the size of a video sequence, enabling more efficient storage and / or transmission. Video decoding may be used to decompress a compressed video sequence for display and / or other forms of consumption.

[0029] Figure 1 shows an exemplary video encoding / decoding system 100 to which embodiments of the present invention may be applied. The video encoding / decoding system 100 includes a source device 102, a transmission medium 104, and a destination device 106. The source device 102 encodes a video sequence 108 into a bitstream 110 for more efficient storage and / or transmission. The source device 102 can store the bitstream 110 and / or transmit it to the destination device 106 via the transmission medium 104. The destination device 106 decodes the bitstream 110, for example, to display the video sequence 108. The destination device 106 can receive the bitstream 110 from the source device 102 via the transmission medium 104. The source device 102 and destination device 106 can be any of a variety of devices, such as a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video game console, set-top box, or video streaming device. For example, the source device may be operated by a consumer or it may be in a professional environment. In the latter case, for example, a real-time broadcast from the studio could be sent to consumers based on selective capture by multiple cameras. Transmission could take place, for example, via a television signal cable network or the internet.

[0030] To encode the video sequence 108 into a bitstream 110, the source device 102 may include a video source 112, an encoder 114, and an output interface 116. The video source 112 may provide or generate the video sequence 108 from captures of natural scenes and / or composite-generated scenes. Composite-generated scenes may include computer graphics or screen content. The video source 112 may include a video capture device (e.g., a video camera), a video archive containing previously captured natural scenes and / or composite-generated scenes, a video feed interface that receives natural scenes and / or composite-generated scenes captured from a video content provider, and / or a processor that generates composite scenes.

[0031] As shown in Figure 1, a video sequence, such as video sequence 108, may contain a series of pictures (also called frames). A video sequence can give the impression of motion when the pictures of the video sequence are displayed sequentially using a fixed or variable time. A picture may contain one or more intensity value sample sequences. Intensity values ​​may be obtained at positions placed at regular intervals within the picture. A color picture typically contains a sample sequence that encodes luminance or brightness, and two chrominance sample sequences that encode the intrinsic color, i.e., hue and saturation. The luminance sample sequence may contain intensity values ​​representing the brightness (or luma component, Y) of the picture. The chrominance sample sequences, apart from brightness, may contain intensity values ​​representing the blue and red excess components (or chroma components, Cb and Cr) of the picture, respectively. Other color picture sample sequences based on different color schemes are also possible (for example, in the RGB color scheme, an 8-bit R value non-linearly encodes the amount of red in additive mixing, and G and B non-linearly encode the amounts of green and blue, respectively). In the case of a color picture, a pixel can refer to all three intensity values ​​at a specific position in the three-sample sequence used to represent the color picture. A monochrome picture contains a single luma sample sequence.

[0032] The encoder 114 may encode the video sequence 108 into a bitstream 110. To encode the video sequence 108, the encoder 114 may apply one or more prediction techniques to reduce redundant information in the video sequence 108. Redundant information refers to information that may be predicted by the decoding side and may not necessarily need to be transmitted for accurate decoding. For example, the encoder 114 may apply spatial prediction (e.g., intra-frame prediction or intra-prediction), temporal prediction (e.g., inter-frame prediction or inter-prediction), inter-layer prediction, and / or other prediction techniques to reduce redundant information in the video sequence 108. Thus, the bitstream contains predicted and corrected data, which are typically included as bit sets that can be uniquely decoded by the decoder. Before applying one or more prediction techniques, the encoder 114 may divide the pictures of the video sequence 108 into rectangular regions called “blocks” (e.g., 64x64 pixel blocks). The encoder 114 may then encode the blocks using one or more prediction techniques.

[0033] For time prediction, encoder 114 may search for a block similar to the block to be encoded in another picture (also called a reference picture) of video sequence 108. The block determined by the search (also called a prediction block) may be used to predict the block to be encoded. Some encoders may explicitly encode the block position in the previous image that best predicts the current block by including the motion vector in the encoded bitstream. For spatial prediction, encoder 114 may form a prediction block based on data from reconstructed samples adjacent to the block to be encoded within the same picture of video sequence 108. Reconstructed samples refer to samples that have been encoded and then decoded. Encoder 114 may determine a prediction error (also called a residual) based on the difference between the block to be encoded and the prediction block. The prediction error may represent non-redundant information that can be sent to the decoder to accurately decode the video sequence. For each block, the decoder determines which prediction is best to use, how many residual bits to add (e.g., perform strong quantization), and compares the required data rate with the resulting reconstruction error (i.e., the accuracy of the reconstruction). Then, based on a comparison of these two requirements, the optimal option is determined, and the data for that option is put into the bitstream (if the encoder does not rely on the decoder to derive the pixel color itself from known data, the amount of data communicated may be small enough to be merely an indicator that an implicit encoding model is being used).

[0034] The encoder 114 may generate conversion coefficients by applying a transformation (e.g., a discrete cosine transform (DCT)) to the prediction error. The encoder 114 may form the bitstream 110 based on the conversion coefficients and other information used to determine the prediction block (e.g., prediction type, motion vector, and prediction mode). In some examples, the encoder 114 may perform one or more of quantization and entropy coding on the conversion coefficients and / or other information used to determine the prediction block before forming the bitstream 110 to further reduce the number of bits required to store and / or transmit the video sequence 108.

[0035] The output interface 116 may be configured to write and / or store the bitstream 110 in the transmission medium 104 for transmission to the destination device 106. Alternatively, the output interface 116 may be configured to send, upload, and / or stream the bitstream 110 to the destination device 106 via the transmission medium 104.

[0036] The output interface 116 may include a wired and / or wireless transmitter, which may be configured to transmit, upload, and / or stream the bitstream 110 in accordance with one or more proprietary or standardized communication protocols, such as the DVB (Digital Video Broadcasting) standard, the ATSC (Advanced Television Systems Committee) standard, the ISDB (Integrated Services Digital Broadcasting) standard, the DOCSIS (Data Over Cable Service Interface Specification) standard, the 3GPP® (3rd Generation Partnership Project) standard, the IEEE (Institute of Electrical and Electronics Engineers) standard, the IP (Internet Protocol) standard, and the WAP (Wireless Application Protocol) standard. Further formatting processing, such as channel coding, may be involved, but this is usually outside the scope of this technology, which primarily focuses on techniques for optimally encoding the visual data of video images.

[0037] The transmission medium 104 may include wireless, wired, and / or computer-readable media. For example, the transmission medium 104 may include one or more wires, cables, wireless interfaces, optical discs, flash memory, and / or magnetic memory. Furthermore or alternatively, the transmission medium 104 may include one or more networks (e.g., the Internet) or file servers configured to store and / or transmit the encoded video data. For example, the video may be transmitted to a Content Delivery Network (CDN). This technology may be used by the original creator of the video to deliver it to end users via a CDN as a final product, or the method described may be applied to a CDN server, for example, to perform transcoding of the original video.

[0038] To decode the bitstream 110 into a displayable video sequence 108, the destination device 106 may include an input interface 118, a decoder 120, and a video display 122. The input interface 118 may be configured to read the bitstream 110 stored in the transmission medium 104 by the source device 102 and apply all necessary deformatting and other acquisition actions (e.g., demodulation). Alternatively, the input interface 118 may be configured to receive, download, and / or stream the bitstream 110 from the source device 102 via the transmission medium 104. The input interface 118 may include a wired and / or wireless receiver configured to receive, download, and / or stream the bitstream 110 according to one or more proprietary and / or standardized communication protocols as described above.

[0039] Decoder 120 may decode video sequence 108 from the encoded bitstream 110. For example, one of the MPEG video decoding protocols may be used. To decode video sequence 108, decoder 120 may generate prediction blocks of the pictures of video sequence 108 in a similar manner to encoder 114 and determine the prediction error of the blocks based on residual data of the blocks to be decoded, obtained from the received stream. Decoder 120 may generate prediction blocks using the prediction type, prediction mode, and / or motion vector received in bitstream 110 and determine the prediction error using the transformation coefficients also received in bitstream 110. Decoder 120 may determine the prediction error by weighting the transformation basis function with the transformation coefficients. Decoder 120 may decode video sequence 108 by combining the prediction blocks and prediction errors. In some cases, the decoder 120 may decode a video sequence that approximates the video sequence 108, for example, due to lossy compression of the video sequence 108 by the encoder 114 and / or errors introduced into the encoded bitstream 110 during transmission to the destination device 106.

[0040] A video display 122 (not an essential component of all devices having a decoder relating to this principle) may display the video sequence 108 to the user. The video display 122 may include a CRT display, LCD, plasma display, LED display, or other display device suitable for displaying the video sequence 108.

[0041] It should be noted that the video encoding / decoding system 100 is presented as an example, not an limitation. In the example in Figure 1, the video encoding / decoding system 100 may have other components and / or arrangements. For example, the video source 112 may be located outside the source device 102. Similarly, the video display 122 may be located outside the destination device 106, or may be omitted entirely if the video sequence is intended for use by a machine and / or storage device. In another example, the source device 102 may further have a video decoder and the destination device 106 may have a video encoder. In such an example, the source device 102 may further be configured to receive an encoded bitstream from the destination device 106 to support bidirectional video transmission between devices.

[0042] In the example in Figure 1, the encoder 114 and decoder 120 can operate according to one of numerous proprietary or industry-standard video coding standards. For example, the encoder 114 and decoder 120 may operate according to one or more of the following: ITU-T (Telecommunications Union Telecommunication Standardization Sector) H.263, ITU-T H.264 and MPEG (Moving Picture Expert Group)-4 Part 10 (also known as AVC (Advanced Video Coding)), ITU-T H.265 and MPEG-H Part 2 (also known as HEVC (High Efficiency Video Coding)), ITU-T H.265 and MPEG-I Part 3 (also known as VVC (Versatile Video Coding)), WebM VP8 and VP9 codecs, and AV1 (AOMedia Video1).

[0043] Figure 2 shows an exemplary encoder 200 in which embodiments of the present invention may be implemented. As will be understood by those skilled in the art, the corresponding video decoder has some electronic circuit blocks similar to those of the encoder, in particular the inter-prediction unit 206 and intra-prediction unit 208 in which embodiments of the present innovation may be used (and format processing may be present after prediction, for example, in or before the entropy coding circuit). It should be noted, however, that it does not start as input from the original video sequence to be encoded, but from encoded and compressed data, which is then reconstructed at the decoder's output to approximate the original video sequence. However, the prediction process follows the same process as the encoder. Physically, these circuit blocks (processing blocks connected to persistent and / or temporary data memory) may typically be located in hardware-accelerated circuits such as ASICs in some devices, but may be executed as software running on a CPU or the like in other devices. The encoder 200 encodes the video sequence 202 into a bitstream 204 for more efficient storage and / or transmission. The encoder 200 may be implemented in the video encoding / decoding system 100 shown in Figure 1, or in any of the various devices such as a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video game console, set-top box, or video streaming device. The encoder 200 includes an inter-prediction unit 206, an intra-prediction unit 208, combiners 210 and 212, a transform and quantization unit (TR+Q) 214, an inverse transform and inverse quantization unit (iTR+iQ) 216, an entropy encoding unit 218, one or more filters 220, and a buffer 222.

[0044] The encoder 200 may divide the pictures of the video sequence 202 into blocks and encode the video sequence 202 block by block. The encoder 200 may perform prediction techniques on the blocks to be encoded using either the inter-prediction unit 206 or the intra-prediction unit 208. The inter-prediction unit 206 may perform inter-prediction by searching for blocks similar to the blocks to be encoded in another reconstructed picture (also called a reference picture) of the video sequence 202. A reconstructed picture refers to a picture that has been encoded and then decoded. The blocks determined by the search (also called prediction blocks) may be used to reduce redundant information by predicting the blocks to be encoded. The inter-prediction unit 206 may determine prediction blocks by utilizing the temporal redundancy or similarity of scene content between pictures in the video sequence 202. For example, the scene content between pictures in the video sequence 202 may be similar except for differences due to the movement of screen content over time or affine transformations.

[0045] The intra-prediction unit 208 may perform intra-prediction by forming prediction blocks based on data from reconstructed samples adjacent to the block to be encoded within the same picture of the video sequence 202. Reconstructed samples refer to samples that have been encoded and then decoded. The intra-prediction unit 208 may determine prediction blocks by utilizing the spatial redundancy or similarity of scene content within the picture of the video sequence 202. For example, the texture of a scene content region within a picture may be similar to the textures surrounding that region within the same picture.

[0046] After prediction, the combiner 210 may determine a prediction error (also called a residual) based on the difference between the block to be encoded and the predicted block. The prediction error may represent non-redundant information that can be sent to the decoder to accurately decode the video sequence.

[0047] The transformation and quantization unit 214 may transform and quantize the prediction error. The transformation and quantization unit 214 may convert the prediction error into transformation coefficients by, for example, applying DCT to reduce correlation information within the prediction error. The transformation and quantization unit 214 may quantize the coefficients by mapping the data of the transformation coefficients to a predefined set of representative values. The transformation and quantization unit 214 may quantize the coefficients to reduce unwanted information in the bitstream 204. Unwanted information refers to information that can be removed from the coefficients without causing visual and / or perceptual distortion in the decoded video sequence 202.

[0048] The entropy coding unit 218 may further reduce the bitrate by applying one or more entropy coding methods to the quantized transformation coefficients. For example, the entropy coding unit 218 may apply CAVLC (context adaptive variable length coding), CABAC (context adaptive binary arithmetic coding), and SBAC (syntax-based context-based binary arithmetic coding). The entropy-coded coefficients are packed to form a bitstream 204.

[0049] The inverse transform and inverse quantization unit 216 may inverse quantize and inverse transform the quantized transform coefficients to determine the reconstructed prediction error. The combiner 212 may combine the reconstructed prediction error with the prediction block to form a reconstructed block. The filter 220 may filter the reconstructed block using, for example, a deblocking filter and / or a sample-adaptive offset (SAO) filter. The buffer 222 may store the reconstructed block to predict one or more other blocks in the same picture and / or different pictures of the video sequence 202.

[0050] Although not shown in Figure 2, the encoder 200 may further include an encoder control unit configured to control one or more units of the encoder 200 shown in Figure 2. The encoder control unit may control one or more units of the encoder 200 so that the bitstream 204 is generated in accordance with the requirements of various proprietary or industry video encoding standards. For example, the encoder control unit may control one or more units of the encoder 200 so that the bitstream 204 is generated in accordance with one or more of the ITU-T H.263, AVC, HEVC, VVC, VP8, VP9, ​​and AV1 video encoding standards.

[0051] Within the constraints of proprietary or industry video encoding standards, the encoder control unit may attempt to minimize or reduce the bitrate of bitstream 204 and maximize or improve the reconstructed video quality. For example, the encoder control unit may attempt to minimize or reduce the bitrate of bitstream 204, provided that the reconstructed video quality does not fall below a predetermined level, or it may attempt to maximize or improve the reconstructed video quality, provided that the bitrate of bitstream 204 does not exceed a predetermined level. The encoder control unit may determine / control dividing the pictures of video sequence 202 into blocks, whether the blocks are inter-predicted by inter-prediction unit 206 or intra-prediction unit 208, motion vectors for inter-prediction of blocks, a specific intra-prediction mode from a plurality of intra-prediction modes for intra-prediction of blocks, filtering performed by filter 220, and one or more transformation types and / or quantization parameters applied by transformation and quantization unit 214. The encoder control unit may determine / control the above matters based on how the determination / control affects the rate distortion scale of the block or picture to be encoded. Alternatively, the encoder control unit may determine / control the above matters in order to reduce the rate distortion scale of the block or picture to be encoded.

[0052] After the decision, the prediction type used to encode the block (intra-prediction or inter-prediction), the block's prediction information (intra-prediction mode, motion vector, etc., in the case of intra-prediction), and the transformation and quantization parameters are sent to the entropy coding unit 218, where they may be further compressed to reduce the bitrate. For example, the entropy coding unit 218 may apply CAVLC (context adaptive variable length coding), CABAC (context adaptive binary arithmetic coding), and SBAC (syntax-based context-based binary arithmetic coding) to compress the prediction type used to encode the block (intra-prediction or inter-prediction), the block's prediction information (intra-prediction mode, motion vector, etc., in the case of intra-prediction), and the transformation and quantization parameters. The prediction type, prediction information, and transformation and quantization parameters may be packed together with the prediction error to form the bitstream 204.

[0053] It should be noted that encoder 200 is presented as an example, not an limitation. In other examples, encoder 200 may have other components and / or configurations. For example, one or more of the components shown in Figure 2 may optionally be included in encoder 200 (e.g., entropy coding unit 218 and filter 220).

[0054] Figure 3 shows an exemplary decoder 300 in which embodiments of the present invention may be implemented. The decoder 300 may decode the bitstream 302 to produce a decoded video sequence for display and / or other use. The decoder 300 may be implemented in the video encoding / decoding system 100 of Figure 1, or in any of a variety of devices such as a desktop computer, laptop computer, tablet computer, smartphone, wearable device, television, camera, video game console, set-top box, or video streaming device. The decoder 300 may include an entropy decoding unit 306, an inverse transform and inverse quantization (iTR+iQ) unit 308, a combiner 310, one or more filters 312, a buffer 314, an inter-prediction unit 316, and an intra-prediction unit 318.

[0055] Although not shown in Figure 3, the decoder 300 may further include a decoder control unit configured to control one or more units of the decoder 300 shown in Figure 3. The decoder control unit may control one or more units of the decoder 300 so that the bitstream 302 is decoded in accordance with the requirements of various proprietary or industry video coding standards. For example, the decoder control unit may control one or more units of the decoder 300 so that the bitstream 302 is decoded in accordance with one or more of the ITU-T H.263, AVC, HEVC, VVC, VP8, VP9, ​​and AV1 video coding standards.

[0056] The decoder control unit may determine / control whether a block is interpredicted by the interprediction unit 316 or intrapredicted by the intraprediction unit 318, a specific intraprediction mode from among several intraprediction modes for the intraprediction of the block, filtering performed by the filter 312, and one or more inverse transform types and / or inverse quantization parameters applied by the inverse transform and inverse quantization unit 308. One or more of the control parameters used by the decoder control unit may be packed into the bitstream 302.

[0057] The entropy decoding unit 306 may entropy decode the bitstream 302. For example, the entropy decoding unit 306 may apply CAVLC (context adaptive variable length coding), CABAC (context adaptive binary arithmetic coding), and SBAC (syntax-based context-based binary arithmetic coding) to decode the prediction type used to encode the block (intra-prediction or inter-prediction), the prediction information of the block (intra-prediction mode, motion vector, etc., in the case of intra-prediction), and the transform and quantization parameters. The inverse transform and inverse quantization unit 308 may inverse quantize and inverse transform the quantized transform coefficients to determine the decoded prediction error. The combiner 310 may combine the decoded prediction error with the prediction block to form a decoded block. The prediction block may be generated by the intra-prediction unit 318 or the inter-prediction unit 316, as described above with respect to the encoder 200 in Figure 2. Filter 312 may filter the decoded blocks, for example, using a deblocking filter and / or a sample-adaptive offset (SAO) filter. Buffer 314 may store the decoded blocks to predict one or more other blocks in the same and / or different pictures of the video sequence in the bitstream 302. The decoded video sequence 304 may be output from filter 312 as shown in Figure 3.

[0058] It should be noted that decoder 300 is presented as an example, not an limitation. In other examples, decoder 300 may have other components and / or configurations. For example, one or more of the components shown in Figure 2 may optionally be included in decoder 300 (e.g., entropy decoding unit 306 and filter 312).

[0059] Furthermore, although not shown in Figures 2 and 3, the encoder 200 and decoder 300 may each have an intrablock copy unit in addition to the interprediction unit and intraprediction unit. The intrablock copy unit operates similarly to the interprediction unit but can predict blocks within the same picture. For example, the intrablock copy unit may utilize repeating patterns that appear in the screen content. The screen content may include, for example, computer-generated text, graphics, and animations.

[0060] As described above, video encoding and decoding may be performed in blocks. The process of dividing a picture into blocks may be performed adaptively based on the content of the picture. For example, encoding efficiency may be improved by using larger block divisions in picture areas with high homogeneity.

[0061] In HEVC, the picture may be divided into non-overlapping square blocks (called coding tree blocks (CTBs)) containing samples of the sample sequence. n x2 nThe CTB may have a sample size, where n may be specified by a parameter of the coding system. For example, n may be 4, 5, or 6. The CTB may be further divided by recursive quadtree partitioning into coding blocks (CBs) that are half the size vertically and horizontally. The CTB forms the root of the quadtree. CBs that are not further divided as part of the recursive quadtree partitioning may be called leaf CBs of the quadtree, and others may be called non-leaf CBs. CBs may have a minimum size specified by a parameter of the coding system. For example, the minimum size of a CB may be 4x4, 8x8, 16x16, 32x32, or 64x64 samples. For interprediction and intraprediction, the CB may be further divided into one or more prediction blocks (PBs). PBs may be rectangular blocks of samples to which the same prediction type / mode may be applied. For transformations, the CB may be divided into one or more transformation blocks (TBs). TBs may be rectangular blocks of samples to which the applied transformation size may be determined.

[0062] Figure 4 shows an example of a quadtree partition of CTB400. This is an illustrative example, and not all codecs are required to employ such an encoding structure, nor is it essential to the technology of the present invention. What is usually common is that there are parts of the picture that have already been reconstructed, usually one or more regions, and the remaining parts that have not yet been reconstructed and will be reconstructed as the received bitstream is decoded. Typically, the picture is reconstructed from left to right and from top to bottom. Figure 5 shows the quadtree 500 corresponding to the exemplary quadtree partition of CTB400 in Figure 4. As shown in Figures 4 and 5, CTB400 is first divided into four CBs, each half vertically and horizontally. Three of the CBs resulting from the first level partition of CTB400 are leaf CBs. The three leaf CBs in the first level partition of CTB400 are labeled 7, 8, and 9 in Figures 4 and 5, respectively. The non-leaf CBs of the first level partition of CTB400 are divided into four sub-CBs, each half vertically and half horizontally. Three of the sub-CBs resulting from the second level division of the CTB400 are leaf CBs. The three leaf CBs in the second level division of the CTB400 are labeled 0, 5, and 6 in Figures 4 and 5, respectively. Finally, the non-leaf CBs in the second level division of the CTB400 are divided into four leaf CBs, each half the size vertically and half the size horizontally. The four leaf CBs are labeled 1, 2, 3, and 4 in Figures 4 and 5, respectively.

[0063] Overall, CTB400 is divided into 10 leaf CBs, each labeled 0 through 9. The resulting quadtree partition of CTB400 is traversed using a Z-scan (left to right, top to bottom) to form a sequence order for encoding / decoding the CB leaf nodes. The numerical labels of each CB leaf node in Figures 4 and 5 correspond to the encoding / decoding sequence order, with CB leaf node 0 being encoded / decoded first and CB leaf node 9 being encoded / decoded last. Note that, although not shown in Figures 4 and 5, each CB leaf node may contain one or more PBs and TBs.

[0064] In VVC, pictures can be partitioned in a similar manner to HEVC. First, a picture may be partitioned into non-overlapping square CTBs. The CTBs may then be partitioned by recursive quadtree partitioning into CBs that are half the size vertically and horizontally. In VVC, quadtree leaf nodes may be further partitioned by binary or ternary trees into CBs of unequal sizes. Figure 6 shows examples of binary and ternary tree partitioning. Binary tree partitioning can divide the parent block in half vertically by 602 or horizontally by 604. The resulting size may be half that of the parent block. Ternary tree partitioning can divide the parent block into three parts vertically by 606 or horizontally by 608. In ternary tree partitioning, the middle part may be twice the size of the other two end parts.

[0065] With the addition of binary and ternary tree partitions, the block partitioning strategy in VVC is sometimes referred to as "quadrutree + multitype tree partitioning." Figure 7 shows an example of quadrutree + multitype tree partitioning for CTB700. Figure 8 shows quadrutree + multitype tree 800, which corresponds to the exemplary quadrutree + multitype tree partitioning for CTB700 in Figure 7. In both Figures 7 and 8, quadrutree partitions are shown with solid lines, and multitype tree partitions are shown with dashed lines. For simplicity of explanation, CTB700 is shown with the same quadrutree partitioning as CTB400 described in Figure 4. Therefore, the explanation of the quadrutree partitioning for CTB700 is omitted. The explanation of the additional multitype tree partitioning for CTB700 is done in relation to the three leaf CBs shown in Figure 4, which are further partitioned using one or more binary and ternary tree partitions. The three leaf CBs in Figure 4, shown as further partitioned in Figure 7, are leaf CB5, 8, and 9.

[0066] Starting from leaf CB5 in Figure 4, Figure 7 shows that this leaf CB is split into two CBs based on a vertical binary tree partition. The resulting two CBs are leaf CBs, labeled 5 and 6 in Figures 7 and 8, respectively. For leaf CB8 in Figure 4, Figure 7 shows that this leaf CB is split into three CBs based on a vertical ternary tree partition. Two of the resulting three CBs are leaf CBs, labeled 9 and 14 in Figures 7 and 8, respectively. The remaining non-leaf CB is first split into two CBs based on a horizontal binary tree partition, one of which is leaf CB10. The other CB is further split into three CBs based on a vertical ternary tree partition, resulting in three leaf CBs, labeled 11, 12, and 13 in Figures 7 and 8, respectively. Finally, for leaf CB9 in Figure 4, Figure 7 shows that this leaf CB is split into three CBs based on a horizontal ternary tree partition. Of the three resulting CBs, two are leaf CBs, labeled 15 and 19 in Figures 7 and 8, respectively. The remaining non-leaf CB is split into three CBs based on another horizontal ternary tree partition, and all three resulting CBs are leaf CBs, labeled 16, 17, and 18 in Figures 7 and 8, respectively.

[0067] Overall, CTB700 is divided into 20 leaf CBs, each labeled 0 through 19. The resulting quadtree-+multitree type partition of CTB700 is traversed using a Z-scan (left to right, top to bottom) to form a sequence order for encoding / decoding the CB leaf nodes. The numerical labels of each CB leaf node in Figures 7 and 8 correspond to the encoding / decoding sequence order, with CB leaf node 0 being encoded / decoded first and CB leaf node 19 being encoded / decoded last. Note that, although not shown in Figures 7 and 8, each CB leaf node may contain one or more PBs and TBs.

[0068] In addition to defining various blocks (e.g., CTB, CB, PB, TB), HEVC and VVC also define various units. While a block is a rectangular region within a sample sequence, a unit may contain sample blocks at the same location in different sample sequences that make up a picture (e.g., luma / saturation sample sequences), as well as the syntactic elements and prediction data of the block. A coding tree unit (CTU) may contain CTBs at the same location in different sample sequences and may form a complete entity within the encoded bitstream. A coding unit (CU) may contain CBs at the same location in different sample sequences and the syntactic structure for encoding the samples of that CB. A prediction unit (PU) may contain PBs at the same location in different sample sequences and the syntactic elements for predicting that PB. A transformation unit (TU) may contain TBs in different sample sequences and the syntactic elements for transforming that TB.

[0069] The term "block" in the context of HEVC and VVC may refer to one of the following: CTB / CB / PB / TB / CTU / CU / PU / TU. Furthermore, it may refer to a similar data structure in the context of other video encoding standards. For example, it may refer to a macroblock in AVC, a macroblock or subblock in VP8, a superblock or subblock in VP9, ​​or a superblock or subblock in AV1.

[0070] In intra-prediction, samples in the block to be encoded (also called the "current block") may be predicted from samples in columns adjacent to the leftmost column of the current block and samples in rows adjacent to the top row of the current block. The adjacent column and row samples may be collectively called reference samples. Each sample in the current block may be predicted by projecting the position of the sample in the current block onto a point along the reference samples in a given direction (also called the intra-prediction mode). If the projection point does not fall on a reference sample, the predicted sample may be obtained by interpolating between the two reference samples closest to the projection point. The prediction error (also called the residual) of the current block may be determined based on the difference between the predicted sample value of the current block and the original sample value.

[0071] In an encoder, this process of predicting samples and calculating prediction errors may be performed for several different intra-prediction modes, including a non-directional intra-prediction mode. The encoder may select one of the several intra-prediction modes and its corresponding prediction error to encode the current block. For decoding the current block, the encoder may send a representation of the selected prediction mode and its corresponding prediction error to the decoder. The decoder may use the intra-prediction mode indicated by the encoder to predict the samples of the current block and decode the current block by combining the predicted samples and prediction errors.

[0072] Figure 9 shows an example of a set of reference samples 902 determined for intra-prediction of the current block 904 to be encoded or decoded. In Figure 9, the current block 904 corresponds to block 3 of the partitioned CTB700 in Figure 7. As explained above, the numerical labels 0-19 of the blocks in the partitioned CTB700 correspond to the sequence order for encoding / decoding the blocks, and are used in this way in the example in Figure 9.

[0073] If the current block 904 is w × h samples, then reference sample set 902 may extend across 2w samples in the row adjacent to the top row of the current block 904, 2h samples in the column adjacent to the leftmost column of the current block 904, and the sample adjacent to the top-left corner of the current block 904. In Figure 9, since the current block 904 is a square, w=h=s. To construct the reference sample set 902, samples available from adjacent blocks of the current block 904 (i.e., already reconstructed by the decoder) can be used. For example, if a sample lies outside the picture range of the current block, if a sample belongs to a different slice than the current block (if the concept of slices is used), and / or if a sample belongs to an inter-encoded block and a constrained intra-prediction is shown, that sample may not be available to construct the reference sample set 902. If a constrained intra-prediction is shown, the intra-prediction may not depend on the inter-predicted block.

[0074] Furthermore, samples unavailable for construction of the reference sample set 902 include samples within blocks that have not been encoded and reconstructed by the encoder or decoded by the decoder, based on the encoding / decoding sequence order. This limitation ensures that the same prediction results can be determined by both the encoder and the decoder. In Figure 9, samples from neighboring blocks 0, 1, and 2 may be available for construction of the reference sample set 902, provided that these blocks are encoded and reconstructed by the encoder and decoded by the decoder before the current block 904 is encoded. This assumes that there are no other factors preventing such use. On the other hand, due to the encoding / decoding sequence order, some of the reference sample set 902 from neighboring block 6 may be unavailable.

[0075] Unavailable reference samples 902 may be filled with available reference samples. For example, an unavailable reference sample may be filled with the nearest available reference sample obtained by traversing reference sample 902 clockwise from its position. If no reference samples are available, reference sample 902 is filled with the median of the dynamic range of the picture being encoded (for example, a brightness value of 128 for 8-bit brightness).

[0076] The reference sample 902 may be filtered based on the size of the current block 904 being encoded and the intra-prediction mode applied. In this case, the luminance value may be replaced by a weighted combination of the luminance values ​​of adjacent pixels. Figure 9 is merely one example of how the reference sample is determined in intra-prediction of a block. In some proprietary and industry-standard video encoding specifications, the reference sample may be determined in a different way than described above. For example, in some cases, multiple reference lines may be used, as is the case in VVC.

[0077] After a reference sample 902 is determined and optionally filtered, samples in the current block 904 may be intra-predicted based on the reference sample 902. Most encoders / decoders support multiple intra-prediction modes according to one or more video coding criteria. Of these predictions, one or more may be selected if deemed appropriate (otherwise, they are deemed inappropriate for the current block being reconstructed and discarded). For example, HEVC supports 35 intra-prediction modes, including planar mode, DC mode, and 33 angular mode (the technical definition and meaning of angular mode is to obtain a pixel from multiple reference samples by following one of 33 angles from the pixel position being reconstructed). VVC supports 67 intra-prediction modes, including planar mode, DC mode, and 65 angular mode. Planar mode (not angular mode) and DC mode may be used to predict smooth, gradually changing areas of a picture. For example, DC mode calculates the average luminance of the reference samples. Angular mode may be used to predict directional structures within a picture. For example, when predicting pixel blocks of a skyscraper in an image, windows and walls between windows may form a distinct vertical structure. In this case, a linear downward angle prediction, copying values ​​from above, would be a suitable predictor for the values ​​below along the same vertical line. Even if changes do actually occur in the predictor (e.g., differences in local lighting, unexpected additional structures, or another object in the foreground), such changes are usually expected to be small and / or infrequent, making the prediction worthwhile.

[0078] Figure 10A shows the 35 intra-prediction modes supported by HEVC. The 35 intra-prediction modes are identified by indices 0 to 34. Prediction mode 0 corresponds to the planar mode. Prediction mode 1 corresponds to the DC mode. Prediction modes 2 to 34 correspond to the angular modes. Prediction modes 2 to 18 are sometimes called (effectively) horizontal prediction modes because they predict mainly from the horizontal direction (strictly speaking, they are not horizontal, but predictor 10 corresponds to this). Prediction modes 19 to 34 are sometimes called vertical prediction modes because they predict mainly from the vertical direction.

[0079] Figure 10B shows the 67 intra-prediction modes supported by VVC. The 67 intra-prediction modes are identified by indices 0 to 66. Prediction mode 0 corresponds to the planar mode. Prediction mode 1 corresponds to the DC mode. Prediction modes 2 to 66 correspond to the angular mode. Prediction modes 2 to 34 are sometimes called horizontal prediction modes because they primarily predict from the horizontal direction. Prediction modes 35 to 66 are sometimes called vertical prediction modes because they primarily predict from the vertical direction. Because the blocks of VVC may not be square, some of the intra-prediction modes shown in Figure 10B may be adaptively replaced in the wide-angle direction.

[0080] See Figures 11 and 12 for how the intra-prediction mode is applied to determine the prediction for the current block. In Figure 11, the current block 904 and reference sample 902 in Figure 9 are shown in a two-dimensional xy-plane, where the sample may be represented as p[x][y]. To simplify the prediction process, the reference sample 902 may be arranged as two one-dimensional arrays. The reference sample 902 on the current block 904 may be arranged as a one-dimensional array ref1[x].

number

number

[0081] In planar mode, a sample at the current position [x][y] within block 904 may be predicted by calculating the average of two interpolation values. Of the two interpolation values, the first may be based on horizontal linear interpolation at the current position [x][y] within block 904. Of the two interpolation values, the second may be based on vertical linear interpolation at the current position [x][y] within block 904. The predicted sample p[x][y] within the current block 904 is calculated by the following equation:

number

number

number

[0082] In DC mode, the sample at position [x][y] in the current block 904 may be predicted by the mean value of the reference sample 902. The predicted sample p[x][y] may be calculated by the following formula:

number

[0083] In angular mode, a sample at position [x][y] in the current block 904 may be predicted by projecting its position [x][y] onto a point on a horizontal or vertical line containing the reference sample 902 in the direction defined by the given angular mode. If the projection point does not fall on the reference sample, the sample at position [x][y] may be predicted by interpolating between the two reference samples closest to the projection point. The direction specified by the angular mode may be given by an angle φ defined with respect to the y-axis in the case of vertical prediction modes (e.g., modes 19-34 of HEVC and modes 35-66 of VVC) and with respect to the x-axis in the case of horizontal prediction modes (e.g., modes 2-18 of HEVC and modes 2-34 of VVC).

[0084] Figure 12 shows the prediction of a sample at position [x][y] in the current block 904 in vertical prediction mode 906 defined by angle φ. In vertical prediction mode, the current position [x][y] in block 904 is projected onto a point on the horizontal line of reference sample ref1[x] (hereinafter referred to as the "projection point"). In Figure 12, only some reference samples 902 are shown for simplicity of explanation. In the example in Figure 12, since the projection point is at a fractional sample position between two reference samples, the predicted sample p[x][y] in the current block 904 may be calculated by linear interpolation between these two reference samples using the following formula.

number

number

number

[0085] In the case of the horizontal prediction mode, the position [x][y] of the sample in the current block 904 may be projected onto the vertical line of the reference sample ref2[y]. The sample prediction in the horizontal prediction mode is given by the following formula. [Number] Here, i i is the integer part of the vertical displacement of the projection point with respect to the position [x][y], and may be calculated by the following formula as a function of the tangent of the angle φ in the horizontal prediction mode. [Number] Also, i f is the fractional part of the vertical displacement of the projection point with respect to the position [x][y], and may be calculated by the following formula. [Number] Here, [Number] represents the integer truncation.

[0086] (7) and (10)'s interpolation functions can be implemented as a set of 2-tap finite impulse response (FIR) filters by an encoder or a decoder such as the encoder 200 in FIG. 2 or the decoder 300 in FIG. 3. The coefficients of the 2-tap FIR filter may be given by (1 - i f ) and i f respectively. In the above example of angular intra prediction, the predicted sample p[x][y] may be calculated with a predetermined sample accuracy such as 1 / 32 sample accuracy. In the case of 1 / 32 sample accuracy, the set of 2-tap FIR interpolation filters is the fractional part i of the projection displacement fIt can include up to 32 different 2-tap FIR interpolation filters, corresponding to 32 possible values. In other examples, different sample accuracies may be used.

[0087] In one embodiment, a 2-tap interpolation FIR filter may be used to predict the color difference sample. A different interpolation technique may be used for the luminance sample; for example, a 4-tap FIR filter may be used to obtain the predicted value of the luminance sample. For example, the 4-tap FIR filter is used in the same way as the 2-tap FIR filter. f It may have a coefficient determined based on . For 1 / 32 sample accuracy, a set of 32 different 4-tap FIR filters will have a fractional part i of the projected displacement. f It can contain up to 32 different 4-tap FIR filters corresponding to 32 possible values. In other examples, different sample accuracies may be used. The set of 4-tap FIR filters is stored in a lookup table (LUT), i f It may be referenced based on the following. The value of the predicted sample p[x][y] in vertical prediction mode may be given by the following equation based on a 4-tap FIR filter.

number

number

[0088] Furthermore, if the sample position [x][y] within the current block 904 being predicted is projected onto a negative x-coordinate (resulting from a negative vertical prediction angle φ), an auxiliary reference sample may be constructed. The auxiliary reference sample may be constructed by projecting the reference sample in ref2[y] on the vertical line of reference sample 902 onto the horizontal line of reference sample 902, using a negative vertical prediction angle φ. Similarly, if the sample position [x][y] within the current block 904 being predicted is projected onto a negative y-coordinate (resulting from a negative horizontal prediction angle φ), an auxiliary reference sample may also be constructed. The auxiliary reference sample may be constructed by projecting the reference sample in ref1[x] on the horizontal line of reference sample 902 onto the vertical line of reference sample 902, using a negative vertical prediction angle φ.

[0089] The encoder may predict samples of the current block to be encoded (e.g., current block 904) for multiple intra-prediction modes as described above. For example, the encoder may predict samples of the current block for each of the 35 intra-prediction modes in HEVC or the 67 intra-prediction modes in VVC. For each applicable intra-prediction mode, the encoder may determine the prediction error of the current block based on the difference between the predicted sample obtained in that mode and the original sample of the current block (e.g., sum of squared differences (SSD), sum of absolute differences (SAD), or sum of absolute transform differences (SATD)). Based on the determined prediction error, the encoder may select one of the intra-prediction modes to encode the current block. For example, the intra-prediction mode that gives the smallest prediction error for the current block may be selected. In another example, the intra-prediction mode for encoding the current block may be selected based on a rate distortion measure (e.g., Lagrangian rate distortion cost) calculated using the prediction error. The encoder may send a display of the selected intra-prediction mode and its corresponding prediction error to the decoder for decoding the current block.

[0090] Similar to the encoder, the decoder can predict samples of the block to be decoded, such as the current block 904, for the intra-prediction mode, as described above. For example, the decoder may receive an indication of the angular intra-prediction mode from the encoder for a block. The decoder may construct a set of reference samples and perform an intra-prediction on the block based on the angular intra-prediction mode indicated by the encoder, similar to the method described above for the encoder. The decoder reconstructs the block by adding the predicted values ​​of the block samples to the block's residuals. In another embodiment, the decoder may not receive an indication of the angular intra-prediction mode from the encoder for a block. Instead, the decoder may determine the intra-prediction mode by other decoder-side means.

[0091] While the above description primarily concerns the intra-predictive modes of HEVC and VVC, it should be understood that the techniques of this disclosure described above and below are also applicable to other intra-predictive modes, including those of other video encoding standards such as VP8, VP9, ​​and AV1.

[0092] As explained above, intra-prediction uses correlations between spatially adjacent samples within the same picture of a video sequence to perform video compression. Inter-prediction, on the other hand, is another encoding tool for video compression that uses temporal correlations between sample blocks in different pictures of a video sequence. Generally, objects appear across multiple pictures of a video sequence. Objects may move across multiple pictures (e.g., translation and / or motion due to affine transformations) or remain stationary. Therefore, the current sample block in the current picture being encoded may have a corresponding sample block in a previously decoded picture that can accurately predict it. The corresponding sample block may be displaced from the current block due to the movement of the object across each picture in the block. The previously decoded picture is called the reference picture, and the corresponding sample block in the reference picture is sometimes called the reference block or motion-compensated prediction. The encoder may use block-matching techniques to estimate displacement (or motion) and determine the reference block in the reference picture.

[0093] Similar to intra-prediction, once the prediction for the current block is determined and / or generated using inter-prediction, the encoder can calculate the difference between the current block and the prediction. This difference is sometimes called the prediction error or residual. The encoder then stores and / or signals the prediction error and other relevant prediction information into a bitstream for decoding or other uses. The decoder can use the prediction information to predict samples for the current block and decode the current block by combining the predicted samples with the prediction error.

[0094] Figure 13A shows an example of interpretation performed on the current block 1300 in the current picture 1302 being encoded. An encoder like encoder 200 in Figure 2 can perform interpretation to determine and / or generate a reference block 1304 in reference picture 1306 and predict the current block 1300. A reference picture (e.g., reference picture 1306) is a previously decoded picture available to the encoder and decoder. Whether a previously decoded picture is available may depend on whether that picture exists in the decoded picture buffer at the time the current block 1300 is encoded or decoded. The encoder may, for example, search for a reference block similar to the current block 1300 from one or more reference pictures. The encoder may then determine the "best match" reference block from the blocks tested during the search process as reference block 1304. This determination may be based on one or more cost criteria, such as a rate distortion criterion (e.g., Lagrangian rate distortion cost). One or more cost criteria may be based on, for example, the difference between the predicted sample in reference block 1304 and the original sample in the current block 1300 (e.g., sum of squared differences (SSD), sum of absolute differences (SAD), or sum of absolute transformed differences (SATD)).

[0095] The encoder may search for the reference block 1304 within the search range 1308. The search range 1308 may be located around the same position (or block) 1310 of the current block 1300 within the reference picture 1306. In some cases, at least a portion of the search range 1308 may extend outside the reference picture 1306. If it extends outside the reference picture 1306, constant boundary extension may be used, and sample values ​​in rows or columns of the reference picture 1306 adjacent to the portion of the search range 1308 that extends outside the reference picture 1306 may be used as the "sample" position outside the reference picture 1306. All or some positions within the search range 1308 may be searched to find the reference block 1304. The encoder can utilize any of various search implementations to determine and / or generate the reference block 1304. For example, the encoder may determine a set of candidate search positions based on the motion information of blocks adjacent to the current block 1300.

[0096] During interpretation, the encoder may search for one or more reference pictures and determine and / or generate the best-matching reference block. The reference pictures searched by the encoder may be contained in one or more reference picture lists. For example, HEVC and VVC may use two reference picture lists, reference picture list 0 and reference picture list 1. A reference picture list may contain one or more pictures. Reference picture 1306 of reference block 1304 may be specified by a reference index that points to a reference picture list containing reference picture 1306.

[0097] The displacement between reference block 1304 and current block 1300 can be interpreted as an estimate of the movement between reference block 1304 and current block 1300 across each picture. This displacement is represented by motion vector 1312, for example, motion vector 1312 has a horizontal component (MV) relative to the position of current block 1300. x ) and vertical component (MV yThis can be represented by ). Figure 13B shows the horizontal and vertical components of motion vector 1312. A motion vector (e.g., motion vector 1312) can have fractional or integer resolution. A fractional resolution motion vector points between two samples in the reference picture and can more accurately estimate the motion of the current block 1300. For example, a motion vector can have a fractional resolution of 1 / 2, 1 / 4, 1 / 8, 1 / 16, or 1 / 32 samples. If the motion vector points to a non-integer sample value in the reference picture, interpolation between samples at integer positions can be used to generate the reference block and the fractional position samples corresponding to the reference block. Interpolation can be performed by two or more tap filters.

[0098] Once the interpretation determines and / or generates a reference block 1304 for the current block 1300, the encoder can calculate the difference (e.g., sample-by-sample difference) between the reference block 1304 and the current block 1300. This difference is sometimes called the prediction error or residual. The encoder then stores and / or signals the prediction error and associated motion information into a bitstream for decoding or other use. The motion information may include a motion vector 1312 and a reference index pointing to a reference picture list containing the reference picture 1306. In another example, the motion information may include a representation of the motion vector 1312 and a representation of the reference index pointing to a reference picture list containing the reference picture 1306. The decoder uses the motion information to determine and / or generate a reference block 1304 that forms a prediction for the current block 1300, and decodes the current block 1300 by combining that prediction with the prediction error.

[0099] In Figure 13A, interprediction is performed using a single reference picture 1306 as the prediction source for the current block 1300. Because the prediction for the current block 1300 is based on a single picture, this type of interprediction is called uni-prediction. Figure 14 shows another type of interprediction, bi-prediction, performed on the current block 1400. In bi-prediction, the prediction source for the current block 1400 is obtained from two pictures. For example, bi-prediction can be useful when a video sequence contains fast motion, camera panning or zooming, or scene transitions. It can also be useful when capturing scene fade-outs or fade-outs from one scene to another (where two pictures are displayed simultaneously at different intensities).

[0100] Whether single prediction or both single and double prediction are available for performing interpretation may depend on the slice type of the current block 1400. For P slices, only single prediction may be available. For B slices, either single or double prediction may be available. If single prediction is performed, the encoder may determine and / or generate a reference block from reference picture list 0 to predict the current block 1400. If double prediction is performed, the encoder may determine and / or generate a first reference block from reference picture list 0 to predict the current block 1400, and a second reference block from reference picture list 1 to predict the current block 1400.

[0101] In Figure 14, interpretation is performed using dual prediction, and the current block 1400 is predicted using two reference blocks 1402 and 1404. Reference block 1402 may be in a reference picture in either reference picture list 0 or 1, and reference block 1404 may be in a reference picture in the other reference picture list. As shown in Figure 14, with respect to the picture order count (POC), reference block 1402 is in a picture preceding the current picture of the current block 1400, and reference block 1402 is in a picture following the current picture of the current block 1400 with respect to the POC.

[0102] In other examples, both reference pictures may precede or follow the current picture with respect to the POC. The POC is, for example, the order in which pictures are output from the decoded picture buffer, and is generally the order in which they are intended to be displayed. However, the output pictures are not necessarily displayed and may undergo other processing or use, such as transcoding. In other examples, two reference blocks determined and / or generated using double prediction may be derived from the same reference picture. In such cases, that reference picture may be included in both reference picture list 0 and reference picture list 1.

[0103] Configurable weight and offset values ​​may be applied to one or more interpretation reference blocks. The encoder may enable the use of weighted prediction using a flag in the Picture Parameter Set (PPS) and notify the weight and offset parameters in the slice segment header for the current block. Different weight and offset parameters may be notified for the luminance component and the chrominance component.

[0104] Once the interpretation determines and / or generates the reference blocks 1402 and 1404 of the current block 1400, the encoder can calculate the difference between the current block 1400 and each of the reference blocks 1402 and 1404. This difference is sometimes called the prediction error or residual. The encoder can then store and / or signal the prediction error and their respective associated motion information into a bitstream for decoding or other uses. The motion information for reference block 1402 may include a motion vector 1406 and a reference index pointing to the reference picture (in the reference picture list) that contains reference block 1402. In another example, the motion information for reference block 1402 may include a representation of the motion vector 1406 and a representation of the reference index pointing to the reference picture (in the reference picture list) that contains reference block 1402. The motion information for reference block 1404 may include a motion vector 1408 and a reference index pointing to the reference picture (in the reference picture list) that contains reference block 1404. In another example, the motion information for reference block 1404 may include a representation of the motion vector 1408 and a representation of the reference index pointing to the reference picture (in the reference picture list) that contains reference block 1404. The decoder may use the respective motion information to determine and / or generate reference blocks 1402 and 1404 that form a prediction for the current block 1400, and decode the current block 1400 by combining the prediction and the prediction error.

[0105] In HEVC, VVC, and other video compression schemes, motion information may be predictively encoded before being stored or signaled in the bitstream. The motion information of the current block may be predictively encoded based on the motion information of the adjacent blocks of the current block. Generally, the motion of an object represented in the current block is often identical or similar to the motion of an object in an adjacent block, so the motion information of adjacent blocks often has a high correlation with the motion information of the current block. Two motion information prediction techniques in HEVC and VVC are Advanced Motion Vector Prediction (AMVP) and Interpredictive Block Merging.

[0106] Encoders such as encoder 200 in Figure 2 may encode the motion vector as the difference between the motion vector of the current block being encoded and a motion vector predictor (MVP) using the AMVP tool. The encoder selects an MVP from a list of candidate MVPs. Candidate MVPs may be obtained from the decoded motion vectors of adjacent blocks in the current picture of the current block, or from the decoded motion vectors of blocks at or near the same position as the current block in other reference pictures. Both the encoder and decoder may generate or determine the list of candidate MVPs.

[0107] After selecting an MVP from a list of candidate MVPs, the encoder may notify the user of the selected MVP and its motion vector difference (MVD) in a bitstream. The selected MVP may be indicated by an index pointing to the list of candidate MVPs. The MVD may be calculated based on the difference between the motion vector of the current block and the selected MVP. For example, the horizontal component MVD relative to the current block's position. x and vertical component MV y For a motion vector represented by , the MVD can be expressed by two components calculated by the following equation:

number

number

[0108] In HEVC and VVC, the candidate MVP list for AMVP may contain two candidates, Candidate A and Candidate B. Candidates A and B may contain up to two spatial candidate MVPs derived from the five spatially adjacent blocks of the current block being encoded. If both spatial candidate MVPs are unavailable or identical, one temporal candidate MVP derived from two temporally equivalent blocks may be included, and if the spatial candidate, temporal candidate, or both candidates are unavailable, a zero motion vector may be included. Figure 15A shows the locations of the five spatial candidate adjacent blocks relative to the current block 1500 being encoded. The five spatial candidate adjacent blocks are represented as A0, A1, B0, B1, and B2, respectively. Figure 15B shows the locations of the two temporally equivalent blocks relative to the current block 1500 being encoded. The two temporally equivalent blocks are represented as C0 and C1 and are contained in a reference picture different from the current picture of the current block 1500.

[0109] Encoders such as encoder 200 in Figure 2 may encode motion vectors using an interprediction block merge tool (also called merge mode). When using merge mode, the encoder can reuse the same motion information from adjacent blocks for interprediction of the current block. Because the same motion information from adjacent blocks is used, there is no need to notify MVD, and the size of the notification overhead for notifying motion information of the current block may be small. Similar to AMVP, both the encoder and decoder can generate a list of candidate motion information from the adjacent blocks of the current block. The encoder may decide to use (inherit) the motion information of one adjacent block in the candidate list to predict the motion information of the current block to be encoded. The encoder may notify a bitstream representation of the motion information determined from the candidate list. For example, the encoder may notify an index pointing to the list of candidate motion information to indicate the determined motion information.

[0110] In HEVC and VVC, the candidate motion information list for merge mode may include up to four spatial merge candidates derived from five spatially adjacent blocks used in AMVP as shown in Figure 15A, one temporal merge candidate derived from two temporally equivalent blocks used in AMVP as shown in Figure 15B, and additional candidates such as dual prediction candidates and zero motion vector candidates.

[0111] Interpretation can also be performed by methods and variations other than those described above. For example, motion information prediction techniques other than AMVP and merge mode are also possible. Furthermore, although the above description has been mainly given in relation to the interpretation modes of HEVC and VVC, it should be understood that the techniques of this disclosure described above and below are also applicable to other interpretation modes, including the interpretation modes of other video coding standards such as VP8, VP9, ​​and AV1. In addition, history-based motion vector prediction (HMVP), intra / inter composite prediction mode (CIIP), and merge mode using motion vector difference (MMVD) described in VVC are also possible and are included in the scope of this disclosure.

[0112] In interpretation, a reference block in a different picture may be determined by applying block matching techniques. Block matching techniques have also been applied to determining a reference block in the same picture as the current block being encoded. However, it has been identified that in camera-captured video, the reference block determined using block matching techniques within the same picture may not always predict the current block sufficiently accurately. This is generally not the case with screen content video, which may include, for example, computer-generated text, graphics, and animations. In screen content, repeating patterns (e.g., text and graphics) often exist within the same picture, so using block matching techniques to find a reference block in the same picture as the current block can provide efficient compression.

[0113] Both HEVC and VVC include a prediction technique that utilizes the correlation between sample blocks within the same picture of screen content video. This technique is called intra-block copying (IBC) or current-picture referencing (CPR). Similar to inter-prediction, the encoder may apply block-matching techniques to determine a displacement vector (called a block vector (BV)) that shows the relative displacement from the current block to the reference block that "best matches" the current block (intra-block compensated prediction). Similar to inter-prediction, the encoder can determine the "best matching" reference block from among the blocks tested during the search process. The encoder may determine that a particular reference block is the best matching block based on one or more cost criteria. One or more cost criteria could be, for example, the difference between the predicted sample of the reference block and the original sample of the current block (e.g., sum of squared differences (SSD), sum of absolute differences (SAD), sum of absolute transform differences (SATD), or a difference based on a hash function). The reference block may correspond to a preceding decoded sample block of the current picture. The reference block may contain a decoded sample block of the current picture before it is processed by an in-loop filtering operation such as deblocking or SAO filtering. Figure 16 shows an example of applying IBC to screen content. The rectangle with an arrow extending from its boundary is the current block to be encoded, and the rectangle pointed to by the arrow is the reference block used to predict the current block.

[0114] Once a reference block for the current block is determined and / or generated using IBC, the encoder can calculate the difference between the two (e.g., corresponding to the sample-by-sample difference). This difference is sometimes called the prediction error or residual. The encoder then stores or signals the prediction error and associated prediction information into a bitstream for decoding or other use. The prediction information may include BV. In other examples, the prediction information may include a representation of BV. A decoder such as decoder 300 in Figure 3 may use the prediction information to determine and / or generate a reference block that forms the prediction for the current block, and then decode the current block by combining the prediction with the prediction error.

[0115] In HEVC, VVC, and other video compression schemes, the BV may be predictively coded before being stored in or advertised in the bitstream. The BV of the current block may be predictively coded based on the BV of its adjacent blocks. For example, the BV may be predictively coded using the merge mode described above with respect to interprediction, or using a technique similar to AMVP described above, also with respect to interprediction. This AMVP-like technique is sometimes called BV predictive and differential coding.

[0116] In BV prediction and differential coding, an encoder, such as encoder 200 in Figure 2, can encode the BV as the difference between the BV of the current block to be coded and a BV predictor (BVP). The encoder can select a BVP from a list of candidate BVPs. Candidate BVPs may be derived from the decoded BVs of blocks adjacent to the current block in the current picture. Both the encoder and decoder may generate or determine the list of candidate BVPs.

[0117] After selecting a BVP from a candidate BVP list, the encoder may notify the bitstream of the selected BVP and its BV difference (BVD). The encoder may also indicate the selected BVP in the bitstream by an index pointing to the candidate BVP list. The BVD may be calculated based on the difference between the BV of the current block and the selected BVP. For example, the horizontal component (BV) relative to the current block's position. x ) and vertical component (BV y In the case of BV represented by ), BVD can be represented by two components calculated by the following formula:

number

number

[0118] In HEVC and VVC, the candidate BVP list may contain two candidates, called Candidate A and Candidate B. Candidates A and B may contain up to two spatial candidate BVPs derived from the five spatial adjacency blocks of the current block being encoded. If no spatial adjacency candidates are available (for example, because they are encoded in intra-mode or inter-mode), it may contain one or more of the last two encoded BVs. The positions of the five spatial candidate adjacency blocks relative to the current block being encoded using IBC are the same as those shown in Figure 15A with respect to inter-prediction. The five spatial candidate adjacency blocks are represented as A0, A1, B0, B1, and B2, respectively.

[0119] As explained above with respect to Figures 2 and 3, entropy coding may be performed at the end of the video coding process and at the beginning of the video decoding process. Entropy coding is a technique for compressing a symbol sequence by representing symbols with a high probability of occurrence with fewer bits than symbols with a low probability of occurrence. If the compressed symbol sequence is represented by bits {0,1}, then according to Shannon's information theory, the optimal average code length for a symbol with probability p is -log2p.

[0120] Arithmetic coding is a type of entropy coding. Arithmetic coding is based on recursive interval partitioning. To arithmetically encode a symbol whose value is taken from an m-adic source alphabet, the initial coding interval may be divided into m non-overlapping subintervals. The m subintervals may have widths proportional to the probability that the symbol has a distinct value in the m-adic source alphabet. The probability that the symbol has a distinct value in the m-adic source alphabet is called the probability model of the symbol. The symbol is arithmetically encoded by selecting a subinterval corresponding to the actual value of the symbol as a new coding interval. This interval partitioning scheme is given by the sequence s={s1,s2,···,s N Each symbol s i By recursively applying this, the encoder can determine the values ​​within the range of the final coded interval after the Nth interval division as the arithmetic codeword of sequence s. Each consecutive symbol of the coded sequence s reduces the size of the coded interval according to the symbol's probability model. Symbol values ​​with a higher probability of occurrence reduce the coded interval less than symbol values ​​with a lower probability of occurrence, and therefore, according to the general principles of entropy coding, fewer bits are added to the arithmetic codeword of sequence s.

[0121] Arithmetic decoding is based on the same recursive interval partitioning. To arithmetically decode a symbol that takes a value from an m-adic source alphabet, the initial coding interval may be divided into m non-overlapping subintervals. The m subintervals may have widths proportional to the probability that the symbol has a distinct value within the m-adic source alphabet. The probability that a symbol takes a distinct value within the m-adic source alphabet is sometimes called the symbol's probability model, as mentioned earlier. The symbol is arithmetically decoded from the arithmetic codeword by finding the symbol value corresponding to the subinterval containing the arithmetic codeword. This subinterval then becomes the new coding interval. The decoder takes the sequence s={s1,s2,···,s N Each symbol s i By applying this interval partitioning method recursively N times and determining which sub-interval each arithmetic codeword belongs to in each iteration, sequential decoding can be performed.

[0122] For each arithmetically encoded symbol, different probabilistic models may be used to subdivide the encoding interval. For example, the probability model for a symbol may be determined by a fixed selection (e.g., based on the symbol's position in a symbol sequence) or by an adaptive selection from two or more probabilistic models (e.g., based on information associated with the symbol). It is also possible to use a combined probabilistic model for two or more symbols in a symbol sequence. The selection of a probabilistic model for a symbol is called contextual modeling. Arithmetic coding using contextual modeling is sometimes more specifically called context-based arithmetic coding. In addition to the selection of a probabilistic model for a symbol, the selected probabilistic model may be updated based on the symbol's actually encoded value. For example, the probabilistic model may be updated so that the probability of the symbol's actually encoded value increases, while the probability of other values ​​decreases. Arithmetic coding that uses both contextual modeling and probabilistic model adaptation is sometimes more specifically called context-based adaptive arithmetic coding.

[0123] The above description is merely one example of arithmetic coding. As those skilled in the art will understand, other variations of arithmetic coding are possible. For example, during arithmetic coding, renormalization may be performed so that the precision required to represent the range and lower bound of subintervals does not exceed the finite precision of the registers holding those values. Furthermore, in hardware, software, or a combination of both, other simplifications may be applied to the coding process to reduce complexity, improve speed, and / or reduce power requirements. For example, the probabilities of symbols and the lower and range of subintervals may be approximated or quantized in such implementations.

[0124] Figure 17 shows an exemplary implementation of a context-based adaptive binary arithmetic coding (CABAC) encoder 1700 according to an embodiment of the present disclosure. The CABAC encoder 1700 may be implemented in a video encoder, such as the video encoder 200 in Figure 2, and used to entropy encode syntactic elements of a video sequence. As shown in Figure 17, the CABAC encoder 1700 includes a binaryizer 1702, an arithmetic encoder 1704, and a context modeler 1706.

[0125] The CABAC encoder 1700 may receive a syntax element 1708 for arithmetic coding. Syntax elements such as syntax element 1708 may be generated by the video encoder and describe how the video signal is reconstructed in the video decoder. For a coding unit (CU), the syntax element may include an intra-prediction mode based on the CU being intra-predicted, motion data (e.g., MVD and MVP related data) based on the CU being inter-predicted, or displacement data (e.g., BVD and BVP related data) based on the CU being predicted using IBC.

[0126] The binaryizer 1702 may first map the value of syntactic element 1708 to a sequence of binary symbols (also called bins). The binaryizer 1702 may define a unique mapping between the value of syntactic element 1708 and the sequence of binary symbols. Binarization of syntactic elements may help improve the implementation of probabilistic modeling and arithmetic coding. The binaryizer 1702 may implement one or more binarization schemes: unary, truncated unary, k-th truncated Rice, k-th exponential Golomb (EGk), fixed length, or a combination of two or more of these. The binaryizer 1702 may select a binarization scheme based on the type of syntactic element 1708, or / or one or more syntactic elements processed by the CABAC encoder 1700 before syntactic element 1708. If syntactic element 1708 is already represented by one or more sequences of binary symbols, the binaryizer 1702 may not process syntactic element 1708. In another example, the binaryr 1702 may not be used, and the syntax element 1708, represented by one or more non-binary symbol sequences, may be directly encoded by the CABAC encoder 1700.

[0127] After the binaryizer 1702 optionally maps the values ​​of the syntax element 1708 to a sequence of binary symbols, one or more binary symbols (bins) may be processed by the arithmetic encoder 1704. The arithmetic encoder 1704 may process each of the one or more binary symbols in one of at least two modes: normal arithmetic coding mode or bypass arithmetic coding mode.

[0128] The arithmetic encoder 1704 may, in normal arithmetic coding mode, process binary symbols that do not have a uniform (or nearly uniform) probability distribution (for example, binary symbols that do not have a probability of 0.5 for each of two possible values). In normal arithmetic coding mode, the arithmetic encoder 1704 can perform arithmetic coding as described above. For example, the arithmetic encoder 1704 can divide the current coding interval into m non-overlapping subintervals. Each of the m non-overlapping subintervals may have a width proportional to the probability that the binary symbol takes on a different value in the m-adic source alphabet. For a binary symbol, m=2, and the current coding interval may be divided into two subintervals having widths proportional to the probability that the binary symbol to be coded takes on each of two possible values ​​{0,1}. The probabilities of the two possible values ​​of the binary symbol may be shown by the binary symbol probability model 1710. The arithmetic encoder 1704 can then encode the binary symbol by selecting the subinterval corresponding to the actual value of the binary symbol as the new coding interval for the binary symbol to be coded next.

[0129] The arithmetic encoder 1704 can receive a probabilistic model 1710 from the context modeler 1706. The context modeler 1706 can determine the probabilistic model 1710 of the binary symbol by fixed selection (e.g., based on the position of the binary symbol within the sequence of binary symbols representing the syntactic element 1708) or by adaptive selection from two or more probabilistic models (e.g., based on information related to the binary symbol). As shown in Figure 17, the probabilistic model 1710 has a probability P of the least likely symbol (LPS). LPS And the value of the most frequently occurring symbol (MPS) v MPS It can include these two parameters. In another example, the probability model 1710 has a probability P of LPS. LPS In addition, or instead, the probability P of MPS MPS It may include. Similarly, in other examples, the probability model 1710 gives the value of MPS v MPS In addition, or instead, the value of LPS vLPS This may include the following. After the arithmetic encoder 1704 has encoded the binary symbol, the arithmetic encoder 1704 can provide one or more probabilistic model update parameters 1712 to the context modeler 1706. The context modeler 1706 can adapt the probabilistic model 1710 based on one or more probabilistic model update parameters 1712. For example, one or more probabilistic model update parameters 1712 may include the actually encoded value of the binary symbol. The context modeler 1706 can adapt the probabilistic model 1710 based on the actually encoded value of the binary symbol v MPS If it is not equal to P LPS Increase P LPS By decreasing this value, the probability model 1710 can be updated.

[0130] The arithmetic encoder 1704 may process binary symbols having (or being assumed to have) a uniform (or nearly uniform) probability distribution in bypass arithmetic coding mode. Because binary symbols processed in bypass arithmetic coding mode have (or are assumed to have) a uniform (or nearly uniform) probability distribution, the arithmetic encoder 1704 can speed up the coding process by omitting (bypassing) the determination and adaptation of the probability model that is normally performed in arithmetic coding mode when coding those binary symbols. Furthermore, in the case of a uniform (or assumed to be uniform) probability distribution, the subdivision of the current coding interval may be simplified. For example, the current coding interval may be divided into two non-overlapping subintervals of equal width, which can be achieved with a simple implementation and further speed up the coding process. The arithmetic encoder 1704 codes a binary symbol by selecting the subinterval corresponding to the value of the binary symbol as the new coding interval for the binary symbol to be coded next. The improved coding speed of binary symbols coded in bypass arithmetic coding mode by the arithmetic encoder 1704 is often important because CABAC coding may have throughput constraints.

[0131] The arithmetic encoder 1704 may, after processing a number of binary symbols (e.g., symbols corresponding to one or more syntactic elements), determine the value within the range of the last encoded interval as the arithmetic codeword 1714. The arithmetic encoder 1704 may then output the arithmetic codeword 1714. For example, the arithmetic encoder 1704 may output the arithmetic codeword 1714 to a bitstream that is received and processed by a video decoder.

[0132] As explained above, both HEVC and VVC include a prediction technique that utilizes correlations between sample blocks within the same picture. This technique is called intrablock (IBC). IBC is also included in the Enhanced Compression Model (ECM) software algorithm, which is currently being jointly investigated by the ITU-T VCEG (Video Coding Experts Group)'s JVET (Joint Video Exploration Team) and ISO / IEC MPEG as a potential extended video coding technique that goes beyond the capabilities of VVC.

[0133] Figure 18A shows an example of an IBC according to an embodiment of the present disclosure. In the IBC, the encoder may determine a block vector (BV) 1802 that represents the displacement from the current block 1804 to a reference block (or intra-block compensated prediction) 1806. The encoder may determine the reference block 1806 from one or more reference blocks tested during the search process. For example, for each of the one or more reference blocks tested during the search process, the encoder may determine the difference between a sample of the reference block and a sample of the current block 1804 (e.g., the sum of squared differences (SSD), the sum of absolute differences (SAD), the sum of absolute transform differences (SATD), or a difference determined based on a hash function). The encoder may determine the reference block 1806 based on the reference block 1806 with the smallest difference from the current block 1804 among these one or more reference blocks, or based on other criteria. The reference block 1806 and one or more other reference blocks tested during the search process may include decoded (or reconstructed) samples. Decoded (or reconstructed) samples may not have undergone deblocking or in-loop filtering such as SAO filtering.

[0134] Once the reference block 1806 for the current block 1804 is determined, the encoder can use the reference block 1806 to predict the current block 1804. For example, the encoder may determine or utilize the difference between the reference block 1806 and the current block 1804 (e.g., the corresponding sample-by-sample difference). This difference may be called the prediction error or residual. The encoder can then encode the prediction error and associated prediction information into a bitstream. The prediction information may include BV1802. In other examples, the prediction information may include an indication of BV1802. A decoder, such as decoder 300 in Figure 3, may receive the bitstream, use the prediction information to determine the reference block 1806 that forms the prediction for the current block 1804, and decode the current block 1804 by combining that prediction and the prediction error.

[0135] BV1802 may be predictively coded before being notified in the bitstream. BV1802 may be predictively coded based on the BV of an adjacent block to the current block 1804, or the BV of another block. For example, the encoder predictively codes BV1802 using merge mode or AMVP as described above. In the case of AMVP, the encoder may code BV1802 as the difference between BV1802 and a BV predictor (BVP) 1808, as shown in Figure 18A. The encoder can select BVP1808 from a list of candidate BVPs. Candidate BVPs may be obtained from previously decoded BVs of adjacent blocks to the current block 1804, or from other sources. Both the encoder and decoder may generate or determine the list of candidate BVPs.

[0136] The encoder may, after selecting BVP1808 from the candidate BVP list, signal BVP1808 and BV difference (BVD)1810 into a bitstream. The encoder may indicate BVP1808 in the bitstream by an index pointing to the candidate BVP list or by one or more flags. BVD1810 may be calculated based on the difference between BV1802 and BVP1808. BVD1810 has a horizontal component (BVD x )1812 and vertical component (BVD y ) may contain 1814, which may be determined according to formulas (17) and (18) above, respectively. Two components BVD x 1812 and BVD y 1814 all have size and sign. As shown in Figure 18A, BVD x 1812 is a fixed-length binary with a size of 10011 (19 in decimal) and a negative sign (in the example in Figure 18A, the right is the positive horizontal direction). Also, as shown in Figure 18A, BVD y 1814 is a fixed-length binary with a magnitude of 01011 (11 in decimal) and a positive sign (in the example in Figure 18A, the bottom is positive in the vertical direction). The encoder has two components BVD x 1812 and BVD y BVD1810 can be represented within the bitstream via 1814.

[0137] The decoder can decode BV1802 by adding BVD1810 to BVP1808. Then, the decoder uses BV1802 to determine the reference block 1806 that forms the prediction for the current block 1804, and can decode the current block 1804 by combining that prediction with the prediction error. The decoder determines the reference block 1806 by adding BV1802 to the current position of block 1804, thereby obtaining the position of the reference block 1806.

[0138] As explained above, the size of BVD1810 is encoded in bypass arithmetic coding mode using existing technologies. While bypass arithmetic coding mode can be used to speed up arithmetic coding, its compression efficiency is limited because the size symbols of BVD1810 encoded in bypass arithmetic coding mode have a uniform (or assumed to be uniform) probability distribution. According to information theory, it is not possible to compress a symbol at a rate lower than its entropy without loss of information, and symbols with a uniform probability distribution have maximum entropy. Therefore, symbols encoded in bypass arithmetic coding mode generally require more bits than symbols encoded in normal arithmetic coding mode.

[0139] Embodiments of this disclosure can improve the compression efficiency of one or more size symbols of BVD1810 compared to existing technologies. For example, instead of directly entropy coding the size symbols of BVD1810, the encoder entropy codes an indication of whether the value of the size symbol of BVD1810 matches the value of the same size symbol of a BVD candidate used as a predictor of BVD1810. The indication of whether the value of the size symbol of BVD1810 matches the value of the size symbol of a BVD predictor may have a non-uniform probability distribution, and thus may improve compression efficiency. The encoder may select a BVD predictor from among a plurality of BVD candidates based on the cost of the plurality of BVD candidates. The BVD candidates may include one BVD candidate for each possible value of the size symbol of BVD1810. For example, the size symbol of BVD1810, represented in binary form, has only two possible values. Therefore, a BVD candidate may include two BVD candidates for this representation (corresponding to the respective possible values ​​of the size symbol of BVD1810 being encoded). The first BVD candidate is equal to BVD1810 itself, and the second BVD candidate is equal to BVD1810 but with the opposite size symbol value (or having the other value). The cost of each of the multiple BVD candidates may be calculated based on the difference between the template of the current block 1804 and the template of the candidate reference block. The candidate reference block may be shifted relative to the current block by the sum of the BVD candidates and BVP1808.

[0140] As a more concrete example, Figure 18A shows an example of the size symbol 1816 of BVD1810 that is entropy encoded. The size symbol 1816 of BVD1810 is the horizontal component of BVD1810. xThis is the second most significant bit in the fixed-length binary representation of 1812, and has a binary value of "0". As described above, instead of directly entropically encoding the size symbol 1816 of BVD1810, the encoder can entropically encode a representation indicating whether the value of the size symbol 1816 of BVD1810 matches the value of the same size symbol of a BVD candidate used as a predictor for BVD1810. The encoder can select a BVD predictor from among several BVD candidates based on the cost of the multiple BVD candidates. The BVD candidates may include candidates corresponding to each of the two possible values ​​{0,1} of the size symbol 1816 of BVD1810. The first BVD candidate 1818 is equal to BVD1810 itself, and the second BVD candidate 1820 is equal to BVD1810, but the value of the size symbol 1816 of BVD1810 is the opposite (or has the other value).

[0141] Figure 18B shows both BVD candidates used to entropy encode the size symbol 1816 of BVD1810. More specifically, Figure 18B shows BVD candidate 1818, which is equal to BVD1810 itself, and BVD candidate 1820, which is equal to BVD1810 but has the opposite value (or the other value) for the size symbol 1816. Because BVD candidate 1820 has the opposite value (or the other) for the size symbol 1816 of BVD candidate 1818, BVD candidate 1820 has a size of 11011 in fixed-length binary (27 in decimal) and a horizontal component BVD with a negative sign. x It has 1822. The vertical component BVD of BVD candidate 1820. y 1824 is the vertical component of BVD candidate 1818 (or BVD1810). y 1814 and fixed-length binary have the same size 01011 (11 in decimal) and have a positive sign.

[0142] The cost of each of several BVD candidates can be calculated based on the difference between the template of the current block 1804 and the template of the candidate reference block which is shifted relative to the current block 1804 by the sum of the BVD candidate and BVP1808. For example, the encoder determines the cost of BVD candidate 1818 based on the difference between the template 1826 of the current block 1804 and the template 1828 of candidate reference block 1830 which is shifted relative to the current block 1804 by the sum of the BVD candidate 1818 and BVP1808. The encoder can calculate the difference between template 1826 and template 1828 based on the difference between the samples of template 1826 and the samples of template 1828 (e.g., sum of squared differences (SSD), sum of absolute differences (SAD), sum of absolute transformed differences (SATD), mean-removed SAD, or mean-removed SSD). Similarly, the encoder can determine the cost of BVD candidate 1820 based on the difference between template 1826 of the current block 1804 and template 1832 of candidate reference block 1834, which is shifted relative to the current block 1804 by the sum of BVD candidate 1820 and BVP 1808. The encoder can also determine the difference between template 1826 and template 1828 based on the difference between the samples of template 1826 and the samples of template 1832 (e.g., SSD, SAD, SATD, mean removed SAD, or mean removed SSD). Templates 1826, 1828, and 1832 may contain one or more samples from the left and / or top of their respective blocks. For example, templates 1826, 1828, and 1832 may contain one or more columns of samples from the left of their respective blocks and / or one or more rows of samples from the top of their respective blocks. Figure 18B shows an example of the position and shape (L-shape rotated 90 degrees clockwise) of templates 1826, 1828, and 1832.

[0143] After determining the costs of several BVD candidates, the encoder can select one of them as the BVD predictor. For example, the encoder can select the BVD candidate with the lowest cost among several BVD candidates as the BVD predictor. Figure 18C shows a table with the components (horizontal and vertical) and costs of each BVD candidate 1818 and 1820 in their respective rows. In this example, we assume that only BVD candidates 1818 and 1820 exist as BVD candidates. In other examples, more BVD candidates may be used. The rows in the table are sorted by the cost of BVD candidates 1818 and 1820, with the BVD candidate with the lowest cost at the top. In this example, BVD candidate 1818 has the lowest cost among BVD candidates 1818 and 1820. Therefore, the encoder can select BVD candidate 1818 as the BVD predictor 1836 for BVD 1810.

[0144] After selecting BVD candidate 1818 as BVD predictor 1836, the encoder entropy-encodes the indication 1838, which indicates whether the value of the size symbol 1816 of BVD 1810 matches the value of the size symbol 1816 of BVD predictor 1836. The value of the size symbol 1816 of BVD predictor 1836 is "0", which matches the value of the size symbol 1816 of BVD 1810. In this example, indication 1838 indicates that the value of the size symbol 1816 of BVD 1810 matches the value of the size symbol 1816 of BVD predictor 1836. In one example, representation 1838 is 1 bit, and its value can be "0" if the value of size symbol 1816 in BVD1810 matches the value of size symbol 1816 in BVD predictor 1836, and "1" if the value of size symbol 1816 in BVD1810 does not match the value of size symbol 1816 in BVD predictor 1836. Logic 1840 may be used to determine representation 1838. In one example, logic 1840 implements an exclusive OR (XOR) function. In other examples where size symbol 1816 is non-binary, representation 1838 may indicate the first candidate (sorted, for example, based on their respective costs) among several candidates having a size symbol 1816 value that matches the size symbol 1816 value in BVD1810.

[0145] In the example in Figure 18C, the encoder entropically encodes the representation 1838 using the arithmetic encoder 1842. Based on the method of determining the representation 1838 as described above, the representation 1838 may have a non-uniform probability distribution. Therefore, the arithmetic encoder 1842 may process the representation 1838 in the normal arithmetic encoding mode as described above. For example, the arithmetic encoder 1842 can divide the current encoding interval into m non-overlapping subintervals. Each of the m non-overlapping subintervals may have a width proportional to the probability that the symbol to be encoded has a different value in the m-adic source alphabet. For a binary representation 1838, m=2, and the current encoding interval may be divided into two non-overlapping subintervals, each having a width proportional to the probability of two possible values ​​{0,1} for the representation 1838 to be encoded. The probabilities of the two possible values ​​for the representation 1838 may be shown by the probability model 1844 of the representation 1838. The arithmetic encoder 1842 may encode representation 1838 by selecting a subinterval corresponding to the actual value of representation 1838 as the new encoding interval for the next binary symbol to be encoded.

[0146] The arithmetic encoder 1842 can receive the probabilistic model 1844 from the context modeler 1846. The context modeler 1846 may determine the probabilistic model 1844 of the representation 1838 by fixed selection or by adaptive selection from two or more probabilistic models. For example, the context modeler 1846 may determine the BVD of BVD 1810 x Based on the position of the size symbol 1816 in 1812, or the index of that position (e.g., the value indicating it), the probability model 1844 can be determined by fixed selection or adaptive selection from two or more probability models. BVD1810 x The position (or position index) of size symbol 1816 in 1812 represents the distance 1864 between the two candidate BVDs (shown in Figure 18B). The probability that the value of size symbol 1816 of BVD predictor 1836 matches the value of size symbol 1816 of BVD1810 may be proportional to this distance 1864. Therefore, the BVD of BVD1810 xThe position (or position index) of the size symbol 1816 in 1812 may be useful when selecting the probability model 1844 for representation 1838.

[0147] To adaptively select from two or more probabilistic models, context modeler 1846 uses BVD1810. x The position (or index of the position) of the size symbol 1816 in 1812 may be compared to one or more thresholds. For example, the context modeler 1846 may compare the BVD of BVD 1810 with one of the BVD x The position (or position index) of size symbol 1816 in 1812 can be compared to a first threshold. BVD1810 x If the position (or position index) of the size symbol 1816 in 1812 is below the threshold, the context modeler 1846 can select the first probabilistic model for the representation 1838. BVD1810 x If the position (or position index) of the size symbol 1816 in 1812 exceeds a threshold, the context modeler 1846 can select a second probabilistic model for the representation 1838. As another example, BVD 1810 x If the position (or index of the position) of size symbol 1816 in 1812 exceeds a threshold, the context modeler 1846 can compare that position (or index) to a second threshold. BVD1810 x If the position (or index of the position) of the size symbol 1816 in 1812 is less than the second threshold, the context modeler 1846 can select the second probabilistic model for representation 1838. BVD1810 x If the position (or index of the position) of the size symbol 1816 in 1812 exceeds a second threshold, the context modeler 1846 may select a third probabilistic model for the representation 1838.

[0148] As another example, context modeler 1846 is BVD1810 (or BVD of BVD1810) for incremental changes in the value of size symbol 1816 of BVD1810 x Based on the change in the value of 1812), the probability model 1844 can be determined by fixed selection or adaptive selection from two or more probability models. BVD1810 (or BVD of BVD1810) for the incremental change in the value of the size symbol 1816 of BVD1810 x The change in the value of 1812) is 2 (n-1) It may be determined as follows, where n is BVD 1810 x This is the bit position of size symbol 1816 in 1812. In the example in Figure 18, since n=4, the BVD1810 (or BVD of BVD1810) corresponds to the incremental change in the value of size symbol 1816 of BVD1810. x The change in the value of 1812) is 2 (4-1) , that is, it can be obtained as 8. BVD1810 (or BVD of BVD1810) for the incremental change of the value of the size symbol 1816 of BVD1810 x The change in the value of 1812) represents the distance of 1864 (shown in Figure 18B) between the two candidate BVDs. As mentioned above, the probability that the value of size symbol 1816 of BVD predictor 1836 matches the value of size symbol 1816 of BVD1810 may be proportional to this distance of 1864. Therefore, the incremental change in the value of size symbol 1816 of BVD1810 corresponds to BVD1810 (or the BVD of BVD1810). x The change in the value of 1812) can be helpful when selecting the probability model 1844 for representation 1838.

[0149] To adaptively select from two or more probabilistic models, the context modeler 1846 uses BVD1810 (or BVD of BVD1810) for incremental changes in the value of the size symbol 1816 of BVD1810. x The value of 1812) may be compared to one or more thresholds. For example, the context modeler 1846 may compare the BVD1810 (or the BVD of BVD1810) to the incremental change in the value of the size symbol 1816 of BVD1810. xThe value of 1812) can be compared to the first threshold. The incremental change in the value of the size symbol 1816 of BVD1810 is compared with BVD1810 (or BVD of BVD1810). x If the value of 1812) is less than the threshold, the context modeler 1846 can select the first probabilistic model for display 1838. BVD1810 (or BVD of BVD1810) for the incremental change in the value of the size symbol 1816 of BVD1810 x If the value of 1812) exceeds the threshold, the context modeler 1846 can select a second probabilistic model for display 1838. As another example, BVD1810 (or BVD of BVD1810) for the incremental change in the value of the size symbol 1816 of BVD1810. x If the value of 1812) exceeds the threshold, the context modeler 1846 can compare that value to a second threshold. BVD1810 (or BVD of BVD1810) for the incremental change in the value of the size symbol 1816 of BVD1810 x If the value of 1812) is less than the second threshold, the context modeler 1846 can select the second probabilistic model for display 1838. BVD1810 (or BVD of BVD1810) for the incremental change in the value of the size symbol 1816 of BVD1810 x If the value of 1812) exceeds the second threshold, the context modeler 1846 can select a third probabilistic model for the representation 1838.

[0150] As shown in Figure 18C, the probability model 1844 gives the probability P of the least likely symbol (LPS) in representation 1838. LPS And the value of the most frequently occurring symbol (MPS) for display 1838 v MPS It can include these two parameters. In another example, the probability model 1844 shows the probability P of LPS in 1838. LPS In addition, or instead, the probability P of the displayed 1838 MPS MPS It may include. Similarly, in other examples, the probability model 1844 displays the MPS value v of 1838. MPS In addition, or instead, the value of LPS v of 1838 LPSThis may include. After the arithmetic encoder 1842 encodes the representation 1838, the arithmetic encoder 1842 can provide one or more probabilistic model update parameters 1850 to the context modeler 1846. The context modeler 1846 can adapt the probabilistic model 1844 based on one or more probabilistic model update parameters 1850. For example, one or more probabilistic model update parameters 1850 may include the actually encoded values ​​of the representation 1838. The context modeler 1846 can use the actual encoded values ​​of the representation 1838 to determine v MPS If not equal to, display 1838 P LPS Increase the value, otherwise display 1838 P LPS By reducing this value, the probability model 1844 can be updated.

[0151] The arithmetic encoder 1842 may, after processing a large number of binary symbols (for example, symbols corresponding to one or more syntactic elements), determine the values ​​within the range of the last encoded interval as the arithmetic codeword 1852.

[0152] Next, the arithmetic encoder 1842 may output an arithmetic codeword 1852. For example, the arithmetic encoder 1842 may output the arithmetic codeword 1852 to the bitstream that is received and processed by the video decoder.

[0153] Figure 18D shows an example of a decoder (for example, decoder 300 in Figure 3). According to an embodiment of the present disclosure, this decoder can receive an arithmetic codeword 1852, arithmetically decode an indication 1838 from the arithmetic codeword 1852, and use the indication 1838 to determine the size symbol 1816 of BVD 1810.

[0154] The decoder can receive the arithmetic codeword 1852 in the bitstream. The decoder can provide the arithmetic codeword 1852 to the arithmetic decoder 1854. Based on the method of determining representation 1838 as described above, representation 1838 may have a non-uniform probability distribution. Therefore, the arithmetic decoder 1854 may process representation 1838 in normal arithmetic decoding mode. For example, the arithmetic decoder 1854 can decode the symbol encoded by the arithmetic codeword 1852 by performing recursive interval decomposition as described above. For example, the arithmetic decoder 1854 can arithmetically decode a symbol that takes a value from an m-adic source alphabet by dividing the initial coding interval into m non-overlapping sub-intervals. The m non-overlapping sub-intervals may have widths proportional to the probability that the symbol has different values ​​in the m-adic source alphabet. For a binary symbol such as representation 1838, m=2, and the initial coding interval may be divided into two sub-intervals having widths proportional to the probability that each of the two possible values ​​{0,1} is taken. The probability that a symbol takes on a different value within the m-adic source alphabet is sometimes called the symbol probability model, as mentioned above. The symbol is arithmetically decoded from the arithmetic codeword 1852 by finding the symbol value corresponding to the subinterval containing the arithmetic codeword. The decoder uses the sequence s={s1,s2,···,s N Each symbol s i By applying this interval partitioning method recursively N times and determining which sub-interval each arithmetic codeword belongs to in each iteration, sequential decoding can be performed.

[0155] When decoding the symbol corresponding to representation 1838, the arithmetic decoder 1854 may receive the probabilistic model 1844 of representation 1838 from the context modeler 1846. The context modeler 1856 can determine the probabilistic model 1844 of representation 1838 by fixed selection or adaptive selection from two or more probabilistic models, in the same manner as described above for the context modeler 1846 shown in Figure 18C.

[0156] As shown in FIG. 18D, after the arithmetic decoder 1854 decodes the display 1838, the arithmetic decoder 1854 can provide one or more probability model update parameters 1850 to the context model 1856.

[0157] The context model 1856 can adapt the probability model 1844 based on one or more probability model update parameters 1850. For example, the one or more probability model update parameters 1850 may include the actually decoded value of the display 1838. The context model 1856 increases the P of the display 1838 when the actually decoded value of the display 1838 is not equal to v MPS and decreases the P of the display 1838 otherwise, thereby updating the probability model 1844. LPS LPS

[0158] ​​After entropy decoding of display 1838, the decoder can determine the value of size symbol 1816 of BVD1810 based on the value of size symbol 1816 of BVD predictor 1836 and the value of display 1838. For example, if display 1838 indicates that the value of size symbol 1816 of BVD1810 matches the value of size symbol 1816 of BVD predictor 1836, the decoder can determine that the value of size symbol 1816 of BVD1810 is equal to the value of size symbol 1816 of BVD predictor 1836. Conversely, if display 1838 indicates that the value of size symbol 1816 of BVD1810 does not match the value of size symbol 1816 of BVD predictor 1836, the decoder can determine that the value of size symbol 1816 of BVD1810 is not equal to (or equal to) the value of size symbol 1816 of BVD predictor 1836. The value of size symbol 1816 of BVD predictor 1836 is "0", which matches the value of size symbol 1816 of BVD1810. In this example, display 1838 indicates that the value of size symbol 1816 of BVD1810 matches the value of size symbol 1816 of BVD predictor 1836. In one example, display 1838 is 1 bit, and its value can be "0" if the value of size symbol 1816 of BVD1810 matches the value of size symbol 1816 of BVD predictor 1836, and "1" if the value of size symbol 1816 of BVD1810 does not match the value of size symbol 1816 of BVD predictor 1836. Logic 1858 may be used to determine the size symbol 1816 of BVD1810. In one example, logic 1858 implements a logical XOR function. In other examples where size symbol 1816 is non-binary, display 1838 may represent the first candidate (sorted, for example, based on their respective costs) among several candidates that have a size symbol 1816 value that matches the size symbol 1816 value in BVD1810.

[0159] The decoder can determine the value of the size symbol 1816 of the BVD predictor 1836 in the same manner as the encoder described above. More specifically, the decoder may select the BVD predictor 1836 from among several BVD candidates based on the cost of the several BVD candidates. The BVD candidates may include one BVD candidate for each possible value of the size symbol of BVD1810. For example, the size symbol of BVD1810, as represented in binary form, has only two possible values. Therefore, the BVD candidates may include at least two BVD candidates for this representation (corresponding to each possible value of the size symbol of BVD1810 to be encoded). The first BVD candidate is equal to BVD1810 itself, and the second BVD candidate is equal to BVD1810 but with the opposite size symbol value (or the other value). The cost of each of the several BVD candidates may be calculated based on the difference between the template of the current block 1804 and the template of the candidate reference block, as described above for the encoder. The candidate reference block may be shifted relative to the current block by the sum of the BVD candidate and BVP1808. The decoder can select the lowest-cost BVD candidate as BVD predictor 1836.

[0160] Furthermore, the approach described above with respect to Figure 18, namely the approach of entropy encoding an indication of whether the value of the BVD size symbol matches the value of the size symbol of a BVD candidate used as a BVD predictor, may be applied to multiple size symbols of the BVD. For example, the above approach can be applied to BVDs other than size symbol 1816. x One or more size symbols of 1812, and / or BVD y This may be further applied to one or more size symbols of 1814. The approach described above applies to the BVD with respect to Figure 18. x 1812 and / or BVD y For each of the 1814 additional size symbols, an additional candidate BVP may be determined. For example, the approach described above with respect to Figure 18 is BVD x 1812 and / or BVD yWhen applied to N size symbols of 1814 (N is an integer value), BVD x 1812 and / or BVD y For each possible combination of values of the N size symbols of 1814, different BVP candidates can be determined. Further, a cost value is obtained for each BVP candidate and sorted, resulting in BVD x 1812 and / or BVD y A BVD predictor for encoding each of the N size symbols of 1814 can be determined.

[0161] Also, the approach of entropy encoding the indication of whether the value of the size symbol of BVD, as described above with respect to FIG. 18, matches the value of the size symbol of the BVD candidate used as the predictor of BVD can be applied not only to one or more size symbols of BVD, but also to one or more code symbols (e.g., the code of the horizontal component and / or the code of the vertical component). For example, the above approach can be further applied to one or more size symbols of BVD 1810 and one or more code symbols of BVD 1810.

[0162] As a more specific example, FIG. 19A continues and reproduces the example of FIG. 18A, and further shows the code symbol 1916 of BVD 1810 that is entropy encoded according to the approach described above with respect to FIG. 18. The code symbol 1916 is the horizontal component BVD of BVD 1810 x 1812 indicates the code. In the example of FIG. 19A, BVD x The code of 1812 is negative (-). The code symbol 1916 may indicate the code of BVD x 1812 using binary symbols. For example, the code symbol 1916 may take a value of binary "0" or "1", and BVD x 1812 may indicate that the code is negative (-) (the other binary symbol value not used to indicate the negative (-) code may be used to indicate the positive (+) code).

[0163] Instead of directly entropically encoding the code symbol 1916 of BVD1810, the encoder may entropically encode a representation indicating whether the value of the code symbol 1916 of BVD1810 matches the value of the same code symbol of a BVD candidate used as a predictor for BVD1810. The encoder can select a BVD predictor from among several BVD candidates based on the cost of the multiple BVD candidates. The BVD candidates may include at least one candidate corresponding to each of the two possible values ​​of the code symbol 1916 of BVD1810. The first BVD candidate 1918 is equal to BVD1810 itself, and the second BVD candidate 1920 is equal to BVD1810, but the value of the code symbol 1916 of BVD1810 is the opposite (or has the other value).

[0164] Figure 19B shows both BVD candidates used to entropy encode the code symbol 1916 of BVD1810. More specifically, Figure 19B shows BVD candidate 1918, which is equal to BVD1810 itself, and BVD candidate 1920, which is equal to BVD1810 but has the opposite value (or the other value) for the code symbol 1916. Because BVD candidate 1920 has the opposite value (or the other) for the code symbol 1916 of BVD candidate 1918, BVD candidate 1920 has a size of 10011 (19 in decimal) in fixed-length binary and a horizontal component BVD with a positive (+) sign. x It has 1922. BVD is the vertical component of BVD candidate 1920. y 1924 is the vertical component of BVD candidate 1918 (or BVD 1810). y 1814 and fixed-length binary have the same size 01011 (11 in decimal) and have a positive sign.

[0165] The cost of each of the plurality of BVD candidates can be calculated based on the difference between the template of the current block 1804 and the template of the candidate reference block that is offset from the current block 1804 by the sum of the BVD candidate and BVP 1808. For example, the encoder determines the cost of the BVD candidate 1918 based on the difference between the template 1926 of the current block 1804 and the template 1928 of the candidate reference block 1930 that is offset from the current block 1804 by the sum of the BVD candidate 1918 and BVP 1808. The encoder can calculate the difference between the template 1926 and the template 1928 based on the difference between the samples of the template 1926 and the samples of the template 1928 (e.g., sum of squared differences (SSD), sum of absolute differences (SAD), sum of absolute transform differences (SATD), mean-removed SAD, or mean-removed SSD). Similarly, the encoder can determine the cost of the BVD candidate 1920 based on the difference between the template 1926 of the current block 1804 and the template 1932 of the candidate reference block 1934 that is offset from the current block 1804 by the sum of the BVD candidate 1920 and BVP 1808. The encoder can obtain the difference between the template 1926 and the template 1932 based on the difference between the samples of the template 1926 and the samples of the template 1932 (e.g., SSD, SAD, SATD, mean-removed SAD, or mean-removed SSD). The templates 1926, 1928, and 1932 may each include one or more samples on the left side and / or the upper side of the respective block. For example, the templates 1926, 1928, and 1932 may each include one or more columns of samples on the left side of the respective block and / or one or more rows of samples on the upper side of the respective block. FIG. 19B shows an example of the positions and shapes (L-shaped rotated 90 degrees clockwise) of the templates 1926, 1928, and 1932.

[0166] After determining the costs of multiple BVD candidates, the encoder may select one of them as the BVD predictor. For example, the encoder may select the BVD candidate with the lowest cost among the multiple BVD candidates as the BVD predictor. Figure 19C shows a table with the components (horizontal and vertical) and costs of each BVD candidate 1918 and 1920 in their respective rows. In this example, we assume that only BVD candidates 1918 and 1920 exist as BVD candidates. In other examples, more BVD candidates may be used (for example, the BVD candidate in Figure 18 may be further included in multiple BVD candidates, with the size symbol 1816 entropy-encoded according to the method described in Figure 18). The rows in the table are sorted by the cost of BVD candidates 1918 and 1920, with the BVD candidate with the lowest cost at the top. In this example, BVD candidate 1918 has the lowest cost among BVD candidates 1918 and 1920. Therefore, the encoder can select BVD candidate 1918 as BVD predictor 1936 for BVD1810.

[0167] After selecting BVD candidate 1918 as BVD predictor 1936, the encoder may entropy encode the indication 1938 of whether the value of the code symbol 1916 of BVD 1810 matches the value of the code symbol 1916 of BVD predictor 1936. The code symbol 1916 of BVD predictor 1936 has a value indicating a negative sign, and this value matches the value of the code symbol 1916 of BVD 1810, which also indicates a negative sign. In this example, indication 1938 indicates that the value of the code symbol 1916 of BVD 1810 matches the value of the code symbol 1916 of BVD predictor 1936. In one example, the representation 1938 is 1 bit, and its value can be "0" if the value of the code symbol 1916 of BVD1810 matches the value of the code symbol 1916 of BVD predictor 1936, and "1" if the value of the code symbol 1916 of BVD1810 does not match the value of the code symbol 1916 of BVD predictor 1936. Logic 1940 may be used to determine the representation 1938. In one example, logic 1940 implements an exclusive OR (XOR) function.

[0168] In the example of FIG. 19C, the encoder entropy encodes the display 1938 using an arithmetic encoder 1942. Based on the method of determining the display 1938 as described above, the display 1938 may have a non-uniform probability distribution. Therefore, the arithmetic encoder 1942 can process the display 1938 in the normal arithmetic coding mode as described above. For example, the arithmetic encoder 1942 can divide the current coding interval into m non-overlapping sub-intervals. Each of the m non-overlapping sub-intervals may have a width proportional to the probability that the symbol to be encoded has a different value within the m-ary source alphabet. In the case of the binary display 1938, m = 2, and the current coding interval may be divided into two non-overlapping intervals having widths proportional to the probabilities of the two possible values {0, 1} of the display 1938 to be encoded. The probabilities of the two possible values of the display 1938 may be indicated by the probability model 1944 of the display 1938. The arithmetic encoder 1942 may encode the display 1938 by selecting the sub-interval corresponding to the actual value of the display 1938 as the new coding interval for the next binary symbol to be encoded.

[0169] The arithmetic encoder 1942 can receive the probability model 1944 from the context model 1946. The context model 1946 can determine the probability model 1944 of the display 1938 by fixed selection or adaptive selection from among two or more probability models. For example, the context model 1946 can determine the probability model 1944 by fixed selection or adaptive selection from among two or more probability models based on the magnitude of the component of the BVD 1810 corresponding to the code symbol 1916 (in the example of FIG. 19, the horizontal component BVD x 1812). The magnitude of the horizontal component BVDx 1812 of the BVD 1810 provides an indication of the distance 1964 (shown in FIG. 19B) between the candidate reference blocks 1930 and 1934. The distance 1964 specifically refers to the horizontal component BVD of the BVD 1810 xIt is equal to twice the size of 1812. The probability that the value of code symbol 1916 of BVD1810 matches the value of code symbol 1916 of BVD predictor 1936 is generally related to the distance 1964. More specifically, the larger the distance 1964 between candidate reference blocks 1930 and 1934 (and between their respective templates 1928 and 1932), the higher the probability that the value of code symbol 1916 of BVD1810 matches the value of code symbol 1916 of BVD predictor 1936. Thus, the horizontal component BVD of BVD1810 x The magnitude of 1812 may be helpful when selecting the probability model 1844 for display 1838.

[0170] However, a problem may arise if the context modeler 1946 determines the probability model 1944 of representation 1938 depending on the magnitude of the horizontal component BVDx1812 of BVD1810. As mentioned above, the horizontal component BVD x One or more of the 1812 size symbols may be entropy encoded according to the method in Figure 18. For example, the horizontal component BVD x The size symbol 1816 of 1812 is entropy encoded according to the method in Figure 18 as described above. As a result, after the arithmetic decoder analyzes the information about size symbol 1816 from the bitstream, the value of size symbol 1816 may not be available to the decoder. What is available after the arithmetic decoder analyzes the relevant information is the horizontal component BVD of BVD1810. xThe only indication 1838 may be whether the value of the size symbol 1816 of 1812 matches the value of the size symbol of the horizontal component of the selected BVD predictor. To obtain the actual value of the size symbol 1816, the decoder may need to perform a further decoding process. For example, the decoder may need to use a template, as described with respect to Figure 18, to determine the costs of multiple BVD candidates for the size symbol 1816. This can create a dependency between the bitstream analysis and decoding process (e.g., performed by an arithmetic decoder), i.e., an analysis dependency. The arithmetic decoder can determine the size symbol 1816 (or the horizontal component BVD of BVD 1810 entropy-encoded according to the method in Figure 18) x The representation 1938 of the code symbol 1916 cannot be parsed from the bitstream until any other size symbol (1812) is decoded. As a result, the arithmetic decoder, which is often a throughput bottleneck, may get stuck until the size is decoded.

[0171] Analysis dependency can be resolved by binarizing the BVD magnitude (e.g., the magnitude of the horizontal and / or vertical components) using a binarization scheme or code. This binarization scheme or code includes a first part indicating a range of values ​​that contain the BVD magnitude, and a second part indicating the exact value of the BVD within that range. Various codes exist that include a first part indicating a range of values ​​and a second part indicating the exact value within that range, such as Rice codes, Golomb codes (e.g., Golomb-Rice codes or exponential Golomb codes), and fixed-length codes. Encoders and decoders can entropy encode and decode the first part indicating a range of values ​​that contains the BVD magnitude in a manner that does not require decoding to obtain the first part indicating a range of values ​​that contains the BVD magnitude (e.g., bypass arithmetic coding mode). The first part, which indicates a range of values ​​that include the BVD size but not the exact value of the BVD size, can be used to determine a probabilistic model for entropy coding a representation (e.g., representation 1938) that indicates whether the value of the BVD's code symbol matches the value of the BVD predictor's code symbol. In the selection of the probabilistic model, the second part, which indicates the exact value of the BVD size within the range, is not used, so the size symbol of the second part can still be entropy coded according to the method in Figure 18 without introducing the analysis dependency described above.

[0172] For example, referring again to Figure 19, the magnitude of the horizontal component BVDx1812 of BVD1810 is binarized using the Golomb-Rice code. The Golomb-Rice code has the structure described above, where the first part indicates a range of values, and the second part indicates the exact value within that range. In the Golomb-Rice code, the first part is called the "prefix" and the second part is called the "suffix". k-th Golomb-Rice code C gr k (v) contains a unary encoded prefix, i.e., the first (rough) part obtained by division by the divisor consists of multiple ones followed by one zero (or vice versa). The remainder is encoded as k suffix bits. These k suffix bits are integers 0 ≤ i < 2 kThis is the binary representation. An example of the Golomb-Rice code for k=4 is shown in Table 1 below. In Table 1 and the following explanation, x0, x1, ..., x n represents the bit of the codeword (i.e., the exact remainder after division), and x n The result is {0,1}. [Table 1]

[0173] n is the number of prefix bits. p , the number of suffix bits is n s This is represented as follows. In the case of Golomb-Rice code, the number of suffix bits is n. s =k. When encoding the value v, the number of prefix bits is determined by the following formula.

number

number

number

[0174] In the Golomb-Rice code described above, the suffix is ​​of a fixed length. Alternatively, the length of the suffix may be determined by the length of the prefix. The exponential Golomb code (Exp-Golomb) uses this approach, and furthermore, the horizontal component BVD1810 is BVD x It can also be used to binarize a magnitude of 1812. k-th exponential Golomb code C eg k (v) includes a single prefix code and a variable-length suffix. The number of bits in the suffix is ​​n. s The value of the prefix n is as shown in the following equation. p It is determined by [the following]. [Number] C eg k The number n of prefix bits of (v) p is determined from the value v by the following formula [Number] In this case, the suffix is n of the following formula s becomes a bit representation [Number] An example of the exponential Golomb code for k = 1 is shown in Table 2 below [Table 2]

[0175] In the example of Fig. 19, the horizontal component BVD of BVD1810 x The magnitude of 1812 has a value of 19 in decimal and can be represented by a Golomb - Rice code or an exponential Golomb code. For example, the magnitude of the horizontal component BVD of BVD1810 x 1812 can be represented by an exponential Golomb code of degree k = 4 with a prefix of "0001" and a suffix of "0101". The prefix "0001" indicates that the magnitude of the horizontal component BVD of BVD1810 x 1812 is within the range of values 14 to 29, and the suffix "0101" indicates that the magnitude of the horizontal component BVD of BVD1810 xThis indicates that the magnitude value of 1812 is exactly 19 within that range. One or more of the magnitude bits of the suffix can be entropically coded and decoded according to the method in Figure 18 (for example, similar to the magnitude symbol 1816). On the other hand, one or more of the bits of the prefix can be entropically coded and decoded in a way that does not require arithmetic decoding when determining the value of the prefix (for example, in bypass arithmetic coding mode). Because the prefix is ​​entropically coded and decoded in this way without requiring decoding, the context modeler 1946 can determine the prefix (or BVD) without introducing analysis dependencies. x The probability model 1944 of representation 1938 can be determined based on the range of values ​​that includes the magnitude of 1812. The reason why the context modeler 1946 can determine the probability model 1944 of representation 1938 based on the prefix without introducing analysis dependencies is understood to be because the context modeler 1946 makes the decision without using the suffix (or the exact value within the range of values ​​indicated by the prefix).

[0176] To adaptively select from two or more probabilistic models, the context modeler 1946 uses BVD. x A value within the range of values ​​indicated by the sign prefix used to represent the magnitude of 1812 (or BVD) xA value within the range of values ​​that includes a magnitude of 1812 can be compared to a first threshold. If the value within the range of values ​​indicated by the prefix is ​​less than the first threshold, the context modeler 1946 can select the first probabilistic model for representation 1938. If the value within the range of values ​​indicated by the prefix exceeds the first threshold, the context modeler 1946 can select the second probabilistic model for representation 1938. In another example, if the value within the range of values ​​indicated by the prefix exceeds the first threshold, the context modeler 1946 can compare that value to a second threshold. If the value within the range of values ​​indicated by the prefix is ​​less than the second threshold, the context modeler 1946 can select the second probabilistic model for representation 1938. If the value within the range of values ​​indicated by the prefix exceeds the second threshold, the context modeler 1946 can select the third probabilistic model for representation 1938. The values ​​within the range indicated by the prefix may be the lower limit of the range, the upper limit of the range, or a value greater than the lower limit but less than the upper limit. In another example, instead of directly using the values ​​within the range indicated by the prefix in the threshold comparison, a different value determined based on those values ​​may be compared to the threshold. In yet another example, instead of using the values ​​within the range indicated by the prefix, the range of values ​​itself may be used in the threshold comparison.

[0177] As shown in Figure 19C, the probability model 1944 gives the probability P of the least likely symbol (LPS) in representation 1938. LPS And the value of the most frequently occurring symbol (MPS) for display 1938 v MPS It can include these two parameters. In another example, the probability model 1944 shows the probability P of LPS in 1938. LPS In addition, or instead, the probability P of MPS for 1938 is displayed. MPS It may include. Similarly, in other examples, the probability model 1944 displays the value of MPS v of 1938. MPS In addition, or instead, the value of LPS v of 1938 is displayed. LPSThis may include. After the arithmetic encoder 1942 encodes the representation 1938, the arithmetic encoder 1942 can provide one or more probabilistic model update parameters 1950 to the context modeler 1946. The context modeler 1946 can adapt the probabilistic model 1944 based on one or more probabilistic model update parameters 1950. For example, one or more probabilistic model update parameters 1950 may include the actually encoded values ​​of the representation 1938. The context modeler 1946 can use the actual encoded values ​​of the representation 1938 to determine v MPS If not equal to, display 1938 P LPS Increase the value, otherwise display 1938 P LPS By reducing this value, the probability model 1944 can be updated.

[0178] The arithmetic encoder 1942 may, after processing a number of binary symbols (e.g., symbols corresponding to one or more syntactic elements), determine the value within the range of the last encoded interval as the arithmetic codeword 1952. The arithmetic encoder 1942 may then output the arithmetic codeword 1952. For example, the arithmetic encoder 1942 may output the arithmetic codeword 1952 to a bitstream that is received and processed by a video decoder.

[0179] Figure 19D shows an example of a decoder (for example, decoder 300 in Figure 3). According to an embodiment of the present disclosure, this decoder can receive an arithmetic codeword 1952, arithmetically decode an indication 1938 from the arithmetic codeword 1952, and use the indication 1938 to obtain the code symbol 1916 of BVD 1810.

[0180] The decoder can receive the arithmetic codeword 1952 in the bitstream. The decoder can provide the arithmetic codeword 1952 to the arithmetic decoder 1954. Based on the method of determining representation 1938 as described above, representation 1938 may have a non-uniform probability distribution. Therefore, the arithmetic decoder 1954 may process representation 1938 in normal arithmetic decoding mode. For example, the arithmetic decoder 1954 can decode the symbol encoded by the arithmetic codeword 1952 by performing recursive interval decomposition as described above. For example, the arithmetic decoder 1954 can arithmetically decode a symbol that takes a value from an m-adic source alphabet by dividing the initial coding interval into m non-overlapping sub-intervals. The m non-overlapping sub-intervals may have widths proportional to the probability that the symbol has different values ​​in the m-adic source alphabet. For a binary symbol such as representation 1938, m=2, and the initial coding interval may be divided into two sub-intervals having widths proportional to the probability that each of the two possible values ​​{0,1} is taken. The probability that a symbol takes on a different value within the m-adic source alphabet is sometimes called the symbol probability model, as mentioned above. The symbol is arithmetically decoded from the arithmetic codeword 1952 by finding the symbol value corresponding to the subinterval containing the arithmetic codeword. The decoder uses the sequence s={s1,s2,···,s N Each symbol s i By applying this interval partitioning method recursively N times and determining which sub-interval each arithmetic codeword belongs to in each iteration, sequential decoding can be performed.

[0181] When decoding the symbol corresponding to representation 1938, the arithmetic decoder 1954 may receive the probabilistic model 1944 of representation 1938 from the context modeler 1956. The context modeler 1956 can determine the probabilistic model 1944 of representation 1938 by fixed selection or adaptive selection from two or more probabilistic models, in the same manner as described above for the context modeler 1946 shown in Figure 18C.

[0182] As shown in Figure 19D, after the arithmetic decoder 1954 decodes the representation 1938, the arithmetic decoder 1954 can provide one or more probabilistic model update parameters 1950 to the context modeler 1956. The context modeler 1956 can adapt the probabilistic model 1944 based on one or more probabilistic model update parameters 1950. For example, one or more probabilistic model update parameters 1950 may include the actually decoded values ​​of the representation 1938. The context modeler 1956 can then use the actual decoded values ​​of the representation 1938 to determine the probabilistic model 1944. MPS If not equal to, display 1938 P LPS Increase the value, otherwise display 1938 P LPS By reducing this value, the probability model 1944 can be updated.

[0183] After entropy decoding of display 1938, the decoder can determine the value of code symbol 1916 of BVD1810 based on the value of code symbol 1916 of BVD predictor 1936 and the value of display 1938. For example, if display 1938 indicates that the value of code symbol 1916 of BVD1810 matches the value of code symbol 1936 of BVD predictor 1936, the decoder can determine that the value of code symbol 1916 of BVD1810 is equal to the value of code symbol 1916 of BVD predictor 1936. Conversely, if display 1938 indicates that the value of code symbol 1916 of BVD1810 does not match the value of code symbol 1916 of BVD predictor 1936, the decoder can determine that the value of code symbol 1916 of BVD1810 is not equal to (or equal to) the value of code symbol 1916 of BVD predictor 1936. The code symbol 1916 of BVD predictor 1936 has a value that matches the value of code symbol 1916 of BVD1810. In this example, representation 1938 indicates that the value of code symbol 1916 of BVD1810 matches the value of code symbol 1916 of BVD predictor 1936. In one example, representation 1938 is 1 bit, and its value can be "0" if the value of code symbol 1916 of BVD1810 matches the value of code symbol 1916 of BVD predictor 1936, and "1" if the value of code symbol 1916 of BVD1810 does not match the value of code symbol 1916 of BVD predictor 1936. Logic 1958 may be used to find the code symbol 1916 of BVD1810. In one example, logic 1958 implements a logical XOR function.

[0184] The decoder can determine the value of the code symbol 1916 of the BVD predictor 1936 in the same manner as the encoder described above. More specifically, the decoder may select the BVD predictor 1936 from among several BVD candidates based on the cost of these candidates. The BVD candidates may include one BVD candidate for each possible value of the code symbol of BVD1810. For example, the code symbol of BVD1810, as represented in binary form, has only two possible values. Therefore, the BVD candidates may include at least two BVD candidates for this representation (corresponding to each possible value of the code symbol of BVD1810 to be encoded). The first BVD candidate is equal to BVD1810 itself, and the second BVD candidate is equal to BVD1810 but with the opposite value of the code symbol (or the other value). The cost of each of the multiple BVD candidates may be calculated based on the difference between the template of the current block 1804 and the template of the candidate reference block, as described above for the encoder. The candidate reference block may be shifted relative to the current block by the sum of the BVD candidate and BVP1808. The decoder can select the lowest-cost BVD candidate as the BVD predictor 1936.

[0185] Furthermore, the approach described above with respect to Figures 18 and 19 may be further applied to one or more size symbols of BVD used in IBC, or instead, to one or more size symbols of MVD used in interpretation. In the case of interpretation, the terms BV, BVP, BVD, and BVD candidate used in Figures 18 and 19 may be replaced with MV, MVP, MVD, and MVD, which will be understood by those skilled in the art in accordance with this disclosure.

[0186] Furthermore, the approach described above with respect to Figures 18 and 19 can be applied to IBC and interpretation based on translational motion models of prediction blocks. In other examples, the approach described above with respect to Figures 18 and 19 can be applied to IBC and interpretation based on affine motion models of prediction blocks.

[0187] Furthermore, the code prefix representing the magnitude of the components of the BVD may also be used to select the context (or probabilistic model) of one or more symbols of the code suffix. In addition, one or more symbols in the code suffix representing the magnitude of the components of the BVD, which have not been entropy coded and decoded according to the method described above with respect to Figure 18, may be used in combination with the code prefix to select the context (or probabilistic model) of one or more symbols of the code suffix.

[0188] To adaptively select from two or more probabilistic models, the context modeler 1946 uses BVD. x A value within the range of values ​​indicated by the sign prefix used to represent the magnitude of 1812 (or BVD) x A value within the range of values ​​that includes a magnitude of 1812 can be compared to a first threshold.

[0189] Figure 20A shows an example of BVD representation according to a known video encoding implementation, more specifically the BVD size and code. BVD2000 includes values ​​representing its size 2004 and code 2010 in a bitstream from encoder to decoder, for example. As mentioned above regarding BVD encoding, the size can be represented as an exponential Golomb code, and the size prefix 2006 can be context-encoded using the normal mode of a CABAC coder, etc., to improve the compression efficiency when storing or transmitting the BVD. The following table shows how to determine the corresponding prefix and suffix values ​​according to the exponential Golomb code for a given BVD value (i.e., a given BVD size). [Table 3]

[0190] In the known implementations described above in relation to Figure 20A, the size suffix 2008 and code 2010 are encoded in the bypass mode of the CABAC encoder, which may result in the compression efficiency obtained with the context-encoded prefix 2006 not being achieved. A flag 2002 (also referred to herein as the "size > 0 flag") indicating whether the size is greater than 0 is included in BVD2000. The decoder can use this size > 0 flag to parse the bitstream more efficiently.

[0191] The above description relating to Figures 18 (Figures 18A to 18D) and 19 (Figures 19A to 19D) illustrates, in some embodiments of the present disclosure, a method for improving the compression efficiency of BVDs by predictively coding the suffix, or both the suffix and the code, and then entropically coding them using the normal mode of a CABAC coder.

[0192] Some other encoding techniques propose to improve compression efficiency during BVD transmission by notifying the decoder of the suffix if the encoder determines that certain conditions are met with respect to the BVD. The basic idea of ​​such proposed techniques is similar to the techniques used in IBC merge mode (MBVD) with block vector difference. As an example of such proposed techniques, if the encoder determines, by searching the reference region, that the BVD corresponds exactly to, or to a predetermined high degree, the "best" BVD that the decoder can find, the encoder chooses not to notify the decoder of the suffix. If the encoder decides not to notify the decoder of the suffix, the encoded BVD sent to the decoder in the bitstream will include a prefix and a suffix indication flag that explicitly indicates to the decoder that the encoded BVD does not contain a suffix. The decoder is expected to derive the suffix by finding the same "best" BVD itself and determining the suffix based on that "best" BVD.

[0193] Figure 20B shows an example of a BVD2020 that includes a suffix indication flag 2027 indicating whether or not the encoded BVD2020 contains a suffix. The illustrated BVD2020 contains a suffix 2028, and the value of the suffix indication flag 2027 can be set to a predetermined value indicating the presence of the suffix. If the suffix 2028 is not included, the encoded BVD2020 contains a flag 2022 indicating whether or not its magnitude is greater than 0, a prefix 2026, and a suffix indication flag 2027 set to a predetermined value indicating that the suffix is ​​not indicated. In the encoding technique described in relation to Figure 20A, the BVD prefix and suffix, which are part of the exponential Golomb code, are signaled in a bitstream, and the prefix symbol is context-encoded, whereas in the technique related to Figure 20B, the BVD prefix is ​​signaled in a similar manner to the technique in Figure 20A, and then a flag indicating whether the BVD suffix is ​​present or zero (e.g., referred to in this disclosure as the suffix indication flag, or more commonly as the "suffix flag") is signaled. If the suffix indication flag 2027 indicates that the encoded BVD contains a suffix, the suffix is ​​bypass-encoded.

[0194] Some embodiments of this disclosure describe methods and systems for harmonizing a technique of selectively not signaling the size suffix of a BVD, as described above in relation to Figure 20B, for example, with a technique of predictively coding at least some of the size symbols of a BVD, as described above in relation to Figures 18A-18D and Figures 19A-19D.

[0195] These and other features of this disclosure are described further below.

[0196] In the first implementation of the harmonization according to the embodiments of this disclosure, all encoded BVDs include a suffix flag. Figure 21 shows a representation of BVD 2100 according to some embodiments of this disclosure. If the suffix is ​​not present (i.e., not signaled), the suffix indicator flag 2107 is set to a first value indicating that the suffix is ​​not present. If the suffix 2108 is present in BVD 2100 (i.e., signaled), the suffix indicator flag 2107 is set to a second value indicating that the suffix is ​​present. As shown, the suffix 2108 of BVD 2100 includes one or more context-encoded size symbols. The context-encoded size symbols 2109 are also called predictive-encoded symbols in some embodiments. This is because, as described above in relation to Figures 18 and 19, each context-encoded symbol of the suffix includes an indicator of whether the prediction is correct or not.

[0197] The suffix 2108 of BVD2100 includes two context-encoded size symbols 2109 and two bypass-encoded size symbols 2110. Embodiments of this disclosure do not limit the number of context-encoded or bypass-encoded symbols in the suffix 2108. The encoded BVD2100 includes a size > 0 flag 2102, a prefix 2106, a suffix indication flag 2107, and the suffix 2108.

[0198] Figure 22A shows a flowchart of a method 2200 for decoding a BVD according to a part of the present disclosure. Method 2200 can be implemented by a decoder such as the decoder 300 in Figure 3.

[0199] Method 2200 begins with 2202 (the ellipse indicates the start of the method). In 2202, the decoder receives the encoded BVD in the received bitstream. For example, the decoder may receive BVD2100 in the bitstream.

[0200] In 2204, it is determined whether a suffix flag (e.g., suffix display flag 2107) exists in the BVD bitstream and whether it has a first value. The diamond represents a conditional branch of the flow, where Y indicates the condition is true and N indicates it is false. If the value of the suffix flag is the first value, it indicates that the encoded BVD does not contain a size suffix. Alternatively, the suffix flag has a second value. If the suffix flag has a second value, it indicates that the encoded BVD contains a suffix. These values ​​can be 0 and 1.

[0201] If step 2204 determines that the suffix flag has a first value, the method proceeds to step 2206, indicating that the encoded BVD does not contain a suffix and that the decoder must derive the suffix without being notified of it by the encoder (i.e., based on the locally best-matching block-periphery template within a limited high-precision region corresponding to various suffix values ​​of the BVD or MVD). (Conversely, if it is detected that the flag exists, i.e., has a corresponding representation value, then entropy decoding of the suffix data is performed.)

[0202] In some embodiments, the suffix is ​​determined by the decoder based at least on the prefix value included in the notified BVD. The reference region may be determined based on the prefix. Note that the BVD consists of two components, the BVD, corresponding to the magnitudes in the x and y directions, respectively. x and BVD yNote that this is defined by . Therefore, the prefix specifies the x and y coordinates of the reference region to be searched in the decoder. Each prefix value has a range of corresponding suffix values, as shown in Table 3 above, which shows how to identify the corresponding prefix and suffix values ​​according to the exponential Golomb code for a given BVD value (i.e., a given BVD size). Therefore, the reference region for which to search for the "best" BVD, more specifically the "best" BVD suffix, can be determined based on the x, y position specified by the prefix (i.e., the x and y components of the prefix) and a range based on the suffix range of that prefix. In some embodiments, the decoder may use template matching search (e.g., based on the SAD cost (or other cost) between the template of the current block (one row above, one column to the left of the block) and the reference block in the reference search region) in a range dependent on the BVD prefix from the current prefix to the next prefix value. For example, if the BVD prefix is ​​6, the next prefix value is 14 (see Table 3 above, which shows how to identify the corresponding prefix and suffix values ​​according to the exponential Golomb code used for binarization, for a given BVD value (i.e., a given BVD magnitude)). Thus, the search range is 6 to 14. Figure 22D illustrates in more detail an exemplary process for finding the "best" BVD suffix using template matching search based on at least the BVD prefix, according to one embodiment.

[0203] If step 2204 determines that the suffix flag has a second value, the method proceeds to step 2208, indicating that the suffix is ​​included in the BVD. The suffix may include at least one predictively coded size symbol. Each predictively coded symbol codes information indicating whether the value of the BVD's size symbol matches the value of the same size symbol of a BVD candidate used as a BVD predictor. The suffix is ​​determined based on one or more predictively coded size symbols and, if present, one or more bypass-coded size symbols. An example of decoding a predictively coded suffix is ​​shown above in relation to Figure 18D.

[0204] Figure 22B shows a flowchart of method 2210 for encoding BVD according to certain embodiments of the present disclosure. Method 2210 can be implemented by an encoder such as encoder 200 in Figure 2.

[0205] Method 2210 begins at 2212. In 2212, the encoder determines the encoding mode in which it is operating and sets a suffix flag according to the determined mode. In one embodiment, in 2212, the encoder receives the BVD to be sent to the decoder and determines whether it can send the BVD without notifying the suffix, for example. In one example, the encoder determines whether the BVD is an exact match or an exact match to a BVD found by searching a reference region. To make this determination, the encoder may perform a search process on the current BVD similar to that performed by the decoder. At least one example of a search process based on a prefix value is described above in relation to the decoder process in Figure 22A and below in relation to Figure 22D.

[0206] If it is determined that the BVD can be sent without sending a suffix, the suffix flag (e.g., suffix flag 2107) may be set to a first value (e.g., 1). Otherwise, the suffix flag is set to a second value (e.g., 0).

[0207] In step 2214, depending on the setting selected by the suffix flag, the method proceeds to step 2216, where BVD encoding is performed without notifying the suffix, or to step 2218, where BVD encoding includes the suffix.

[0208] In 2216, size encoding is performed without including a suffix representation in the encoded BVD. For example, the encoded BVD includes size flag 2102, prefix 2104, and a suffix flag set to a first value.

[0209] In 2218, the encoded BVD includes a suffix, and the suffix may include at least one context-encoded symbol. Encoding of a suffix containing a context-encoded symbol can be performed as described in relation to Figures 18 and 19.

[0210] Figure 22C shows a flowchart of one aspect of encoding method 2210. Method 2220 can be implemented by an encoder such as encoder 200 in Figure 2.

[0211] Method 2220 begins at 2222 if the encoder receives the BVD to be transmitted and determines, for example, at 2214, that the suffix flag is set to a second value indicating that a suffix is ​​to be transmitted.

[0212] In 2224, it is determined whether at least one size symbol of the suffix is ​​context-coded (i.e., predictively coded). This can be determined, for example, based on a given context coding budget. In some embodiments, it may be necessary to limit context coding to a specified maximum number of symbols in order to control computational cost. Conversely, if the determination of 2224 is "N", the prefix, flag, and code are coded, and in particular, the suffix may be coded without predictive indication (i.e., directly).

[0213] If it is determined that one or more size symbols should be context-coded, in step 2226, one or more size symbols from the top bin are coded along with an indicator showing whether the prediction is correct or not (i.e., whether it matches or not). The suffix is ​​determined based on the context-coded size symbols and the bypass-coded size symbols (i.e., these aspects determine the probability for arithmetic coding).

[0214] In 2228, the BVD is encoded, and the encoded BVD includes a suffix, prefix, suffix flag, and size > 0 flag, which may contain at least one context-encoded size symbol and possibly one or more bypass-encoded size symbols.

[0215] If 2224 determines that there are no size symbols to context encode, 2230 encodes the BVD, and the encoded BVD includes the size value prefix and suffix, the suffix flag, and the size > 0 flag. All suffix symbols are bypass encoded (i.e., directly encoded so that each bin sequence has the same encoded bit sequence).

[0216] Figure 22D schematically illustrates a technique for defining a search region in which the corresponding BVD suffix is ​​sought, based at least on the BVD size prefix. When the value of the suffix flag 2107 is set to the first value, a search process based on template matching (TM) cost is used. Figure 22D shows the process of defining the search region (also called the reference region) 2244 for this search process. The location of the BVD suffix search region within the IBC reference region is determined according to BVP2236, and the size of the BVD suffix search region is the BVD prefix value (prefix BVD as x, y components). x and prefix BVD yDefined by (as shown above). Table 3 above identifies the range of suffix values ​​for a particular prefix value. Thus, as illustrated, the lower right corner of the search region 2244 is determined based on BVP 2236 and the prefix value, and the size of the search region is determined based on the range of suffix values ​​specified in Table 3 for the prefix value. In the example in Figure 22D, a reference block 2234 with a template that minimizes the template matching cost difference with the template of the current block 2232 is found within the search region 2244. As described above, in the exemplary embodiment, the template of a block includes pixels outside its left and top edges. The template cost can be calculated as the difference between the template of the reference block and the template of the current block, based on the difference between samples of both templates (e.g., SSD, SAD, SATD, mean removed SAD, or mean removed SSD). The suffix (represented as suffix Dx and suffix Dy as x and y components) can be determined based on the distance from the lower right corner of the search region 2244, determined by the prefix, to the upper left corner of the reference block. This determines BVD2240 and BV2242. In some embodiments, multiple reference blocks are identified from within the search region based on template matching costs, and when determining the suffix, the rate-distortion optimization (RD optimization) scores of the multiple candidate reference blocks are considered in addition to the template matching costs, and one of the candidate blocks may be selected as the reference block. Considering the RD optimization score in addition to the template matching cost makes it possible to account for the estimated signaling overhead associated with each candidate reference block.

[0217] If, according to the determined size, a portion of the BVD suffix search region extends beyond the IBC reference region, the template matching-based search is performed on the portion of the BVD suffix search region that falls within the IBC reference region. If the BVD suffix search region fits entirely within the IBC reference region, it takes the shape of a rectangle, as shown in Figure 22D. If only the BVD suffix is ​​to be predicted, the template matching search is performed in a single search region. This scenario is shown in Figure 22D. If both the BVD suffix and the BVD sign are to be predicted, the search region may consist of two or more discontinuous search sub-regions defined by the BVD code hypothesis. For example, the size of each search sub-region is determined based on the range of suffix values ​​described above, while the location of each search sub-region can be determined based on the BVP, prefix, and their respective code hypotheses.

[0218] In the first implementation of the harmonization described above in relation to Figures 21 and 22, overhead is incurred by including a suffix flag in each BVD. In the second implementation of the harmonization, the suffix flag is not included if certain conditions are met. More specifically, the suffix flag is included in the encoded BVD if the encoded BVD does not contain a suffix, while the suffix flag is excluded if the BVD suffix does not contain bypass-encoded symbols, or if the number is less than a predetermined threshold. Thus, in this technique, the suffix flag may exist with a first value indicating that the suffix is ​​not advertised in the BVD, with a second value indicating that the suffix is ​​advertised in the BVD, or it may be absent indicating that the suffix is ​​present in the BVD and the number of bypass-encoded suffix symbols is less than (or less than) a predetermined threshold. Figures 23A and 23B show representations of BVDs according to embodiments of this disclosure.

[0219] Figure 23A shows a BVD2300 including the suffix flag 2307 (labeled "Suffix Derivation Flag" in the figure). Suffix 2308 illustrates an example of suffix encoding with multiple context-encoded size symbols 2309 and multiple bypass-encoded size symbols 2310. The encoded BVD2300 includes a size > 0 flag 2302, prefix 2304, and suffix 2308 related to size. Thus, the suffix derivation flag indicates the presence of bypass-encoded bins representing a portion of the suffix of a BVD or MVD data element (i.e., included in the signal). This indicates which bins are bypass-encoded in the encoded portion of the encoded bitstream by the bypass section of the CABAC encoder.

[0220] Figure 23B shows a BVD 2320 without the suffix flag 2307, because 2320 does not contain bypass-encoded size symbols. In the illustrated example, if the BVD does not contain bypass-encoded suffix size symbols, the suffix flag is excluded from the BVD. However, in some embodiments, the suffix flag may be included or excluded based on whether the number of bypass-encoded size symbols in the suffix is ​​below (or less than) a predetermined threshold.

[0221] Figure 24A shows a flowchart of a method 2400 for decoding a BVD, such as the one shown in Figures 23A and 23B, according to an embodiment of the present disclosure. Method 2400 can be implemented by a decoder, such as the decoder 300 in Figure 3.

[0222] Method 2400 begins with 2402. In 2402, the decoder receives the encoded BVD in the received bitstream. For example, the decoder may receive BVD2300 in the bitstream.

[0223] In step 2404, it is determined whether a suffix flag (e.g., suffix display flag 2307) exists in the BVD bitstream. If it exists, the method proceeds to step 2406. If the suffix flag does not exist, the method proceeds to step 2412 (entropy decoding of at least one context-encoded symbol to determine the suffix).

[0224] In 2406, it is determined whether the suffix flag has a first value (e.g., 1). If the value of the suffix flag is the first value, it indicates that the encoded BVD does not contain a size suffix. Alternatively, the suffix flag has a second value (e.g., 0). If the suffix flag has a second value, it indicates that the encoded BVD contains a suffix.

[0225] If step 2406 determines that the suffix flag has a first value, the method proceeds to step 2408, indicating that the encoded BVD does not contain a suffix and that the decoder must derive a suffix without being notified of the suffix by the encoder. In some embodiments, the suffix is ​​determined by the decoder, at least on the value of the prefix contained in the BVD. The decoder may determine the suffix using a search process as described above (e.g., as described in relation to step 2206 and in relation to Figure 22D).

[0226] If, in step 2406, the method determines that the suffix flag has a second value, the method proceeds to step 2410, indicating that the suffix is ​​included in the BVD (but encoded in a different way, with at least some bins bypass-encoded). The suffix includes at least one predictively encoded size symbol. Each predictively encoded symbol encodes information indicating whether the value of the BVD's size symbol matches the value of the same size symbol of a BVD candidate used as a BVD predictor. The suffix is ​​determined based on one or more predictively encoded size symbols and one or more bypass-encoded size symbols. Decoding of a suffix containing one or more context-encoded symbols is described above, for example, in relation to Figures 18 and 19.

[0227] If step 2404 determines that the suffix flag is not included, the method proceeds to step 2412. In step 2412, the suffix is ​​included in the BVD and contains only context-encoded size symbols. In one embodiment, each size symbol encodes information indicating whether the value of the size symbol in the BVD matches the value of the same size symbol in a BVD candidate used as a BVD predictor. The suffix is ​​determined based on one or more predictively encoded size symbols.

[0228] Figure 24B shows a flowchart of a method 2420 for encoding a BVD, as shown in Figures 23A and 23B, according to an embodiment of the present disclosure. Method 2420 can be implemented by an encoder, such as the encoder 200 in Figure 2.

[0229] Method 2420 begins at 2422. At 2422, the encoder determines the encoding mode in which it is operating and sets a suffix flag according to the determined mode. In one embodiment, at 2422, the encoder receives a BVD to be sent to, for example, the decoder and determines whether it can send the BVD without notifying a suffix, for example.

[0230] If it is determined that the BVD can be sent without sending a suffix, the suffix flag may be set to a first value (e.g., 1). Otherwise, the suffix flag is set to a second value (e.g., 0). This decision can be made, for example, as described in relation to 2212 above.

[0231] In step 2424, depending on the state of the suffix flag, the process proceeds to 2426 if the suffix flag should be included in the bitstream, and to 2432 if it is not included.

[0232] At 2426, if the suffix flag is set to a first value, the method proceeds to 2428; if the suffix flag is set to a second value, it proceeds to 2430. At 2428, if the suffix flag has a first value, the BVD is encoded without announcing the suffix, similar to the method described in relation to operation 2206 and Figure 22D. At 2430, if the suffix flag has a second value, the BVD encoding includes a suffix in the encoded BVD. The suffix includes at least one context-encoded symbol.

[0233] Figure 24C shows a flowchart of method 2450 relating to one aspect of the encoding method in Figure 24B. For example, method 2450 can be used to predictively encode suffix size symbols according to a predefined threshold.

[0234] Method 2450 begins at 2452, where it is determined whether the suffix symbol is context-encoded. This determination may be based on a predetermined budget allocated by the encoder to context-encoded symbols. If any of the symbols need to be context-encoded, the method proceeds to 2454. Otherwise, the method proceeds to 2466.

[0235] In step 2454, it is determined whether the bypass-encoded symbols exceed a predetermined threshold. This can be determined based on the context-encoded budget, the number of symbols in the suffix, and the predetermined threshold. If the threshold is exceeded, the method proceeds to step 2456. Otherwise, the method proceeds to step 2462.

[0236] This threshold helps prevent the signaling overhead that would occur by always including the suffix flag, as explained in relation to Figures 21 and 22A-22C. The threshold allows the suffix flag to be signaled conditionally.

[0237] This threshold is designed to ensure that the suffix flag is signaled when the number of bypass-coded symbols (NBPCB) for the BVD size suffix symbol prediction method exceeds a threshold (NTHRB). NBPCB≧NTHRB Here, NTHRB can take integer values ​​such as 1, 2, 3, or 4. Therefore, if this condition is met, the suffix flag is omitted. Otherwise, this flag is signaled in the bitstream.

[0238] In another embodiment, a conditional mechanism is provided for signaling a suffix flag in a bitstream using the length of the BVD prefix (LPREF). In this embodiment, the suffix flag is signaled when the length of the BVD prefix (LPREF) exceeds a threshold (NTHRL). LLPREF≧NTHRL Here, NTHRL can take integer values ​​such as 2, 3, or 4. Therefore, if this condition is met, the suffix flag is signaled in the bitstream. Otherwise, this flag is omitted.

[0239] In 2456, the suffix flag is set to a second value indicating that the BVD contains a suffix (i.e., the suffix is ​​signaled). In 2458, a suffix is ​​generated in which at least one symbol is predictively coded and at least one symbol is bypass coded. In some embodiments, a predetermined number of upper bins, starting from the top bin, are context-coded. In 2460, the BVD containing the size > 0 flag, prefix, suffix flag, and suffix is ​​coded. The suffix contains both context-coded and bypass-coded symbols.

[0240] If the method progresses from 2454 to 2462, the method generates a suffix containing at least one context-encoded symbol. If the threshold is 0, no bypass-encoded symbols exist. Otherwise, a number of symbols less than or equal to the threshold are bypass-encoded.

[0241] After the suffix is ​​generated in 2462, the encoded BVD is generated in 2464, containing the size > 0 flag, prefix, and suffix. Note that the suffix flag is not signaled. The suffix contains zero or a number of bypass-coded symbols (and some predicted symbols) that are below the threshold. Finally, it may contain coded symbols.

[0242] If the method proceeds from 2452 to 2466, the suffix flag is set to a second value indicating that the suffix is ​​included in the BVD (i.e., directly included without prediction). Then, at 2468, a BVD is generated containing the size > 0 flag, prefix, suffix flag, and suffix. Note that all suffix symbols are bypass encoded.

[0243] Another implementation of the harmonization according to an exemplary embodiment is shown in Figures 25A and 25B. This implementation is similar to the implementation shown in relation to Figures 23A and 23B, but represents a different representation of the BVD according to some embodiments of the present disclosure. Similar to the example in Figure 23A, the suffix flag 2507 (shown as the suffix derivation flag in the figure) is included if the number of bypass-encoded size symbols is below a predefined threshold. The suffix flag 2507 is included in BVD2500 because the number of bypass-encoded size symbols 2510 included in BVD2500 is greater than the threshold (e.g., threshold = 0), but the suffix flag 2507 is not included in BVD2520, where suffix 2508 does not contain any bypass-encoded symbols.

[0244] BVD2500 and BVD2520 (i.e., encoding of block vector difference) also include code 2512. Therefore, BVD2500 includes the magnitude > 0 flag 2502, prefix 2504, code 2512, and suffix. The suffix flag 2507 is included if the suffix symbol is not included (e.g., if the suffix flag is set to a first predetermined value) or if the number of bypass-encoded suffix symbols exceeds a predetermined threshold (e.g., if the suffix flag is set to a second predetermined value). If the number of bypass-encoded symbols in the suffix is ​​less than or equal to a predefined threshold, the suffix flag is not included in the BVD (not signaled).

[0245] Embodiments using BVD representations 2500 and 2520 can be used for two different purposes of a state flag set to a first value. As described above, a state flag being a first value (e.g., 0) indicates that the suffix is ​​not signaled in the encoded BVD. In some exemplary embodiments, when the state flag is set to a first value, both the sign value and the suffix value are derived as a result of a search within the search range using template matching costs. Such a search is described above in relation to Figures 21 and 22A-22B. In this example relating to BVD2500 or BVD2520, the search range consists of at least two subranges: - Prefix values ​​shown in Table 3 - A sign value that can take the values ​​of "+" and "-" (determines the position of at least two search subranges)

[0246] Alternatively, if the suffix flag value is equal to the first value, the suffix value is derived as a result of a search within the search range with the minimum template matching cost, but the code symbol is either bypass-encoded or predicted.

[0247] Figure 26A shows a flowchart of a method 2600 for decoding a BVD, such as the one shown in Figures 25A and 25B, according to an embodiment of the present disclosure. Method 2600 can be implemented by a decoder, such as the decoder 300 in Figure 3.

[0248] Method 2600 begins with 2602. In 2602, the decoder receives the encoded BVD in the received bitstream. For example, the decoder may receive BVD2500 in the bitstream.

[0249] In step 2604, it is determined whether the BVD bitstream contains a suffix flag 2507 (for example, the suffix derivation flag in the diagram). If it does, the process proceeds to step 2606. If the suffix flag does not exist, the process proceeds to step 2612.

[0250] In 2606, it is determined whether the suffix flag has a first value. If the value of the suffix flag is the first value, it indicates that the encoded BVD does not contain a size suffix. Alternatively, the suffix flag has a second value. If the suffix flag has a second value, it indicates that the encoded BVD contains a suffix.

[0251] If step 2606 determines that the suffix flag has a first value, the method proceeds to step 2608, indicating that the encoded BVD does not contain a suffix and that the decoder must derive the suffix without being notified of it by the encoder.

[0252] In some embodiments, the suffix is ​​determined by the decoder based at least on the value of the prefix contained in the BVD. The decoder may determine the suffix using a search process as described above (e.g., as described in relation to 2206 and in Figure 22D). Alternatively, in another embodiment, the search is intended to determine the sign in addition to the suffix. In this alternative embodiment, instead of searching for the best template match within a single reference region determined according to the prefix (as described in relation to 2206), at least two non-overlapping reference regions are determined considering the prefix value and the sign value of "+" or "-", and the best-matching template is searched for in all of these at least two reference regions. When the search is performed in this manner, the best-matching BVD determined also identifies the sign of the BVD in addition to the BVD size. Thus, in this alternative embodiment, if the suffix is ​​not signaled, the sign may also not be separately signaled. Both the suffix and the sign can be derived by the decoder based on the prefix of the BVD size. Details of an exemplary process for searching one or more reference regions to find a candidate reference block and determining the BVD suffix, or suffix and code, based on the candidate reference block are described in more detail in relation to Figure 22D.

[0253] If step 2606 determines that the suffix flag has a second value, the method proceeds to step 2610, indicating that the suffix is ​​included in the BVD. The suffix includes at least one predictively coded size symbol. Each predictively coded symbol encodes information indicating whether the value of the BVD's size symbol matches the value of the same size symbol of a BVD candidate used as a BVD predictor. The suffix is ​​determined based on one or more predictively coded size symbols and one or more bypass-coded size symbols.

[0254] If it is determined in 2604 that the suffix flag is not included, the method proceeds to 2612. In 2612, the suffix is ​​included in the BVD and contains only context-encoded size symbols. In one embodiment, each size symbol encodes information indicating whether the value of the size symbol in the BVD matches the value of the same size symbol in a BVD candidate used as a BVD predictor. The suffix is ​​determined based on one or more predictively encoded size symbols.

[0255] Figure 26B shows a flowchart of a method 2620 for encoding a BVD, as shown in Figures 25A and 25B, according to some embodiments of the present disclosure. Method 2620 may be implemented by an encoder, such as the encoder 200 in Figure 2.

[0256] Method 2620 begins at 2622. In 2622, the encoder determines the encoding mode in which it is operating and sets a suffix flag according to the determined mode. In one embodiment, in 2622, the encoder receives the BVD to be sent to the decoder and determines whether it can send the BVD without notifying the suffix, for example. This determination can be made as described above, for example, in relation to Figure 26A. If it is determined that the BVD can be sent without sending the suffix, the suffix flag may be set to a value of the 0th (e.g., 1). Otherwise, the suffix flag is set to a value of the 2nd (e.g., 1). If the suffix is ​​to be sent, the encoder further determines whether to send the suffix flag based on whether the number of bypass-encoded symbols exceeds a predefined threshold. The suffix flag is sent if the number of bypass-encoded suffix symbols exceeds a predefined threshold, and not otherwise.

[0257] In step 2624, depending on the state of the suffix flag, the process proceeds to step 2626 if the suffix flag is present in the bitstream, and to step 2632 if the suffix flag is not present in the bitstream.

[0258] At step 2626, if the suffix flag is set to the first value, the method proceeds to step 2628; if the suffix flag is set to the second value, it proceeds to step 2630. Thus, depending on the setting selected by the suffix flag, the method proceeds either to step 2626, where the BVD encoding is performed without notifying the suffix, or to step 2628, where the BVD encoding includes the suffix.

[0259] In 2628, the BVD is encoded without including a representation of the suffix in the encoded BVD, similar to the method described in relation to operation 2206 and Figure 22D. In some embodiments, as described above, the code of the BVD can also be derived by the decoder in addition to the suffix. In such embodiments, the encoded BVD may not include either the code or the suffix. Thus, the encoded BVD may include a size > 0 flag, a prefix, and a suffix flag set to a first value, or it may include a size > 0 flag, a prefix, a suffix flag, and a code.

[0260] Figure 27A shows a flowchart of a method 2700 for decoding a BVD according to an embodiment of the present disclosure. Method 2700 can be performed by the decoder 300 shown in Figure 3, etc.

[0261] Method 2700 begins at 2702 when the decoder receives the bitstream of the encoded BVD from the encoder and decodes a portion of the BVD. As described above, the size of the BVD includes a prefix and suffix determined according to the exponential Golomb code. In 2702, the value of the prefix is ​​determined based on the first one or more symbols of the BVD.

[0262] In 2704, based on the state of the suffix flag in the BVD, it is determined whether the received bitstream contains one or more second symbols of the BVD's suffix. If it is determined that the bitstream contains one or more second symbols of the suffix, the encoder may further determine whether the second one or more symbols contain at least one context-encoded symbol. The state of the suffix flag may include whether or not the suffix flag is present in the bitstream and / or its value. As described above, the suffix flag indicates the presence or absence of the suffix (i.e., whether or not the suffix is ​​signaled from the encoder to the decoder), and in at least some embodiments, also indicates the presence of bypass-encoded BVD symbols. That is, if the suffix flag indicates that the suffix is ​​not signaled, in some embodiments, neither the suffix value (e.g., magnitude) nor the representation of the suffix value is included in the bitstream of the encoded BVD. The suffix flag may be one or more bits.

[0263] In 2706, the BVD suffix is ​​obtained according to the determination made in 2704. For example, the suffix can be determined using any of methods 2200, 2400, or 2600.

[0264] In some embodiments, if a suffix flag is present in the received bitstream and its value is a first value, the suffix is ​​determined based on at least the prefix. If a suffix flag is present in the received bitstream and its value is a second value, the suffix is ​​obtained by entropy decoding at least one context-encoded suffix symbol.

[0265] In some embodiments, if a suffix flag exists in the received bitstream and its value is a first value, the suffix is ​​determined at least based on the prefix by searching for another block corresponding to the current block in the region of the picture where the current block is located. Here, this region is determined at least based on the value of the prefix and the possible values ​​of the suffix determined based on the value of the prefix. The other block is selected based on the difference between the other block and the current block, and the suffix is ​​determined based on the selected other block. This difference may be determined based on the template of the current block and the template of the other block.

[0266] In some embodiments, if a suffix flag is present in the received bitstream and its value is a first value, the suffix is ​​determined based on at least the prefix. If a suffix flag is present in the received bitstream and its value is a second value, or if no suffix flag is present in the received bitstream, the suffix is ​​obtained by entropy decoding at least one context-encoded suffix symbol.

[0267] In some embodiments, if a suffix flag exists in the bitstream and its value is a first value, the state of the suffix flag may be determined by searching for another block corresponding to the current block in the region of the picture where the current block is located. Here, this region is determined based on at least the value of the prefix and the possible values ​​of the suffix determined according to the value of the prefix. Another block is selected based on the difference between the other block and the current block, and it is determined at least based on the selected other block whether the value of the suffix is ​​represented in the bitstream. The difference may be determined based on the templates of the current block and the other block, respectively.

[0268] In some embodiments, if a suffix flag exists in the bitstream and its value is a second value, then one or more second symbols include at least one context-coded symbol and at least one bypass-coded symbol. In addition, each context-coded symbol in one or more second symbols corresponds to a prediction representation, and each representation may indicate whether the corresponding prediction is correct or not.

[0269] In some embodiments, if a suffix flag is present in the received bitstream and its value is a second value, the suffix is ​​obtained by decoding one or more second symbols that include at least one context-coded symbol and at least one bypass-coded symbol. If a suffix flag is not present in the received bitstream, the suffix is ​​obtained by decoding one or more second symbols, where the one or more second symbols include at least one context-coded symbol and the number of bypass-coded symbols is less than a predefined threshold, or the number of symbols in the one or more second symbols is less than a predefined threshold.

[0270] In some embodiments, the suffix and code are determined. For example, if a suffix flag is present in the received bitstream and its value is a first value, the code and suffix of the BVD are determined based on at least the prefix. If a suffix flag is present in the received bitstream and its value is a second value, or if a suffix flag is not present in the received bitstream, the suffix is ​​obtained by decoding one or more second symbols (including at least one context-coded symbol), and the code is obtained by decoding another context-coded symbol in the received bitstream.

[0271] In some embodiments, if a suffix flag is present in the received bitstream and its value is a first value, the suffix is ​​determined based on at least a prefix, and the code of the BVD vector is obtained by decoding another symbol in the received bitstream. Alternatively, if a suffix flag is present in the received bitstream and its value is a second value, or if no suffix flag is present, the suffix is ​​obtained by decoding at least one context-coded symbol, and the code of the BVD is obtained by decoding another context-coded symbol in the received bitstream.

[0272] The BVD is decoded at 2708.

[0273] Figure 27B shows a flowchart of method 2710 for encoding BVD according to certain embodiments of the present disclosure. Method 2710 can be performed by an encoder such as encoder 200 in Figure 2.

[0274] Method 2710 begins with 2712, in which the BVD is determined based on the BV and BVP.

[0275] In 2714, the magnitude and sign of the BVD are determined. The magnitude can be determined as a prefix and suffix. As shown in Table 3, the prefix representing the magnitude of the BVD indicates a range of values, and the suffix indicates the exact value within that range.

[0276] In 2716, the suffix, or the method for signaling the code and suffix to the decoder, is determined, and the state of the suffix flag for the BVD is determined accordingly. For example, this determination can be made using any of the methods 2210 (Figure 22B), 2420 (Figure 24B), and 2620 (Figure 26B).

[0277] In some embodiments, if a suffix flag exists in the bitstream and its value is a first value, the encoded size is encoded without representing the suffix value. If a suffix flag exists in the bitstream and its value is a second value, one or more second symbols, including at least one context-encoded symbol, are encoded to obtain the suffix.

[0278] In some embodiments, if a suffix flag exists in the bitstream and its value is a first value, the state of the suffix flag is determined based on whether the suffix value is represented in the transmitted bitstream by searching for another block corresponding to the current block in the region of the picture where the current block is located. The region is determined based on at least the value of the prefix and the possible values ​​of the suffix determined according to the value of the prefix. Another block is selected based on the difference between the other block and the current block, and it is determined at least based on the selected other block whether the suffix value is represented in the bitstream. The difference may be determined based on the templates of the current block and the other block, respectively.

[0279] In some embodiments, if a suffix flag exists in the bitstream and its value is a second value, then one or more second symbols include at least one context-encoded symbol and at least one bypass-encoded symbol. Each representation may indicate whether the corresponding prediction is correct or not.

[0280] In some embodiments, if a suffix flag is present in the bitstream and its value is a first value, the size is encoded without representing the suffix value within the encoded size. If a suffix flag is present in the bitstream and its value is a second value, or if the suffix flag is not present in the bitstream, the suffix is ​​determined by encoding one or more second symbols, each containing at least one context-encoded symbol.

[0281] In some embodiments, if a suffix flag is present in the bitstream and its value is a first value, the state of the suffix flag is determined based on whether the value of the suffix is ​​represented in the transmitted bitstream by a process that includes searching for another block corresponding to the current block in a region of the picture where the current block is located. The region is determined based on at least the value of the prefix and the possible values ​​of the suffix determined based on the value of the prefix. Another block is searched based on the difference between the other block and the current block, and it is determined whether the value of the suffix is ​​represented in the bitstream based at least on the selected other block. The difference may be determined based on the templates of the current block and the other block, respectively.

[0282] In some embodiments, if a suffix flag exists in the bitstream and its value is a second value, one or more second symbols, including at least one context-encoded symbol and at least one bypass-encoded symbol, are encoded to determine the suffix. If the suffix flag does not exist in the bitstream, one or more second suffix symbols are entropy-encoded to obtain the suffix. Here, one or more second symbols include at least one context-encoded symbol and the number of bypass-encoded symbols is less than a predetermined threshold, or the number of symbols in one or more second symbols is less than a predetermined threshold.

[0283] In some embodiments, if a suffix flag is present in the bitstream and its value is a second value, then one or more second symbols include at least one context-coded symbol and at least one bypass-coded symbol, where each context-coded symbol of the one or more second symbols corresponds to a prediction representation. If the received bitstream does not have a suffix flag, then one or more second symbols include at least one context-coded symbol, where each context-coded symbol of the one or more second symbols corresponds to a prediction representation. Each representation may indicate whether the corresponding prediction is correct.

[0284] In some embodiments, if a suffix flag exists in the bitstream and its value is a second value, the number of bypass-encoded symbols in one or more second symbols exceeds a predetermined threshold. If the suffix flag does not exist in the bitstream, the number of bypass-encoded symbols in one or more second symbols is less than or equal to the predetermined threshold.

[0285] In some embodiments, if a suffix flag exists in the bitstream and its value is a second value, the prefix length exceeds a predetermined threshold. If the suffix flag does not exist in the bitstream, the prefix length is less than or equal to the predetermined threshold.

[0286] In some embodiments, if a suffix flag is present in the bitstream and its value is a first value, the code and magnitude of the BVD are encoded without representing the suffix value and code within the bitstream. If a suffix flag is present in the bitstream and its value is a second value, or if no suffix flag is present in the bitstream, one or more second symbols are encoded, including at least one context-encoded symbol and another context-encoded symbol representing the code.

[0287] In some embodiments, if a suffix flag exists in the bitstream and its value is a first value, the state of the suffix flag is determined based on whether the suffix value is represented in the transmitted bitstream by a process that includes searching for another block corresponding to the current block in multiple regions within the picture where the current block is located. The multiple regions are determined according to at least the prefix value, possible values ​​of the suffix determined based on the prefix value, and possible values ​​of the sign. Another block is selected based on the difference between the other block and the current block, and it is determined whether the suffix value is represented in the bitstream based at least on the selected other block. The difference may be determined based on the templates of the current block and the other block, respectively.

[0288] In some embodiments, if a suffix flag exists in the bitstream and its value is a second value, the suffix is ​​obtained by encoding one or more second symbols, which include at least one context-encoded symbol and at least one bypass-encoded symbol. If the suffix flag does not exist in the bitstream, the suffix is ​​obtained by encoding one or more second symbols, where the one or more second symbols include at least one context-encoded symbol and the number of bypass-encoded symbols is less than a predetermined threshold, or the number of symbols included in the one or more second symbols is less than a predetermined threshold.

[0289] In some embodiments, if a suffix flag is present in the bitstream and its value is a second value, then one or more second symbols include at least one context-coded symbol and at least one bypass-coded symbol, where each context-coded symbol of the one or more second symbols corresponds to a prediction representation, and the bitstream includes another context-coded symbol representing the code. If no suffix flag is present in the bitstream, then one or more second symbols include at least one context-coded symbol, where each context-coded symbol of the one or more second symbols corresponds to a prediction representation, and the bitstream includes another context-coded symbol representing the code. Each representation may indicate whether the corresponding prediction is correct.

[0290] In some embodiments, if a suffix flag is present in the bitstream and its value is the second value, the number of bypass-encoded symbols in one or more second symbols exceeds a predetermined threshold. If the suffix flag is not present in the bitstream, the number of bypass-encoded symbols in one or more second symbols is less than the predetermined threshold. If the suffix flag is present in the bitstream and its value is the second value, the prefix length exceeds a predetermined threshold. If the suffix flag is not present in the bitstream, the prefix length is less than the predetermined threshold.

[0291] In some embodiments, if a suffix flag is present in the bitstream and its value is a first value, the size is encoded without representing the suffix in the encoded size, and the code is represented by encoding another symbol in the bitstream, which corresponds to the BVD code. If a suffix flag is present in the bitstream and its value is a first value, or if a suffix flag is not present in the bitstream, then at least one context-encoded symbol and one or more second symbols, including another context-encoded symbol representing the code, are encoded.

[0292] In 2718, the BVD is encoded based on the decision made in 2716.

[0293] As will be discussed later in relation to Figures 28A to 38D, some embodiments of the present disclosure include a mechanism for extending the number of suffix candidates that can be shown in the bitstream of the BVD. In these embodiments, if the value of the suffix flag (derivation flag) is a first value (e.g., 1), the decoder selects, for example, one of several candidates that minimizes the template matching cost according to the notified derived index value. For example, a truncated unary code, a binary code, or a truncated binary code can be used as the binaryizer for the derived index. Some symbols of the derived index may be bypass-encoded in a manner similar to the notification mechanism used for the suffix in the embodiments. Generally, in exemplary embodiments, the number of symbols used to notify the derived index may be the same as or different from the number of symbols of the predicted or bypass-encoded suffix bin.

[0294] In the examples shown in Figures 31, 33, and 35, the suffix flag (labeled “derivation flag” in Figures 28, 31, 33, 35, and 37) indicates the presence of either a derived index or a suffix symbol for the horizontal and vertical components of the BVD (for more explicit communication). Some of these suffix symbols can be predictively coded (e.g., context coding) using the techniques described in the embodiments above, for example, to send an indication of the correctness of a hypothesis about the symbol value rather than the symbol value itself, while other suffix symbols are bypass coded. The hypothesis may be a candidate vector and whether or not it matches (this may also include a hypothesis about the code).

[0295] Figures 28A and 28B show exemplary representations of BVD size suffix information according to certain embodiments of the present disclosure. The representations shown in Figures 28A and 28B may be used to indicate to the decoder that the BVD suffix has not been communicated and should be derived using a derivation candidate indicated by a derivation index encoded in the bitstream, or that the suffix is ​​encoded in the bitstream. If the suffix flag 2802 is a first value (e.g., 1), it indicates that the BVD suffix should be derived using a derivation candidate indicated by a derivation index 2804 encoded in the bitstream. If the suffix flag 2802 is a second value (e.g., 0), it indicates that a suffix 2806 encoded in the bitstream is included. In this specification, the descriptions of embodiments based on the BVD representation shown in any of Figures 28A, 28B, 31, 33, 35, and 37 use the terms first value and second value for 1 and 0, respectively, but exemplary embodiments do not limit the first value and second value to specific values.

[0296] Figure 28A shows an embodiment in which the derived index 2804 and the encoded suffix 2806 have different numbers (quantities) of symbols. Figure 28B shows an embodiment in which the derived index 2808 has the same number of symbols as the encoded suffix 2806. In exemplary embodiments, the derived indices (e.g., 2804, 2808) and / or the encoded suffix 2806 may include one or more context-encoded symbols. In exemplary embodiments, the suffix (e.g., 2806) may be encoded separately in the bitstream as the horizontal and vertical components of the suffix.

[0297] Although the suffix flag is described in this disclosure as a flag that can take one of two values, the embodiments do not limit the size or range of values ​​that the suffix flag can take.

[0298] Figure 29A shows a flowchart of a method 2900 for decoding a BVD that includes a representation of suffix information, such as a suffix flag and a derived index, according to some embodiments of the present disclosure. This representation is similar to the representations shown in Figures 28A, 28B, 31, 33, 35, or 37. Method 2900 can be performed by a decoder such as the decoder 300 shown in Figure 3.

[0299] Method 2900 may be initiated in 2902, for example, when the decoder receives a bitstream of the encoded BVD from the encoder. As described above, the size of the BVD includes a prefix and suffix determined, for example, according to the exponential Golomb code. In 2902, the value of the prefix is ​​determined based on the first one or more symbols of the BVD in the received bitstream.

[0300] As described above, the suffix flag (e.g., 2802) indicates the presence or absence of a suffix (i.e., whether the suffix is ​​communicated as a signal from the encoder to the decoder). In the embodiments described in relation to Figures 29A and 29B, the bitstream includes a suffix flag (e.g., flag 2802, called the “derivation flag” or “suffix derivation flag”) which indicates to the decoder whether the suffix of the BVD should be derived using derivation candidates indicated by derivation indices encoded in the bitstream (e.g., 2804, 2808), or whether the suffix is ​​encoded in the bitstream (e.g., 2806). Thus, based on the value of the suffix flag and one or more second symbols in the received bitstream, the suffix is ​​determined to be either 2904 and 2906 or 2908.

[0301] If the suffix flag (e.g., 2802) has a first value (e.g., 1) indicating that the suffix should be derived using derived candidates indicated by derived indices (e.g., 2804, 2808, etc.), then in 2906, the decoder determines one or more reference regions within the picture (this corresponds to the reference value of the suffix, as described above, particularly in relation to Figures 19A and 19B). The reference regions are determined according to at least the value of the prefix. One or more candidate blocks are identified by searching one or more reference regions, and the difference between each of the one or more candidate blocks and the current block is determined. An example of searching one or more reference regions to identify a candidate BVD is described in relation to 2202 in Figure 22A. Unlike the embodiment described in relation to Figure 22A, in this embodiment two or more candidate blocks may be identified and arranged in an ordered set accessible based on index values ​​(e.g., derived indices 2804 or 2808). A second derived index, encoded within one or more symbols, is used to select one of the candidate blocks contained in this ordered set, and a suffix is ​​calculated based on the selected candidate block. Details of an exemplary process for determining the BVD suffix by searching one or more reference regions to find multiple candidate reference blocks and selecting a candidate reference block using the derived index are described in more detail in relation to Figures 22D and 30F.

[0302] If the suffix flag has a second value (e.g., 0) indicating that the suffix is ​​encoded in the bitstream, then in 2908, the decoder decodes one or more second symbols to obtain the suffix (i.e., it may still contain arithmetic coding, but it is more explicit coding than candidate coding). The suffix may contain one or more context-coded symbols. An example of suffix decoding when the suffix is ​​encoded in the bitstream is described above in relation to 2204 in Figure 22A.

[0303] In 2910, the size is determined by concatenation based on the prefix obtained in 2902 and the suffix obtained in 2906 or 2908. In some embodiments, the size sign is determined based on one or more third symbols in the received bitstream, and the BVD is determined.

[0304] Figure 29B shows a flowchart of a method 2920 for encoding a BVD that includes a representation of suffix information similar to the representations shown in, for example, Figures 28A, 28B, 31, 33, 35, or 37, according to some embodiments of the present disclosure. Method 2920 can be performed by an encoder such as the encoder 200 in Figure 2.

[0305] Method 2920 begins at 2922. In 2922, the encoder determines the encoding mode in which it is operating and sets a suffix flag according to the determined mode. In one embodiment, in 2922, the encoder receives a BVD to be sent to, for example, a decoder and determines whether it can be transmitted to the decoder without, for example, notifying a suffix. In one example, the encoder can determine whether the BVD is an exact match or an exact match to a candidate BVD that can be found by searching at least one reference region for one or more candidate BVD blocks. To determine whether encoders and decoders operating separately at different time points can find the same candidate BVD, the encoder can perform a search process that would be performed by the decoder for the BVD to be sent. An example of a search process based at least on prefix values ​​is described above in relation to the decoder processing in Figure 22A.

[0306] In 2922, the prefix and suffix of the transmitted BVD size are determined, and the prefix is ​​encoded into one or more first symbols of the transmitted bitstream. Table 3 above shows the prefix and suffix values ​​of the BVD size. The prefix symbols may be context-encoded at transmission time.

[0307] The encoder can transmit the suffix to the decoder either by encoding only the index value into the bitstream (without encoding the suffix value), or by encoding the suffix value into the bitstream. Therefore, if one or more second symbols in the transmitted bitstream contain the index value, the method proceeds to 2924; if one or more second symbols in the transmitted bitstream contain the suffix, the method proceeds to 2926.

[0308] In 2924, if one or more second symbols in the transmitted bitstream contain an index value, and method 2920 proceeds from 2922 to 2924, the suffix flag is set to the first value, and the index value is determined as the index value for accessing the "best" BVD information in an ordered set of BVD information for one or more BVD candidate blocks. The index value is the position of the BVD information selected from the ordered set according to a predetermined selection criterion. The ordered set of BVD information is generated by determining one or more reference regions based on at least a prefix and searching in one or more reference regions for the BVD candidate block that has the smallest difference with the current block. This difference may be calculated based on techniques such as template matching described above in relation to Figures 18 and 19. Method 3020, described below, provides further details of this search and selection.

[0309] In 2926, if one or more second symbols in the transmitted bitstream contain a suffix and method 2920 proceeds from 2902 to 2926, the suffix flag is set to a second value. The suffix may be encoded to contain one or more predictively encoded symbols, according to the methods described in relation to Figures 18 and 19. In some embodiments, the number of predictively encoded symbols (e.g., the maximum number) may be determined using a process such as method 2210, described in relation to Figure 22C.

[0310] Method 2920 proceeds from either 2924 or 2926 to 2928. If the suffix flag is set to the first value, the index value is encoded into one or more second symbols in the transmitted bitstream, and the suffix value is not included in the transmitted bitstream. One or more symbols of the index value may be predictively encoded. Predictive encoding of one or more symbols of the index value may be performed in the same way as predictive encoding of one or more symbols of the suffix value. Predictive encoding of the suffix value is described above in relation to Figures 18-19 and 22C.

[0311] If the suffix flag is set to the second value, the suffix is ​​encoded in the transmitted bitstream. The suffix is ​​encoded by predictive coding of at least one of the symbols of the suffix. Predictive coding of one or more symbols of the suffix may be performed in the manner described above in relation to Figures 18-19 and 22C.

[0312] The suffix flag may or may not be entropy coded. Entropy coding of the suffix flag may involve predicting the value of the suffix flag and coding a representation indicating whether the prediction is correct or incorrect. For example, if the prediction is correct, the value 0 is coded as the representation, and if the prediction is incorrect, the value 1 is coded as the representation.

[0313] Therefore, the transmitted bitstream includes a prefix and a suffix flag, followed by a suffix (if the value of the suffix flag is the second value) or an index value (if the value of the suffix flag is the first value). The prefix, suffix flag, suffix, or index value may have one or more of their respective symbols entropy-encoded.

[0314] The bitstream encoded according to Method 2920 may be sent to the decoder and / or stored for future use.

[0315] Figure 30A shows a method 3000 for determining a suffix when a suffix flag (e.g., 2802) has a first value indicating that the suffix should be derived using derived candidates indicated by derived indices (e.g., 2804, 2808, etc.). For example, method 3000 may be performed in 2906 described above in relation to Figure 29A, and / or in 2924 in Figure 29B.

[0316] Method 3000 may begin when the decoder determines that the value of the suffix flag is a first value and the size prefix of the BVD is determined (elliptic symbol). In 3002, a process is performed to search for at least one candidate block corresponding to the current block in at least one reference region in the current picture where the current block is located. One or more reference regions to be searched are determined according to at least the value of the size prefix. For example, a range of possible values ​​for the suffix may be determined based on the value of the prefix. Other aspects of the BVD, such as the size sign, may also be used to determine one or more reference regions. Further details of the search are provided in relation to Figure 22A 2206 above, as well as in Figures 22D and 30F.

[0317] In 3004, one of one or more candidate blocks is selected based on the value of the derived index. The one or more candidate blocks may be ordered according to the difference (e.g., SAD) calculated for each with the current block. In this way, the decoder can know the index position determined by the encoder. For example, the BVD information of a predetermined number of candidate blocks having the smallest difference may be temporarily stored in memory. These may be stored in a predetermined order, for example, from smallest to largest difference or vice versa. The BVD information and / or candidate block in an ordered set (e.g., an ordered set) at the position corresponding to the value of the derived index is then selected using the derived index. Further details of the exemplary process of determining BVD information by searching one or more reference regions to find multiple candidate reference blocks and selecting candidate reference blocks using the derived index are described in more detail in relation to Figures 22D and 30F.

[0318] In 3006, the suffix is ​​determined based on the selected BVD information and / or candidate blocks. For example, the prefix and suffix can be calculated for the selected BVD information according to Table 3 above.

[0319] Figure 30B shows a method 3010 for determining a suffix when the value of a suffix flag (e.g., 2802) is a second value indicating that the suffix is ​​encoded in one or more second symbols in the received bitstream. For example, method 3010 may be performed in 2908 of Figure 22A.

[0320] At 3012, decoding of one or more second symbols is initiated, which include at least one context-encoded symbol and at least one bypass-encoded symbol.

[0321] In 3014, one or more predicted values ​​corresponding to each context-coded symbol in the second one or more symbols, and one or more values ​​corresponding to each bypass-coded symbol in the second one or more symbols are obtained. Next, for each context-coded symbol, the predicted-coded symbol value is determined based on the predicted and the value of the representation of the prediction encoded in the received bitstream. In an exemplary embodiment, the code of the BVD is context-coded in the received bitstream and may include horizontal and vertical components of the code. The code components can be decoded in the same manner as described in relation to Figure 19D.

[0322] In 3016, the suffix is ​​determined based on one or more predicted values ​​and one or more values ​​corresponding to each bypass-coded symbol of the second or more symbols. Examples of determining the suffix based on context-coded symbols and bypass-coded symbols are described above, for example, in relation to 2208 in Figure 22A and Figure 18D.

[0323] Figures 30C and 30D are flowcharts illustrating aspects of the method shown in Figure 29B for encoding BVD according to certain embodiments of the present disclosure.

[0324] Figure 30C shows a method 3020 for determining the derived index value to be encoded when the suffix flag is set to a first value. Method 3020 may be performed, for example, in relation to Figure 29B described above in 2924.

[0325] Method 3020 may begin in 3022 when the encoder receives a BVD to be encoded into one or more second symbols on the transmitted bitstream. The code, prefix, and suffix are known to the encoder based on the received BVD. In 3022, the encoder simulates the search that would be performed by the decoder and finds the best-matching candidate BVD that the decoder can find. In 3022, at least one reference region in the picture where the current block is located is searched to find at least one candidate block corresponding to the current block. The at least one reference region to be searched is determined according to at least the value of the prefix and all possible values ​​of the suffix, which are determined according to the value of the prefix. The correspondence between each candidate block and the current block can be determined based on a difference calculated for each candidate block. This difference may be calculated, for example, based on template matching. Examples of determining and searching for at least one reference region are described in relation to Figures 22A and 22D.

[0326] In 3024, an ordered set is formed from at least one candidate block. The ordering is performed according to the difference described above and may include BVD information for a predetermined number of candidate blocks with the smallest difference from the current block. For example, the ordering may arrange the BVD information according to each difference. The BVD information for a candidate block may include one or more of the following: a BVD candidate defined for the candidate block, a calculated difference, a suffix value, etc. The ordering may be, for example, in ascending order of difference or vice versa.

[0327] Based on the BVD closest to the BVD to be encoded, one BVD is selected from an ordered set. In some cases, the BVD with the smallest calculated difference is also the BVD that best matches the BVD being sent. In other cases, a BVD other than the one with the smallest difference is selected; for example, the BVD may be selected based on the template matching cost and the associated RD optimization score.

[0328] In 3026, the derived index value is determined based on an ordered set. The derived index value identifies the selected suffix or suffix information. For example, the derived index value may indicate the position of the selected suffix or suffix information in the ordered set. The derived index value is then encoded in the transmission bitstream. In this embodiment, neither the suffix nor any other suffix information is encoded in the transmission bitstream. The formation of the ordered set of candidate blocks and the determination of the derived index are described in more detail with reference to Figure 30E.

[0329] Figure 30D shows a method 3030 for encoding a suffix when the suffix flag is set to a second value. Method 3030 may be performed, for example, in relation to Figure 29B described above in 2928.

[0330] Method 3030 may begin with 3032. In 3032, it is decided that the first set of symbols of the suffix will be context-encoded in order to encode the suffix in one or more second symbols in the transmitted bitstream. The process described above in relation to Figure 22C can be used to determine the number of suffix symbols to be predicted and decoded.

[0331] In 3034, the predicted value for each symbol in the first set is determined. In an exemplary embodiment, the predicted value for each symbol may be determined separately for the horizontal and vertical sign components of the BVD.

[0332] In 3036, each symbol in the first set is entropy coded by coding a representation indicating whether the prediction is correct (i.e., the predicted value matches the actual value) or incorrect (i.e., the predicted value does not match the actual value). A value of 0 for the symbol indicates that the prediction is correct, and a value of 1 indicates that the prediction is incorrect. The remaining symbols of the suffix are coded in bypass mode. The coding of the suffix, including at least some context-coded symbols, is described in relation to 2208 in Figure 22B.

[0333] Figures 30E and 30F show flowcharts of the processes for encoding and decoding the BVD suffix, respectively, when the suffix flag (e.g., 3102) has a first value indicating that the suffix is ​​not included in the transmitted bitstream.

[0334] Figure 30E shows process 3040, which includes operations 3041-3045 performed to determine the rate-distortion (RD) optimal template position in a template matching search process on an encoder such as the encoder 200 in Figure 2, according to some embodiments. Examples of template matching searches and techniques for determining the search region (reference region) based on BVP and BVD prefixes, or based on BVP, BVD prefixes, and code hypotheses, are described in relation to Figure 22D. Operation 3041 obtains template matching cost values ​​for multiple candidate reference blocks by a template matching search using a search region determined based on the BVD prefix, BVP, and, in some embodiments, the respective code hypotheses, as described in relation to Figure 22D. Candidate reference blocks may be determined within the search region by pixel-by-pixel evaluation or according to a predetermined search pattern. Operation 3042 may select a predetermined number of candidate reference blocks from the initially determined set of candidate reference blocks that have the minimum template matching cost with the current block. In operation 3043, a predetermined number of selected candidate reference blocks (or corresponding template locations) are sorted according to their respective template matching costs. The sorting may be performed such that the index value of the candidate reference block (or template location) with the lowest template matching cost is minimized. Since the candidate with the lowest cost is more likely to be selected, the smallest index is more likely to be sent, thus allowing for more efficient context coding. In operation 3044, the best candidate reference block (or equivalently, the best template location) is selected by performing RD optimization. RD optimization can take into account signaling overhead, etc., in addition to the template matching costs of each option. In operation 3046, an index p is sent that identifies the best candidate block (or best template location) selected from the sorted candidate reference blocks (or sorted template locations).In exemplary embodiments, several types of codes (e.g., truncated unary code, exponential Golomb code, etc.) can be used to indicate the index p. All or some of the bins of the selected code can be context-encoded using CABAC.

[0335] Figure 30F shows a process 3050, which includes operations 3051-3055 performed on a decoder, such as the decoder 300 in Figure 3, to derive a reference block BV, relating to several implementations. In operation 3051, an index p, indicating the position of a candidate reference block (or corresponding template location) in an ordered list, is analyzed from the received bitstream. In operation 3052, template matching cost values ​​for multiple candidate reference blocks are obtained by a template matching search using a search domain based on the BVD prefix, BVP, and, in some embodiments, the respective coding hypothesis. Candidate reference blocks may be determined within the search domain by pixel-level evaluation or according to a predetermined search pattern. This search process may be identical or similar to the corresponding search described above with respect to process 3040. In operation 3053, a predetermined number of candidate reference blocks with the minimum template matching cost with the current block may be selected from the initially determined set of candidate reference blocks. In operation 3054, the selected predetermined number of candidate reference blocks (or corresponding template locations) are sorted according to their respective template matching costs. As described above, sorting may be performed such that the index value of the candidate reference block (or template location) with the lowest template matching cost is minimized. Since the candidate with the lowest cost is more likely to be selected, the smallest index is more likely to be sent, and thus context encoding can be performed more efficiently. In operation 3055, index p is used to select the candidate reference block (or equivalent template location) at the corresponding position within the sorted candidate reference block (or sorted template location), and the BVD suffix and BV are determined based on that selection. As described above in relation to process 3040 in the encoder, index p may indicate the option that is judged to be the best (e.g., optimal) based on the template matching cost and RD optimization.

[0336] Figures 30E and 30F both illustrate a two-step method for obtaining a list of a predetermined number of candidates N sorted in descending order of template matching cost. Since the total number M of candidate template positions obtained in operation 3041 or 3052 can be significantly larger than N, completely sorting the set containing the template matching costs of all M template positions may incur significant overhead. For example, the complexity of such a sorting operation is estimated to be O(M·logM). To mitigate the complexity of the sorting operation in the worst case, the process is divided into two steps: a step of selecting the N template positions with the lowest template matching costs from the M candidate positions (which has linear complexity, i.e., O(M)); and a step of sorting the N template positions with the lowest template matching costs (which has complexity O(N·logN)).

[0337] Figure 31 shows a representation of BVD size similar to Figures 29A-29B, according to a subset of the present disclosure. In Figure 31, one or more code or code hypothesis symbols precede the suffix flag. The horizontal prefix and the hypothesis regarding the horizontal code are conditionally signaled based on the value of the horizontal component of the size > 0 flag ("context-coded abs_hor_bvd_greater0_flag" in Figure 31). The vertical prefix and the hypothesis regarding the vertical code are conditionally signaled based on the value of the vertical component of the size > 0 flag ("context-coded abs_ver_bvd_greater0_flag" in Figure 31).

[0338] The representation shown in Figure 31 includes a suffix flag 3102 which has a first value when the suffix is ​​not encoded in the bitstream, and instead the derived index value 3104 is encoded. When the suffix flag 3102 has a second value, the suffix is ​​encoded into two components: a horizontal suffix component 3106 and a vertical suffix component 3108.

[0339] The horizontal component code (called the first code component) 3110 and the vertical component code (called the second code component) 3112 of the suffix are encoded before the suffix flag 3102.

[0340] The horizontal prefix 3114 and the vertical prefix 3116 are encoded before the code components 3110 and 3112, and / or the suffix flag 3102. The horizontal component 3118 and the vertical component 3120 of the size > 0 flag can individually indicate whether the horizontal and vertical components of the size are greater than 0, respectively.

[0341] On the decoder side, if the suffix flag has a first value, the reference region of the BVD candidate is determined by the derivation of the horizontal and vertical codes. This may be done by determining the best-cost code candidate symbol and conditionally inverting the horizontal or vertical code symbol if the corresponding notified value of the horizontal or vertical code hypothesis is non-zero. A code hypothesis is any hypothesis about the expected value of a code that the decoder (and encoder if it models the decoding operation in a loop) can make, and the encoder can then communicate whether the hypothesis should have been wrong (i.e., whether a different, more atypical situation occurred in the encoded video data). For example, if multiple blocks are taken from corresponding locations in a larger homogeneous region, the vectors for predicting adjacent blocks will be identical, as will their codes. The prediction that the code of the block vector or motion vector of the current block to be decoded is identical to that of the previous four blocks is a plausible hypothesis, but it may be necessary to use different vectors and codes thereafter.

[0342] After the BVD code symbol is derived, the value of the suffix flag indicates whether one of the BVD candidates with the lowest template matching cost is selected using the derivation index, or whether the suffix symbol is reconstructed from context-encoded hypotheses about the horizontal and vertical component suffix symbols. In either case, the reference region from which the template cost of the BVD candidate is estimated is determined based on the derived code symbol value.

[0343] Figures 32A and 32B are flowcharts relating to aspects of the method shown in Figure 29A for decoding a BVD encoded in the representation shown in Figure 31, according to certain embodiments of the present disclosure. For example, the method shown in Figures 32A and 32B receives and decodes an encoded BVD in the form shown in Figure 31 such that a suffix flag 3102 having a first value (e.g., 1) includes a derived index value 3104 in one or more second symbols of the transmitted bitstream, or a suffix flag 3102 having a second value (e.g., 0) includes the horizontal and vertical components of the suffix in the transmitted bitstream, following the horizontal and vertical components of the code.

[0344] Figure 32A shows a method 3200 for decoding an received bitstream when the suffix flag is set to a first value. According to one embodiment, method 3200 may be performed in 3002 of Figure 30A.

[0345] Method 3200 is initiated at 3202 when the decoder receives a BVD in the format shown in Figure 31 within the received bitstream. In 3202, the magnitude code is decoded from one or more third symbols in the received bitstream. For example, the codes for the horizontal and vertical components are decoded from one or more third symbols in the received bitstream. In some embodiments, the received code components are context-coded. Context coding and context decoding of the code symbols may be performed according to the techniques described above in relation to Figures 18 and 19.

[0346] In 3204, at least one reference region is determined according to at least the prefix value and sign, and in that reference region, one or more candidate blocks with the smallest difference from the current block are searched. The BVD information of the one or more candidate blocks with the smallest difference is arranged as an ordered set, and the BVD information of one candidate block is selected using a derived index value from the received bitstream. In one embodiment, multiple reference regions are determined according to at least the prefix value and possible signs, and in these multiple reference regions, one or more candidate blocks with the smallest difference from the current block are searched. The BVD information of these reference blocks with the smallest difference is arranged as an ordered set, and the BVD information of one candidate block is selected using a derived index value from the received bitstream. Further details of the exemplary process of determining BVD information by searching one or more reference regions to find multiple candidate reference blocks and selecting candidate reference blocks using derived indices are described in more detail in relation to Figures 22D and 30F. The suffix is ​​determined using the selected BVD information.

[0347] Figure 32B shows a method 3210 for decoding the received bitstream when the suffix flag is set to a second value. Method 3210 may be performed in 3010 of Figure 30B.

[0348] Method 3210 is initiated in 3212 when the decoder receives a BVD in the format shown in Figure 31 within the received bitstream. In 3212, the method includes decoding a first code corresponding to the horizontal magnitude and a second code corresponding to the vertical magnitude from one or more third symbols in the received bitstream. The code components may be context-encoded. Context coding and context decoding of the code symbols may be performed according to the techniques described above in relation to Figures 18 and 19.

[0349] In 3214, the first and second components of the suffix are decoded from one or more second symbols in the received bitstream. The one or more second symbols include at least one context-coded symbol.

[0350] In 3216, the suffix is ​​obtained based on at least a first code, a first component of the suffix, a second code, and a second component of the suffix.

[0351] Figures 32C and 32D show a flowchart of the Figure 29B method for encoding a BVD encoded in the representation shown in Figure 31, according to a subset embodiment of the present disclosure.

[0352] Figure 32C shows a method 3220 for encoding the transmitted bitstream when the suffix flag is set to a first value. Method 3220 may be performed in 3020 of Figure 30C.

[0353] Method 3220 is initiated in 3222 when the encoder receives the BVD to be transmitted. The BVD may be transmitted in a format similar to the format shown in Figure 31.

[0354] In 3222, the size code is encoded in one or more third symbols within the transmitted bitstream. From the received BVD, a first code corresponding to the horizontal size and a second code corresponding to the vertical size are determined.

[0355] In 3224, the first and second codes are context-encoded into one or more third symbols in the transmitted bitstream. Context coding and context decoding of the code symbols can be performed according to the techniques described above in relation to Figures 18 and 19.

[0356] Figure 32D shows a method 3230 for encoding a transmission bitstream when the suffix flag is set to a second value, according to one embodiment. Method 3230 may be performed in 3030 of Figure 30D.

[0357] Method 3230 is initiated in 3232 when the encoder receives the BVD to be transmitted. The BVD may be transmitted in a format similar to the format shown in Figure 31.

[0358] In 3232, based on the received BVD, the horizontal component of the prefix, the vertical component of the prefix, the horizontal component of the suffix, the vertical component of the suffix, the first code (the code for the horizontal magnitude component), and the second code (the code for the vertical magnitude component) are determined. The prefix component is encoded into one or more first symbols in the transmitted bitstream.

[0359] In 3234, the first and second components of the suffix are encoded into one or more second symbols, the one or more second symbols containing at least one context-encoded symbol. In some embodiments, the one or more second symbols further contain one or more bypass-encoded symbols.

[0360] In 3236, the first and second codes are encoded into one or more third symbols in the transmitted bitstream. The first code corresponds to the horizontal size, and the second code corresponds to the vertical size. The code components may be context-encoded. Context coding and context decoding of the code symbols can be performed according to the techniques described above in relation to Figures 18 and 19.

[0361] Following method 3220 or 3230, the transmitted encoded BVD will be in the format shown in Figure 31, with a suffix flag 3102 having a first value (e.g., 1) containing the derived index value 3104 within one or more symbols of the transmitted bitstream, or a suffix flag 3102 having a second value (e.g., 0) containing the horizontal and vertical components of the suffix, following the horizontal and vertical components of the code.

[0362] Figure 33 shows another representation of the BVD size similar to Figures 29A-29B, according to a subset of embodiments of this disclosure. In Figure 33, hypotheses regarding the horizontal and vertical sign components are conditionally communicated in the bitstream depending on the value of a suffix flag. If the suffix flag is non-zero, the sign values ​​are not communicated in the bitstream and are determined from candidates indicated by the communicated derived index values. In this case, the search region for BVD candidates includes two or four non-adjacent reference regions, each corresponding to a combination of signs for the reconstructed horizontal or vertical BVD. The determination of reference regions based on prefixes and suffixes is described above in relation to Figure 22A. If the suffix flag is 0, the hypothetical values ​​for the horizontal and vertical signs are communicated in the bitstream. The reconstruction of the BVD in this case is similar to the embodiment shown in Figure 31.

[0363] The representation shown in Figure 33 includes a suffix flag 3302 which has a first value when the suffix is ​​not encoded in the bitstream, and instead the derived index value 3304 is encoded. When the suffix flag 3302 has a second value, the suffix is ​​encoded into two components: a horizontal suffix component 3306 and a vertical suffix component 3308.

[0364] The codes for the horizontal component of the suffix (called the first code component) 3310 and the codes for the vertical component (called the second code component) 3312 are encoded after the suffix flag 3302.

[0365] The horizontal prefix 3314 and the vertical prefix 3316 are encoded before the code components 3310 and 3312, and / or the suffix flag 3302. The horizontal component 3318 and the vertical component 3320 of the size > 0 flag can individually indicate whether the horizontal and vertical components of the size are greater than 0, respectively.

[0366] Figures 34A and 34B are flowcharts of aspects of the method shown in Figure 29A for decoding a BVD in the format shown in Figure 33, according to certain embodiments of the present disclosure.

[0367] Figure 34A shows a method 3400 for determining the suffix when the value of the suffix flag is set to a first value. For example, if the suffix flag 3302 of the BVD shown in Figure 33 is a first value (e.g., 1), the suffix flag 3302 is followed by the derived index value 3304, and the sign is not signaled. According to some embodiments, method 3400 may be performed in 3002 of Figure 30A.

[0368] Method 3400 begins at 3402 when the decoder receives a BVD in the received bitstream. At 3402, if the suffix flag value is a first value, the derived index value is notified without the sign of the magnitude, so the reference regions from which candidate blocks are searched are set based on the possible values ​​of the prefix and sign. In some embodiments, two non-overlapping reference regions are determined based on the prefix and the positive or negative sign value. In other embodiments, four non-overlapping reference regions are identified based on the prefix and the positive or negative value of each sign component (e.g., horizontal and vertical sign components). In two or four non-overlapping reference regions, one or more candidate blocks with the smallest difference from the current block are searched. The difference may be determined, for example, based on template matching. The BVD information of one or more candidate blocks with the smallest difference is sorted into an ordered set.

[0369] In 3404, the BVD information of one candidate block is selected using a derived index value from one or more second symbols in the received bitstream. The suffix of the received BVD is determined using the BVD information of the selected candidate block. Further details of the exemplary process of determining the BVD information by searching one or more reference regions to find multiple candidate reference blocks and selecting a candidate reference block using a derived index are described in more detail in relation to Figures 22D and 30F. Since the candidates are selected considering both sign values ​​of the BVD, the sign of the received BVD may also be determined based on the selected candidate block.

[0370] Figure 34B shows a method 3410 for determining a suffix when the value of the suffix flag is set to a second value in a received BVD of the format shown in Figure 33. For example, if the suffix flag 3302 of the BVD shown in Figure 33 is the second value (0), the suffix flag 3302 is followed by the horizontal and vertical components of the code (3310 and 3312), as well as the horizontal and vertical components of the suffix (3306 and 3308). According to some embodiments, method 3400 may be performed at 3002 in Figure 30A. According to some embodiments, method 3410 may be performed at 3012 in Figure 30B.

[0371] Method 3410 is initiated at 3412 when the decoder receives the BVD in the received bitstream. At 3412, the suffix flag value is set to a second value, the derived index value is received in the bitstream, and before that, the horizontal and vertical components of the magnitude code are indicated by one or more third symbols. The code components may be context-encoded. At 3412, the code components are decoded.

[0372] In 3414, the horizontal and vertical components of the suffix are decoded. Each component of the suffix may contain one or more context-coded symbols. In some embodiments, each suffix component may also contain one or more bypass-coded symbols.

[0373] Figures 34C and 34D are flowcharts of aspects of the method shown in Figure 29B for decoding a BVD in the format shown in Figure 33, according to certain embodiments of the present disclosure.

[0374] Figure 34C shows a method 3430 for encoding the transmitted bitstream when the suffix flag is set to a first value. Method 3430 may be performed in 3020 of Figure 30C.

[0375] Method 3430 begins in 3432 when the encoder receives a transmit BVD in the form shown in Figure 33 within the receive bitstream. In 3432, the derived index is unsigned encoded if the suffix flag is set to a first value as shown in Figure 33. Thus, the derived index is encoded into the transmit bitstream. In some embodiments, one or more symbols of the derived index are context-encoded. Symbols that are not context-encoded are bypass-encoded. Further details on determining the derived index to determine the suffix when the derived index is used to indicate a candidate reference block within an ordered set of candidate reference blocks in the reference region are described in relation to Figures 22D and 30E.

[0376] Figure 34D shows method 3440 for encoding the transmitted BVD when the suffix flag is set to a second value. Method 3440 may be performed in 3030 of Figure 30D.

[0377] Method 3440 is initiated at 3442 when the encoder receives a BVD to be transmitted. At 3442, the horizontal and vertical components of the sign of the BVD magnitude are determined based on the received BVD to be transmitted.

[0378] In 3444, the horizontal and vertical components of the code are each encoded as context-encoded symbols into one or more third symbols in the transmitted bitstream.

[0379] In 3446, the horizontal and vertical components of the suffix are encoded separately. Each component of the suffix contains at least one context-encoded symbol and may contain one or more bypass-encoded symbols.

[0380] Methods 3430 and 3440 encode the BVD into the format shown in Figure 33. For example, if the suffix flag 3302 of the BVD shown in Figure 33 is a first value (e.g., 1), the suffix flag 3302 is followed by the derived index value 3304, and the code is not signaled. For example, if the suffix flag 3302 of the BVD shown in Figure 33 is a second value (0), the suffix flag 3302 is followed by the horizontal and vertical components of the code (3310 and 3312), as well as the horizontal and vertical components of the suffix (3306 and 3308).

[0381] Figure 35 shows another representation of the BVD size similar to Figures 29A-29B, according to a subset of embodiments of this disclosure. In Figure 35, hypotheses regarding the horizontal and vertical codes are shown along with the corresponding horizontal and vertical suffix bins. In this embodiment, as in the embodiment shown in Figure 33, both the codes and suffix symbols may be bypass encoded for the horizontal or vertical components, depending on the horizontal and vertical prefix values.

[0382] The representation shown in Figure 35 (similar to Figure 33, but with the codes included in the size coding rather than being separate) includes a suffix flag 3502 which has a first value when the suffix is ​​not coded into the bitstream, and instead the derived index value 3504 is coded. When the suffix flag 3502 has a second value, the suffix is ​​coded into two components: a horizontal suffix component 3506 and a vertical suffix component 3508. The code for the horizontal component of the suffix (called the first code component) 3510 is coded together with the horizontal component of the suffix 3506, and the code for the vertical component of the suffix (called the second code component) 3512 is coded together with the vertical component of the suffix 3508.

[0383] The horizontal prefix 3514 and the vertical prefix 3516 are encoded before the suffix flag 3502. The horizontal component 3518 and the vertical component 3520 of the size > 0 flag can individually indicate whether the horizontal and vertical components of the size are greater than 0, respectively.

[0384] Figures 34A and 34B are flowcharts of aspects of the method shown in Figure 29A for decoding a BVD in the format shown in Figure 35, according to certain embodiments of the present disclosure.

[0385] Figure 36A shows a method 3600 for determining the suffix when the value of the suffix flag is set to a first value. For example, if the suffix flag 3502 of the BVD shown in Figure 35 is a first value (e.g., 1), the suffix flag 3302 is followed by the derived index value 3504, and the sign is not signaled. According to some embodiments, method 3600 may be performed in 3002 of Figure 30A.

[0386] Method 3600 begins at 3602 when the decoder receives a BVD in the received bitstream. At 3602, if the suffix flag value is a first value, the derived index value is notified without the sign of the magnitude, so the reference regions from which candidate blocks are searched are set based on the possible values ​​of the prefix and sign. In some embodiments, two non-overlapping reference regions are determined based on the prefix and the sign value. In other embodiments, four non-overlapping reference regions are set based on the prefix and the sign value of each sign component (e.g., horizontal sign component and vertical sign component). In two or four non-overlapping reference regions, one or more candidate blocks with the smallest difference from the current block are searched. The difference may be determined, for example, based on template matching. The BVD information of one or more candidate blocks with the smallest difference is sorted into an ordered set.

[0387] In 3604, the BVD information of one candidate block is selected using a derived index value from one or more second symbols in the received bitstream. The suffix of the received BVD is determined using the BVD information of the selected candidate block. Further details of the exemplary process of determining the BVD information by searching one or more reference regions to find multiple candidate reference blocks and selecting a candidate reference block using a derived index are described in more detail in relation to Figures 22D and 30F. Since the candidates are selected considering both sign values ​​of the BVD, the sign of the received BVD may also be determined based on the selected candidate block.

[0388] Figure 36B shows a method 3610 for determining the suffix when the value of the suffix flag is set to a second value. For example, if the suffix flag 3502 of the BVD shown in Figure 35 is the second value (0), then the suffix flag 3502 is followed by the horizontal component of the sign 3510 and the horizontal component of the suffix 3506, followed by the vertical component of the sign 3512 and the vertical component of the suffix 3508. According to some embodiments, method 3610 may be performed in 3012 of Figure 30B.

[0389] Method 3610 begins at 3612 when the decoder receives the BVD in the received bitstream. At 3612, the suffix flag value is set to a second value, the derived index value is received in the bitstream, and each suffix component also includes the corresponding code component encoded with it. That is, the horizontal component of the code is announced with the horizontal component of the suffix, and the vertical component of the code is announced with the vertical component of the suffix. In some exemplary embodiments, the code component and at least some of the symbols of each suffix component may be context-encoded. At 3612, the code component is decoded.

[0390] In 3614, the horizontal and vertical components of the suffix are decoded. In some embodiments, in addition to one or more context-coded symbols, each component may include one or more bypass-coded symbols.

[0391] Figures 36C and 36D are flowcharts showing aspects of the method shown in Figure 29B for encoding BVD according to certain embodiments of the present disclosure.

[0392] Figure 36C shows a method 3620 for encoding the transmitted bitstream when the suffix flag is set to a first value. Method 3620 may be performed in 3020 of Figure 30C.

[0393] Method 3620 is initiated in 3622 when the encoder receives the BVD to be transmitted. In 3622, the derived index is unsigned encoded if the suffix flag is set to a first value, as shown in Figure 35. Thus, the derived index is encoded into the transmit bitstream. In some embodiments, one or more symbols of the derived index are context-encoded. Symbols that are not context-encoded are bypass-encoded. Further details on determining the derived index to determine the suffix when the derived index is used to indicate a candidate reference block within an ordered set of candidate reference blocks in the reference region are described in relation to Figures 22D and 30E.

[0394] Figure 36D shows a method 3630 for encoding the transmitted bitstream when the suffix flag is set to a second value. Method 3630 may be performed in 3030 of Figure 30D.

[0395] Method 3630 is initiated in 3632 when the encoder receives the BVD to be transmitted. In 3632, the horizontal and vertical components of the sign of the BVD magnitude are determined based on the BVD.

[0396] In 3634, a first symbol set containing the first component of the code and the first component of the suffix, and a second symbol set containing the second component of the code and the second component of the suffix, are encoded into one or more second symbols in the transmitted bitstream. The first component corresponds to the horizontal size, and the second component corresponds to the vertical size. In some embodiments, the code may be context-coded. Each component of the suffix contains at least one context-coded symbol and may also contain one or more bypass-coded symbols.

[0397] Methods 3620 and 3630 encode the BVD into the format shown in Figure 35. For example, if the suffix flag 3502 of the BVD shown in Figure 35 is a first value (e.g., 1), the suffix flag 3302 is followed by the derived index value 3504, and the code is not signaled. If the suffix flag 3502 of the BVD shown in Figure 35 is a second value of 0, the suffix flag 3502 is followed by the code and the horizontal components of the suffix (3510 and 3506), followed by the vertical components of the code and the suffix (3512 and 3508).

[0398] Figure 37 shows another representation of the BVD size similar to Figures 29A and 29B, according to certain embodiments of the present disclosure. In these embodiments, the decoder uses derived indices included in the bitstream to determine which BVD components have a suffix determined and which components have some suffix bins communicated.

[0399] In the representation shown in Figure 37, the suffix flag 3702 has a first value if the suffix is ​​not encoded in the bitstream, and instead the derived index value 3704 is encoded. If the suffix flag 3702 has a second value, the suffix is ​​encoded into two components: a horizontal suffix component 3706 and a vertical suffix component 3708.

[0400] The horizontal component code (called the first code component) 3710 and the vertical component code (called the second code component) 3712 of the suffix are encoded before the suffix flag 3702.

[0401] The horizontal prefix 3714 and the vertical prefix 3716 are encoded before the code components 3710 and 3712, and / or the suffix flag 3702. The horizontal component 3718 and the vertical component 3720 of the size > 0 flag can individually indicate whether the horizontal and vertical components of the size are greater than 0, respectively.

[0402] The representation in Figure 37 also includes a derived component selection index 3722 following the suffix flag 3702 if the suffix flag 3702 has a first value. The derived component selection index 3722 indicates whether the derived index value is specified as a single index value 3704 or as two components. If specified as two components, it includes a horizontal index value 3718 and a vertical index value 3720. The derived component selection index 3722 may specify the order of the two components 3718 and 3720.

[0403] In embodiments based on a BVD representation similar to Figure 37, if the suffix flag 3702 has a second value, the suffix symbols of both BVD components are included in the bitstream. If the suffix flag 3702 has a first value, the derived component selection index 3722 is indicated, for example, using a unary code. This codeword may indicate the following cases: that the suffixes of both components are determined using the derived index (codeword "1"), that the suffix of the horizontal component is determined using the derived index and the suffix of the vertical component is indicated by suffix bin prediction (codeword "00"), or that the suffix of the vertical component is determined using the derived index and the suffix of the horizontal component is indicated by suffix bin prediction (codeword "01").

[0404] The step of determining the code symbol depends on the values ​​of the suffix flag 3702 and the derived component selection index 3722. If the suffix flag has a second value, the hypothesis regarding the code bin is indicated in the bitstream along with the suffix symbol. As described above in relation to Figures 31, 33, and 35, the code symbol may be bypass-encoded in the bitstream, or the corresponding hypothesis bin may be indicated.

[0405] In one embodiment, if the derived component selection index 3722 is "00" or "01", the derived index is shown with respect to one suffix component (e.g., 3718), followed by the sign bin and suffix bin of the other suffix component (e.g., 3720). For example, if the derived component selection index is notified as "00", the derived index of the horizontal component of the suffix is ​​shown in the bitstream, followed by the sign and suffix symbols of the vertical component. The signs and suffix symbols of the vertical component may all be included in the bitstream, or some symbols may be predicted, and corresponding hypotheses regarding the symbol values ​​may be notified instead of the symbol values ​​themselves. In this example, if the derived component selection index 3722 is notified as "01", the derived index of the vertical component is shown, followed by the signs and suffix symbols of the horizontal component. The signs and suffix symbols of the horizontal component may all be notified on the bitstream, or some symbols may be predicted, and corresponding hypotheses regarding the symbol values ​​may be notified instead of the symbol values ​​themselves.

[0406] Figures 38A and 38B are flowcharts of aspects of the method shown in Figure 29A for decoding a BVD in the form shown in Figure 37, according to certain embodiments of the present disclosure.

[0407] Figure 38A shows a method 3800 for determining the suffix when the suffix flag is set to a first value. When the suffix flag is set to value 1, the received BVD includes a derived component selection index 3722 following the suffix flag 3702, and depending on the value of the derived component selection index 3722, it includes either the derived index 3704 of the suffix, or the derived index 3718 of the horizontal or vertical component of the suffix and the symbols of the other components 3720 of the suffix. Method 3800 is initiated when the BVD is received in the received bitstream in 3802.

[0408] In 3802, the derived component selection index is decoded from one or more second symbols in the received bitstream.

[0409] In 3804, based on the value of the derived component selection index, either one derived index or a derived index and a suffix component are decoded from one or more second symbols. For example, if the derived component selection index is set to 1, it indicates that the subsequent derived index is the derived index of the suffix. If the derived component selection index is set to 00 or 01, it indicates that the subsequent derived index relates to either the horizontal or vertical component of the suffix, followed by the other component and the corresponding code component.

[0410] In 3806, one or more candidate blocks are determined by exploring one or more reference regions, and these candidate blocks are arranged in an ordered set. The candidate blocks may be ordered by the difference from the current block, determined by techniques such as template matching, as described in relation to Figures 18 and 19. The derived index is used to access the ordered set and retrieve the BVD information of the selected candidate blocks. In the example above, if the value of the derived component selection index is 1, it means that the derived index selects the BVD information for the entire suffix, and if the value of the derived component selection index is 01 or 00, it means that the derived index selects the BVD information for only one component of the suffix.

[0411] In some embodiments, determining one or more reference regions includes determining multiple reference regions based on a prefix and possible signs (positive and negative in the horizontal and vertical directions), exploring these reference regions to find multiple candidate blocks with the smallest difference from the current block, ordering the multiple candidate blocks (or corresponding BVD information, e.g., suffix or suffix information) with the smallest difference, and selecting a candidate block based on a derived index value.

[0412] As shown in Figure 37, if the derived index (e.g., 3722) is the derived index of the entire suffix (e.g., 3704), the received bitstream does not contain the BVD sign. Therefore, the search involves searching multiple reference regions determined based on the prefix and all sign values. If the derived index (e.g., 3722) is the derived index of a component of the suffix (e.g., 3720), then the component of the suffix contained in the received bitstream contains the sign of the direction of that component (e.g., 3721).

[0413] In these embodiments, if the suffix flag value is a first value and the derived component selection index indicates the existence of a derived index for the horizontal or vertical component of the suffix, the reference region for determining the candidate component indicated by the derived index may be defined as follows: The value of the other component not indicated by the derived index is set to a predetermined constant value (e.g., 0) or, in another example, to half of the maximum possible suffix value for the notified prefix value. The set of candidates is defined to include candidates having different combinations of signs of the component indicated using the derived index. The maximum absolute value of a component in a candidate belonging to this set is determined by the indicated value of the prefix of that component. When determining the symbol value of a component not indicated by the derived index, the search range for suffix and sign symbol prediction is defined such that all candidates have one component that is equal to the component indicated by the derived index.

[0414] In 3808, one of the candidate blocks is selected using a derived index value encoded in one or more second symbols, and the suffix is ​​determined based on the selected candidate block. As described above, the derived index identifies one of the candidates ordered according to the template matching cost. Details of an exemplary process for determining the BVD suffix or suffix component by searching one or more reference regions to find multiple candidate reference blocks and selecting a candidate reference block using the derived index are described in more detail in relation to Figures 22D and 30F.

[0415] Figure 38B shows a method 3810 for determining the suffix when the value of the suffix flag is set to a second value. For example, if the suffix flag 3702 is set to a second value (0), the suffix flag is followed by the sign and one of the horizontal or vertical components of the suffix, followed by the other horizontal or vertical component (for example, 3710 and 3706 are followed by 3712 and 3708). According to some embodiments, method 3810 may be performed in 3012 of Figure 30B.

[0416] Method 3810 begins at 3812 when the decoder receives the BVD in the received bitstream. At 3812, the suffix flag value is set to a second value, the derived index value is received in the bitstream, and each suffix component also includes the corresponding code component encoded with it. That is, the horizontal component of the code is announced with the horizontal component of the suffix, and the vertical component of the code is announced with the vertical component of the suffix. In some exemplary embodiments, the code component and at least some of the symbols of each suffix component may be context-encoded. At 3812, the code component is decoded.

[0417] In 3814, the horizontal and vertical components of the suffix are decoded. In some embodiments, in addition to one or more context-coded symbols, each component may include one or more bypass-coded symbols.

[0418] Figures 38C and 38D are flowcharts illustrating aspects of the method shown in Figure 29B for encoding BVD according to certain embodiments of this disclosure.

[0419] Figure 38C shows method 3830 when the suffix flag is set to a first value. Method 3830 begins with 3832. In 3832, if the value of the suffix flag is the first value, the derived component selection index (e.g., the derived component selection index in Figure 37) is encoded into one or more second symbols in the transmitted bitstream.

[0420] The value of the derived component selection index is set depending on whether the second one or more symbols contain only a derived index for the suffix (e.g., derived index 3704), or whether they contain a derived index for one of the horizontal or vertical components of the suffix (e.g., derived index 3718 for one of the horizontal or vertical components shown in Figure 37) and the suffix of the other component (e.g., 3720). The suffix component may be encoded together with the corresponding code component. For example, if the derived component selection index is set to 1, it indicates that the subsequent derived index is the derived index of the suffix. If the derived component selection index is set to 00 or 01, it indicates that the subsequent derived index concerns either the horizontal or vertical component of the suffix, followed by the other component and the corresponding code component.

[0421] In 3834, depending on the value of the derived component selection index, the derived index of the entire suffix, or the derived index of either the horizontal or vertical component of the suffix, and the suffix symbol of the other component are encoded. The suffix components may also be encoded together with the corresponding code components (for example, as shown in Figure 37, the horizontal component 3710 of the code is encoded together with the horizontal component 3706 of the suffix, and the vertical component 3712 of the code is encoded together with the vertical component 3708 of the suffix). Further details on determining the derived index for determining the suffix when the derived index is used to indicate a candidate reference block within an ordered set of candidate reference blocks in the reference domain are described in relation to Figures 22D and 30E.

[0422] Figure 38D shows a method 3840 for encoding the transmitted bitstream when the suffix flag is set to a second value. Method 3840 may be performed in 3030 of Figure 30D.

[0423] Method 3840 is initiated at 3842 when the encoder receives the BVD to be transmitted. At 3842, the horizontal and vertical components of the sign of the BVD magnitude are determined based on the BVD.

[0424] In 3844, a first symbol set containing the first component of the code and the first component of the suffix, and a second symbol set containing the second component of the code and the second component of the suffix, are encoded into one or more second symbols in the transmitted bitstream. The first component corresponds to the horizontal size, and the second component corresponds to the vertical size. In some embodiments, the code may be context-coded. Each component of the suffix contains at least one context-coded symbol and may also contain one or more bypass-coded symbols.

[0425] Methods 3830 and 3840 encode the BVD into the format shown in Figure 37. For example, if the suffix flag 3702 of the BVD shown in Figure 37 is a first value (1), the suffix flag 3702 is followed by the derived component selection index 3722. If the suffix flag 3702 is a second value (0), the suffix flag 3702 is followed by the horizontal components of the sign and suffix respectively (3710 and 3706), followed by the vertical components of the sign and suffix respectively (3712 and 3708). If the value of the derived component selection index 3722 is 1, the derived index (derived index of the suffix) 3704 is followed by the derived component selection index 3722. The derived component selection index 3722 is followed by the derived index (the derived index of the first component of the suffix) 3718 and the suffix symbol (the second component of the code 3721 and the suffix 37120).

[0426] Furthermore, the methods described above with respect to Figures 22A-D, 24A-C, 26A-B, 27A-B, 29A-B, 30A-F, 32A-D, 34A-D, 36A-D, and 37 may be applied to one or more size symbols of another difference vector, such as an MVD, used in interpretation, in addition to one or more size symbols of the BVD used in IBC.

[0427] Embodiments of the present disclosure may be implemented as hardware using analog and / or digital circuits, as software through the execution of instructions by one or more general-purpose or dedicated processors, or as a combination of hardware and software. Accordingly, embodiments of the present disclosure can be implemented in the environment of a computer system or other processing system. An example of such a computer system 3900 is shown in Figure 39. The blocks shown in the figure (e.g., the blocks in Figures 1, 2 and 3) can be executed on one or more computer systems 3900. Furthermore, each step of the flowchart shown in the present disclosure can also be implemented on one or more computer systems 3900.

[0428] The computer system 3900 includes one or more processors, such as a processor 3904. The processor 3904 may be, for example, a dedicated processor, a general-purpose processor, a microprocessor, or a digital signal processor. The processor 3904 may be connected to a communication infrastructure 3902 (e.g., a bus or network). The computer system 3900 may also include main memory 3906, such as random access memory (RAM), and secondary memory 3908.

[0429] The secondary memory 3908 includes, for example, a hard disk drive 3910 and / or a removable storage drive 3912 (representing a magnetic tape drive or optical disc drive, etc.). The removable storage drive 3912 can read from and / or write to the removable storage unit 3916 by known means. The removable storage unit 3916 represents a magnetic tape or optical disc, etc., that is read from and written to by the removable storage drive 3912. As will be understood by those skilled in the art, the removable storage unit 3916 includes a computer-available storage medium on which computer software and / or data is stored.

[0430] In other implementations, the secondary memory 3908 may include other means that enable loading computer programs or other instructions into the computer system 3900. Such means include, for example, a removable storage unit 3918 and interface 3914. Examples of such means include program cartridges and cartridge interfaces (e.g., those used in video game devices), removable memory chips (e.g., EPROM or PROM) and associated sockets, thumb drives and USB ports, as well as a removable storage unit 3918 and interface 3914 that enable the transfer of software and data from the removable storage unit 3918 to the computer system 3900.

[0431] The computer system 3900 may also include a communication interface 3920. The communication interface 3920 enables the transfer of software and data between the computer system 3900 and external devices. Examples of the communication interface 3920 include modems, network interfaces (e.g., Ethernet cards), and communication ports. The software and data transferred via the communication interface 3920 may be in the form of electronic signals, electromagnetic signals, optical signals, or other signals that the communication interface 3920 can receive. These signals are provided to the communication interface 3920 via a communication path 3922. The communication path 3922 transmits signals and may be implemented using wires or cables, optical fibers, telephone lines, cellular links, RF links, and other communication channels.

[0432] As used herein, the terms “computer program medium” and “computer-readable medium” refer to tangible storage media such as removable storage units 3916 and 3918, or hard disks mounted in hard disk drive 3910. These computer program products are means for providing software to computer system 3900. Computer programs (also called computer control logic) may be stored in main memory 3906 and / or secondary memory 3908. Computer programs may be received via communication interface 3920. Such computer programs enable computer system 3900 to implement the disclosure at runtime. In particular, computer programs enable processor 3904 to implement a process of the disclosure, such as any of the methods described herein, at runtime. Thus, such computer programs may represent a controller of computer system 3900.

[0433] In another embodiment, the features of this disclosure may be implemented in hardware using hardware components such as application-specific integrated circuits (ASICs) and arrays. Implementations of hardware state machines for performing the functions described herein will also be apparent to those skilled in the art.

[0434] For example, there may be a video signal (e.g., a video signal for broadcast or simulcast) that includes pixel color data and one of the embodiments of the taught encoded data structure (e.g., the encoding in Figure 33 or Figure 35), that is, the signal specifically includes the value of each derived flag before the data which includes either a derived index or the actual encoded data of the suffix (including some contextual encoded symbols of the suffix) with respect to each block vector difference or motion vector difference being communicated.

Claims

1. A method for deriving the block offset vector difference in order to predict the second pixel color of the second block of a first picture based on the first pixel color of the first block of the first picture located at an offset position from the second block of the second picture, wherein the method comprises: A step of obtaining at least one prefix of the magnitude of the block offset vector difference based on one or more first symbols in the bitstream, The steps include determining at least one suffix of the size based on a flag and one or more second symbols in the bitstream, wherein the step of determining the suffix is: If the value of the aforementioned flag is the first value, A step of determining one or more candidate values ​​for the suffix based on the prefix, The steps include selecting a candidate value for the suffix to use in determining the suffix from the one or more candidate values ​​of the suffix, using the index value encoded in one or more of the second symbols, or If the value of the flag is a second value, the step includes determining the suffix based on at least one context-encoded symbol of one or more bits of the suffix contained in one or more of the second symbols, The size is determined by a method based on the concatenation of the prefix and the suffix.

2. The method according to claim 1, wherein the second picture is the same as the first picture.

3. The method is as follows: If the value of the flag is the first value, A step of searching for at least one candidate block for predicting the second block in at least one reference region within the first picture, wherein the at least one reference region is determined at least based on the value of the prefix, If there are multiple candidate blocks, the steps include ordering the multiple candidate blocks according to the degree of agreement between a first template surrounding a candidate block and a corresponding second template surrounding a second block, The steps include selecting one of the at least one candidate blocks based on the index value, The method according to claim 1 or 2, further comprising the step of determining the at least one suffix based on the selected candidate block.

4. The method according to any one of claims 1 to 3, wherein if the flag has a first value, at least one of the second one or more symbols encoding the suffix is ​​CABAC bypass encoded.

5. The method according to any one of claims 1 to 4, wherein if the flag has the second value, at least one of the second one or more symbols encoding the suffix is ​​CABAC bypass encoded.

6. The method according to any one of claims 1 to 5, wherein, if the flag has the second value, the at least one context-coded symbol is an indication of whether the prediction of the symbol matches the corresponding symbol of the block offset vector difference.

7. The method according to any one of claims 1 to 6, wherein at least one of the symbols to be binarized is Golomb coded.

8. The method according to any one of claims 1 to 7, wherein at least one flag indicates whether one or more components of the suffix are zero or greater than zero.

9. A step of receiving a video sequence, A video coding method comprising the steps of: compressing a video sequence by predicting blocks of images in the video sequence, wherein the compression step comprises the method according to any one of claims 1 to 8, wherein the compression step comprises deriving a block offset vector difference.

10. The steps include receiving a compressed bitstream, A video decoding method comprising the step of decoding the compressed bitstream to obtain a reconstructed video sequence, wherein the decoding step comprises the method according to any one of claims 1 to 8, wherein the decoding step comprises deriving a block offset vector difference.

11. A video encoder comprising a circuit connected to a memory, wherein the circuit performs the method according to any one of claims 1 to 8 for deriving a block offset vector difference.

12. A video decoder comprising a circuit connected to a memory, wherein the circuit performs the method according to any one of claims 1 to 8 for deriving a block offset vector difference.

13. A video signal comprising a data structure including encoded video data representing the magnitude of a block offset vector difference, wherein the block offset vector difference represents the difference between, firstly, a block offset vector specifying the positional distance of a first block for predicting a second block, and secondly, a block offset vector prediction, and the magnitude is encoded as first data encoding a prefix portion of the magnitude and second data encoding a suffix portion. The video signal further comprises a flag, the flag which, if it has a first value, indicates that the second data includes an index value that specifies one of a set of candidate vectors that specify the suffix portion, and the flag which has a second value, indicates that the second data includes at least one context-encoded symbol that directly encodes one or more bits of the suffix.