Video encoding method and device, computer equipment and storage medium
By using a position-related prediction combination process in video coding, the same PDPC process is used for diagonal intra-frame prediction directions and adjacent intra-frame prediction directions, which solves the problem of low coding efficiency in the prior art and achieves more efficient coding.
Patent Information
- Application Number
- CN202211137320.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-05-13
- Filing Date
- 2020-06-03
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-06-03
AI Technical Summary
In existing technologies, the prediction processes of intra-frame prediction modes and their neighboring modes are similar, which makes it impossible to obtain a significant improvement in coding efficiency when applying position-related prediction combination processes. Furthermore, it is necessary to check each sample to determine whether the reference sample is within the specified range, which leads to a decrease in coding efficiency.
By determining the intra-prediction direction of the current block and using the Position-Related Prediction Combination (PDPC) procedure, the same PDPC procedure is used for diagonal intra-prediction directions and adjacent intra-prediction directions, avoiding checking each sample and improving coding efficiency.
It improves the encoding efficiency of video encoding, reduces the need to check each sample, and enhances the efficiency of the encoding process.
Smart Images

Figure CN115550644B_ABST
Abstract
Description
[0001] Incorporated herein by reference
[0002] This application claims priority to U.S. Provisional Application No. 62 / 859,920, filed on June 11, 2019, entitled “Unified Location-Dependent Prediction Combination Process,” U.S. Provisional Application No. 62 / 869,015, filed on June 30, 2019, entitled “Further Unification of Location-Dependent Prediction Combination Process,” and U.S. Application No. 15 / 931,225, filed on May 13, 2020, entitled “Unified Location-Dependent Prediction Combination Process,” the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to video coding and decoding technology. Specifically, the present application relates to a method and apparatus for video decoding, a computer device and a storage medium. Background Art
[0004] Video encoding and decoding are made possible by inter-picture prediction techniques with motion compensation. An uncompressed digital video may include a series of pictures, each picture having a spatial dimension of, for example, 1920×1080 luminance samples and associated chrominance samples. The series of pictures has a fixed or variable picture rate (also informally referred to as a frame rate), for example, 60 pictures per second or 60Hz. Uncompressed video has very large bitrate requirements. For example, 1080p60 4:2:0 video (1920x1080 luminance sample resolution, 60Hz frame rate) with 8 bits per sample requires close to 1.5Gbit / s bandwidth. One hour of such video requires more than 600GB of storage space.
[0005] One goal of video encoding and decoding is to reduce redundant information in the input video signal through compression. Video compression can help reduce the bandwidth or storage space requirements mentioned above, in some cases by two or more orders of magnitude. Both lossless and lossy compression, as well as combinations of the two, can be used. Lossless compression refers to techniques that reconstruct an exact replica of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may not be exactly the same as the original signal, but the distortion between the original and the reconstructed signal is small enough that the reconstructed signal can be used for the intended application. Lossy compression is widely used in video. The amount of distortion allowed depends on the application. For example, users of some consumer streaming applications may tolerate higher distortion than users of television applications. The achievable compression ratio reflects that higher allowed / tolerable distortion results in higher compression ratios.
[0006] Video encoders and decoders may utilize several broad categories of techniques including, for example: motion compensation, transforms, quantization, and entropy coding.
[0007] Video codec techniques may include known intra-frame coding techniques. In intra-frame coding, sample values are represented without reference to samples or other data of previously reconstructed reference pictures. In some video codecs, pictures are spatially subdivided into blocks of samples. When all sample blocks are encoded in intra-frame mode, the picture may be an intra-frame picture. Intra-frame pictures and their derivatives (e.g., independent decoder refresh pictures) may be used to reset decoder states, and may therefore be used as the first picture in a coded video bitstream and video session, or as a still image. Samples of intra-frame blocks may be used for transformation, and transform coefficients may be quantized before entropy coding. Intra-frame prediction may be a technique for minimizing sample values in a pre-transform domain. In some cases, the smaller the DC value after transformation, and the smaller the AC coefficient, the fewer bits are needed to represent the block after entropy coding at a given quantization step size.
[0008] Conventional intra-frame coding, as known from coding techniques such as MPEG-2, does not use intra-frame prediction. However, some newer video compression techniques include techniques that attempt to derive data blocks from, for example, surrounding sample data and / or metadata, which are obtained during spatially adjacent encoding / decoding and before the decoding order. Such techniques have subsequently been referred to as "intra-frame prediction" techniques. It should be noted that, at least in some cases, intra-frame prediction uses only reference data of the current picture being reconstructed, and not reference data of reference pictures.
[0009] There can be many different forms of intra-frame prediction. When more than one such technique can be used in a given video coding technique, the techniques used can be encoded as intra-frame prediction modes. In some cases, a mode can have sub-modes and / or parameters, and these modes can be encoded separately or contained in a mode codeword. Which codeword is used for a given mode / sub-mode / parameter combination affects the coding efficiency gain through intra-frame prediction, and therefore the entropy coding technique used to convert the codeword into a bitstream. Summary of the invention
[0010] Embodiments of the present application provide a method and apparatus for video encoding, a computer device and a storage medium, aiming to solve the problem in the prior art that because the prediction processes of the diagonal prediction mode and its adjacent modes are similar, no obvious benefit can be obtained when different PDPC processes are applied to intra-frame coding blocks with diagonal intra-frame prediction modes and their adjacent modes, and the problem in the prior art that each sample needs to be checked to determine whether the reference sample of the current sample is within a specified range, thereby reducing the encoding efficiency.
[0011] According to an embodiment of the present application, a method for video encoding is provided. The method comprises:
[0012] Determine prediction information of a current block in a current picture, the prediction information indicating an intra prediction direction of the current block, the intra prediction direction being one of a diagonal intra prediction direction and an adjacent intra prediction direction adjacent to the diagonal intra prediction direction;
[0013] Determining to use a position-dependent prediction combined PDPC process according to the intra prediction direction of the current block, wherein the PDPC process used when the intra prediction direction is the diagonal intra prediction direction is the same as the PDPC process used when the intra prediction direction is the adjacent intra prediction direction; and
[0014] The current block is encoded using the PDPC process.
[0015] According to an embodiment of the present application, a video encoding device is provided. The device includes:
[0016] A first determination module is configured to determine prediction information of a current block in a current picture, wherein the prediction information indicates an intra-frame prediction direction of the current block, and the intra-frame prediction direction is one of a diagonal intra-frame prediction direction and an adjacent intra-frame prediction direction adjacent to the diagonal intra-frame prediction direction;
[0017] A second determination module is configured to determine to use a position-dependent prediction combined PDPC process according to the intra prediction direction of the current block, wherein the PDPC process used when the intra prediction direction is the diagonal intra prediction direction is the same as the PDPC process used when the intra prediction direction is the adjacent intra prediction direction; and
[0018] An encoding module is used to encode the current block using the PDPC process.
[0019] The embodiment of the present application further provides a non-volatile computer-readable medium for storing program instructions. When the program instructions are executed by a computer used for video encoding / decoding, the computer executes the video encoding method.
[0020] An embodiment of the present application also provides a computer device, comprising one or more processors and one or more memories, wherein the one or more memories store at least one program instruction, and the at least one program instruction is loaded and executed by the one or more processors to implement the video encoding method.
[0021] In an embodiment of the present application, by modifying the PDPC process, different PDPC processes can be applied to intra-frame coding blocks having a diagonal intra-frame prediction mode and its adjacent intra-frame prediction mode, and it is not necessary to check each sample to determine whether the reference sample of the current sample is within a specified range, thereby improving coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, properties and various advantages of the disclosed subject matter will become further apparent from the following detailed description and accompanying drawings, in which:
[0023] Figure 1A A schematic diagram showing an exemplary subset of intra prediction modes;
[0024] Figure 1B A schematic diagram showing an exemplary intra prediction direction;
[0025] Figure 1C A schematic diagram showing a current block and its surrounding spatial merging candidates in an example;
[0026] Figure 2 A schematic diagram showing a simplified block diagram of a communication system according to an embodiment;
[0027] Figure 3 A schematic diagram showing a simplified block diagram of a communication system according to another embodiment;
[0028] Figure 4 A schematic diagram showing a simplified block diagram of a decoder according to an embodiment;
[0029] Figure 5 A schematic diagram showing a simplified block diagram of an encoder according to an embodiment;
[0030] Figure 6 shows a block diagram of an encoder according to another embodiment;
[0031] Figure 7 shows a block diagram of a decoder according to another embodiment;
[0032] Fig. 8A A schematic diagram showing exemplary intra prediction directions and corresponding intra prediction modes in some examples (e.g., VVC);
[0033] Figure 8B A list of angular intra prediction modes and their corresponding intra prediction angles in some examples (e.g., VVC) is shown;
[0034] Fig.9A shows exemplary weighting factors for a prediction sample at (0,0) in DC mode according to an embodiment;
[0035] Fig. 9B shows exemplary weighting factors for a prediction sample at (1, 0) in DC mode according to an embodiment;
[0036] Fig.10A flowchart outlining an exemplary process of a video decoding method according to an embodiment of the present application is shown.
[0037] Fig.11 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION
[0038] H.264 introduced an intra prediction mode, which was improved in H.265 and further improved in newer coding techniques such as the Joint Exploitation Model (JEM) / Versatile Video Coding (VVC) / Benchmark Set (BMS). A prediction block can be formed by using neighboring sample values belonging to samples that are already available. In some examples, the sample values of neighboring samples are copied into the prediction block in a certain direction. A reference to the direction used can be encoded in the bitstream, or it can be predicted itself.
[0039] Reference Figure 1A , a subset of nine known prediction directions from the 33 possible prediction directions of H.265 (corresponding to the 33 angular modes of the 35 intra modes) is depicted at the bottom right. The point (101) where the arrows converge represents the sample being predicted. The arrows represent the direction in which the sample is being predicted. For example, arrow (102) indicates that sample (101) is predicted based on one or more samples at a 45 degree angle to the horizontal direction at the upper right. Similarly, arrow (103) indicates that sample (101) is predicted based on one or more samples at a 22.5 degree angle to the horizontal direction at the lower left.
[0040] Still reference Figure 1A , a square block (104) including 4×4 samples is shown in the upper left (indicated by the thick dashed line). The square block (104) includes 16 samples, each of which is labeled with "S" and its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample in the Y dimension (starting from the top) and the first sample in the X dimension (starting from the left). Similarly, sample S44 is the fourth sample in the block (104) in both the Y dimension and the X dimension. Since the block is a 4×4 size sample, S44 is located in the lower right corner. Reference samples following a similar numbering scheme are also shown. The reference samples are labeled with R and their Y position (e.g., row index) and X position (e.g., column index) relative to the block (104). In H.264 and H.265, the prediction samples are adjacent to the block being reconstructed, so there is no need to use negative values.
[0041] Intra-picture prediction can be performed by copying reference sample values from neighboring samples occupied by a signaled prediction direction. For example, assume that the encoded video bitstream includes signaling that indicates, for this block, a prediction direction consistent with arrow (102), i.e., predicting samples based on one or more prediction samples to the upper right at a 45 degree angle to the horizontal. In this case, samples S41, S32, S23, and S14 are predicted based on the same reference sample R05. Sample S44 is then predicted based on reference sample R08.
[0042] In some cases, for example by interpolation, the values of multiple reference samples may be combined in order to calculate the reference sample, particularly when the direction is not divisible by 45 degrees.
[0043] As video coding techniques have evolved, the number of possible directions has increased. In H.264 (2003), nine different directions could be represented. This increased to 33 in H.265 (2013) and JEM / VVC / BMS, and at the time of this application, up to 65 directions can be supported. Experiments have been conducted to identify the most likely directions, and certain techniques in entropy coding are used to represent those possible directions using a small number of bits, accepting some penalty for less likely directions. Additionally, the direction itself can sometimes be predicted based on neighboring directions used in adjacent, already decoded blocks.
[0044] Figure 1B A schematic diagram (105) is shown, which describes 65 intra prediction directions according to JEM to illustrate the increase in the number of prediction directions over time.
[0045] The mapping of the intra prediction direction bits in the coded video bitstream representing the direction may vary from one video coding technique to another, and may, for example, range from a simple direct mapping of the intra prediction mode to the prediction direction of the codeword, to complex adaptive schemes involving the most probable mode and similar techniques. However, in all cases, there may be certain directions in the video content that are statistically less likely to occur than other directions. Since the goal of video compression is to reduce redundancy, in a well-functioning video coding technique, those less likely directions will be represented using a larger number of bits than more likely directions.
[0046] Motion compensation may be a lossy compression technique and may involve a technique where a block of sample data from a previously reconstructed picture or part of a reconstructed picture (reference picture) is used for prediction of a newly reconstructed picture or part of a picture after being spatially shifted in the direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, where the third dimension indicates the reference picture in use (the latter may indirectly be the temporal dimension).
[0047] In some video compression techniques, the MV applied to a region of sample data can be predicted based on other MVs, such as those MVs associated with another region of sample data that is spatially adjacent to the region being reconstructed and that precede the MV in decoding order. Doing so can greatly reduce the amount of data required to encode the MV, thereby eliminating redundant information and increasing the amount of compression. MV prediction can be done effectively, for example, when encoding an input video signal derived from a camera (called natural video), there is a statistical probability that regions larger than the region to which a single MV applies will move in a similar direction, so in some cases, similar motion vectors derived from MVs of adjacent regions can be used for prediction. This results in the MV found for a given region being similar or identical to the MV predicted from the surrounding MVs, and after entropy coding, it can be represented with fewer bits than the number of bits used when the MV is directly encoded. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, MV prediction itself may be lossy, for example due to rounding errors when calculating predicted values based on several surrounding MVs.
[0048] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T H.265 Recommendation, "High Efficiency Video Coding", December 2016). Among the various MV prediction mechanisms provided by H.265, this application describes a technique referred to below as "spatial merging".
[0049] Please refer to Figure 1C , the current block (111) includes samples that have been discovered by the encoder during the motion search process, and the samples can be predicted based on the previous block of the same size that has generated a spatial offset. In addition, the MV can be derived from metadata associated with one or more reference pictures instead of encoding the MV directly. For example, the MV is derived from the metadata of the nearest reference picture (in decoding order) using the MV associated with any of the five surrounding samples A0, A1 and B0, B1, B2 (corresponding to 112 to 116 respectively). In H.265, MV prediction can use the prediction value of the same reference picture that the neighboring blocks are also using.
[0050] Video encoders and decoders
[0051] Figure 2 2 is a simplified block diagram of a communication system (200) according to an embodiment disclosed in the present application. The communication system (200) includes a plurality of terminal devices, which can communicate with each other through, for example, a network (250). For example, the communication system (200) includes a first terminal device (210) and a second terminal device (220) interconnected through the network (250). Figure 2 In an embodiment of the present invention, the first terminal device (210) and the second terminal device (220) perform unidirectional data transmission. For example, the first terminal device (210) may encode video data (e.g., a video picture stream collected by the terminal device (210)) for transmission to the second terminal device (220) via the network (250). The encoded video data is transmitted in the form of one or more encoded video code streams. The second terminal device (220) may receive the encoded video data from the network (250), decode the encoded video data to restore the video data, and display the video picture based on the restored video data. Unidirectional data transmission is more common in applications such as media services.
[0052] In another embodiment, the communication system (200) includes a third terminal device (230) and a fourth terminal device (240) that perform bidirectional transmission of encoded video data, which can occur, for example, during a video conference. For bidirectional data transmission, each of the third terminal device (230) and the fourth terminal device (240) can encode video data (e.g., a video picture stream collected by the terminal device) to transmit to the other terminal device of the third terminal device (230) and the fourth terminal device (240) through a network (250). Each of the third terminal device (230) and the fourth terminal device (240) can also receive the encoded video data transmitted by the other terminal device of the third terminal device (230) and the fourth terminal device (240), and can decode the encoded video data to restore the video data, and can display the video picture on an accessible display device based on the restored video data.
[0053] exist Figure 2In the embodiment of the present invention, the first terminal device (210), the second terminal device (220), the third terminal device (230) and the fourth terminal device (240) may be servers, personal computers and smart phones, but the principles disclosed in the present application may not be limited thereto. The embodiments disclosed in the present application are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing equipment. The network (250) represents any number of networks that transmit encoded video data between the first terminal device (210), the second terminal device (220), the third terminal device (230) and the fourth terminal device (240), including, for example, wired (wired) and / or wireless communication networks. The communication network (250) may exchange data in circuit switching and / or packet switching channels. The network may include a telecommunications network, a local area network, a wide area network and / or the Internet. For the purpose of the present application, unless explained below, the architecture and topology of the network (250) may be irrelevant to the operation disclosed in the present application.
[0054] As an example, Figure 3 The video encoder and video decoder are shown in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0055] The streaming system may include an acquisition subsystem (313), which may include a video source (301) such as a digital camera, which creates an uncompressed video picture stream (302). In an embodiment, the video picture stream (302) includes samples taken by a digital camera. Compared to the encoded video data (304) (or the encoded video bitstream), the video picture stream (302) is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream (302) can be processed by an electronic device (320), which includes a video encoder (303) coupled to the video source (301). The video encoder (303) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream (302), the encoded video data (304) (or the encoded video bitstream (304)) is depicted as a thin line to emphasize the lower amount of data of the encoded video data (304) (or the encoded video bitstream (304)), which can be stored on the streaming server (305) for future use. One or more streaming client subsystems, such as Figure 3The client subsystem (306) and the client subsystem (308) in the streaming server (305) can access the streaming server (305) to retrieve the copy (307) and the copy (309) of the encoded video data (304). The client subsystem (306) may include, for example, a video decoder (310) in the electronic device (330). The video decoder (310) decodes the incoming copy (307) of the encoded video data and generates an output video picture stream (311) that can be presented on a display (312) (e.g., a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data (304), the video data (307), and the video data (309) (e.g., a video bitstream) can be encoded according to certain video encoding / compression standards. Examples of these standards include ITU-T H.265. In an embodiment, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and the present application can be used in the context of the VVC standard.
[0056] It should be noted that the electronic device (320) and the electronic device (330) may include other components (not shown). For example, the electronic device (320) may include a video decoder (not shown), and the electronic device (330) may also include a video encoder (not shown).
[0057] Figure 4 4 is a block diagram of a video decoder (410) according to an embodiment disclosed in the present application. The video decoder (410) may be provided in an electronic device (430). The electronic device (430) may include a receiver (431) (e.g., a receiving circuit). The video decoder (410) may be used to replace Figure 3 A video decoder (310) of an embodiment.
[0058] The receiver (431) may receive one or more encoded video sequences to be decoded by the video decoder (410); in the same or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (401), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (431) may receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective consuming entities (not shown). The receiver (431) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (415) may be coupled between the receiver (431) and the entropy decoder / parser (420) (hereinafter referred to as "parser (420)"). In some applications, the buffer memory (415) is part of the video decoder (410). In other cases, the buffer memory (415) may be provided external to the video decoder (410) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (410) to prevent network jitter, for example, and another buffer memory (415) may be configured inside the video decoder (410) to handle broadcast timing, for example. When the receiver (431) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (415), or the buffer memory may be made smaller. Of course, in order to use on a service packet network such as the Internet, a buffer memory (415) may also be required, and the buffer memory may be relatively large and have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (410).
[0059] The video decoder (410) may include a parser (420) to reconstruct symbols (421) from the encoded video sequence. The types of symbols include information used to manage the operation of the video decoder (410) and potential information used to control a display device such as a display device (412) (e.g., a display screen) that is not part of the electronic device (430) but can be coupled to the electronic device (430), such as Figure 4As shown in . The control information for the display device may be a parameter set fragment (not indicated) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (420) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and the like. The parser (420) may extract a subgroup parameter set of at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (420) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, and so on.
[0060] The parser (420) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (415), thereby creating symbols (421).
[0061] Depending on the type of coded video picture or portion of coded video picture (e.g., inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (421) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (420) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (420) and the multiple units below is not described.
[0062] In addition to the functional blocks already mentioned, the video decoder (410) can be conceptually subdivided into several functional units as described below. In a practical embodiment operating under commercial constraints, many of these units interact closely with each other and can be integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.
[0063] The first unit is a sealer / inverse transform unit (451). The sealer / inverse transform unit (451) receives quantized transform coefficients as symbols (421) from the parser (420) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (451) can output a block including sample values, which can be input into an aggregator (455).
[0064] In some cases, the output samples of the scaler / inverse transform unit (451) 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 (452). In some cases, the intra-picture prediction unit (452) generates surrounding blocks of the same size and shape as the block being reconstructed using reconstructed information extracted from a current picture buffer (458). For example, the current picture buffer (458) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (455) adds the prediction information generated by the intra-prediction unit (452) to the output sample information provided by the scaler / inverse transform unit (451) on a per-sample basis.
[0065] In other cases, the output samples of the scaler / inverse transform unit (451) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (453) may access the reference picture memory (457) to extract samples for prediction. After the extracted samples are motion compensated according to the symbols (421), these samples may be added to the output of the scaler / inverse transform unit (451) (in this case referred to as residual samples or residual signals) by the aggregator (455) to generate output sample information. The acquisition of the predicted samples by the motion compensated prediction unit (453) from the address in the reference picture memory (457) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (453) in the form of the symbols (421), for example, including X, Y and reference picture components. Motion compensation may also include interpolation of sample values extracted from the reference picture memory (457) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.
[0066] The output samples of the aggregator (455) may be employed by various loop filtering techniques in a loop filter unit (456). The video compression techniques may include in-loop filter techniques controlled by parameters included in the encoded video sequence (also referred to as the encoded video bitstream) and available to the loop filter unit (456) as symbols (421) from the parser (420). However, in other embodiments, the video compression techniques may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of an encoded picture or encoded video sequence, as well as to previously reconstructed and loop filtered sample values.
[0067] The output of the loop filter unit (456) may be a sample stream that may be output to a display device (412) and stored in a reference picture memory (457) for subsequent inter-picture prediction.
[0068] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (420)), the current picture buffer (458) may become part of the reference picture memory (457), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.
[0069] The video decoder (410) may perform decoding operations according to a predetermined video compression technique, such as in the ITU-T H.265 standard. The encoded video sequence may conform to the syntax specified by the video compression technique or standard used in the sense that the encoded video sequence follows the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technique or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technique or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.
[0070] In an embodiment, the receiver (431) may receive additional (redundant) data along with the encoded video. The additional data may be part of the encoded video sequence. The additional data may be used by the video decoder (410) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0071] Figure 5 1 is a block diagram of a video encoder (503) according to an embodiment disclosed in the present application. The video encoder (503) is provided in an electronic device (520). The electronic device (520) includes a transmitter (540) (e.g., a transmission circuit). The video encoder (503) can be used to replace Figure 3 A video encoder (303) in an embodiment.
[0072] The video encoder (503) can be used to obtain the video source (501) (not Figure 5 In another embodiment, the video source (501) is a part of the electronic device (520) to receive video samples, and the video source can collect video images to be encoded by the video encoder (503). In another embodiment, the video source (501) is a part of the electronic device (520).
[0073] The video source (501) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (503), wherein the digital video sample stream may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (501) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (501) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, wherein each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on the samples.
[0074] According to an embodiment, the video encoder (503) may encode and compress pictures of a source video sequence into an encoded video sequence (543) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (550). In some embodiments, the controller (550) controls other functional units as described below and is functionally coupled to these units. For the sake of simplicity, couplings are not shown in the figure. The parameters set by the controller (550) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (550) can be used to have other suitable functions that are related to the video encoder (503) optimized for a certain system design.
[0075] In some embodiments, the video encoder (503) operates in a coding loop. As a simple description, in embodiments, the coding loop may include a source encoder (530) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (533) embedded in the video encoder (503). The decoder (533) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data (because in the video compression technology considered in this application, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (534). 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 (534) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.
[0076] The operation of the "local" decoder (533) may be combined with, for example, Figure 4 The "remote" decoder described in detail for the video decoder (410) is identical. However, additional brief reference is made to Figure 4 , when symbols are available and the entropy encoder (545) and parser (420) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (410), including the buffer memory (415) and the parser (420), may not be fully implemented in the local decoder (533).
[0077] At this point, it can be observed that any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. For this reason, the present application focuses on decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only needed in certain areas and is provided below.
[0078] During operation, in some embodiments, the source encoder (530) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this manner, the encoding engine (532) encodes the differences between pixel blocks of the input picture and pixel blocks of a reference picture that may be selected as a prediction reference for the input picture.
[0079] The local video decoder (533) may decode the encoded video data that may be designated as a reference picture based on the symbol created by the source encoder (530). The operation of the encoding engine (532) may be a lossy process. When the encoded video data is available at the video decoder ( Figure 5 When the video sequence is decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (533) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture cache (534). In this way, the video encoder (503) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the remote video decoder.
[0080] The predictor (535) may perform a prediction search for the encoding engine (532). That is, for a new picture to be encoded, the predictor (535) may search the reference picture memory (534) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (535) may operate pixel-by-pixel based on sample blocks to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (535), it may be determined that the input picture may have prediction references taken from a plurality of reference pictures stored in the reference picture memory (534).
[0081] The controller (550) may manage encoding operations of the source encoder (530), including, for example, setting parameters and subgroup parameters for encoding video data.
[0082] The outputs of all the above functional units may be entropy encoded in an entropy encoder (545). The entropy encoder (545) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby converting the symbols into a coded video sequence.
[0083] The transmitter (540) may buffer the encoded video sequence created by the entropy encoder (545) in preparation for transmission over a communication channel (560), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (540) may combine the encoded video data from the video encoder (503) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).
[0084] The controller (550) may manage the operation of the video encoder (503). During encoding, the controller (550) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:
[0085] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of the variations of I pictures and their corresponding applications and features.
[0086] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values for each block.
[0087] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstruction of a single block.
[0088] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined according to the coding allocation applied to the block's corresponding picture. For example, blocks of an I picture may be non-predictively coded, or the blocks may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. Blocks of pixels of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. Blocks of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.
[0089] The video encoder (503) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (503) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.
[0090] In an embodiment, the transmitter (540) may transmit additional data when transmitting the encoded video. The source encoder (530) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0091] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an embodiment, a particular picture being encoded / decoded is partitioned into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.
[0092] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and future in display order, respectively). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. Specifically, the block may be predicted by a combination of the first reference block and the second reference block.
[0093] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.
[0094] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in blocks. For example, according to the HEVC standard, pictures in a video picture sequence are divided into coding tree units (CTUs) for compression, and the CTUs in the pictures have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), which are a luminance CTB and two chrominance CTBs. Furthermore, each CTU can be split into one or more coding units (CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In an embodiment, each CU is analyzed to determine the prediction type for the CU, such as an inter-prediction type or an intra-prediction type. In addition, depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luminance prediction block (PB) and two chrominance PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luminance prediction block as an example of a prediction block, the prediction block includes a matrix of pixel values (e.g., luminance values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.
[0095] Figure 6 1 is a diagram of a video encoder (603) according to another embodiment disclosed in the present application. The video encoder (603) is used to receive a processed block (e.g., a prediction block) of sample values in a current video picture in a video picture sequence, and encode the processed block into an encoded picture that is part of an encoded video sequence. In this embodiment, the video encoder (603) is used to replace Figure 3A video encoder (303) in an embodiment.
[0096] In an HEVC embodiment, a video encoder (603) receives a matrix of sample values for a processing block, such as a prediction block of 8×8 samples. The video encoder (603) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to encode the processing block. When encoding the processing block in intra mode, the video encoder (603) may use intra prediction techniques to encode the processing block into an encoded picture; and when encoding the processing block in inter mode or bidirectional prediction mode, the video encoder (603) may use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, in which a motion vector is derived from one or more motion vector predictors without the aid of an encoded motion vector component external to the predictor. In some other video encoding techniques, there may be a motion vector component applicable to the subject block. In an embodiment, the video encoder (603) includes other components, such as a mode decision module (not shown) for determining the processing block mode.
[0097] exist Figure 6 In an embodiment of the present invention, the video encoder (603) includes: Figure 6 Shown are an inter-frame encoder (630), an intra-frame encoder (622), a residual calculator (623), a switch (626), a residual encoder (624), a common controller (621), and an entropy encoder (625) coupled together.
[0098] The inter-frame encoder (630) is used to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some embodiments, the reference picture is a decoded reference picture decoded based on the encoded video information.
[0099] The intra-frame encoder (622) is used to receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra-frame prediction information (e.g., intra-frame prediction direction information according to one or more intra-frame coding techniques). In an embodiment, the intra-frame encoder (622) also calculates an intra-frame prediction result (e.g., a predicted block) based on the intra-frame prediction information and a reference block in the same picture.
[0100] The general controller (621) is used to determine the general control data and control other components of the video encoder (603) based on the general control data. In an embodiment, the general controller (621) determines the mode of the block and provides a control signal to the switch (626) based on the mode. For example, when the mode is intra mode, the general controller (621) controls the switch (626) to select the intra mode result for use by the residual calculator (623) and controls the entropy encoder (625) to select the intra prediction information and add the intra prediction information to the bitstream; and when the mode is inter mode, the general controller (621) controls the switch (626) to select the inter prediction result for use by the residual calculator (623) and controls the entropy encoder (625) to select the inter prediction information and add the inter prediction information to the bitstream.
[0101] The residual calculator (623) is used to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (622) or the inter-frame encoder (630). The residual encoder (624) is used to operate based on the residual data to encode the residual data to generate a transform coefficient. In an embodiment, the residual encoder (624) is used to convert the residual data from the time domain to the frequency domain and generate a transform coefficient. The transform coefficient is then processed by quantization to obtain a quantized transform coefficient. In various embodiments, the video encoder (603) also includes a residual decoder (628). The residual decoder (628) is used to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra-frame encoder (622) and the inter-frame encoder (630). For example, the inter-frame encoder (630) can generate a decoded block based on the decoded residual data and the inter-frame prediction information, and the intra-frame encoder (622) can generate a decoded block based on the decoded residual data and the intra-frame prediction information. The decoded blocks are appropriately processed to generate a decoded picture, and in some embodiments, the decoded picture may be buffered in a memory circuit (not shown) and used as a reference picture.
[0102] The entropy encoder (625) is used to format the code stream to produce an encoded block. The entropy encoder (625) generates various information according to a suitable standard such as the HEVC standard. In an embodiment, the entropy encoder (625) is used to obtain general control data, selected prediction information (such as intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the code stream. It should be noted that according to the disclosed subject matter, when the block is encoded in the inter-frame mode or the merge sub-mode of the bidirectional prediction mode, there is no residual information.
[0103] Figure 7FIG. 7 is a diagram of a video decoder (710) according to another embodiment disclosed in the present application. The video decoder (710) is used to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an embodiment, the video decoder (710) is used to replace Figure 3 A video decoder (310) of an embodiment.
[0104] exist Figure 7 In one embodiment, the video decoder (710) includes: Figure 7 An entropy decoder (771), an inter-frame decoder (780), a residual decoder (773), a reconstruction module (774) and an intra-frame decoder (772) coupled together are shown in FIG.
[0105] The entropy decoder (771) may be used to reconstruct certain symbols from the encoded picture, which represent syntax elements constituting the encoded picture. Such symbols may include, for example, a mode for encoding the block (e.g., intra mode, inter mode, bidirectional prediction mode, a merged sub-mode of the latter two, or another sub-mode), prediction information (e.g., intra prediction information or inter prediction information) that may identify certain samples or metadata for prediction by the intra decoder (772) or the inter decoder (780), respectively, residual information in the form of, for example, quantized transform coefficients, and the like. In an embodiment, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (780); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (772). The residual information may be inverse quantized and provided to the residual decoder (773).
[0106] The inter-frame decoder (780) is used for receiving the inter-frame prediction information and generating an inter-frame prediction result based on the inter-frame prediction information.
[0107] The intra-frame decoder (772) is used to receive intra-frame prediction information and generate a prediction result based on the intra-frame prediction information.
[0108] The residual decoder (773) is used to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (773) may also require some control information (to obtain the quantizer parameter QP), and this information can be provided by the entropy decoder (771) (the data path is not indicated because this is only low-volume control information).
[0109] The reconstruction module (774) is used to combine the residual output by the residual decoder (773) with the prediction result (which can be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which can be part of a reconstructed picture, which in turn can be part of a reconstructed video. It should be noted that other suitable operations such as deblocking operations can be performed to improve visual quality.
[0110] It should be noted that the video encoder (303), video encoder (503) and video encoder (603) and video decoder (310), video decoder (410) and video decoder (710) may be implemented using any suitable technology. In an embodiment, the video encoder (303), video encoder (503) and video encoder (603) and video decoder (310), video decoder (410) and video decoder (710) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (303), video encoder (503) and video encoder (603) and video decoder (310), video decoder (410) and video decoder (710) may be implemented using one or more processors that execute software instructions.
[0111] Intra prediction in VVC
[0112] Fig. 8A Schematic diagram showing exemplary intra prediction directions and corresponding intra prediction modes in some examples (eg, VVC). Fig. 8A There are a total of 95 intra prediction modes (modes -14 to 80), among which mode 0 is a planar mode (called INTRA_PLANAR), mode 1 is a DC mode (called INTRA_DC), and other modes (modes -14 to -1 and modes 2 to 80) are angle (or direction) modes (also called INTRA_ANGULAR). In the angle (or direction) modes, mode 18 (called INTRA_ANGULAR18) is a horizontal mode, mode 50 (called INTRA_ANGULAR50) is a vertical mode, mode 2 (called INTRA_ANGULAR2) is a diagonal mode pointing to the lower left, mode 34 (called INTRA_ANGULAR34) is a diagonal mode pointing to the upper left, and mode 66 (called INTRA_ANGULAR66) is a diagonal mode pointing to the upper right. Modes -14 to -1 and modes 67 to 80 are called wide angle intra prediction (WAIP) modes. Exemplary angular intra prediction modes and their corresponding intra prediction angles are shown in Figure 8B Listed in.
[0113] Position Dependent Prediction Combination (PDPC) Filtering Process
[0114] According to an embodiment of the present application, the position-dependent prediction combination (PDPC) can be applied to the following intra-frame modes without signaling: planar mode, DC mode, WAIP mode, horizontal mode, vertical mode, lower left angle mode (mode 2) and its 8 adjacent angle modes (modes 3 to 10), and upper right angle mode (mode 66) and its 8 adjacent angle modes (modes 58 to 65).
[0115] In an embodiment, a prediction sample pred'[x][y] located at position (x, y) in the current block is predicted using an intra prediction mode (eg, DC mode, planar mode, or angular mode) and a linear combination of reference samples based on Equation 1.
[0116] pred'[x][y]=(wL×R(-1, y)+wT×R(x,-1)-wTL×R(-1,-1)+
[0117] (64-wL-wT+wTL)×pred[x][y]+32)>>6 (Equation 1)
[0118] Where pred[x][y] is the intra-frame prediction value generated by the intra-frame prediction mode; R(x, -1) represents the (unfiltered) reference sample, which is located on the top reference line of the current sample (x, y) and has the same horizontal coordinate as the current sample (x, y); R(-1, y) represents the (unfiltered) reference sample, which is located on the left reference line of the current sample (x, y) and has the same vertical coordinate as the current sample (x, y); R(-1, -1) represents the reference sample located at the upper left corner of the current block; wT, wL and wTL represent weighting factors.
[0119] In an embodiment, when the intra prediction mode is the DC mode, the weighting factor may be calculated by Equation 2 to Equation 5.
[0120] wT=32>>((y<<1)>>nScale) (Equation 2)
[0121] wL=32>>((x<<1)>>nScale) (Equation 3)
[0122] wTL=+(wL>>4)+(wT>>4) (Equation 4)
[0123] nScale=(log2(width)+log2(height)-2)>>2 (Equation 5)
[0124] Wherein, wT represents the weighting factor of the reference sample (x, -1), wL represents the weighting factor of the reference sample (-1, y), and wTL represents the weighting factor of the upper left reference sample (-1, -1), and nScale (called the weighting factor decreasing rate) specifies the speed at which these weighting factors decrease along the axis (e.g., wL decreases from left to right along the x-axis, or wT decreases from top to bottom along the y-axis). The constant 32 in Equation 2 and Equation 3 represents the initial weighting factor of the neighboring sample (e.g., the top neighboring sample, the left neighboring sample, or the upper left neighboring sample). The initial weighting factor is also assigned to the upper left sample of the current block. The weighting factors of the neighboring samples in the PDPC filtering process are equal to or less than the initial weighting factor.
[0125] In an embodiment, when the intra prediction mode is a planar mode, wTL is set equal to 0; when the intra prediction mode is a horizontal mode, wTL is set equal to wT; when the intra prediction mode is a vertical mode, wTL is set equal to wL. The PDPC weighting factor can be calculated using addition and shift operations. The value of pred'[x][y] can be calculated by Equation 1.
[0126] Fig.9A Exemplary weighting factors for the predicted sample at (0,0) in DC mode are shown. Fig.9A In the example of , the current block is a 4x4 block (width=height=4), so nScale is 0. Then, wT is 32, wL is 32, and wTL is 4.
[0127] Fig. 9B Exemplary weighting factors for the predicted sample at (1,0) in DC mode are shown. Fig. 9B In the example of , the current block is a 4x4 block (width=height=4), so nScale is 0. Then, wT is 32, wL is 8, and wTL is 2.
[0128] In some embodiments, when the PDPC filtering process is applied to DC mode, planar mode, horizontal mode, and vertical intra mode, no additional boundary filters, such as HEVC DC mode boundary filters or horizontal / vertical mode edge filters, are required.
[0129] Exemplary PDPC Filtering Process
[0130] In some examples, the inputs to the PDPC filtering process include:
[0131] The intra prediction mode indicated by preModeIntra;
[0132] The width of the current block, denoted by nTbW;
[0133] The height of the current block, denoted by nTbH;
[0134] The width of the reference sample is denoted by refW;
[0135] the height of the reference sample denoted by trfH;
[0136] The predicted samples are represented by predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1;
[0137] the unfiltered reference (also called neighboring) samples denoted by p[x][y], where x=-1, y=-1..refH-1, and x=0..refW-1, y=-1; and
[0138] The color component of the current block represented by cIdx.
[0139] According to the value of cIdx, the function clip1Cmp is set as follows:
[0140] If cIdx is equal to 0, set clip1Cmp equal to Clip1 Y .
[0141] Otherwise, set clip1Cmp equal to Clip1 C .
[0142] Furthermore, the output of the PDPC filtering process is a modified prediction sample predSample'[x][y], where x=0..nTbW-1, y=0..nTbH-1.
[0143] Then, the scaling factor nScale can be calculated by Equation 6.
[0144] nScale=((Log2(nTbW)+Log2(nTbH)-2)>>2) (Equation 6)
[0145] Further, a reference sample array mainRef[x] of x=0..refW may be defined as an array of unfiltered reference samples above the current block, and another reference sample array sideRef[y] of y=0..refH may be defined as an array of unfiltered reference samples to the left of the current block. The reference sample arrays mainRef[x] and sideRef[y] may be derived from the unfiltered reference samples according to Equations 7 to 8, respectively.
[0146] mainRef[x] = p[x][-1] (Equation 7)
[0147] sideRef[y]=p[-1][y] (Equation 8)
[0148] For each position (x, y) in the current block, the PDPC calculation can use the reference sample at the top denoted as refT[x][y], the reference sample at the left denoted as refL[x][y], and the reference sample at the corner p[-1,-1]. The modified prediction sample can be calculated by equation 9, and the result can be appropriately adjusted according to the variable cIdx indicating the color component.
[0149]
[0150] Reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined based on the intra prediction mode preModeIntra.
[0151] When the intra prediction mode preModeIntra is equal to INTRA_PLANAR (e.g., 0, planar mode or mode 0) or INTRA_DC (e.g., 1, DC mode or mode 1), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 10 to 14.
[0152] refL[x][y]=p[-1][y] (Equation 10)
[0153] refT[x][y]=p[x][-1] (Equation 11)
[0154] wT[y]=32>>((y<<1)>>nScale) (Equation 12)
[0155] wL[x]=32>>((x<<1)>>nScale) (Equation 13)
[0156] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)): 0 (Equation 14)
[0157] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR18 (e.g., 18, horizontal mode or mode 18) or INTRA_ANGULAR50 (e.g., 50, vertical mode or mode 50), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 15 to 19.
[0158] refL[x][y]=p[-1][y] (Equation 15)
[0159] refT[x][y]=p[x][-1] (Equation 16)
[0160] wT[y]=(predModeIntra==INTRA_ANGULAR18)? 32>>((y<<1)>>nScale): 0 (Equation 17)wL[x]=(predModeIntra==INTRA_ANGULAR50)? 32>>((x<<1)>>nScale): 0 (Equation 18) wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)? wT[y]: wL[x] (Equation 19)
[0161] Otherwise, when the intra prediction mode predModeIntra is equal to INTRA_ANGULAR2 (e.g., 2 or mode 2) or INTRA_ANGULAR66 (e.g., 66 or mode 66), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 20 to 24.
[0162] refL[x][y]=p[-1][x+y+1] (Equation 20)
[0163] refT[x][y]=p[x+y+1][-1] (Equation 21)
[0164] wT[y]=(32>>1)>>(y<<1)>>nScale) (Equation 22)
[0165] wL[x]=(32>>1)>>((x<<1)>>nScale) (Equation 23)
[0166] wTL[x][y]=0 (Equation 24)
[0167] Otherwise, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10 (e.g., 10 or mode 10), for each position (x, y), variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y].
[0168] The variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] may be determined according to Equations 25 to 28.
[0169] dXPos[y]=((y+1)×invAngle+2)>>2 (Equation 25)
[0170] dXFrac[y]=dXPos[y]&63 (Equation 26)
[0171] dXInt[y]=dXPos[y]>>6 (Equation 27)
[0172] dX[x][y]=x+dXInt[y] (Equation 28)
[0173] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 29 to 33.
[0174] refL[x][y] = 0 (Equation 29)
[0175] refT[x][y]=(dX[x][y]<refW-1)? mainRef[dX[x][y]+(dXFrac[y]>>5)]: 0 (Equation 30)
[0176] wT[y]=(dX[y]<refW-1)? 32>>((y<<1)>>nScale): 0 (Equation 31)
[0177] wL[x]=0 (Equation 32)
[0178] wTL[x][y]=0 (Equation 33)
[0179] Otherwise, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58 (e.g., 58 or mode 58), variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dYPos[x], dYfrac[x], dYInt[x], and dY[x][y].
[0180] The variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be determined according to Equations 34 to 37.
[0181] dYPos[x]=((x+1)×invAngle+2)>>2 (Equation 34)
[0182] dYFrac[x]=dYPos[x]&63 (Equation 35)
[0183] dYInt[x]=dYPos[x]>>6 (Equation 36)
[0184] dY[x][y]=x+dYInt[x] (Equation 37)
[0185] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 38 to 42.
[0186] refL[x][y]=(dY[x][y]<refH-1)? sideRef[dY[x][y]+(dYFrac[x]>>5)]: 0 (Equation 38)
[0187] refT[x][y]=0 (Equation 39)
[0188] wT[y]=0 (Equation 40)
[0189] wL[x]=(dY[x]<refH-1)?32>>((x<<1)>>nScale):0 (Equation 41)
[0190] wTL[x][y]=0 (Equation 42)
[0191] Otherwise, when the variable preModeIntra is between mode 11 and mode 57 and is not one of mode 18 and mode 50, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL are all set to equal 0.
[0192] Finally, the value of the filtered samples filtSamples[x][y] can be derived according to Equation 43, where x=0..nTbW-1, y=0..nTbH-1.
[0193] filtSamples[x][y]=clip1Cmp((refL[x][y]×wL+refT[x][y]×wT-p[-1][-1]×wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])×predSamples[x][y]+32)>>6)
[0194] (Equation 43)
[0195] In some examples (e.g., in VVC), for an nTbW×nTbH transform block in an nCbW×nCbH current block, when intra prediction is performed with PDPC, if the current block is not encoded in intra sub-partitioning (ISP) mode (i.e., IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, as shown in VVC draft v5), the range of the top available reference samples (refW) is set to 2×nTbW, and the range of the left available reference samples (refH) is set to 2×nTbH. Otherwise, if ISP is applied to the current block (i.e., IntraSubPartitionsBplitType is not equal to ISP_NO_SPLIT, as shown in VVC draft v5), the range of the top available reference samples (refW) is set to 2×nCbW, and the range of the left available reference samples (refH) is set to 2×nTbH.
[0196] Improved technology of PDPC
[0197] In the "Exemplary PDPC filtering process" of the above section or some related examples (for example, in VTM5.0), different PDPC processes can be applied to intra-frame coding blocks having diagonal intra-frame prediction modes and modes adjacent to the diagonal intra-frame prediction modes. For example, different PDPC processes can be applied to mode 2 and its adjacent modes (for example, the mode index is equal to or less than 10). In another example, different PDPC processes are applied to mode 66 and its adjacent modes (for example, the mode index is equal to or greater than 58). However, the prediction processes for the diagonal prediction mode and its adjacent modes are similar, so there is no obvious benefit in retaining different PDPC processes for these modes. Therefore, an embodiment of the present application provides an improved technique for the PDPC process.
[0198] The present techniques or methods may be used alone or in combination in any order. It should be noted that in the following sections, PDPC may be used as a general term for a position-dependent boundary filtering process of a prediction sample, which applies a linear combination of the prediction sample and the adjacent reconstructed samples using position-dependent weights, and the result may be used to replace the original prediction sample. Therefore, the PDPC process is not limited to the process described in the above section "Exemplary PDPC Filtering Process".
[0199] In addition, in the following description, the diagonal intra prediction mode may be Fig. 8A In the example of mode 2 and mode 66, a mode adjacent to mode 2 may have a mode index smaller than the horizontal mode (e.g., the intra-frame mode index is less than 18), and a mode adjacent to mode 66 may have a mode index greater than the vertical mode (e.g., the intra-frame mode index is greater than 50).
[0200] According to an embodiment of the present application, the same PDPC process (eg, the same range of available reference samples, the same weighting factor for each position) is applied to the diagonal intra prediction mode and the modes adjacent to the diagonal intra prediction mode.
[0201] In one embodiment, the diagonal intra prediction mode may be Fig. 8A Mode 2 and mode 66 in , and the modes adjacent to the diagonal intra prediction mode may be Fig. 8A Mode-1 to Mode-14, Mode 3 to Mode 10, Mode 58 to Mode 65, and Mode 67 to Mode 80.
[0202] In one embodiment, for blocks using diagonal prediction modes, the PDPC process may use only a subset of available neighboring reference samples, but for blocks using modes adjacent to the diagonal prediction mode, the PDPC process may use all available neighboring reference samples. For example, for blocks predicted using diagonal intra prediction modes (e.g., mode 2 and mode 66 in VVC draft v5), only refW-K top neighboring reference samples and refH-K left neighboring reference samples are used in the PDPC process, where refW and refH represent the total number of available top reference samples and available left reference samples, respectively (as specified in the VVC draft v5 clause "General intra sample prediction" and also described in the above section "Exemplary PDPC filtering process"), and K is a positive integer (e.g., 1, 2, 3, or 4).
[0203] In one embodiment, for diagonal modes (eg, mode 2 and mode 66 in VVC draft v5), all top and left available reference samples except the rightmost and bottommost samples may be used for PDPC.
[0204] Exemplary Modifications of the PDPC Process
[0205] In some embodiments (eg, Embodiments A to E below), the PDPC process may be modified as follows.
[0206] Example A
[0207] Exemplary inputs to the PDPC filtering process include:
[0208] The intra prediction mode indicated by preModeIntra;
[0209] The width of the current block, denoted by nTbW;
[0210] The height of the current block, denoted by nTbH;
[0211] The width of the reference sample is denoted by refW;
[0212] the height of the reference sample denoted by refH;
[0213] The predicted samples are represented by predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1;
[0214] the unfiltered reference (also called neighboring) samples denoted by p[x][y], where x=-1, y=-1..refH-1, and x=0..refW-1, y=-1; and
[0215] The color component of the current block represented by cIdx.
[0216] Depending on the value of cIdx, the function clip1Cmp can be set as follows:
[0217] If cIdx is equal to 0, set Clip1Cmp equal to Clip1 Y .
[0218] Otherwise, set clip1Cmp equal to Clip1 C .
[0219] Further, the output of the PDPC filtering process may be modified prediction samples predSamples′[x][y], where x=0..nTbW-1, y=0..nTbH-1.
[0220] Then, the scaling factor nScale can be calculated by Equation 44.
[0221] nScale=((Log2(nTbW)+Log2(nTbH)-2)>>2) (Equation 44)
[0222] Further, a reference sample array mainRef[x] of x=0..refW may be defined as an array of unfiltered reference samples above the current block, and another reference sample array sideRef[y] of y=0..refH may be defined as an array of unfiltered reference samples to the left of the current block. The reference sample arrays mainRef[x] and sideRef[y] may be derived from the unfiltered reference samples according to Equations 45 to 46, respectively.
[0223] mainRef[x] = p[x][-1] (Equation 45)
[0224] sideRef[y]=p[-1][y] (Equation 46)
[0225] For each position (x, y) in the current block, the PDPC calculation can use the reference sample at the top denoted as refT[x][y], the reference sample at the left denoted as refL[x][y], and the reference sample at the corner p[-1,-1]. In some examples, the modified prediction sample can be calculated by equation 47, and the result can be appropriately adjusted according to the variable cIdx indicating the color component.
[0226]
[0227] Reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined based on the intra prediction mode preModeIntra.
[0228] When the intra prediction mode preModeIntra is equal to INTRA_PLANAR (e.g., 0, planar mode or mode 0) or INTRA_DC (e.g., 1, DC mode or mode 1), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 48 to 52.
[0229] refL[x][y]=p[-1][y] (Equation 48)
[0230] refT[x][y]=p[x][-1] (Equation 49)
[0231] wT[x]=32>>((y<<1)>>nScale) (Equation 50)
[0232] wL[x]=32>>((x<<1)>>nScale) (Equation 51)
[0233] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)): 0 (Equation 52)
[0234] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR18 (e.g., 18, horizontal mode or mode 18) or INTRA_ANGULAR50 (e.g., 50, vertical mode or mode 50), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 53 to 57.
[0235] refL[x][y]=p[-1][y] (Equation 53)
[0236] refT[x][y]=p[x][-1] (Equation 54)
[0237] wT[y]=(predModeIntra==INTRA_ANGULAR18)? 32>>((y<<1)>>nScale): 0 (Equation 55)
[0238] wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0 (Equation 56)
[0239] wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)? wT[y]: wL[x] (Equation 57)
[0240] Otherwise, when the intra prediction mode preNodeIntra is less than or equal to INTRA_ANGULAR10 (e.g., 10 or mode 10), for each position (x, y), variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y].
[0241] For example, the variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] may be determined according to Equations 58 to 61.
[0242] dXPos[y]=((y+1)×invAngle+2)>>2 (Equation 58)
[0243] dXFrac[y]=dXPos[y]&63 (Equation 59)
[0244] dXInt[y]=dXpos[y]>>6 (Equation 60)
[0245] dX[x][y]=x+dXInt[y] (Equation 61)
[0246] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 62 to 66.
[0247] refL[x][y]=0 (Equation 62)
[0248] refT[x][y]=(dX[x][y]<refW-1)? mainRef[dX[x][y]+(dXFrac[y]>>5)]: 0 (Equation 63)
[0249] wT[y]=(dX[y]<refW-1)?32>>((y<<1)>>nScale): 0 (Equation 64)
[0250] wL[x]=0 (Equation 65)
[0251] wTL[x][y]=0 (Equation 66)
[0252] Otherwise, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58 (e.g., 58 or mode 58), variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. irvAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y].
[0253] For example, the variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be determined according to Equations 67 to 70.
[0254] dYPos[x]=((x+1)×invAngle+2)>>2 (Equation 67)
[0255] dYFrac[x]=dYPos[x]&63 (Equation 68)
[0256] dYInt[x]=dYPos[x]>>6 (Equation 69)
[0257] dY[x][y]=x+dYInt[x] (Equation 70)
[0258] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 71 to 75.
[0259] refL[x][y]=(dY[x][y]<refH-1)? sideRef[dY[x][y]+(dYFrac[x]>>5)]: 0 (Equation 71)
[0260] refT[x][y]=0 (Equation 72)
[0261] wT[y]=0 (Equation 73)
[0262] wL[x]=(dY[x]<refH-1)?32>>((x<<1)>>nScale):0 (Equation 74)
[0263] wTL[x][y]=0 (Equation 75)
[0264] Otherwise, when the variable preModeIntra is between mode 11 and mode 57 and is not one of mode 18 and mode 50, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL are all set to equal 0.
[0265] Finally, the value of the filtered samples filtSamples[x][y] can be derived according to Equation 76, where x=0..nTbW-1, y=0..nTbH-1.
[0266] filtSamples[x][y]=clip1Cmp((refL[x][y]×wL+refT[x][y]×wT-p[-1][-1]×wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])×predSamples[x][y]+32)>>6)
[0267] (Equation 76)
[0268] The difference between Embodiment A and the above section "Exemplary PDPC filtering process" is that in Embodiment A, the same PDPC process is applied to the diagonal intra prediction mode and the modes adjacent to the diagonal intra prediction mode. In an example, the same PDPC process is applied to mode 2 and the modes adjacent to mode 2 (e.g., the mode index is equal to or less than 10). In another example, the same PDPC process is applied to mode 66 and the modes adjacent to mode 66 (e.g., the mode index is equal to or less than 58).
[0269] Example B
[0270] Exemplary inputs to the PDPC filtering process include:
[0271] The intra prediction mode indicated by preModeIntra;
[0272] The width of the current block, denoted by nTbW;
[0273] The height of the current block, denoted by nTbH;
[0274] The width of the reference sample is denoted by refW;
[0275] the height of the reference sample denoted by refH;
[0276] The predicted samples are represented by predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1;
[0277] the unfiltered reference (also called neighboring) samples denoted by p[x][y], where x=-1, y=-1..refH-1, and x=0..refW-1, y=-1; and
[0278] The color component of the current block represented by cIdx.
[0279] According to the value of cIdx, the function clip1Cmp is set as follows:
[0280] If cIdx is equal to 0, set clip1Cmp equal to Clip1 Y .
[0281] Otherwise, set clip1Cmp equal to Clip1 C .
[0282] Furthermore, the output of the PDPC filtering process is the modified prediction samples predSamples'[x][y], where x=0..nTbW-1, y=0..nTbH-1.
[0283] Then, the scaling factor nScale can be calculated by Equation 77.
[0284] nScale=((Log2(nTbW)+Log2(nTbH)-2)>>2) (Equation 77)
[0285] Further, a reference sample array mainRef[x] of x=0..refW may be defined as an array of unfiltered reference samples above the current block, and another reference sample array sideRef[y] of y=0..refH may be defined as an array of unfiltered reference samples to the left of the current block. The reference sample arrays mainRef[x] and sideRef[y] may be derived from the unfiltered reference samples according to Equations 78 to 79, respectively.
[0286] mainRef[x] = p[x][-1] (Equation 78)
[0287] sideRef[y] = p[-1][y] (Equation 79)
[0288] For each position (x, y) in the current block, the PDPC calculation can use the reference sample at the top denoted as refT[x][y], the reference sample at the left denoted as refL[x][y], and the reference sample at the corner p[-1,-1]. In some examples, the modified prediction sample can be calculated by equation 80, and the result can be appropriately adjusted according to the variable cIdx indicating the color component.
[0289]
[0290] Reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined based on the intra prediction mode preModeIntra.
[0291] When the intra prediction mode preModeIntra is equal to INTRA_PLANAR (e.g., 0, planar mode or mode 0) or INTRA_DC (e.g., 1, DC mode or mode 1), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 81 to 85.
[0292] refL[x][y]=p[-1][y] (Equation 81)
[0293] refT[x][y]=p[x][-1] (Equation 82)
[0294] wT[y]=32>>((y<<1)>>nScale) (Equation 83)
[0295] wL[x]=32>>((x<<1)>>nScale) (Equation 84)
[0296] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)): 0 (Equation 85)
[0297] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR18 (e.g., 18, horizontal mode or mode 18) or INTRA_ANGULAR50 (e.g., 50, vertical mode or mode 50), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 86 to 90.
[0298] refT[x][y]=p[x-1][y] (Equation 86)
[0299] refT[x][y]=p[x][-1] (Equation 87)
[0300] wT[y]=(predModeIntra==INTA_ANGULAR18)? 32>>((y<<1)>>nScale): 0 (Equation 88)
[0301] wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0 (Equation 89)
[0302] wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)?wt[y]:wL[x] (Equation 90)
[0303] Otherwise, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10 (e.g., 10 or mode 10), for each position (x, y), variables dXPos[y], dXInt[y], and dX[x][y] can be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dXPos[y], dXInt[y], and dX[x][y].
[0304] For example, the variables dXPos[y], dXInt[y], and dX[x][y] may be determined according to Equations 91 to 93.
[0305] dXPos[y]=((y+1)×invAngle+2)>>2 (Equation 91)
[0306] dXInt[y]=(dXPos[y]+32)>>6 (Equation 92)
[0307] dX[x][y]=x+dXint[y] (Equation 93)
[0308] Then, the reference samples refT[x][y], refL[x[p[ and weighting factors wL, wT and wTL can be determined according to Equations 94 to 98.
[0309] refL[x][y]=0 (Equation 94)
[0310] refT[x][y]=(dX[x][y]≥refW)? mainRef[dX[x][y]]: 0 (Equation 95)
[0311] wT(y)=(dX[y]<refW)》? 32>>((y<<1)>>nScale): 0 (Equation 96)
[0312] wL[x]=0 (Equation 97)
[0313] wTL[x][y]=0 (Equation 98)
[0314] Otherwise, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58 (e.g., 58 or mode 58), variables dYPos[x], dYInt[x], and dY[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dYPos[x], dYInt[x], and dY[x][y].
[0315] For example, the variables dYPos[x], dYInt[x], and dY[x][y] may be determined according to Equations 99 to 101.
[0316] dYPos[x]=((x+1)×inpAngle+2)>>2 (Equation 99)
[0317] dYInt[x]=(dYPos[x]+32)>>6 (Equation 100)
[0318] dY[x][y]=x+dYInt[x] (Equation 101)
[0319] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to equations 102 to 106.
[0320] refL[x][y]=(dY[x][y]<refH)? sideRef[dY[x][y]]: 0 (Equation 102)
[0321] refT[x][y]=0 (Equation 103)
[0322] wT[y]=0 (Equation 104)
[0323] wL[x]=(dY[x]<refH)?32>>((x<<1)>>nScale):0 (Equation 105)
[0324] wTL[x][y]=0 (Equation 106)
[0325] Otherwise, when the variable preModeIntra is between mode 11 and mode 57 and is not one of mode 18 and mode 50, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL are all set to equal 0.
[0326] Finally, the value of the filtered samples filtSamples[x][y] can be derived according to equation 107, where x=0..nTbW-1, y=0..nTbH-1.
[0327] filtSamples[x][y]=clip1Cmp((refL[x][y]×wL+refT[x][y]×wT-p[-1][-1]×wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])×predSamples[x][y]+32)>>6)
[0328] (Equation 107)
[0329] The difference between Embodiment A and Embodiment B is that, in Embodiment B, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10, dXFrac[y] is not calculated (Equation 59), and dXInt[y] may be calculated in a different manner (i.e., Equation 60 to Equation 92), so that refT[x][y] and wT[y] are calculated in a manner different from that of Embodiment A (i.e., Equation 63 to Equation 95, and Equation 64 to Equation 96). Similarly, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58, in Embodiment B, dYFrac[x] is not calculated (Equation 68), and dYInt[x] may be calculated in a different manner (i.e., Equation 69 to Equation 100), so that refL[x][y] and wL[y] are calculated in a manner different from that of Embodiment A (i.e., Equation 71 to Equation 102, and Equation 74 to Equation 105).
[0330] Example C
[0331] Exemplary inputs to the PDPC filtering process include:
[0332] The intra prediction mode indicated by preModeIntra;
[0333] The width of the current block, denoted by nTbW;
[0334] The height of the current block, denoted by nTbH;
[0335] The width of the reference sample is denoted by refW;
[0336] the height of the reference sample denoted by refH;
[0337] The predicted samples are represented by predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1;
[0338] the unfiltered reference (also called neighboring) samples denoted by p[x][y], where x=-1, y=-1..refH-1, and x=0..refW-1, y=-1; and
[0339] The color component of the current block represented by cIdx.
[0340] According to the value of cIdx, the function clip1Cmp is set as follows:
[0341] If cIdx is equal to 0, set clip1Cmp equal to Clip1 Y .
[0342] Otherwise, set clip1Cmp equal to Clip1 C .
[0343] Furthermore, the output of the PDPC filtering process is the modified prediction samples predSamples'[x][y], where x=0..nTbW-1, y=0..nTbH-1.
[0344] Then, the scaling factor nScale can be calculated by Equation 108.
[0345] nScale=((Log2(nTbW)+Log2(nTbH)-2)>>2 (Equation 108)
[0346] Further, a reference sample array mainRef[x] of x=0..refW may be defined as an array of unfiltered reference samples above the current block, and another reference sample array sideRef[y] of y=0..refH may be defined as an array of unfiltered reference samples to the left of the current block. The reference sample arrays mainRef[x] and sideRef[y] may be derived from the unfiltered reference samples according to equations 109 to 110, respectively.
[0347] mainRef[x] = p[x][-1] (Equation 109)
[0348] sideRef[y]=p[-1][y] (Equation 110)
[0349] For each position (x, y) in the current block, the PDPC calculation can use the reference sample at the top denoted as refT[x][y], the reference sample at the left denoted as refL[x][y], and the reference sample at the corner p[-1,-1]. In some examples, the modified prediction sample can be calculated by equation 111, and the result can be appropriately adjusted according to the variable cIdx indicating the color component.
[0350]
[0351] Reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined based on the intra prediction mode preModeIntra.
[0352] When the intra prediction mode preModeIntra is equal to INTRA_PLANAR (e.g., 0, planar mode or mode 0) or INTRA_DC (e.g., 1, DC mode or mode 1), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 112 to 116.
[0353] refL[x][y]=p[-1][y] (Equation 112)
[0354] refT[x][y]=p[x][-1] (Equation 113)
[0355] wT[y]=32>>((y<<1)>>nScale) (Equation 114)
[0356] wL[x]=32>>((x<<1)>>nScale) (Equation 115)
[0357] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)): 0 (Equation 116)
[0358] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR18 (e.g., 18, horizontal mode or mode 18) or INTRA_ANGULAR50 (e.g., 50, vertical mode or mode 50), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 117 to 121.
[0359] refT[x][y]=p[x-1][y] (Equation 117)
[0360] refT[x][y]=p[x][-1] (Equation 118)
[0361] wT[y]=(predModeIntra==INTA_ANGULAR18)? 32>>((y<<1)>>nScale): 0 (Equation 119)
[0362] wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0 (Equation 120)
[0363] wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)?wt[y]:wL[x] (Equation 121)
[0364] Otherwise, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10 (e.g., 10 or mode 10), for each position (x, y), variables dXInt[y] and dX[x][y] can be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dXInt[y] and dX[x][y].
[0365] For example, the variables dXInt[y] and dX[x][y] may be determined according to Equation 122 to Equation 123.
[0366] dXInt[y]=((y+1)×invAngle+128)>>8 (Equation 122)
[0367] dX[x][y]=x+dXInt[y] (Equation 123)
[0368] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 124 to 128.
[0369] refL[x][y]=0 (Equation 124)
[0370] refT[x][y]=(dX[x][y]<refW)? mainRef[dX[x][y]]: 0 (Equation 125)
[0371] wT[y]=(dX[y]<refW)? 32>>((y<<1)>>nScale): 0 (Equation 126)
[0372] wL[x]=0 (Equation 127)
[0373] wTL[x][y]=0 (Equation 128)
[0374] Otherwise, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58 (e.g., 58 or mode 58), variables dYInt[x] and dY[x][y] can be derived based on the variable invAngle, where the variable inpAngle is a function of the intra prediction mode preModeIntra. invAngle can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dYInt[x] and dY[x][y].
[0375] For example, the variables dYInt[x] and dY[x][y] may be determined according to Equations 129 to 130.
[0376] dYInt[x]=((x+1)×invAngle+128)>>8 (Equation 129)
[0377] dY[x][y]=x+dYInt[x] (Equation 130)
[0378] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 131 to 135.
[0379] refL[x][y]=(dY[x][y]<refH)? sideRef[dY[x][y]]: 0 (Equation 131)
[0380] refT[x][y]=0 (Equation 132)
[0381] wT[y]=0 (Equation 133)
[0382] wL[x]=(dY[x]<refH)?32>>((x<<1)>>nScale):0 (Equation 134)
[0383] wTL[x][y]=0 (Equation 135)
[0384] Otherwise, when the variable preModeIntra is between mode 11 and mode 57 and is not one of mode 18 and mode 50, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL are all set to equal 0.
[0385] Finally, the value of the filtered samples filtSamples[x][y] can be derived according to equation 136, where x=0..nTbW-1, y=0..nTbH-1.
[0386] filtSamples[x][y]=clip1Cmp((refL[x][y]×wL+refT[x][y]×wT-p[-1][-1]×wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])×predSamples[x][y]+32)>>6)
[0387] (Equation 136)
[0388] The difference between Embodiment B and Embodiment C is that, in Embodiment C, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10, dXPos[y] (Equation 91) is not calculated, and dXInt[y] may be calculated in a different manner (i.e., Equation 92 versus Equation 122). Similarly, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58, in Embodiment C, dYPos[x] (Equation 99) is not calculated, and dYInt[x] may be calculated in a different manner (i.e., Equation 100 versus Equation 129).
[0389] Example D
[0390] Exemplary inputs to the PDPC filtering process include:
[0391] The intra prediction mode indicated by preModeIntra;
[0392] The width of the current block, denoted by nTbW;
[0393] The height of the current block, denoted by nTbH;
[0394] The width of the reference sample is denoted by refW;
[0395] the height of the reference sample denoted by refH;
[0396] The predicted samples are represented by predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1;
[0397] the unfiltered reference (also called neighboring) samples denoted by p[x][y], where x=-1, y=-1..refH-1, and x=0..refW-1, y=-1; and
[0398] The color component of the current block represented by cIdx.
[0399] According to the value of cIdx, the function clip1Cmp is set as follows:
[0400] If cIdx is equal to 0, set clip1Cmp equal to Clip1Y.
[0401] Otherwise, set clip1Cmp equal to Clip1 C .
[0402] Furthermore, the output of the PDPC filtering process is the modified prediction samples predSamples'[x][y], where x=0..nTbW-1, y=0..nTbH-1.
[0403] Then, the scaling factor nScale can be calculated by Equation 137.
[0404] nScale=((Log2(nTbW)+Log2(nTbH)-2)>>2) (Equation 137)
[0405] Further, a reference sample array mainRef[x] of x=0..refW may be defined as an array of unfiltered reference samples above the current block, and another reference sample array sideRef[y] of y=0..refH may be defined as an array of unfiltered reference samples to the left of the current block. The reference sample arrays mainRef[x] and sideRef[y] may be derived from the unfiltered reference samples according to Equations 138 to 139, respectively.
[0406] mainRef[x] = p[x][-1] (Equation 138)
[0407] sideRef[y]=p[-1][y] (Equation 139)
[0408] For each position (x, y) in the current block, the PDPC calculation can use the reference sample at the top denoted as refT[x][y], the reference sample at the left denoted as refL[x][y], and the reference sample at the corner p[-1,-1]. The modified prediction sample can be calculated by equation 140, and the result can be appropriately adjusted according to the variable cIdx indicating the color component.
[0409]
[0410] Reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined based on the intra prediction mode preModeIntra.
[0411] When the intra prediction mode preModeIntra is equal to INTRA_PLANAR (e.g., 0, planar mode or mode 0) or INTRA_DC (e.g., 1, DC mode or mode 1), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 141 to 145.
[0412] refL[x][y]=p[-1][y] (Equation 141)
[0413] refT[x][y]=p[x][-1] (Equation 142)
[0414] wT[y]=32>>((y<<1)>>nScale) (Equation 143)
[0415] wL[x]=32>>((x<<1)>>nScale) (Equation 144)
[0416] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)): 0 (Equation 145)
[0417] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR18 (e.g., 18, horizontal mode or mode 18) or INTRA_ANGULAR50 (e.g., 50, vertical mode or mode 50), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 146 to 150.
[0418] refL[x][y]=p[-1][y] (Equation 146)
[0419] refT[x][y]=p[x][-1] (Equation 147)
[0420] wT[y]=(predModeIntra==INTRA_ANGULAR18)? 32>>((y<<1)>>nScale): 0 (Equation 148)
[0421] wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0 (Equation 149)
[0422] wTL[x][y]=(predModeINtra==INTRA_ANGULAR18)?wT[y]:wL[x] (Equation 150)
[0423] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR2 (e.g., 2 or mode 2), for each position (x, y), variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] can be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples ref[x][y], ref[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y].
[0424] The variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] may be determined according to Equations 151 to 154.
[0425] dXPos[y]=((y+1)×invAngle+2)>>2 (Equation 151)
[0426] dXFrac[y]=dXPos[y]&63 (Equation 152)
[0427] dXint[y]=dXPos[y]>>6 (Equation 153)
[0428] dX[x][y]=x+dXInt[y] (Equation 154)
[0429] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 155 to 159.
[0430] refL[x][y]=0 (Equation 155)
[0431] refT[x][y]=(dX[x][y]<refW-1)? mainRef[dX[x][y]+(dXFrac[y]>>5)]: 0 (Equation 156)
[0432] wT[y]=(dX[y]<refW-1)? 32>>((y<<1)>>nScale): 0 (Equation 157)
[0433] wL[x]=0 (Equation 158)
[0434] wT[x][y]=0 (Equation 159)
[0435] Otherwise, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10 (e.g., 10 or mode 10), for each position (x, y), variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dXPos[y], dXFrac[y], dXInt[y], and dX[x][y].
[0436] The variables dXpos[y], dXFrac[y], dXInt[y], and dX[x][y] may be determined according to Equations 160 to 163.
[0437] dXPos[y]=((y+1)×invAngle+2)>>2 (Equation 160)
[0438] dXFrac[y]=dXpos[y]&63 (Equation 161)
[0439] dXint[y]=dXPos[y]>>6 (Equation 162)
[0440] dX[x][y]=x+dXInt[y] (Equation 163)
[0441] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 164 to 168.
[0442] refL[x][y]=0 (Equation 164)
[0443] refT[x][y]=(dX[x][y]<refW-1)? mainRef[dX[x][y]+(dXFrac[y]>>5)]: 0 (Equation 165)
[0444] wT[y]=(dX[y]<refW-1)? 32>>((y<<1)>>nScale): 0 (Equation 166)
[0445] wL[x]=0 (Equation 167)
[0446] wTL[x][y]=0 (Equation 168)
[0447] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR66 (e.g., 66 or mode 66), variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] can be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y].
[0448] The variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be determined according to Equations 169 to 172.
[0449] dYpos[x]=((x+1)×invAngle+2)>>2 (Equation 169)
[0450] dYFrac[x]=dYPox[x]&63 (Equation 170)
[0451] dYInt[x]=dYPos[x]>>6 (Equation 171)
[0452] dY[x][y]=x+dYInt[x] (Equation 172)
[0453] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 173 to 177.
[0454] refL[x][y]=(dY[x][y]<refH-1)? sideRef[dY[x][y]+(dYFrac[x]>>5)]: 0 (Equation 173)
[0455] refT[x][y]=0 (Equation 174)
[0456] wT[y]=0 (Equation 175)
[0457] wL[x]=(dY[x]<refH-1)?32>>((x<<1)>>nScale):0 (Equation 176)
[0458] wTL[x][y]=0 (Equation 177)
[0459] Otherwise, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58 (e.g., 58 or mode 58), variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle may be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y], and weighting factors wL, wT, and wTL may be determined based on the variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y].
[0460] The variables dYPos[x], dYFrac[x], dYInt[x], and dY[x][y] may be determined according to Equations 178 to 181.
[0461] dYPos[x]=((x+1)×invAngle+2)>>2 (Equation 178)
[0462] dYFrac[x] = dYPos[x] & 63 (Equation 179)
[0463] dYInt[x]=dYPos[x]>>6 (Equation 180)
[0464] dY[x][y]=x+dYInt[x] (Equation 181)
[0465] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to Equations 182 to 186.
[0466] refL[x][y]=(dY[x][y]<refH-1)? sideRef[dY[x][y]+(dYFrac[x]>>5)]: 0 (Equation 182)
[0467] refT[x][y]=0 (Equation 183)
[0468] wT[y]=0 (Equation 184)
[0469] wL[x]=(dY[x]<refH-1)?32>>((x<<1)>>nScale):0 (Equation 185)
[0470] wTL[x][y]=0 (Equation 186)
[0471] Otherwise, when the variable preModeIntra is between mode 11 and mode 57 and is not one of mode 18 and mode 50, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL are all set to equal 0.
[0472] Finally, the value of the filtered sample filtSamples[x][yl] can be derived according to equation 187, where x=0..nTbW-1, y=0..nTbH-1.
[0473] filtSamples[x][y]=clip1Cmp((refL[x][y]×wL+refT[x][y]×wT-p[-1][-1]×wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])×predSamples[x][y]+32)>>6)
[0474] (Equation 187)
[0475] Embodiment D is similar to Embodiment A, but describes a different modified PDPC process for Mode 2 and Mode 66.
[0476] Example E
[0477] Exemplary inputs to the PDPC filtering process include:
[0478] The intra prediction mode indicated by preModeIntra;
[0479] The width of the current block, denoted by nTbW;
[0480] The height of the current block, denoted by nTbH;
[0481] The width of the reference sample is denoted by refW;
[0482] the height of the reference sample denoted by refH;
[0483] The predicted samples are represented by predSamples[x][y], where x = 0..nTbW-1, y = 0..nTbH-1;
[0484] the unfiltered reference (also called neighboring) samples denoted by p[x][y], where x=-1, y=-1..refH-1, and x=0..refW-1, y=-1; and
[0485] The color component of the current block represented by cIdx.
[0486] According to the value of cIdx, the function clip1Cmp is set as follows:
[0487] If cIdx is equal to 0, set clip1Cmp equal to Clip1Y.
[0488] Otherwise, clip1Cmp is set equal to Clip1C.
[0489] Furthermore, the output of the PDPC filtering process is the modified prediction samples predSamples′[x][y], where x=0..nTBW-1, y=0..nTbH-1.
[0490] The scaling factor nScale can then be calculated by Equation 188.
[0491] nScale=((Log2(nTbW)+Log2(nTbH)-2)>>2) (Equation 188)
[0492] Further, a reference sample array mainRef[x] of x=0..refW may be defined as an array of unfiltered reference samples above the current block, and another reference sample array sideRef[y] of y=0..refH may be defined as an array of unfiltered reference samples to the left of the current block. The reference sample arrays mainRef[x] and sideRef[y] may be derived from the unfiltered reference samples according to Equations 189 to 190, respectively.
[0493] mainRef[x] = p[x][-1] (Equation 189)
[0494] sideRef[y] = p[-1][y] (Equation 190)
[0495] For each position (x, y) in the current block, the PDPC calculation can use the reference sample at the top denoted as refT[x][y], the reference sample at the left denoted as refL[x][y], and the reference sample at the corner p[-1,-1]. In some examples, the modified prediction sample can be calculated by equation 191, and the result can be appropriately adjusted according to the variable cIdx indicating the color component.
[0496]
[0497] Reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined based on the intra prediction mode preModeIntra.
[0498] When the intra prediction mode preModeIntra is equal to INTRA_PLANAR (e.g., 0, planar mode or mode 0) or INTRA_DC (e.g., 1, DC mode or mode 1), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 192 to 196.
[0499] refL[x][y]=p[-1][y] (Equation 192)
[0500] refT[x][y]=p[x][-1] (Equation 193)
[0501] wT[y]=32>>((y<<1)>>nScale) (Equation 194)
[0502] wL[x]=32>>((x<<1)>>nScale) (Equation 195)
[0503] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)): 0 (Equation 196)
[0504] Otherwise, when the intra prediction mode preModeIntra is equal to INTRA_ANGULAR18 (e.g., 18, horizontal mode or mode 18) or INTRA_ANGULAR50 (e.g., 50, vertical mode or mode 50), the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL can be determined according to Equations 197 to 201.
[0505] refL[x][y]=p[-1][y] (Equation 197)
[0506] refT[x][y]=p[x][-1] (Equation 198)
[0507] wT[y]=(predModeIntra==INTRA_ANGULAR18)? 32>>(y<<1)>>nSCale): 0 (Equation 199)
[0508] wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0 (Equation 200)
[0509] wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)? wT[y]: wL[x] (Equation 201)
[0510] Otherwise, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10 (e.g., 10 or mode 10), for each position (x, y), variables dXInt[y] and dX[x][y] can be derived based on the variable invAngle, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngle can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dXInt[y] and dX[x][y].
[0511] For example, the variables dXInt[y] and dX[x][y] may be determined according to Equation 202 to Equation 203.
[0512] dXInt[y]=((y+1)×invAngle+128)>>8 (Equation 202)
[0513] dX[x][y]=x+dXInt[y] (Equation 203)
[0514] Then, reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to equations 204 to 208.
[0515] refL[x][y]=0 (Equation 204)
[0516] refT[x][y]=(dXInt[y]<refW-width-1)? mainRef[dX[x][y]]: 0 (Equation 205)
[0517] wT[y]=32>>((y<<1)>>nScale) (Equation 206)
[0518] wL[x]=0 (Equation 207)
[0519] wTL[x][y]=0 (Equation 208)
[0520] Otherwise, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58 (e.g., 58 or mode 58), variables dYInt[x] and dY[x][y] can be derived based on the variable invAngale, where the variable invAngle is a function of the intra prediction mode preModeIntra. invAngale can be determined based on a lookup table that stores invAngle values corresponding to each intra prediction mode, and then reference samples refT[x][y], refL[x][y] and weighting factors wL, wT, and wTL can be determined based on the variables dYInt[x] and dY[x][y].
[0521] For example, variables dYInt[x] and dY[x][y] may be determined according to Equations 209 to 210.
[0522] dYInt[x]=((x+1)×invAngle+128)>>8 (Equation 209)
[0523] dY[x][y]=x+dYInt[x] (Equation 210)
[0524] Then, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL may be determined according to equations 211 to 215.
[0525] refL[x][y]=(dYInt[y]<refH-height-1)? sideRef[dY[x][y]]: 0 (Equation 211)
[0526] refT[x][y]=0 (Equation 212)
[0527] wT[y]=0 (Equation 213)
[0528] wL[x]=32>>((x<<1)>>nScale) (Equation 214)
[0529] wTL[x][y]=0 (Equation 215)
[0530] Otherwise, when the variable preModeIntra is between mode 11 and mode 57 and is not one of mode 18 and mode 50, the reference samples refT[x][y], refL[x][y] and weighting factors wL, wT and wTL are all set to equal 0.
[0531] Finally, the value of the filtered samples filtSamples[x][y] can be derived according to equation 216, where x=0..nTbW-1, y=0..nTbH-1.
[0532] filtSamples[x][y]=clip1Cmp((refL[x][y]×wL+refT[x][y]×wT-p[-1][-1]×wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])×predSamples[x][y]+32)>>6)
[0533] (Equation 216)
[0534] The difference between Embodiment C and Embodiment E is that in Embodiment E, when the intra prediction mode preModeIntra is less than or equal to INTRA_ANGULAR10, refT[x][y] may be calculated differently (i.e., Equation 125 versus Equation 205). Similarly, when the intra prediction mode preModeIntra is greater than or equal to INTRA_ANGULAR58, refL[x][y] may be calculated differently (i.e., Equation 131 versus Equation 211).
[0535] Early Termination of the PDPC Process
[0536] According to an embodiment of the present application, for an intra prediction mode adjacent to a diagonal intra prediction mode, for example Fig. 8A In modes -1 to -14, modes 3 to 10, modes 58 to 65, and modes 67 to 80, the PDPC process can be terminated early, and the early termination depends on the fractional position pointed to by the intra prediction direction on the side reference sample used in the PDPC process.
[0537] In one embodiment, the allocation of reference sample values used in the PDPC process is modified as follows.
[0538] For the intra prediction mode adjacent to mode 2, Equation 30 is modified to Equation 217.
[0539] refT[x][y]=((dX[x][y]+(dXFrac[y]>>5))<refW-1)? mainRef[dX[x][y]+(dXFrac[y]>>5)]: 0 (Equation 217)
[0540] For the intra prediction modes adjacent to mode 66, Equation 38 is modified to Equation 218.
[0541] refL[x][y]=((dY[x][y]+(dXFrac[y]>>5))<refH-1)? sideRef[dY[x][y]+(dYFrac[x]>>5)]: 0 (Equation 218)
[0542] Reference sample inspection
[0543] In some related embodiments (e.g., in VVC), for a current sample in the PDPC process, a sample-by-sample check is required to determine whether a reference sample of the current sample is within a specified range. If the reference sample is not within the specified range, the PDPC weighting factor of the current sample is set to 0, for example, as described in Equations 31, 38, and 41. However, such a sample-by-sample check may not be desirable to be performed, especially for software optimization using single instruction multiple data (SIMD) technology.
[0544] According to some embodiments, the sample-by-sample check in the PDPC process to determine whether a reference sample is within the range of available reference samples is replaced by a row-by-row check or a column-by-column check. In an embodiment, the check condition depends only on the number of available left reference samples, the prediction block height, and the horizontal coordinate value of the current sample to be filtered by the PDPC process. In another embodiment, the check condition depends only on the number of available top reference samples, the prediction block width, and the vertical coordinate value of the current sample to be filtered by the PDPC process.
[0545] In an embodiment, for vertical-like intra-frame prediction (i.e., the prediction direction is closer to the vertical intra-frame prediction direction than the horizontal prediction direction), each column is checked and the checking condition depends only on the number of available left reference samples, the prediction block height, and at least one of the horizontal coordinate value of the current sample to be filtered by the PDPC process.
[0546] In an embodiment, for similar horizontal intra-frame predictions (i.e., the prediction direction is closer to the horizontal intra-frame prediction direction than the vertical prediction direction), each row is checked and the checking condition depends only on the number of available top reference samples, the prediction block width, and at least one of the vertical coordinate values of the current sample to be filtered by the PDPC process.
[0547] According to some embodiments, when the intra prediction angle of the intra prediction mode is equal to or greater than 2 k / 32, where k is a non-negative integer, such as 3 or 4.
[0548] In an embodiment, for vertical-like intra prediction (ie, the prediction direction is closer to the vertical intra prediction direction than the horizontal prediction direction), only the first (width / (2 5-k ))(or min(width, height) / (2 5-k )) columns are processed by the PDPC procedure.
[0549] In an embodiment, for horizontal-like intra prediction (ie, the prediction direction is closer to the horizontal intra prediction direction than the vertical prediction direction), only the first (height / (2 5-k ))(or min(width, height) / (2 5-k )) lines are processed by the PDPC procedure.
[0550] Fig.10A flowchart outlining an exemplary process (1000) according to an embodiment of the present application is shown. In various embodiments, the process (1000) is performed by a processing circuit, such as a processing circuit in a terminal device (210), (220), (230) and (240), a processing circuit that performs the functions of a video encoder (303), a processing circuit that performs the functions of a video decoder (310), a processing circuit that performs the functions of a video decoder (410), a processing circuit that performs the functions of an intra-frame prediction module (452), a processing circuit that performs the functions of a video encoder (503), a processing circuit that performs the functions of a predictor (535), a processing circuit that performs the functions of an intra-frame encoder (622), a processing circuit that performs the functions of an intra-frame decoder (772), and the like. In some embodiments, the process (1000) is implemented using software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the process (1000).
[0551] The process (1000) may generally start at step (S1010). In step (S1010), prediction information of a current block in a current picture is decoded, the current picture being part of an encoded video sequence, the prediction information indicating an intra prediction direction of the current block, the intra prediction direction being one of (i) a diagonal intra prediction direction and (ii) an adjacent intra prediction direction adjacent to the diagonal intra prediction direction. The process (1000) then proceeds to step (S1020).
[0552] At step (S1020), based on the intra prediction direction of the current block, it is determined to use a position-dependent prediction combination (PDPC) process, wherein the same PDPC process is applied to the diagonal intra prediction direction and the adjacent intra prediction direction. The process (1000) then proceeds to step (S1030).
[0553] In step (S1030), the current block is reconstructed based on the PDPC process used on the current block.
[0554] After rebuilding the current block, the process (1000) ends.
[0555] In some embodiments, the diagonal intra prediction direction is one of a lower left intra prediction direction and an upper right intra prediction direction. In an embodiment, when the diagonal intra prediction direction is the lower left intra prediction direction, the mode index of the adjacent intra prediction direction is lower than the mode index of the horizontal intra prediction direction, that is, the mode index value of the adjacent intra prediction direction is smaller than the mode index value of the horizontal intra prediction direction. For example, Fig. 8A, for the mode index -14 to 16 of the lower left intra prediction direction, the mode index of its adjacent intra prediction direction (the dashed mode index between -14 and 18) is lower than the mode index 18 of the horizontal intra prediction direction. In an embodiment, when the diagonal intra prediction direction is the upper right intra prediction direction, the mode index of the adjacent intra prediction direction is higher than the mode index of the vertical intra prediction direction. For example, Fig. 8A , for the mode indexes 50 to 80 of the upper right intra prediction direction, the mode indexes of the adjacent intra prediction directions (the dotted line mode indexes between 50 and 80) are higher than the mode index 50 of the vertical intra prediction direction.
[0556] In an embodiment, when the intra-frame prediction direction is the adjacent intra-frame prediction direction, the process (1000) determines whether the intra-frame prediction direction points to a fractional position; when it is determined that the intra-frame prediction direction points to a fractional position, the process (1000) terminates the PDPC process early.
[0557] In some embodiments, when a current sample in the current block is filtered by the PDPC process, the process (1000) determines whether a reference sample of the current sample is within a preset range according to a row-by-row check or a column-by-column check. In an embodiment, the column-by-column check depends on at least one of: (i) the total number of available reference samples located to the left of the current block; (ii) the block height of the current block; and (iii) the horizontal coordinate value of the current sample. In an embodiment, the row-by-row check depends on at least one of: (i) the total number of available reference samples located above the current block; (ii) the block width of the current block; and (iii) the vertical coordinate value of the current sample.
[0558] In some embodiments, the angle of the intra-frame prediction direction is equal to or greater than a preset value. In an embodiment, when the intra-frame prediction direction is closer to the vertical intra-frame prediction direction than the horizontal intra-frame prediction direction, the process (1000) performs the PDPC process on a first number of columns of samples in the current block, and the first number is determined according to the preset value and the block size of the current block. In an embodiment, when the intra-frame prediction direction is closer to the horizontal intra-frame prediction direction than the vertical intra-frame prediction direction, the process (1000) performs the PDPC process on a second number of rows of samples in the current block, and the second number is determined according to the preset value and the block size of the current block.
[0559] The embodiment of the present application also provides a video decoding device, including:
[0560] a decoding module, configured to decode prediction information of a current block in a current picture, the current picture being part of an encoded video sequence, the prediction information indicating an intra prediction direction of the current block, the intra prediction direction being one of a diagonal intra prediction direction and an adjacent intra prediction direction adjacent to the diagonal intra prediction direction;
[0561] a determining module, configured to determine, according to the intra prediction direction of the current block, to use a position-dependent prediction combined PDPC process, wherein the same PDPC process is applied to the diagonal intra prediction direction and the adjacent intra prediction direction; and
[0562] A reconstruction module is used to reconstruct the current block based on the PDPC process used on the current block.
[0563] An embodiment of the present application also provides a computer device, including one or more processors and one or more memories, wherein the one or more memories store at least one program instruction, and the at least one program instruction is loaded and executed by the one or more processors to implement the above-mentioned video decoding method.
[0564] The above technology can be implemented as computer software through computer readable instructions and physically stored in one or more computer readable media. The computer readable medium can be a non-volatile computer readable storage medium that stores program instructions. When the program instructions are executed by a computer used for video encoding / decoding, the computer executes the video decoding method described in the above embodiment. For example, Fig.11 A computer system (1100) is shown that is suitable for implementing certain embodiments of the disclosed subject matter.
[0565] The computer software may be encoded in any suitable machine code or computer language, and may be assembled, compiled, linked, or the like to create a code comprising instructions, which may be directly executed by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or executed by decoding, microcode, or the like.
[0566] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, IoT devices, etc.
[0567] Fig.11 The components shown for the computer system (1100) are exemplary in nature and are not intended to limit the scope of use or functionality of the computer software implementing the embodiments of the present application. The configuration of the components should not be interpreted as having any dependency or requirement on any component or combination of components shown in the exemplary embodiment of the computer system (1100).
[0568] The computer system (1100) may include certain human-computer interface input devices. Such human-computer interface input devices may respond to input from one or more human users through tactile input (e.g., keyboard input, sliding, data glove movement), audio input (e.g., sound, applause), visual input (e.g., gestures), and olfactory input (not shown). The human-computer interface devices may also be used to capture certain media that are not necessarily directly related to conscious human input, such as audio (e.g., speech, music, ambient sound), images (e.g., scanned images, photographic images obtained from a still image camera), and videos (e.g., two-dimensional video, three-dimensional video including stereoscopic video).
[0569] The human-computer interface input device may include one or more of the following (only one of which is drawn): keyboard (1101), mouse (1102), touchpad (1103), touch screen (1110), data gloves (not shown), joystick (1105), microphone (1106), scanner (1107), camera (1108).
[0570] The computer system (1100) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate one or more human user senses through, for example, tactile output, sound, light, and smell / taste. Such human-computer interface output devices may include tactile output devices (e.g., tactile feedback through a touch screen (1110), a data glove (not shown), or a joystick (1105), but there may also be tactile feedback devices that are not used as input devices), audio output devices (e.g., speakers (1109), headphones (not shown)), visual output devices (e.g., screens (1110) including cathode ray tube screens, liquid crystal screens, plasma screens, organic light emitting diode screens, each of which has or does not have a touch screen input function, each of which has or does not have a tactile feedback function - some of which can output two-dimensional visual output or output of more than three dimensions through means such as stereoscopic picture output; virtual reality glasses (not shown), holographic displays, and smoke boxes (not shown)) and printers (not shown). These visual output devices (e.g., screens (1110)) may be connected to the system bus (1148) through a graphics adapter (1150).
[0571] The computer system (1100) may also include human-accessible storage devices and their associated media, such as optical media including high-density read-only / rewritable optical disks (CD / DVD ROM / RW) (1120) with CD / DVD or similar media (1121), thumb drives (1122), removable hard disk drives or solid state drives (1123), traditional magnetic media such as tapes and floppy disks (not shown), special-purpose ROM / ASIC / PLD-based devices such as security software protectors (not shown), and the like.
[0572] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the disclosed subject matter does not include transmission media, carrier waves, or other transient signals.
[0573] The computer system (1100) may also include a network interface (1154) leading to one or more communication networks (1155). For example, the one or more communication networks (1155) may be wireless, wired, or optical. The one or more communication networks (1155) may also be local area networks, wide area networks, metropolitan area networks, vehicle-mounted networks, and industrial networks, real-time networks, delay-tolerant networks, and the like. The one or more communication networks (1155) also include local area networks such as Ethernet, wireless local area networks, cellular networks (GSM, 3G, 4G, 5G, LTE, etc.), television wired or wireless wide area digital networks (including cable television, satellite television, and terrestrial broadcast television), vehicle-mounted and industrial networks (including CANBus), and the like. Some networks typically require an external network interface adapter for connecting to some universal data ports or peripheral buses (1149) (e.g., a USB port of the computer system (1100)); other systems are typically integrated into the core of the computer system (1100) by connecting to a system bus as described below (e.g., an Ethernet interface integrated into a PC computer system or a cellular network interface integrated into a smart phone computer system). By using any of these networks, the computer system (1100) can communicate with other entities. The communication can be one-way, for reception only (e.g., wireless television), one-way, for transmission only (e.g., CAN bus to certain CAN bus devices), or two-way, such as to other computer systems via local or wide area digital networks. Each of the above networks and network interfaces can use certain protocols and protocol stacks.
[0574] The above-mentioned human-machine interface devices, human-accessible storage devices, and network interfaces may be connected to the core (1140) of the computer system (1100).
[0575] The core (1140) may include one or more central processing units (CPUs) (1141), graphics processing units (GPUs) (1142), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1143), hardware accelerators for specific tasks (1144), etc. These devices, as well as read-only memory (ROM) (1145), random access memory (1146), internal mass storage (e.g., internal non-user accessible hard disk drives, solid-state drives, etc.) (1147), etc., may be connected via a system bus (1148). In some computer systems, the system bus (1148) may be accessed in the form of one or more physical plugs so that it can be expanded by additional central processing units, graphics processing units, etc. Peripheral devices may be directly attached to the core's system bus (1148), or connected via a peripheral bus (1149). The architecture of the peripheral bus includes PCI, USB, etc.
[0576] The CPU (1141), GPU (1142), FPGA (1143) and accelerator (1144) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (1145) or RAM (1146). Transition data can also be stored in RAM (1146), while permanent data can be stored in, for example, internal mass storage (1147). Fast storage and retrieval of any memory device can be achieved by using a cache memory, which can be closely associated with one or more CPUs (1141), GPUs (1142), mass storage (1147), ROMs (1145), RAMs (1146), etc.
[0577] The computer readable medium may have computer code thereon for performing various computer-implemented operations. The medium and computer code may be specially designed and constructed for the purpose of this application, or may be medium and code well known and available to those skilled in the art of computer software.
[0578] As an example and not a limitation, a computer system having an architecture (1100), in particular a core (1140), can provide the function of executing software contained in one or more tangible computer-readable media as a processor (including a CPU, a GPU, an FPGA, an accelerator, etc.). Such a computer-readable medium can be a medium associated with the above-mentioned user-accessible mass storage, as well as a specific memory of the core (1140) having non-volatility, such as a core internal mass storage (1147) or a ROM (1145). Software implementing various embodiments of the present application can be stored in such a device and executed by the core (1140). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software can enable the core (1140), in particular the processor therein (including a CPU, a GPU, an FPGA, etc.) to perform a specific process or a specific part of a specific process described herein, including defining a data structure stored in the RAM (1146) and modifying such a data structure according to a software-defined process. Additionally or alternatively, the computer system may provide functionality hardwired in logic or otherwise contained in circuitry (e.g., accelerator (1144)) that may operate in place of or in conjunction with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to software may include logic and vice versa. Where appropriate, references to computer-readable media may include circuitry (e.g., an integrated circuit (IC)) storing the executing software, circuitry containing the executing logic, or both. The present application includes any suitable combination of hardware and software.
[0579] Although the present application has described a number of exemplary embodiments, various changes, arrangements and various equivalent substitutions of the embodiments are within the scope of the present application. Therefore, it should be understood that those skilled in the art can design a variety of systems and methods, which, although not explicitly shown or described herein, embody the principles of the present application and are therefore within the spirit and scope of the present application.
[0580] Appendix A: Acronyms
[0581] AMVP: Advanced Motion Vector Prediction
[0582] ASIC: Application-Specific Integrated Circuit
[0583] ATMVP: Alternative / Advanced Temporal Motion Vector Prediction
[0584] BDOF: Bi-directional Optical Flow
[0585] BIO: Bi-directional Optical Flow
[0586] BMS: Benchmark Set
[0587] BV: Block Vector
[0588] CANBus: Controller Area Network Bus
[0589] CB: Coding Block
[0590] CBF: Coded Block Flag
[0591] CCLM: Cross-Component Linear Mode / Model
[0592] CD: Compact Disc
[0593] CPR: Current Picture Referencing
[0594] CPUs: Central Processing Units
[0595] CRT: Cathode Ray Tube
[0596] CTBs: Coding Tree Blocks
[0597] CTUs: Coding Tree Units
[0598] CU: Coding Unit
[0599] DPB: Decoder Picture Buffer
[0600] DVD: Digital Video Disc
[0601] FPGA: Field Programmable Gate Areas
[0602] GOPs: Groups of Pictures
[0603] GPUs: Graphics Processing Units
[0604] GSM: Global System for Mobile communications
[0605] HDR: High Dynamic Range
[0606] HEVC: High Efficiency Video Coding
[0607] HRD: Hypothetical Reference Decoder
[0608] IBC: Intra Block Copy
[0609] IC:Integrated Circuit
[0610] ISP: Intra Sub-Partitions
[0611] JEM: Joint Exploration Model
[0612] JVET: Joint Video Exploration Team
[0613] LAN: Local Area Network
[0614] LCD: Liquid-Crystal Display
[0615] LTE: Long-Term Evolution
[0616] MPM: Most Probable Mode
[0617] MTS: Multiple Transform Selection
[0618] MV: Motion Vector
[0619] OLED: Organic Light-Emitting Diode
[0620] PBs: Prediction Blocks
[0621] PCI: Peripheral Component Interconnect
[0622] PDPC: Position Dependent Prediction Combination
[0623] PLD: Programmable Logic Device
[0624] PU: Prediction Unit
[0625] RAM: Random Access Memory
[0626] ROM: Read-Only Memory
[0627] SBT: Sub-block Transform
[0628] SCC: Screen Content Coding
[0629] SDR: Standard Dynamic Range
[0630] SEI: Supplementary Enhancement Information
[0631] SNR: Signal Noise Ratio
[0632] SSD: Solid-state Drive
[0633] TUs: Transform Units
[0634] USB: Universal Serial Bus
[0635] VPDU: Visual Process Data Unit
[0636] VUI: Video Usability Information
[0637] VVC: Versatile Video Coding
[0638] WAIP: Wide-Angle Intra Prediction
Claims
1. A video encoding method, characterized in that: include: Determine prediction information of a current block in a current picture, the prediction information indicating an intra prediction direction of the current block, the intra prediction direction being one of a diagonal intra prediction direction and an adjacent intra prediction direction adjacent to the diagonal intra prediction direction; Determining to use a position-dependent prediction combined PDPC process according to the intra prediction direction of the current block, wherein the PDPC process used when the intra prediction direction is the diagonal intra prediction direction is the same as the PDPC process used when the intra prediction direction is the adjacent intra prediction direction; and encoding the current block using the PDPC process; The angle of the intra-frame prediction direction is equal to or greater than a preset value, and the preset value is , is a non-negative integer; The method further comprises: When the intra prediction direction is closer to the vertical intra prediction direction than the horizontal intra prediction direction, performing the PDPC process on a first number of columns of samples in the current block, the first number being determined according to the preset value and a block size of the current block; and When the intra prediction direction is closer to the horizontal intra prediction direction than the vertical intra prediction direction, The PDPC process is performed on a second number of rows of samples in the current block, where the second number is determined according to the preset value and a block size of the current block.
2. The method according to claim 1, characterized in that The diagonal intra prediction direction is one of a lower left intra prediction direction and an upper right intra prediction direction.
3. The method according to claim 2, characterized in that When the diagonal intra prediction direction is the bottom-left intra prediction direction, the mode index of the adjacent intra prediction direction is lower than the mode index of the horizontal intra prediction direction.
4. The method according to claim 2, characterized in that: When the diagonal intra prediction direction is the top right intra prediction direction, the mode index of the adjacent intra prediction direction is higher than the mode index of the vertical intra prediction direction.
5. The method according to claim 1, characterized in that Further including: When the intra prediction direction is the adjacent intra prediction direction, determining whether the intra prediction direction points to a fractional position; as well as When it is determined that the intra prediction direction points to the fractional position, the PDPC process is terminated early.
6. The method according to any one of claims 1 to 5, characterized in that: Further including: When the current sample in the current block is filtered by the PDPC process, It is determined whether the reference sample of the current sample is within a preset range according to a row-by-row check or a column-by-column check.
7. The method according to claim 6, characterized in that The column-by-column check depends on at least one of the following: the total number of available reference samples located to the left of the current block; The block height of the current block; and The horizontal coordinate value of the current sample.
8. The method according to claim 6, characterized in that The line-by-line checking depends on at least one of the following: the total number of available reference samples located above the current block; The block width of the current block; and The vertical coordinate value of the current sample.
9. A video encoding device, characterized in that: include: A first determination module is configured to determine prediction information of a current block in a current picture, wherein the prediction information indicates an intra-frame prediction direction of the current block, and the intra-frame prediction direction is one of a diagonal intra-frame prediction direction and an adjacent intra-frame prediction direction adjacent to the diagonal intra-frame prediction direction; A second determination module is configured to determine to use a position-dependent prediction combined PDPC process according to the intra prediction direction of the current block, wherein the PDPC process used when the intra prediction direction is the diagonal intra prediction direction is the same as the PDPC process used when the intra prediction direction is the adjacent intra prediction direction; and An encoding module, configured to encode the current block using the PDPC process; The angle of the intra-frame prediction direction is equal to or greater than a preset value, and the preset value is , is a non-negative integer; When the intra prediction direction is closer to the vertical intra prediction direction than the horizontal intra prediction direction, performing the PDPC process on a first number of columns of samples in the current block, the first number being determined according to the preset value and a block size of the current block; and When the intra prediction direction is closer to the horizontal intra prediction direction than the vertical intra prediction direction, The PDPC process is performed on a second number of rows of samples in the current block, where the second number is determined according to the preset value and a block size of the current block.
10. A non-volatile computer-readable storage medium, characterized in that: Used to store program instructions, when the program instructions are executed by a computer used for video encoding, the computer executes the video encoding method according to any one of claims 1 to 8 to generate a video code stream.
11. A computer device, characterized in that: The method comprises one or more processors and one or more memories, wherein at least one program instruction is stored in the one or more memories, and the at least one program instruction is loaded and executed by the one or more processors to implement the video encoding method according to any one of claims 1 to 8 to generate a video code stream.
12. A method for processing a code stream, characterized in that: A video code stream is stored on a non-volatile computer-readable storage medium, wherein the video code stream is generated according to the encoding method according to any one of claims 1 to 8.
