Method and related device for video encoding and decoding
By adjusting the intra prediction direction and optimizing intra prediction for non-square blocks, the problem of low encoding efficiency of non-square blocks in the prior art is solved, and more efficient video encoding processing is achieved.
Patent Information
- Application Number
- CN202211619997.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-28
- Filing Date
- 2019-05-29
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2039-05-29
AI Technical Summary
In the existing video processing technology, intra prediction has low encoding efficiency for non-square blocks, especially due to the excessive number of directions used, resulting in poor processing efficiency.
By determining the block size of the non-square block, and determining the intra prediction direction for the non-square block according to the intra prediction direction for the square block. Specifically, unnecessary intra prediction direction subranges are removed, thereby optimizing the intra prediction direction of non-square blocks and reducing the number of directions used.
The intra prediction efficiency of non-square blocks is improved, the processing efficiency is optimized, and the number of directions used is reduced, thereby improving the performance of video encoding.
Smart Images

Figure CN116095344B_ABST
Abstract
Description
[0001] Cross-references
[0002] The present disclosure is a divisional application with application number CN201980023370.8, which claims priority to U.S. patent application No. 16 / 147,284 filed on September 28, 2018, which claims priority to U.S. provisional application No. 62 / 679,664 filed on June 1, 2018, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to video processing technology, and more particularly to a method and related device for video encoding and decoding. Background Art
[0004] The background description provided herein is for the purpose of generally presenting the context of the present disclosure. To the extent that the work described in this background section may not qualify as prior art in certain aspects of the present invention as well as the specification at the time of filing, it is neither explicitly nor implicitly admitted to be prior art against the present disclosure.
[0005] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can include a series of pictures, each picture having spatial dimensions, such as 1920×1080 luminance samples and associated chrominance samples. The series of pictures can have a fixed or variable picture rate (also informally referred to as a frame rate) of, for example, 60 pictures per second or 60Hz. Uncompressed video has high bit rate requirements. For example, 1080r604:2:0 video with 8 bits per sample (1920×1080 luminance sample resolution at 60Hz frame rate) requires a bandwidth of nearly 1.5Gbit / s. One hour of such video requires more than 600GB of storage space.
[0006] One purpose of video encoding and decoding can be to reduce the redundancy of the input video signal through compression. Compression can help reduce the bandwidth or storage space requirements mentioned above, in some cases by two orders of magnitude or more. Lossless compression, lossy compression, and combinations thereof can be used. Lossless compression refers to a technique that can reconstruct an exact copy of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may be different from the original signal, but the distortion between the original signal and the reconstructed signal is small enough to make the reconstructed signal useful for the intended application. In the case of video, lossy compression is widely used. The amount of distortion tolerated depends on the application; for example, users of certain consumer streaming applications may tolerate higher distortion than users of TV contribution applications. The achievable compression ratio can reflect that higher allowable / tolerable distortion can produce higher compression ratios.
[0007] Video encoders and decoders may utilize techniques from several broad categories including, for example, motion compensation, transforms, quantization, and entropy coding.
[0008] Video coding techniques may include techniques known as intra-coding. In intra-coding, sample values are represented without reference to samples or other data from previously reconstructed reference pictures. In some video codecs, pictures are spatially subdivided into sample blocks. When all sample blocks are encoded in intra-mode, the picture may be an intra-picture. Intra-pictures and their derivatives, such as independent decoder refresh pictures, can be used to reset decoder states and can therefore be used as the first picture in an encoded video bitstream and video session or as a still image. Samples of intra-blocks can be transformed, and transform coefficients can be quantized before entropy coding. Intra-prediction can be a technique for minimizing sample values in the pre-transform domain. In some cases, the smaller the DC value after the transform and the smaller the AC coefficient, the fewer bits are required to represent the block after entropy coding at a given quantization step size.
[0009] Traditional intra-frame coding, such as known from, for example, MPEG-2 generation coding techniques, does not use intra-frame prediction. However, some newer video compression techniques include techniques for trying data blocks based on surrounding sample data and / or metadata obtained during, for example, spatially adjacent encoding / decoding and preceding in decoding order. Such techniques are hereinafter referred to as "intra-frame prediction" techniques. It should be noted that, in at least some cases, intra-frame prediction uses only reference data from the current picture being reconstructed, and does not use reference data from reference pictures.
[0010] There can be many different forms of intra-frame prediction. When more than one such technique can be used in a given video coding technique, the technique used can be encoded in the intra-frame prediction mode. In some cases, a mode can have sub-modes and / or parameters, and the sub-modes and / or parameters can be encoded separately or included in the mode codeword. Which codeword is used for a given mode / sub-mode / parameter combination can have an impact on the coding efficiency gain through intra-frame prediction, and therefore the entropy coding technique used to convert the codeword into a bitstream will also have an impact on the coding efficiency gain.
[0011] Some modes of intra prediction were introduced by H.264, refined in H.265, and further refined in newer coding techniques such as the Joint Exploration Model (JEM), Versatile Video Coding (VVC), Benchmark Set (BMS). A block of prediction values can be formed using neighboring sample values belonging to samples that are already available. Sample values of neighboring samples are copied into the prediction value block according to the direction. A reference to the direction used can be encoded in the bitstream, or it can itself be predicted.
[0012] However, currently, the number of bits used in intra-frame prediction in related technologies of video processing such as video decoding is too large, and how to improve intra-frame prediction of non-square blocks is an urgent problem to be solved. Summary of the invention
[0013] One aspect of the present disclosure provides a method for video encoding, the method comprising: determining at least one syntax element, the at least one syntax element indicating a block size of a non-square block to be encoded; determining a first set of intra-frame prediction directions for the non-square block based on the block size and according to a second set of intra-frame prediction directions for a square block, the first set of intra-frame prediction directions including a first angular subrange of the second set of intra-frame prediction directions, excluding a removed second angular subrange of the second set of intra-frame prediction directions; wherein the removed second angular subrange includes a first end of the second angular subrange but does not include a second end of the second angular subrange, the first end corresponding to an end of an angular range covered by the second set of intra-frame prediction directions; encoding the non-square block and the at least one syntax element based on the first set of intra-frame prediction directions for the non-square block.
[0014] Another aspect of the present disclosure provides an apparatus for video encoding. In some embodiments, the apparatus for video decoding includes a processing circuit. The processing circuit determines at least one syntax element, the at least one syntax element indicating the block size of the non-square block to be encoded; based on the block size, and according to the second set of intra-frame prediction directions for the square block, a first set of intra-frame prediction directions for the non-square block is determined, the first set of intra-frame prediction directions including the first angle sub-range of the second set of intra-frame prediction directions, excluding the removed second angle sub-range in the second set of intra-frame prediction directions; wherein the removed second angle sub-range includes the first end of the second angle sub-range, but does not include the second end of the second angle sub-range, the first end corresponds to one end of the angle range covered by the second set of intra-frame prediction directions; based on the first set of intra-frame prediction directions of the non-square block, the non-square block and the at least one syntax element are encoded.
[0015] Yet another aspect of the present disclosure provides a non-transitory computer-readable storage medium storing a program, which can be executed by at least one processor for video encoding to perform any of the methods for video encoding.
[0016] Another aspect of the present disclosure provides a computer device, which includes a processor and a memory: the memory is used to store program codes and transmit the program codes to the processor; the processor is used to execute the aforementioned method for video encoding according to instructions in the program codes.
[0017] It can be seen from the above scheme that some implementations of the present disclosure can improve intra prediction of non-square blocks. In addition, in some embodiments, the processing is performed by minimizing the number of directions used, thereby optimizing processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Additional features, properties, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:
[0019] Figure 1 is a schematic diagram of an exemplary intra prediction mode;
[0020] Figure 2 is another illustration of an exemplary intra prediction mode;
[0021] Figure 3 is a schematic diagram of a simplified block diagram of a communication system according to one embodiment;
[0022] Figure 4 is a schematic diagram of a simplified block diagram of a communication system according to another embodiment;
[0023] Figure 5 is a schematic diagram of a simplified block diagram of a decoder according to one embodiment;
[0024] Figure 6 is a schematic diagram of a simplified block diagram of an encoder according to one embodiment;
[0025] Figure 7 shows a block diagram of an encoder according to another embodiment;
[0026] Figure 8 shows a block diagram of a decoder according to another embodiment;
[0027] Fig. 9 A schematic diagram showing intra prediction of samples in a non-square block according to one embodiment;
[0028] Fig.10 A schematic diagram showing intra prediction of samples in a non-square block according to another embodiment;
[0029] Fig.11 A schematic diagram showing intra prediction of samples in a non-square block according to yet another embodiment;
[0030] Fig.12 A flowchart showing an overview process according to some embodiments of the present disclosure;
[0031] Fig.13 is a schematic diagram of a computer system according to one embodiment. DETAILED DESCRIPTION
[0032] For the Chinese meanings and English full names of the English abbreviations involved in this disclosure, please refer to Appendix A attached at the end of the specification.
[0033] Reference Figure 1 , depicted at the bottom right is a subset of nine known prediction value directions from the 33 possible prediction value directions of H.265. The point (101) where the arrows converge represents the sample being predicted. The arrows represent the direction in which the sample is predicted. For example, arrow (102) indicates that sample (101), i.e., point (101), is predicted based on one or more samples at an angle of 45 degrees to the horizontal to the upper right. Similarly, arrow (103) indicates that sample (101) is predicted based on one or more samples at an angle of 22.5 degrees to the horizontal to the lower right of sample (101).
[0034] Still refer to Figure 1 , depicted at the top left is a square block (104) of 4×4 samples (indicated by the bold dashed line). The square block (104) includes 16 samples, each of which is labeled with "S", its position in the Y dimension (e.g., row index), and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample in the Y dimension (from the top) and the first sample in the X dimension (from the left). Similarly, sample S44 is the fourth sample in the square block (104) in both the Y and X dimensions. Since the size of the square block (104) is 4×4 samples, sample S44 is at the bottom right. Reference samples are also shown, which follow a similar numbering scheme. The reference samples are labeled with R, their Y position (e.g., row index), and X position (column index) relative to the square block (104). In both H.264 and H.265, the prediction samples are adjacent to the block being reconstructed; therefore, there is no need to use negative values.
[0035] Intra-picture prediction can work by copying reference sample values from neighboring samples according to 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) - that is, the sample is predicted based on one or more prediction samples to the upper right at a 45 degree angle to the horizontal. In this case, samples S41, S32, S23, and S14 are predicted based on the same R05. Sample S44 is then predicted based on R08.
[0036] In some cases, the values of multiple reference samples may be combined, such as by interpolation, to calculate the reference sample; in particular, when the direction is not divisible by 45 degrees.
[0037] As video coding technology has developed, the number of possible directions has also increased. In H.264 (2003), nine different directions could be represented. This increased to 33 in H.265 (2013), and JEM / VVC / BMS can support up to 65 directions when published. Experiments have been conducted to identify the most likely directions, and certain techniques in entropy coding are used to represent these possible directions with a small number of bits at the expense of some cost for less likely directions. In addition, the direction itself can sometimes be predicted from neighboring directions used in adjacent decoded blocks.
[0038] Figure 2 is a schematic diagram 201 depicting 67 prediction modes according to JEM to illustrate the increasing number of prediction directions over time.
[0039] The mapping of the intra-frame prediction direction bits representing directions in the coded video bitstream can vary depending on the video coding technique; and can range, for example, from a simple direct mapping of prediction directions to intra-frame prediction modes to codewords, to complex adaptive schemes involving most probable modes and similar techniques. Those skilled in the art are readily familiar with these techniques. However, in all cases, some directions are statistically less likely to occur in the video content than some other directions. Since the goal of video compression is to reduce redundancy, in a well-working video coding technique, these unlikely directions will be represented by a larger number of bits than more likely directions.
[0040] Embodiments of the present disclosure are directed to improving intra prediction of non-square blocks by, for example, referencing reference samples that are spatially close to the block under reconstruction. Furthermore, in some embodiments, the process is performed by minimizing the number of directions used.
[0041] Figure 3 A simplified block diagram of a communication system (300) according to one embodiment of the present disclosure is shown. The communication system (300) includes a plurality of terminal devices that can communicate with each other via, for example, a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). Figure 3In the example, a first pair of terminal devices (310) and (320) perform unidirectional data transmission. For example, the terminal device (310) can encode video data (e.g., a video picture stream captured by the terminal device (310)) for transmission to another terminal device (320) via a network (350). The encoded video data can be transmitted in the form of one or more encoded video bitstreams. The terminal device (320) can receive the encoded video data from the network (350), decode the encoded video data to recover the video picture, and display the video picture based on the recovered video data. Unidirectional data transmission is more common in media service applications, etc.
[0042] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) that perform bidirectional transmission of encoded video data, which can occur, for example, during a video conference. For bidirectional data transmission, in the example, each of the terminal devices (330) and (340) can encode video data (e.g., a video picture stream captured by the terminal device) for transmission to the other terminal device (330) and (340) via the network (350). Each of the terminal devices (330) and (340) can also receive the encoded video data transmitted by the other terminal device (330) and (340), and can decode the encoded video data to restore the video picture, and can display the video picture on an accessible display device based on the restored video data.
[0043] exist Figure 3 In the example, terminal devices (310), (320), (330) and (340) can be shown as personal computers and smart phones, but the principles of the present disclosure may not be limited to this. Embodiments of the present disclosure are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. Network (350) represents any number of networks that transmit encoded video data between terminal devices (310), (320), (330) and (340), including, for example, wired connections (wired) and / or wireless communication networks. Network (350) can exchange data in circuit switching and / or packet switching channels. Representative networks include telecommunication networks, local area networks, wide area networks and / or the Internet. For the purpose of this discussion, unless otherwise specified below, the architecture and topology of network (350) may be unimportant for the operation of the present disclosure.
[0044] As examples of applications of the disclosed subject matter, Figure 4The placement of a video encoder and a video decoder in a streaming environment is shown. The disclosed subject matter may be equally applicable to other video-enabled applications including, for example: video conferencing, digital television, storing compressed video on digital media including CDs, DVDs, memory sticks, etc., etc.
[0045] The streaming system may include a capture subsystem (413) that may include a video source (401), such as a digital camera, that creates, for example, an uncompressed video picture stream (402). In an example, the video picture stream (402) includes samples captured by a digital camera. The video picture stream (402) that is depicted as thick lines emphasizing a high amount of data when compared to the encoded video data (404) (or an encoded video bitstream) can be processed by an electronic device (420) including a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination thereof to implement or implement various aspects of the disclosed subject matter as described in more detail below. The encoded video data (404) (or the encoded video bitstream (404)) that is depicted as thin lines emphasizing a lower amount of data when compared to the video picture stream (402) can be stored on a streaming server (405) for future use. One or more streaming client subsystems, such as Figure 4 The client subsystems (406) and (408) in the embodiment of the present invention can access the streaming server (405) to retrieve the copies (407) and (409) of the encoded video data (404). The client subsystem (406) can include, for example, a video decoder (410) in an electronic device (430). The video decoder (410) decodes the incoming copy (407) of the encoded video data (404) and creates an outgoing video picture stream (411) that can be presented on a display (412) (e.g., a display screen) or other presentation device (not depicted). In some streaming transmission systems, the encoded video data (404), its copies (407) and (409) (e.g., video bitstreams) can be encoded according to certain video encoding / compression standards. Examples of such standards include ITU-T Recommendation H.265. In one example, the video coding standard under development is informally referred to as Versatile Video Coding or VVC. The disclosed subject matter can be used in the context of VVC.
[0046] It should be noted that the electronic devices (420) and (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).
[0047] Figure 5A block diagram of a video decoder (510) according to one embodiment of the present disclosure is shown. The video decoder (510) may be included in an electronic device (530). The electronic device (530) may include a receiver (531) (e.g., a receiving circuit). The video decoder (510) may be used to replace Figure 4 A video decoder (410) is shown in an example.
[0048] A receiver (531) may receive one or more encoded video sequences to be decoded by a video decoder (510); in the same or another embodiment, one encoded video sequence at a time, wherein 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 along with other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective consuming entities (not depicted). 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 an 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 applications, the buffer memory (515) may be external to the video decoder (510) (not depicted). In still other applications, there may be a buffer memory (not depicted) external to the video decoder (510) to, for example, prevent network jitter, and further buffer memory (515) internal to the video decoder (510) to, for example, handle playout timing. When the receiver (531) receives data from a store / forward device with sufficient bandwidth and controllability or from an isochronous network, the buffer memory (515) may not be needed, or the buffer memory (515) may be small. For use over an optimal packet network such as the Internet, the buffer memory (515) may be needed, the buffer memory (515) may be relatively large and may advantageously have an adaptive size, and may be implemented at least in part in an operating system or similar element (not depicted) external to the video decoder (510).
[0049] The video decoder (510) may include a parser (520) to reconstruct symbols (521) from the encoded video sequence. The categories of these symbols (521) include information for managing the operation of the video decoder (510) and potential information for controlling a presentation device such as a presentation device (512) (e.g., a display screen), which is not an integral part of the electronic device (530) but can be coupled to the electronic device (530), such as Figure 5As shown. The control information for (one or more) rendering devices may be in the form of auxiliary enhancement information (SEI message) or video usability information (VUI) parameter set fragments (not depicted). The parser (520) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be based on a video coding technique or standard and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without background sensitivity, etc. The parser (520) may extract a subgroup parameter set for 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), etc. The parser (520) may also extract information such as transform coefficients, quantizer parameter values, motion vectors, etc. from the coded video sequence.
[0050] The parser (520) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (515) to create symbols (521).
[0051] Depending on the type of coded video pictures or parts thereof (such as: inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (521) may involve a number of 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 following multiple units is not described.
[0052] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into a number of functional units as described below. In actual implementations operating under commercial constraints, many of these units interact closely with each other and may be at least partially integrated with each other. However, for the purposes of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.
[0053] The first unit is a sealer / inverse transform unit (551). The sealer / inverse transform unit (551) receives quantized transform coefficients as (one or more) 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 blocks including sample values that can be input into the aggregator (555).
[0054] In some cases, the output samples of the scaler / inverse transform (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 a block of the same size and shape as the block being reconstructed using surrounding 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-picture prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551) on a per-sample basis.
[0055] 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 such a 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) belonging to the block, 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 address within the reference picture memory (557) from which the motion compensated prediction unit (553) extracts the predicted samples may be controlled by a motion vector, which is provided to the motion compensated prediction unit (553) in the form of a symbol (521), which may have, for example, 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, etc.
[0056] The output samples of the aggregator (555) may be subjected to 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 coded video sequence (also referred to as the coded video bitstream) and available to the loop filter unit (556) as symbols (521) from the parser (520), however the video compression techniques may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of a coded picture or coded video sequence, and to previously reconstructed and loop filtered sample values.
[0057] The output of the loop filter unit (556) may be a sample stream that may be output to a rendering device (512) and stored in a reference picture memory (557) for use in future inter-picture prediction.
[0058] Once fully reconstructed, certain coded pictures can be used as reference pictures for future prediction. For example, once a coded picture corresponding to a 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) can become part of the reference picture memory (557) and a new current picture buffer (558) can be reallocated before starting to reconstruct a subsequent coded picture.
[0059] The video decoder (510) may perform decoding operations according to a predetermined video compression technique in a standard such as ITU-T H.265 Recommendation. The encoded video sequence may conform to the syntax specified by the video compression technology or standard used in the sense that the encoded video sequence follows the syntax of the video compression technology or standard and the profile recorded in the video compression technology or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technology 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 technology or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sample rate (measured in, for example, megasamples 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.
[0060] In one embodiment, a receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be part of (one or more) encoded video sequences. The additional data may be used by a video decoder (510) to correctly 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, and the like.
[0061] Figure 6 A block diagram of a video encoder (603) according to one embodiment of the present disclosure is shown. The video encoder (603) is included 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 The video encoder (403) in the example.
[0062] The video encoder (603) may receive video samples from a video source (601), which may capture (one or more) video images (not Figure 6In another example, the video source (601) is a part of the electronic device (620).
[0063] 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), 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, YCrCb 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 in sequence. The pictures themselves may be organized as a spatial array of pixels, where each pixel may include one or more samples, depending on the sampling structure, color space, etc. in use. The relationship between pixels and samples may be readily understood by those skilled in the art. The following description focuses on samples.
[0064] According to one embodiment, the video encoder (603) can 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 described below and is functionally coupled to these units. For the sake of brevity, the coupling is not depicted. The parameters set by the controller (650) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization techniques, etc.), picture size, picture group (GOP) layout, maximum motion vector search range, etc. The controller (650) can be configured to have other suitable functions that belong to the video encoder (603) optimized for certain system designs.
[0065] In some embodiments, the video encoder (603) is configured to operate in an encoding loop. As a very simple description, in one example, 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 (one or more) reference pictures) and a (local) decoder (633) embedded in the video encoder (603). The (local) decoder (633) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder would create sample data (because in the video compression techniques considered in the disclosed subject matter, any compression between the symbols and the encoded video bitstream 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 portion of the encoder are exactly the same 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 fields.
[0066] The operation of the (local) decoder (633) can be combined with the above Figure 5 The operation of the remote decoder of the video decoder (510) described in detail is the same. However, reference is also briefly made to Figure 5 , when symbols are available and the entropy encoder (645) and the parser (520) can losslessly encode / decode the symbols into an encoded video sequence, the entropy decoding part of the video decoder (510) including the buffer memory (515) and the parser (520) may not be fully implemented in the (local) decoder (633).
[0067] At this point it can be observed that any decoder technology other than 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 disclosed subject matter focuses on decoder operation. Since encoder technology is reciprocal to the decoder technology described comprehensively, the description of encoder technology can be simplified. A more detailed description is only required in certain areas and is provided below.
[0068] During operation, in some examples, the source encoder (630) may perform motion compensated predictive coding, which 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 an input picture and pixel blocks of (one or more) reference pictures that may be selected as prediction references for the input picture.
[0069] The (local) decoder (633) may decode the coded video data of a picture that may be designated as a reference picture based on the symbols created by the source encoder (630). The operation of the coding engine (632) may advantageously be a lossy process. When the coded video data may be decoded at the video decoder ( Figure 6 When the video encoder (603) 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) decoder (633) replicates the decoding process that may be performed on the reference picture by the video decoder and may cause the reconstructed reference picture to be stored in the reference picture memory (634). In this way, the video encoder (603) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture that will be obtained by the remote video decoder.
[0070] 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 be used as appropriate prediction references for the new picture. The predictor (635) may operate on a pixel block by pixel block basis to find an appropriate prediction reference. In some cases, as determined by the search results obtained by the predictor (635), the input picture may have prediction references taken from multiple reference pictures stored in the reference picture memory (634).
[0071] The controller (650) can manage encoding operations of the source encoder (630), including, for example, setting parameters and subgroup parameters for encoding video data.
[0072] The outputs of all the above-mentioned functional units may be entropy encoded in an entropy encoder (645). The entropy encoder (645) converts the symbols generated by the various functional units into a coded video sequence by losslessly compressing the symbols according to techniques known to those skilled in the art, such as Huffman coding, variable length coding, arithmetic coding, etc.
[0073] The transmitter (640) can buffer the encoded video sequence(s) created by the entropy encoder (645) in preparation for transmission via a communication channel (660), which can be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (640) can combine the encoded video data from the video encoder (603) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (source not shown).
[0074] The controller (650) can manage the operation of the video encoder (603). During encoding, the controller (650) can assign certain coded picture types to each coded picture, which may affect the coding techniques that can be applied to the corresponding picture. For example, a picture can generally be assigned one of the following picture types:
[0075] An intra picture (I picture) may be a picture that is encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow for 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.
[0076] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction while predicting the sample values of each block using at most one motion vector and a reference index.
[0077] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction using 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.
[0078] 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 each) and coded block by block. The blocks may be predictively coded with reference to other (already coded) blocks, which are determined by the coding allocation applied to the block's corresponding picture. For example, blocks of an I picture may be non-predictively coded, or 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 with reference to one previously coded reference picture via spatial prediction or via temporal prediction. Blocks of a B picture may be predictively coded with reference to one or two previously coded reference pictures via spatial prediction or via temporal prediction.
[0079] 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 its operation, the video encoder (403) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in the input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.
[0080] In one embodiment, the transmitter (640) may transmit additional data along with the encoded video. The source encoder (630) may include such data as part of the encoded video sequence. The additional data may include temporal / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, auxiliary enhancement information (SEI) messages, visual usability information (VUI) parameter set fragments, etc.
[0081] The captured video may be 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 example, a particular picture in encoding / decoding, referred to as the current picture, is partitioned into blocks. When a block in the current picture is similar to a reference block in a reference picture that has been previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector referred to as 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.
[0082] In some embodiments, bi-prediction techniques may be used for inter-picture prediction. According to the bi-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. The block may be predicted by a combination of the first reference block and the second reference block.
[0083] In addition, merge mode technology can be used for inter-picture prediction to improve coding efficiency.
[0084] According to some embodiments of the present disclosure, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, a picture in a video picture sequence is partitioned into coding tree units (CTUs) for compression, and the CTUs in the picture have the same size, for example, 64×64 pixels, 32×32 pixels, or 16×16 pixels. Typically, a CTU includes three coding tree blocks (CTBs), namely a luminance CTB and two chrominance CTBs. Each CTU can be recursively split into one or more coding units (CUs) in 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 example, each CU is analyzed to determine a prediction type for the CU, for example, an inter-prediction type or an intra-prediction type. Depending on temporal and / or spatial predictability, a CU is split into one or more prediction units (PUs). Typically, each PU includes a luminance prediction block (PB) and two chrominance PBs. In one embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Using a luma prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values (e.g., luma values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, etc.
[0085] Figure 7 A diagram of a video encoder (703) according to another embodiment of the present disclosure is shown. The video encoder (703) is configured to receive a processed block (e.g., a predicted block) of sample values within a current video picture in a sequence of video pictures, and encode the processed block into an encoded picture that is part of an encoded video sequence. In an example, the video encoder (703) is used instead of Figure 4 The video encoder (403) in the example.
[0086] In the HEVC example, 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 optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to best encode the processing block. When the processing block is to be encoded in intra mode, the video encoder (703) can use intra prediction techniques to encode the processing block into an encoded picture; and when the processing block is to be encoded in inter mode or bidirectional prediction mode, the video encoder (703) can use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video coding techniques, the merge mode can 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 coding techniques, there may be a motion vector component applicable to the subject block. In the example, the video encoder (703) includes other components, such as a mode decision module (not shown) that determines the mode of the processing block.
[0087] exist Figure 7 In this example, the video encoder (703) includes Figure 7 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) are shown coupled together.
[0088] The inter-frame encoder (730) is configured 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, motion vector, merge mode information according to the inter-frame coding technology), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technology.
[0089] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), compare the block to already encoded blocks in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques).
[0090] The general controller (721) is configured to determine general control data and control other components of the video encoder (703) based on the general control data. In an example, 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 the intra prediction information and include the intra prediction information in 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 include the inter prediction information in the bitstream.
[0091] The residual calculator (723) is configured to calculate the difference (residual data) between the received block and the prediction result selected from the intra encoder (722) or the inter encoder (730). The residual encoder (724) is configured to operate based on the residual data to encode the residual data to generate transform coefficients. In an example, the residual encoder (724) is configured to convert the residual data in the frequency domain and generate transform coefficients. The transform coefficients are then quantized to obtain quantized transform coefficients.
[0092] The entropy encoder (725) is configured to format the bitstream to include the encoded blocks. The entropy encoder (725) is configured to include various information according to a suitable standard, such as the HEVC standard. In an example, the entropy encoder (725) is configured to include general control data, selected prediction information (e.g., intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the bitstream. 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.
[0093] Figure 8 A diagram of a video decoder (810) according to another embodiment of the present disclosure is shown. The video decoder (810) is configured to receive an encoded picture as part of an encoded video sequence and decode the encoded picture to generate a reconstructed picture. In an example, the video decoder (810) is used instead of Figure 4 A video decoder (410) is shown in an example.
[0094] exist Figure 8 In this example, 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) are shown coupled together.
[0095] The entropy decoder (871) can be configured to reconstruct certain symbols representing syntax elements constituting the encoded picture from the encoded picture. Such symbols may include, for example, a mode for encoding a block (e.g., an intra mode, an inter mode, a 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 can identify certain samples or metadata for use by an intra decoder (872) or an inter decoder (880) for prediction, respectively, residual information in the form of, for example, quantized transform coefficients, etc. In an example, when the prediction mode is an 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).
[0096] The inter-frame decoder (880) is configured to receive the inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information.
[0097] The intra decoder (872) is configured to receive intra prediction information and generate a prediction result based on the intra prediction information.
[0098] The residual decoder (873) is configured 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 certain control information (to include quantizer parameters QP), and the information may be provided by the entropy decoder (871) (the data path is not depicted as this is only low-volume control information).
[0099] The reconstruction module (874) is configured to combine the residual output by the residual decoder (873) with the prediction result (output by the inter-frame prediction module or the intra-frame prediction module according to different situations) in the spatial domain to form a reconstructed block, which can be part of a reconstructed picture, and the reconstructed picture 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.
[0100] It should be noted that the video encoders (403), (603) and (703) and the video decoders (410), (510) and (810) may be implemented using any suitable technology. In one embodiment, the video encoders (403), (603) and (703) and the video decoders (410), (510) and (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (403), (603) and (603) and the video decoders (410), (510) and (810) may be implemented using one or more processors that execute software instructions.
[0101] Described below are various embodiments of intra-frame prediction methods (also referred to as intra-frame prediction) according to the disclosed subject matter.
[0102] In some video compression techniques, intra prediction is performed on multiple samples of a given picture, which are hereinafter referred to as "units" or blocks. With respect to the multiple samples in a unit, the unit can have any shape. The unit can be continuous or discontinuous. In some video compression techniques, the shape of the unit is restricted to a rectangular block of samples. The dimensions of the rectangular block can be positive integers.
[0103] Some video compression techniques also restrict the size of rectangular blocks in each dimension, such as the X dimension and the Y dimension, to a power of 2 (such as: four samples, eight samples, 16 samples, ...).
[0104] Some video compression techniques also restrict the shape of the rectangular block to a square, ie, the rectangular block has equal dimensions in the X and Y dimensions. In some examples, the dimensions may or may not be a power of 2.
[0105] Before further describing the present disclosure, the terms "available" and "availability" are introduced below. Consider a unit of samples. The samples may be arranged in a square, a rectangle, or any other suitable shape. Depending on, among other factors, the spatial position of the unit in the picture, the structure of the encoded bitstream including the bitstream being partitioned into slices, tiles, etc., metadata of certain prediction samples or other prediction entities (e.g., prediction directions of surrounding units) may or may not be "available" for the prediction of the sample or the prediction of other prediction entities of the unit. In some video coding techniques, the decoding order of the units follows the scanning order, i.e., from left to right and from top to bottom, so potential reference information and samples from units that are after the unit being reconstructed in the decoding order are naturally unavailable. Therefore, some prediction data to the right or below the unit being reconstructed may be unavailable.
[0106] In some examples, some prediction samples and other prediction entities may not be available even if they are included in a unit that precedes the unit being reconstructed in decoding order and is located to the left or above the unit being reconstructed. For example, when the unit being reconstructed is at the boundary of a picture or picture segment such as a slice or (independent) tile, the sample or prediction entity may be unavailable. In various examples, slice and tile boundaries are considered picture boundaries for prediction purposes. Similarly, when a reference unit is encoded in a mode that does not allow the generation or use of prediction entities, prediction entities other than the prediction samples may not be available even if the prediction samples are available. For example, a prediction unit encoded in skip mode does not have a prediction direction associated with the prediction unit.
[0107] When a prediction sample or prediction entity is not available, in at least some cases, the value of the prediction sample or prediction entity can be predicted based on the neighboring samples of the prediction sample. When the prediction sample / prediction entity is predicted, the accuracy of the prediction method can be, for example, suboptimal. However, when the encoder selects a prediction mode (including predictions from samples predicted due to unavailability) based on state information including both the prediction sample value and how to generate the prediction sample value, at least in some cases, the encoder can use a mode that does not rely on intra-frame prediction. In some examples, rate-distortion optimization techniques can be used to select an appropriate mode.
[0108] Both the predicted sample and the available adjacent prediction sample can be, for example, a luminance sample, a chrominance sample, a sample belonging to a given color plane, etc. For example, in some video processing systems using a video decoder, the video is sampled in a YCrCb4:2:0 sampling structure, wherein the chrominance samples Cr and Cb are subsampled and processed in the corresponding chrominance planes, so that intra-frame prediction can occur separately in each color plane of the Y, Cr and Cb color planes. In some cases, the control of intra-frame prediction can be generated based on the Y plane in the encoder, the control of the intra-frame prediction is represented by a signal in the encoded video bitstream in relation to the Y plane, and the control of the intra-frame prediction is applied to the Y plane and the Cr / Cb plane in the decoder, respectively. In another example, the sample can be a green sample of a picture using an RGB color space, and red samples and blue samples are processed in the corresponding R color plane and B color plane. In other scenarios, intra-frame prediction is performed on one or more color planes independent of other color planes by both the encoder and the decoder. Other suitable sampling structures, color spaces, etc. can also be used for intra-frame prediction.
[0109] Reference Fig. 9In one embodiment, the unit in reconstruction (hereinafter referred to as a "block") (901) may have a rectangular shape instead of a square shape, and therefore, the block in reconstruction (901) may be referred to as a non-square block (901). In an example, the non-square block (901) includes samples S11-S14 and S21-S24 in a coded picture. In an example, the samples in the non-square block (901) may be predicted based on intra prediction using prediction samples in the same coded picture of the non-square block (901), such as prediction samples R01-R09 and R10-R70. Intra prediction of the samples in the non-square block (901) may be performed along an intra prediction direction, also referred to as a prediction direction in the present disclosure.
[0110] In some embodiments, such as Fig. 9 As shown, the width of the non-square block (901) is from left to right, and the height of the non-square block (901) is from top to bottom. Similarly, the first direction (915) points from left to right, and the second direction (925) points from top to bottom. The first direction (915) and the second direction (925) form four quadrants, namely, the lower left quadrant I, the upper left quadrant II, the upper right quadrant III, and the lower right quadrant IV. The diagonal direction (928) points from the upper right to the lower left, and divides the lower left quadrant I and the upper right quadrant III into equal parts.
[0111] In general, the intra prediction direction in video compression techniques can be optimized for square blocks. Fig. 9 , the second set of intra prediction directions (920) of the square block includes the intra prediction directions (902-912). The second set of intra prediction directions (920) of the square block covers a second angular range (924). In some embodiments, the second angular range (924) spans from 135° clockwise (CW) to the first direction (915) to 45° counterclockwise (CCW) to the first direction (915), thereby covering an angular range of 180°. Fig. 9 , the intra-frame prediction direction (902), referred to as the first end of the second angle range (924), is 135° clockwise from the first direction (915). The intra-frame prediction direction (902) is parallel to the diagonal direction (928). The intra-frame prediction direction (912), referred to as the second end of the second angle range (924), is 45° counterclockwise from the first direction (915). In various embodiments, the second set of intra-frame prediction directions (920) may include Fig. 9 In general, the second set of intra-frame prediction directions (920) may include any suitable intra-frame prediction directions between, for example, the intra-frame prediction directions (902) at the first end and the intra-frame prediction directions (912) at the second end. For example, 65 intra-frame prediction directions are used in VVC.
[0112] Certain intra prediction directions that may be useful for square blocks may not be useful for non-square blocks such as non-square blocks (901) because of low spatial correlation between certain samples of the non-square block (901) and prediction samples used based on certain intra prediction directions. For example, when intra prediction directions (902) are used for intra prediction, for example, samples S11 and S21 in the non-square block (901) may be predicted based on respective reference samples R20 and R30 that are directly adjacent to the non-square block (901). Certain samples of the non-square block (901) are predicted based on reference samples that are not directly adjacent but may be relatively (spatially) far away from the non-square block (901). For example, sample S24 is predicted based on reference sample R60 that is spatially far away. In various embodiments, intra prediction works well under close spatial relationships between reference samples and samples to be predicted, for example, samples to be predicted are spatially close to reference samples. Thus, in various embodiments, for a non-square block (901), a rate-distortion optimized encoder may not select an intra prediction direction, such as the intra prediction direction (902).
[0113] In some embodiments, the intra-frame prediction direction is mapped to an intra-frame prediction mode (also referred to as a prediction mode), and the intra-frame prediction mode can also be mapped to a codeword. As described above, statistically some intra-frame prediction directions may be more likely to be used than other intra-frame prediction directions. The certain intra-frame prediction directions may be mapped to a first codeword, and other intra-frame prediction directions may be mapped to a second codeword. Therefore, the first codeword may use fewer bits than the second codeword, and thus may be relatively shorter than the second codeword. In some examples, the intra-frame prediction direction / mode mapped to the first codeword is referred to as a "short" mode. The "short" mode may be a mode that a rate-distortion optimization encoder is likely to select. For example, the intra-frame prediction direction (902) may correspond to a short mode for a square block.
[0114] When the same mapping of intra prediction directions to intra prediction modes designed and optimized for square blocks is used, the valuable "short" modes for intra prediction directions for square blocks may be wasted for intra prediction directions for non-square blocks (901), such as intra prediction directions (902). As described above, when there is a direct mapping between intra prediction modes and variable length codewords, the "short" modes can be represented by short variable length codewords.
[0115] In the same or another embodiment, certain intra-prediction directions at one end, such as the first end, of the second angular range (924) of the second set of intra-prediction directions (920) for square blocks are less likely to be selected by the rate-distortion optimized encoder for the non-square block (901) because certain samples in the non-square block (901) have low spatial correlation with corresponding reference samples used based on certain intra-prediction directions located at the one end. Therefore, the certain intra-prediction directions are not used in the first set of intra-prediction directions for the non-square block (901). For example, for certain block shapes, such as non-square blocks (901) (see also the description below), the intra-prediction directions between the intra-prediction directions (902) at the first end and the intra-prediction directions (904) at 22.5°W with the intra-prediction directions (902) at the first end can form a sub-range (922) of the second angular range (924), and the sub-range (922) includes intra-prediction directions that are not used in the first set of intra-prediction directions for the non-square block (901). The sub-range (922) may also be referred to as a removed sub-range (922). In one example, the sub-range (922) does not include the intra-prediction direction (904), but includes the intra-prediction direction (902) at the first end and any intra-prediction direction in the second set of intra-prediction directions (920) between the intra-prediction direction (902) at the first end and the intra-prediction direction (904), such as the intra-prediction direction (903). Fig. 9 , a first set of intra-prediction directions for the non-square block (901) covers a first angular range (926) having two ends, namely, intra-prediction directions (904 and 912).
[0116] In the same embodiment or another embodiment, the sub-range (922) including intra-prediction directions not used in the first set of intra-prediction directions of the non-square block (901) may depend on a spatial characteristic of the non-square block (901). In the same embodiment or another embodiment, the spatial characteristic of the non-square block (901) may include a shape of the non-square block (901). In some examples, the shape of the non-square block (901) may be a relationship between the sizes of the non-square block (901) in an X dimension and a Y dimension, the size of the non-square block (901) in the X dimension being a first size in the X dimension, which is also the width from left to right, and the size of the non-square block (901) in the Y dimension being a second size in the Y dimension, which is also the height from top to bottom. As an example, in the same embodiment or another embodiment, for example Fig. 9As shown, a non-square block (901) having an aspect ratio of 2:1 with a first size in the X dimension and a second size in the Y dimension, the sub-range (922) can be between the intra-frame prediction direction (902) in the lower left quadrant I (135°W from the first direction (915)) and the intra-frame prediction direction (904) (22.5°W from the intra-frame prediction direction (902).
[0117] When the aspect ratio is greater than 1, the sub-range (922) may include the intra-prediction directions (902) at the first end of the second set of intra-prediction directions (920) and located in the lower left quadrant I. As the aspect ratio increases, which is greater than 1, the sub-range (922) may become larger, thereby including more intra-prediction directions in the second set of intra-prediction directions (920).
[0118] In general, a sub-range including intra prediction directions in the second set of square blocks that are not used in the first set of intra prediction directions for the non-square blocks can be determined based on symmetry along a diagonal direction (928).
[0119] In some embodiments, when the aspect ratio of the non-square block under reconstruction is less than 1, the sub-range in the second set of intra-prediction directions (920) includes the intra-prediction direction (912) at the second end of the second set of intra-prediction directions (920) and is located in the upper right quadrant III. It should be noted that the sub-range in the second set of intra-prediction directions (920) is not included in the first set of intra-prediction directions of the non-square block. In the same embodiment or another embodiment, for a non-square block (901) having an aspect ratio of 1:2 for a first size in the X dimension and a second size in the Y dimension, the sub-range may be between the intra-prediction direction (912) at the second end and the intra-prediction direction (911) in the upper right quadrant III. In various embodiments, the sub-range includes the intra-prediction direction (912) at the second end. The intra-prediction direction (912) at the second end is opposite to the diagonal direction (928), and the intra-prediction direction (911) is 22.5°CW with the intra-prediction direction (912) at the second end. As the aspect ratio less than 1 decreases, the sub-range may become larger, thus including more intra-prediction directions in the second set of intra-prediction directions (920).
[0120] Reference Fig.10 , a non-square block or block (1001) of 1×4 samples is shown, where the 1×4 samples represent a block size with an aspect ratio of 1:4. Similarly, a second set of intra prediction directions (920) for a square block includes intra prediction directions (902-912), such as Fig.10 In each example, the second set of intra prediction directions (920) and the second angular range (924) of the square block are the same as Fig. 9The second set of intra-frame prediction directions and the second angle range shown in FIG. 1 are the same, so for the sake of clarity, a detailed description is omitted. The four quadrants I-IV are also Fig. 9 The four quadrants in are the same, so a detailed description is omitted for clarity.
[0121] In various embodiments, a first set of intra prediction directions may be used for non-square blocks (1001), and the first set of intra prediction directions does not include intra prediction directions in a sub-range (1022) of the second angular range (924). Fig.10 As shown, the sub-range (1022) may be between the intra-frame prediction direction (912) and the intra-frame prediction direction (910) at the second end. The intra-frame prediction direction (912) at the second end is opposite to the diagonal direction 928 or is 45°CW to the first direction (915), and the intra-frame prediction direction (910) is 11.25°CW to the intra-frame prediction direction (909), which is opposite to the second direction (925). In various examples, the sub-range (1022) includes the intra-frame prediction direction (912) at the second end and does not include the intra-frame prediction direction (910). Referring to Fig.10 , the first group covers a first angle range (1026). In an example, the first angle range (1026) includes the intra-frame prediction direction (902) at the first end of the second group of intra-frame prediction directions (920), the intra-frame prediction direction (910), and other intra-frame prediction directions of the second group of intra-frame prediction directions (920) between the intra-frame prediction direction (902) at the first end and the intra-frame prediction direction (910).
[0122] Other suitable sub-ranges for non-square blocks of other block shapes and / or other aspect ratios may include one or more intra prediction directions in the second set of intra prediction directions (920) for square blocks that are not used in the first set of intra prediction directions for the non-square blocks.
[0123] In the same or another embodiment, the intra prediction mode for the square block corresponding to the intra prediction direction that is part of the removed sub-range is not used for the non-square block. Fig. 9 In the example embodiment, the intra prediction mode associated with the intra prediction direction (903) that is part of the sub-range (922) is not used for the non-square block (901). In some embodiments, a mode table can be used to associate the intra prediction direction with the corresponding intra prediction mode for the block. The mode table for the non-square block (901) can be shortened accordingly, resulting in a smaller number of intra prediction modes, thereby enabling optimized entropy coding and better coding efficiency. In the same embodiment or another embodiment, the mode table can be reordered according to the likelihood of the intra prediction directions still represented in the mode table.
[0124] In the same or another embodiment, when intra prediction directions in the removed sub-range are not used for non-square blocks, the associated intra prediction modes can be reallocated for other purposes, including, for example, signaling previously unused directions, modes not directly associated with prediction directions, filter control of filters related to reference samples or samples being intra predicted, etc.
[0125] In the same or another embodiment, certain intra-prediction directions, referred to as added intra-prediction directions, are added to a first set of intra-prediction directions for a non-square block. The number of added intra-prediction directions may be the same as the number of intra-prediction directions in the removed sub-ranges (referred to as removed intra-prediction directions). The added intra-prediction directions may include a sub-range referred to as the added sub-range. The added sub-range is included in a first angular range covered by the first set of intra-prediction directions for the non-square block. As described below, the added sub-range may have the same geometry as the removed sub-range.
[0126] Fig.11 A non-square block (1101) of a 4×2 block in reconstruction is shown, which has the same Fig. 9 The aspect ratio of the non-square block (901) shown in FIG. 1 is the same as the aspect ratio of the non-square block (901) shown in FIG. 1 . A second set of intra prediction directions (920) for the square block is also shown. In various examples, the second set of intra prediction directions (920) and the second angular range (924) for the square block are the same as Fig. 9 The second set of intra prediction directions (920) and the second angular range (924) shown in FIG. 1 are the same, and therefore, for the sake of clarity, a detailed description is omitted. It should be noted that the intra prediction directions 902-912 of the square block are shown, however, for the sake of clarity, Fig.11 Only the intra prediction directions (902-904, 911-912) are marked in FIG. The four quadrants I-IV are also Fig. 9 The four quadrants in are the same, so a detailed description is omitted for clarity.
[0127] In some embodiments, the first set of intra prediction directions includes a first angular range covered by the second set of intra prediction directions and does not include a second angular range covered by the second set of intra prediction directions.
[0128] Similarly, the removed sub-range or intra-prediction directions in the sub-range (922) are not included in the first set of intra-prediction directions for the non-square block (1101). Fig. 9, and therefore, for the sake of clarity, a detailed description is omitted. The two intra-prediction directions (902, 903) in the sub-range (922) are depicted using dashed lines. In this example, the intra-prediction mode used to represent the intra-prediction directions (902, 903) of the square block can be used again to represent the two added intra-prediction directions (1106, 1107) in the added sub-range (1108). Therefore, the first set of intra-prediction directions for the non-square block (1101) covers a first angular range (1126) having an intra-prediction direction (904) at a first end and an intra-prediction direction (1107) at a second end. The intra prediction direction or intra prediction direction (904) at the first end is 22.5°W from the diagonal direction (928), and the intra prediction direction (1107) at the second end is 22.5°W from the intra prediction direction (912), which is opposite to the diagonal direction (928). The first angle range (1126) includes the added sub-range (1108) and does not include the removed sub-range (922). In a case such as Fig.11 In some examples shown, the removed sub-range (922) includes intra-prediction directions between the intra-prediction direction (902) and the intra-prediction direction (904). In addition, the removed sub-range (922) includes the intra-prediction direction (902) and does not include the intra-prediction direction (904). On the other hand, the added sub-range (1108) includes intra-prediction directions between the intra-prediction direction (912) at the second end of the second set of intra-prediction directions (920) and the added intra-prediction direction (1107). In addition, the added sub-range (1108) includes the added intra-prediction direction (1107) and does not include the intra-prediction direction (912) at the second end.
[0129] In some embodiments, at least one intra prediction direction in the second set of intra prediction directions that is not included in the first set of intra prediction directions corresponds to one end of the angular range covered by the second set of intra prediction directions.
[0130] In such Fig.11 In some examples shown, the removed sub-range (922) and the added sub-range (1108) are symmetrical with respect to the diagonal direction (928). As described above, the removed sub-range (922) covers an angle range of 22.5°W with respect to the diagonal direction (928), and the added sub-range (1108) covers an angle range of 22.5°W in the opposite direction of the diagonal direction (928).
[0131] The added intra prediction direction is used in Fig.11The non-square block (1101) shown may be beneficial when using the intra prediction direction (1107) added. For example, consider the added intra prediction direction (1107). Using the intra prediction direction (1107), sample S11 in the non-square block (1101) may be predicted based on reference sample R03, and sample S14 may be predicted based on reference sample R06 adjacent to the direct neighbor R05 of the non-square block (1101). Therefore, the samples included in the non-square block (1101) may be predicted on the added intra prediction direction (1107), and the reference samples used to predict the samples in the non-square block (1101) are relatively close to the samples in the non-square block (1101) compared to using the intra prediction direction in the removed sub-range (922).
[0132] The benefit of the increased sub-range can be obtained without increasing the number of intra-prediction modes for the non-square block (1101) relative to the number of intra-prediction modes for the square block. In some embodiments, the number of intra-prediction directions in the removed sub-range (922) is the same as the number of intra-prediction directions in the added sub-range (1108), and thus, the number of the first set of intra-prediction directions for the non-square block (1101) is the same as the number of intra-prediction directions in the second set of intra-prediction directions (920) for the square block. In some examples, as described above, the intra-prediction modes assigned to the intra-prediction directions in the removed sub-range (922) of the square block are reassigned to the intra-prediction directions in the added sub-range (1108) of the non-square block, and thus, the number of the first set of intra-prediction modes for the non-square block (1101) is equal to the number of intra-prediction modes for the second set of intra-prediction directions (920) for the square block.
[0133] In some examples, when the number of intra-prediction directions in the added sub-range is less than the number of intra-prediction directions in the removed sub-range, the number of intra-prediction directions in the first set of intra-prediction directions for the non-square block (1101) may be less than the number of intra-prediction directions in the second set of intra-prediction directions (920) for the square block. Fig. 9 In some other examples shown, when the first set of intra-frame prediction directions does not include the added sub-range, the number of intra-frame prediction directions in the first set of intra-frame prediction directions can be less than the number of intra-frame prediction directions in the second set of intra-frame prediction directions. Therefore, the number of intra-frame prediction modes for the non-square block (1101) is less than the number of intra-frame prediction modes for the square block.
[0134] In some examples, in order to predict samples (S21-S24) in the second row of the non-square block (1101) using intra prediction directions (1106) or (1107), certain interpolation / filtering techniques may be advantageously employed to predict samples (S21-S24) from more than one reference sample, or to avoid aliasing artifacts. Several such interpolation / filtering techniques include one specified for certain intra prediction directions, such as directions that are not multiples of 45° to the diagonal direction (928), as specified in H.265. For example, the added intra prediction directions (1106 and 1107) are 11.25°W and 22.5°W opposite the diagonal direction (928), and therefore are not multiples of 45° to the diagonal direction (928). On the other hand, the intra prediction direction (907) is 90° away from the diagonal direction (928), and is therefore a multiple (twice) of 45° with the diagonal direction (928).
[0135] The symmetry considerations described above in the context of removing the removed intra prediction directions can be equally applied to adding the added intra prediction directions. Similarly, in a similar manner to how the size of the removed sub-ranges can depend on the block size, the size of the added sub-ranges can depend on the block shape of the non-square block (1101). As described above with reference to Fig. 9 As described above, as the aspect ratio of the non-square block (901) that is greater than 1 increases, the sub-range (922) may become larger, thereby including more intra-prediction directions in the second set of intra-prediction directions (920).
[0136] Fig.12 A flow chart outlining a process (1200) according to an embodiment of the present disclosure is shown. The process (1200) is used for intra prediction to generate a prediction block for a reconstructed non-square block. In various embodiments, the process (1200) 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 an intra prediction module (552), a processing circuit that performs the functions of a video encoder (603), a processing circuit that performs the functions of a predictor (635), a processing circuit that performs the functions of a decoder (633), a processing circuit that performs the functions of an intra encoder (722), a processing circuit that performs the functions of an intra decoder (872), etc. The process starts at (S1201) and proceeds to (S1210).
[0137] At (S1210), a block size of a non-square block in reconstruction is obtained. For example, at least one syntax element from an encoded video bitstream is decoded. The at least one syntax element indicates the block size of the non-square block. The block size includes a first size in a first dimension, such as a width of the non-square block, and a second size in a second dimension, such as a height of the non-square block, and the first size is different from the second size. In some examples, additional information such as a position of the non-square block within the picture in reconstruction is obtained.
[0138] At (S1220), the processing circuit determines an intra-prediction mode for the non-square block. In various embodiments, the intra-prediction mode corresponds to an intra-prediction direction in a first set of intra-prediction directions for the non-square block. Figures 9 to 11 The first set of intra prediction directions does not include one or more intra prediction directions in the second set of intra prediction directions of the square block.
[0139] In some embodiments, in the present embodiment, the first set of intra prediction directions is determined based on the block size of the non-square block and the second set of intra prediction directions for the square block.
[0140] At (S1230), the processing circuit selects a reference sample for the sample in the non-square block based on the intra prediction mode. Fig. 9 In some examples, the non-square block is a block (901), and the intra prediction mode indicates an intra prediction direction (912). For example, to predict sample S21 using the intra prediction direction (912), the processing circuit determines that the reference sample is R03.
[0141] At (S1240), as described above, the processing circuit determines whether the reference sample is available. When the reference sample is available, the process (1200) proceeds to (S1260). When the reference sample is not available, the process (1200) proceeds to (S1250).
[0142] At (S1250), as described above, the processing circuit determines the value of the reference sample using, for example, neighboring samples of the reference sample. For example, when reference sample R03 is not available, other samples such as R02 may be used to determine the value of reference sample R03. Then, the process (1200) proceeds to (S1260).
[0143] At (S1260), the processing circuit predicts samples in the non-square block based on the reference samples. In some embodiments, the value of sample S21 is obtained based on the value of reference sample R03. For example, the value of sample S21 is equal to the value of reference sample R03. In some examples, when the intra-frame prediction mode indicates, for example, the intra-frame prediction direction (911), the value of sample S21 can be determined based on more than one reference sample using interpolation, filtering, etc. Then, the process proceeds to (S1299) and terminates.
[0144] It should be noted that the process (1200) may be adjusted appropriately. For example, at (S1230), when the intra prediction mode indicates, for example, the intra prediction direction (910), the processing circuit may select more than one reference sample for the sample in the non-square block based on the intra prediction mode.
[0145] The present disclosure also provides a device for video decoding, the device comprising a decoding unit and a prediction unit: the decoding unit is used to decode at least one syntax element from an encoded video bitstream, the at least one syntax element indicates a block size of a non-square block having a rectangular shape in reconstruction, the block size comprising a first size on a first dimension and a second size on a second dimension, the first size being different from the second size; the prediction unit is used to predict samples of the non-square block based on a first set of intra-frame prediction directions of the non-square block, the first set of intra-frame prediction directions not including at least one intra-frame prediction direction in a second set of intra-frame prediction directions of a square block.
[0146] In some embodiments, the at least one intra prediction direction of the second set of intra prediction directions covers a sub-range of the angular range covered by the second set of intra prediction directions. In an example, the sub-range includes a first end of the angular range.
[0147] In some embodiments, the intra prediction modes for the first set of intra prediction directions do not include at least one intra prediction mode for the at least one intra prediction direction in the second set of intra prediction directions.
[0148] In some embodiments, at least one intra prediction mode for at least one intra prediction direction in the second set of intra prediction directions is assigned to the at least one intra prediction direction in the first set of intra prediction directions. The at least one intra prediction direction in the first set of intra prediction directions is not included in the second set of intra prediction directions.
[0149] In some embodiments, in a combined angular range covered by the first set of intra-prediction directions and the at least one intra-prediction direction in the second set of intra-prediction directions, the at least one intra-prediction direction in the first set of intra-prediction directions is covered by a sub-range of the combined angular range, the sub-range of the combined angular range including a first end of the combined angular range, and the at least one intra-prediction direction in the second set of intra-prediction directions is covered by another sub-range of the combined angular range, the another sub-range including a second end of the combined angular range.
[0150] In some embodiments, a first angular range is covered by the first set of intra prediction directions and a second angular range is covered by the second set of intra prediction directions. A subrange of the first angular range covered by the at least one intra prediction direction in the first set of intra prediction directions is outside the second angular range.
[0151] In some embodiments, the number of the at least one intra prediction direction in the first set of intra prediction directions is equal to the number of the at least one intra prediction direction in the second set of intra prediction directions.
[0152] In some embodiments, the number of intra prediction modes of the second set of intra prediction directions for square blocks is equal to the number of intra prediction modes of the first set of intra prediction directions for non-square blocks.
[0153] In some embodiments, the at least one intra prediction direction in the second set of intra prediction directions is determined based on a shape of a non-square block.
[0154] In some embodiments, the at least one intra prediction direction of the second set of intra prediction directions is determined based on an aspect ratio of a non-square block.
[0155] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.13 A computer system (1300) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0156] Computer software may be encoded using any suitable machine code or computer language, which may be assembled, compiled, linked, or the like to create code comprising instructions that may be executed directly by a computer central processing unit (CPU), graphics processing unit (GPU), or the like, or through interpretation, microcode execution, or the like.
[0157] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, etc.
[0158] Fig.13 The components for the computer system (1300) shown in the example are exemplary in nature and are not intended to suggest any limitation on the scope of use or functionality of computer software implementing embodiments of the present disclosure. Neither should the configuration of components be interpreted as having any dependency or requirement relating to any one or combination of components shown in the exemplary embodiment of the computer system (1300).
[0159] The computer system (1300) may include certain human-machine interface input devices. Such human-machine interface input devices may respond to input by one or more human users through, for example, tactile input (such as: keystrokes, swipes, data glove movements), audio input (such as: voice, tapping), visual input (such as: gestures), olfactory input (not shown). The human-machine interface device may also be used to capture certain media that are not necessarily directly related to human conscious input, for example, audio (such as: voice, music, ambient sound), images (such as: scanned images, photographic images obtained from a still image camera), video (such as two-dimensional video, three-dimensional video including stereoscopic video).
[0160] The input human-machine interface devices may include one or more of the following (only one of each described): keyboard (1301), mouse (1302), touchpad (1303), touch screen (1310), data gloves (not shown), joystick (1305), microphone (1306), scanner (1307), camera (1308).
[0161] The computer system (1300) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate one or more senses of a human user 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 (1310), a data glove (not shown), or a joystick (1305), but there may also be tactile feedback devices that are not used as input devices), audio output devices (such as: speakers (1309), headphones (not shown)), visual output devices (e.g., screens (1310), including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities - some of which may be capable of outputting two-dimensional visual output or more than three-dimensional output through means such as stereoscopic image output; virtual reality glasses (not depicted), holographic displays, and cigarette cans (not depicted)) and printers (not depicted).
[0162] The computer system (1300) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD ROM / RW (1320) with CD / DVD etc. media (1321), thumb drives (1322), modifiable hard drives or solid-state drives (1323), legacy magnetic media such as tapes and floppy disks (not depicted), dedicated ROM / ASIC / PLD based devices such as security dongles (not depicted), etc.
[0163] Those skilled in the art will also appreciate that the term "computer-readable media" used in connection with the presently disclosed subject matter does not include transmission media, carrier waves, or other transient signals.
[0164] The computer system (1300) may also include a network interface (1354) to one or more communication networks. The network (1355) may be, for example, wireless, wired, optical. The network (1355) may also be local, wide area, metropolitan, vehicular and industrial, real time, delay tolerant, etc. Examples of networks (1355) include: local area networks such as Ethernet, wireless LANs, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., television wired or wireless wide area digital networks including cable, satellite and terrestrial broadcast television, vehicular and industrial including CAN bus, etc. Some networks typically require an external network interface adapter attached to some common data port or peripheral bus (1349) (e.g., a USB port of the computer system (1300)); others are typically integrated into the core of the computer system (1300) by attaching to the system bus as described below (e.g., an Ethernet interface to a PC computer system or a cellular network interface to a smartphone computer system). Using any of these networks, the computer system (1300) can communicate with other entities. Such communications can be one-way, receive-only (e.g., broadcast television), one-way send-only (e.g., a CAN bus to certain CAN bus devices), or two-way (e.g., to other computer systems using a local or wide area digital network). Certain protocols and protocol stacks can be used on each of these networks (1355) and network interfaces (1354) as described above.
[0165] The above-mentioned human-machine interface devices, human-accessible storage devices, and network interfaces ( 1354 ) may be attached to the core ( 1340 ) of the computer system ( 1300 ).
[0166] The core (1340) may include one or more central processing units (CPUs) (1341), graphics processing units (GPUs) (1342), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1343), hardware accelerators (1344) for certain tasks, etc. These devices, along with read-only memory (ROM) (1345), random access memory (1346), internal mass storage devices (1347) such as internal non-user accessible hard drives, SSDs, etc., may be connected through a system bus (1348). In some computer systems, the system bus (1348) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, etc. Peripheral devices may be attached to the core's system bus (1348) directly or through a peripheral bus (1349). The architecture of the peripheral bus includes PCI, USB, etc.
[0167] The CPU (1341), GPU (1342), FPGA (1343) and accelerator (1344) can execute certain instructions, which can be combined to form the computer code mentioned above. The computer code can be stored in ROM (1345) or RAM (1346). Transition data can also be stored in RAM (1346), while permanent data can be stored in, for example, an internal mass storage device (1347). Fast storage and retrieval of any storage device in the storage device can be achieved by using a cache memory, which can be closely associated with one or more CPUs (1341), GPUs (1342), mass storage devices (1347), ROMs (1345), RAMs (1346), etc.
[0168] The computer readable medium may have thereon computer code for performing various computer-implemented operations. The medium and computer code may be those specially designed and constructed for the purposes of the present disclosure, or they may be of a type well known and available to those skilled in the art of computer software.
[0169] As an example and not limitation, a computer system (1300) having an architecture, in particular a core (1340), can provide functionality due to the execution of software embodied in one or more tangible computer-readable media by (one or more) processors (including CPUs, GPUs, FPGAs, accelerators, etc.). Such computer-readable media can be media associated with a user-accessible mass storage device as described above, as well as certain storage devices of the core (1340) having non-transitory properties, such as a core internal mass storage device (1347) or ROM (1345). Software that implements various embodiments of the present disclosure can be stored in such a device and executed by the core (1340). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software can enable the core (1340), in particular the processors therein (including CPUs, GPUs, FPGAs, etc.), to perform specific processing or specific parts of specific processing described herein, including defining data structures stored in RAM (1346) and modifying such data structures according to processing defined by the software. Additionally or alternatively, the computer system may provide functionality as a result of logic hardwired or otherwise embodied in circuitry (e.g., accelerator (1344)) that may operate in place of or in conjunction with software to perform specific processes or specific portions of specific processes 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., integrated circuits (ICs)) storing software for execution, circuitry embodying logic for execution, or both. The present disclosure encompasses any suitable combination of hardware and software.
[0170] Appendix A: Acronyms
[0171] Motion Vector (MV)
[0172] High Efficiency Video Coding (HEVC)
[0173] Supplementary Enhancement Information (SEI)
[0174] Video Usability Information (VUI)
[0175] Group of pictures (GOP)
[0176] Transform Unit (TU)
[0177] Prediction Unit (PU)
[0178] Coding tree unit (CTU)
[0179] Coding tree block (CTB)
[0180] Prediction Block (PB)
[0181] Hypothetical Reference Decoder (HRD)
[0182] Signal-noise ratio (SNR)
[0183] Central Processing Unit (CPU)
[0184] Graphics Processing Unit (GPU)
[0185] Cathode Ray Tube (CRT)
[0186] Liquid-Crystal Display (LCD)
[0187] Organic Light-Emitting Diode (OLED)
[0188] Compact Disc (CD)
[0189] Digital Video Disc (DVD)
[0190] Read-Only Memory (ROM)
[0191] Random Access Memory (RAM)
[0192] Application-Specific Integrated Circuit (ASIC)
[0193] Programmable Logic Device (PLD)
[0194] Local Area Network (LAN)
[0195] Global System for Mobile communications (GSM)
[0196] Long-Term Evolution (LTE)
[0197] Controller Area Network Bus (CANBus)
[0198] Universal Serial Bus (USB)
[0199] Peripheral Component Interconnect (PCI)
[0200] Field Programmable Gate Areas (FPGA)
[0201] Solid-state drive (SSD)
[0202] Integrated Circuit (IC)
[0203] Coding Unit (CU)
[0204] Joint Exploration Model (JEM)
[0205] Versatile video coding (VVC)
[0206] Bench Mark Set (BMS)
[0207] Although the present disclosure has described several exemplary embodiments, there are changes, permutations, and various replacement equivalents that fall within the scope of the present disclosure. It will therefore be appreciated that, although not explicitly shown or described herein, those skilled in the art will be able to conceive of many systems and methods that embody the principles of the present disclosure and are therefore within its spirit and scope.
Claims
1. A method for video encoding, characterized in that The method comprises: Determining at least one syntax element, the at least one syntax element indicating a block size of a non-square block to be encoded; the block size includes a first size in a first dimension and a second size in a second dimension, the first size being different from the second size; Based on the block size and according to the second set of intra-frame prediction direction values for the square block, a first set of intra-frame prediction direction values for the non-square block is determined, the first set of intra-frame prediction direction values including a first angle sub-range of the second set of intra-frame prediction direction values, excluding a removed second angle sub-range of the second set of intra-frame prediction direction values; wherein the removed second angle sub-range includes a first end of the second angle sub-range, but does not include a second end of the second angle sub-range, the first end corresponding to an end of an angle range covered by the second set of intra-frame prediction direction values; an intra-frame prediction direction value in the second set of intra-frame prediction direction values is determined based on the aspect ratio of the non-square block; and an intra-frame prediction mode corresponding to the first set of intra-frame prediction direction values does not include an intra-frame prediction mode corresponding to an intra-frame prediction direction value in the second set of intra-frame prediction direction values; The non-square block and the at least one syntax element are encoded based on a first set of intra-prediction direction values for the non-square block.
2. The method according to claim 1, characterized in that The removed second angle sub-range covers an angle range of 22.5° to the diagonal direction, and the added third angle sub-range covers an angle range of 22.5° to the opposite direction of the diagonal direction, wherein the diagonal direction is the same as the first end of the second angle sub-range, and the first set of intra-frame prediction direction values also includes the added third angle sub-range.
3. The method according to claim 1, characterized in that The removed second angle sub-range covers an angle range of 37.5° to the diagonal direction, and the added third angle sub-range covers an angle range of 37.5° to the opposite direction of the diagonal direction, wherein the diagonal direction is the same as the first end of the second angle sub-range, and the first set of intra-frame prediction direction values also includes the added third angle sub-range.
4. The method according to claim 1, characterized in that: An intra-frame prediction mode corresponding to an intra-frame prediction direction value in the second set of intra-frame prediction direction values is used to determine an intra-frame prediction direction value in the first set of intra-frame prediction direction values, and the intra-frame prediction direction value in the first set of intra-frame prediction direction values is not included in the second set of intra-frame prediction direction values.
5. The method according to claim 4, characterized in that In the combined angle range covered by the first set of intra-frame prediction direction values and the second angle sub-range, the one intra-frame prediction direction value in the first set of intra-frame prediction direction values corresponds to the first end of the combined angle range, and the second angle sub-range includes the second end of the combined angle range, and the second end is the one end of the angle range covered by the second set of intra-frame prediction direction values.
6. The method according to claim 4, characterized in that The number of the first set of intra-prediction direction values not included in the second set of intra-prediction direction values is equal to the number of the second set of intra-prediction direction values not included in the first set of intra-prediction direction values.
7. A method for video decoding, characterized in that: The method comprises: Decoding at least one syntax element of an encoded video bitstream; the at least one syntax element indicates a block size of a non-square block having a rectangular shape in reconstruction; the block size includes a first size in a first dimension and a second size in a second dimension; the first size is different from the second size; The samples of the non-square block are predicted based on a first set of intra-frame prediction direction values of the non-square block; the first set of intra-frame prediction direction values does not include at least one intra-frame prediction direction value in a second set of intra-frame prediction direction values of the square block; the first set of intra-frame prediction direction values includes a first angle sub-range of the second set of intra-frame prediction direction values, but does not include a removed second angle sub-range of the second set of intra-frame prediction direction values; wherein the removed second angle sub-range includes a first end of the second angle sub-range, but does not include a second end of the second angle sub-range, and the first end corresponds to an end of the angle range covered by the second set of intra-frame prediction direction values; one of the intra-frame prediction direction values in the second set of intra-frame prediction direction values is determined based on the aspect ratio of the non-square block; the intra-frame prediction mode corresponding to the first set of intra-frame prediction direction values does not include an intra-frame prediction mode corresponding to one of the intra-frame prediction direction values in the second set of intra-frame prediction direction values.
8. The method according to claim 7, characterized in that The removed second angle sub-range covers an angle range of 22.5° to the diagonal direction, and the added third angle sub-range covers an angle range of 22.5° to the opposite direction of the diagonal direction, wherein the diagonal direction is the same as the first end of the second angle sub-range, and the first set of intra-frame prediction direction values also includes the added third angle sub-range.
9. The method according to claim 7, characterized in that: The removed second angle sub-range covers an angle range of 37.5° to the diagonal direction, and the added third angle sub-range covers an angle range of 37.5° to the opposite direction of the diagonal direction, wherein the diagonal direction is the same as the first end of the second angle sub-range, and the first set of intra-frame prediction direction values also includes the added third angle sub-range.
10. The method according to claim 7, characterized in that An intra-frame prediction mode corresponding to an intra-frame prediction direction value in the second set of intra-frame prediction direction values is used to determine an intra-frame prediction direction value in the first set of intra-frame prediction direction values, and the intra-frame prediction direction value in the first set of intra-frame prediction direction values is not included in the second set of intra-frame prediction direction values.
11. The method according to claim 10, characterized in that In the combined angle range covered by the first set of intra-frame prediction direction values and the second angle sub-range, the one intra-frame prediction direction value in the first set of intra-frame prediction direction values corresponds to the first end of the combined angle range, and the second angle sub-range includes the second end of the combined angle range, and the second end is the one end of the angle range covered by the second set of intra-frame prediction direction values.
12. The method according to claim 10, characterized in that The number of the first set of intra-prediction direction values not included in the second set of intra-prediction direction values is equal to the number of the second set of intra-prediction direction values not included in the first set of intra-prediction direction values.
13. A device for video encoding, characterized in that: The apparatus comprises a processing circuit configured to perform the method for video encoding according to any one of claims 1-6.
14. A device for video decoding, characterized in that: The apparatus comprises a processing circuit configured to perform the method for video decoding according to any one of claims 7-12.
15. A non-transitory computer-readable storage medium storing a program, wherein the program can be executed by at least one processor according to any one of claims 1 to 12.
16. A method for processing a code stream, characterized in that: The video code stream is generated according to the video encoding method according to any one of claims 1-6, or is decoded based on the video decoding method according to any one of claims 7-12.
Citation Information
Patent Citations
Intra-prediction mode-based image processing method and device therefor
WO2018030599A1