Video decoding method and device
By introducing a search range adjustment technology of variable CTU size in the video decoding device, the problem of intra-frame picture prediction in the prior art is solved, and more efficient encoding and lowering of bit rate is achieved.
Patent Information
- Application Number
- CN202210402497.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-06
- Filing Date
- 2020-01-06
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2040-01-06
AI Technical Summary
The existing video encoding technology has problems of inefficiency in intra-picture prediction, especially when dealing with multi-direction prediction, traditional methods are difficult to effectively utilize possible prediction directions, resulting in high bit rates.
A video decoding device and method are proposed. By using a search range adjustment technique of variable CTU size in the intra prediction mode, the effective search range of the intra block copy mode is dynamically determined, and the selection efficiency of prediction direction is improved.
By dynamically adjusting the search range, the encoding efficiency of intra-picture prediction is improved, the bit rate is reduced, and the performance of video encoding is enhanced.
Smart Images

Figure CN115190308B_ABST
Abstract
Description
[0001] Cross-references
[0002] This application claims priority to U.S. Patent Application No. 16 / 533,719, filed on August 6, 2019, “Video Codec Method and Apparatus,” which claims priority to U.S. Provisional Application No. 62 / 792,888, filed on January 15, 2019, “Search Range Adjustment with Variable CTU Size for Intra-Picture Block Compensation.” The entire contents of the above-mentioned prior applications are incorporated herein by reference. Technical Field
[0003] This disclosure describes embodiments generally related to video coding. 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] Video encoding and decoding are made possible by inter-picture prediction techniques with motion compensation. An uncompressed digital video may include a series of pictures, each picture having a spatial dimension of, for example, 1920×1080 luminance samples and associated chrominance samples. The series of pictures has a fixed or variable picture rate (also informally referred to as a frame rate), for example, 60 pictures per second or 60Hz. Uncompressed video has very large bitrate requirements. For example, 1080p60 4:2:0 video (1920x1080 luminance sample resolution, 60Hz frame rate) with 8 bits per sample requires close to 1.5Gbit / s bandwidth. One hour of such video requires more than 600GB 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 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 in video. The amount of distortion allowed depends on the application. For example, users of some consumer streaming applications can tolerate higher distortion than users of television applications. The achievable compression ratio reflects that higher allowed / tolerant distortion can produce higher compression ratios. Video encoders and decoders can use several major categories of techniques, including, for example: motion compensation, transforms, quantization, and entropy coding.
[0007] 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.
[0008] 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 data blocks from, for example, surrounding sample data and / or metadata, which are obtained during spatially adjacent encoding / 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.
[0009] 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 contained in a mode codeword. Which codeword is used for a given mode / sub-mode / 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.
[0010] H.264 introduced an intra prediction mode, which was improved in H.265 and further improved in newer coding techniques, such as JEM (joint exploration model), VVC (versatile video coding), BMS (benchmark set). A prediction block can be formed by using neighboring sample values belonging to already available samples. The sample values of neighboring samples are copied to the prediction block in a certain direction. The reference to the used direction can be encoded in the bitstream, or it can be predicted itself.
[0011] Reference Figure 1 , the lower right depicts a set of nine known prediction directions from the 33 possible prediction directions of H.265 (corresponding to the 33 angular modes of the 35 intra modes). 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 a 45 degree angle to the horizontal direction at the upper right. Similarly, arrow (103) indicates that sample (101) is predicted based on one or more samples at a 22.5 degree angle to the horizontal direction at the lower left.
[0012] Still reference Figure 1 , 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 X dimension (e.g., column index) and its position in the Y dimension (e.g., row index). For example, sample S21 is the second sample in the Y dimension (starting from the top) and the first (leftmost) sample in the X dimension. Similarly, sample S44 is the fourth sample in the block (104) in both the X and Y dimensions. 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 X position (e.g., column index) and Y position (e.g., row index) relative to the block (104). In H.264 and H.265, the prediction samples are adjacent to the block being reconstructed, so negative values do not need to be used.
[0013] 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, for this block, indicates a prediction direction consistent with arrow (102), i.e., the sample is predicted based on one or more prediction samples to the upper right at a 45 degree angle to the horizontal direction. 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.
[0014] 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.
[0015] 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.
[0016] Figure 2 A schematic diagram (201) is shown depicting 65 intra prediction directions according to JEM to illustrate that the number of prediction directions increases over time.
[0017] 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. Summary of the invention
[0018] Various aspects of the present disclosure provide methods and devices for video encoding / decoding. In some examples, a video decoding device includes a processing circuit. For example, the processing circuit is used to: decode prediction information of a current block in a current coding tree unit CTU from an encoded video code stream, the prediction information indicating an intra-frame block copy mode, the size of the current CTU is smaller than the maximum size of a reference sample memory, and the reference sample memory is used to store reconstructed samples; check whether the reference block of the current CTU is at least partially located in the Nth CTU on the left side of the current CTU, and the Nth CTU on the left side is in the same CTU row as the current CTU; determine whether the block vector pointing to the reference block is available, and the reference block is associated with the reconstructed samples buffered in the reference sample memory; and when the reference block is at least partially located in the Nth CTU on the left and the block vector is available, reconstructing at least one sample of the current block according to the block vector and the reconstructed sample of the reference block; wherein the determining whether the block vector pointing to the reference block is available comprises: determining a reference block area in the Nth CTU on the left, the reference block area including the reference block; determining whether a collocated block area of the reference block area in the current CTU is at least partially reconstructed; and when the collocated block area in the current CTU is at least partially reconstructed, invalidating the block vector pointing to the reference block area.
[0019] In some embodiments, the processing circuit numbers the CTUs to the left of the current CTU from the CTU closest to the left side of the current CTU to the CTU farthest to the left side; wherein the CTU closest to the left side of the current CTU is the first left CTU, the CTU farthest to the left side of the current CTU is the Nth CTU to the left, and the CTU to the right of the CTU farthest to the left side is the N-1th CTU to the left.
[0020] In some embodiments, the processing circuit stores the reference samples of the current CTU and the left Nth CTU in a reference sample memory in a complementary manner.
[0021] In some embodiments, the processing circuit writes the reference sample of the current CTU into a position of a collocated sample of an Nth CTU on the left to store the reference sample of the current CTU in a reference sample memory.
[0022] In some embodiments, the processing circuit checks whether the top boundary of the reference block is in the same CTU row; checks whether the bottom boundary of the reference block is in the same CTU row; checks whether the left boundary of the reference block is to the right of the Nth CTU on the left; and checks whether the right boundary of the reference block is to the left of the current CTU.
[0023] In some embodiments, the processing circuit checks whether the left side of the reference block is in the left Nth CTU.
[0024] In addition, the processing circuit determines whether the reference block is available according to the block vector; when it is determined that the reference block is available, reconstructs at least one sample of the current block according to the reconstructed samples of the reference block.
[0025] In some examples, the processing circuit obtains samples of a reference block from the reference sample memory according to the block vector; and uses the samples of the reference block as reconstruction samples of the reference block to reconstruct the current block.
[0026] Aspects of the present disclosure also provide a non-transitory computer-readable medium storing instructions, which, when executed by a video decoding computer, cause the computer to perform a video decoding method. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, properties and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:
[0028] Figure 1 is a schematic diagram of an exemplary subset of intra prediction modes.
[0029] Figure 2 is a diagram of exemplary intra prediction directions.
[0030] Figure 3 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.
[0031] Figure 4 is a schematic diagram of a simplified block diagram of another communication system according to an embodiment.
[0032] Figure 5 is a schematic diagram of a simplified block diagram of a decoder according to an embodiment.
[0033] Figure 6 is a schematic diagram of a simplified block diagram of an encoder according to an embodiment.
[0034] Figure 7 A block diagram of an encoder according to another embodiment is shown.
[0035] Figure 8 A block diagram of a decoder according to another embodiment is shown.
[0036] Fig. 9 An example of intra block copy according to an embodiment of the present disclosure is shown.
[0037] FIG. 10A to FIG. 10D An example of an effective search range for the intra block copy mode according to an embodiment of the present disclosure is shown.
[0038] Fig.11 Examples of collocated blocks are shown according to some embodiments of the present disclosure.
[0039] Fig.12 An example of concatenated blocks according to some embodiments of the present disclosure is shown.
[0040] Fig.13 A flowchart outlining an example of a method according to some embodiments of the present disclosure is shown.
[0041] Fig.14 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION
[0042] 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 3 In 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.
[0043] 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.
[0044] 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.
[0045] As an example, Figure 4 The 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.
[0046] 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.
[0047] 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).
[0048] Figure 5is 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 (510) of an embodiment.
[0049] 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).
[0050] 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 5As 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.
[0051] The parser (520) may perform entropy decoding / parsing operations on a video sequence received from the buffer memory (4515) to create symbols (521).
[0052] 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.
[0053] 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.
[0054] 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).
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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 metadata of the HRD buffer management signaled in the encoded video sequence.
[0061] 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.
[0062] 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.
[0063] 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).
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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).
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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).
[0072] The controller (650) may manage encoding operations of the source encoder (630), including, for example, setting parameters and subgroup parameters for encoding video data.
[0073] 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.
[0074] 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).
[0075] 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:
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.
[0085] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in units of 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.
[0086] 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.
[0087] 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.
[0088] 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 general controller (721), and an entropy encoder (725) coupled together.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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).
[0097] 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.
[0098] 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.
[0099] 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).
[0100] 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.
[0101] 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.
[0102] Aspects of the present disclosure provide encoding / decoding techniques for intra picture block compensation, and in particular provide techniques for search range adjustment with variable CTU size.
[0103] Block-based compensation can be used for inter prediction and intra prediction. For inter prediction, block-based compensation from different pictures is called motion compensation. For intra prediction, block-based compensation can also be done from previously reconstructed areas within the same picture. Block-based compensation from reconstructed areas within the same picture can be called intra picture block compensation, current picture referencing (CPR) or intra block copy (IBC). The displacement vector indicating the offset between the current block and the reference block within the same picture is called a block vector (or simply BV: block vector). Unlike the motion vector in motion compensation, which can be any value (positive or negative, in the x or y direction), the block vector has several constraints to ensure that the reference block is available and has been reconstructed. Moreover, in some examples, some reference areas that are tile boundaries or wavefront ladder shape boundaries are excluded for parallel processing considerations.
[0104] The encoding and decoding of block vectors can be explicit or implicit. In explicit mode (or called Advanced motion vector prediction (AMVP) mode in inter-frame codecs), the difference between the block vector and its predicted value is signaled; in implicit mode, the block vector is recovered from a predictor (called the block vector predictor) similar to the motion vector in merge mode. In some embodiments, the resolution of the block vector is limited to integer positions; in other systems, the block vector may be allowed to point to fractional positions.
[0105] In some examples, a block level flag called an IBC flag may be used to signal the use of intra block copy at the block level. In an embodiment, the IBC flag is signaled when the current block is not encoded or decoded in merge mode. In other instances, the use of intra block copy at the block level is signaled by a reference index method. The current picture being decoded is then used as a reference picture. In an example, this reference picture is placed in the last position of the reference picture list. This special reference picture is also managed with other temporal reference pictures in a buffer such as a decoded picture buffer (DPB: Decoded Picture Buffer).
[0106] There are also some variations of intra block copy, such as flipped intra block copy (the reference block is flipped horizontally or vertically before being used to predict the current block) or row-based intra block copy (each compensation unit within an MxN codec block is an Mx1 or 1xN row).
[0107] Fig. 9 An example of intra-block copying according to an embodiment of the present disclosure is shown. A current picture (900) is being decoded. The current picture (900) includes a reconstruction area (910) (dashed area) and an area to be decoded (920) (white area). A current block (930) is being reconstructed by a decoder. The current block (930) can be reconstructed from a reference block (940) in the reconstruction area (910). The position offset between the reference block (940) and the current block (930) is referred to as a block vector (950) (or BV (950)).
[0108] In some examples (e.g., VVC), the search range of the intra block copy mode is limited to the current CTU. Then, the memory requirement for storing reference samples for the intra block copy mode is 1 (maximum) CTU size of the sample. In the example, the (maximum) CU has a size of 128x128 samples. In some examples, the CTU is divided into four block regions, each of which has a size of 64x64 samples. Therefore, in some embodiments, the total memory (e.g., a cache memory with a faster access speed than the main memory) is capable of storing samples of size 128x128, and the total memory includes an existing reference sample memory portion to store the reconstructed samples in the current block, such as a 64x64 region, and includes an additional memory portion to store samples of three other regions of size 64x64. Therefore, in some examples, the effective search range of the intra block copy mode is extended to a portion of the left CTU, while the total memory requirement for storing reference pixels remains unchanged (e.g., 1 CTU size, 4 times the total 64x64 reference sample memory).
[0109] In some embodiments, an update process is performed to update the stored reference samples from the left CTU to the reconstructed samples from the current CTU. Specifically, in some examples, the update process is completed based on 64x64 luma block samples. In an embodiment, for each of the four 64x64 block areas in the CTU-sized memory, the reference samples in the area from the left CTU can be used to predict the codec block in the current CTU in CPR mode until any block in the same area of the current CTU is being coded or has been coded.
[0110] FIG. 10A to FIG. 10D An example of an effective search range for an intra block copy mode according to an embodiment of the present disclosure is shown. In some examples, the encoder / decoder includes a cache memory that can store samples of a CTU, such as 128x128 samples. In addition, Figures 10A to 10D In the example of , the current block region used for prediction has a size of 64x64 samples. It should be noted that the example can be appropriately modified for current block regions of other suitable sizes.
[0111] FIG. 10A to FIG. 10DEach of the 1020 and 1010 shows a current CTU (1020) and a left CTU (1010). The left CTU (1010) includes four block areas (1011) to (1014), and each block area has a sample size of 64x64 samples. The current CTU (1020) includes four block areas (1021) to (1024), and each block area has a sample size of 64x64 samples. The current CTU (1020) is the CTU that includes the current block area being reconstructed (as shown by the label "curr" and has a vertical stripe pattern). The left CTU (1010) is the closest neighbor to the left of the current CTU (1020). It should be noted that in Figures 10A to 10D In the figure, the grey blocks are the reconstructed block areas, and the white blocks are the block areas to be reconstructed.
[0112] exist Fig. 10A In , the current block region being reconstructed is block region (1021). The cache memory stores the reconstructed samples in block regions (1012), (1013) and (1014), and the cache memory will be used to store the reconstructed samples of the current block region (1021). Fig. 10A In the example of , the effective search range for the current block area (1021) includes block areas (1012), (1013) and (1014) in the left CTU (1010), whose reconstructed samples are stored in the cache memory. It should be noted that in an embodiment, the reconstructed samples of the block area (1011) are stored in the main memory (e.g., copied from the cache memory to the main memory before the block area (1021) is reconstructed), which has a slower access speed than the cache memory.
[0113] exist Fig. 10B In , the current block region being reconstructed is block region (1022). The cache memory stores the reconstructed samples in block regions (1013), (1014) and (1021), and the cache memory will be used to store the reconstructed samples of the current block region (1022). Fig. 10B In the example of , the effective search range for the current block area (1022) includes the block areas (1013) and (1014) in the left CTU (1010) and the block area (1021) in the current CTU (1020), whose reconstructed samples are stored in the cache memory. It should be noted that in an embodiment, the reconstructed samples of the block area (1012) are stored in the main memory (e.g., copied from the cache memory to the main memory before the block area (1022) is reconstructed), which has a slower access speed than the cache memory.
[0114] exist Fig. 10CIn , the current block region being reconstructed is block region (1023). The cache memory stores the reconstructed samples in block regions (1014), (1021), and (1022), and the cache memory will be used to store the reconstructed samples of the current block region (1023). Fig. 10C In the example of , the effective search range for the current block (1023) includes the block area (1014) in the left CTU (1010) and the block areas (1021) and (1022) in the current CTU (1020), whose reconstructed samples are stored in the cache memory. It should be noted that in an embodiment, the reconstructed samples of the block area (1013) are stored in the main memory (e.g., copied from the cache memory to the main memory before the block area (1023) is reconstructed), which has a slower access speed than the cache memory.
[0115] exist Fig. 10D In , the current block region being reconstructed is block region (1024). The cache memory stores the reconstructed samples in block regions (1021), (1022) and (1023), and the cache memory will be used to store the reconstructed samples of the current block region (1024). Fig. 10D In the example of , the effective search range for the current block area (1024) includes blocks (1021), (1022) and (1023) in the current CTU (1020), whose reconstructed samples are stored in the cache memory. It should be noted that in an embodiment, the reconstructed samples of the block area (1014) are stored in the main memory (e.g., copied from the cache memory to the main memory before the block area (1024) is reconstructed), which has a slower access speed than the cache memory.
[0116] In the above examples, the cache memory has a total memory space of 1 (maximum) CTU size. The examples may be appropriately adjusted for other suitable CTU sizes. It should be noted that in some examples, the cache memory is referred to as a reference sample memory.
[0117] The proposed methods may be used alone or in combination in any order. In addition, each of the method (or embodiment), encoder, and decoder may be implemented by a processing circuit (e.g., one or more processors or one or more integrated circuits). In one example, one or more processors execute a program stored in a non-volatile computer-readable medium. In the following, the term block may be understood as a prediction block, a codec block, or a codec unit (i.e., CU).
[0118] Various aspects of the present disclosure provide techniques for adjusting the search range when the CTU size changes to, for example, less than a maximum CTU size. In an embodiment, a designated memory for storing reference samples of previously decoded CUs for future intra-block copy references is referred to as a reference sample memory (referred to as a cache memory in some examples). In the present disclosure, a method for improving intra-block copy performance under certain reference area constraints is proposed. More specifically, the size of the reference sample memory used for searching is limited. In the following discussion, the size of the reference sample memory is fixed to 128x128 luma block samples (together with corresponding chroma samples). In some examples (e.g., in the VVC standard), a maximum CTU size of reference samples is considered to be a specified memory size. The proposed method can be further extended to different memory size / CTU size combinations, such as 64x64 luma block samples (plus corresponding chroma samples) for CTU size and 128x128 luma block samples (and corresponding chroma samples) for memory size, etc.
[0119] According to aspects of the present disclosure, a collocated block in the present disclosure refers to a pair of blocks of the same size and shape, one block in the collocated block is in a previously encoded CTU, the other block in the collocated block is in the current CTU, and one block in the pair is referred to as a collocated block of the other block in the pair. In addition, when the memory buffer size is designed to store a CTU of a maximum size (e.g., 128x128), then in the example, the previous CTU refers to a CTU with a CTU width luminance sample offset to the left of the current CTU. In addition, the two collocated blocks have the same position offset relative to the upper left corner of their own CTUs, respectively. Or in other words, in some examples, the collocated blocks are those two blocks that have the same y coordinate relative to the upper left corner of the picture, but have a CTU width difference from each other in the x coordinate.
[0120] Fig.11 An example of a concatenated block according to some embodiments of the present disclosure is shown. Fig.11 In the example of FIG, the current CTU and the left CTU during decoding are shown. The reconstructed area is shown in gray, while the area to be reconstructed is shown in white. Fig.11 Three examples of reference blocks in a CTU to the left of a current block in intra block copy mode during decoding are shown. The three examples are shown as reference block 1, reference block 2 and reference block 3. Fig.11 Also shown are collocated block 1 of reference block 1, collocated block 2 of reference block 2, and collocated block 3 of reference block 3. Fig.11In the example of , the size of the reference sample memory is the CTU size. The reconstructed samples of the current CTU and the left CTU are stored in the reference sample memory in a complementary manner. When the reconstructed samples of the current CTU are written to the reference sample memory, the reconstructed samples are written to the positions in the collated samples in the left CTU. In an example, for reference block 3, because collated block 3 is located in the current CTU, reconstruction has not yet been performed in the current CTU, so reference block 3 can be found from the reference sample memory. The reference sample memory still stores samples of reference block 3 from the left CTU, and fast access can be performed to retrieve samples of reference block 3, and in the example, reference block 3 can be used to reconstruct the current block in intra block copy mode.
[0121] In another example, for reference block 1, the collocated block 1 in the current CTU has been reconstructed, so the reference sample memory stores samples of the collocated block 1, and the samples of the reference block 1 have been stored in, for example, an off-chip storage, which has a relatively high latency compared to the reference sample memory. Therefore, in the example, the reference block 1 cannot be found in the reference sample memory, and in the example, the reference block 1 cannot be used to reconstruct the current block in the intra block copy mode.
[0122] Similarly, in another example, for reference block 2, a portion of collocated block 2 has been reconstructed, so the reference sample memory has been updated to store samples of collocated block 2. Therefore, in the example, reference block 2 cannot be a valid reference block, which is used to reconstruct the current block in intra block copy mode.
[0123] In some embodiments, whether the reference block is available is determined according to the block vector; when it is determined that the reference block is available, at least one sample of the current block is reconstructed according to the reconstructed samples of the reference block.
[0124] In some embodiments, samples of a reference block are obtained from the reference sample memory according to the block vector; and the samples of the reference block are used as reconstruction samples of the reference block to reconstruct the current block.
[0125] Typically, in the intra block copy mode, for a reference block in a previously decoded CTU, when a collocated block in a current CTU has not yet been reconstructed, samples of the reference block are available in a reference sample memory, and the reference sample memory can be accessed to retrieve samples of the reference block for use as a reference for reconstruction in the intra block copy mode.
[0126] It should be noted that in the above example, the top left corner sample of the collocated block in the current CTU is checked, which is also called the top left corner collocated sample of the reference block. When the collocated sample in the current CTU has not been reconstructed, the remaining samples of the reference block will all be used as references in intra block copying.
[0127] It should be noted that in the above example, the memory size of the reference sample memory is the size of one CTU, and the previously decoded CTU represents the CTU closest to the left side of the current CTU.
[0128] According to an aspect of the present disclosure, the memory size of the reference sample memory may be larger than the size of one CTU.
[0129] Fig.12 An example of a concatenated block according to some embodiments of the present disclosure is shown. Fig.12 In the example of , the reference sample memory is configured to have N times (N is an integer equal to or greater than 2) the CTU size, so the reference sample memory can store reconstructed samples, the reconstructed samples are from N+1 CTUs, such as the current CTU (1210), the farthest left CTU (1230), and one or more mid-left CTUs (1220) between the current CTU (1210) and the farthest left CTU (1230), as shown in FIG. Fig.12 As shown. The number of left CTUs is equal to N-1. The reconstructed samples of the current CTU (1210) and the farthest CTU on the left (1230) are stored in a reference sample memory in a complementary manner. In order to store the reconstructed samples of the current CTU (1210) in the reference sample memory, the reconstructed samples of the current CTU (1210) are written into the position of the collocated samples of the farthest CTU on the left (1230). The reconstructed area is shown in gray, while the area to be reconstructed is shown in white. In some embodiments, the left CTUs are numbered from the nearest CTU on the left to the farthest CTU on the left. For example, the nearest CTU on the left of the current CTU 120 is the first left CTU, the farthest CTU on the left 1230 is the Nth CTU on the left, and the CTU on the right of the farthest CTU on the left is the (N-1)th CTU on the left.
[0130] It should be noted that Fig.12 In the example of , the reference sample memory size is N times the CTU size, so during reconstruction of samples in the current CTU (1210), the samples of the left center CTU (1220) are all available. However, the samples of the farthest left CTU (1230) are partially available in the reference sample memory and are subject to similar constraints, such as Fig.11For example, three examples of reference blocks in the CTU (1230) furthest to the left of the current block in the intra block copy mode during decoding are shown as reference block 1, reference block 2, and reference block 3. Fig.12 Also shown are collocated block 1 of reference block 1, collocated block 2 of reference block 2, and collocated block 3 of reference block 3. In this case, the x-coordinate offset between a pair of collocated blocks or between samples will be N times the CTU width. Fig.12 Other descriptions are similar to Fig.11 , and have been provided above and will be omitted here for clarity.
[0131] It should be noted that in some examples, the portion of the reconstructed samples of the farthest left CTU (1230) and the portion of the reconstructed samples of the current CTU (1210) are complementary in the reference sample memory. When the samples of the current CTU (1210) are reconstructed, the reconstructed samples of the current CTU (1210) are written in the reference sample memory in the location of the reconstructed samples of the farthest left CTU (1230). The reconstructed samples of the farthest left CTU (1230) have been written to the main memory before being overwritten with the reconstructed samples of the current CTU (1210) in the reference sample memory.
[0132] It should be noted that Fig.12 The example can be used for the case where the reference sample memory size is equal to or greater than the CTU size. For example, when the reference sample memory size is four times the CTU size, the one or more left middle CTUs (1220) include three CTUs, and when the reference sample memory size is sixteen times the CTU size, the one or more left middle CTUs (1220) include fifteen CTUs. In the example, when the reference sample memory size is equal to the CTU size, there is no left middle CTU (1220).
[0133] Aspects of the present disclosure provide techniques for search range adjustment in intra block copy mode when the current CTU size is less than the maximum CTU size and the reference sample memory size is equal to 1 maximum CTU size. The reference sample memory can then buffer multiple previously decoded CTUs. When the reference block is from the nearest CTU on the left, no additional conditional check is required for availability. In this case, the entire left CTU can be used for intra block copy reference. In some embodiments, a unified conditional check is used for the case where the current CTU size is equal to the maximum CTU size and the case where the current CTU size is less than the maximum CTU size.
[0134] Various parameters are used in the description of the following embodiments.
[0135] MaxCtbLog2SizeY represents the maximum allowed CTU size on one side (height or width) in the log2 domain when the CTU is square in shape. For example, when the maximum allowed CTU is 128x128 luma block samples high, MaxCtbLog2SizeY is equal to 7.
[0136] In the log2 domain, CtbLog2SizeY represents the CTU size on one side (height or width) when the CTU is in a square shape.
[0137] CbHeight represents the height of the codec block (also called the current block); cbWidth represents the width of the codec block. The position of the upper left corner of the codec block is represented as (xCb, yCb), the position of the upper right corner of the codec block is represented as (xCb+cbWidth-1, yCb), and the position of the lower left corner of the codec block is represented as (xCb, yCb+cbHeight-1).
[0138] mvL0 represents a block vector, mvL0[0] represents the x component of the block vector mvL0, with a resolution of 1 / 16 pixels, and mvL0[1] represents the y component of the block vector mvL0, with a resolution of 1 / 16 pixels. Therefore, the integer value of the x component is obtained by shifting mvL0[0] right by four bits, and the integer value of the y component is obtained by shifting mvL0[1] right by four bits.
[0139] According to some aspects of the present disclosure, a two-step constraint process is used to constrain the block vector mvL0 to determine whether mvL0 is a valid block vector pointing to a reference block in an intra block copy mode, and the reference block is completely stored in a reference sample memory. Therefore, the reference sample memory can be accessed without obtaining reference samples from a main memory (e.g., an off-chip memory).
[0140] In a first step, the block vector mvL0 is checked to determine whether the block vector is among the potential valid block vectors pointing to a CTU-based search range that includes any CTU with all or part of the reconstructed samples in the reference sample memory. For example, the CTU-based search range includes the current CTU, the farthest left CTU, and any left CTUs between the current CTU and the farthest left CTU. In the example, the CTU size is equal to the maximum allowed CTU size, then the CTU-based search range includes the current CTU and the farthest left CTU (in Fig.11 The middle CTU is called the left CTU), and there is no left middle CTU between the current CTU and the CTU far to the left.
[0141] When the block vector mvL0 is a potentially valid block vector, the block vector mvL0 is further checked in the second step to determine whether the block vector is a valid block vector. For example, in the second step, when the block vector points to a reference block in the left middle CTU, the block vector is a valid block vector. In the second step, when the block vector points to a reference block in the farthest left CTU, the block vector mvL0 is further checked to determine whether a collocated block of the reference block has been reconstructed.
[0142] In a first embodiment, the CTU size is equal to the maximum allowed CTU size, so the reconstructed samples stored in the reference sample memory are from the current CTU or the CTU farthest to the left ( Fig.11 left CTU in Figure 5).
[0143] In a first step, mvL0 is checked to determine if the block vector points to a CTU-based search range that includes the current CTU and the CTU furthest to the left. In some examples, CTUs with the same y value form CTU rows, and CTUs with the same x value form CTU columns. In some examples, the constraints for the block vector mvL0 are expressed by Equations 1 to 4:
[0144] (yCb+(mvL0[1]>>4))>>CtbLog2SizeY=yCb>>CtbLog2SizeY (Equation 1)
[0145] (yCb+(mvL0[1]>>4)+cbHeight-1)>>CtbLog2SizeY=yCb>>CtbLog2SizeY (Equation 2)
[0146] (xCb+(mvL0[0]>>4))>>CtbLog2SizeY>=(xCb>>CtbLog2SizeY)–1 (Equation 3)
[0147] (xCb+(mvL0[0]>>4)+cbWidth-1)>>CtbLog2SizeY<=(xCb>>CtbLog2SizeY) (Equation 4)
[0148] When Equation 1 is satisfied, the top of the reference block is in the same CTU row as the current block. When Equation 2 is satisfied, the bottom of the reference block is in the same CTU row as the current block. When Equation 3 is satisfied, in the example, the left side of the reference block is in the same CTU column as the current block, or in the CTU column closest to the left side of the current block. When Equation 4 is satisfied, in the example, the right side of the reference block is in the same CTU column as the current block, or in the CTU column to the left of the current block. Therefore, when Equations 1 to 4 are satisfied in the example, the reference block is within the CTU-based search range.
[0149] In the second step, when the reference block is in the CTU farthest to the left, for example, when Equation 5 is satisfied, the block vector mvL0 is checked to determine whether the collocated block of the reference block has been reconstructed.
[0150] (xCb+(mvL[0]>>4))>>CtbLog2SizeY=(xCb>>CtbLog2SizeY)–1 (Equation 5)
[0151] In the example, the upper left corner of the current block is (xCb, yCb), the upper left corner of the reference block is (xCb+(mvL[0]>>4), yCb+(mvL0[1]>>4)), and the upper left corner of the collocated block of the reference block is (xCb+(mvL[0]>>4)+(1<<CtbLog2SizeY),yCb+(mvL0[1]> >4)). In the example, the upper left corner of the collocated block is used to check a map, which is used to track the reconstruction process of the picture. When the position on the map is "false" (which indicates that the collocated block has not been reconstructed in the example), the reference block is therefore available in the reference sample memory and can be used to reconstruct the current block in the intra-frame block copy mode. Then, the block vector is a valid block vector. However, when the position on the map is "true" (which indicates that at least a part of the collocated block has been reconstructed in the example), the samples of the collocated block have been stored in the reference sample memory at the position of the samples of the reference block, and the samples of the reference block are not available in the reference sample memory. Then, the block vector mvL0 is not a valid block vector.
[0152] In the first embodiment, the second step is based on the collocated block, and the process in the first embodiment is referred to as a codec unit (CU)-based update process.
[0153] In the second embodiment, the second step is based on block regions. For example, when a CTU has 128x128 samples, the CTU can be divided into four block regions, each with 64x64 samples. Similarly, in the second embodiment, the CTU size is equal to the maximum allowed CTU size, so the reconstructed samples stored in the reference sample memory are from the current CTU or the farthest CTU to the left ( Fig.11 left CTU in Figure 5).
[0154] In the first step, using a similar manner to the first embodiment, for example using Equations 1 to 4, the block vector mvL0 is checked to determine whether the block vector mvL0 points to a CTU-based search range that includes the current CTU and the farthest left CTU.
[0155] In the second step, when the reference block is in the CTU farthest to the left, for example, when Equation 5 is satisfied, the block vector mvL0 is checked to determine whether a collocated block region (eg, a 64×64 block region) of the reference block has been reconstructed.
[0156] In the example, the upper left corner of the current block is (xCb, yCb), the upper left corner of the reference block is (xCb+(mvL[0]>>4), yCb+(mvL0[1]>>4)), and the upper left corner of the collocated block area of the reference block is (((xCb+(mvL[0]>>4)+(1<<CtbLog2SizeY))> >(CtbLog2SizeY–1))<<(CtbLog2SizeY–1),((yCb+(mvL0[1]>>4))>>(CtbLog2SizeY–1))<<(CtbLog2SizeY–1)). In the example, the upper left corner of the collocated block area is used to check a map, which is used to track the reconstruction process of the picture. When the position on the map is "false" (which indicates that the collocated block area has not been reconstructed in the example), the reference block is available in the reference sample memory and can be used to reconstruct the current block in the intra-frame block copy mode. Then, the block vector is a valid block vector. However, when the position on the map is "true" (which indicates that the collocated block area has been reconstructed or partially reconstructed in the example), the block vector mvL0 is not a valid block vector.
[0157] In the second embodiment, the second step is based on the collocated block region, and the process in the second embodiment is called a block region-based update process. In the second embodiment, when any sample of the 64x64 block region (collocated block region) in the current CTU has been reconstructed, the corresponding region in the reference sample memory to which the collocated sample (of the current sample) belongs will not be available for intra block copy reference.
[0158] According to aspects of the present disclosure, the CTU size generally changes with doubling or halving of width and / or height. In an example, when the width and height are halved, a reference sample memory of 1 maximum CTU size can store samples of 4 CTUs.
[0159] In some embodiments, when the current CTU size CtbLog2SizeY in the Log2 domain is used, the number of CTUs storing reference sample data in the reference sample storage buffer will be a variable that depends on the relationship between MaxCtbLog2SizeY and CtbLog2SizeY.
[0160] In the third embodiment, the CTU size is CtbLog2SizeY in the Log2 domain, so the reconstructed samples stored in the reference sample memory are from any one of the current CTU, the farthest left CTU, and one or more left middle CTUs located between the current CTU and the farthest left CTU.
[0161] In a first step, block mvL0 is checked to determine whether the block vector mvL0 points to a CTU-based search range that includes the current CTU, the farthest left CTU, and one or more left-center CTUs. In some examples, the constraints for the block vector mvL0 are expressed by Equations 6 to 9:
[0162] (yCb+(mvL0[1]>>4))>>CtbLog2SizeY=yCb>>CtbLog2SizeY Equation 6
[0163] (yCb+(mvL0[1]>>4)+cbHeight-1)>>CtbLog2SizeY=yCb>>CtbLog2SizeY Equation 7
[0164] (xCb+(mvL0[0]>>4))>>CtbLog2SizeY>=(xCb>>CtbLog2SizeY)–1<<(2*(MaxCtbLog2SizeY–CtbLog2SizeY)) Equation 8
[0165] (xCb+(mvL0[0]>>4)+cbWidth-1)>>CtbLog2SizeY<=(xCb>>CtbLog2SizeY) Equation 9
[0166] When Equation 6 is satisfied, the top of the reference block is in the same CTU row as the current block. When Equation 7 is satisfied, the bottom of the reference block is in the same CTU row as the current block. When Equation 8 is satisfied, in the example, the left side of the reference block is in the same CTU column as the current CTU, one or more left-center CTUs, and one of the farthest left CTUs. When Equation 9 is satisfied, the right side of the reference block is in the same CTU column as one of the current CTUs, or in a CTU to the left of the current CTU (e.g., one or more left-center CTUs, the farthest left CTU, etc.). Therefore, in the example, when Equations 6 to 9 are satisfied, the reference block is within the CTU-based search range.
[0167] When the block vector mvL0 is a potential valid block vector, the block vector mvL0 is further checked in the second step to determine whether the block vector is a valid block vector. For example, in the second step, when the block vector points to a reference block in the left middle CTU, for example, when Equation 10 is not satisfied, the block vector is a valid block vector. In an example, in the second step, when the reference block is in the CTU farthest to the left, for example, when Equation 10 is satisfied, the block vector mvL0 is further checked to determine whether a collocated block of the reference block has been reconstructed.
[0168] (xCb+(mvL[0]>>4))>>CtbLog2SizeY=(xCb>>CtbLog2SizeY)–(1<<(2*(MaxCtbLog2SizeY–CtbLog2SizeY))) Equation 10
[0169] In the example, the upper left corner of the current block is (xCb, yCb), then the upper left corner of the reference block is (xCb+(mvL[0]>>4), yCb+(mvL0[1]>>4)), and the upper left corner of the collocated block of the reference block is (xCb+(mvL[0]>>4)+(1<<4^(MaxCtbLog2SizeY-CtbLog2SizeY)), yCb+(mvL0[1]>>4)). In the example, the upper left corner of the collocated block is used to check a map, which is used to track the reconstruction process of the picture. When the position on the map is "false" (which indicates that the collocated block is not reconstructed in the example), the reference block is available in the reference sample memory and can be used to reconstruct the current block in intra block copy mode. Then, the block vector is a valid block vector. However, when the position on the map is "true" (which in the example indicates that at least a part of the collocated block has been reconstructed), the samples of the collocated block have therefore been stored in the reference sample memory at the positions of the samples of the reference block, and the samples of the reference block are not available in the reference sample memory. Then, the block vector mvL0 is not a valid block vector.
[0170] In the third embodiment, the second step is based on a collocated block, and the process in the third embodiment is referred to as a CU-based update process.
[0171] In the fourth embodiment, the second step is based on the block region. For example, when the CTU size in the Log2 domain is CtbLog2SizeY and the block region size in the Log2 domain is CtbLog2SizeY-1, the CTU can be divided into four block regions of the same size. Similarly, in the fourth embodiment, the reconstructed samples stored in the reference sample memory are from the current CTU, the farthest left CTU, and one or more left middle CTUs located between the current CTU and the farthest left CTU.
[0172] In the first step, using a manner similar to the third embodiment, for example, using Equations 6 to 9, the block vector mvL0 is checked to determine whether the block vector mvL0 is a potential valid block vector pointing to a CTU-based search range, the CTU-based search range including the current CTU, the farthest left CTU, and one or more left-center CTUs between the current CTU and the farthest left CTU.
[0173] When the block vector mvL0 is a potentially valid block vector, the block vector mvL0 is further checked in the second step to determine whether the block vector is a valid block vector. For example, in the second step, when the block vector points to a reference block in the left middle CTU, for example, when Equation 10 is not satisfied, the block vector is a valid block vector. In the second step, when the reference block is in the farthest left CTU, for example, when Equation 10 is satisfied, the block vector mvL0 is checked to determine whether a collocated block region of the reference block has been reconstructed.
[0174] In the example, the upper left corner of the current block is (xCb, yCb), then the upper left corner of the reference block is (xCb+(mvL[0]>>4), yCb+(mvL0[1]>>4)), and the upper left corner of the collocated block area of the reference block is (((xCb+(mvL[0]>>4)+(1<<4^(MaxCtbLog2SizeY-CtbLog2SizeY)))>>(CtbLog2SizeY–1))<<(CtbLog2SizeY–1), ((yCb+(mvL0[1]>>4))>>(CtbLog2SizeY–1))<<(CtbLog2SizeY–1)). In the example, the upper left corner of the collocated block area is used to check a map, which is used to track the reconstruction process of the picture. When the position on the map is "false" (in the example it indicates that the collocated block area has not been reconstructed), the reference block is therefore available in the reference sample memory and can be used to reconstruct the current block in the intra block copy mode. Then, the block vector is a valid block vector. However, when the position on the map is "true" (in the example it indicates that the collocated block area has been reconstructed or partially reconstructed), the block vector mvL0 is not a valid block vector.
[0175] In the fourth embodiment, the second step is based on the collocated block region, and the process in the fourth embodiment is called a block region-based update process. In the fourth embodiment, when any sample of the collocated block region (for the reference block) in the current CTU has been reconstructed, the corresponding area in the reference sample memory storing the samples of the collocated block region will not be available for intra block copy reference.
[0176] According to some aspects of the present disclosure, the CTU farthest to the left is intentionally excluded from the search area, and then a one-step constraint process is used to constrain the block vector mvL0 to determine whether mvL0 is a valid block vector, which points to a reference block in an intra block copy mode and the reference block is completely stored in a reference sample memory.
[0177] In the fifth embodiment, similar to the third embodiment, the CTU size is CtbLog2SizeY in the Log2 domain, so the reconstructed samples stored in the reference sample memory are from any one of the current CTU, the farthest left CTU, and one or more left middle CTUs located between the current CTU and the farthest left CTU. In the fifth embodiment, a one-step check is used to determine whether the block vector mvL0 points to a search range including the current CTU and one or more left middle CTUs. Note that in the fifth embodiment, the farthest left CTU is excluded from the search range. In some examples, the constraints on the block vector mvL0 are expressed by Equations 11 to 14:
[0178] (yCb+(mvL0[1]>>4))>>CtbLog2SizeY=yCb>>CtbLog2SizeY Equation 11
[0179] (yCb+(mvL0[1]>>4)+cbHeight-1)>>CtbLog2SizeY=yCb>>CtbLog2SizeY Equation 12
[0180] (xCb+(mvL0[0]>>4))>>CtbLog2SizeY>(xCb>>CtbLog2SizeY)–1<<(2*(MaxCtbLog2SizeY–CtbLog2SizeY)) Equation 13
[0181] (xCb+(mvL0[0]>>4)+cbWidth-1)>>CtbLog2SizeY>(xCb>>CtbLog2SizeY)–1<<(2*(MaxCtbLog2SizeY–CtbLog2SizeY)) Equation 14
[0182] When equation 11 is satisfied, the top of the reference block is in the same CTU row as the current block. When equation 12 is satisfied, the bottom of the reference block is in the same CTU row as the current block. When equation 13 is satisfied, in the example, the left side of the reference block is in the same CTU column as the current CTU and one of the one or more left-center CTUs. When equation 14 is satisfied, in the example, the right side of the reference block is in the same CTU column as the current CTU and one of the one or more left-center CTUs. Therefore, when equations 11 to 14 are satisfied in the example, the reference block is in the search range and the block vector mvL0 is a valid block vector.
[0183] Fig.13 A flowchart outlining a method (1300) according to an embodiment of the present disclosure is shown. The method (1300) can be used in the reconstruction of a block that is encoded and decoded in intra-frame mode to generate a prediction block for the block being reconstructed. In various embodiments, the method (1300) 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 decoder (410), a processing circuit that performs the functions of a video decoder (510), a processing circuit that performs the functions of a video encoder (603), etc. In some embodiments, the method (1300) is implemented by software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the method (1300). The method starts at (S1301) and proceeds to (S1310).
[0184] At (S1310), prediction information of a current block in a current CTU is decoded from an encoded video stream. The prediction information indicates an intra-frame block copy mode. The size of the current CTU is smaller than the maximum size corresponding to the storage capacity of the reference sample memory. In some examples, the reference sample memory has a faster access speed than a main memory, which is used to store reconstructed samples from the encoded video stream. For example, the reference sample memory is an on-chip memory located on the same chip as the decoder circuit, while the main memory is an off-chip memory that is outside the chip having the decoder circuit. It should be noted that in some examples, the reference sample memory can be implemented using an off-chip memory.
[0185] At (S1320), a block vector is determined, the block vector pointing to a reference block, the reference block being in the same picture as the current block, the reference block having reconstructed samples buffered in a reference sample memory. In some embodiments, a search area is defined to include CTUs having reconstructed samples, such as the current CTU, one or more left center CTUs, and the farthest left CTU, the reconstructed samples being buffered in the reference sample memory. The farthest left CTU has at least one reconstructed sample that has been overwritten by a reconstructed sample of the current CTU in the reference sample memory.
[0186] At (S1330), the current block is reconstructed according to the block vector and the reconstructed samples of the reference block retrieved from the reference sample memory. For example, the reference sample memory is accessed to retrieve the reconstructed samples of the reference block, and then the samples of the current block are reconstructed based on the reconstructed samples retrieved from the reference sample memory. Then, the method proceeds to (S1399) and ends.
[0187] The above techniques may be implemented as computer software via computer-readable instructions and physically stored in one or more computer-readable media. Fig.14 A computer system (1400) is shown that is suitable for implementing certain embodiments of the disclosed subject matter.
[0188] 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.
[0189] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablets, servers, smartphones, gaming devices, IoT devices, etc.
[0190] Fig.14 The components shown for the computer system (1400) 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 (1400).
[0191] The computer system (1400) 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).
[0192] The human-computer interface input device may include one or more of the following (only one of which is drawn): keyboard (1401), mouse (1402), touchpad (1403), touch screen (1410), data gloves (not shown), joystick (1405), microphone (1406), scanner (1407), camera (1408).
[0193] The computer system (1400) 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 (1410), a data glove (not shown), or a joystick (1405), but there may also be tactile feedback devices that are not used as input devices), audio output devices (e.g., speakers (1409), headphones (not shown)), visual output devices (e.g., screens (1410) 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).
[0194] The computer system (1400) 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) (1420) with CD / DVD or similar media (1421), thumb drives (1422), removable hard disk drives or solid state drives (1423), 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.
[0195] 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.
[0196] The computer system (1400) 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 (1449) (e.g., a USB port of the computer system (1400)); other systems are typically integrated into the core of the computer system (1400) 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 (1400) 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.
[0197] The above-mentioned human-machine interface devices, human-accessible storage devices, and network interfaces may be connected to the core (1440) of the computer system (1400).
[0198] The core (1440) may include one or more central processing units (CPUs) (1441), graphics processing units (GPUs) (1442), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1443), hardware accelerators for specific tasks (1444), etc. These devices, as well as read-only memory (ROM) (1445), random access memory (1446), internal mass storage (e.g., internal non-user accessible hard disk drives, solid-state drives, etc.) (1447), etc., may be connected via a system bus (1448). In some computer systems, the system bus (1448) may be accessed in the form of one or more physical plugs so that it can be expanded by additional central processing units, graphics processing units, etc. Peripheral devices may be directly attached to the core's system bus (1448), or connected via a peripheral bus (1449). The architecture of the peripheral bus includes PCI, USB, etc.
[0199] The CPU (1441), GPU (1442), FPGA (1443) and accelerator (1444) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (1445) or RAM (1446). Transition data can also be stored in RAM (1446), while permanent data can be stored in, for example, internal mass storage (1447). 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 (1441), GPUs (1442), mass storage (1447), ROM (1445), RAM (1446), etc.
[0200] 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.
[0201] As an example and not a limitation, a computer system having an architecture (1400), in particular a core (1440), 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 (1440) having non-volatility, such as a core internal mass storage (1447) or a ROM (1445). Software implementing various embodiments of the present application can be stored in such a device and executed by the core (1240). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software can enable the core (1440), 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 (1446) 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 (1444)) 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.
[0202] Appendix A: Acronyms
[0203] JEM: Joint Development Model
[0204] VVC: Versatile Video Coding
[0205] BMS: Benchmark Collection
[0206] MV: Motion Vector
[0207] HEVC: High Efficiency Video Coding
[0208] SEI: Supplemental Enhancement Information
[0209] VUI: Video Availability Information
[0210] GOP: Group of Pictures
[0211] TU: Transform Unit
[0212] PU: prediction unit
[0213] CTU: Coding Tree Unit
[0214] CTB: Coding Tree Block
[0215] PB: prediction block
[0216] HRD: Hypothesized Reference Decoder
[0217] SNR: Signal to Noise Ratio
[0218] CPU: Central Processing Unit
[0219] GPU: Graphics Processing Unit
[0220] CRT: cathode ray tube
[0221] LCD: Liquid Crystal Display
[0222] OLED: Organic Light Emitting Diode
[0223] CD: compact disc
[0224] DVD: Digital Video Disc
[0225] ROM: Read Only Memory
[0226] RAM: Random Access Memory
[0227] ASIC: Application-Specific Integrated Circuit
[0228] PLD: Programmable Logic Device
[0229] LAN: Local Area Network
[0230] GSM: Global System for Mobile Communications
[0231] LTE: Long Term Evolution
[0232] CANBus: Controller Area Network Bus
[0233] USB: Universal Serial Bus
[0234] PCI: Peripheral Component Interconnect
[0235] FPGA: Field Programmable Gate Array
[0236] SSD: Solid State Drive
[0237] IC: Integrated Circuit
[0238] CU: Coding Unit
[0239] 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: Decoding prediction information of a current block in a current coding tree unit CTU from an encoded video bitstream, the prediction information indicating an intra block copy mode, the size of the current CTU being smaller than a maximum size of a reference sample memory, the reference sample memory being used to store reconstructed samples; Checking whether a reference block of the current CTU is at least partially located in an Nth CTU on the left side of the current CTU, where the Nth CTU on the left side and the current CTU are in the same CTU row; determining whether a block vector pointing to the reference block is available, the reference block associated with a reconstructed sample buffered in the reference sample memory; as well as When the reference block is at least partially located in the Nth CTU on the left and the block vector is available, reconstructing at least one sample of the current block according to the block vector and a reconstructed sample of the reference block; The step of determining whether the block vector pointing to the reference block is available comprises: Determine a reference block region in the left Nth CTU, where the reference block region includes the reference block; determining whether a collocated block region of the reference block region in the current CTU is at least partially reconstructed; and When the collocated block region in the current CTU is at least partially reconstructed, the block vector pointing to the reference block in the reference block region is invalidated.
2. The method according to claim 1, characterized in that The method further comprises: Numbering the CTUs on the left side of the current CTU from the CTU closest to the left side of the current CTU to the CTU farthest to the left side; The CTU closest to the left side of the current CTU is the first left CTU, the CTU farthest to the left side of the current CTU is the Nth CTU on the left side, and the CTU on the right side of the CTU farthest to the left side is the N-1th CTU on the left side.
3. The method according to claim 2, characterized in that The method further comprises: The reference samples of the current CTU and the left N-th CTU are stored in a reference sample memory in a complementary manner.
4. The method according to claim 3, characterized in that The storing the reference samples of the current CTU and the Nth CTU on the left in a reference sample memory in a complementary manner includes: The reference sample of the current CTU is written into a position of a collocated sample of a left N-th CTU, so that the reference sample of the current CTU is stored in a reference sample memory.
5. The method according to claim 1, characterized in that Further including: checking whether the top boundary of the reference block is in the same CTU row; checking whether a bottom boundary of the reference block is in the same CTU row; Check whether the left boundary of the reference block is on the right side of the Nth CTU on the left; as well as Check whether the right boundary of the reference block is on the left side of the current CTU.
6. The method according to claim 1, characterized in that Further including: Check whether the left side of the reference block is in the left Nth CTU.
7. The method according to any one of claims 1 to 6, characterized in that: Further including: determining whether the reference block is available according to the block vector; When it is determined that the reference block is available, at least one sample of the current block is reconstructed according to the reconstructed samples of the reference block.
8. The method according to any one of claims 1 to 6, characterized in that: Further including: According to the block vector, obtaining samples of a reference block from the reference sample memory; The samples of the reference block are used as reconstructed samples of the reference block to reconstruct the current block.
9. A video decoding device, characterized in that: include: Processing circuitry for: Decoding prediction information of a current block in a current coding tree unit CTU from an encoded video bitstream, the prediction information indicating an intra block copy mode, the size of the current CTU being smaller than a maximum size of a reference sample memory, the reference sample memory being used to store reconstructed samples; Checking whether a reference block of the current CTU is at least partially located in an Nth CTU on the left side of the current CTU, where the Nth CTU on the left side and the current CTU are in the same CTU row; determining whether a block vector pointing to the reference block is available, the reference block associated with a reconstructed sample buffered in the reference sample memory; as well as When the reference block is at least partially located in the Nth CTU on the left and the block vector is available, reconstructing at least one sample of the current block according to the block vector and the reconstructed sample of the reference block; The step of determining whether the block vector pointing to the reference block is available comprises: Determine a reference block region in the left Nth CTU, where the reference block region includes the reference block; determining whether a collocated block region of the reference block region in the current CTU is at least partially reconstructed; and When the collocated block region in the current CTU is at least partially reconstructed, the block vector pointing to within the reference block region is invalidated.
10. The device according to claim 9, characterized in that The processing circuit is further configured to: Numbering the CTUs on the left side of the current CTU from the CTU closest to the left side of the current CTU to the CTU farthest to the left side; The CTU closest to the left side of the current CTU is the first left CTU, the CTU farthest to the left side of the current CTU is the Nth CTU on the left side, and the CTU on the right side of the CTU farthest to the left side is the N-1th CTU on the left side.
11. The device according to claim 10, characterized in that The processing circuit is further configured to: The reference samples of the current CTU and the left N-th CTU are stored in a reference sample memory in a complementary manner.
12. The device according to claim 11, characterized in that The processing circuit is configured to: The reference sample of the current CTU is written into a position of a collocated sample of a left N-th CTU, so that the reference sample of the current CTU is stored in a reference sample memory.
13. The device according to claim 9, characterized in that The processing circuit is further configured to: checking whether the top boundary of the reference block is in the same CTU row; checking whether a bottom boundary of the reference block is in the same CTU row; Check whether the left boundary of the reference block is on the right side of the Nth CTU on the left; as well as Check whether the right boundary of the reference block is on the left side of the current CTU.
14. The device according to claim 9, characterized in that The processing circuit is further configured to: Check whether the left side of the reference block is in the left Nth CTU.
15. A non-volatile computer-readable medium storing instructions, characterized in that: When the instructions are executed by a video decoding computer, the computer is caused to perform the method according to any one of claims 1 to 8.
16. A computing device, characterized in that: The method comprises a processor and a memory; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Features of intra block copy prediction mode for video and image coding and decoding
CN105765974A
Method and apparatus of current picture referencing for video coding
CN109076210A