VIDEO DECODING METHODS BASED ON PATTERN MATCHING, ENCODING EQUIPMENT, AND DECODING EQUIPMENT

VN127001APending Publication Date: 2026-07-15IND ACAD COOP GRP OF SEJONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
VN1202601276
Authority / Receiving Office
VN · VN
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-24
Filing Date
2024-06-28
Publication Date
2026-07-15

AI Technical Summary

Technical Problem

Current digital video encoding and decoding processes are inefficient in terms of computation resources and time, affecting the production, recording, and viewing of digital video content, particularly in improving encoding efficiency, decoding efficiency, video quality, reducing computation and hardware size, and enhancing performance.

Method used

The method employs template matching for intra prediction in video encoders and decoders, where samples adjacent to the current block are used to find a prediction template within a search area, adjusting downsampling based on block size and using prediction vectors derived from neighboring blocks to optimize template matching for efficient encoding and decoding.

Benefits of technology

This approach reduces the complexity of template matching, enabling high-speed and efficient video encoding and decoding by leveraging adjacent samples and prediction vectors, thereby improving encoding and decoding efficiency and video quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure VN1202601276_0
    Figure VN1202601276_0
Patent Text Reader

Abstract

The invention relates to a method for decoding video based on pattern matching, an encoder, and a decoder. The pattern matching-based decoding method is performed by a decoder according to a pattern implementation scheme of the invention comprising: collecting pattern-related information, which is a set of patterns adjacent to the current block, from the reconstructed region of the current image; performing pattern matching to search for a predicted pattern corresponding to the pattern within the search region included in the reconstructed region; selecting a predicted block adjacent to the predicted pattern; and performing intraframe prediction decoding for the current block based on the predicted block. Pattern matching is performed using a subset of patterns within the pattern or using a portion of the search region.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for video encoding and decoding using an improved intra prediction structure

[0001] The present invention relates to the field of encoding and decoding of digital video, and relates to a method for encoding and decoding digital video, a method for recording such data, and components, devices, and systems for realizing such a method.

[0002] The present invention may be in the same technical field as at least one of the digital video compression technology standards known by the names of standards such as MPEG-2, MPEG-4 Video, H.263, H.264 / AVC, H.265 / HEVC, H.266 / VVC, VC-1, AV1, QuickTime, VP-9, VP-10, and Motion JPEG, or may be in the technical field for improving the inherent efficiency of the standards, or may be in the technical field for improving or replacing the standards.

[0003] Digital video encoding and decoding are widely used in various digital video applications. For example, digital television broadcasting, video transmission over communication networks, video calls / video conversations / video chats, recording and providing video content using optical media including video compact discs (VCDs), digital versatile discs (DVDs), and Blu-Rays, all processes for producing, editing, collecting, and distributing video content, and devices such as video recording devices and camcorders for various purposes, including personal, commercial, industrial, and security purposes, all depend on video encoding and decoding technologies.

[0004] Accordingly, implementations that may be referred to as digital video encoders and decoders may form part of a wide range of devices related to the generation, recording, and provision of digital video, including digital televisions, digital broadcasting systems, wireless broadcasting systems, computers in the form of notebooks / desktops / tablets, e-book readers, digital cameras, digital recording devices, digital multimedia playback devices, video game devices / terminals / consoles, mobile phones (including smartphones) with multimedia playback capabilities, equipment for video conferencing, and other devices.

[0005] The above digital video encoders and decoders can be implemented by a digital video compression standard that is widely used and understood by those skilled in the art. The digital video compression standard may include at least one of compression standards known by a standard name such as MPEG-2, MPEG-4 Video, H.263, H.264 / AVC, H.265 / HEVC, H.266 / VVC, VC-1, AV1, QuickTime, VP-9, VP-10, and Motion JPEG.

[0006] Video encoders and decoders can be implemented to more efficiently encode or decode digital video information while complying with the above standards, or by improving or modifying the above standards. Attempts to modify the above standards can also lead to the development of new standards. A well-known example is the so-called enhanced compression model (ECM), an attempt to improve and replace the existing H.266 / VVC standard, currently being developed by the Joint Video Experts Team (JVET), a joint international standardization group of ISO, IEC, and ITU-T.

[0007] The encoding process for compressing digital video requires various operations, such as spatial segmentation of digital video, segmentation and / or processing in color channels, removal of spatial redundancy, removal of temporal redundancy, tracking of motion vectors within the video, encoding of differential images, quantization, coefficient scan, run-length coding, entropy coding, and loop filtering. These encoding operations generally consume computing resources and take a certain amount of time to complete. Similarly, the decoding operation for the encoding operation also requires certain computing resources and a certain amount of time. The main goal of video encoding and decoding technology is to ensure that the consumption of resources and time does not interfere with the production, recording, distribution, and viewing of digital videos.

[0008] The technical problem of the present invention is to provide a new technology that can contribute to at least one of improving encoding efficiency, improving decoding efficiency, improving video quality, reducing computational amount, reducing software size, reducing hardware size, and improving other performances related to encoding and decoding.

[0009] According to an embodiment of the present invention for solving the above-described technical problem, a decoding method based on template matching performed by a decoder comprises the steps of: obtaining information about a template, which is a set of samples adjacent to a current block, from a restoration area of ​​a current picture; performing template matching to search for a prediction template corresponding to the template within a search area included in the restoration area; selecting a prediction block adjacent to the prediction template; and performing intra-prediction decoding for the current block based on the prediction block, wherein the template matching may be performed using some samples within the template or using some of the search area.

[0010] The step of performing the template matching may include the step of downsampling the template, and the step of searching for a predicted template location by comparing a sample of the downsampled template with a sample of the search area.

[0011] The above downsampling step may include a step of adjusting at least one of whether to perform the downsampling and the magnification for the upper samples of the template based on the horizontal size of the current block.

[0012] The above downsampling step may include a step of adjusting at least one of whether to perform the downsampling and the magnification for the left samples of the template based on the vertical size of the current block.

[0013] The above downsampling step may be characterized in that it is executed based on downsampling symbol information derived from a bitstream.

[0014] The above search area may be characterized in that it is limited based on a prediction vector from the current block.

[0015] The above prediction vector may be characterized in that it is generated based on at least one reference prediction vector information of a surrounding block of the current block.

[0016] The above search area may be characterized by having a first sample width horizontally and a second sample width vertically, with the point indicated by the prediction vector as the center point.

[0017] At least one of the first sample width and the second sample width may be derived from a bit string.

[0018] The above prediction vector may be characterized in that it is selected by an index from at least one block vector candidate of a surrounding block of the current block.

[0019] The above index may be characterized as being derived from a bit string.

[0020] The above prediction vector may be characterized in that it is generated based on at least one reference prediction vector information of a surrounding block of the current block and differential vector information indicating a difference from the reference prediction information.

[0021] The method may further include a step of searching for an optimal prediction block position closest to the current block sample by comparing the current block sample with a sample of a search area included in a restoration area of ​​an image, and the prediction vector may be generated based on difference vector information indicating a difference between at least one reference prediction vector information of a block surrounding the current block and optimal prediction vector information indicating the optimal prediction block position.

[0022] The above differential vector information may be characterized as being derived from a bit string.

[0023] The above difference vector information may be characterized in that it is designated as an index that designates one of at least two predetermined values.

[0024] The above method may further include a step of the decoder storing the prediction vector for use in a subsequent decoding process.

[0025] The method may further include a step of generating the prediction vector for at least one lower decoding unit, a step of designating one of the at least one prediction vector as a representative prediction vector for an upper decoding unit including the lower decoding unit, and a step of storing the representative prediction vector by the decoder.

[0026] The method may further include, when executing the template matching in the chroma signal domain, a step of generating a prediction vector based on at least one reference prediction vector corresponding to a block corresponding to the same position in the luminance signal domain based on the chroma signal domain.

[0027] According to an embodiment of the present invention for solving the above-described technical problem, a decoder device comprises: a template matching unit that obtains information about a template, which is a set of samples adjacent to a current block, from a restoration area of ​​a current picture, and performs template matching to search for a prediction template corresponding to the template within a search area included in the restoration area; and a prediction decoding unit that selects a prediction block adjacent to the prediction template and performs intra-prediction decoding for the current block based on the prediction block, wherein the template matching may be performed using some samples within the template or using some of the search area.

[0028] According to an embodiment of the present invention for solving the above-described technical problem, a encoding method based on template matching performed by an encoder comprises the steps of: obtaining information about a template, which is a set of samples adjacent to a current block, from an already encoded area of ​​a current picture; performing template matching to search for a prediction template corresponding to the template within a search area included in the already encoded area; selecting a prediction block adjacent to the prediction template; and performing intra-prediction encoding for the current block based on the prediction block, wherein the template matching may be performed using some samples within the template or using some of the search area.

[0029] According to an embodiment of the present invention for solving the above-described technical problem, an encoding device comprises: a template matching unit that obtains information about a template, which is a set of samples adjacent to a current block, from an already encoded area of ​​a current picture, and performs template matching to search for a prediction template corresponding to the template within a search area included in the already encoded area; and a prediction encoding unit that selects a prediction block adjacent to the prediction template and performs intra-prediction encoding for the current block based on the prediction block, wherein the template matching may be performed using some samples within the template or using some of the search area.

[0030] According to the present invention, the complexity of template matching for performing intra prediction in a video encoder and decoder is reduced, thereby enabling efficient and high-speed video encoding and decoding.

[0031] Figure 1 is a conceptual diagram of a video communication system according to one embodiment of the present invention;

[0032] FIG. 2 is a conceptual diagram of the arrangement of an encoder and decoder in a real-time video streaming environment according to one embodiment of the present invention.

[0033] Figure 3 is a functional unit conceptual diagram of a video decoder according to one embodiment of the present invention;

[0034] Figure 4 is a functional unit conceptual diagram of a video encoder according to one embodiment of the present invention;

[0035] Figure 5 is a conceptual diagram of a frame type according to one embodiment of the present invention;

[0036] FIG. 6 is a conceptual diagram showing the structure of a video encoder according to another embodiment of the present invention;

[0037] Figure 7 is a conceptual diagram illustrating a template matching prediction method according to one embodiment;

[0038] Figure 8 is a conceptual diagram of the storage and use of block vectors in the template matching prediction method.

[0039] FIG. 9 is an example diagram for downsampling of a template according to one embodiment of the present invention.

[0040] FIG. 10 is an example diagram for downsampling of a template by block size according to one embodiment of the present invention.

[0041] FIG. 11 is an example diagram for setting a search range of a block vector according to one embodiment of the present invention, and

[0042] FIG. 12 is a conceptual diagram of a block vector determination method based on a prediction vector according to one embodiment of the present invention.

[0043] The present invention is susceptible to various modifications and embodiments. Specific embodiments are illustrated and described in detail in the drawings. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present invention.

[0044] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, the first component could be referred to as the "second component," and similarly, the second component could also be referred to as the "first component." The term "and / or" includes any combination of multiple related items described herein or any of multiple related items described herein, and is non-exclusive unless otherwise indicated. The listing of items in this application is merely an exemplary description to facilitate the spirit and possible implementation methods of the present invention, and therefore is not intended to limit the scope of embodiments of the present invention.

[0045] As used herein, "A or B" can mean "only A," "only B," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."

[0046] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."

[0047] In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B".

[0048] Additionally, in this specification, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and / or C” can mean “at least one of A, B and C.”

[0049] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.

[0050] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0051] Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by those of ordinary skill in the art to which this invention pertains. Terms defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning within the context of the relevant technology, and shall not be interpreted in an idealized or overly formal sense unless explicitly defined herein.

[0052] In describing the invention in this application, embodiments may be described or illustrated in terms of unit blocks that perform the described function or functions. The blocks may be expressed in this application as one or more devices, units, modules, parts, etc. The blocks may be implemented in hardware by one or more logic gates, integrated circuits, processors, controllers, memories, electronic components, or information processing hardware implementation methods, but not limited thereto. Alternatively, the blocks may be implemented in software by application software, operating system software, firmware, or information processing software implementation methods, but not limited thereto. A single block may be implemented by being separated into multiple blocks that perform the same function, or conversely, a single block may be implemented to perform the functions of multiple blocks simultaneously. The blocks may also be implemented by being physically separated or combined according to any criteria. The blocks may also be implemented to operate in an environment where their physical locations are not specified and are separated from each other by a communication network, the Internet, a cloud service, or a communication method, but not limited thereto. All of the above implementation methods are within the realm of various embodiments that can be taken by a person skilled in the field of information and communication technology to implement the same technical idea, and therefore, any detailed implementation method should be interpreted as being included within the technical idea scope of the invention of the present application.

[0053] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the attached drawings. To facilitate a comprehensive understanding of the present invention, the same reference numerals will be used for identical components in the drawings, and redundant descriptions of identical components will be omitted. Furthermore, the multiple embodiments are not mutually exclusive, and it is assumed that some embodiments may be combined with one or more other embodiments to form new embodiments.

[0054]

[0055] digital video codec

[0056] Figure 1 is a conceptual diagram of a video communication system according to one embodiment of the present invention. The video communication system (100) may be configured to include at least two terminals (110, 120) connected to each other via a network (105).

[0057] In one embodiment of the present invention, the above-described FIG. 1 may refer to a block diagram for configuring a unidirectional video communication network. A first terminal (110) among the terminals may encode video data in order to transmit (111) the video data via a network (105). A second terminal (120) among the terminals may be configured to receive (121) the encoded video data via a network and decode and display the same.

[0058] In another embodiment of the present invention, the above-described FIG. 1 may refer to a block diagram for configuring a two-way video communication network. For the two-way video communication, each terminal (110, 120) may be configured to encode video data acquired by itself for video transmission (112, 122) to each other terminal via the network. Each terminal may also be configured to receive (113, 123) video data transmitted by another terminal via the network, decode the same, and display the decoded video data.

[0059] The terminals (110, 120) shown in Fig. 1 may be exemplified as devices such as server computers, personal computers, portable computers, and smartphones, depending on the embodiment, but are not limited thereto. The present invention is applicable to all environments for establishing a one-way or two-way video communication network, and it should be understood that the network (105) may be established by any means for transporting encoded video data between the terminals (110, 120).

[0060] In one embodiment of the present invention, the network (105) may refer to a wired or wireless communication network. Depending on the embodiment, the network may be configured to communicate information using any communication standard, which may include packet-based communication. The packet communication may be understood to include packets, for example, known as TCP or UDP.

[0061] However, in another embodiment of the present invention, the network (105) may be understood to include a process of information transmission using a recording medium. In this case, the configuration of the network is not limited to a communication medium, and should be understood to include a process of temporarily storing and physically transporting information on a hard disk, a solid state disk (SSD), a flash memory, a compact disc (CD), a digital versatile disc (DVD), a Blu-ray disc, and other mechanical, electronic, or optical recording media.

[0062] Any other means of information communication or transport, regardless of the method employed, can be considered within the scope of the present invention as long as it has a structure that supports the transmission and decoding of video data in an encoded state. Therefore, in addition to the examples listed above, any means of information communication or transport, whether known in the past or newly available, can fall within the scope of application of the present invention.

[0063] FIG. 2 is a conceptual diagram illustrating the arrangement of an encoder and decoder in a real-time video streaming environment according to one embodiment of the present invention. The streaming system (200) illustrated in FIG. 2 can be applied to video data communication networks, including, for example, digital broadcasting, video telephony, and video conferencing. However, it should be noted that technical structures identical or similar to the streaming system can be equally applied even when information is transmitted via a recording medium, as described above.

[0064] According to one embodiment of the present invention, the streaming system may include a video source (210) that generates a video stream. The video source may include a digital video acquisition means (212), which may be, for example, a digital camera or other device, for acquiring uncompressed raw video. The raw video stream (215) may have a large capacity and may therefore be compressed by a video encoder (217) coupled or connected to the video source.

[0065] The above encoder (217) may be configured as a means including hardware, software, or a combination of the two, configured to implement an image encoding method and / or an implementation method thereof according to one embodiment of the present invention.

[0066] Through the encoder (217), an encoded bitstream (219) having a reduced capacity compared to the original video stream can be output. The bitstream (219) can be provided in real time via a relay device, which may be referred to as a streaming server (220), and / or can be stored in a recording medium (225) of the streaming server (220) for subsequent use.

[0067] The streaming system (200) may include at least one streaming client (230, 240) that connects to the streaming server (220) to receive the encoded bit string (229) in real time or obtain it later. The streaming client may include a video decoder (232) that obtains the encoded bit string (229) (which may also be considered as a copy of the bit string (219) received by the streaming server), decodes the bit string (229), and outputs the resulting video data as video data in a form that can be displayed by a display (235) or other visual, auditory, or other sensory display means.

[0068] As described above, the functions for encoding and decoding video data are collectively called a coder-and-decoder, or video codec.

[0069] FIG. 3 is a conceptual diagram of a functional unit of a video decoder according to an embodiment of the present invention. As shown in FIG. 3, a receiving unit (310) can receive at least one encoded video data to be decoded by a decoder (305). In an embodiment of the present invention, the encoded video data may be independent for each reception, and the decoding procedure of each independent video data may be independent from the decoding procedure of other video data. The encoded video data may be received by the receiving unit (310) through a hardware or software connection (315) to a device storing the same, and as described above, the storing device may be a type of streaming server located at the other end of a communication network, or may mean a physical recording medium, but is not limited thereto.

[0070] The above-described receiving unit (310) can receive the encoded video data together with other data accompanying it, such as encoded audio data or other auxiliary data, and each of the data can be separated from the video data and provided to an appropriate processing function unit (312) other than the video decoder.

[0071] When the video data is provided through a communication network, a buffer memory (320) may be coupled between the receiving unit (310) and the decoder (305) to minimize delay and disconnection according to the network environment. The buffer memory (320) may refer to a computer-readable recording medium that temporarily stores the received video data and stably supplies it to a parser (330) corresponding to the input terminal of the decoder (305). However, if the bandwidth of the communication network is sufficient, if video data is read from a recording medium in a local location that is not physically separated, or if the possibility of communication delay is not predicted in other environments, the buffer memory may be unnecessary.

[0072] The video decoder (305) may include the parser (330) as its input terminal to interpret the encoded video data. The parser may perform a function of separating (parsing) a plurality of pieces of information stored in the form of a bit string in the encoded video data according to a predetermined rule, and, if necessary, performing an entropy decoding (335) of entropy-coded video data, thereby performing a function of reconstructing symbols (338), which are paragraphs of video encoding information. The symbols (338) may include all information for controlling the operation of the decoder (305), and / or may further include information for controlling a device that is attached to and operable with the decoder (305), such as a display device. Control information for controlling the above display device may include information in a format called supplementary enhancement information (SEI) or video usability information (VUI).

[0073] As described above, the parser (330) may be configured to perform entropy decoding (335) of the encoded video data. The entropy encoding method of the encoded video data may vary depending on the encoding standard, and decoding may be performed accordingly. Representative examples of the entropy encoding standard may include variable length coding, Huffman coding, and arithmetic coding, and each of the encoding methods may be a context-adaptive or context-sensitive method depending on the standard, and may also be based on principles widely known to those skilled in the art.

[0074] The parser (330) may be configured to extract at least one picture from the encoded video data. The definition of the picture may vary depending on the encoding standard, and depending on the standard, one or more of the examples listed below may correspond simultaneously and overlappingly. The picture may be grouped, defined, and / or divided into encoding / decoding units such as, for example, groups of pictures (GOPs), pictures / frames, tiles, slices, macroblocks, blocks, subblocks, transform units (TUs), and prediction units (PUs).

[0075] The parser (330) may be configured to extract encoding information, such as transform coefficients, quantization parameters (QPs), and / or motion vectors, from the encoded video data. The parser (330) may be configured to perform entropy decoding (335) and parsing operations on the video data received from the buffer memory, and to selectively decode symbols (338) representing the encoding information. In addition, the parser (330) may be configured to selectively supply a specific symbol (338) to a specific decoding function unit within the decoder (305), such as an inverse quantization and inverse transform unit (340), an intra prediction unit (350), an inter prediction unit (355), or a loop filter unit (360). Control of such information supply can be determined by the information sequence contained in the encoded video, and may vary depending on the encoding standard, and is not limited within the scope of the embodiments of the present invention, and is not described in detail in this conceptual diagram.

[0076] The decoder (305) may be comprised of a number of conceptual functional units that receive and process the encoded information provided by the parser (330). It should be readily apparent that these conceptual functional units may be combined or further subdivided, depending on implementation needs. For example, they may be further separated for ease of implementation, or integrated into one for operational efficiency. In any case, each functional unit may be configured to perform close interaction with each other. However, despite the possibility of such integration or separation, the following description will be given as a combination of conceptual functional units to illustrate the video data decoding procedure applied as an embodiment of the present invention.

[0077] The decoder may include an inverse quantization and inverse transformation unit (340). The inverse quantization and inverse transformation unit (340) may be configured to receive encoding information including a method to be used for numerical transformation (transform), a block size, quantization coefficients for recovering quantized information, and distinction information of a quantization matrix that simplifies and represents the quantized coefficients from the parser (330), and may be configured to output block values ​​(341) that can be input to an aggregator (370) as a result of processing the encoding information.

[0078] In one embodiment of the present invention, the output values ​​of the inverse quantization and inverse transformation unit (340) may include intra-prediction encoded block values. The intra-predicted block values ​​may refer to values ​​that can be decoded using prediction information within a picture currently being decoded, for example, the current frame, but not using prediction information from a previously decoded picture, for example, the previous frame.

[0079] The prediction information within the current picture may be provided by the intra prediction unit (350). According to an embodiment of the present invention, the intra prediction unit (350) generates a block value of the same form as the block being decoded as the prediction information by using picture information of a spatially adjacent area derived from a picture currently being decoded and of which decoding has been partially completed. The picture information may be provided (381) from a buffer for the current picture, a so-called line buffer (380). The merging unit (370), according to an embodiment, may be configured to merge the prediction information (351) generated by the intra prediction unit (350) with the block values ​​(341) provided by the inverse quantization and inverse transformation unit (340).

[0080] In another embodiment, the output values ​​of the inverse quantization and inverse transformation unit (340) may include block values ​​subjected to motion compensation as inter-prediction encoded block values, and in some cases, block values ​​subjected to motion compensation. In this case, the inter-prediction unit (355) may extract and use sample information (386) used for motion-based prediction from a reference picture buffer (385). The information (356) derived by performing motion compensation on the sample information based on the symbols (338) included in the block values ​​as the output values ​​may be configured to be merged with the block values ​​(341) provided by the inverse quantization and inverse transformation unit (340) by the merger unit (370). In this case, the block values ​​(341) may be referred to as so-called differential or residual values.

[0081] The position information within the memory used by the inter prediction unit (355) to extract the sample information from the reference picture may be determined by a motion vector provided to the inter prediction unit (355) and composed of a combination of symbols (338) for indicating, for example, X, Y, and other specific points of the reference picture. The inter prediction unit (355) may also include a function for interpolating and using the sample values ​​when a so-called 'subsampling'-capable motion vector is provided, and may further include a function for predicting and reinforcing the value of the motion vector.

[0082] The output values ​​(371) of the above merging unit (370) may be provided to the loop filter unit (360) and processed by various loop filtering methods. The loop filter unit (360) may be configured to receive not only the block unit output (371) of the merging unit (370) but also the symbol (338) provided from the parser (330) to control its operation. The output of the loop filter unit (360) may be output to an external display means such as the display device through an output connection (390), but may be stored (361) in a line buffer (380) for use in prediction for interpreting a subsequent intra or inter coded block value, and may also be stored in a reference picture buffer (385) through this.

[0083] Certain pictures, such as frames, after their decoding is completed, can be utilized as reference pictures for performing predictive decoding in a subsequent decoding process. A picture (or frame) can be gradually accumulated in a line buffer (380) and decoded. When the decoding of a frame is completed, the contents of the line buffer (380) are transferred (383) to the reference picture buffer (385), and a new line buffer (380) can be allocated for decoding the new frame.

[0084] The above video decoder (305) may be configured to perform a decoding operation according to a predetermined video compression technique that may be documented by various international standards or commercial standards. The standards may include, for example, international standard recommendations such as H.264, H.265, and H.266 defined by the International Telecommunication Union Standardization Sub-Division (ITU-T). Those skilled in the art will understand that each of the above recommendations is equivalent to an international standard jointly defined by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC). The encoded video data may comply with a specific bitstream syntax defined by the relevant standards, as defined and required by the video compression standard documents and standard documents, and specifically by the profiles and levels specified within such documents. In addition, the complexity of the encoded video data may be limited to a certain level to comply with the profiles and levels. For example, a profile or level may be configured to limit a maximum picture size, a maximum decoding speed, and a maximum reference picture size. These limitations may, in some embodiments, also be further limited by metadata signals for a hypothetical reference decoder (HRD) and HRD buffer management included in the encoded video data.

[0085] According to one embodiment of the present invention, the receiver (310) may receive additional redundant data along with the encoded video. The additional data may be considered as part of the encoded video data. The additional data may include information that may be used by the decoder (305) to properly decode the data or to more accurately reconstruct an image that approximates the original image. The additional data may be provided in the form of, for example, layers for temporal, spatial, or signal-to-noise ratio (SNR) enhancement, redundant slices, redundant pictures, and forward error correction codes.

[0086] Figure 4 is a functional unit conceptual diagram of a video encoder according to one embodiment of the present invention. The encoder (405) may be configured to receive original video information (402) from a video source (401) and perform encoding.

[0087] The original video information (402) may have any suitable bit depth, for example, 8 bits, 10 bits, 12 bits, etc. In addition, the original video information (402) may have any suitable color space, for example, R / G / B, Y / U / V, Y / Cb / Cr, etc. In addition, the original video information (402) may have any suitable sampling structure corresponding to the color space, for example, Y / Cb / Cr 4:2:0, Y / Cb / Cr 4:4:4, etc. The original video information (402) having such a predetermined format may be provided to the encoder in the form of a digital video stream.

[0088] In a one-way video communication network, the original video information (402) can be obtained from a recording medium storing a previously prepared video source. In a two-way video communication network, the original video information (402) can be obtained from an image acquisition device, such as a camera, that generates at least one video transmission stream included in the two-way video communication.

[0089] The video data including the above original video information (402) may be configured as a plurality of pictures configured to simulate motion by playing them in chronological order. In addition to pictures, the pictures may also be expressed in concepts such as frames. The pictures may include one or more samples depending on the type of sampling structure, color space, etc. being used. Those skilled in the art will understand that the samples are closely related terms to pixels in digital images. The operation of the encoder will be described below with reference to such samples.

[0090] According to one embodiment of the present invention, the encoder (405) may be configured to encode and compress pictures (and / or grouped or segmented information) constituting the original video information (402) in real time (or according to other temporal requirements required according to the implementation method) into the form of encoded video information.

[0091] In the encoder (405), the control unit (450) may be a functional unit configured to control an appropriate encoding speed. The control unit (450) may be configured to control other functional units and be functionally coupled to the following functional units as described below. The parameters set by the control unit (450) may include parameters related to bitrate control, such as picture skip, quantizer, and variable values ​​for applying image quality optimization techniques, and may also include values ​​such as picture size, group of pictures (GOP) structure, and maximum search range of motion vectors. A person skilled in the art will be able to understand various other functions that the control unit (450) may have, and such other functions may be added or removed according to the design of a video encoder optimized for individual system design.

[0092] According to an embodiment of the present invention, the encoder (405) may be configured to operate in a structure such as a "coding loop" well known to those skilled in the art. To simplify the description by way of example, the coding loop may be configured with an internal encoder (so-called "source coder") (410) which is responsible for receiving a picture to be encoded and generating symbols based on at least one reference picture that has been encoded in the past, and a local decoder (420) configured to be connected to the internal encoder. The local decoder (420) may be configured to perform an operation to reproduce sample data to be generated by a decoder (490) located at an actual remote location that will receive encoded video information from the encoder (405) by receiving an output of the internal encoder (410).

[0093] Video data composed of sample data reconstructed by the internal decoder (420) may be configured to be input to the reference picture buffer of the encoder (405). As described above, the internal decoder (420) is implemented to reproduce the result output by the encoder (405) and to be decoded by a remote decoder, so the video data recorded in the reference picture buffer may also be identical in bit unit to the information of the reference picture buffer of the remote decoder. That is, the prediction function unit that may be included in the encoder (405) may read the same values ​​as the sample values ​​of the previous frame that the decoder will later refer to in the decoding process from the reference picture buffer of the encoder (405).

[0094] As described above, the principle of achieving matching of the reference picture buffers between the encoder (405) and the decoder (490) by means of the internal decoder (420) on the encoder (405) side is well known to those skilled in the art, and a method of responding to an environment in which such an environment is not guaranteed (e.g., information loss due to communication failure, etc.) can also follow what is known to those skilled in the art.

[0095] An embodiment of the operation method of the internal decoder (420) has been described in detail above with reference to FIG. 3. The decoder of FIG. 3 may be regarded as the aforementioned "remote" decoder (490). The internal decoder (420) may be implemented excluding lossless encoding and decoding sections such as the parser (330) or entropy decoding (335). This is because the internal encoder (405) is implemented to simply reproduce the operation of a decoder located at a remote location, and thus may directly decode symbols without requiring a process of compressing and then decompressing symbols. Accordingly, the functional units preceding the parser and entropy decoder as shown in FIG. 3 may not be provided or may be implemented at least partially.

[0096] As described above, according to a preferred embodiment of the present invention, any decoder function (excluding a parser and an entropy decoder) present in the decoder can naturally exist as a substantially identical function in the corresponding encoder (405).

[0097] The operation of the encoding function unit that may be included in the above encoder (405) can be considered as the reverse operation of the decoder function unit. Therefore, the embodiment can be explained by performing the operation of the decoder function unit in reverse. For example, a quantization and transform function unit corresponding to the inverse quantization and inverse transform unit may be provided, and an inter prediction encoding unit corresponding to the inter prediction unit may be provided. In addition, some additional explanations will be added.

[0098] The internal encoder (410) may be configured to perform encoding on input picture information, for example, an input frame, by a prediction encoding method executed by a prediction encoding unit (440) that operates by referencing at least one reference picture information, for example, at least one temporally previous encoded picture (or frame) from a reference picture buffer (430) from video data designated as a reference frame. In this case, the encoder (405) may be configured to encode a differential between blocks of samples constituting the input picture and blocks of samples constituting the reference picture.

[0099] The internal decoder (420) can decode video data that can be designated as the reference picture from symbols generated by the internal encoder (410). As described above, since the video data is identical to the decoding operation performed by the remote decoder, the video data used as the reference picture may be provided to the encoder (405) in a form that has undergone lossy compression and has been partially damaged, and this operation may be intended to ensure operational consistency with the decoder.

[0100] The prediction encoding unit (440) may be configured to perform a prediction search operation within the encoder (405). The prediction search operation may refer to an operation corresponding to the inter prediction or intra prediction described in the description of the decoder. For picture information that is input and scheduled to be newly encoded, the prediction unit may access the reference picture buffer (430) to retrieve information such as a motion vector, a block shape, and metadata that may include the same, which are information indicating a point of a reference picture that can function as prediction reference information suitable for the new picture information, and a sample block to be actually referenced. The above prediction encoding unit (440) may operate on the basis of the so-called "sample block by pixel block" criteria in order to obtain appropriate prediction reference information. According to one embodiment of the present invention, at least one prediction reference information designating at least one reference picture information stored in the reference picture buffer (430) may be designated for the input picture, as determined based on the search results obtained by the prediction encoding unit (440).

[0101] In one embodiment of the present invention, the control unit (450) may be configured to manage the overall encoding operation of the internal encoder (410), including setting parameters used to encode video data.

[0102] All outputs of the above-described functional units may be subjected to entropy encoding (460) in order to be finally output. The entropy encoding (460) may include various entropy coding techniques, such as variable length coding, Huffman coding, and arithmetic coding, for the symbols generated by the various functional units as described above, and each encoding method may be a context-adaptive or context-sensitive method according to the standard, or may be based on principles widely known to those skilled in the art. Such entropy encoding (460) can typically achieve lossless compression, and thus can be configured to convert at least one symbol generated by the functional units into encoded video data.

[0103] The above control unit (450) may, when controlling the operation of the encoder (405), apply to each picture (or frame) the type of encoding in which a specific picture is encoded during the encoding period. Depending on the type, the method by which the picture is encoded may be affected. Depending on the embodiment, the type may include what is categorized as the following "frame type."

[0104] Fig. 5 is a conceptual diagram of a frame type according to one embodiment of the present invention. The following description will be made with reference to Fig. 5.

[0105] An intra (“I”) picture (510) may refer to a picture that can be encoded and decoded using only its own information without referring to other picture information in video data through predictive encoding. The “I” picture may be designated by names such as a key frame, an independent / instantaneous decoder referh (IDR) frame, and a clean random-access (CRA) frame, depending on the video encoding standard, and the “I” pictures designated by the various names as described above may have various modifications and application methods as permitted by each standard and may be partially different from each other. In addition to those listed above, various application methods for implementing the “I” picture may be by various methods that are already known to those skilled in the art or may be newly provided.

[0106] A prediction ("P") picture (520) may refer to a picture that can be encoded and decoded through intra or inter prediction based on at least one prediction information and / or a motion vector that designates at least one reference picture to predict sample values ​​of a block constituting the picture. The "P" picture may be configured to refer to only one reference frame, or may be configured to refer to one or more reference frames, according to a video encoding standard. When referring to more than one reference frame, sample information and / or associated metadata derived from multiple reference pictures may be used to reconstruct a single block. However, in common cases, a picture designated as a "P" picture may be understood as a picture that performs reference only to a temporally preceding picture.

[0107] A bidirectional prediction ("B") picture (530) may refer to a picture that can be encoded and decoded through intra or inter prediction based on at least one piece of prediction information and / or a motion vector that designates at least two reference pictures in order to predict sample values ​​of blocks constituting the picture. In a common case, a picture designated as the "B" picture is distinguished from a picture designated as the "P" picture, and may be understood as a picture that performs a reference without being limited to a temporally preceding picture.

[0108] Video data may be spatially divided into a plurality of sample blocks during the encoding and decoding process, and encoding may be performed in units of the blocks. The block units may include, but are not limited to, sizes such as 4x4, 8x8, 4x8, or 16x16 in units of horizontal / vertical pixels, as is widely known. The block may be encoded using a predictive encoding method with reference to any other (already encoded) blocks, as permitted and / or restricted by the type specified for each picture in which the block is included. For example, the blocks of the "I" picture (510) may be encoded without using a predictive encoding method, or with reference to blocks that have already been encoded within the same partial picture. That is, only the so-called intra prediction method may be used. In contrast, the "P" picture (520) may further reference a reference picture encoded in at least one previous time unit, and thus, inter prediction may also be used for encoding along with intra prediction. In the case of a "B" picture (530), reference can be made not only to a previously encoded picture in the encoding order but also to a later reference picture in terms of time unit. However, it is widely known that there may be blocks within a "P" picture or a "B" picture that are encoded without relying on predictive encoding.

[0109] The above video encoder (405) may be configured to perform encoding operations according to a predetermined video compression technique that may be documented by various international standards or commercial standards. Examples of the above standards may include all of those described in the above decoder.

[0110] According to one embodiment of the present invention, the transmitter (470) may buffer the encoded video data generated by the entropy encoding in order to provide / transmit the video data (ultimately to a remote decoder (490)) to a device storing the encoded video data via a hardware or software connection (495). According to an embodiment, when providing / transmitting the encoded video data from the video encoder (405), the transmitter (470) may receive and merge other data accompanying the encoded video data, for example, encoded audio data or other auxiliary data, from a separate source (480).

[0111] According to one embodiment of the present invention, the transmitter (470) may be configured to transmit additional data along with the encoded video. The additional data may be considered part of the encoded video data. The additional data may include information that can be used by a decoder to properly decode the data or to more accurately reconstruct an image that approximates the original image. Examples of the additional data may include all of the examples previously presented with respect to the receiver (310) of the decoder.

[0112] The present invention can be implemented by a digital video compression standard that is widely used and understood by those skilled in the art as described above. The digital video compression standard may include at least one of compression standards known by the standard name such as MPEG-2, MPEG-4 Video, H.263, H.264 / AVC, H.265 / HEVC, H.266 / VVC, VC-1, AV1, QuickTime, VP-9, VP-10, and Motion JPEG.

[0113] Fig. 6 is a conceptual diagram illustrating the structure of a video encoder according to another embodiment of the present invention. What is depicted in Fig. 6 may be a rough structure of a video encoder widely known as a standard code such as ITU-T H.266 and ISO / IEC 23090-3, and also known as MPEG-I Part 3 or versatile video coding (VVC).

[0114] According to FIG. 6, a video encoder (605) may be configured to receive uncompressed and unencoded original video data (601) as input and output an encoded bit stream (602). The video data (601) may be supplied directly to a luma mapping unit (610a) when intra-encoded, or may be supplied to a luma mapping unit (610b) via an inter-prediction unit (620) including motion vector extraction. In the intra-encoded case, the mapped luma signal may be supplied to an output merger (606) by selecting (608) at least one of an intra-prediction encoded signal via an intra-prediction unit (625) or an inter-prediction encoded signal output from the luma mapping unit (610b) via the inter-prediction unit (620). The result of the above output merger can be applied to a chroma scaling unit (615). (The operation of the luminance signal mapping unit (610) and the operation of the chroma scaling unit (615) are collectively referred to as a luma mapping / chroma scalaing (LMCS) process.) The reduced chroma signal can be provided to a transform unit (630), and the transform unit (630) can perform an adaptive color transform, particularly on the chroma signal. The coefficients derived as a result of the transform are applied to a quantization unit (640) and quantized. As a result, lossy compression is achieved, and the result of the lossy compression can be output as a bit string (602) through a multi-hypothesis CABAC (650), which is a lossless compression method.

[0115] Meanwhile, the result of the lossy compression may actually enter the decoding process by going through the processes of inverse quantization (645), inverse transform (635), and luminance signal expansion (617) to generate a coding loop. The result of the luminance signal expansion may be supplied to the internal merger (607) together with the result of selecting (608) at least one of the previously generated intra prediction encoding signal or inter prediction encoding signal. The result of the internal merger may go through inverse luma mapping (617), and then may go through processing such as a deblocking filter (660), sample adaptive offset (SAO) (670), and an adaptive loop filter (ALF) to reproduce the image quality improvement process in the decoder. The result of reproducing the operation in the decoder as described above is applied to the reference picture buffer (690) and can be reused for prediction encoding by the inter prediction unit (620).

[0116] The present invention can also be utilized by or incorporated into an enhanced compression model (ECM), which is an implementation of a next-generation video codec currently being developed by the Joint Video Experts Team (JVET), an international standardization expert organization. The enhanced compression model can include an enhanced intra prediction coding method, an enhanced inter prediction coding method, an enhanced transform and transform coefficient coding method, an enhanced adaptive loop filtering method, a bilateral filtering method, a new sample adaptive offset (SAO) method for improving image quality, an extended entropy coding method, and an improved gradual decoding refresh (GDR) technique.

[0117]

[0118] Composition of the present invention

[0119] The present invention relates to a video encoding and decoding method and a device using an improved intra prediction method that can be used in the video encoding and decoding field including the embodiments described above.

[0120] Fig. 7 is a conceptual diagram illustrating a template matching prediction method according to one embodiment. The template matching prediction method according to the present embodiment can be performed by a video decoder and / or video encoder disclosed herein.

[0121] Referring to FIG. 7, a current picture may include a reconstructed area (790), which is a previously decoded (or encoded) area therein, and a current block (710), which means an encoding / decoding unit in which decoding (or encoding) is currently in progress. Here, the current picture may be understood to mean at least one concept among a slice, a frame, a subpicture, and a tile, depending on the embodiment, and the current block may be understood to mean a concept such as a block, a subblock, a prediction unit, or a coding unit, depending on the embodiment.

[0122] Meanwhile, among the samples (i.e., pixels) constituting the above restoration area (790), a set of samples adjacent to the current block (710) can be defined as a template (715).

[0123] The above template (715) may include samples belonging to the left block, the upper block, and the upper left block of the current block (710) and adjacent to the current block (710), and may be understood to mean a set of L-shaped samples having a predetermined sample thickness (717) that are directly adjacent to the current block (710) among the samples. The sample thickness (717) may be designated as any number greater than or equal to 1 pixel. However, for the convenience of technical understanding, it is described herein as being considered as 1 pixel, but it will be easily understood that the present invention may be substantially equally modified and applied to a template having a sample thickness (717) greater than or equal to 2 pixels. In addition, the sample thickness (717) may not be constant, may be variable, or may vary depending on the direction or section of the template. In addition, the template (715) may further include samples included in the lower left block and / or the upper right block of the current block (710).

[0124] The template matching prediction method according to the present embodiment may search for a block (720) corresponding to the current block (710) within the restoration area (790) and use the corresponding block (720) as a prediction block. Specifically, the template matching prediction method according to the present embodiment may include a step of performing template matching (735) by searching for an appearance location of a sample similar to the samples constituting the template (715) within the restoration area (790), a step of deriving a prediction template (725) based on the template matching (735), and a step of using a block (or an arbitrary set of samples corresponding thereto) corresponding to the current block (710) as a prediction block (720) by making the prediction template (725) adjacent thereto.

[0125] At this time, information indicating the direction and distance of the prediction block (720) from the current block (710) can be defined as a block vector. The pixel information of the prediction block (720) can be used in combination with various conventional encoding methods during the subsequent encoding process of the current block (710). For example, it can be utilized in differential coding.

[0126] FIG. 8 is a conceptual diagram illustrating the storage and use of block vectors in a template matching prediction method according to one embodiment. The template matching prediction method according to the present embodiment can be performed by a video decoder and / or video encoder disclosed herein.

[0127] When the prediction block is used in the template matching prediction method according to the present embodiment, the distance between the current block (810) and the prediction block (820) is defined as a block vector (830), which can be used in subsequent encoding and decoding. The block vector (830) can be stored for use in the template matching prediction method, as well as in copy encoding and decoding methods of intra blocks. In addition, the decoding (or encoding) of the next block (e.g., 840) of the current block (810) can be configured to refer to (850) the block vector. According to one embodiment of the present invention, the block vector may be a value determined by an operation in the same manner in the encoder and the decoder, respectively. In this case, the block vector may not be included in the encoded bit string.

[0128] Meanwhile, when template matching is performed, excessive computation in the restoration area can increase the complexity of the encoder / decoder. This can be due to the search range for template matching in the restoration area being too large or the number of pixels within the template being too large. Furthermore, an efficient method for storing the block vectors used in template matching prediction is needed.

[0129] A template matching prediction method according to one embodiment of the present invention can search for a prediction template within a search range of a restoration region by referencing (or using) some samples (i.e., pixels) within the template. This process of searching for a prediction template by selectively using some pixels within the originally referenced template can be referred to as downsampling.

[0130] In one aspect, the template matching prediction method can search for a prediction template using the selected samples as is.

[0131] In another aspect, the template matching prediction method can correct the selected samples by referring to the values ​​of the unselected samples, and search for a prediction template using the corrected samples.

[0132] Figure 9 is an example of downsampling of a template according to one embodiment of the present invention.

[0133] Referring to FIG. 9, a template matching prediction method according to an embodiment of the present invention may be configured to use surrounding samples adjacent to the left and top of a current block (910) as templates (920). At this time, only some samples (930) may be selectively used in calculations for template matching through downsampling. For example, according to an embodiment of the present invention, only samples selected through downsampling that selects only about half of the samples from the initial template, as shown in FIG. 9 (a), may be utilized in calculations for template matching. FIG. 9 (a) illustrates an example in which, when the sample thickness of the template (920) is 1 pixel thick, about half of the pixels are selected at a constant sampling interval (1 pixel interval in FIG. 9 (a)) for each sample belonging to the template (920). However, this method of selection through downsampling is not limited and may be determined in various ways depending on the implementation method. For example, as shown in (b) of Fig. 9, it can be configured so that approximately 1 / 4 of the pixels within the template (920) are selected at intervals of 3 pixels each. It is obvious that various downsampling methods, not shown, can be used. This can reduce complexity by eliminating the need for calculations for all pixels in the template.

[0134] According to another embodiment of the present invention, the downsampling may be configured to be performed differently depending on the size of the template and / or the block size. That is, the number of samples required for calculation may be adjusted depending on the size of the template or the size of the block.

[0135] FIG. 10 is an example diagram for downsampling of a template by block size according to one embodiment of the present invention.

[0136] A template matching prediction method according to one embodiment can adaptively determine whether to perform downsampling depending on the size of a block. For example, the template matching prediction method can be configured to include a step of not performing downsampling when the block size is small ((a) of FIG. 10)) and performing downsampling when the block size is large ((b) of FIG. 10).

[0137] A template matching prediction method according to another embodiment may be configured to include a step of performing downsampling with a relatively high density, for example, downsampling that selects one sample for every two samples, for blocks of a relatively small size, as in (b) of FIG. 10, and performing downsampling with a relatively low density, for example, downsampling that selects one sample for every four samples, for blocks of a relatively large size, as in (c) of FIG. 10.

[0138] A template matching prediction method according to another embodiment may be configured to vary the horizontal and / or vertical downsampling method depending on the aspect ratio of the block. For example, in the case of a block with a longer horizontal length, as in (d) of FIG. 10, the downsampling density on the left side of the shorter template may be configured to be relatively high, or the downsampling density on the top side of the longer template may be configured to be relatively low without performing downsampling.

[0139] The degree and method of downsampling shown in the examples described above are exemplary and are not limited by the present invention. For example, in large blocks, one sample may be used for about four samples or more, and in small blocks, one sample may be used for about two samples or all samples. In addition, various other downsampling ratios may be modified and applied as necessary for the implementation of the present invention.

[0140] According to another embodiment of the present invention, when a calculation for template matching is performed within a search range of the restoration area, the calculation method may be set for each compression unit such as a video sequence, a frame, a slice, a subpicture, a tile, a macroblock, or a coding tree unit (CTU), and may be configured to be transmitted from an encoder to a decoder, preferably through a symbol included in the syntax information of a bitstream. If only one calculation method is used, transmission is unnecessary. However, the possibility of applying different calculation methods is not excluded. For example, in one embodiment, a calculation method that adds the absolute value of the difference between pixels may be set to be used. In another embodiment, a calculation method using a method such as a Hadamard transform may be set to be used. In another embodiment, multiple modes or methods for downsampling during the calculation for template matching may be introduced. When multiple template matching calculation methods are implemented as described above, the encoder can record which of the calculation methods was applied to a specific sequence, frame, slice, subpicture, or tile as a symbol included in the syntax information in a bit string, and the decoder can be configured to read the symbol and derive and use the calculation method.

[0141] According to one embodiment of the present invention, when setting a search range for template matching prediction, the search range can be set to perform a search centered on a search range block vector generated from block vectors of surrounding blocks or block vectors in a block vector candidate list.

[0142] Fig. 11 is an exemplary diagram for setting a search range of a block vector according to one embodiment of the present invention.

[0143] Referring to FIG. 11, the adjacent blocks adjacent to the current block (1130) may include at least one left block (1132) and an upper block (1134). For example, each of the adjacent blocks (1132, 1134) may be a block having a block vector and / or a candidate list for operation of a block vector.

[0144] A method for searching a block vector according to one embodiment of the present invention may include a step of generating a search range block vector (1110) based on a current block (1130) by referring to a block vector (1115) of a left block (for example, by replicating it so that the direction and distance are the same by reflecting the distance between blocks). Then, a search range (1140) of a constant size in the up / down / left / right directions may be calculated based on a point (1117) indicated by the search range block vector (1110) (or centered on the point).

[0145] A method for searching a block vector according to another embodiment of the present invention may include a step of generating a search range block vector (1120) by referring to a block vector (1125) of an upper block, and a step of calculating a search range (1145) of a certain size based on a point (1127) pointed to by the block vector (1120). Through this, complexity can be reduced by not performing search calculations for all pixels of a frame, and it can also be made possible to ensure the accuracy of prediction by referring to adjacent block vectors.

[0146] According to another embodiment of the present invention, a method for searching a block vector may be configured such that, when setting a search range for template matching prediction, information about the search range is set for each compression unit such as a sequence, a frame, a slice, a subpicture, a tile, a macroblock, or a CTU, and preferably, information about the search range is transmitted from an encoder to a decoder via a symbol included in the syntax information of a bit string. For example, in one aspect, the search range may be defined as information including a horizontal size and a vertical size, and the size of the search range may be changed and applied for each compression unit. As another example, when selecting one of the block vector candidates of the surrounding blocks to generate the search range block vector, information about which block vector candidate corresponds to which order from the list of candidates was used to derive the search range block vector, and / or information about which block among the left and the top was referenced may be set for each compression unit and transmitted from the encoder to the decoder.

[0147] A method for searching a block vector according to another embodiment of the present invention may be configured to use a padding method that extends and uses values ​​belonging to the search range when a sample outside the search range needs to be referenced. For example, when a search is performed outside a compression unit such as a slice, frame, subpicture, tile, macroblock, or coding tree unit, the padding method may be configured to be used. Meanwhile, in another embodiment, when a search is required outside a compression unit such as a slice, frame, subpicture, tile, macroblock, or CTU, the search may be configured to be reset by considering it as a boundary.

[0148] In one aspect, the setting of the search range may be determined within the search range of other prediction techniques that may be included in the encoder / decoder, such as intra-block copying. For example, the setting of the search range may be configured to select a direction with a larger or smaller area compared to the search range for intra-block copying.

[0149] According to another embodiment of the present invention, the prediction vector for the template matching may be configured to use a block vector in a surrounding block or a block vector candidate list with separate correction.

[0150] FIG. 12 is a conceptual diagram of a method for determining a prediction vector based on a block vector according to one embodiment of the present invention.

[0151] Referring to Fig. 12, it is assumed that the optimal position (1250) where the prediction block (or a set of such samples) that most closely matches the current block (1230) exists is identified through a search for an area where a picture has been previously restored. An optimal prediction vector (1260) pointing to the optimal position (1250) may also be calculated. In one embodiment of the present invention, in order to determine the optimal position, in addition to matching between the templates, a comparison of samples in the current block and pixel samples in the restored area may be additionally performed, thereby reinforcing the optimality of the template. At this time, in expressing the optimal block vector (1260), the block vector (1215) of the neighboring block, in the example of Fig. 12, the left block (1232), may be referenced, for example, and the block vector (1215) may be copied so that the direction and distance are the same by reflecting the distance between blocks, thereby generating a reference prediction vector (1210) based on the current block (1230).

[0152] Next, information indicating the difference (1270) between the reference prediction vector and the optimal prediction vector may be expressed as information by a combination of the size of the vector, flag information, or index information, and at least one of the information listed above, and the information may be configured to be transmitted from the encoder to the decoder, preferably through a symbol included in the syntax of the bit string. For example, when expressed by the size of the vector, information describing the differential vector (1270) may be transmitted as a symbol. For another example, when expressed by a flag, the flag information may be transmitted as a symbol. For another example, when expressed by the index, index information for a table indicating multiple possibilities for the differential vector may be transmitted as a symbol.

[0153] In one embodiment of the present invention, the correction of the block vector may be configured to be performed only within a specified range. For example, the range for searching for an optimal block vector (1260) for the correction of the block vector may be configured to be performed only within a limited search range (e.g., this may refer to the symbol 1140 or 1145) as shown in FIG. 11. Of course, it is not limited to the example of FIG. 11 described above, and it is readily apparent that various methods for limiting the search range may be used in common.

[0154] According to one embodiment of the present invention, when storing a block vector used in template matching prediction, the current block may be divided into arbitrary block sizes such as 4X4, 8X8, 16X16, 32X32, 64X64, and so on and stored. In a video encoding process, a video may be divided and compressed into slices, frames, subpictures, tiles, macroblocks, CTUs, or any other compression units, and may be configured to be divided again into arbitrary block sizes and stored after the compression is performed. For example, a block vector may be stored every 4X4 block during current frame compression, and stored every 16X16 block after compression. In one embodiment, when storing multiple block vectors as one block, a representative block vector may be calculated and stored. In one embodiment, the resolution or storage unit of the block vector may be configured to be set differently and stored depending on intra or inter frame. In one embodiment, the compression may be performed on the current slice or frame or subpicture or tile or any arbitrary unit, and then re-stored at any block vector resolution. In one embodiment, if an optimal block vector or a corrected block vector using the current block exists, the block vector may be stored.

[0155] When the stored block vector is used in subsequent encoding and decoding processes, or when a previously stored block vector is used for template matching prediction of the current block, the resolution of the stored block vector may be considered and then scaled for use. For example, when the resolution of the stored block vector is relatively high, the resolution may be reduced using a shift operator. For another example, when the resolution of the stored block vector is relatively low, the resolution may be increased using a shift operator.

[0156] In one embodiment of the present invention, whether to apply a template matching prediction technique may be determined by considering at least one of the horizontal or vertical size of a block, its area, the number of pixels within the block, and / or information about surrounding blocks. In this case, a template corresponding to the left, top, or both left and top of the current block may be selected and used. In one embodiment, the method may also be configured to determine whether to use a combined template matching-based prediction technique with another prediction technique.

[0157] For example, according to one embodiment, if the width of a block is greater than a first threshold value and the height is greater than a second threshold value, the use of template matching may be restricted. As another example, if the width of a block is less than a third threshold value and the height is less than a fourth threshold value, the use of template matching may be restricted. As another example, if the number of pixels in a block is greater than or less than a fifth threshold value, the use of other techniques in combination with the template matching prediction technique may be restricted. As another example, if the area of ​​a block is greater than or less than a sixth threshold value, the use of other techniques in combination with the template matching prediction technique may be restricted. As an example of the restricted combination, it may mean that the combination of geometric segmentation prediction and template matching prediction is restricted in consideration of the conditions of the block.

[0158] According to one embodiment of the present invention, when template matching prediction is used in a chroma (which may refer to Cb / Cr) signal domain, at least one block vector may be copied as is from a block corresponding to the same position based on a luminance (which may refer to Y) signal and used as a block vector of the chrominance signal block. According to another embodiment, template matching for a chrominance block may be re-performed based on the block vector of the corresponding luminance block. According to another embodiment, template matching may be re-performed by setting a search range of template matching based on the block vector of the corresponding luminance block. According to another embodiment, samples in a chrominance block corresponding to an area indicated by a block vector of the corresponding luminance block may be referenced.

[0159] As described above, when a prediction block in the chrominance signal domain is inferred based on information of a luminance block, according to one embodiment of the present invention, samples pointed to by at least one block vector in a block at the same location as the luminance signal block may be used as candidate vectors. For example, one or more candidate samples may be configured to be weighted averaged to generate another candidate sample.

[0160]

[0161] Although the present invention has been described with reference to drawings and embodiments, as already mentioned above, it does not mean that the scope of protection of the present invention is limited to the drawings or embodiments presented above, and it will be understood that a person skilled in the relevant technical field can modify and change the present invention in various ways within a scope that does not depart from the spirit and scope of the present invention described in the claims of the present invention patent.

Claims

1. In a decryption method based on template matching performed by a decoder, A step of obtaining information about a template, which is a set of samples adjacent to the current block, from the restoration area of ​​the current picture; A step of performing template matching to search for a prediction template corresponding to the template within a search area included in the restoration area; a step of selecting a prediction block adjacent to the above prediction template; and A step of performing intra prediction decoding for the current block based on the above prediction block; including: A method characterized in that the template matching is performed using some samples within the template or using some portion of the search area.

2. In paragraph 1, The step of performing the above template matching is: a step of downsampling the above template; and A method comprising the step of searching for a predicted template location by comparing a sample of the downsampled template with a sample of the search area.

3. In paragraph 2, The above downsampling step is, A method comprising a step of adjusting at least one of whether to perform downsampling and a magnification for upper samples of the template based on the horizontal size of the current block.

4. In paragraph 2, The above downsampling step is, A method comprising a step of adjusting at least one of whether to perform downsampling and a magnification for left samples of the template based on the vertical size of the current block.

5. In either of paragraphs 3 or 4, The above downsampling step is, A method characterized in that it is executed based on downsampling symbol information derived from a bitstream.

6. In paragraph 1, The above search area is, A method characterized in that it is limited based on a prediction vector from the current block.

7. In paragraph 6, The above prediction vector is, A method characterized in that it is generated based on at least one reference prediction vector information of a surrounding block of the current block.

8. In paragraph 7, The above search area is, A method characterized in that it has a first sample width horizontally and a second sample width vertically, with the point pointed to by the above prediction vector as the center point.

9. In paragraph 8, A method, characterized in that at least one of the first sample width and the second sample width is derived from a bit string.

10. In paragraph 6, The above prediction vector is, A method characterized in that the current block is selected by an index from at least one block vector candidate among the surrounding blocks of the current block.

11. In paragraph 10, A method, characterized in that the above index is derived from a bit string.

12. In paragraph 6, The above prediction vector is, A method characterized in that it is generated based on at least one reference prediction vector information of a surrounding block of the current block and differential vector information indicating a difference from the reference prediction information.

13. In paragraph 6, A step of searching for an optimal prediction block position closest to the current block sample by comparing the current block sample with a sample of a search area included in the restoration area of ​​the image; further comprising; The above prediction vector is, A method characterized in that it is generated based on difference vector information indicating the difference between at least one reference prediction vector information of a surrounding block of the current block and optimal prediction vector information pointing to the optimal prediction block location.

14. In either of paragraphs 12 or 13, A method characterized in that the above differential vector information is derived from a bit string.

15. In paragraph 14, A method characterized in that the above difference vector information is designated as an index designating one of at least two predetermined values.

16. In paragraph 6, A method further comprising a step of storing the prediction vector by the decoder for use in a subsequent decoding process.

17. In paragraph 6, A step of generating the above prediction vector for at least one lower decoding unit; A step of designating at least one of the prediction vectors as a representative prediction vector for an upper decoding unit including the lower decoding unit; and A method further comprising a step of storing the representative prediction vector by the decoder.

18. In paragraph 1, A method further comprising: when performing the template matching in the chroma signal domain, generating a prediction vector based on at least one reference prediction vector corresponding to a block corresponding to the same position in the luminance signal domain based on the chroma signal domain.

19. In the decryption device, A template matching unit that obtains information about a template, which is a set of samples adjacent to a current block, from a restoration area of ​​a current picture, and performs template matching to search for a prediction template corresponding to the template within a search area included in the restoration area; and A prediction decoding unit that selects a prediction block adjacent to the prediction template and performs intra prediction decoding for the current block based on the prediction block; A device characterized in that the template matching is performed using some samples within the template or using some portion of the search area.

20. In the encoding device, A template matching unit that obtains information about a template, which is a set of samples adjacent to a current block, from an already encoded area of ​​the current picture, and performs template matching to search for a prediction template corresponding to the template within a search area included in the already encoded area; and A prediction encoding unit that selects a prediction block adjacent to the prediction template and performs intra prediction encoding for the current block based on the prediction block; A device characterized in that the template matching is performed using some samples within the template or using some portion of the search area.