Video encoding and decoding method, device, electronic device and storage medium
By using intra-block copy mode and template matching search technology in video encoding technology, the block vector of intra-block prediction is optimized, and the problem of low encoding efficiency in the prior art is solved, and more efficient video encoding is achieved.
Patent Information
- Application Number
- CN202280008397.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-29
- Filing Date
- 2022-08-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-08-30
AI Technical Summary
When existing video encoding technologies process intra-frame prediction, it is difficult to effectively utilize surrounding sample data and metadata, resulting in low encoding efficiency.
Intra-block copy (IBC) mode and template matching search technology are used to optimize the intra-block prediction block vector and improve coding efficiency by determining the initial block vector and correcting the block vector.
By optimizing block vectors, the encoding efficiency of video encoding is improved, redundant information is reduced, and bandwidth and storage requirements are reduced.
Smart Images

Figure CN116686292B_ABST
Abstract
Description
[0001] Incorporation by Reference
[0002] This application claims priority to U.S. Patent Application No. 17 / 898,454, filed on August 29, 2022, entitled “TEMPLATE MATCHING ON IBC MERGE CANDIDATES”, which claims priority to U.S. Provisional Application No. 63 / 239,767, filed on September 1, 2021, entitled “TEMPLATE MATCHING ON IBC MERGE CANDIDATES”. The disclosure of the prior application is hereby incorporated by reference in its entirety. Technical Field
[0003] This application describes embodiments that generally relate to video encoding and decoding. Background Art
[0004] The background description provided herein is intended to present the background of the present application as a whole. The extent to which the work of the presently named inventors described in the background section and various aspects of this specification is performed does not indicate that it is prior art at the time of filing this application, and it is never explicitly or implicitly admitted that it is prior art for this application.
[0005] Uncompressed digital video may include a series of pictures, each picture having a spatial dimension of, for example, 1920×1080 luma samples and associated chroma samples. The series of pictures has a fixed or variable picture rate (also informally referred to as a frame rate), such as 60 pictures per second or 60 Hz. Uncompressed video has very large bit rate requirements. For example, 1080p60 4:2:0 video (1920x1080 luma sample resolution, 60 Hz frame rate) with 8 bits per sample requires close to 1.5 Gbit / s of bandwidth. One hour of such video would require over 600 GB of storage space.
[0006] One goal of video encoding and decoding is to reduce redundant information in the input video signal through compression. Video compression can help reduce the bandwidth and / or storage space requirements mentioned above, in some cases by two or more orders of magnitude. Both lossless and lossy compression, as well as combinations of the two, can be used. Lossless compression refers to techniques that reconstruct an exact replica of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may not be exactly the same as the original signal, but the distortion between the original and the reconstructed signal is small enough that the reconstructed signal can be used for the intended application. Lossy compression is widely used for video. The amount of distortion allowed depends on the application. For example, users of some consumer streaming applications may tolerate higher distortion than users of television applications. The achievable compression ratio reflects that higher allowed / tolerable distortion produces higher compression ratios.
[0007] Video encoders and decoders may utilize several broad categories of techniques including, for example: motion compensation, transforms, quantization, and entropy coding.
[0008] Video codec techniques may include known intra-frame coding techniques. In intra-frame coding, sample values are represented without reference to samples or other data of previously reconstructed reference pictures. In some video codecs, pictures are spatially subdivided into blocks of samples. When all sample blocks are encoded in intra-frame mode, the picture may be an intra-frame picture. Intra-frame pictures and their derivatives (e.g., independent decoder refresh pictures) may be used to reset decoder states, and may therefore be used as the first picture in a coded video bitstream and video session, or as a still image. Samples of intra-frame blocks may be used for transformation, and transform coefficients may be quantized before entropy coding. Intra-frame prediction may be a technique for minimizing sample values in a pre-transform domain. In some cases, the smaller the DC value after transformation, and the smaller the AC coefficient, the fewer bits are needed to represent the block after entropy coding at a given quantization step size.
[0009] Conventional intra-frame coding, as known from coding techniques such as MPEG-2, does not use intra-frame prediction. However, some newer video compression techniques include techniques that attempt to derive a block of data from, for example, surrounding sample data and / or metadata, which is obtained during spatially adjacent encoding and / or decoding and before the decoding order. Such techniques have subsequently been referred to as "intra-frame prediction" techniques. It should be noted that, at least in some cases, intra-frame prediction uses only reference data of the current picture being reconstructed, and not reference data of reference pictures.
[0010] There can be many different forms of intra-frame prediction. When more than one such technique can be used in a given video coding technique, the techniques used can be encoded as intra-frame prediction modes. In some cases, a mode can have sub-modes and / or parameters, and these modes can be encoded separately or included in a mode codeword. Which codeword is used for a given mode, sub-mode and / or parameter combination affects the coding efficiency gain through intra-frame prediction, and therefore the entropy coding technique used to convert the codeword into a bitstream.
[0011] H.264 introduced an intra prediction mode, which was improved in H.265 and further improved in newer coding techniques such as the Joint Exploitation Model (JEM), Versatile Video Coding (VVC), and Benchmark Set (BMS). A prediction block can be formed by using neighboring sample values belonging to samples that are already available. In some examples, the sample values of neighboring samples are copied to the prediction block in a certain direction in some examples. A reference to the direction used can be encoded in the bitstream, or it can be predicted itself.
[0012] Reference Figure 1A, a subset of the known 8 prediction directions from the 33 possible prediction directions of H.265 (corresponding to the 33 angular modes of the 35 intra modes) is depicted in the lower right. The point (101) where the arrows converge represents the sample being predicted. The arrows represent the direction in which the sample is being predicted. For example, arrow (102) indicates that sample (101) is predicted based on one or more samples at the upper right that are at an angle of 45 degrees to the horizontal. Similarly, arrow (103) indicates that sample (101) is predicted based on one or more samples at the lower left that are at an angle of 22.5 degrees to the horizontal.
[0013] Still reference Figure 1A , a square block (104) including 4×4 samples is shown in the upper left (indicated by the thick dashed line). The square block (104) includes 16 samples, each of which is labeled with "S" and its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S2 is the second sample in the Y dimension (starting from the top) and the first sample in the X dimension (starting from the left). Similarly, sample S44 is the fourth sample in the block (104) in both the Y dimension and the X dimension. Since the block is a 4×4 size sample, S44 is located in the lower right corner. Reference samples following a similar numbering scheme are also shown. Reference samples are labeled with "R" and their Y position (e.g., row index) and X position (e.g., column index) relative to the block (104). In H.264 and H.265, the prediction samples are adjacent to the block being reconstructed, so there is no need to use negative values.
[0014] Intra-picture prediction can be performed by copying reference sample values from neighboring samples occupied by a signaled prediction direction. For example, assume that the encoded video bitstream includes signaling that indicates, for this block, a prediction direction consistent with arrow (102), i.e., predicting samples based on one or more prediction samples to the upper right at a 45 degree angle to the horizontal. In this case, samples S41, S32, S23, and S14 are predicted based on the same reference sample R05. Sample S44 is predicted based on reference sample R08.
[0015] In some cases, for example by interpolation, the values of multiple reference samples may be combined in order to calculate the reference sample, particularly when the direction is not divisible by 45 degrees.
[0016] As video coding techniques have evolved, the number of possible directions has increased. In H.264 (2003), nine different directions could be represented. This increased to 33 in H.265 (2013) and JEM / VVC / BMS, and at the time of this application, up to 65 directions can be supported. Experiments have been conducted to identify the most likely directions, and certain techniques in entropy coding are used to represent those possible directions using a small number of bits, accepting some penalty for less likely directions. Additionally, the direction itself can sometimes be predicted based on neighboring directions used in adjacent, already decoded blocks.
[0017] Figure 1B A schematic diagram (110) depicting 65 intra prediction directions according to JEM is shown to illustrate that the number of prediction directions increases over time.
[0018] The mapping of the intra prediction direction bits in the coded video bitstream representing the direction may vary from one video coding technique to another, and may, for example, range from a simple direct mapping of the prediction direction of the intra prediction mode to the codeword, to complex adaptive schemes including the most probable mode and similar techniques. However, in all cases, there may be certain directions in the video content that are statistically less likely to occur than other directions. Since the goal of video compression is to reduce redundancy, in a well-functioning video coding technique, those less likely directions will be represented using a larger number of bits than more likely directions.
[0019] Motion compensation may be a lossy compression technique and may involve a technique where a block of sample data from a previously reconstructed picture or part of a reconstructed picture (reference picture) is used for prediction of a newly reconstructed picture or part of a picture after being spatially shifted in the direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, where the third dimension indicates the reference picture in use (the latter may indirectly be the temporal dimension).
[0020] In some video compression techniques, the MV applied to a region of sample data can be predicted based on other MVs, such as those MVs associated with another region of sample data that is spatially adjacent to the region being reconstructed and that precede the MV in decoding order. Doing so can greatly reduce the amount of data required to encode the MV, thereby eliminating redundant information and increasing the amount of compression. MV prediction can be done effectively, for example, when encoding an input video signal derived from a camera (called natural video), there is a statistical probability that regions larger than the region to which a single MV applies will move in a similar direction, so in some cases, similar motion vectors derived from MVs of neighboring regions can be used for prediction. This results in the MV found for a given region being similar or identical to the MV predicted from the surrounding MVs, and after entropy coding, it can be represented with fewer bits than the number of bits used when the MV is directly encoded. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, MV prediction itself may be lossy, for example due to rounding errors when calculating predicted values based on several surrounding MVs.
[0021] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T Recommendation H.265, "High Efficiency Video Coding", December 2016). Among the multiple MV prediction mechanisms specified by H.265, this application describes a technique referred to below as "spatial merging".
[0022] Referring to FIG. 2 , the current block ( 201 ) includes samples that have been discovered by the encoder during the motion search process, and the samples can be predicted based on the previous block of the same size that has generated a spatial offset. In addition, the MV can be derived from metadata associated with one or more reference pictures instead of encoding the MV directly. For example, the MV is derived from the metadata of the nearest reference picture (in decoding order) using the MV associated with any of the five surrounding samples A0, A1 and B0, B1, B2 (corresponding to 202 to 206, respectively). In H.265, MV prediction can use the prediction value of the same reference picture also used by the neighboring blocks. Summary of the invention
[0023] Various aspects of the present disclosure provide methods, devices, electronic devices and storage media for video encoding and decoding. The method for video decoding includes: in response to predicting a current block in an intra-block copy (IBC) mode, determining an initial block vector, the initial block vector being used to predict the current block in a current coding tree unit (CTU); performing a template matching search based on the initial block vector to determine a modified block vector, the modified block vector pointing to a reference block in a picture where the current block is located; and reconstructing the current block based on the reference block. In some examples, the initial block vector is determined based on a merge index included in an encoded video bitstream. The merge index indicates a block vector candidate in an IBC merge candidate list, the IBC merge candidate list including multiple IBC candidates for an IBC merge mode.
[0024] In an example, the method further includes parsing a first flag indicating the IBC merge mode from the encoded video stream, and parsing a second flag from the encoded video stream, wherein the second flag indicates whether to apply the template matching search to the block vector candidate.
[0025] In another example, the method further includes parsing a first flag indicating the IBC merge mode from the encoded video bitstream and performing a template matching search, wherein the template matching search is applied to block vector candidates of each block in the CTU predicted in the IBC merge mode.
[0026] In some examples, the method further includes constructing the IBC merge candidate list, wherein the IBC merge candidate list includes at least a first block vector candidate pointing to a first position outside the IBC reference region.
[0027] In one example, determining the initial block vector based on a merge index further includes: determining a nearest position to the first position in the IBC reference area in response to the merge index indicating the first block vector candidate, and determining the initial block vector pointing to the nearest position.
[0028] In one example, to construct the IBC merge candidate list, performing the template matching search further includes: in response to determining that the template matching search region of the first block vector candidate at least partially overlaps with the IBC reference region, inserting the first block vector candidate into the IBC merge candidate list.
[0029] In some examples, the IBC reference area includes a reconstructed portion of the current CTU and an area of a left CTU, the reconstructed portion and the area of the left CTU are cached in a storage space having a size for storing the CTU.
[0030] In some examples, portions of the template matching search area outside of the IBC reference area are excluded from the template matching search.
[0031] Aspects of the present disclosure also provide a non-transitory computer-readable medium storing instructions, which, when executed by a computer, causes the computer to execute a method according to the present application. The present disclosure also provides a method for video encoding, comprising: in response to predicting a current block in an intra-block copy (IBC) mode, determining an initial block vector, the initial block vector being used to predict the current block in a current coding tree unit (CTU); performing a template matching search based on the initial block vector to determine a modified block vector, the modified block vector pointing to a reference block in a picture where the current block is located, the reference block being used to reconstruct the current block; signaling a first flag and a merge index in an encoded video bitstream, wherein the first flag indicates the IBC merge mode, the merge index indicates a block vector candidate in an IBC merge candidate list, and the IBC merge candidate list includes multiple IBC candidates for the IBC merge mode. The present disclosure also provides an electronic device, comprising: a memory storing instructions; a processor for executing the instructions to implement a method according to the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Other features, properties, and various advantages of the disclosed subject matter will be more apparent from the following detailed description and accompanying drawings.
[0033] Figure 1A is a schematic diagram of an exemplary subset of intra prediction direction modes.
[0034] Figure 1B is a diagram of exemplary intra prediction directions.
[0035] FIG. 2 is a schematic diagram of spatial merging candidates of a current block and its surroundings in one example.
[0036] Figure 3 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.
[0037] Figure 4 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.
[0038] Figure 5 is a schematic diagram of a simplified block diagram of a decoder according to an embodiment.
[0039] Figure 6 is a schematic diagram of a simplified block diagram of an encoder according to an embodiment.
[0040] Figure 7 A block diagram of an encoder according to another embodiment is shown.
[0041] Figure 8A block diagram of a decoder according to another embodiment is shown.
[0042] Fig. 9 An example of intra block copy according to an embodiment of the present disclosure is shown.
[0043] Fig.10 An example of intra block copy according to an embodiment of the present disclosure is shown.
[0044] Fig.11 An example of intra block copy according to an embodiment of the present disclosure is shown.
[0045] Figures 12A-12D An example of intra block copy according to an embodiment of the present disclosure is shown.
[0046] Fig.13 An example for a template matching search in some embodiments is shown.
[0047] Fig.14 A table showing search patterns used for adaptive motion vector resolution (AMVR) and merge mode in some examples.
[0048] Fig.15 An example of pseudocode used for template matching in some embodiments is shown.
[0049] Fig.16 An example of prediction in intra block copy mode according to an embodiment of the present disclosure is shown.
[0050] Fig.17 A flow chart outlining a method according to some embodiments of the present disclosure is shown.
[0051] Fig.18 A flow chart outlining another method according to some embodiments of the present disclosure is shown.
[0052] Fig.19 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION
[0053] Figure 3 3 is a simplified block diagram of a communication system (300) according to an embodiment disclosed in the present application. The communication system (300) includes a plurality of terminal devices, which can communicate with each other through, for example, a network (350). For example, the communication system (300) includes a first terminal device (310) and a second terminal device (320) interconnected through the network (350). Figure 3In an embodiment of the present invention, the first terminal device (310) and the second terminal device (320) perform unidirectional data transmission. For example, the first terminal device (310) may encode video data (e.g., a video picture stream collected by the terminal device (310)) for transmission to the second terminal device (320) via the network (350). The encoded video data is transmitted in the form of one or more encoded video code streams. The second terminal device (320) may receive the encoded video data from the network (350), decode the encoded video data to restore the video data, and display the video picture based on the restored video data. Unidirectional data transmission is more common in applications such as media services.
[0054] In another embodiment, the communication system (300) includes a third terminal device (330) and a fourth terminal device (340) that perform bidirectional transmission of encoded video data, which can occur, for example, during a video conference. For bidirectional data transmission, each of the third terminal device (330) and the fourth terminal device (340) can encode video data (e.g., a video picture stream collected by the terminal device) to transmit to the other terminal device of the third terminal device (330) and the fourth terminal device (340) through a network (350). Each of the third terminal device (330) and the fourth terminal device (340) can also receive the encoded video data transmitted by the other terminal device of the third terminal device (330) and the fourth terminal device (340), and can decode the encoded video data to restore the video data, and can display the video picture on an accessible display device based on the restored video data.
[0055] exist Figure 3 In the embodiment of the present invention, the first terminal device (310), the second terminal device (320), the third terminal device (330) and the fourth terminal device (340) may be servers, personal computers and smart phones, but the principles disclosed in the present application may not be limited thereto. The embodiments disclosed in the present application are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. The network (350) represents any number of networks that transmit encoded video data between the first terminal device (310), the second terminal device (320), the third terminal device (330) and the fourth terminal device (340), including, for example, wired (wired) and / or wireless communication networks. The communication network (350) may exchange data in circuit switching and / or packet switching channels. The network may include a telecommunications network, a local area network, a wide area network and / or the Internet. For the purpose of the present application, unless explained below, the architecture and topology of the network (350) may be irrelevant to the operation disclosed in the present application.
[0056] As an example, Figure 4The video encoder and video decoder are shown in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0057] The streaming system may include an acquisition subsystem (413), which may include a video source (401) such as a digital camera, which creates an uncompressed video picture stream (402). In an embodiment, the video picture stream (402) includes samples taken by a digital camera. Compared to the encoded video data (404) (or the encoded video bitstream), the video picture stream (402) is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream (402) can be processed by an electronic device (420), which includes a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream (402), the encoded video data (404) (or the encoded video bitstream (404)) is depicted as a thin line to emphasize the lower amount of data of the encoded video data (404) (or the encoded video bitstream (404)), which can be stored on the streaming server (405) for future use. One or more streaming client subsystems, such as Figure 4 The client subsystem (406) and the client subsystem (408) in the video transmission system can access the streaming server (405) to retrieve the copy (407) and the copy (409) of the encoded video data (404). The client subsystem (406) may include, for example, a video decoder (410) in the electronic device (430). The video decoder (410) decodes the incoming copy (407) of the encoded video data and generates an output video picture stream (411) that can be presented on a display (412) (e.g., a display screen) or another presentation device (not depicted). In some streaming transmission systems, the encoded video data (404), the video data (407), and the video data (409) (e.g., a video bitstream) can be encoded according to certain video encoding / compression standards. Examples of these standards include ITU-T H.265. In an embodiment, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and the present application can be used in the context of the VVC standard.
[0058] It should be noted that the electronic device (420) and the electronic device (430) may include other components (not shown). For example, the electronic device (420) may include a video decoder (not shown), and the electronic device (430) may also include a video encoder (not shown).
[0059] Figure 5 is a block diagram of a video decoder (510) according to an embodiment disclosed in the present application. The video decoder (510) may be provided in an electronic device (530). The electronic device (530) may include a receiver (531) (e.g., a receiving circuit). The video decoder (510) may be used to replace Figure 4 A video decoder (410) of an embodiment.
[0060] The receiver (531) may receive one or more encoded video sequences to be decoded by the video decoder (510); in the same or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (501), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (531) may receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective consuming entities (not shown). The receiver (531) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (515) may be coupled between the receiver (531) and the entropy decoder / parser (520) (hereinafter referred to as "parser (520)"). In some applications, the buffer memory (515) is part of the video decoder (510). In other cases, the buffer memory (515) may be provided external to the video decoder (510) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (510) to prevent network jitter, for example, and another buffer memory (515) may be configured inside the video decoder (510) to handle broadcast timing, for example. When the receiver (531) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (515), or the buffer memory may be made smaller. Of course, in order to use on a service packet network such as the Internet, a buffer memory (515) may also be required, and the buffer memory may be relatively large and have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (510).
[0061] The video decoder (510) may include a parser (520) to reconstruct symbols (521) from the encoded video sequence. The types of symbols include information used to manage the operation of the video decoder (510) and potential information used to control a display device such as a display device (512) (e.g., a display screen) that is not part of the electronic device (530) but can be coupled to the electronic device (530), such as Figure 5 As shown in . The control information for the display device may be a parameter set fragment (not indicated) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (520) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and the like. The parser (520) may extract a subgroup parameter set of at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (520) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, and so on.
[0062] The parser (520) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (515), thereby creating symbols (521).
[0063] Depending on the type of coded video picture or portion of coded video picture (e.g., inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (521) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (520) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (520) and the multiple units below is not described.
[0064] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into several functional units as described below. In a practical embodiment operating under commercial constraints, many of these units interact closely with each other and can be integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.
[0065] The first unit is a sealer / inverse transform unit (551). The sealer / inverse transform unit (551) receives quantized transform coefficients as symbols (521) from the parser (520) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (551) can output a block including sample values, which can be input into an aggregator (555).
[0066] In some cases, the output samples of the scaler / inverse transform unit (551) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) generates surrounding blocks of the same size and shape as the block being reconstructed using reconstructed information extracted from a current picture buffer (558). For example, the current picture buffer (558) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (555) adds the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551) on a per-sample basis.
[0067] In other cases, the output samples of the scaler / inverse transform unit (551) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (553) may access the reference picture memory (557) to extract samples for prediction. After the extracted samples are motion compensated according to the symbols (521), these samples may be added to the output of the scaler / inverse transform unit (551) (in this case referred to as residual samples or residual signals) by the aggregator (555) to generate output sample information. The acquisition of the predicted samples by the motion compensated prediction unit (553) from the address in the reference picture memory (557) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (553) in the form of the symbols (521), for example, including X, Y and reference picture components. Motion compensation may also include interpolation of sample values extracted from the reference picture memory (557) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.
[0068] The output samples of the aggregator (555) may be employed by various loop filtering techniques in a loop filter unit (556). The video compression techniques may include in-loop filter techniques controlled by parameters included in the encoded video sequence (also referred to as the encoded video bitstream) and available to the loop filter unit (556) as symbols (521) from the parser (520). However, in other embodiments, the video compression techniques may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of an encoded picture or encoded video sequence, as well as to previously reconstructed and loop filtered sample values.
[0069] The output of the loop filter unit (556) may be a sample stream that may be output to a display device (512) and stored in a reference picture memory (557) for subsequent inter-picture prediction.
[0070] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (520)), the current picture buffer (558) may become part of the reference picture memory (557), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.
[0071] The video decoder (510) may perform decoding operations according to a predetermined video compression technique, such as in the ITU-T H.265 standard. The encoded video sequence may conform to the syntax specified by the video compression technique or standard used in the sense that the encoded video sequence follows the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technique or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technique or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and the metadata of the HRD buffer management signaled in the encoded video sequence.
[0072] In an embodiment, the receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be part of the encoded video sequence. The additional data may be used by the video decoder (510) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0073] Figure 6 6 is a block diagram of a video encoder (603) according to an embodiment disclosed in the present application. The video encoder (603) is provided in an electronic device (620). The electronic device (620) includes a transmitter (640) (e.g., a transmission circuit). The video encoder (603) can be used to replace Figure 4 A video encoder (403) in an embodiment.
[0074] The video encoder (603) can be used to obtain the video source (601) (not Figure 6 In another embodiment, the video source (601) is a part of the electronic device (620) to receive video samples, and the video source can collect video images to be encoded by the video encoder (603). In another embodiment, the video source (601) is a part of the electronic device (620).
[0075] The video source (601) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (603), wherein the digital video sample stream may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (601) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (601) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, wherein each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on samples.
[0076] According to an embodiment, the video encoder (603) may encode and compress pictures of a source video sequence into an encoded video sequence (643) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (650). In some embodiments, the controller (650) controls other functional units as described below and is functionally coupled to these units. For the sake of simplicity, coupling is not indicated in the figure. The parameters set by the controller (650) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (650) can be used to have other suitable functions that are related to the video encoder (603) optimized for a certain system design.
[0077] In some embodiments, the video encoder (603) operates in an encoding loop. As a simple description, in embodiments, the encoding loop may include a source encoder (630) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data (because in the video compression technology considered in this application, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (634). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.
[0078] The operation of the "local" decoder (633) can be combined with the above Figure 5 The "remote" decoder described in detail for the video decoder (510) is identical. However, additional brief reference is made to Figure 5 , when symbols are available and the entropy encoder (645) and parser (520) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (510), including the buffer memory (515) and the parser (520), may not be fully implemented in the local decoder (633).
[0079] At this point, it can be observed that any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. For this reason, the present application focuses on decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only needed in certain areas and is provided below.
[0080] During operation, in some embodiments, the source encoder (630) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this manner, the encoding engine (632) encodes the differences between pixel blocks of the input picture and pixel blocks of a reference picture that may be selected as a prediction reference for the input picture.
[0081] The local video decoder (633) may decode the encoded video data of the picture that may be designated as the reference picture based on the symbol created by the source encoder (630). The operation of the encoding engine (632) may be a lossy process. When the encoded video data is available at the video decoder ( Figure 6 When the video sequence is decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (633) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture cache (634). In this way, the video encoder (603) may store a copy of the reconstructed reference picture locally that has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the remote video decoder.
[0082] The predictor (635) may perform a prediction search for the encoding engine (632). That is, for a new picture to be encoded, the predictor (635) may search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (635) may operate pixel-by-pixel based on sample blocks to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (635), it may be determined that the input picture may have prediction references taken from a plurality of reference pictures stored in the reference picture memory (634).
[0083] The controller (650) may manage encoding operations of the source encoder (630), including, for example, setting parameters and subgroup parameters for encoding video data.
[0084] The outputs of all the above functional units may be entropy encoded in an entropy encoder (645). The entropy encoder (645) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby converting the symbols into a coded video sequence.
[0085] The transmitter (640) may buffer the encoded video sequence created by the entropy encoder (645) in preparation for transmission over a communication channel (660), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (640) may combine the encoded video data from the video encoder (603) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).
[0086] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:
[0087] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of the variations of I pictures and their corresponding applications and features.
[0088] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values for each block.
[0089] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstruction of a single block.
[0090] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined according to the coding allocation applied to the block's corresponding picture. For example, blocks of an I picture may be non-predictively coded, or the blocks may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. Blocks of pixels of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. Blocks of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.
[0091] The video encoder (603) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.
[0092] In an embodiment, the transmitter (640) may transmit additional data when transmitting the encoded video. The source encoder (630) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0093] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an embodiment, a particular picture being encoded / decoded is divided into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.
[0094] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and future in display order, respectively). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. Specifically, the block may be predicted by a combination of the first reference block and the second reference block.
[0095] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.
[0096] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in blocks. For example, according to the HEVC standard, pictures in a video picture sequence are divided into coding tree units (CTUs) for compression, and the CTUs in the pictures have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), which are a luminance CTB and two chrominance CTBs. Furthermore, each CTU can be split into one or more coding units (CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In an embodiment, each CU is analyzed to determine the prediction type for the CU, such as an inter-prediction type or an intra-prediction type. In addition, depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luminance prediction block (PB) and two chrominance PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luminance prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values (e.g., luminance values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.
[0097] Figure 7 is a diagram of a video encoder (703) according to another embodiment disclosed in the present application. The video encoder (703) is used to receive a processed block (e.g., a prediction block) of sample values in a current video picture in a video picture sequence, and encode the processed block into an encoded picture that is part of an encoded video sequence. In this embodiment, the video encoder (703) is used to replace Figure 4A video encoder (403) in an embodiment.
[0098] In an HEVC embodiment, a video encoder (703) receives a matrix of sample values for a processing block, such as a prediction block of 8×8 samples. The video encoder (703) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to encode the processing block. When encoding the processing block in intra mode, the video encoder (703) may use intra prediction techniques to encode the processing block into an encoded picture; and when encoding the processing block in inter mode or bidirectional prediction mode, the video encoder (703) may use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, in which a motion vector is derived from one or more motion vector predictors without the aid of an encoded motion vector component external to the predictor. In some other video encoding techniques, there may be a motion vector component applicable to the subject block. In an embodiment, the video encoder (703) includes other components, such as a mode decision module (not shown) for determining the processing block mode.
[0099] exist Figure 7 In an embodiment of the present invention, the video encoder (703) includes: Figure 7 Shown are an inter-frame encoder (730), an intra-frame encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a common controller (721), and an entropy encoder (725) coupled together.
[0100] The inter-frame encoder (730) is used to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some embodiments, the reference picture is a decoded reference picture decoded based on the encoded video information.
[0101] The intra-frame encoder (722) is used to receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra-frame prediction information (e.g., intra-frame prediction direction information according to one or more intra-frame coding techniques). In an embodiment, the intra-frame encoder (722) also calculates an intra-frame prediction result (e.g., a predicted block) based on the intra-frame prediction information and a reference block in the same picture.
[0102] The general controller (721) is used to determine the general control data and control other components of the video encoder (703) based on the general control data. In an embodiment, the general controller (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, when the mode is intra mode, the general controller (721) controls the switch (726) to select the intra mode result for use by the residual calculator (723) and controls the entropy encoder (725) to select intra prediction information and add the intra prediction information to the bitstream; and when the mode is inter mode, the general controller (721) controls the switch (726) to select the inter prediction result for use by the residual calculator (723) and controls the entropy encoder (725) to select the inter prediction information and add the inter prediction information to the bitstream.
[0103] The residual calculator (723) is used to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (722) or the inter-frame encoder (730). The residual encoder (724) is used to operate based on the residual data to encode the residual data to generate a transform coefficient. In an embodiment, the residual encoder (724) is used to convert the residual data from the time domain to the frequency domain and generate a transform coefficient. The transform coefficient is then processed by quantization to obtain a quantized transform coefficient. In various embodiments, the video encoder (703) also includes a residual decoder (728). The residual decoder (728) is used to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra-frame encoder (722) and the inter-frame encoder (730). For example, the inter-frame encoder (730) can generate a decoded block based on the decoded residual data and the inter-frame prediction information, and the intra-frame encoder (722) can generate a decoded block based on the decoded residual data and the intra-frame prediction information. The decoded blocks are appropriately processed to generate a decoded picture, and in some embodiments, the decoded picture may be buffered in a memory circuit (not shown) and used as a reference picture.
[0104] The entropy encoder (725) is used to format the code stream to produce an encoded block. The entropy encoder (725) generates various information according to a suitable standard such as the HEVC standard. In an embodiment, the entropy encoder (725) is used to obtain general control data, selected prediction information (such as intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the code stream. It should be noted that according to the disclosed subject matter, when the block is encoded in the inter-frame mode or the merge sub-mode of the bidirectional prediction mode, there is no residual information.
[0105] Figure 8FIG. 8 is a diagram of a video decoder (810) according to another embodiment disclosed in the present application. The video decoder (810) is used to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an embodiment, the video decoder (810) is used to replace Figure 4 A video decoder (410) of an embodiment.
[0106] exist Figure 8 In one embodiment, the video decoder (810) includes: Figure 8 An entropy decoder (871), an inter-frame decoder (880), a residual decoder (873), a reconstruction module (874) and an intra-frame decoder (872) coupled together are shown in FIG.
[0107] The entropy decoder (871) may be used to reconstruct certain symbols from the encoded picture, which represent syntax elements constituting the encoded picture. Such symbols may include, for example, a mode for encoding the block (e.g., intra mode, inter mode, bidirectional prediction mode, a merged sub-mode of the latter two, or another sub-mode), prediction information (e.g., intra prediction information or inter prediction information) that may identify certain samples or metadata for prediction by the intra decoder (872) or the inter decoder (880), respectively, residual information in the form of, for example, quantized transform coefficients, and the like. In an embodiment, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (880); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (872). The residual information may be inverse quantized and provided to the residual decoder (873).
[0108] The inter-frame decoder (880) is used to receive the inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information.
[0109] The intra-frame decoder (872) is used to receive intra-frame prediction information and generate a prediction result based on the intra-frame prediction information.
[0110] The residual decoder (873) is used to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (873) may also require some control information (to obtain the quantizer parameter QP), and this information can be provided by the entropy decoder (871) (the data path is not indicated because this is only low-volume control information).
[0111] The reconstruction module (874) is used to combine the residual output by the residual decoder (873) with the prediction result (which can be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which can be part of a reconstructed picture, which in turn can be part of a reconstructed video. It should be noted that other suitable operations such as deblocking operations can be performed to improve visual quality.
[0112] It should be noted that the video encoder (403), video encoder (603) and video encoder (703) and video decoder (410), video decoder (510) and video decoder (810) may be implemented using any suitable technology. In an embodiment, the video encoder (403), video encoder (603) and video encoder (703) and video decoder (410), video decoder (510) and video decoder (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (403), video encoder (603) and video encoder (703) and video decoder (410), video decoder (510) and video decoder (810) may be implemented using one or more processors that execute software instructions.
[0113] Block-based compensation can be used for inter-frame prediction and intra-frame prediction. For inter-frame prediction, block-based compensation based on different pictures is called motion compensation. Block-based compensation can also be performed based on previously reconstructed areas within the same picture, such as in intra-frame prediction. Block-based compensation based on reconstructed areas within the same picture is called intra-frame image block compensation, current picture referencing (CPR) or intra-frame block copy (IBC). The displacement vector indicating the offset between the current block and the reference block (also known as the prediction block) in the same picture is called a block vector (BV), where the current block can be encoded / decoded based on the reference block. Unlike the motion vector in motion compensation, which can be any value (positive or negative in the x or y direction), BV has several constraints to ensure that the reference block is available and has been reconstructed. In addition, in some examples, some reference areas that are tile boundaries, slice boundaries, or wavefront trapezoid boundaries are excluded for parallel processing considerations.
[0114] In some examples, the IBC mode can be used to significantly improve the coding efficiency of screen content material. Typically, the IBC mode can be implemented as a block-level coding mode. On the encoder side, the encoder can perform block matching (BM) to find the best block vector for each CU. In some examples, on the encoder side, hash-based motion estimation (also known as hash-based search) is performed for the CU in the IBC mode. The encoder can perform rate-distortion (RD) checks on blocks with a width or height no greater than 16 luminance samples. For non-merge mode, a block vector search is first performed using a hash-based search. If the hash search does not return a valid candidate, a local search based on block matching can be performed.
[0115] In some examples, in a hash-based search, the hash key match (32-bit CRC) between the current block and the reference block is extended to all allowed block sizes in the current picture. The hash key calculation for each position in the current picture can be based on a 4×4 sub-block. For a current block of a larger size, when all hash keys of all 4×4 sub-blocks match the hash keys in the corresponding reference positions, it can be determined that the hash key matches the hash key of the reference block. If the hash keys of multiple reference blocks are found to match the hash key of the current block, the block vector cost of each of the matching reference blocks can be calculated, and then one matching reference block with the minimum cost is selected as the result of the hash-based search.
[0116] In some examples, the block matching search searches a local area of the current block. For example, in a block matching search, the search range is set to cover both the previous CTU and the current CTU.
[0117] In some implementation examples, the resolution of the block vector is constrained to integer positions. In some other systems, the block vector may be allowed to point to fractional positions. In some examples, the luminance block vector of the IBC-encoded CU is in integer precision. The chrominance block vector may also be rounded to integer precision. In some examples, the IBC mode may be combined with adaptive motion vector resolution (AMVR) and may be switched between 1 pixel (pel) and 4 pixel motion vector precision. In some implementation examples, the IBC mode is treated as a third prediction mode different from the intra prediction mode or the inter prediction mode. In some examples, the IBC mode is applicable to CUs whose width and height are both less than or equal to 64 luminance samples.
[0118] The encoding of block vectors can be explicit or implicit. In explicit mode, the BV difference between the block vector and its predictor is signaled. In implicit mode, the block vector is recovered from a predictor (called a block vector predictor) without using the BV difference, in a manner similar to the motion vector in merge mode. In some examples, the explicit mode may be referred to as a non-merged BV prediction mode or an IBC AMVP (Advanced Motion Vector Prediction) mode. In some examples, the implicit mode may be referred to as a merged BV prediction mode, an IBC merge mode, or an IBC skip mode.
[0119] The IBC mode can vary. In the example, the IBC mode is treated as a third mode different from the intra prediction mode and the inter prediction mode. Accordingly, the BV prediction in the implicit mode (or IBC merge mode) and the explicit mode (IBC AMVP mode) is distinguished from the conventional inter mode. In some examples, a separate merge candidate list can be defined for the IBC mode, where the entries in the separate merge candidate list are BVs. Similarly, in the example, the BV prediction candidate list in the IBC explicit mode (IBC AMVP mode) includes only BVs. The general rule applied to the two lists (i.e., a separate merge candidate list for the IBC merge mode and a BV prediction candidate list for the IBC AMVP mode) is that, with respect to the candidate derivation process, the two lists can follow the same logic as the merge candidate list used in the conventional merge mode (for inter prediction) or the advanced motion vector prediction (AMVP) predictor list used in the conventional AMVP mode (for inter prediction). For example, five spatial neighboring positions (eg, A0, A1 and B0, B1, B2 in FIG. 2 ) are accessed for an IBC merge mode (eg, HEVC or VVC inter-frame merge mode) to derive a separate merge candidate list for the IBC merge mode.
[0120] In an implementation example, for a CU, a block-level flag is used to signal whether to use IBC AMVP mode or IBC skip / merge mode. In the example, when the flag (e.g., represented as merge_flag) is true, IBC skip / merge mode is used; and when the flag is false, IBC AMVP mode is used.
[0121] In some examples, for IBC skip / merge mode, a merge candidate index may be signaled to indicate which of the block vectors in the merge candidate list of IBC coded blocks from the neighboring candidate is used as the BV predictor to predict the current block. In some examples, the merge candidate list may include spatial, history-based motion vector prediction (HMVP) and pairwise candidates.
[0122] In some examples, for IBC AMVP mode, block vector differences are encoded in the coded bitstream in the same way as motion vector differences. Block vector prediction in IBC AMVP mode can use two candidates as predictors, one from the left neighbor and one from the upper neighbor (if IBC is encoded). When either neighbor is not available, a default block vector can be used as a predictor. In an example, a flag is signaled in the coded bitstream to indicate the index of the BV predictor.
[0123] As described above, the BV of the current block under reconstruction in the picture may have certain constraints so that the reference block of the current block is within the IBC reference region.
[0124] An IBC reference area refers to a portion of a picture from which a reference block can be selected. For example, an IBC reference area may be within certain portions of a reconstructed area in a picture. The size, position, and / or shape of the IBC reference area may be constrained. Alternatively, the BV may be constrained. In the example, the BV is a two-dimensional vector including an x component and a y component, and at least one of the x component and the y component may be constrained. Constraints may be specified based on the BV, the IBC reference area, or a combination of the BV and the IBC reference area. In various examples, when certain constraints are specified based on the BV, the IBC reference area is constrained accordingly. Similarly, when certain constraints are specified based on the IBC reference area, the BV is constrained accordingly.
[0125] Fig. 9 An example of intra-block copying according to an embodiment of the present disclosure is shown. The current picture (900) will be reconstructed during decoding. The current picture (900) includes a reconstructed area (910) (gray area) and an area to be decoded (920) (white area). The current block (930) is under reconstruction by the decoder. The current block (930) can be reconstructed based on a reference block (940) in the reconstructed area (910). The position offset between the reference block (940) and the current block (930) is called a block vector (950) (or BV (950)). In Fig. 9 In the example of , the IBC reference region (960) is within the reconstructed region (910), the reference block (940) is within the IBC reference region (960), and the block vector (950) is constrained to point to the reference block (940) within the IBC reference region (960).
[0126] Various constraints may be applied to the BV and / or IBC reference region.In an embodiment, the IBC reference region of the current block under reconstruction in the current CTB is constrained to be within the current CTB.
[0127] In an embodiment, the effective storage requirement for storing reference samples to be used in intra-frame block copying is one CTB size. In the example, the CTB size is 128×128 samples. The current CTB includes the current region being reconstructed. The current region has a size of 64×64 samples. Since the reference storage can also store reconstructed samples in the current region, when the reference storage size is equal to the CTB size of 128×128 samples, the reference storage can store more than 3 regions of 64×64 samples. Accordingly, the IBC reference region may include some parts of a previously reconstructed CTB, while the total storage requirement for storing reference samples remains unchanged (such as 1 CTB size of 128×128 samples or a total of 4 64×64 reference samples). In the example, the previously reconstructed CTB is the left neighbor of the current CTB, such as Fig.10 as shown in .
[0128] Fig.10 An example of intra-block copying according to an embodiment of the present disclosure is shown. The current picture (1001) includes a current CTB (1015) under reconstruction and a previously reconstructed CTB (1010) that is a left neighbor of the current CTB (1015). The CTB in the current picture (1001) has a CTB size such as 128×128 samples and a CTB width such as 128 samples. The current CTB (1015) includes 4 regions (1016)-(1019), where the current region (1016) is under reconstruction. The current region (1016) includes multiple coding blocks (1021)-(1029). Similarly, the previously reconstructed CTB (1010) includes 4 regions (1011)-(1014). The coding blocks (1021)-(1025) have been reconstructed, the current block (1026) is under reconstruction, and the coding blocks (1026)-(1027) and regions (1017)-(1019) will be reconstructed.
[0129] The current region (1016) has a co-located region (i.e., region (1011) in the previously reconstructed CTB (1010)). The relative position of the co-located region (1011) with respect to the previously reconstructed CTB (1010) may be the same as the relative position of the current region (1016) with respect to the current CTB (1015). Fig.10 In the example shown, the current region (1016) is the upper left region in the current CTB (1015), and therefore, the co-located region (1011) is also the upper left region in the previously reconstructed CTB (1010). Since the position of the previously reconstructed CTB (1010) is offset by the CTB width from the position of the current CTB (1015), the position of the co-located region (1011) is offset by the CTB width from the position of the current region (1016).
[0130] In an embodiment, the co-located region of the current region (1016) is in a previously reconstructed CTB, wherein the position of the previously reconstructed CTB is offset from the position of the current CTB (1015) by one or more CTB widths, and therefore, the position of the co-located region is also offset from the position of the current region (1016) by a corresponding one or more CTB widths. The position of the co-located region may be offset to the left or upward from the current region (1016), etc.
[0131] As described above, the size of the IBC reference area for the current block (1026) is constrained by the CTB size. Fig.10 In the example of , the IBC reference area may include areas (1012)-(1014) in the previously reconstructed CTB (1010) and a portion of the current area (1016) that has been reconstructed, such as coding blocks (1021)-(1025). The IBC reference area may exclude the co-located area (1011) so that the size of the search range is within the CTB size. Fig.10 , the reference block (1091) is located in the region (1014) of the previously reconstructed CTB (1010). The block vector (1020) indicates the offset between the current block (1026) and the corresponding reference block (1091). The reference block (1091) is in the IBC reference region.
[0132] Fig.10 The example shown can be appropriately adapted to other scenarios where the current region is located at another position in the current CTB (1015). In the example, when the current block is in region (1017), the co-located region of the current block is region (1012). Therefore, the IBC reference region can include a portion of regions (1013)-(1014), region (1016), and region (1017) that have been reconstructed. The search range further excludes region (1011) and co-located region (1012) so that the size of the IBC reference region is within the CTB size. In the example, when the current block is in region (1018), the co-located region of the current block is region (1013). Therefore, the IBC reference region can include a portion of regions (1014), regions (1016)-(1017), and region (1018) that have been reconstructed. The IBC reference area further excludes regions (1011)-(1012) and the co-located region (1013), so that the size of the IBC reference area is within the CTB size. In the example, when the current block is in region (1019), the co-located region of the current block is region (1014). Therefore, the IBC reference area can include regions (1016)-(1018) and a portion of region (1019) that has been reconstructed. The IBC reference area further excludes the previously reconstructed CTB (1010), so that the size of the IBC reference area is within the CTB size.
[0133] In the above description, the reference block may be in a previously reconstructed CTB (1010) or a current CTB (1015).
[0134] In an embodiment, the IBC reference region may be specified as follows. In an example, the current picture is a luma picture, and the current CTB is a luma CTB including a plurality of luma samples, and BV(mvL) satisfies the following constraints for code stream consistency. In an example, BV(mvL) has a fractional resolution (e.g., 1 / 16 pixel resolution).
[0135] The constraints include a first condition that a reference block of the current block has been reconstructed. When the reference block has a rectangular shape, an adjacent block availability check process (or a reference block availability check process) may be implemented to check whether an upper left sample and a lower right sample of the reference block have been reconstructed. When an upper left sample and a lower right sample of the reference block have been reconstructed, it is determined that the reference block has been reconstructed.
[0136] For example, when the derivation process of reference block availability is called with the position of the upper left sample of the current block (xCurr, yCurr) set to (xCb, yCb) and the position of the upper left sample of the reference block (xCb+(mvL[0]>>4), yCb+(mvL[1]>>4)) as input, the output is equal to true when the upper left sample of the reference block has been reconstructed, where the block vector mvL is a two-dimensional vector with an x-component mvL[0] and a y-component mvL[1]. When BV(mvL) has a fractional resolution such as 1 / 16 pixel resolution, the x-component mvL[0] and the y-component mvL[1] are shifted to have integer resolutions, as indicated by mvL[0]>>4 and mvL[1]>>4, respectively.
[0137] Similarly, when the derivation process of block availability is called with the position of the top left sample of the current block (xCurr, yCurr) set to (xCb, yCb) and the position of the bottom right sample of the reference block (xCb+(mvL[0]>>4)+cbWidth-1, yCb+(mvL[1]>>4)+cbHeight-1) as input, the output is equal to true when the bottom right sample of the reference block has been reconstructed. The parameters cbWidth and cbHeight represent the width and height of the reference block.
[0138] The constraint may also include at least one of the following second conditions: 1) the value of (mvL[0]>>4)+cbWidth is less than or equal to 0, indicating that the reference block is on the left side of the current block and does not overlap with the current block; 2) the value of (mvL[1]>>4)+cbHeight is less than or equal to 0, indicating that the reference block is above the current block and does not overlap with the current block.
[0139] The constraint may also include: the block vector mvL satisfies the following third condition:
[0140] (yCb + ( mvL[1] >> 4) ) >> CtbLog2SizeY = yCb >> CtbLog2SizeY (1)
[0141] (yCb + ( mvL[1] >> 4 + cbHeight - 1) >> CtbLog2SizeY = yCb >>CtbLog2Size (2)
[0142] (xCb + ( mvL[0] >> 4)) >> CtbLog2SizeY >= (xCb >> CtbLog2SizeY) - 1 (3)
[0143] (xCb + ( mvL[0] >> 4) + cbWidth - 1) >> CtbLog2SizeY <= (xCb >> CtbLog2SizeY) (4) wherein the parameter CtbLog2SizeY represents the CTB width in log2 form. For example, when the CTB width is 128 samples, CtbLog2SizeY is 7. Equations (1)-(2) specify that the CTB including the reference block is in the same CTB row as the current CTB (for example, when the reference block is in a previously reconstructed CTB (1010), the previously reconstructed CTB (1010) is in the same row as the current CTB (1015)). Equations (3)-(4) specify that the CTB including the reference block is in the left CTB column of the current CTB or in the same CTB column as the current CTB. The third condition described by equations (1)-(4) specifies that the CTB including the reference block is the current CTB (such as the current CTB (1015)) or the left neighbor of the current CTB (such as the previously reconstructed CTB (1010)), similar to the reference block. Fig.10 Description.
[0144] The constraint may further include a fourth condition: when the reference block is in the left neighbor of the current CTB, the co-located region of the reference block is not reconstructed (i.e., no samples in the co-located region are reconstructed). Further, the co-located region of the reference block is in the current CTB. Fig.10 In the example of , the co-located region of the reference block (1091) is a region (1019) offset by a CTB width from the region (1014) where the reference block (1091) is located, and the region (1019) is not reconstructed. Therefore, the block vector (1020) and the reference block (1091) satisfy the fourth condition described above.
[0145] In an example, the fourth condition may be specified as follows: when (xCb+(mvL[0]>>4))>>CtbLog2SizeY isequal to (xCb>>CtbLog2SizeY)-1, the derivation process for reference block availability is called with the position (xCurr, yCurr) of the current block set to (xCb, yCb) and the positions (((xCb+(mvL[0]>>4)+CtbSizeY)>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1), ((yCb+(mvL[1]>>4))>>(CtbLog2SizeY-1))<<(CtbLog2SizeY-1)) as output, the output is equal to false (FALSE), indicating that the co-located region has not been reconstructed, such as Fig.10 as shown in .
[0146] The constraints for the IBC reference region and / or block vector may include a suitable combination of the first condition, the second condition, the third condition, and the fourth condition described above. In an example, the constraints include the first condition, the second condition, the third condition, and the fourth condition, such as Fig.10 In the example, the first condition, the second condition, the third condition and / or the fourth condition may be modified, and the constraint includes the modified first condition, the second condition, the third condition and / or the fourth condition.
[0147] According to the fourth condition, when one of the coding blocks (1022)-(1029) is the current block, the reference block cannot be in the region (1011), and therefore, the IBC reference region for one of the coding blocks (1022)-(1029) excludes the region (1011). The reason for excluding the region (1011) is specified as follows: if the reference block is in the region (1011), the co-located region of the reference block is the region (1016), however, at least the samples in the coding block (1021) have already been reconstructed, and thus the fourth condition is violated. On the other hand, for a coding block that is to be reconstructed first in the current region, such as Fig.11 For a coding block (1121) in region (1116) in the coding block, the fourth condition does not prevent the reference block from being in region (1111) because the co-located region (1116) of the reference block has not yet been reconstructed.
[0148] Fig.11An example of intra-block copying according to an embodiment of the present disclosure is shown. The current picture (1101) includes a current CTB (1115) under reconstruction and a previously reconstructed CTB (1110) which is a left neighbor of the current CTB (1115). The CTB in the current picture (1101) has a CTB size and a CTB width. The current CTB (1115) includes 4 regions (1116)-(1119), wherein the current region (1116) is under reconstruction. The current region (1116) includes a plurality of coding blocks (1121)-(1129). Similarly, the previously reconstructed CTB (1110) includes 4 regions (1111)-(1114). The current block (1121) under reconstruction will be reconstructed first in the current region (1116), and the coding blocks (1122)-(1129) will be reconstructed. In the example, the CTB size is 128×128 samples, and each of the regions (1111)-(1114) and (1116)-(1119) is 64×64 samples. The reference storage size is equal to the CTB size and is 128×128 samples, and therefore, when the IBC reference region is defined by the reference storage size, the IBC reference region includes 3 regions and a portion of the additional region.
[0149] Similar to reference Fig.10 As described, the current region (1116) has a co-located region (i.e., region (1111) in the previously reconstructed CTB (1110)). According to the fourth condition described above, the reference block of the current block (1121) may be in region (1111), and therefore, the IBC reference region may include regions (1111)-(1114). For example, when the reference block is in region (1111), the co-located region of the reference block is region (1116), where no samples in region (1116) are reconstructed before reconstructing the current block (1121). However, as shown in the reference Fig.10 As described in the fourth condition, for example, after reconstructing the coded block (1121), the region (1111) is no longer available to be included in the IBC reference region used to reconstruct the coded block (1122). Therefore, tight synchronization and timing control of the reference storage buffer will be used and may be challenging.
[0150] According to some embodiments, when a current block is to be reconstructed first in a current region of a current CTB, an IBC reference region may exclude a co-located region of the current region in a previously reconstructed CTB, wherein the current CTB and the previously reconstructed CTB are in the same current picture. A block vector may be determined such that the reference block is in the IBC reference region excluding the co-located region in the previously reconstructed CTB. In an embodiment, the IBC reference region includes coded blocks reconstructed after the co-located region and before the current block in decoding order.
[0151] In the following description, the CTB size may vary, and the maximum CTB size is set to be the same as the reference storage size. In an example, the reference storage size or the maximum CTB size is 128×128 samples. The description may be appropriately adapted to other reference storage sizes or maximum CTB sizes.
[0152] In an embodiment, the CTB size is equal to the reference storage size. The previously reconstructed CTB is the left neighbor of the current CTB, the position of the co-located region is offset from the position of the current region by the CTB width, and the coding block in the IBC reference region is in at least one of the current CTB and the previously reconstructed CTB.
[0153] FIG. 12A to FIG. 12D An example of intra-frame block copying according to an embodiment of the present disclosure is shown. FIG. 12A to FIG. 12D , the current picture (1201) includes a current CTB (1215) under reconstruction and a previously reconstructed CTB (1210) which is a left neighbor of the current CTB (1215). The CTB in the current picture (1201) has a CTB size and a CTB width. The current CTB (1215) includes 4 regions (1216)-(1219). Similarly, the previously reconstructed CTB (1210) includes 4 regions (1211)-(1214). In an embodiment, the CTB size is the maximum CTB size and is equal to the reference storage size. In the example, the CTB size and the reference storage size are 128×128 samples, and therefore, each of the regions (1211)-(1214) and (1216)-(1219) has a size of 64×64 samples.
[0154] exist FIG. 12A to FIG. 12D In the illustrated example, the current CTB (1215) includes an upper left region, an upper right region, a lower left region, and a lower right region corresponding to regions (1216)-(1219), respectively. The previously reconstructed CTB (1210) includes an upper left region, an upper right region, a lower left region, and a lower right region corresponding to regions (1211)-(1214), respectively.
[0155] refer to Fig. 12A , the current region (1216) is under reconstruction. The current region (1216) may include multiple coding blocks (1221)-(1229). The current region (1216) has a co-located region in a previously reconstructed CTB (1210), namely, region (1211). The IBC reference region for one of the coding blocks (1221)-(1229) to be reconstructed may exclude the co-located region (1211). The IBC reference region may include regions (1212)-(1214) of the previously reconstructed CTB (1210) reconstructed in decoding order after the co-located region (1211) and before the current region (1216).
[0156] refer to Fig. 12A , the position of the co-located region (1211) is offset from the position of the current region (1216) by the CTB width, such as 128 samples. For example, the position of the co-located region (1211) is offset to the left by 128 samples from the position of the current region (1216).
[0157] Reference again Fig. 12A , when the current region (1216) is the upper left region (1215) of the current CTB, the co-located region (1211) is the upper left region (1210) of the previously reconstructed CTB, and the search region excludes the upper left region of the previously reconstructed CTB.
[0158] like Fig. 12A As shown in , the current block falls into the upper left 64×64 block (e.g., current region (1216)) of the current CTU (e.g., shown by CTB (1215)), and then in addition to the already reconstructed samples in the current CTU (e.g., shown by CTB (1215)), the samples in the lower right 64×64 block (e.g., shown by (1214)) of the left CTU (e.g., shown by CTB (1210)) can be referred to as reference samples using, for example, the current picture reference (CPR) mode. The current block can also use the CPR mode to refer to the samples in the lower left 64×64 block (e.g., shown by (1213)) of the left CTU (e.g., shown by CTB (1210)) and the samples in the upper right 64×64 block (e.g., shown by (1212)) of the left CTU (e.g., shown by CTB (1210)).
[0159] refer to Fig. 12B , the current region (1217) is under reconstruction. The current region (1217) may include multiple coding blocks (1241)-(1249). The current region (1217) has a co-located region (i.e., region (1212) in a previously reconstructed CTB (1210)). The IBC reference region for one of the multiple coding blocks (1241)-(1249) may exclude the co-located region (1212). The IBC reference region includes regions (1213)-(1214) of the previously reconstructed CTB (1210) and region (1216) in the current CTB (1215), and regions (1213)-(1214) and region (1216) are reconstructed after the co-located region (1212) and before the current region (1217). Due to the constraint of the reference storage size (i.e., the size of one CTB), the IBC reference region further excludes region (1211). Similarly, the location of the co-located region (1212) is offset from the location of the current region (1217) by the CTB width, such as 128 samples.
[0160] exist Fig. 12BIn the example, the current region (1217) is the upper right region of the current CTB (1215), the co-located region (1212) is also the upper right region of the previously reconstructed CTB (1210), and the search region excludes the upper right region of the previously reconstructed CTB (1210).
[0161] like Fig. 12B As shown in, if the current block falls into the upper right 64×64 block (e.g., shown by (1217)) of the current CTU (e.g., shown by CTB (1215)), then in addition to the already reconstructed samples in the current CTU (e.g., shown by (1216)), if the luma position (0, 64) relative to the current CTU has not been reconstructed, the current block can also use the CPR mode to reference samples in the lower left 64×64 block (e.g., shown by (1213)) and the lower right 64×64 block (e.g., shown by (1214)) of the left CTU; otherwise, the current block can also refer to the reference sample in the lower right 64×64 block (e.g., shown as (1214)) of the left CTU.
[0162] refer to Fig. 12C , the current region (1218) is under reconstruction. The current region (1218) may include multiple coding blocks (1261)-(1269). The current region (1218) has a co-located region (i.e., region (1213)) in the previously reconstructed CTB (1210). The IBC reference region for one of the multiple coding blocks (1261)-(1269) may not include the co-located region (1213). The IBC reference region includes region (1214) of the previously reconstructed CTB (1210) and region (1216)-(1217) of the current CTB (1215), and region (1214) and region (1216)-(1217) are reconstructed after the co-located region (1213) and before the current region (1218). Similarly, due to the constraint of the reference storage size, the IBC reference region further excludes regions (1211)-(1212). The location of the co-located region (1213) is offset from the location of the current region (1218) by the CTB width, such as 128 samples. Fig. 12C In the example, when the current region (1218) is the lower left region of the current CTB (1215), the co-located region (1213) is also the lower left region of the previously reconstructed CTB (1210), and the search region excludes the lower left region of the previously reconstructed CTB (1210).
[0163] like Fig. 12CAs shown in , if the current block falls into the lower left 64×64 block (e.g., shown by (1218)) of the current CTU (e.g., shown by CTB (1215)), then in addition to the samples already reconstructed in the current CTU (e.g., (1216) and (1217)), if the luma position (64, 0) relative to the current CTU has not been reconstructed, the current block can also use the CPR mode to reference samples in the lower right 64×64 block (e.g., shown by (1214)) of the left CTU.
[0164] refer to Fig.12D , the current region (1219) is under reconstruction. The current region (1219) may include multiple coding blocks (1281)-(1289). The current region (1219) has a co-located region (i.e., region (1214)) in a previously reconstructed CTB (1210). The IBC reference region for one of the multiple coding blocks (1281)-(1289) may exclude the co-located region (1214). The IBC reference region includes regions (1216)-(1218) in the current CTB (1215) reconstructed in decoding order after the co-located region (1214) and before the current region (1219). Due to the constraint of the reference storage size, the IBC reference region excludes regions (1211)-(1213), and therefore, the IBC reference region excludes the previously reconstructed CTB (1210). Similarly, the location of the co-located region (1214) is offset from the location of the current region (1219) by the CTB width, such as 128 samples. Fig.12D In the example, when the current region (1219) is the lower right region of the current CTB (1215), the co-located region (1214) is also the lower right region of the previously reconstructed CTB (1210), and the search region excludes the lower right region of the previously reconstructed CTB (1210).
[0165] exist Fig.12D , the current block falls into the lower right 64×64 block (shown by ( 1219 )) of the current CTU, which can use the CPR mode to refer only to samples that have been reconstructed in the current CTU (e.g., ( 1216 ), ( 1217 ), and ( 1218 )).
[0166] use FIG. 12A to FIG. 12D
[0066] Despite the limitations shown, in some examples, IBC mode can be implemented using local on-chip memory for hardware implementations.
[0167] According to one aspect of the present disclosure, template matching TM search refers to a decoder-side MV derivation technology that corrects the motion information of the current CU by finding the nearest match between a template in the current picture (i.e., the top neighboring block and / or the left neighboring block of the current CU) and a block in a reference picture (i.e., the same size as the template and referred to as the reference template).
[0168] Fig.13 An example of a template matching search in some embodiments is shown. Fig.13 In the example of , the current picture (1310) includes a current CU under reconstruction, and the current template for the current CU includes an upper block and a left block adjacent to the current CU. The upper block and the left block form the current template for the current CU. In the reference picture (1320) for the current picture (1310), the initial motion vector (MV) points to the reference position, and the search area (1350) is defined as an area within [-8 pixels, +8 pixels] of the reference position in the X direction and the Y direction.
[0169] In an example, a template matching search is used to search for a better MV with a closest match between a reference template and a current template in the search area (1350). In some examples, the template matching technique can use a search step size determined based on the AMVR mode, and the template matching search can be cascaded with a bilateral matching process in a merge mode.
[0170] In some examples, in the AMVP mode, a motion vector predictor (MVP) candidate is selected from a candidate list based on a template error calculation that can select the MVP candidate with the minimum difference between the current template and the reference template. A template matching search is then performed based on this particular MVP candidate for MV correction. In some examples, the template matching search corrects the MVP candidate starting with full-pixel motion vector difference (MVD) accuracy (or 4 pixels for 4-pixel AMVR mode) within a [-8, +8] pixel search range using an iterative diamond search pattern. The AMVP candidate can be further corrected by using a cross search pattern with full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode), followed by a half-pixel cross search pattern and a quarter-pixel cross search pattern depending on the AMVR mode. This search process ensures that the MVP candidate maintains the same MV accuracy as indicated by the AMVR mode after the TM search process.
[0171] Fig.14 A table (1400) of search patterns used for AMVR and merge modes in some examples is shown.
[0172] In some examples, in merge mode, a similar search method is applied to the merge candidates indicated by the merge index. Fig.14As shown in the table in , depending on whether an alternative interpolation filter is used according to the merged motion information (used when AMVR is in half-pixel mode), the TM search can be performed up to 1 / 8 pixel MVD accuracy or skip these accuracies exceeding half-pixel MVD accuracy. For example, the variable AltIF is 0 to indicate that the alternative interpolation filter is not used, and the TM search can be performed up to 1 / 8 pixel MVD accuracy; the variable AltIF is 1 to indicate that the alternative interpolation filter is used, and the TM search can be performed to half-pixel accuracy. In addition, when the TM mode is enabled, depending on whether bilateral matching can be enabled according to the enable condition check, template matching can be performed as an independent process or an additional MV correction process between the block-based bilateral matching method and the sub-block-based bilateral matching method.
[0173] According to some aspects of the present disclosure, a template matching technique may be used in IBC mode to perform a template matching search based on IBC merge candidates to implement block vector correction.
[0174] According to one aspect of the present disclosure, for the merge candidate list in IBC mode, only a certain number of candidates can be on the merge candidate list, and a merge index is signaled to indicate one of the candidates in the merge candidate list. However, using the template matching method, the decoder is able to derive the best block vector by searching for close block vectors based on the template. In addition, when constructing the IBC merge candidate list, candidate BVs outside the IBC reference area are considered invalid, and invalid candidate BVs are removed from the merge candidate list. However, there are cases where the best BV comes from those invalid candidate BVs.
[0175] Some aspects of the present disclosure provide techniques that allow invalid BVs in a candidate list to be merged, and a template matching search may be performed based on the invalid BVs to achieve better BVs (eg, fewer template errors) in IBC mode.
[0176] In an embodiment, a flag may be used to indicate whether template matching is applied to an IBC merge candidate.
[0177] Fig.15 An example of pseudo code (1500) for template matching in some embodiments is shown.
[0178] exist Fig.15 In the example of , when the current block (PU) is in IBC mode, a first flag (e.g., represented by merge_flag) is signaled in the encoded bitstream to indicate whether the current block is encoded in IBC AMVP mode or IBC merge mode. Fig.15As shown in (1501) in , the first flag can be parsed from the code stream. When the first flag (merge_flag) is equal to 1, the current block is encoded using the IBC merge mode. When the current block is in the IBC merge mode, the second flag (e.g., represented by template_matching_ibc_merge_flag) and the merge index (e.g., represented by merge_idx) are signaled in the encoded code stream. Fig.15 As shown in (1502) in FIG. 1 , the second flag can be parsed from the encoded code stream, and as Fig.15 As shown in (1503) in FIG. 1 , the merge index can be parsed from the encoded code stream.
[0179] The merge index indicates a candidate BV in the IBC merge candidate list. When the second flag (e.g., template_matching_ibc_merge_flag) is equal to 1, the candidate BV in the IBC merge candidate list indicated by the merge index can be used as the initial BV to perform template matching search. When the second flag (template_matching_ibc_merge_flag) is equal to 0, in the example, the template matching search is disabled, and the candidate BV indicated by the merge index is used as a block vector pointing to a reference block to reconstruct the current block (current PU).
[0180] In some embodiments, the template matching search is tied to the IBC merge mode. Thus, the template matching search can be applied in the IBC merge mode without signaling the second flag (e.g., template_matching_ibc_merge_flag). A merge index can be signaled to indicate a candidate BV from the IBC merge candidate list that will be used as the initial BV for template matching.
[0181] According to another aspect of the present disclosure, during construction of an IBC merge candidate list, instead of using only the IBC reference region, the template matching search range (Sr) is considered together with the IBC reference region in checking the validity of each IBC merge candidate.
[0182] Fig.16 An example of an IBC according to an embodiment of the present disclosure is shown. Fig.16, the current picture (1601) includes a current CTB (1615) under reconstruction and a previously reconstructed CTB (1610) as a left neighbor of the current CTB (1615). The current CTB (1615) includes 4 regions (1616)-(1619). Similarly, the previously reconstructed CTB (1610) includes 4 regions (1611)-(1614). In an embodiment, the CTB size is the maximum CTB size and is equal to the reference storage size. In the example, the CTB size and the reference storage size are 128×128 samples, and therefore, each of the regions (1611)-(1614) and (1616)-(1619) has a size of 64×64 samples.
[0183] exist Fig.16 In the example of , the current region (1616) is under reconstruction. The current region (1616) has a co-located region in a previously reconstructed CTB (1610), namely, region (1611). The IBC reference region for the current block (1650) to be reconstructed may exclude the co-located region (1611). The IBC reference region may include regions (1612)-(1614) of the previously reconstructed CTB (1610), and regions (1612)-(1614) are reconstructed after the co-located region (1611) and before the current region (1616) in decoding order.
[0184] exist Fig.16 In the example of , the arrow (1651) indicates a candidate BV in the IBC merge candidate list. The candidate BV points to position A. The rectangular box (1652) around position A is the template matching search range that can be represented by Sr. In the example, position A has 2D coordinates (x0, y0). Then, the rectangular box (1652) can be defined by the four corners of (x0-Sr, y0-Sr), (x0+Sr, y0-Sr), (x0-Sr, y0+Sr) and (x0+Sr, y0+Sr). In some related examples, the candidate BV (1651) is considered invalid and is not placed in the IBC merge candidate list because position A is outside the IBC reference area (area (1611) is excluded from the IBC reference area).
[0185] In some embodiments, an invalid merge candidate, such as candidate BV (1651), may be inserted into the IBC merge candidate list. In order to perform a template matching search based on candidate BV (1651), the position A pointed to by candidate BV (1651) is moved, for example, to position C within the IBC reference range, which is the closest position to position A within the valid IBC reference range. Then, the template matching search may be further searched and corrected starting from position C within the template matching search range. Fig.16In the example, if the upper left corner B of the area (1612) has a 2-dimensional coordinate of (x1, y1), then the position C in the example may have a 2-dimensional coordinate of (x1, y0).
[0186] In some embodiments, during the validation check of an IBC merge candidate, a candidate BV is considered valid when its template matching search range is partially or completely co-located with the IBC reference region. Fig.16 In the example of , the template matching search area (1652) for the candidate BV (1651) partially overlaps with the IBC reference area (including area (1612), area (1613), and area (1614)), so the candidate BV (1651) is considered valid and can be put into the IBC merge candidate list. In another example, if x0+Sr>x1, the candidate BV (1651) is valid. Similarly, if y0+Sr>y1, the candidate BV (1651) is valid.
[0187] Further, according to an aspect of the present disclosure, during a template matching search, when an intermediate block vector is outside an IBC reference area, the intermediate block vector is not considered and the template matching calculation associated with the intermediate block vector (e.g., the difference calculation between the current template and the reference template pointed to by the intermediate block vector) can be skipped.
[0188] Fig.17 A flow chart outlining a method (1700) according to an embodiment of the present disclosure is shown. The method (1700) may be used for a video encoder. In various embodiments, the method (1700) is performed by a processing circuit such as a processing circuit in a terminal device (310), (320), (330), and (340), a processing circuit that performs the functions of a video encoder (403), a processing circuit that performs the functions of a video encoder (603), a processing circuit that performs the functions of a video encoder (703), etc. In some embodiments, the method (1700) is implemented in software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the method (1700). The method starts at (S1701) and proceeds to (S1710).
[0189] At (S1710), when the current block is in IBC mode, an initial block vector is determined, the initial block vector being used to predict the current block in the current coding tree unit CTU.
[0190] At (S1720), a template matching search is performed based on the initial block vector to determine a modified block vector pointing to a reference block in the same picture as the current block.
[0191] At (S1730), a reconstructed current block is generated based on the reference block.
[0192] At (S1740), the encoded video code stream carrying the picture is encoded to include information indicating the initial block vector.
[0193] In some examples, a merge index indicating a block vector candidate from a merge candidate list is encoded in the encoded video bitstream, and the initial block vector is determined based on the block vector candidate. In some examples, the block vector candidate is determined by the encoder using at least one of block matching and hash-based motion estimation.
[0194] In one example, a first flag indicating the IBC merge mode is encoded in the encoded video bitstream, and a second flag indicating to perform a template matching search is encoded in the encoded video bitstream.
[0195] In another example, a first flag indicating the IBC merge mode and used to perform template matching search encoding is encoded in the encoded video bitstream.
[0196] In some embodiments, the merge candidate list is configured to include at least a first block vector candidate pointing to a first position outside the IBC reference region. In an example, to determine an initial block vector based on the first block vector candidate, a nearest position to the first position in the IBC reference region is determined; and the initial block vector is determined to point to the nearest position.
[0197] In some embodiments, to construct the merge candidate list, in response to determining that the template matching search region of the first block vector candidate overlaps with the IBC reference region, the first block vector candidate is inserted into the merge candidate list.
[0198] In some examples, the IBC reference region includes a reconstructed portion of the current CTU and a region of a left CTU, which are cached in a storage space used to store the size of the CTU.
[0199] In some examples, to perform a template matching search, portions of the template matching search area outside of the IBC reference area are excluded from the template matching search.
[0200] Then, the method proceeds to (S1799) and terminates.
[0201] The method (1700) may be modified as appropriate. One or more steps in the method (1700) may be modified and / or omitted. One or more additional steps may be added. Any suitable order of implementation may be used.
[0202] Fig.18A flow chart outlining a method (1800) according to an embodiment of the present disclosure is shown. The method (1800) may be used for a video decoder. In various embodiments, the method (1800) is performed by a processing circuit such as a processing circuit in a terminal device (310), (320), (330), and (340), a processing circuit that performs the functions of a video decoder (410), a processing circuit that performs the functions of a video decoder (510), etc. In some embodiments, the method (1800) is implemented in software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the method (1800). The method starts at (S1801) and proceeds to (S1810).
[0203] At (S1810), when the current block is in IBC mode, an initial block vector is determined, wherein the initial block vector is used to predict the current block in the current coding tree unit CTU.
[0204] At (S1820), a template matching search is performed based on the initial block vector to determine a modified block vector pointing to a reference block in the same picture as the current block.
[0205] At (S1830), a reconstructed current block is generated based on the reference block.
[0206] In some examples, an initial block vector is determined from an encoded video bitstream carrying a picture based on a merge index. The merge index indicates a block vector candidate from a merge candidate list.
[0207] In one example, a first flag indicating the IBC merge mode is parsed from the coded video stream. Then, a second flag indicating to perform a template matching search is parsed from the coded video stream.
[0208] In another example, a first flag indicating the IBC merge mode is parsed from an encoded video stream carrying the picture and a template matching search is performed.
[0209] In some examples, the merge candidate list is constructed to include at least a first block vector candidate pointing to a first position outside the IBC reference region. In response to a merge index indicating the first block vector candidate, a nearest position to the first position in the IBC reference region is determined, and the initial block vector is determined to point to the nearest position.
[0210] In some examples, to construct the merge candidate list, in response to determining that the template matching search region of the first block vector candidate overlaps with the IBC reference region, the first block vector candidate is inserted into the merge candidate list.
[0211] In some examples, to perform a template matching search, portions of the template matching search area outside of the IBC reference area are excluded from the template matching search.
[0212] In some examples, the IBC reference region includes a reconstructed portion of the current CTU and a region of a left CTU, which are cached in a storage space used to store the size of the CTU.
[0213] Then, the method proceeds to (S1899) and terminates.
[0214] The method (1800) may be modified as appropriate. One or more steps in the method (1800) may be modified and / or omitted. One or more additional steps may be added. Any suitable order of implementation may be used.
[0215] The above techniques may be implemented as computer software via computer-readable instructions and physically stored in one or more computer-readable media. Fig.19 A computer system (1900) is shown that is suitable for implementing certain embodiments of the disclosed subject matter.
[0216] The computer software may be encoded in any suitable machine code or computer language, and may be assembled, compiled, linked, or the like to create a code comprising instructions, which may be directly executed by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or executed by decoding, microcode, or the like.
[0217] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, IoT devices, etc.
[0218] Fig.19 The components shown for the computer system (1900) are exemplary in nature and are not intended to limit the scope of use or functionality of the computer software implementing the embodiments of the present application. The configuration of the components should not be interpreted as having any dependency or requirement on any component or combination of components shown in the exemplary embodiment of the computer system (1900).
[0219] The computer system (1900) may include certain human-computer interface input devices. Such human-computer interface input devices may respond to input from one or more human users through tactile input (e.g., keyboard input, sliding, data glove movement), audio input (e.g., sound, applause), visual input (e.g., gestures), and olfactory input (not shown). The human-computer interface devices may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., speech, music, ambient sound), images (e.g., scanned images, photographic images obtained from a still image camera), and videos (e.g., two-dimensional video, three-dimensional video including stereoscopic video).
[0220] The human-computer interface input device may include one or more of the following (only one of which is drawn): keyboard (1901), mouse (1902), touchpad (1903), touch screen (1910), data gloves (not shown), joystick (1905), microphone (1906), scanner (1907), camera (1908).
[0221] The computer system (1900) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate one or more human user senses through, for example, tactile output, sound, light, and smell / taste. Such human-computer interface output devices may include tactile output devices (e.g., tactile feedback through a touch screen (1910), a data glove (not shown), or a joystick (1905), but there may also be tactile feedback devices that are not used as input devices), audio output devices (e.g., speakers (1909), headphones (not shown)), visual output devices (e.g., screens (1910) including cathode ray tube screens, liquid crystal screens, plasma screens, organic light emitting diode screens, each of which has or does not have a touch screen input function, each of which has or does not have a tactile feedback function - some of which can output two-dimensional visual output or output of more than three dimensions through means such as stereoscopic picture output; virtual reality glasses (not shown), holographic displays, and smoke boxes (not shown)) and printers (not shown).
[0222] The computer system (1900) may also include human-accessible storage devices and their associated media, such as optical media including high-density read-only / rewritable compact disks (CD / DVD ROM / RW) (1920) or similar media (1921) including CD / DVD, a thumb drive (1922), a removable hard drive or solid state drive (1923), traditional magnetic media such as tapes and floppy disks (not shown), special-purpose ROM / ASIC / PLD-based devices such as security software protectors (not shown), and the like.
[0223] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the disclosed subject matter does not include transmission media, carrier waves, or other transient signals.
[0224] The computer system (1900) may also include an interface to one or more communication networks. For example, the network may be wireless, wired, or optical. The network may also be a local area network, a wide area network, a metropolitan area network, an in-vehicle network, an industrial network, a real-time network, a delay-tolerant network, and the like. The network also includes local area networks such as Ethernet, wireless local area networks, cellular networks (GSM, 3G, 4G, 5G, LTE, etc.), television wired or wireless wide area digital networks (including cable television, satellite television, and terrestrial broadcast television), in-vehicle and industrial networks (including CANBus), and the like. Some networks typically require an external network interface adapter for connecting to some universal data ports or peripheral buses (1949) (e.g., a USB port of the computer system (1900)); other systems are typically integrated into the core of the computer system (1900) by connecting to a system bus as described below (e.g., an Ethernet interface integrated into a PC computer system or a cellular network interface integrated into a smart phone computer system). By using any of these networks, the computer system (1900) can communicate with other entities. The communication can be one-way, for receiving only (e.g., wireless television), one-way for sending only (e.g., CAN bus to certain CAN bus devices), or two-way, such as to other computer systems via a local or wide area digital network. Each of the above networks and network interfaces can use certain protocols and protocol stacks.
[0225] The above-mentioned human-machine interface devices, human-accessible storage devices, and network interfaces may be connected to the core (1940) of the computer system (1900).
[0226] The core (1940) may include one or more central processing units (CPUs) (1941), graphics processing units (GPUs) (1942), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1943), hardware accelerators for specific tasks (1944), etc. These devices, as well as read-only memory (ROM) (1945), random access memory (1946), internal mass storage (e.g., internal non-user accessible hard disk drives, solid-state drives, etc.) (1947), etc., may be connected via a system bus (1948). In some computer systems, the system bus (1948) may be accessed in the form of one or more physical plugs so that it may be expanded by additional central processing units, graphics processing units, etc. Peripheral devices may be directly attached to the core's system bus (1948), or connected via a peripheral bus (1949). The architecture of the peripheral bus includes PCI, USB, etc.
[0227] The CPU (1941), GPU (1942), FPGA (1943) and accelerator (1944) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (1945) or RAM (1946). Transition data can also be stored in RAM (1946), while permanent data can be stored in, for example, internal mass storage (1947). Fast storage and retrieval of any memory device can be achieved by using a cache memory, which can be closely associated with one or more CPUs (1941), GPUs (1942), mass storage (1947), ROM (1945), RAM (1946), etc.
[0228] The computer readable medium may have computer code thereon for performing various computer-implemented operations. The medium and computer code may be specially designed and constructed for the purpose of this application, or may be medium and code well known and available to those skilled in the art of computer software.
[0229] As an example and not a limitation, a computer system having an architecture (1900), in particular a core (1940), can be provided as a processor (including a CPU, a GPU, an FPGA, an accelerator, etc.) to execute software contained in one or more tangible computer-readable media. Such a computer-readable medium can be a medium associated with the above-mentioned user-accessible mass storage, as well as a specific memory of the core (1940) having non-volatility, such as a core internal mass storage (1947) or a ROM (1945). Software implementing various embodiments of the present application can be stored in such a device and executed by the core (1940). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software can enable the core (1940), in particular the processor therein (including a CPU, a GPU, an FPGA, etc.) to perform a specific process or a specific part of a specific process described herein, including defining a data structure stored in the RAM (1946) and modifying such a data structure according to a software-defined process. Additionally or alternatively, the computer system may provide functionality hardwired in logic or otherwise contained in circuitry (e.g., accelerator (1944)) that may operate in place of or in conjunction with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to software may include logic and vice versa. Where appropriate, references to computer-readable media may include circuitry (e.g., an integrated circuit (IC)) storing the executing software, circuitry containing the executing logic, or both. The present application includes any suitable combination of hardware and software.
[0230] Appendix A: Acronyms
[0231] JEM: Joint Exploration Model
[0232] VVC: versatile video coding
[0233] BMS: Benchmark set
[0234] MV: Motion Vector
[0235] HEVC: High Efficiency Video Coding
[0236] SEI: Supplementary Enhancement Information
[0237] VUI: Video Usability Information
[0238] GOPs: Groups of Pictures
[0239] TUs: Transform Units
[0240] PUs: Prediction Units
[0241] CTUs: Coding Tree Units
[0242] CTBs: Coding Tree Blocks
[0243] PBs: Prediction Blocks
[0244] HRD: Hypothetical Reference Decoder
[0245] SNR: Signal Noise Ratio
[0246] CPUs: Central Processing Units
[0247] GPUs: Graphics Processing Units
[0248] CRT: Cathode Ray Tube
[0249] LCD: Liquid-Crystal Display
[0250] OLED: Organic Light-Emitting Diode
[0251] CD: Compact Disc
[0252] DVD: Digital Video Disc
[0253] ROM: Read-Only Memory
[0254] RAM: Random Access Memory
[0255] ASIC: Application-Specific Integrated Circuit
[0256] PLD: Programmable Logic Device
[0257] LAN: Local Area Network
[0258] GSM: Global System for Mobile communications
[0259] LTE: Long-Term Evolution
[0260] CANBus: Controller Area Network Bus
[0261] USB: Universal Serial Bus
[0262] PCI: Peripheral Component Interconnect
[0263] FPGA: Field Programmable Gate Areas
[0264] SSD: solid-state drive
[0265] IC:Integrated Circuit
[0266] CU: Coding Unit
[0267] Although the present application has described a number of exemplary embodiments, various changes, arrangements and various equivalent substitutions of the embodiments are within the scope of the present application. Therefore, it should be understood that those skilled in the art can design a variety of systems and methods, which, although not explicitly shown or described herein, embody the principles of the present application and are therefore within the spirit and scope of the present application.
Claims
1. A video decoding method, characterized in that: include: In response to predicting a current block in an intra block copy (IBC) mode, determining an initial block vector, the initial block vector being used to predict the current block in a current coding tree unit (CTU); Constructing an IBC merge candidate list, comprising: in response to determining that a template matching search region of a first block vector candidate at least partially overlaps with an IBC reference region, inserting the first block vector candidate into the IBC merge candidate list, wherein the first block vector candidate points to a first position outside the IBC reference region; Performing a template matching search based on the initial block vector to determine a modified block vector, the modified block vector pointing to a reference block in the picture where the current block is located; and Based on the reference block, the current block is reconstructed.
2. The method according to claim 1, characterized in that Further including: The initial block vector is determined based on a merge index included in an encoded video bitstream, wherein the merge index indicates a block vector candidate in an IBC merge candidate list, and the IBC merge candidate list includes a plurality of IBC candidates of an IBC merge mode.
3. The method according to claim 1 or 2, characterized in that: Further including: Parsing a first flag indicating an IBC merge mode from the encoded video bitstream; as well as A second flag is parsed from the encoded video code stream, where the second flag indicates whether to apply the template matching search to block vector candidates in the IBC merge candidate list.
4. The method according to claim 1 or 2, characterized in that: Further including: A first flag indicating an IBC merge mode is parsed from the encoded video bitstream and a template matching search is performed, wherein the template matching search is applied to block vector candidates of each block in the CTU predicted in the IBC merge mode.
5. The method according to claim 2, characterized in that: Determining the initial block vector based on a merge index included in the encoded video code stream further comprises: In response to the merge index indicating the first block vector candidate, determining a nearest position to the first position in the IBC reference area; and The initial block vector pointing to the nearest position is determined.
6. The method according to claim 1, characterized in that The IBC reference area includes a reconstructed portion of the current CTU and an area of a left CTU, the reconstructed portion and the area of the left CTU are cached in a storage space, and the storage space has a size for storing the CTU.
7. The method according to claim 1, characterized in that The performing of the template matching search further comprises: Portions of the template matching search area outside the IBC reference area are excluded in the template matching search.
8. A video encoding method, characterized in that: include: In response to predicting a current block in an intra block copy (IBC) mode, determining an initial block vector, the initial block vector being used to predict the current block in a current coding tree unit (CTU); Constructing an IBC merge candidate list, comprising: in response to determining that a template matching search region of a first block vector candidate at least partially overlaps with an IBC reference region, inserting the first block vector candidate into the IBC merge candidate list, wherein the first block vector candidate points to a first position outside the IBC reference region; Performing a template matching search based on the initial block vector to determine a modified block vector, wherein the modified block vector points to a reference block in the picture where the current block is located, and the reference block is used to reconstruct the current block; A first flag and a merge index are signaled in an encoded video bitstream, wherein the first flag indicates an IBC merge mode, the merge index indicates a block vector candidate in an IBC merge candidate list, and the IBC merge candidate list includes multiple IBC candidates for the IBC merge mode.
9. The method according to claim 8, characterized in that Further including: A second flag is signaled in the encoded video code stream, the second flag indicating whether the template matching search is applied to block vector candidates in the IBC merge candidate list.
10. A video decoding device, characterized in that: include: A determining unit, in response to predicting a current block in an intra block copy (IBC) mode, determines an initial block vector, wherein the initial block vector is used to predict the current block in a current coding tree unit (CTU); Constructing an IBC merge candidate list, comprising: in response to determining that a template matching search region of a first block vector candidate at least partially overlaps with an IBC reference region, inserting the first block vector candidate into the IBC merge candidate list, wherein the first block vector candidate points to a first position outside the IBC reference region; a matching unit, performing a template matching search based on the initial block vector to determine a modified block vector, wherein the modified block vector points to a reference block in the picture where the current block is located; and The reconstruction unit reconstructs the current block based on the reference block.
11. A video encoding device, characterized in that: include: A determining unit, in response to predicting a current block in an intra block copy (IBC) mode, determines an initial block vector, wherein the initial block vector is used to predict the current block in a current coding tree unit (CTU); Constructing an IBC merge candidate list, comprising: in response to determining that a template matching search region of a first block vector candidate at least partially overlaps with an IBC reference region, inserting the first block vector candidate into the IBC merge candidate list, wherein the first block vector candidate points to a first position outside the IBC reference region; A matching unit, performing a template matching search based on the initial block vector to determine a modified block vector, wherein the modified block vector points to a reference block in the picture where the current block is located, and the reference block is used to reconstruct the current block; A code stream generation unit signals a first flag and a merge index in an encoded video code stream, wherein the first flag indicates an IBC merge mode, the merge index indicates a block vector candidate in an IBC merge candidate list, and the IBC merge candidate list includes multiple IBC candidates for the IBC merge mode.
12. An electronic device, characterized in that: include: A memory storing instructions; A processor, configured to execute the instructions to implement the method according to any one of claims 1 to 9.
13. A non-transitory computer-readable storage medium, characterized in that: Instructions are stored, which, when executed by at least one processor, cause the at least one processor to perform the method according to any one of claims 1 to 9.
14. A method for storing a video code stream, characterized in that: The video code stream is decoded according to the method according to any one of claims 1 to 7, or is generated by the method according to claim 8 or 9.
Citation Information
Patent Citations
Method and apparatus for video coding
CN112055968A