Method and device for encoding and decoding

By using directional intra prediction mode in video encoding for filtering or interpolation processing of reference samples, the quality and compression ratio balance problems of video encoding in the prior art under limited bandwidth are solved, and more efficient video encoding and decoding.

CN119052471APending Publication Date: 2024-11-29HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411099065.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-03-23
Filing Date
2019-09-13
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing video encoding technology is difficult to maintain video quality while improving the compression rate. Especially under limited bandwidth transmission and storage resources, the intra-mode encoding scheme is complex and inflexible, and lacks an index list that adapts to the current block attributes.

Method used

Using a method and device for video encoding or decoding, intra prediction processing is performed through a directional intra prediction mode, including applying reference sample filtering or sub-pixel interpolation filtering to reference samples in the reference block, and according to the intra prediction mode Select the appropriate filter, such as a 3-tap filter or an interpolation filter, to generate a predicted sample.

Benefits of technology

Improve the compression rate and quality of video encoding, simplify intra-mode encoding, enhance the flexibility and adaptability of encoding, and reduce signaling overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052471A_ABST
    Figure CN119052471A_ABST
Patent Text Reader

Abstract

The present invention provides a method and apparatus for intra prediction of a current block in video encoding or decoding. The method includes performing intra prediction processing of the current block according to a directional intra prediction mode, including reference sample filtering or sub-pixel interpolation filtering applied to reference samples in one or more reference blocks, where the directional intra prediction mode is classified into one of the following groups: (A) a vertical or horizontal mode; (B) a directional mode comprising a diagonal mode representing an angle, where the angle is a multiple of 45 degrees; (C) other directional modes; if the directional intra prediction mode is classified as belonging to group B, applying reference sample filtering to the reference samples; if the directional intra prediction mode is classified as belonging to group C, intra reference sample interpolation filtering is applied to the reference samples.
Need to check novelty before this filing date? Find Prior Art

Description

This application is a divisional application. The application number of the original application is 201980005488.8, and the original application date is September 13, 2019. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0001] The present invention relates to the technical field of image and / or video encoding and decoding, and in particular to a method and device for intra-frame / inter-frame prediction. Background Art

[0002] Video coding (video encoding and decoding) is used in various digital video applications such as broadcast digital television, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat, video conferencing, DVD and Blu-ray discs, video content acquisition and editing systems, and cameras for security applications.

[0003] Even describing a relatively short video requires a large amount of video data, which can cause difficulties when streaming or transmitting the data over a communication network with limited bandwidth capacity. Therefore, video data is often compressed before being transmitted over modern telecommunications networks. The size of the video can also be a problem when storing the video on a storage device, as memory resources may be limited. Video compression devices typically use software and / or hardware to encode the video data at the source before transmission or storage, thereby reducing the amount of data required to represent the digital video image. The compressed data is then received at the destination by a video decompression device that decodes the video data. With limited network resources and the growing demand for higher video quality, it is desirable to have an improved compression and decompression technology that increases the compression rate with little sacrifice in picture quality.

[0004] Digital video has been widely used since the advent of DVD discs. Video is encoded before transmission and transmitted using a transmission medium. The viewer receives the video and decodes and displays it using a viewing device. Over the years, video quality has improved, for example, due to higher resolutions, color depths and frame rates. This has led to larger data streams, which are nowadays often transmitted over the Internet and mobile communication networks.

[0005] However, since high-resolution videos have more information, they usually require more bandwidth. To reduce bandwidth requirements, video coding standards involving video compression were introduced. When encoding a video, the bandwidth requirements (or corresponding memory requirements in the case of storage) are reduced. Usually, this reduction comes at the expense of quality. Therefore, video coding standards try to find a balance between bandwidth requirements and quality.

[0006] High Efficiency Video Coding (HEVC) is an example of a video coding standard known to those skilled in the art. In HEVC, a coding unit (CU) is split into a prediction unit (PU) or a transform unit (TU). The next generation standard of Versatile Video Coding (VVC) is the latest joint video project of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG), where the ITU-T VCEG and ISO / IEC MPEG work together in a partnership called the Joint Video Exploration Team (JVET). VVC is also known as the ITU-T H.266 / Next Generation Video Coding (NGVC) standard. In VVC, the concept of multiple partition types, ie, the separation of the concepts of CU, PU, ​​and TU, should be removed, except for CUs that are too large for the maximum transform length and for CUs that support more flexible CU partition shapes.

[0007] The processing of these coding units (CUs), also called blocks, depends on their size, spatial position, and the coding mode specified by the encoder. Depending on the type of prediction, the coding modes can be divided into two groups: intra prediction and inter prediction modes. Intra prediction mode uses samples in the same picture (also called frame or image) to generate reference samples to calculate the predicted values ​​of the samples of the block being reconstructed. Intra prediction is also called spatial prediction. Inter prediction mode is designed for temporal prediction, which uses reference samples in the previous or next picture to predict the samples of the block of the current picture.

[0008] ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) are studying the potential standardization requirements for future video coding technologies with compression capabilities significantly exceeding those of the current HEVC standard (including its current and near-term extensions for screen content coding and high dynamic range coding). The groups are working together on this exploration in a joint collaborative group called the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by their experts in this area.

[0009] The VTM (Common Test Model) standard uses 35 intra patterns, while the BMS (Baseline Set) uses 67 intra patterns.

[0010] The intra mode coding scheme currently described in BMS is considered to be complex and a disadvantage of the non-selective mode set is that the index list is always constant and not adaptive based on the current block properties (eg, INTRA mode to its neighboring blocks). Summary of the invention

[0011] Embodiments of the present application provide an apparatus and method for encoding and decoding according to the independent claims.

[0012] The above and other objects are achieved by the subject matter of the independent claims. Further implementation forms are apparent from the dependent claims, the description and the drawings.

[0013] According to a first aspect, the present invention relates to a method for intra-frame prediction of a current block in video encoding or decoding, the method comprising: performing intra-frame prediction processing of the current block according to a directional intra-frame prediction mode, the intra-frame prediction processing comprising reference sample filtering or sub-pixel interpolation filtering applied to reference samples in one or more reference blocks, wherein the directional intra-frame prediction mode is classified into one of the following groups: (A) vertical or horizontal mode; (B) directional mode, including a diagonal mode representing an angle, wherein the angle is a multiple of 45 degrees; (C) other directional modes; if the directional intra-frame prediction mode is classified as belonging to group B, a reference sample filter is applied to the reference sample; if the directional intra-frame prediction mode is classified as belonging to group C, an intra-frame reference sample interpolation filter is applied to the reference sample.

[0014] In one embodiment, if the directional intra prediction mode is classified as belonging to group A, no filtering is applied to the reference samples when generating intra predictions.

[0015] In one embodiment, if the directional intra-frame prediction mode is classified as belonging to group B, a reference sample filter is applied to the reference sample to copy the filter value to the intra-frame predictor according to the directional intra-frame prediction mode; if the directional intra-frame prediction mode is classified as belonging to group C, an intra-frame reference sample interpolation filter is applied to the reference sample to generate a prediction sample falling at a fractional or integer position between the reference samples according to the directional intra-frame prediction mode.

[0016] In one embodiment, the reference sample filter for the intra prediction process is a 3-tap filter.

[0017] For example, the reference sample filter for the intra prediction process is a 3-tap filter of [1, 2, 1].

[0018] In one embodiment, an interpolation filter for an intra prediction process for a given sub-pixel offset is selected from a set of filters, wherein one filter in the set of filters is the same as a filter used for an inter prediction process.

[0019] In one embodiment, the length of the interpolation filter is 4 taps, and the precision of its coefficients is 6 bits.

[0020] In one embodiment, group B also includes a wide angle integer slope mode.

[0021] For example, the wide-angle integer slope mode is a directional intra prediction mode other than the horizontal, vertical, and diagonal modes, in which the reference sample position of each prediction sample of the current block is non-fractional.

[0022] In one embodiment, group B also includes intra prediction modes whose values ​​of intra prediction angle parameters are non-zero multiples of 32.

[0023] In one embodiment, group B includes one or all of the following intra prediction modes: [-14, -12, -10, -6, 2, 34, 66, 72, 76, 78, 80].

[0024] According to a second aspect, the present invention relates to a device for intra-frame prediction of a current block in video encoding or decoding, the device comprising a processing circuit for: performing intra-frame prediction processing of the current block according to a directional intra-frame prediction mode, including reference sample filtering or sub-pixel interpolation filtering applied to reference samples in one or more reference blocks, wherein the directional intra-frame prediction mode is classified into one of the following groups: (A) vertical or horizontal mode; (B) directional mode, including a diagonal mode representing an angle, wherein the angle is a multiple of 45 degrees; (C) other directional modes; if the directional intra-frame prediction mode is classified as belonging to group B, a reference sample filter is applied to the reference sample; if the directional intra-frame prediction mode is classified as belonging to group C, an intra-frame reference sample interpolation filter is applied to the reference sample.

[0025] Further features and implementation forms of the device according to the second aspect of the invention correspond to features and implementation forms of the method according to the first aspect of the invention.

[0026] According to a third aspect, the present invention relates to a computer program product comprising a program code for performing any of the above methods when the program code is executed on a computer or a processor.

[0027] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The following embodiments are described in more detail with reference to the accompanying drawings, wherein:

[0029] Figure 1 is a block diagram of an example of a video encoding system for implementing an embodiment of the present invention;

[0030] Figure 2 is a block diagram of an example of a video encoder for implementing an embodiment of the present invention;

[0031] Figure 3 is a block diagram of an example structure of a video decoder for implementing an embodiment of the present invention;

[0032] Figure 4 is a schematic diagram of 67 intra-frame prediction modes;

[0033] Figure 5 A first usage example of different interpolation filters in intra- and inter-frame prediction is shown;

[0034] Figure 6 A second example of use of different interpolation filters in intra- and inter-frame prediction is shown;

[0035] Figure 7A third usage example of different interpolation filters in intra- and inter-frame prediction is shown;

[0036] Figure 8 shows the usage of a common interpolation filter to be used for intra- and inter-prediction samples;

[0037] Fig. 9 An embodiment is shown that uses a filtering module to participate in the prediction of chroma samples in motion compensation and to predict luma and chroma samples when performing intra prediction;

[0038] Fig.10 An embodiment of a hardware filter module loading coefficients stored in ROM is shown;

[0039] Fig.11 is a schematic diagram of multiple intra prediction modes;

[0040] Fig.12 Examples of interpolation filter selection for patterns smaller and larger than a diagonal pattern are shown in the case of non-square blocks;

[0041] Fig.13 Quadtree plus binary tree (QTBT) block partitioning is shown;

[0042] Fig.14 The horizontal and vertical directionality of the blocks are shown;

[0043] Fig.15 Schematically illustrates interpolation filter selection for non-square blocks;

[0044] Fig.16 One embodiment of reference sample interpolation filter selection for non-square blocks is shown;

[0045] Fig.17 An alternative embodiment of reference sample interpolation filter selection for non-square blocks is shown;

[0046] Fig.18 is a schematic diagram of 93 intra prediction modes;

[0047] Fig.19 is a block diagram of an apparatus according to an embodiment;

[0048] Fig. 20 is a block diagram of an apparatus according to another embodiment;

[0049] Fig.21 Blocks to be predicted using intra prediction mode are shown. Specific implementation method

[0050] The following description is made in conjunction with the accompanying drawings, which are a part of the present invention and show specific aspects in which the present invention can be implemented by way of diagrammatic illustration. It should be understood that embodiments of the present invention can be used in other aspects and include structural or logical changes not described in the figures. Therefore, the following detailed description is not intended to be limiting, and the scope of the present invention is defined by the appended claims.

[0051] For example, it should be understood that the content related to the described method is also applicable to the corresponding device or system for performing the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units for performing the one or more method steps described, such as functional units (e.g., a unit that performs the one or more steps, or multiple units that perform one or more of the multiple steps respectively), even if such one or more units are not explicitly described or described in the figure. On the other hand, for example, if a specific device is described based on one or more units, such as functional units, the corresponding method may include one or more steps for performing the functions of the one or more units (e.g., a step that performs the functions of the one or more units, or multiple steps that perform the functions of one or more of the multiple units respectively), even if such one or more steps are not explicitly described or described in the figure. In addition, it should be understood that, unless otherwise specifically stated, the features of the various exemplary embodiments and / or aspects described herein may be combined with each other.

[0052] Video coding generally refers to the processing of a series of pictures that constitute a video or video sequence. The terms "picture", "image" or "frame" may be used synonymously in / in the field of video coding and in this application. Each picture is typically partitioned into a set of non-overlapping blocks. The encoding / decoding of a picture is typically performed at the block level, where, for example, inter-frame prediction or intra-frame prediction is used to generate a prediction block to subtract the prediction block from the current block (currently processed / to be processed block) to obtain a residual block, which is further transformed and quantized to reduce the amount of data to be transmitted (compressed), while at the decoder side, the encoded / compressed block is inversely processed to reconstruct the block for representation.

[0053] In the case of lossless video coding, the original video picture can be reconstructed, that is, the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression is performed, such as by quantization, to reduce the amount of data representing the video picture, which cannot be fully reconstructed at the decoder, that is, the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.

[0054] Several video coding standards belong to the group of "lossy hybrid video codecs" (i.e., combining spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each picture of a video sequence is typically partitioned into a set of non-overlapping blocks, and the encoding is typically performed at the block level. In other words, at the encoder, the video is typically processed, i.e., encoded, at the block (video block) level, for example, by using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to generate a prediction block, subtracting the prediction block from the current block (currently processed / to be processed block) to obtain a residual block, and transforming and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compressed); while at the decoder, the inverse process relative to the encoder is applied to the encoded or compressed block to reconstruct the current block for representation. In addition, the encoder replicates the decoder processing loop so that both will generate the same prediction (e.g., intra-frame prediction and inter-frame prediction) and / or reconstruction for processing, i.e., encoding subsequent blocks.

[0055] In the following examples, based on Figures 1 to 3 A video encoding system 10, a video encoder 20, and a video decoder 30 are described.

[0056] Figure 1 1 is a conceptual or schematic block diagram of an example encoding system 10, such as a video encoding system that may use the techniques of the present application (the present invention). An encoder 20 (e.g., video encoder 20) and a decoder 30 (e.g., video decoder 30) of the video encoding system represent examples of devices that may be used to perform techniques according to various examples described in the present application. Figure 1 As shown, the encoding system comprises a source device 12 for providing encoded data 13 , such as an encoded picture 13 , to a destination device 14 for decoding the encoded data 13 .

[0057] The source device 12 includes an encoder 20 and may additionally, ie optionally, include a picture source 16 , a pre-processing unit 18 , for example a picture pre-processing unit 18 , and a communication interface or communication unit 22 .

[0058] The image source 16 may include or may be any kind of image capturing device, such as a device for capturing real-world images, and / or any kind of image or annotation (for screen content encoding, certain text on the screen is also considered to be part of the image or image to be encoded) generating device, such as a computer graphics processor for generating computer-animated images, or any kind of device for acquiring and / or providing real-world images, computer-animated images (e.g., screen content, virtual reality (VR) images) and / or any combination thereof (e.g., augmented reality (AR) images).

[0059] A (digital) picture is or can be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array can also be called pixels (short for picture elements). The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For the representation of color, three color components are usually used, that is, the picture can be represented as or include three sample arrays. In the RBG format or color space, the picture includes corresponding red, green and blue sample arrays. However, in video coding, each pixel is usually represented in a luminance / chrominance format or color space, such as YCbCr, where YCbCr includes a luminance component represented by Y (sometimes also replaced by L) and two chrominance components represented by Cb and Cr. The luminance (or luma for short) component Y represents the luminance or grayscale intensity (for example, in a grayscale picture), while the two chrominance (or chroma for short) components Cb and Cr represent the chrominance or color information components. Therefore, a picture in the YCbCr format includes a luminance sample array of luminance sample values ​​(Y) and two chrominance sample arrays of chrominance values ​​(Cb and Cr). A picture in RGB format may be converted or transformed into a picture in YCbCr format, and vice versa, a process also referred to as color conversion or transformation. If the picture is monochrome, the picture may include only an array of luminance samples.

[0060] The picture source 16 (e.g., video source 16) can be, for example, a camera for capturing pictures, a memory including or storing previously captured or generated pictures, such as a picture memory, and / or any kind of (internal or external) interface for acquiring or receiving pictures. The camera can be, for example, a local or integrated camera integrated in the source device, and the memory can be, for example, a local or integrated memory integrated in the source device. The interface can be, for example, an external interface for receiving pictures from an external video source, such as an external picture capture device such as a camera, an external memory, or an external picture generating device, such as an external computer graphics processor, a computer, or a server. The interface can be any type of interface, such as a wired or wireless interface, an optical interface, according to any proprietary or standardized interface protocol. The interface for acquiring the picture data 17 can be the same interface as the communication interface 22, or it can be a part of the communication interface 22.

[0061] In distinction from the pre-processing unit 18 and the processing performed by the pre-processing unit 18 , the picture or picture data 17 (eg, video data 17 ) may also be referred to as an original picture or original picture data 17 .

[0062] The preprocessing unit 18 is used to receive (raw) picture data 17 and preprocess the picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. The preprocessing performed by the preprocessing unit 18 may include, for example, trimming, color format conversion (e.g., from RGB to YCbCr), color correction, or denoising. It is understood that the preprocessing unit 18 may be an optional component.

[0063] The encoder 20 (eg, a video encoder 20) is configured to receive the pre-processed picture data 19 and provide encoded picture data 21 (hereinafter, for example, based on Figure 2 described in further detail).

[0064] The communication interface 22 of the source device 12 can be used to receive the encoded picture data 21 and transmit it to other devices, such as the destination device 14 or any other device for storage or direct reconstruction, or to process the encoded picture data 21 before storing the encoded data 13 and / or transmitting the encoded data 13 to other devices, such as the destination device 14 or any other device for decoding or storage.

[0065] The destination device 14 includes a decoder 30 (eg, a video decoder 30 ) and may additionally, ie, optionally, include a communication interface or communication unit 28 , a post-processing unit 32 , and a display device 34 .

[0066] The communication interface 28 of the destination device 14 is used to receive the encoded picture data 21 or the encoded data 13, for example directly from the source device 12 or any other source device, such as a storage device, such as an encoded picture data storage device.

[0067] The communication interface 22 and the communication interface 28 can be used to transmit or receive the encoded picture data 21 or the encoded data 13 via a direct communication link between the source device 12 and the destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public network or any combination thereof.

[0068] The communication interface 22 may be used, for example, to package the encoded picture data 21 into a suitable format, such as a data packet, for transmission via a communication link or a communication network.

[0069] The communication interface 28 constituting the opposite end of the communication interface 22 may be used, for example, to depacketize the encoded data 13 to obtain the encoded picture data 21 .

[0070] Both the communication interface 22 and the communication interface 28 can be configured as a one-way communication interface, such as Figure 1As shown by the arrow pointing from the source device 12 to the destination device 14 of the encoded picture data 13, or are configured as a bidirectional communication interface and can, for example, be used to send and receive messages, for example, to establish a connection, confirm and exchange any other information related to the communication link and / or data transmission, for example, the encoded picture data transmission.

[0071] The decoder 30 is used to receive the encoded picture data 21 and provide decoded picture data 31 or decoded picture 31 (hereinafter, for example, based on Figure 3 described in further detail).

[0072] The post-processor 32 of the destination device 14 is used to post-process the decoded picture data 31 (also called reconstructed picture data), for example, the decoded picture 31, to obtain post-processed picture data 33, for example, the post-processed picture 33. The post-processing performed by the post-processing unit 32 may, for example, include color format conversion (for example, from YCbCr to RGB), color correction, trimming or resampling, or any other processing for preparing the processed picture data 33 for display, for example, by the display device 34.

[0073] The display device 34 of the destination device 14 is used to receive the post-processed image data 33, so as to display the image to a user or viewer, for example. The display device 34 can be or include any type of display screen for representing the reconstructed image, for example, an integrated or external display screen or display. The display screen can include, for example, a liquid crystal display (LCD), an organic light emitting diode (OLED) display screen, a plasma display screen, a projector, a micro LED display screen, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display screen.

[0074] although Figure 1 The source device 12 and the destination device 14 are described as separate devices, but embodiments of the device may also include both or both functions, namely the source device 12 or the corresponding function and the destination device 14 or the corresponding function. In such embodiments, the source device 12 or the corresponding function and the destination device 14 or the corresponding function may be implemented by the same hardware and / or software or by separate hardware and / or software or any combination thereof.

[0075] Based on the description, it is obvious to those skilled in the art that Figure 1 The functionality of different units or the presence and (precise) division of different functions within the source device 12 and / or destination device 14 shown may vary depending on the actual device and application.

[0076] The encoder 20 (e.g., video encoder 20) and the decoder 30 (e.g., video decoder 30) can be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), discrete logic, hardware, or any combination thereof. If the technology is partially implemented in software, the device can store instructions for the software in a suitable non-transitory computer-readable storage medium, and can use one or more processors to execute the instructions in hardware, thereby performing the technology of the present invention. Any of the above (including hardware, software, a combination of hardware and software, etc.) can be considered as one or more processors. The video encoder 20 and the video decoder 30 can be respectively included in one or more encoders or decoders, and any of the video encoder 20 and the video decoder 30 can be integrated in the corresponding device as part of a combined encoder / decoder (CODEC).

[0077] The source device 12 and the destination device 14 may include any of a variety of devices, including any type of handheld or fixed device, such as a notebook or laptop computer, a mobile phone, a smart phone, a tablet or a tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (e.g., a content service server or a content distribution server), a broadcast receiver device, a broadcast transmitter device, etc., and the source device 12 and the destination device 14 may not use or use any type of operating system. In some cases, the source device 12 and the destination device 14 may be configured to communicate wirelessly. Therefore, the source device 12 and the destination device 14 may be wireless communication devices.

[0078] In some cases, Figure 1 The video encoding system shown is merely an example, and the techniques of the present application can be applied to video encoding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between encoding and decoding devices. In other examples, data is retrieved from local storage, streamed over a network, and so on. A video encoding device may encode and store data to a memory, and / or a video decoding device may retrieve and decode data from a memory. In some examples, encoding and decoding are performed by devices that do not communicate with each other but only encode data to a memory and / or retrieve and decode data from a memory.

[0079] Figure 2 is a schematic / conceptual block diagram of an example video encoder 20 for implementing the techniques of the present application. Figure 2 In the example of , the video encoder 20 includes a residual calculation unit 204, a conversion processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse conversion processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB for short) 230, a prediction processing unit 260, and an entropy coding unit 270. The prediction processing unit 260 may include an inter-frame prediction unit 244, an intra-frame prediction unit 254, and a mode selection unit 262. The inter-frame prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). Figure 2 The illustrated video encoder 20 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.

[0080] For example, the residual calculation unit 204, the conversion processing unit 206, the quantization unit 208, the prediction processing unit 260 and the entropy coding unit 270 constitute the forward signal path of the encoder 20, whereas, for example, the inverse quantization unit 210, the inverse conversion processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230 and the prediction processing unit 260 constitute the backward signal path of the encoder, wherein the backward signal path of the encoder corresponds to the decoder (see Figure 3 The signal path of the decoder 30).

[0081] The encoder 20 is used to receive a picture 201 or a block 203 of the picture 201, for example, a picture in a picture sequence constituting a video or a video sequence, for example, via an input terminal 202. The picture block 203 may also be referred to as a current picture block or a picture block to be encoded, and the picture 201 may also be referred to as a current picture or a picture to be encoded (particularly in video coding, for distinguishing the current picture from other pictures, for example, previously encoded and / or decoded pictures in the same video sequence, i.e., a video sequence also including the current picture).

[0082] The prediction processing unit 260, also referred to as the block prediction processing unit 260, is used to receive or obtain block 203 (current block 203 of the current picture 201) and reconstructed picture data, for example, reference samples of the same (current) picture from the buffer 216 and / or reference picture data 231 of one or more previously decoded pictures from the decoded picture buffer 230, and to process these data for prediction, i.e., to provide a prediction block 265, wherein the prediction block 265 may be an inter-frame prediction block 245 or an intra-frame prediction block 255.

[0083] The mode selection unit 262 may be used to select a prediction mode (eg, intra or inter prediction mode) and / or a corresponding prediction block 245 or 255 to be used as the prediction block 265 for calculating the residual block 205 and establishing the reconstructed block 215 .

[0084] Embodiments of the mode selection unit 262 may be configured to select a prediction mode (e.g., from those modes supported by the prediction processing unit 260) that provides the best match, in other words, the smallest residual (which means better compression for transmission or storage) or the smallest signaling overhead (which means better compression for transmission or storage), or that takes into account or balances both. The mode selection unit 262 may be configured to determine the prediction mode based on rate distortion optimization (RDO), i.e., to select a prediction mode that provides the smallest rate distortion optimization or whose associated rate distortion at least satisfies the prediction mode selection criteria.

[0085] The intra prediction unit 254 is further configured to determine an intra prediction block 255 based on intra prediction parameters, such as the selected intra prediction mode. In any case, after selecting an intra prediction mode for a block, the intra prediction unit 254 is further configured to provide the intra prediction parameters, i.e., information indicating the selected intra prediction mode for the block, to the entropy encoding unit 270. In an example, the intra prediction unit 254 can be configured to perform any combination of intra prediction techniques described later.

[0086] Embodiments of video encoder 20 may include a picture partition unit ( Figure 2(not shown) is used to partition a picture into multiple (usually non-overlapping) picture blocks. These blocks may also be called root blocks, macroblocks (H.264 / AVC) or coding tree blocks (CTB) or coding tree units (CTU) (H.265 / HEVC and VVC). The picture partition unit can be used to use the same block size for all pictures of a video sequence and a corresponding grid defining the block size, or to change the block size between pictures or picture subsets or picture groups, and partition each picture into corresponding blocks.

[0087] As with pictures, picture blocks are again considered or can be considered as two-dimensional arrays or matrices of samples with intensity values ​​(sample values), although their size is smaller than the picture size. In other words, a block may, for example, include one sample array (e.g., a luma array in the case of monochrome pictures, or a luma or chroma array in the case of color pictures) or three sample arrays (e.g., one luma array and two chroma arrays in the case of color pictures), or any other number and / or type of arrays, depending on the color format applied. The number of samples in the horizontal and vertical directions (or axes) of the block defines the size of the block. Thus, a block may, for example, be an MxN (M columns by N rows) array of samples, or an MxN array of conversion coefficients.

[0088] Figure 2 The illustrated embodiment of the video encoder may be used to encode a picture block by block, for example, block-wise encoding and prediction.

[0089] like Figure 2 Embodiments of the illustrated video encoder may also be used to partition and / or encode pictures by slices (also referred to as video slices), wherein a picture may be partitioned into or encoded by one or more (typically non-overlapping) slices, and each slice may include one or more blocks (e.g., CTUs).

[0090] like Figure 2 Embodiments of the video encoder shown may also be used to partition and / or encode pictures by block groups (also referred to as video block groups) and / or blocks (also referred to as video blocks), wherein a picture may be partitioned into or encoded by one or more (usually non-overlapping) block groups, each block group may, for example, include one or more blocks (e.g., CTUs) or one or more blocks, each block may, for example, be rectangular and may include one or more blocks (e.g., CTUs), for example, one or more complete or fractional blocks.

[0091] Figure 3An example video decoder 30 for implementing the techniques of the present application is shown. The video decoder 30 is configured to receive coded picture data (e.g., coded bitstream) 20, for example, provided by the encoder 100, to obtain a decoded picture 331. During decoding, the video decoder 30 receives video data from the video encoder 100, for example, a coded video bitstream representing picture blocks of a coded video slice and associated syntax elements.

[0092] exist Figure 3 In the example of , decoder 30 includes entropy decoding unit 304, inverse quantization unit 310, inverse transform processing unit 312, reconstruction unit 314 (e.g., summer 314), buffer 316, loop filter 320, decoded picture buffer 330, and prediction processing unit 360. Prediction processing unit 360 may include inter-frame prediction unit 344, intra-frame prediction unit 354, and mode selection unit 362. In some examples, video decoder 30 may perform operations generally related to Figure 2 The decoding process is complementary to the encoding process described with respect to video encoder 20 in .

[0093] The entropy decoding unit 304 is used to perform entropy decoding on the encoded picture data 21 to obtain, for example, quantized coefficients 309 and / or decoded encoding parameters ( Figure 3 The entropy decoding unit 304 may further include any one or all of the (decoded) inter-frame prediction parameters, intra-frame prediction parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may also be used to forward the inter-frame prediction parameters, intra-frame prediction parameters, and / or other syntax elements to the prediction processing unit 360. The video decoder 30 may receive syntax elements at the video slice level and / or the video block level.

[0094] The inverse quantization unit 310 may be functionally identical to the inverse quantization unit 110 , the inverse transform processing unit 312 may be functionally identical to the inverse transform processing unit 112 , the reconstruction unit 314 may be functionally identical to the reconstruction unit 114 , the buffer 316 may be functionally identical to the buffer 116 , the loop filter 320 may be functionally identical to the loop filter 120 , and the decoded picture buffer 330 may be functionally identical to the decoded picture buffer 130 .

[0095] The prediction processing unit 360 may include an inter-frame prediction unit 344 and an intra-frame prediction unit 354, wherein the inter-frame prediction unit 344 may be functionally similar to the inter-frame prediction unit 144, and the intra-frame prediction unit 354 may be functionally similar to the intra-frame prediction unit 154. The prediction processing unit 360 is generally used to perform block prediction and / or obtain a prediction block 365 from the encoded data 21, and receive or obtain information about prediction related parameters and / or a selected prediction mode from the entropy decoding unit 304 (explicitly or implicitly), for example.

[0096] When the video slice is encoded as an intra-coded (I) slice, the intra-prediction unit 354 of the prediction processing unit 360 is used to generate a prediction block 365 for a picture block of the current video slice based on a signaled intra-prediction mode and data from a previously decoded block of the current frame or picture. When the video frame is encoded as an inter-coded (i.e., B or P) slice, the inter-prediction unit 344 (e.g., motion compensation unit) of the prediction processing unit 360 is used to generate a prediction block 365 for a video block of the current video slice based on a motion vector and other syntax elements received from the entropy decoding unit 304. For inter-prediction, the prediction block can be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 can construct the reference frame lists: List 0 and List 1 using a default construction technique based on the reference pictures stored in the DPB 330.

[0097] The prediction processing unit 360 determines prediction information for the video blocks of the current video slice by parsing the motion vectors and other syntax elements, and uses the prediction information to generate prediction blocks for the current video block currently being decoded. For example, the prediction processing unit 360 uses some received syntax elements to determine the prediction mode (e.g., intra-frame or inter-frame prediction) used to encode the video blocks of the video slice, the inter-frame prediction slice type (e.g., B slice, P slice, or GPB slice), the construction information of one or more reference picture lists of the slice, the motion vector of each inter-frame coded video block of the slice, the inter-frame prediction state of each inter-frame coded video block of the slice, and other information for decoding the video blocks in the existing video slice.

[0098] The inverse quantization unit 310 is used to inversely quantize, i.e., inverse quantize, the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding unit 304. The inverse quantization process may include using the quantization parameter calculated by the video encoder 100 for each video block in the video slice to determine the degree of quantization, and similarly determine the degree of inverse quantization that should be applied.

[0099] The inverse transform processing unit 312 is used to apply an inverse transform, such as an inverse DCT, an inverse integer transform or a conceptually similar inverse transform process, to the transform coefficients to generate a residual block in the pixel domain.

[0100] The reconstruction unit 314 (e.g., the summer 314) is used to add the inverse transformation block 313 (i.e., the reconstructed residual block 313) to the prediction block 365, for example by adding the sample values ​​of the reconstructed residual block 313 and the sample values ​​of the prediction block 365 to obtain the reconstructed block 315 in the sample domain.

[0101] A loop filter unit 320 (either in the encoding loop or after the encoding loop) is used to filter the reconstructed block 315 to obtain a filter block 321, for example, to smooth pixel transitions or otherwise improve video quality. In one example, the loop filter unit 320 can be used to perform any combination of filtering techniques described later. The loop filter unit 320 is used to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter or an adaptive loop filter (ALF) or a sharpening or smoothing filter or a collaborative filter. Although the loop filter unit 320 is in Figure 3 3. Although shown as an in-loop filter in FIG. 3, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.

[0102] Thereafter, the decoded video blocks 321 in a given frame or picture are stored in a decoded picture buffer 330, which stores reference pictures for subsequent motion compensation.

[0103] The decoder 30 is used to output the decoded picture 331 to a user, for example, through an output terminal 332 for presentation or viewing.

[0104] Other variations of the video decoder 30 may be used to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transformation based decoder 30 may directly inverse quantize the residual signal without the inverse transform processing unit 312 for a particular block or frame. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.

[0105] like Figure 3 Embodiments of the illustrated video decoder may be used to differentiate and / or decode pictures by slices (also referred to as video slices), wherein a picture may be partitioned into or decoded by one or more (usually non-overlapping) slices, and each slice may include one or more blocks (e.g., CTUs).

[0106] like Figure 3Embodiments of the video decoder shown may be used to partition and / or decode a picture by block groups (also referred to as video block groups) and / or blocks (also referred to as video blocks), wherein a picture may be partitioned into or decoded by one or more (usually non-overlapping) block groups, each block group may, for example, include one or more blocks (e.g., CTUs) or one or more blocks, each block may, for example, be rectangular and may include one or more blocks (e.g., CTUs), for example, one or more complete or fractional blocks.

[0107] It should be understood that in the encoder and decoder, the processing result of the current step may be further processed and then output to the next step. For example, after interpolation filtering, motion vector derivation or loop filtering, the processing result of interpolation filtering, motion vector derivation or loop filtering may be further operated, such as clipping or shifting.

[0108] According to the HEVC / H.265 standard, 35 intra prediction modes are available. The set includes the following modes: planar mode (intra prediction mode index is 0), DC mode (intra prediction mode index is 1), and directional (angular) modes with a coverage of 180° and intra prediction mode index values ​​ranging from 2 to 34. In order to capture arbitrary edge directions present in natural video, the number of directional intra modes is extended from 33 used in HEVC to 65. The additional directional modes are as follows: Figure 4 As shown, the planar mode and DC mode remain unchanged. It is worth noting that the coverage of the intra prediction mode can be greater than 180°. In particular, the coverage of the 62 directional modes with index values ​​3 to 64 is about 230°, that is, several pairs of modes have opposite directionality. In the case of the HEVC Reference Model (HEVC Reference Model, referred to as HM) and the JEM platform, only one pair of angular modes (i.e., modes 2 and 66) has opposite directionality, as shown in Figure 2. Figure 4 To construct the predictor, the conventional angle mode takes reference samples and (if necessary) filters them to obtain a sample predictor. The number of reference samples required to construct the predictor depends on the length of the filter used for interpolation (e.g., the lengths of bilinear and cubic filters are 2 and 4, respectively).

[0109] Figure 4 An example of 67 intra prediction modes is shown, for example, as proposed for VVC, multiple intra prediction modes of the 67 intra prediction modes include: a planar mode (index 0), a DC mode (index 1), and an angular mode with indices 2 to 66, where Figure 4 The lower left angle mode in refers to index 2, and the indexes are numbered incrementally until index 66 is Figure 4 to the upper right angle mode.

[0110] Video coding schemes, such as H.264 / AVC and HEVC, are designed based on the successful principle of block-based hybrid video coding, where a picture is first partitioned into blocks and then each block is predicted using intra-picture or inter-picture prediction.

[0111] As used herein, the term "block" may be part of a picture or a frame. For ease of description, the reference software of High Efficiency Video Coding (HEVC) or Versatile video coding (VVC) developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG) is used to describe the embodiments of the present invention. It will be appreciated by those of ordinary skill in the art that the embodiments of the present invention are not limited to HEVC or VVC. Blocks may refer to CUs, PUs, and TUs. In HEVC, a CTU is divided into CUs by a quadtree structure represented as a coding tree. It is decided at the CU level whether to use inter-picture (temporal) or intra-picture (spatial) prediction to encode the picture area. Each CU may be further divided into one, two, or four PUs according to the PU partition type. Within a PU, the same prediction process is applied, and the relevant information is transmitted to the decoder on a PU basis. After obtaining the residual block by applying a prediction process based on the PU partition type, the CU can be partitioned into transform units (TUs) according to other quadtree structures similar to the coding tree for the CU. In the latest developments in video compression technology, quadtree and binary tree (QTBT) partitioning is used to partition coding blocks. In the QTBT block structure, the CU can be square or rectangular. For example, the coding tree unit (CTU) is first partitioned according to the quadtree structure. The quadtree leaf nodes are further partitioned according to the binary tree structure. The binary leaf nodes are called coding units (CUs), which are used for prediction and conversion processing without any further partitioning. This means that CU, PU and TU have the same block size in the QTBT coding block structure. In parallel, it is also proposed to use multiple partitions, such as ternary tree partitioning, with the QTBT block structure.

[0112] ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) are studying the potential standardization requirements for future video coding technologies with compression capabilities significantly exceeding those of the current HEVC standard (including its current and near-term extensions for screen content coding and high dynamic range coding). The groups are working together on this exploration in a joint collaborative group called the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by their experts in this area.

[0113] VTM (Versatile Test Model) uses 35 intra modes, while BMS (Benchmark Set) uses 67 intra modes. Intra prediction is a mechanism used in many video coding frameworks to improve compression efficiency when only a given frame can be involved.

[0114] like Figure 4 As shown, the latest version of JEM has some modes corresponding to oblique intra-frame prediction directions. For any of these modes, if the corresponding position within the block side is a fraction, the sample within the block interpolation of a set of adjacent reference samples should be predicted. HEVC and VVC use linear interpolation between two adjacent reference samples. JEM uses a more complex 4-tap interpolation filter. The filter coefficients are selected as Gaussian or cubic filter coefficients according to the width or height value. The decision to use width or height is coordinated with the decision on the selection of the main reference side: when the intra-frame prediction mode is greater than or equal to the diagonal mode, the top side of the reference sample is selected as the main reference side, and the width value is selected to determine the interpolation filter used. Otherwise, the main reference side is selected from the left side of the block, and the height controls the filter selection process. Specifically, if the selected side length is less than or equal to 8 samples, a cubic interpolation 4-tap filter is applied. Otherwise, the interpolation filter is a 4-tap Gaussian filter.

[0115] The specific filter coefficients used in JEM are given in Table 1. The coefficients selected from Table 1 are convolved according to the sub-pixel offset and filter type to calculate the predicted sample as follows:

[0116] In this equation, “>>” represents a bitwise right shift operation.

[0117] If a cubic filter is selected, the prediction samples are further clipped to the allowed value range, which is either defined in the SPS or derived from the bit depth of the selected component. Table 1: Intra-frame prediction interpolation filters

[0118] The motion compensation process also uses filtering to predict sample values ​​when the displacement of the pixels of the reference block is fractional. In JEM, 8-tap filtering is used for the luminance component and 4-tap filtering is used for the chrominance components. The motion interpolation filter is first applied horizontally, and then the output of the horizontal filtering is further filtered vertically. Table 2 gives the coefficients of the 4-tap chrominance filter. Table 2: Chroma motion interpolation filter coefficients

[0119] Different video coding schemes use different interpolation filters in intra-frame and inter-frame prediction. In particular, Figures 5 to 7 Different examples of interpolation filters are shown.

[0120] Figure 5 The interpolation filters used in JEM are schematically illustrated. As can be seen from the figure, for motion compensation interpolation at fractional positions in inter-frame prediction, an 8-tap interpolation filter with 6-bit coefficients is used for luma, and a 4-tap interpolation filter with 6-bit coefficients is used for chroma. In addition, for intra-frame reference sample interpolation in intra-frame prediction, a Gaussian 4-tap interpolation filter with 8-bit coefficients or a cubic 4-tap interpolation filter with 8-bit coefficients is used.

[0121] Figure 6 The proposed interpolation filters for core experiment CE3 3.1.3 (G. Van der Auwera et al.: JVETK1023 "Description of Core Experiment 3 (CE3) : Intra Prediction and Mode Coding", Version 2) are schematically shown. As can be seen from the figure, for motion compensation interpolation at fractional positions in inter prediction, an 8-tap interpolation filter with 6-bit coefficients is used for luma, and a 4-tap interpolation filter with 6-bit coefficients is used for chroma. In addition, for intra reference sample interpolation in intra prediction, a Gaussian 6-tap interpolation filter with 8-bit coefficients or a cubic 4-tap interpolation filter with 8-bit coefficients is used.

[0122] Figure 7The interpolation filters proposed by G. Van der Auwera et al.: JVET K0064 "CE3 related: On MDIS and intra interpolation filter switching", version 2 are schematically shown. As can be seen from the figure, for motion compensation interpolation at fractional positions in inter prediction, an 8-tap interpolation filter with 6-bit coefficients is used for luma and a 4-tap interpolation filter with 6-bit coefficients is used for chroma. In addition, for intra reference sample interpolation in intra prediction, a Gaussian 6-tap interpolation filter with 8-bit coefficients or a cubic 6-tap interpolation filter with 8-bit coefficients is used.

[0123] According to the present invention, if the pixel value falls in a fractional position between reference samples, the lookup table and hardware module of the chroma motion compensation sub-pixel filter are reused to interpolate the pixel value in the intra-frame predictor. Since the same hardware is intended to be used for inter-frame prediction and intra-frame prediction, the accuracy of the filter coefficients should be consistent, that is, the number of bits used to represent the filter coefficients of the intra-frame reference sample interpolation should be consistent with the coefficient accuracy of the motion sub-pixel motion compensation interpolation filter.

[0124] Figure 8 The idea of ​​the provided invention is shown. The dashed "4-tap interpolation filter with 6-bit coefficients for chroma" (further referred to as "unified intra / inter filter") can be used for both processes: interpolation of intra and inter prediction samples.

[0125] Fig. 9 Another embodiment using this design is shown in . In this implementation, the filtering module is implemented as a separate unit that participates in both the following processes: predicting chroma samples in motion compensation and predicting luma and chroma samples when performing intra prediction. In this implementation, the hardware filtering part is used for both intra and inter prediction processes.

[0126] like Fig.10 As shown, another embodiment shows the implementation when only the LUT of filter coefficients is reused. In this embodiment, the hardware filtering module loads the coefficients from the LUT stored in ROM. The switch shown in the intra prediction process determines the type of filter used based on the length of the main side selected for the intra prediction process.

[0127] An embodiment of the present application provided may use the following coefficients (see Table 3). Table 3: Intra-frame and inter-frame interpolation filters

[0128] The intra-prediction samples can be calculated by convolution using coefficients selected from Table 3 according to the sub-pixel offset and filter type as follows:

[0129] In this equation, “>>” represents a bitwise right shift operation.

[0130] If a unified intra / inter filter is selected, the prediction samples are further clipped to the allowed value range, which is either defined in the SPS or derived from the bit depth of the selected component.

[0131] For both intra reference sample interpolation and sub-pixel motion compensation interpolation, the same filter can be used to reuse hardware modules and reduce the overall size of required memory.

[0132] In addition to the multiplexed filters, the accuracy of the filter coefficients used for intra-frame reference sample interpolation should be consistent with the accuracy of the coefficients of the multiplexed filters mentioned above.

[0133] It should be noted that the luma processing in motion compensation does not necessarily use 8-tap filtering, but 4-tap filtering can also be performed. In this case, a 4-tap filter can be selected for unification.

[0134] This method can be applied to different parts of the intra prediction process that may involve interpolation. In particular, when extending the main reference samples, the side reference samples can also be filtered using a unified interpolation filter (for details, see V. Drugon: JVET-K0211 "CE3: DC mode without splitting and modified intra-frame filtering (Tests 1.2.1, 2.2.2, and 2.5.1)" Version 1).

[0135] The intra-block copy operation also involves an interpolation step, which can use the proposed method (for a description of intra-block copy, see [Xiaozhong Xu, Shan Liu, Tzu-Der Chuang, Yu-Wen Huang, Shawmin Lei, Krishnakanth Rapaka, Chao Pang, Vadim Seregin, Ye-Kui Wang, Marta Karczewicz: Intra-block copy in HEVC screen content coding extension. IEEE J. Emerg. Sel. Topics Circuits Syst. 6(4): 409-419(2016)]). A method for intra-frame prediction is provided, the method comprising: using an interpolation filter for a chrominance component as an interpolation filter for intra-frame prediction of a block.

[0136] In one embodiment, the lookup table of the interpolation filter for the chrominance component is the same as the lookup table of the interpolation filter for intra prediction.

[0137] In one embodiment, the lookup table of the interpolation filter for the chrominance component is different from the lookup table of the interpolation filter for intra prediction.

[0138] In one embodiment, the interpolation filter is a 4-tap filter.

[0139] In one embodiment, the lookup table for the interpolation filter of the chrominance component is:

[0140] A method for intra prediction is provided, the method comprising: selecting an interpolation filter from a set of interpolation filters for intra prediction of a block.

[0141] In one embodiment, the set of interpolation filters includes a Gaussian filter and a cubic filter.

[0142] In one embodiment, the lookup table of the selected interpolation filter is the same as the lookup table of the interpolation filter used for the chrominance components.

[0143] In one embodiment, the selected interpolation filter is a 4-tap filter.

[0144] In one embodiment, the selected interpolation filter is a cubic filter.

[0145] In one embodiment, the lookup table of the selected interpolation filter is:

[0146] In one embodiment, the lookup table of the selected interpolation filter is:

[0147] An encoder is provided, comprising a processing circuit for executing any of the above methods.

[0148] A decoder is provided, comprising a processing circuit for executing any of the above methods.

[0149] A computer program product is provided, comprising program code for executing any of the above methods.

[0150] A decoder is provided, comprising: one or more processors; and a non-transitory computer-readable storage medium, coupled to the processor and storing a program to be executed by the processor, wherein the program configures the decoder to perform any of the above methods when executed by the processor.

[0151] An encoder is provided, comprising: one or more processors; and a non-transitory computer-readable storage medium, coupled to the processor and storing a program to be executed by the processor, wherein the program configures the encoder to perform any of the above methods when executed by the processor.

[0152] For example, it should be understood that what is described about a method is also applicable to a corresponding device or system for performing the method, and vice versa. For example, if a specific method step is described, the corresponding device may include a unit for performing the described method step, even if such a unit is not elaborated or illustrated in detail in the figure. In addition, it should be understood that the features of the various exemplary aspects described herein may be combined with each other unless specifically stated otherwise.

[0153] A method for aspect ratio dependent filtering for intra prediction is provided, the method comprising:

[0154] An interpolation filter is selected for the block to be predicted based on the aspect ratio of the block.

[0155] In one example, the interpolation filter is selected according to the direction in which the intra prediction mode of the block to be predicted is thresholded.

[0156] In one example, the direction corresponds to the angle of the main diagonal of the block to be predicted.

[0157] In one example, the angle of the direction is calculated as: in

[0158] W and H are the width and height of the block to be predicted respectively.

[0159] In one example, the aspect ratio is:

[0160] R A =log2(W)-log2(H), where W and H are the width and height of the block to be predicted respectively.

[0161] In one example, the angle of the main diagonal line of the block to be predicted is determined based on the aspect ratio.

[0162] In one example, a threshold of the intra prediction mode of the block to be predicted is determined based on an angle of a main diagonal line of the block to be predicted.

[0163] In one example, the interpolation filter is selected according to which side the used reference samples belong to.

[0164] In one example, a straight line having an angle corresponding to the intra direction divides the block into two regions.

[0165] In one example, different interpolation filters are used to predict reference samples belonging to different regions.

[0166] In one example, the filter includes a cubic interpolation filter or a Gaussian interpolation filter.

[0167] In one implementation form of the present application, a frame is the same as a picture.

[0168] In one implementation form of the present invention, the value corresponding to VER_IDX is 50; the value corresponding to HOR_IDX is 18; the value corresponding to VDIA_IDX is 66 and this value can be the maximum value among the values ​​of the corresponding angle mode; the value 2 corresponding to intra-frame mode 2 can be the minimum value among the values ​​of the corresponding angle mode; the value corresponding to DIA_IDX is 34.

[0169] The object of the present invention is to improve the intra-mode signaling scheme. In the present invention, a video decoding method and a video decoder are proposed.

[0170] In another aspect of the present invention, a decoder comprising a processing circuit is disclosed, for executing the above decoding method.

[0171] In another aspect of the present invention, a computer program product is provided, comprising program codes for executing any one of the above decoding methods.

[0172] In another aspect of the present invention, a decoder for decoding video data is provided, the decoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing a program to be executed by the processor, wherein the program, when executed by the processor, configures the decoder to perform any one of the above-mentioned decoding methods.

[0173] The processing circuit can be implemented in hardware or a combination of hardware and software, for example, by a software programmable processor or the like.

[0174] Fig.11is a schematic diagram of multiple intra prediction modes used in the HEVC UIP scheme. For luma blocks, the intra prediction modes may include up to 36 intra prediction modes, of which 3 non-directional modes and 33 directional modes may be included. The non-directional modes may include a planar prediction mode, a mean (DC) prediction mode, and a chroma from luma (LM) prediction mode. The planar prediction mode can be predicted by assuming a block amplitude surface with horizontal and vertical slopes derived from the boundaries of the block. The DC prediction mode can be predicted by assuming a flat block surface with a value matching the average value of the block boundaries. The LM prediction mode can be predicted by assuming that the chroma value of the block matches the luma value of the block. The directional mode can be predicted based on neighboring blocks, such as Fig.11 shown.

[0175] H.264 / AVC and HEVC specify that a low-pass filter can be applied to reference samples before they are used in the intra prediction process. Whether the reference sample filter is used is determined by the intra prediction mode and block size. This mechanism can be called Mode Dependent Intra Smoothing (MDIS). There are also a variety of methods related to MDIS. For example, the Adaptive Reference Sample Smoothing (ARSS) method can signal whether the prediction sample is filtered explicitly (i.e., a flag is included in the bitstream) or implicitly (i.e., for example, data hiding is used to avoid putting the flag in the bitstream to reduce signaling overhead). In this case, the encoder can make a smoothing decision by testing the rate-distortion (RD) cost of all potential intra prediction modes.

[0176] like Fig.11As shown, the latest version of JEM (JEM-7.2) has some modes corresponding to inclined intra prediction directions. For any of these modes, if the corresponding position within the block side is a fraction, the sample within the block interpolation of a set of adjacent reference samples should be predicted. HEVC and VVC use linear interpolation between two adjacent reference samples. JEM uses a more complex 4-tap interpolation filter. The filter coefficients are selected as Gaussian or cubic filter coefficients according to the width or height value. The decision to use width or height is coordinated with the decision to select the main reference side: when the intra prediction mode is greater than or equal to the diagonal mode, the top side of the reference sample is selected as the main reference side, and the width value is selected to determine the interpolation filter used. Otherwise, the main reference side is selected from the left side of the block, and the height controls the filter selection process. Specifically, if the selected side length is less than or equal to 8 samples, a cubic interpolation 4-tap filter is applied. Otherwise, the interpolation filter is a 4-tap Gaussian filter.

[0177] Fig.12 Examples of interpolation filter selection for modes smaller and larger than the diagonal mode (denoted as 45°) are shown in the case of a 32x4 block.

[0178] In VVC, a partitioning mechanism based on quadtrees and binary trees called QTBT is used. Fig.13 As shown, QTBT partitioning can provide not only square blocks but also rectangular blocks. Of course, some signaling overhead and increased computational complexity on the encoder side are the price of QTBT partitioning compared to the traditional quadtree-based partitioning used in the HEVC / H.265 standard. However, QTBT-based partitioning has better segmentation characteristics, so its coding efficiency is significantly higher than that of traditional quadtree.

[0179] However, the VVC in the current state applies the same filter to the reference samples on both sides (the reference samples on the left and top sides). Regardless of whether the block is vertically oriented or horizontally oriented, the reference sample filter is the same for both reference sample sides.

[0180] In this document, the terms "block with vertical orientation" ("vertical orientation of a block") and "block with horizontal orientation" ("horizontal orientation of a block") apply to rectangular blocks generated by the QTBT framework. These terms have the same meaning as Fig.14 Same as shown.

[0181] The present invention provides a mechanism for selecting different reference sample filters to take into account the directionality of a block. Specifically, the width and height of a block are checked independently to apply different reference sample filters to reference samples located at different sides of the block to be predicted.

[0182] In the review of the prior art, it is described that the interpolation filter selection is coordinated with the decision of the primary reference side selection. Both decisions currently rely on the comparison of the intra prediction mode with the diagonal (45 degree) direction.

[0183] However, it can be noted that this design has a serious drawback with respect to the elongated blocks. Fig.15 It can be seen that even if the pattern comparison criterion is adopted to select the shorter side as the main reference side, most of the predicted pixels will still be derived from the reference samples on the longer side (as shown in the dotted area).

[0184] The present invention proposes to use an alternative direction for thresholding the intra prediction mode in the interpolation filter selection process. Specifically, the direction corresponds to the angle of the main diagonal of the block to be predicted. For example, for blocks of size 32x4 and 4x32, the threshold mode m for determining the reference sample filter is T is defined as Fig.16 shown.

[0185] The specific value of the threshold intra prediction angle can be calculated using the following formula: in

[0186] W and H are the block width and height respectively.

[0187] Another embodiment of the present invention uses different interpolation filters depending on which side the reference sample used belongs to. An example of this determination is as follows Fig.17 shown.

[0188] A straight line with an angle corresponding to the intra direction m divides the prediction block into two regions. Samples belonging to different regions are predicted using different interpolation filters.

[0189] Table 4 gives m T Example values ​​of (for a set of intra prediction modes defined in BMS1.0) and the corresponding angles. The angle α is as follows Fig.16 Given as shown. Table 4: m T Example values ​​of (for a set of intra prediction modes defined in BMS1.0)

[0190] Compared with the prior art and solutions, the present invention uses intra-block samples predicted by different interpolation filters, wherein the interpolation filter used to predict the samples is selected according to the block shape, horizontal or vertical directionality, and prediction mode angle.

[0191] The present invention is applicable to the reference sample filtering stage. In particular, the reference sample smoothing filter may be determined using rules similar to those described above for the interpolation filter selection process.

[0192] In addition to interpolation filtering, reference sample filtering can also be applied to reference samples immediately before predicting samples within the intra predictor. The filtered reference samples obtained after reference sample filtering can be used to copy them to corresponding samples in the intra predictor according to the selected direction of the intra prediction mode or for further interpolation filtering. In this way, the following filters can be applied to reference samples: Table 5: Exemplary Reference Sample Filters index Filter length Filter coefficients 0 1 [1], that is, the bypass method is applied, because no filtering is performed at this time 1 3 [1,2,1] 2 5 [2,3,6,3,2] 3 5 [1,4,6,4,1]

[0193] Fig.21 A current block 1130 is shown, which is shown with a surrounding bold box and includes samples 1120. In addition, the figure shows reference samples of neighboring blocks 1110. For example, the reference samples may be samples of the block above or the block to the left.

[0194] According to one embodiment, the provided method comprises the following steps: 1. Each selected directional intra prediction mode is classified into one of the following groups: A. Vertical or horizontal mode; B. A diagonal pattern representing an angle, wherein the angle is a multiple of 45 degrees; C. Other directional modes. 2. If the directional intra prediction mode is classified as belonging to group A, no filtering is applied to the reference sample 1110 to generate the sample 1120 belonging to the intra predictor. Fig.11 As shown, reference samples 1110 are separated from samples 1120 within a block to be predicted (intra predictor) 1130 having a block boundary. 3. If the mode belongs to group B, reference sample filtering (any of the reference sample filters shown in Table 5, e.g., [1, 2, 1]) is applied to the reference samples to further copy these filtered values ​​to the intra predictor according to the selected direction, but no interpolation filtering is applied. 4. If the mode is classified as belonging to group C, only intra-frame reference sample interpolation filtering (e.g., the filter presented in Table 3) is applied to the reference samples to generate prediction samples that fall at fractional or integer positions between the reference samples according to the selected direction (no reference sample filtering is performed).

[0195] According to one embodiment, the provided method provides the following steps: 1. Directional intra prediction modes used for intra prediction processing of the current block are classified into one of the following groups: A. Vertical or horizontal mode; B. Directivity patterns, including diagonal patterns representing angles, wherein the angles are multiples of 45 degrees; C. Other directional modes. 2. If the directional intra prediction mode is classified as belonging to group B, applying reference sample filtering to the reference samples. 3. If the directional intra prediction mode is classified as belonging to group C, applying intra reference sample interpolation filtering to the reference samples.

[0196] In other words, according to the classification of the intra prediction mode to be used for intra prediction of the current block, reference sample filtering (classification B) or reference sample interpolation filtering (classification C) is applied.

[0197] In particular, according to the present embodiment, sample filtering or sample interpolation filtering is applied. In particular, in the case where the reference sample according to the directional intra prediction mode is not a fractional sample, interpolation filtering is not applied. In other words, in the case where the reference sample according to the prediction direction falls on an integer sample, interpolation filtering does not have to be used.

[0198] Furthermore, depending on the classification, no filter may be used at all. For example, in the case of classification A of the intra prediction mode to be used for intra prediction of the current block, both reference sample filtering and reference sample interpolation filtering may not be used.

[0199] like Fig.21 As shown, prediction samples can be obtained from the reference samples in the left and top rows. According to the intra prediction mode, for each prediction sample, the corresponding reference sample position is determined. If the mode has a non-integer slope, the position of the reference sample is fractional, and the reference sample value is obtained by applying an interpolation filter to a subset of the reference samples adjacent to the fractional position.

[0200] The position of the reference sample in the reference sample row has a horizontal (when the intra prediction mode is greater than DIA_IDX) or vertical (when the intra prediction mode is less than DIA_IDX) offset relative to the prediction sample position. The value of the offset depends on the angle of the mode and the distance of the prediction sample to the reference sample row. When the intra prediction mode is 2 or VDIA_IDX, the predicted angle is equal to 45 degrees, and the value of the offset is equal to the value of the distance to the reference sample row.

[0201] The diagonal modes of group B may also include integer slope wide angle modes. In this case, similar to modes DIA_IDX and VDIA_IDX, the value of the offset is a multiple of the distance to the reference sample row, and the reference sample position of each prediction sample is non-fractional.

[0202] For example, when multiple reference row prediction is not used (reference row index equals zero) and the position of the intra prediction sample is equal to (1, 3) relative to the top left prediction sample with position (0, 0), the distance to the reference sample row is equal to 4 samples when the intra prediction mode is greater than DIA_IDX. When the intra prediction mode is less than DIA_IDX, the distance is equal to 2.

[0203] When the intra prediction mode is wide mode and its slope is an integer, the value of the prediction sample can be calculated as: predSamples[x][y]=p[x+Δ][-1], Δ=N*(y+1)

[0204] Otherwise, when the intra prediction mode is greater than DIA_IDX, predSamples[x][y]=p[-1][y+Δ], Δ=N*(x+1).

[0205] Here, Δ represents the value of the offset.

[0206] 45° angle mode 2 and N value of VDIA_IDX equal to 1.

[0207] Modes expressed as multiples of 45 degrees will use the same expression to determine the predicted samples "predSamples[x][y]", but the value of N will be greater than 1 and an integer. It should be noted that modes expressed as multiples of 45 degrees do not necessarily include horizontal and vertical modes.

[0208] It can be noted that the value of the offset Δ for the wide angle integer slope mode is a multiple of the offset for Mode 2 and Mode VDIA_IDX.

[0209] Generally, the offset value can be mapped to the intra prediction mode (predModeIntra) through the parameter "intraPredAngle". The specific mapping of this parameter to the intra prediction mode is shown in Table 6 below: Table 6: Description of intraPredAngle

[0210] Based on intraPredAngle, the inverse angle parameter invAngle is derived as follows:

[0211] An exemplary derivation of a prediction sample is described below:

[0212] The values ​​of the predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH>>1 are derived as follows: >> If predModeIntra is greater than or equal to 34, then the following ordered steps apply: 1. The reference sample array ref[x] is specified as follows: -Apply the following: ref[x]=p[-1-refIdx+x][-1>>refIdx], where x=0..nTbW+refIdx - If intraPredAngle is less than 0, the main reference sample array is extended as follows: -When (nTbH*intraPredAngle)>>5 is less than -1, ref[x]=p[-1-refIdx][-1>>refIdx+((x*invAngle+128)>>8)], where x = -1..(nTbH*intraPredAngle)>>5 ref[((nTbH*intraPredAngle)>>5)>>1]=ref[(nTbH*intraPredAngle)>>5] ref[nTbW+1+refIdx]=ref[nTbW+refIdx] -otherwise, ref[x]=p[-1-refIdx+x][-1-refIdx], where x=nTbW+1+refIdx..refW+refIdx ref[-1] = ref[0] The additional sample ref[refW+refIdx+x] with -x=1..(Max(1,nTbW / nTbH)*refIdx+1) is derived as follows: ref[refW+refIdx+x]=p[-1+refW][-1-refIdx] 2. The value of the predicted sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: -The index variable iIdx and the multiplication factor iFact are derived as follows: iIdx=((y+1+refIdx)*intraPredAngle)>>5+refIdx iFact=((y+1+refIdx)*intraPredAngle)&31 - If cIdx is equal to 0, the following applies: The interpolation filter coefficients fT[j] for -j=0..3 are derived as follows: fT[j]=filterFlag? fG[iFact][j]:fC[iFact][j] -The value of the predicted sample predSamples[x][y] is derived as follows: - Otherwise (cIdx is not equal to 0), depending on the value of iFact, the following applies: - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=((32-iFact)*ref[x+iIdx+1]+iFact*ref[x+iIdx+2]+16)>>5 Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=ref[x+iIdx+1] Otherwise (predModeIntra is less than 34), apply the following ordered steps: 3. The reference sample array ref[x] is specified as follows: -Apply the following: ref[x]=p[-1-refIdx][-1-refIdx+x], where x=0..nTbH+refIdx - If intraPredAngle is less than 0, the main reference sample array is extended as follows: -When (nTbW*intraPredAngle)>>5 is less than -1, ref[x]=p[-1-refIdx+((x*invAngle+128)>>8)][-1-refIdx], where x = -1..(nTbW*intraPredAngle)>>5 ref[((nTbW*intraPredAngle)>>5)-1]=ref[(nTbW*intraPredAngle)>>5] ref[nTbG+1+refIdx]=ref[nTbH+refIdx] -otherwise, ref[x]=p[-1-refIdx][-1-refIdx+x], where x=nTbH+1+refIdx..refH+refIdx ref[-1] = ref[0] The additional sample ref[refH+refIdx+x] with -x=1..(Max(1,nTbW / nTbH)*refIdx+1) is derived as follows: ref[refH+refIdx+x]=p[-1+refH][-1-refIdx] 4. The values ​​of the predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: -The index variable iIdx and the multiplication factor iFact are derived as follows: iIdx=((x+1+refIdx)*intraPredAngle)>>5 iFact=((x+1+refIdx)*intraPredAngle)&31 - If cIdx is equal to 0, the following applies: The interpolation filter coefficients fT[j] for -j=0..3 are derived as follows: fT[j]=filterFlag? fG[iFact][j]:fC[iFact][j] -The value of the predicted sample predSamples[x][y] is derived as follows: - Otherwise (cIdx is not equal to 0), depending on the value of iFact, the following applies: - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=((32-iFact)*ref[y+iIdx+1]+iFact*ref[y+iIdx+2]+16)>>5 Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=ref[y+iIdx+1]

[0213] As can be seen from the examples above and the table above, the interpolation calls for some modes are redundant. Specifically, this occurs for modes where the corresponding intraPredAngle parameter is a multiple of 32. The value 32 corresponds to a mode with an integer 45 degree slope. In effect, the value of predAngle is a 5-bit fixed-point integer representation of the value that will be used for the offset of the prediction samples adjacent to the reference sample row.

[0214] Specifically, for the modes [-14, -12, -10, -6, 2, 34, 66, 72, 76, 78, 80], the calculation of the prediction samples does not require interpolation. The values ​​of the prediction samples can be obtained by copying the reference samples.

[0215] A version of the VVC draft specification including an exemplary implementation of an embodiment of the present invention is given below: 8.4.4.2.1 General intra sample prediction

[0216] The inputs to this process are: - sample position (xTbCmp, yTbCmp) specifies the top left sample of the current transform block relative to the top left sample of the current picture; - variable predModeIntra, specifies the intra prediction mode; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable nCbW, specifies the coding block width; - variable nCbH, specifies the coding block height; -Variable cIdx specifies the color component of the current block.

[0217] The output of this process is the prediction samples predSamples[x][y] with x=0..nTbW-1, y=0..nTbH-1.

[0218] The variables refW and refH are derived as follows: - If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cIdx is not equal to 0, the following applies: refW=nTbW*2 (8-103) refH=nTbH*2 (8-104) - Otherwise (IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and cIdx is equal to 0), the following applies: refW=nCbW*2 (8-105) refH=nCbH*2 (8-106)

[0219] The variable refIdx that specifies the intra prediction reference row index is derived as follows: refIdx=(cIdx==0)? IntraLumaRefLineIdx[xTbCmp][yTbCmp]:0 (8-107)

[0220] For the generation of reference samples p[x][y] for x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx, the following ordered steps apply: 1. The reference sample availability marking process as specified in section 8.4.4.2.2 of Bross B et al.: "Generic Video Coding (Draft 4)", JVET-M1001-v7, March 2019 (hereinafter, this document is referred to as JVET-M1001-v7) is called with the sample position (xTbCmp, yTbCmp), the intra-prediction reference row index refIdx, the reference sample width refW, the reference sample height refH, and the color component index cIdx as input and with the reference sample refUnfilt[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx as output. 2. When at least one of x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1- When sample refUnfilt[x][y] of refIdx is marked as "not available for intra prediction", the reference sample replacement process as specified in section 8.4.4.2.3 of JVET-M1001-v7 is called using the intra prediction reference row index refIdx, the reference sample width refW, the reference sample height refH, the reference samples refUnfilt[x][y] with x=-1>>refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx, and the color component index cIdx as input and using the modified reference sample refUnfilt[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx as output. 3. If predModeIntra is equal to INTRA_DC, RefFilterFlag is set equal to 0. Otherwise, the parameters intraPredAngle, RefFilterFlag and InterpolationFlag are obtained by calling the corresponding intraPredAngle parameter and filter flag derivation process specified in the following subclause 8.4.4.2.7 with the intra prediction mode predModeIntra, the intra prediction reference row index refIdx, the transform block width nTbW, the transform block height nTbH, the coding block width nCbW and height nCbH, and the color component index cIdx. 4. Reference sample filtering process as specified in subsection 8.4.4.2.4 below by using intra prediction reference row index refIdx, transform block width nTbW and height nTbH, reference sample width refW, reference sample height refH, unfiltered x = -1- The sample refUnfilt[x][y] with refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx, the RefFilterFlag parameters, and the color component index cIdx are taken as input and called with the reference sample p[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx as output.

[0221] The intra-frame sample prediction process according to predModeIntra is applied as follows: - If predModeIntra is equal to INTRA_PLANAR, the corresponding intra prediction mode process specified in section 8.4.4.2.5 of JVET-M1001-v7 is called using the transform block width nTbW, the transform block height nTbH and the reference sample array p as input and using the prediction sample array predSamples as output. - Otherwise, if predModeIntra is equal to INTRA_DC, the corresponding intra prediction mode process specified in section 8.4.4.2.6 of JVET-M1001-v7 is called using the transform block width nTbW, the transform block height nTbH and the reference sample array p as input and using the prediction sample array predSamples as output. Otherwise, if predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM, the corresponding intra prediction mode process specified in subsection 8.4.4.2.8 is called using the intra prediction mode predModeIntra, the sample position (xTbC, yTbC) set equal to (xTbCmp, yTbCmp), the transform block width nTbW and height nTbH, and the reference sample array p as input and using the prediction sample array predSamples as output. Otherwise, the corresponding intra prediction mode process specified in subclause 8.4.4.2.8 below is called with the intra prediction mode predModeIntra, the intra prediction reference row index refIdx, the transform block width nTbW, the transform block height nTbH, the reference sample width refW, the reference sample height refH, the coding block width nCbW and height nCbH, the interpolation filter selection flag InterpolationFlag, the reference filter flag RefFilterFlag and the reference sample array p as input and with the modified intra prediction mode predModeIntra and the prediction sample array predSamples as output.

[0222] The position-dependent prediction sample filtering process specified in section 8.4.4.2.9 of JVET-M1001-v7 is called with as input the intra prediction mode predModeIntra, the transform block width nTbW, the transform block height nTbH, the prediction samples predSamples[x][y] with x=0..nTbW-1, y=0..nTbH-1, the reference sample width refW, the reference sample height refH, the reference samples p[x][y] with x=-1, y=-1..refH-1 and x=0..refW-1, y=-1, and the color component index cIdx, and with as output the modified prediction sample array predSamples, when all of the following conditions hold: >>IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cIdx is not equal to 0; -refIdx is equal to 0 or cIdx is not equal to 0; -One of the following conditions is met: -predModeIntra is equal to INTRA_PLANAR; -predModeIntra is equal to INTRA_DC; -predModeIntra equals INTRA_ANGULAR18; -predModeIntra equals INTRA_ANGULAR50; -predModeIntra is less than or equal to INTRA_ANGULAR10; -predModeIntra is greater than or equal to INTRA_ANGULAR58. 8.4.4.2.4 Reference sample filtering process

[0223] The inputs to this process are: - variable refIdx, specifies the intra prediction reference row index; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable refW, specifies the reference sample width; - variable refH, specifies the reference sample height; - the (unfiltered) neighboring samples refUnfilt[x][y] of x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx; -RefFilterFlag parameter.

[0224] The output of this process is the reference samples p[x][y] with x=-1-refldx, y=-1-refldx..refH-1 and x=-refldx..refW-1, y=-1-refldx.

[0225] For the derivation of the reference sample p[x][y], the following applies: If RefFilterFlag is equal to 1, the filtered sample values ​​p[x][y] for x=-1, y=-1..refH-1 and x=0..refW-1, y=-1 are derived as follows: p[-1][-1]=(refUnfilt[-1][0]+2*refUnfilt[-1][-1]+refUnfilt[0][-1]+2)>>2 (8-111) p[-1][y]=(refUnfilt[-1][y+1]+2*refUnfilt[-1][y]+refUnfilt[-1][y-1]+2)>>2 for y=0..refH-2 (8-112) p[-1][refH-1]=refUnfilt[-1][refH-1] (8-113) p[x][-1]=(refUnfilt[x-1][-1]+2*refUnfilt[x][-1]+refUnfilt[x+1][-1]+2)>>2 for x=0..refW-2 (8-114) p[refW-1][-1]=refUnfilt[refW-1][-1] (8-115) Otherwise, the reference sample value p[x][y] is set equal to the unfiltered sample value refUnfilt[x][y] of x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx. 8.4.4.2.7 Description of intraPredAngle parameter and filter flag derivation

[0226] The inputs to this process are: - Intra prediction mode predModeIntra; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable nCbW, specifies the coding block width; - variable nCbH, specifies the coding block height; - Color component index cIdx.

[0227] The output of this process is the modified intra prediction mode predModeIntra, intraPredAngle parameters, RefFilterFlag and InterpolationFlag variables.

[0228] The variables nW and nH are derived as follows: - If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cIdx is not equal to 0, the following applies: nW=nTbW nH=nTbH >> Otherwise (IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and cIdx is equal to 0), apply the following: nW=nCbW nH=nCbH

[0229] The variable whRatio is set equal to Abs(Log2(nW / nH)).

[0230] For non-square blocks (nW is not equal to nH), the intra prediction mode predModeIntra is modified as follows: - If all of the following conditions are true, then set predModeIntra equal to (predModeIntra+65): -nW is greater than nH; -predModeIntra is greater than or equal to 2; - predModeIntra is less than (whRatio>1)? (8+2*whRatio): 8. Otherwise, if all of the following are true, set redModeIntra equal to (predModeIntra - 67): -nH is greater than nW; -predModeIntra is less than or equal to 66; - predModeIntra greater than (whRatio>1)? (60-2*whRatio): 60.

[0231] The angle parameter intraPredAngle is determined as specified in Table 7 using the predModeIntra value. Table 7: Description of intraPredAngle

[0232] The variable filterFlag is derived as follows: - Set filterFlag equal to 0 if one or more of the following conditions are true: -cIdx is not equal to 0; -refIdx is not equal to 0; - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is greater than or equal to INTRA_ANGULAR34, and nW is greater than 8; -IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is less than INTRA_ANGULAR34, and nH is greater than 8. - Otherwise, if predModeIntra is INTRA_PLANAR, set the variable filterFlag equal to nTbS>5?1:0. - Otherwise, if ntraPredAngle is greater than 32, then the variable filterFlag is set equal to 1. - Otherwise, the following applies: - Set the variable minDistVerHor equal to Min(Abs(predModeIntra-50), Abs(predModeIntra-18)). -The variable intraHorVerDistThres[nTbS] is specified in Table 8. -The variable filterFlag is derived as follows: - If minDistVerHor is greater than intraHorVerDistThres[nTbS] or Abs(intraPredAngle)>32, set filterFlag equal to 1. Table 8: Description of intraHorVerDistThres[nTbS] for various transform block sizes nTbS nTbS=2 nTbS=3 nTbS=4 nTbS=5 nTbS=6 nTbS=7 intraHorVerDistThres[nTbS] 16 14 2 0 0 0

[0233] The output variables RefFilterFlag and InterpolationFlag are derived as follows: - If predModeIntra is INTRA_PLANAR or predIntraAng is an integer multiple of 32, the variable RefFilterFlag is set equal to filterFlag and InterpolationFlag is set equal to 0; >> Otherwise, the variable RefFilterFlag is set equal to 0 and InterpolationFlag is set equal to filterFlag.

[0234] Informational: For any predModeIntra, RefFilterFlag and InterpolationFlag cannot both be equal to 1 (see Table 9): Table 9: Description of RefFilterFlag and InterpolationFlag (informative) 8.4.4.2.8 Description of Angular Intra Prediction Mode

[0235] The inputs to this process are: - Intra prediction mode predModeIntra; -intraPredAngle parameter; - variable refIdx, specifies the intra prediction reference row index; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable refW, specifies the reference sample width; - variable refH, specifies the reference sample height; - variable nCbW, specifies the coding block width; - variable nCbH, specifies the coding block height; - variable InterpolationFlag, specifies the use of 4-tap filter interpolation; - variable RefFilterFlag, specifies whether adjacent samples are filtered; - Neighboring samples p[x][y] where x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx.

[0236] The output of this process is the modified intra prediction mode predModeIntra and prediction samples predSamples[x][y] with x=0..nTbW-1, y=0..nTbH-1.

[0237] The variable nTbS is set equal to (Log2(nTbW)+Log2(nTbH))>>1.

[0238] Fig.18 93 prediction directions are shown, with the dashed directions associated with the wide-angle mode that is applied only to non-square blocks.

[0239] Based on intraPredAngle, the inverse angle parameter invAngle is derived as follows:

[0240] The interpolation filter coefficients fC[phase][j] and fG[phase][j] for phase = 0..31 and j = 0..3 are specified in Table 10. Table 10: Description of interpolation filter coefficients fC and fG

[0241] The values ​​of the predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - If predModeIntra is greater than or equal to 34, then the following ordered steps apply: 1. The reference sample array ref[x] is specified as follows: -Apply the following: ref[x]=p[-1-refIdx+x][-1-refIdx], where x=0..nTbW+refIdx - If intraPredAngle is less than 0, the main reference sample array is extended as follows: -When (nTbH*intraPredAngle)>>5 is less than -1, ref[x]=p[-1-refIdx][-1>>refIdx+((x*invAngle+128)>>8)], where x=-1..(nTbH*intraPredAngle)>>5 ref[((nTbH*intraPredAngle)>>5)-1]=ref[(nTbH*intraPredAngle)>>5] ref[nTbW+1+refIdx]=ref[nTbW+refIdx] -otherwise, ref[x]=p[-1-refIdx+x][-1-refIdx], where x=nTbW+1+refIdx..refW+refIdx ref[-1] = ref[0] The additional sample ref[refW+refIdx+x] of -x=1..(Max(1,nTbW / nTbH)*refIdx+1) is derived as follows: ref[refW+refIdx+x]=p[-1+refW][-1-refIdx] 2. The value of the predicted sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: -The index variable iIdx and the multiplication factor iFact are derived as follows: iIdx=((y+1+refIdx)*intraPredAngle)>>5+refIdx iFact=((y+1+refIdx)*intraPredAngle)&31 - If RefFilterFlag is equal to 0, the following applies: The interpolation filter coefficients fT[j] for -j=0..3 are derived as follows: fT[j]=InterpolationFlag? fG[iFact][j]:fC[iFact][j] -The value of the predicted sample predSamples[x][y] is derived as follows: - Otherwise (RefFilterFlag is not equal to 0), depending on the value of iFact, the following applies: - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=((32-iFact)*ref[x+iIdx+1]+iFact*ref[x+iIdx+2]+16)>>5 Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=ref[x+iIdx+1] Otherwise (predModeIntra is less than 34), apply the following ordered steps: 1. The reference sample array ref[x] is specified as follows: -Apply the following: ref[x]=p[-1-refIdx][-1-refIdx+x], where x=0..nTbH+refIdx - If intraPredAngle is less than 0, the main reference sample array is extended as follows: -When (nTbW*intraPredAngle)>>5 is less than -1, ref[x]=p[-1-refIdx+((x*invAngle+128)>>8)][-1-refIdx], where x=-1..(nTbW*intraPredAngle)>>5 ref[((nTbW*intraPredAngle)>>5)-1]=ref[(nTbW*intraPredAngle)>>5] ref[nTbG+1+refIdx]=ref[nTbH+refIdx] -otherwise, ref[x]=p[-1-refIdx][-1-refIdx+x], where x=nTbH+1+refIdx..refH+refIdx ref[-1] = ref[0] The additional sample ref[refH+refIdx+x] with -x=1..(Max(1,nTbW / nTbH)*refIdx+1) is derived as follows: ref[refH+refIdx+x]=p[-1+refH][-1-refIdx] 2. The value of the predicted sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: -The index variable iIdx and the multiplication factor iFact are derived as follows: iIdx=((x+1+refIdx)*intraPredAngle)>>5 iFact=((x+1+refIdx)*intraPredAngle)&31 - If RefFilterFlag is equal to 0, the following applies: The interpolation filter coefficients fT[j] for -j=0..3 are derived as follows: fT[j]=InterpolationFlag? fG[iFact][j]:fC[iFact][j] -The value of the predicted sample predSamples[x][y] is derived as follows: - Otherwise (RefFilterFlag is not equal to 0), depending on the value of iFact, the following applies: - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=((32-iFact)*ref[y+iIdx+1]+iFact*ref[y+iIdx+2]+16)>>5 Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=ref[y+iIdx+1]

[0242] Based on the size of the prediction block, the wide modes can belong to different groups. In the example given below, the modes still belong to group "B" or group "C", depending on whether they have a non-fractional slope. However, the choice of interpolation filters for modes of group "C" and the presence of a reference sample filtering step for modes of group "B" will depend on the size of the block. Part of the filterFlag derivation can be modified as follows:

[0243] The variable filterFlag is derived as follows: - Set filterFlag equal to 0 if one or more of the following conditions are true: -cIdx is not equal to 0; -refIdx is not equal to 0; - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is greater than or equal to INTRA_ANGULAR34, and nW is greater than 8; -IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is less than INTRA_ANGULAR34, and nH is greater than 8. - Otherwise, if predModeIntra is INTRA_PLANAR, set the variable filterFlag equal to nTbS>5?1:0. - Otherwise, if intraPredAngle is greater than 32 and nTbW*nTbH is greater than 32, then set the variable filterFlag equal to 1. - Otherwise, the following applies: - Set the variable minDistVerHor equal to Min(Abs(predModeIntra-50), Abs(predModeIntra-18)). -The variable intraHorVerDistThres[nTbS] is specified in Table 11. -The variable filterFlag is derived as follows: - If minDistVerHor is greater than intraHorVerDistThres[nTbS] or Abs(intraPredAngle)>32, set filterFlag equal to 1. Table 11: Description of intraHorVerDistThres[nTbS] for various transform block sizes nTbS nTbS=2 nTbS=3 nTbS=4 nTbS=5 nTbS=6 nTbS=7 intraHorVerDistThres[nTbS] 16 14 2 0 0 0

[0244] The wide-angle mode may be a mode indicating a direction of the lower portion of the lower left quadrant or the right portion of the upper right quadrant. Fig.18 In the example shown, the wide angle modes are modes -14 to -1 and modes 67 to 80.

[0245] Another version of the VVC draft specification containing an exemplary implementation of an embodiment of the present invention is given below, which includes the following part related to reference sample filtering:

[0246] For the generation of reference samples p[x][y] for x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx, the following ordered steps apply: 1. The reference sample availability marking process as specified in section 8.4.4.2.2 of JVET-M1001-v7 is called with the sample position (xTbCmp, yTbCmp), the intra prediction reference row index refIdx, the reference sample width refW, the reference sample height refH, and the color component index cIdx as input and with the reference samples refUnfilt[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx as output. 2. When at least one sample refUnfilt[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx is marked as "not available for intra prediction", the reference sample replacement process as specified in section 8.4.4.2.3 of JVET-M1001-v7 is performed by using the intra prediction reference row index refIdx, reference sample width refW, reference sample height refH, x=-1-r refH-1 and x=-refIdx..refW-1, y=-1-refIdx and the color component index cIdx as input and with the modified reference sample refUnfilt[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx as output. If predModeIntra is not equal to INTRA_PLANAR and predModeIntra is not equal to INTRA_DC, the parameter intraPredAngle is obtained by calling the corresponding intra prediction mode process specified in subsection 8.4.4.2.7 below; otherwise, if predModeIntra is equal to INTRA_PLANAR, intraPredAngle is set to 32, otherwise intraPredAngle is set to 0. 3. The reference sample filtering process as specified in subsection 8.4.4.2.4 below is called using the intra prediction reference row index refIdx, the transform block width nTbW and height nTbH, the reference sample width refW, the reference sample height refH, the unfiltered samples refUnfilt[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx, the intraPredAngle parameter, and the color component index cIdx as input and using the reference sample p[x][y] with x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx as output.

[0247] The intra-frame sample prediction process according to predModeIntra is applied as follows: - If predModeIntra is equal to INTRA_PLANAR, the corresponding intra prediction mode process specified in section 8.4.4.2.5 of JVET-M1001-v7 is called using the transform block width nTbW, the transform block height nTbH and the reference sample array p as input and using the prediction sample array predSamples as output. - Otherwise, if predModeIntra is equal to INTRA_DC, the corresponding intra prediction mode process specified in section 8.4.4.2.6 of JVET-M1001-v7 is called using the transform block width nTbW, the transform block height nTbH and the reference sample array p as input and using the prediction sample array predSamples as output. Otherwise, if predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM or INTRA_T_CCLM, the corresponding intra prediction mode process specified in subsection 8.4.4.2.8 below is called using the intra prediction mode predModeIntra, the sample position (xTbC, yTbC) set equal to (xTbCmp, yTbCmp), the transform block width nTbW and height nTbH, and the reference sample array p as input and using the prediction sample array predSamples as output. - Otherwise, if one or more of the following conditions are true, then fourTapFlag is set equal to 0: - the color component index cIdx is not equal to 0; -intraPredAngle is a multiple of 32. Otherwise, the corresponding intra prediction mode process specified in subclause 8.4.4.2.7 below is called with the intra prediction mode predModeIntra, the intra prediction reference row index refIdx, the transform block width nTbW, the transform block height nTbH, the reference sample width refW, the reference sample height refH, the coding block width nCbW and height nCbH, fourTapFlag, and the reference sample array p as input and with the modified intra prediction mode predModeIntra and the prediction sample array predSamples as output. 8.4.4.2.4 Reference sample filtering process

[0248] The inputs to this process are: - variable refIdx, specifies the intra prediction reference row index; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable refW, specifies the reference sample width; - variable refH, specifies the reference sample height; -x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx (unfiltered) Adjacent samples refUnfilt[x][y]; -predIntraAngle parameter; -Variable cIdx specifies the color component of the current block.

[0249] The output of this process is the reference samples p[x][y] with x=-1-refldx, y=-1-refldx..refH-1 and x=-refldx..refW-1, y=-1-refldx.

[0250] The variable filterFlag is derived as follows: >> If all of the following conditions are true, filterFlag is set equal to 1: -refIdx is equal to 0; -nTbW*nTbH is greater than 32; -cIdx is equal to 0; -IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT; -predIntraAngle is not equal to 0 and is a multiple of 32. Otherwise, set filterFlag equal to 0.

[0251] For the derivation of the reference sample p[x][y], the following applies: If filterFlag is equal to 1, the filtered sample values ​​p[x][y] for x=-1, y=-1..refH-1 and x=0..refW-1, y=-1 are derived as follows: p[-1][-1]=(refUnfilt[-1][0]+2*refUnfilt[-1][-1]+refUnfilt[0][-1]+2)>>2 (8-111) p[-1][y]=(refUnfilt[-1][y+1]+2*refUnfilt[-1][y]+refUnfilt[-1][y-1]+2)>>2 for y=0..refH-2 (8-112) p[-1][refH-1]=refUnfilt[-1][refH-1] (8-113) p[x][-1]=(refUnfilt[x-1][-1]+2*refUnfilt[x][-1]+refUnfilt[x+1][-1]+2)>>2 for x=0..refW-2 (8-114) p[refW-1][-1]=refUnfilt[refW-1][-1] (8-115) - Otherwise, the reference sample value p[x][y] is set equal to the unfiltered x=-1-refIdx, y=-1-refIdx..refH-1 and x= -refIdx..refW-1,y=-1-sample value refUnfilt[x][y] of refIdx. 8.4.4.2.7 Description of intraPredAngle Parameters

[0252] The inputs to this process are: - Intra prediction mode predModeIntra; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable nCbW, specifies the coding block width; -Variable nCbH, specifies the coding block height.

[0253] The output of this process is the modified intra prediction mode predModeIntra, the intraPredAngle parameter and the filterFlag variable.

[0254] The variables nW and nH are derived as follows: - If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT or cIdx is not equal to 0, the following applies: nW=nTbW (8-125) nH=nTbH (8-126) - Otherwise (IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT and cIdx is equal to 0), the following applies: nW=nCbW (8-127) nH=nCbH (8-128)

[0255] The variable whRatio is set equal to Abs(Log2(nW / nH)).

[0256] For non-square blocks (nW is not equal to nH), the intra prediction mode predModeIntra is modified as follows: - If all of the following conditions are true, then set predModeIntra equal to (predModeIntra+65): -nW is greater than nH; -predModeIntra is greater than or equal to 2; - predModeIntra is less than (whRatio>1)? (8+2*whRatio): 8. Otherwise, if all of the following are true, set redModeIntra equal to (predModeIntra - 67): -nH is greater than nW; -predModeIntra is less than or equal to 66; - predModeIntra greater than (whRatio>1)? (60-2*whRatio): 60.

[0257] The angle parameter intraPredAngle is determined as specified in Table 12 using the predModeIntra value. Table 12: Description of intraPredAngle

[0258] The variable filterFlag is derived as follows: - Set filterFlag equal to 0 if one or more of the following conditions are true: -refIdx is not equal to 0; - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is greater than or equal to INTRA_ANGULAR34, and nW is greater than 8; -IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is less than INTRA_ANGULAR34, and nH is greater than 8. - Otherwise, the following applies: - Set the variable minDistVerHor equal to Min(Abs(predModeIntra-50), Abs(predModeIntra-18)). -The variable intraHorVerDistThres[nTbS] is specified in Table 11. -The variable filterFlag is derived as follows: - If minDistVerHor is greater than intraHorVerDistThres[nTbS] or Abs(intraPredAngle)>32, set filterFlag equal to 1. 8.4.4.2.8 Description of Angular Intra Prediction Mode

[0259] The inputs to this process are: - Intra prediction mode predModeIntra; -intraPredAngle parameter; - variable refIdx, specifies the intra prediction reference row index; - variable nTbW, specifies the conversion block width; - variable nTbH, specifies the conversion block height; - variable refW, specifies the reference sample width; - variable refH, specifies the reference sample height; - variable nCbW, specifies the coding block width; - variable nCbH, specifies the coding block height; - variable fourTapFlag, specifies the use of 4-tap filter interpolation; -variable filterFlag; - Neighboring samples p[x][y] where x=-1-refIdx, y=-1-refIdx..refH-1 and x=-refIdx..refW-1, y=-1-refIdx.

[0260] The output of this process is the modified intra prediction mode predModeIntra and prediction samples predSamples[x][y] with x=0..nTbW-1, y=0..nTbH-1.

[0261] The variable nTbS is set equal to (Log2(nTbW)+Log2(nTbH))>>1.

[0262] The variable filterFlag is derived as follows: - Set filterFlag equal to 0 if one or more of the following conditions are true: -refIdx is not equal to 0; - IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is greater than or equal to INTRA_ANGULAR34, and nW is greater than 8; -IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, cIdx is equal to 0, predModeIntra is less than INTRA_ANGULAR34, and nH is greater than 8. - Otherwise, the following applies: - Set the variable minDistVerHor equal to Min(Abs(predModeIntra-50), Abs(predModeIntra-18)). -The variable intraHorVerDistThres[nTbS] is specified in Table 13. -The variable intraHorVerDistThres[nTbS] is specified in Table 13. - If minDistVerHor is greater than intraHorVerDistThres[nTbS] or Abs(intraPredAngle) is greater than 32, set filterFlag equal to 1. Otherwise, set filterFlag equal to 0. Table 13: Description of intraHorVerDistThres[nTbS] for various transform block sizes nTbS nTbS=2 nTbS=3 nTbS=4 nTbS=5 nTbS=6 nTbS=7 intraHorVerDistThres[nTbS] 16 14 2 0 0 0

[0263] Fig.18 93 prediction directions are shown, with the dashed directions associated with the wide-angle mode that is applied only to non-square blocks.

[0264] Based on intraPredAngle, the inverse angle parameter invAngle is derived as follows:

[0265] The interpolation filter coefficients fC[phase][j] and fG[phase][j] for phase = 0..31 and j = 0..3 are specified in Table 14. Table 14: Description of interpolation filter coefficients fC and fG

[0266] The values ​​of the predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - If predModeIntra is greater than or equal to 34, then the following ordered steps apply: 1. The reference sample array ref[x] is specified as follows: -Apply the following: ref[x]=p[-1-refIdx+x][-1-refIdx], where x=0..nTbW+refIdx (8-130) - If intraPredAngle is less than 0, the main reference sample array is extended as follows: -When (nTbH*intraPredAngle)>>5 is less than -1, ref[x]=p[-1-refIdx][-1-refIdx+((x*invAngle+128)>>8)], where x=-1..(nTbH*intraPredAngle)>>5 (8-131) ref[((nTbH*intraPredAngle)>>5)-1]=ref[(nTbH*intraPredAngle)>>5] (8-132) ref[nTbW+1+refIdx]=ref[nTbW+refIdx] (8-133) -otherwise, ref[x]=p[-1-refIdx+x][-1-refIdx], where x=nTbW+1+refIdx..refW+refIdx(8-134) ref[-1]=ref[0] (8-135) The additional sample ref[refW+refIdx+x] of -x=1..(Max(1,nTbW / nTbH)*refIdx+1) is derived as follows: ref[refW+refIdx+x]=p[-1+refW][-1-refIdx] (8-136) 2. The value of the predicted sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: -The index variable iIdx and the multiplication factor iFact are derived as follows: iIdx=((y+1+refIdx)*intraPredAngle)>>5+refIdx (8-137) iFact=((y+1+refIdx)*intraPredAngle)&31(8-138) - If fourTapFlag is equal to 1, the following applies: The interpolation filter coefficients fT[j] for -j=0..3 are derived as follows: fT[j]=filterFlag? fG[iFact][j]:fC[iFact][j](8-139) -The value of the predicted sample predSamples[x][y] is derived as follows: - Otherwise (fourTapFlag is not equal to 1), depending on the value of iFact, the following applies: - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=((32-iFact)*ref[x+iIdx+1]+iFact*ref[x+iIdx+2]+16)>>5 (8-141) Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=ref[x+iIdx+1] (8-142) Otherwise (predModeIntra is less than 34), apply the following ordered steps: 1. The reference sample array ref[x] is specified as follows: -Apply the following: ref[x]=p[-1-refIdx][-1-refIdx+x], where x=0..nTbH+refIdx (8-143) - If intraPredAngle is less than 0, the main reference sample array is extended as follows: -When (nTbW*intraPredAngle)>>5 is less than -1, ref[x]=p[-1-refIdx+((x*invAngle+128)>>8)][-1-refIdx], where x=-1..(nTbW*intraPredAngle)>>5 (8-144) ref[((nTbW*intraPredAngle)>>5)-1]=ref[(nTbW*intraPredAngle)>>5] (8-145) ref[nTbG+1+refIdx]=ref[nTbH+refIdx] (8-146) -otherwise, ref[x]=p[-1-refIdx][-1-refIdx+x], where x=nTbH+1+refIdx..refH+refIdx(8-147) ref[-1]=ref[0] (8-148) The additional sample ref[refH+refIdx+x] with -x=1..(Max(1,nTbW / nTbH)*refIdx+1) is derived as follows: ref[refH+refIdx+x]=p[-1+refH][-1-refIdx] (8-149) 2. The value of the predicted sample predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: -The index variable iIdx and the multiplication factor iFact are derived as follows: iIdx=((x+1+refIdx)*intraPredAngle)>>5 (8-150) iFact=((x+1+refIdx)*intraPredAngle)&31 (8-151) - If fourTapFlag is equal to 1, the following applies: The interpolation filter coefficients fT[j] for -j=0..3 are derived as follows: fT[j]=filterFlag? fG[iFact][j]:fC[iFact][j] (8-152) -The value of the predicted sample predSamples[x][y] is derived as follows: - Otherwise (fourTapFlag is not equal to 1), depending on the value of iFact, the following applies: - If iFact is not equal to 0, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=((32-iFact)*ref[y+iIdx+1]+iFact*ref[y+iIdx+2]+16)>>5 (8-154) Otherwise, the value of the predicted sample predSamples[x][y] is derived as follows: predSamples[x][y]=ref[y+iIdx+1]

[0267] Fig.19 1 is a schematic diagram of a network device 1300 (e.g., an encoding device) according to an embodiment of the present invention. The network device 1300 is suitable for implementing the disclosed embodiments as described herein. The network device 1300 includes: an inlet port 1310 and a receiver unit (receiver unit, referred to as Rx) 1320, for receiving data; a processor, a logic unit or a central processing unit (central processing unit, referred to as CPU) 1330, for processing data; a transmitter unit (transmitter unit, referred to as Tx) 1340 and an outlet port 1350, for transmitting data; a memory 1360, for storing data. The network device 1300 may also include an optical-to-electrical (OE) component and an electrical-to-optical (EO) component coupled to the inlet port 1310, the receiver unit 1320, the transmitter unit 1340 and the outlet port 1350, for the exit or entrance of optical or electrical signals.

[0268] The processor 1330 is implemented by hardware and software. The processor 1330 can be implemented as one or more CPU chips, cores (e.g., multi-core processors), field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), and / or digital signal processors (DSPs). The processor 1330 communicates with the input port 1310, the receiver unit 1320, the transmitter unit 1340, the output port 1350, and the memory 1360. The processor 1330 includes a coding module 1370. The coding module 1370 implements the above-mentioned disclosed embodiments. For example, the coding module 1370 implements, processes, prepares, or provides various networking functions. Therefore, the inclusion of the coding module 1370 provides substantial improvements to the functions of the network device 1300 and implements the conversion of the network device 1300 to different states. Alternatively, the coding module 1370 is implemented as instructions stored in the memory 1360 and executed by the processor 1330.

[0269] The memory 1360 includes one or more disks, tape drives, and solid-state hard disks, and can be used as an overflow data storage device to store such programs when such programs are selected for execution, and to store instructions and data read during program execution. The memory 1360 can be volatile and / or non-volatile, and can be a read-only memory (ROM), a random access memory (RAM), a ternary content-addressable memory (TCAM), and / or a static random-access memory (SRAM).

[0270] A decoder is provided, comprising a processing circuit for executing any of the above methods.

[0271] In the present invention, a computer program product is provided. The computer program product includes program codes for executing any of the above methods.

[0272] In the present invention, a decoder for decoding video data is provided, the decoder comprising: one or more processors; and a non-transitory computer-readable storage medium, coupled to the processor and storing a program to be executed by the processor, wherein the program configures the decoder to perform any of the above methods when executed by the processor.

[0273] The following describes a network device suitable for implementing the disclosed embodiments described herein. The network device includes: an input port and a receiver unit (receiver unit, referred to as Rx) for receiving data; a processor, a logic unit or a central processing unit (central processing unit, referred to as CPU) for processing data; a transmitter unit (transmitter unit, referred to as Tx) and an output port for transmitting data; a memory for storing data. The network device may also include an optical-to-electrical (OE) component and an electrical-to-optical (EO) component coupled to the input port, the receiver unit, the transmitter unit and the output port for the exit or entrance of optical or electrical signals.

[0274] The processor is implemented by hardware and software. The processor can be implemented as one or more CPU chips, cores (e.g., multi-core processors), field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), and / or digital signal processors (DSPs). The processor communicates with an input port, a receiver unit, a transmitter unit, an output port, and a memory. The processor includes a coding module. The coding module implements the above-mentioned disclosed embodiments. For example, the coding module implements, processes, prepares, or provides various networking functions. Therefore, the inclusion of the coding module provides substantial improvements to the functions of the network device and enables the conversion of the network device to different states. Alternatively, the coding module is implemented as instructions stored in the memory and executed by the processor.

[0275] Memory includes one or more disks, tape drives, and solid-state drives, and can be used as an overflow data storage device to store programs when such programs are selected for execution, and to store instructions and data read during program execution. Memory can be volatile and / or non-volatile, and can be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random-access memory (SRAM).

[0276] Fig. 201 is a block diagram of an apparatus 1500 that can be used to implement various embodiments. The apparatus 1500 can be as follows: Figure 1 The source device 12 shown, or Figure 2 The video encoder 20 shown, or Figure 1 The destination device 14 shown, or Figure 3 The video decoder 30 shown. In addition, the device 1500 can carry one or more of the described elements. In some embodiments, the device 1500 is equipped with one or more input / output devices, such as a speaker, a microphone, a mouse, a touch screen, a keypad, a keyboard, a printer, a display, etc. The device 1500 may include one or more central processing units (CPUs) 1510, a memory 1520, a mass storage 1530, a video adapter 1540, and an I / O interface 1560 connected to a bus. The bus is one or more of several bus architectures of any type including a memory bus or a memory controller, a peripheral bus, a video bus, etc.

[0277] CPU 1510 may include any type of electronic data processor. Memory 1520 may include any type of system memory, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), read-only memory (ROM), or a combination thereof. In an embodiment, memory 1520 may include ROM used at boot time and DRAM used to store programs and data when executing programs. In an embodiment, memory 1520 is non-transient. Mass storage 1530 includes any type of storage device that stores data, programs, and other information, and makes the data, programs, and other information accessible via a bus. Mass storage 1530 includes, for example, one or more of a solid state drive, a hard disk drive, a magnetic disk drive, an optical disk drive, and the like.

[0278] The video adapter 1540 and the I / O interface 1560 provide interfaces to couple external input and output devices to the apparatus 1500. For example, the apparatus 1500 can provide a SQL command interface to a client. As shown, examples of input and output devices include a display 1590 coupled to the video adapter 1540 and any combination of a mouse / keyboard / printer 1570 coupled to the I / O interface 1560. Other devices can be coupled to the apparatus 1500, and more or fewer interface cards can be utilized. For example, a serial interface card (not shown) can be used to provide a serial interface for a printer.

[0279] The apparatus 1100 also includes one or more network interfaces 1550, which include wired links such as Ethernet cables, and / or wireless links to access nodes or one or more networks 1580. The network interfaces 1550 allow the apparatus 1500 to communicate with remote units via the networks 1580. For example, the network interfaces 1550 can provide communication to a database. In one embodiment, the apparatus 1500 is coupled to a local area network or a wide area network for data processing and communication with remote devices, such as other processing units, the Internet, remote storage devices, etc.

[0280] The piecewise linear approximation is introduced to calculate the values ​​of the weighting coefficients required to predict the pixels within a given block. On the one hand, compared with the direct weighting coefficient calculation, the piecewise linear approximation can significantly reduce the computational complexity of the distance weighted prediction mechanism; on the other hand, compared with the simplified scheme of the prior art, it helps to obtain more accurate weighting coefficient values.

[0281] Embodiments may be applied to other bidirectional and position-dependent intra prediction techniques (e.g., different modifications of PDPC) as well as mechanisms that blend different parts of a picture using weighting coefficients that depend on the distance from one pixel to another (e.g., some blending methods in image processing).

[0282] Although several embodiments have been provided in the present invention, it should be understood that the disclosed systems and methods may be embodied in many other specific forms without departing from the spirit or scope of the present invention. The examples of the present invention should be considered illustrative rather than restrictive, and the present invention is not limited to the details given in this text. For example, various elements or components may be combined or integrated in another system, or certain features may be omitted or not implemented.

[0283] In addition, the techniques, systems, subsystems, and methods described and illustrated as discrete or independent in various embodiments may be combined or integrated with other systems, modules, techniques, or methods. Other items shown or discussed as coupled or directly coupled or communicating with each other may also be coupled or communicated indirectly via an interface, device, or intermediate component, either electrically, mechanically, or otherwise. Other examples of changes, substitutions, and alterations may be determined and proposed by those skilled in the art.

[0284] The subject matter and operations described in the present invention can be implemented in digital electronic circuits, or in computer software, firmware or hardware (including the structures disclosed in the present invention and their structural equivalents), or in a combination of one or more of them. The subject matter described in the present invention can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on a computer storage medium to be executed by a data processing device or to control the operation of the data processing device. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagation signal such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device. Computer storage media, such as computer-readable media, can be or be included in a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. In addition, although a computer storage medium is not a propagation signal, a computer storage medium can be a source or destination of computer program instructions encoded on an artificially generated propagation signal. A computer storage medium can also be or be included in one or more separate physical and / or non-transient components or media (e.g., multiple CDs, disks or other storage devices).

[0285] In some implementations, the operations described in the present invention may be implemented as a hosted service provided on a server in a cloud computing network. For example, computer-readable storage media may be logically grouped and accessed in a cloud computing network. Servers within a cloud computing network may include a cloud computing platform for providing cloud-based services. The terms "cloud," "cloud computing," and "cloud-based" may be used interchangeably as appropriate without departing from the scope of the present invention. A cloud-based service may be a hosted service provided by a server and transmitted to a client platform over a network to enhance, supplement, or replace an application program executed locally on a client computer. Circuits may use cloud-based services to quickly receive software upgrades, applications, and other resources that may otherwise take a long time to transmit to the circuit.

[0286] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed for execution on one or more computers located at one site or distributed over multiple sites and interconnected by a communications network.

[0287] The processes and logic flows described in the present invention can be performed by one or more programmable processors that execute one or more computer programs to perform actions by operating on input data and generating output. The processes and logic flows can also be performed by special-purpose logic circuits, and the apparatus can also be implemented as special-purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application-specific integrated circuits).

[0288] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more processors in any kind of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for performing actions according to instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more large-capacity storage devices for storing data, such as a magnetic disk, a magneto-optical disk, or an optical disk, or be operably coupled to receive data from one or more large-capacity storage devices for storing data and / or transfer data to one or more large-capacity storage devices for storing data. However, a computer does not require such a device. In addition, a computer can be embedded in other devices, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name a few. Devices suitable for storing computer program instructions and data include all forms of nonvolatile memory, media and storage devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.

[0289] Although the present invention includes many specific implementation details, these should not be understood as limitations on the scope of any implementation or the content claimed, but should be understood as descriptions of specific features of a particular implementation. Certain features described in the context of separate implementations in the present invention may also be implemented in combination in a single implementation. Conversely, the various features described in the context of a single implementation may also be implemented in multiple implementations or in any suitable sub-combination. In addition, although the features may be described as working in certain combinations and even initially claimed, in some cases, one or more features from the claimed combination may be deleted from the combination, and the claimed combination may be directed to a variant of a sub-combination or a sub-combination.

[0290] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a continuous order, or that all of the operations shown be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, in the above-described implementations, the separation of various system components should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged in multiple software products.

[0291] Thus, specific implementations of the subject matter have been described. Other implementations are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.

[0292] Although several embodiments have been provided in the present invention, it should be understood that the disclosed systems and methods may be embodied in many other specific forms without departing from the spirit or scope of the present invention. The examples of the present invention should be considered illustrative rather than restrictive, and the present invention is not limited to the details given in this text. For example, various elements or components may be combined or integrated in another system, or certain features may be omitted or not implemented.

[0293] In addition, without departing from the scope of the present invention, the techniques, systems, subsystems and methods described and illustrated as discrete or separate in various embodiments may be combined or integrated with other systems, modules, techniques or methods. Other items shown or discussed as coupled or directly coupled or communicating with each other may also be coupled or communicated indirectly via an interface, device or intermediate component, either electrically, mechanically or otherwise. Other variations, substitutions and altered examples may be determined by those skilled in the art without departing from the spirit and scope disclosed herein. Definition of abbreviations and terms JEM Joint Exploration Model (software code base for future video coding exploration) JVET Joint Video Expert Team LUT Lookup Table QT Quadtree QTBT Quadtree plus Binary Tree RDO Rate-Distortion Optimization ROM Read Only Memory VTM VVC test model VVC Versatile Video Coding, a standardization project developed by JVET CTU / CTB Coding Tree Unit / Coding Tree Block CU / CB Coding Unit / Coding Block PU / PB prediction unit / prediction block TU / TB Transformation Unit / Transformation Block HEVC High Efficiency Video Coding

Claims

1. A coding method, It is characterized in that The method comprises: Performing intra-prediction processing on the current block according to an intra-prediction mode of the current block to generate a prediction block, the intra-prediction processing including reference sample filtering or interpolation filtering applied to reference samples in one or more reference blocks, wherein the intra-prediction mode of the current block is an angular mode among a plurality of intra-prediction modes, the plurality of intra-prediction modes including a planar mode (index 0), a DC mode (index 1), and angular modes with indices of 2 to 66, and the intra-prediction mode of the current block is classified into one of the following groups: A. Vertical or horizontal mode; B. Diagonal pattern; C. Other angle modes; If the intra prediction mode of the current block is classified as belonging to group B, performing the reference sample filtering on the reference sample; If the intra prediction mode of the current block is classified as belonging to group C, performing the interpolation filtering on the reference sample; An intra-frame prediction parameter indicating an intra-frame prediction mode of the current block is encoded to obtain a code stream.

2. The method according to claim 1, It is characterized in that If the intra prediction mode of the current block is classified as belonging to group A, the reference sample filtering and the interpolation filtering are not performed on the reference sample.

3. The method according to claim 1 or 2, It is characterized in that The interpolation filter used for performing the interpolation filtering on the reference sample is a Gaussian filter or a cubic filter.

4. The method according to claim 3, It is characterized in that The interpolation filter is a 4-tap filter.

5. The method according to any one of claims 1 to 4, It is characterized in that The reference sample filter used for performing the reference sample filtering on the reference samples is a 3-tap filter.

6. The method according to claim 5, It is characterized in that The reference sample filter is a 3-tap filter of [1, 2, 1].

7. The method according to any one of claims 1 to 6, It is characterized in that Group B includes intra prediction modes whose values ​​of the intra prediction angle parameters are non-zero multiples of 32.

8. The method according to any one of claims 1 to 7, It is characterized in that Group B includes one or all of the intra prediction modes indexed as [2, 34, 66].

9. A decoding method, It is characterized in that The method comprises: Decoding the bitstream to obtain an intra-frame prediction parameter for indicating an intra-frame prediction mode of a current block; Determining an intra-frame prediction mode of the current block according to the intra-frame prediction parameters; Performing intra-prediction processing on the current block according to the intra-prediction mode of the current block to generate a prediction block, the intra-prediction processing including reference sample filtering or interpolation filtering applied to reference samples in one or more reference blocks, wherein the intra-prediction mode of the current block is an angular mode among a plurality of intra-prediction modes, the plurality of intra-prediction modes including a planar mode (index 0), a DC mode (index 1), and angular modes with indices of 2 to 66, and the intra-prediction mode of the current block is classified into one of the following groups: A. Vertical or horizontal mode; B. Diagonal pattern; C. Other angle modes; If the intra prediction mode of the current block is classified as belonging to group B, performing the reference sample filtering on the reference sample; If the intra prediction mode of the current block is classified as belonging to group C, the interpolation filtering is performed on the reference samples.

10. The method according to claim 9, It is characterized in that If the intra prediction mode of the current block is classified as belonging to group A, the reference sample filtering and the interpolation filtering are not performed on the reference sample.

11. The method according to claim 9 or 10, It is characterized in that The interpolation filter used for performing the interpolation filtering on the reference sample is a Gaussian filter or a cubic filter.

12. The method according to claim 11, It is characterized in that The interpolation filter is a 4-tap filter.

13. The method according to any one of claims 9 to 12, It is characterized in that The reference sample filter used for performing the reference sample filtering on the reference samples is a 3-tap filter.

14. The method according to claim 13, It is characterized in that The reference sample filter is a 3-tap filter of [1, 2, 1].

15. The method according to any one of claims 9 to 14, It is characterized in that Group B includes intra prediction modes whose values ​​of the intra prediction angle parameters are non-zero multiples of 32.

16. The method according to any one of claims 9 to 15, It is characterized in that Group B includes one or all of the intra prediction modes indexed as [2, 34, 66].

17. An encoding device, It is characterized in that Comprising a processing circuit for performing the encoding method as claimed in any one of claims 1 to 8.

18. A decoding device, It is characterized in that Comprising a processing circuit for performing a decoding method as claimed in any one of claims 9 to 16.

19. A code stream, It is characterized in that The code stream is obtained by the encoding method according to any one of claims 1-8.

20. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a code stream obtained by the encoding method according to any one of claims 1-8.

21. A content distribution server, It is characterized in that The content distribution server comprises a memory and a transmitter, wherein the memory is used to store a code stream obtained by the encoding method according to any one of claims 1 to 8, and the transmitter is used to send the code stream.

22. A storage device, It is characterized in that The invention comprises a memory and a receiver, wherein the memory device is used to store a code stream obtained by the encoding method according to any one of claims 1 to 8, and the receiver is used to receive the code stream.

23. A computer program product comprising program code, It is characterized in that When the program code is executed on a computer or a processor, it is used to perform the method according to any one of claims 1 to 16.

24. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a program code, and when the program code is executed on a computer or a processor, it is used to execute the method according to any one of claims 1 to 16.