WO2023183366A1 - Planar mode improvement for intra prediction - Google Patents

Planar mode improvement for intra prediction Download PDF

Info

Publication number
WO2023183366A1
WO2023183366A1 PCT/US2023/015869 US2023015869W WO2023183366A1 WO 2023183366 A1 WO2023183366 A1 WO 2023183366A1 US 2023015869 W US2023015869 W US 2023015869W WO 2023183366 A1 WO2023183366 A1 WO 2023183366A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
block
samples
reference sample
video block
Prior art date
Application number
PCT/US2023/015869
Other languages
French (fr)
Inventor
Ning Yan
Yi-Wen Chen
Xiaoyu XIU
Wei Chen
Che-Wei Kuo
Hong-Jheng Jhu
Han GAO
Bing Yu
Original Assignee
Beijing Dajia Internet Information Technology Co., Ltd.
Wang, Xianglin
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from PCT/US2022/050696 external-priority patent/WO2023091780A1/en
Application filed by Beijing Dajia Internet Information Technology Co., Ltd., Wang, Xianglin filed Critical Beijing Dajia Internet Information Technology Co., Ltd.
Publication of WO2023183366A1 publication Critical patent/WO2023183366A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • This application is related to video coding and compression. More specifically, this application relates to video processing apparatuses and methods for intra prediction with reference sample filters.
  • Digital video is supported by a variety of electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video gaming consoles, smart phones, video teleconferencing devices, video streaming devices, etc.
  • the electronic devices transmit and receive or otherwise communicate digital video data across a communication network, and/or store the digital video data on a storage device. Due to a limited bandwidth capacity of the communication network and limited memory' resources of the storage device, video coding may be used to compress the video data according to one or more video coding standards before it is communicated or stored.
  • video coding standards include Versatile Video Coding (VVC), Joint Exploration test Model (JEM), High-Efficiency Video Coding (HEVC/H.265), Advanced Video Coding (AVC/H.264), Moving Picture Expert Group (MPEG) coding, or the like.
  • Video coding generally utilizes prediction methods (e.g., inter-prediction, intra-prediction, or the like) that take advantage of redundancy inherent in the video data.
  • Video coding aims to compress video data into a form that uses a lower bit rate, while avoiding or minimizing degradations to video quality.
  • SUMMARY [0004] Implementations of the disclosure provide a video processing apparatus and method for performing intra prediction on a video block.
  • the video processing method may include receiving, by a processor, reference samples from a video frame of a video comprising the video block.
  • the video processing method may further include determining, by the processor, a reference sample filter based on a size of each video block.
  • the reference sample filter is among a plurality of reference sample filters each derived for a different video block size.
  • the video processing method may also include applying, by the processor, the determined reference sample filter to the received reference samples.
  • the video processing method may additionally include performing, by the processor, the intra prediction on the video block using the filtered reference samples.
  • Implementations of the present disclosure also provide a video processing apparatus for performing intra prediction on a video block.
  • the video processing apparatus may include a memory and one or more processors coupled to the memory.
  • the one or more processors may be configured to receive reference samples from a video frame of a video comprising the video block.
  • the one or more processors may be further configured to determine a reference sample filter based on a size of each video block.
  • the reference sample filter is among a plurality of reference sample filters each derived for a different video block size.
  • the one or more processors may also be configured to apply the determined reference sample filter to the received reference samples.
  • the one or more processors may also be configured to perform the intra prediction on the video block using the filtered reference samples.
  • Implementations of the present disclosure further provide a non-transitory computer- readable storage medium having stored therein instructions which, when executed by one or more processors, cause the one or more processors to perform a video processing method for performing intra prediction on a video block.
  • the video processing method may include receiving reference samples from a video frame of a video comprising the video block.
  • the video processing method may further include determining a reference sample filter based on a size of each video block.
  • the reference sample filter is among a plurality of reference sample filters each derived for a different video block size.
  • the video processing method may also include applying the determined reference sample filter to the received reference samples.
  • the video processing method may additionally include performing the intra prediction on the video block using the filtered reference samples.
  • FIG.1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks in accordance with some implementations of the present disclosure.
  • FIG.2 is a block diagram illustrating an exemplary video encoder in accordance with some implementations of the present disclosure.
  • FIG.3 is a block diagram illustrating an exemplary video decoder in accordance with some implementations of the present disclosure.
  • FIGS. 4A through 4E are graphical representations illustrating how a frame is recursively partitioned into multiple video blocks of different sizes and shapes in accordance with some implementations of the present disclosure.
  • FIG.5 illustrates a diagram of intra modes in accordance with some implementations of the present disclosure.
  • FIGS. 6A and 6B illustrate exemplary reference samples for wide-angular intra prediction in accordance with some implementations of the present disclosure.
  • FIG. 7 illustrates an exemplary discontinuity in case of wide-angle intra prediction direction in accordance with some implementations of the present disclosure.
  • FIG. 1 illustrates an exemplary discontinuity in case of wide-angle intra prediction direction in accordance with some implementations of the present disclosure.
  • FIG. 8 illustrates an interpolation of a sample in a current video block for intra prediction in planar mode in accordance with some implementations of the present disclosure.
  • FIG. 9 is a block diagram illustrating an exemplary sample prediction process in accordance with some implementations of the present disclosure.
  • FIG.10 illustrates a diagram of intra prediction along an interpolation direction and the perpendicular interpolation direction through a sample of the video block in accordance with some implementations of the present disclosure.
  • FIG. 11 illustrates a diagram of intra prediction using a block-level interpolation direction to interpolate samples in a video block in accordance with some implementations of the present disclosure.
  • FIG.12 illustrates a diagram of intra prediction using fractional reference samples to interpolate a sample in a video block in accordance with some implementations of the present disclosure.
  • FIG. 13 illustrates a diagram of intra prediction using second order gradients of reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure.
  • FIG. 14 illustrates a diagram of intra prediction using second order gradients of fractional reference samples generated based on the reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure.
  • FIG. 13 illustrates a diagram of intra prediction using second order gradients of fractional reference samples generated based on the reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure.
  • FIG. 14 illustrates a diagram of intra prediction using second order gradients of fractional reference samples generated based on the reconstructed samples in neighboring video blocks to interpol
  • FIG. 15 illustrates a diagram of intra prediction using different sample-specific interpolation directions to interpolate samples in a video block in accordance with some implementations of the present disclosure.
  • FIG.16 is a flow chart of an exemplary method for performing intra prediction on a video block in accordance with some implementations of the present disclosure.
  • FIG. 17 is an illustration of exemplary adaptive reference sample filtering in accordance with some implementations of the present disclosure.
  • FIG.18 is an illustration of exemplary derivation of an adaptive reference sample filter using reconstructed samples in accordance with some implementations of the present disclosure.
  • FIG.19 is a flow chart of an exemplary method for performing planar prediction with an adaptive reference sample filter in accordance with some implementations of the present disclosure.
  • FIG.20 is a block diagram illustrating an exemplary block size-based reference sample filtering process in accordance with some implementations of the present disclosure.
  • FIG. 21 is a flow chart of an exemplary method for performing reference sample filtering with block size-based reference sample filters in accordance with some implementations of the present disclosure.
  • FIG. 22 is a flow chart of an exemplary method for training fixed block size-based reference sample filters offline in accordance with some implementations of the present disclosure.
  • FIG.23 is a flow chart of an exemplary method for determining adaptive block size- based reference sample filters in accordance with some implementations of the present disclosure.
  • FIG.25 is a block diagram illustrating a computing environment coupled with a user interface in accordance with some implementations of the present disclosure.
  • DETAILED DESCRIPTION [0034]
  • the system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14.
  • the source device 12 and the destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or the like.
  • the source device 12 and the destination device 14 are equipped with wireless communication capabilities.
  • the destination device 14 may receive the encoded video data to be decoded via a link 16.
  • the link 16 may include any type of communication medium or device capable of forwarding the encoded video data from the source device 12 to the destination device 14.
  • the link 16 may include a communication medium to enable the source device 12 to transmit the encoded video data directly to the destination device 14 in real time.
  • the encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the destination device 14.
  • the communication medium may include any wireless or wired communication medium, such as a Radio Frequency (RF) spectrum or one or more physical transmission lines.
  • RF Radio Frequency
  • the communication medium may form part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet.
  • the communication medium may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from the source device 12 to the destination device 14.
  • the encoded video data may be transmitted from an output interface 22 to a storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the destination device 14 via an input interface 28.
  • the storage device 32 may include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, Digital Versatile Disks (DVDs), Compact Disc Read-Only Memories (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data.
  • the storage device 32 may correspond to a file server or another intermediate storage device that may store the encoded video data generated by the source device 12.
  • the destination device 14 may access the stored video data from the storage device 32 via streaming or downloading.
  • the file server may be any type of computer capable of storing the encoded video data and transmitting the encoded video data to the destination device 14.
  • Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, Network Attached Storage (NAS) devices, or a local disk drive.
  • the destination device 14 may access the encoded video data through any standard data connection, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., Digital Subscriber Line (DSL), cable modem, etc.), or any combination thereof that is suitable for accessing encoded video data stored on a file server.
  • a wireless channel e.g., a Wireless Fidelity (Wi-Fi) connection
  • a wired connection e.g., Digital Subscriber Line (DSL), cable modem, etc.
  • the transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both.
  • the source device 12 includes a video source 18, a video encoder 20, and the output interface 22.
  • the video source 18 may include a source such as a video capturing device, e.g., a video camera, a video archive containing previously captured video, a video feeding interface to receive video data from a video content provider, and/or a computer graphics system for generating computer graphics data as the source video, or a combination of such sources.
  • a video capturing device e.g., a video camera, a video archive containing previously captured video, a video feeding interface to receive video data from a video content provider, and/or a computer graphics system for generating computer graphics data as the source video, or a combination of such sources.
  • the source device 12 and the destination device 14 may include camera phones or video phones.
  • the implementations described in the present disclosure may be applicable to video coding in general, and may be applied to wireless and/or wired applications.
  • the captured, pre-captured, or computer-generated video may be encoded by the video encoder 20.
  • the encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12.
  • the encoded video data may also (or alternatively) be stored onto the storage device 32 for later access by the destination device 14 or other devices, for decoding and/or playback.
  • the output interface 22 may further include a modem and/or a transmitter.
  • the destination device 14 includes the input interface 28, a video decoder 30, and a display device 34.
  • the input interface 28 may include a receiver and/or a modem and receive the encoded video data over the link 16.
  • the encoded video data communicated over the link 16, or provided on the storage device 32 may include a variety of syntax elements generated by the video encoder 20 for use by the video decoder 30 in decoding the video data.
  • the destination device 14 may include the display device 34, which can be an integrated display device and an external display device that is configured to communicate with the destination device 14.
  • the display device 34 displays the decoded video data for a user, and may include any of a variety of display devices such as a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device.
  • LCD Liquid Crystal Display
  • OLED Organic Light Emitting Diode
  • the video encoder 20 and the video decoder 30 may operate according to proprietary or industry standards, such as VVC, HEVC, MPEG-4, Part 10, AVC, or extensions of such standards.
  • the present disclosure is not limited to a specific video encoding/decoding standard and may be applicable to other video encoding/decoding standards. It is generally contemplated that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that the video decoder 30 of the destination device 14 may be configured to decode video data according to any of these current or future standards.
  • the video encoder 20 and the video decoder 30 each may be implemented as any of a variety of suitable encoder and/or decoder circuitry, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof.
  • DSPs Digital Signal Processors
  • ASICs Application Specific Integrated Circuits
  • FPGAs Field Programmable Gate Arrays
  • an electronic device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding/decoding operations disclosed in the present disclosure.
  • FIG. 2 is a block diagram illustrating an exemplary video encoder 20 in accordance with some implementations described in the present application.
  • the video encoder 20 may perform intra and inter predictive coding of video blocks within video frames. Intra predictive coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter predictive coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence.
  • the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a Decoded Picture Buffer (DPB) 64, a summer 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56.
  • the prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra prediction processing unit 46, and an intra Block Copy (BC) unit 48.
  • the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and a summer 62 for video block reconstruction.
  • An in-loop filter 63 such as a deblocking filter, may be positioned between the summer 62 and the DPB 64 to filter block boundaries to remove block artifacts from reconstructed video data.
  • Another in-loop filter such as an SAO filter, Cross Component Sample Adaptive Offset (CCSAO) filter, and/or Adaptive in-Loop Filter (ALF), may also be used in addition to the deblocking filter to filter an output of the summer 62.
  • SAO SAO filter
  • CCSAO Cross Component Sample Adaptive Offset
  • ALF Adaptive in-Loop Filter
  • the present application is not limited to the embodiments described herein, and instead, the application may be applied to a situation where an offset is selected for any of a luma component, a Cb chroma component and a Cr chroma component according to any other of the luma component, the Cb chroma component and the Cr chroma component to modify said any component based on the selected offset.
  • a first component mentioned herein may be any of the luma component, the Cb chroma component and the Cr chroma component
  • a second component mentioned herein may be any other of the luma component, the Cb chroma component and the Cr chroma component
  • a third component mentioned herein may be a remaining one of the luma component, the Cb chroma component and the Cr chroma component.
  • the in- loop filters may be omitted, and the decoded video block may be directly provided by the summer 62 to the DPB 64.
  • the video encoder 20 may take the form of a fixed or programmable hardware unit or may be divided among one or more of the illustrated fixed or programmable hardware units.
  • the video data memory 40 may store video data to be encoded by the components of the video encoder 20.
  • the video data in the video data memory 40 may be obtained, for example, from the video source 18 as shown in FIG.1.
  • the DPB 64 is a buffer that stores reference video data (for example, reference frames or pictures) for use in encoding video data by the video encoder 20 (e.g., in intra or inter predictive coding modes).
  • the video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices.
  • the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.
  • the partition unit 45 within the prediction processing unit 41 partitions the video data into video blocks.
  • This partitioning may also include partitioning a video frame into slices, tiles (for example, sets of video blocks), or other larger Coding Units (CUs) according to predefined splitting structures such as a Quad-Tree (QT) structure associated with the video data.
  • the video frame is or may be regarded as a two- dimensional array or matrix of samples with sample values.
  • a sample in the array may also be referred to as a pixel or a pel.
  • a number of samples in horizontal and vertical directions (or axes) of the array or picture define a size and/or a resolution of the video frame.
  • the video frame may be divided into multiple video blocks by, for example, using QT partitioning.
  • the video block again is or may be regarded as a two-dimensional array or matrix of samples with sample values, although of smaller dimension than the video frame.
  • a number of samples in horizontal and vertical directions (or axes) of the video block define a size of the video block.
  • the video block may further be partitioned into one or more block partitions or sub-blocks (which may form again blocks) by, for example, iteratively using QT partitioning, Binary-Tree (BT) partitioning, Triple- Tree (TT) partitioning or any combination thereof.
  • BT Binary-Tree
  • TT Triple- Tree partitioning or any combination thereof.
  • block or “video block” as used herein may be a portion, in particular a rectangular (square or non- square) portion, of a frame or a picture.
  • the block or video block may be or correspond to a Coding Tree Unit (CTU), a CU, a Prediction Unit (PU), or a Transform Unit (TU), and/or may be or correspond to a corresponding block, e.g., a Coding Tree Block (CTB), a Coding Block (CB), a Prediction Block (PB), or a Transform Block (TB).
  • CTB Coding Tree Block
  • CB Coding Block
  • PB Prediction Block
  • TB Transform Block
  • the block or video block may be or correspond to a sub-block of a CTB, a CB, a PB, a TB, etc.
  • the prediction processing unit 41 may select one of a plurality of possible predictive coding modes, such as one of a plurality of intra predictive coding modes or one of a plurality of inter predictive coding modes, for the current video block based on error results (e.g., coding rate and the level of distortion).
  • the prediction processing unit 41 may provide the resulting intra or inter prediction coded block (e.g., a predictive block) to the summer 50 to generate a residual block and to the summer 62 to reconstruct the encoded block for use as part of a reference frame subsequently.
  • the prediction processing unit 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partition information, and other such syntax information to the entropy encoding unit 56.
  • the intra prediction processing unit 46 within the prediction processing unit 41 may perform intra predictive coding of the current video block relative to one or more neighbor blocks in the same frame as the current block to be coded to provide spatial prediction.
  • the motion estimation unit 42 and the motion compensation unit 44 within the prediction processing unit 41 perform inter predictive coding of the current video block relative to one or more predictive blocks in one or more reference frames to provide temporal prediction.
  • the video encoder 20 may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data.
  • the motion estimation unit 42 determines the inter prediction mode for a current video frame by generating a motion vector, which indicates the displacement of a video block within the current video frame relative to a predictive block within a reference frame, according to a predetermined pattern within a sequence of video frames.
  • Motion estimation performed by the motion estimation unit 42, may be a process of generating motion vectors, which may estimate motion for video blocks.
  • a motion vector for example, may indicate the displacement of a video block within a current video frame or picture relative to a predictive block within a reference frame.
  • the predetermined pattern may designate video frames in the sequence as P frames or B frames.
  • the intra BC unit 48 may determine vectors, e.g., block vectors, for intra BC coding in a manner similar to the determination of motion vectors by the motion estimation unit 42 for inter prediction, or may utilize the motion estimation unit 42 to determine the block vectors.
  • a predictive block for the video block may be or may correspond to a block or a reference block of a reference frame that is deemed as closely matching the video block to be coded in terms of pixel difference, which may be determined by Sum of Absolute Difference (SAD), Sum of Square Difference (SSD), or other difference metrics.
  • the video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in the DPB 64.
  • the video encoder 20 may interpolate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision.
  • the motion estimation unit 42 calculates a motion vector for a video block in an inter prediction coded frame by comparing the position of the video block to the position of a predictive block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in the DPB 64.
  • Motion compensation performed by the motion compensation unit 44, may involve fetching or generating the predictive block based on the motion vector determined by the motion estimation unit 42.
  • the motion compensation unit 44 may locate a predictive block to which the motion vector points in one of the reference frame lists, retrieve the predictive block from the DPB 64, and forward the predictive block to the summer 50.
  • the summer 50 then forms a residual block of pixel difference values by subtracting pixel values of the predictive block provided by the motion compensation unit 44 from the pixel values of the current video block being coded.
  • the pixel difference values forming the residual block may include luma or chroma component differences or both.
  • the motion compensation unit 44 may also generate syntax elements associated with the video blocks of a video frame for use by the video decoder 30 in decoding the video blocks of the video frame.
  • the syntax elements may include, for example, syntax elements defining the motion vector used to identify the predictive block, any flags indicating the prediction mode, or any other syntax information described herein. It is noted that the motion estimation unit 42 and the motion compensation unit 44 may be integrated together, which are illustrated separately for conceptual purposes in FIG.2.
  • the intra BC unit 48 may generate vectors and fetch predictive blocks in a manner similar to that described above in connection with the motion estimation unit 42 and the motion compensation unit 44, but with the predictive blocks being in the same frame as the current block being coded and with the vectors being referred to as block vectors as opposed to motion vectors.
  • the intra BC unit 48 may determine an intra- prediction mode to use to encode a current block.
  • the intra BC unit 48 may encode a current block using various intra-prediction modes, e.g., during separate encoding passes, and test their performance through rate-distortion analysis.
  • the intra BC unit 48 may select, among the various tested intra-prediction modes, an appropriate intra-prediction mode to use and generate an intra-mode indicator accordingly.
  • the intra BC unit 48 may calculate rate-distortion values using a rate-distortion analysis for the various tested intra-prediction modes, and select the intra-prediction mode having the best rate-distortion characteristics among the tested modes as the appropriate intra-prediction mode to use.
  • Rate-distortion analysis generally determines an amount of distortion (or error) between an encoded block and an original, unencoded block that was encoded to produce the encoded block, as well as a bitrate (i.e., a number of bits) used to produce the encoded block.
  • Intra BC unit 48 may calculate ratios from the distortions and rates for the various encoded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
  • the intra BC unit 48 may use the motion estimation unit 42 and the motion compensation unit 44, in whole or in part, to perform such functions for Intra BC prediction according to the implementations described herein.
  • a predictive block may be a block that is deemed as closely matching the block to be coded, in terms of pixel difference, which may be determined by SAD, SSD, or other difference metrics, and identification of the predictive block may include calculation of values for sub-integer pixel positions.
  • the video encoder 20 may form a residual block by subtracting pixel values of the predictive block from the pixel values of the current video block being coded, forming pixel difference values.
  • the pixel difference values forming the residual block may include both luma and chroma component differences.
  • the intra prediction processing unit 46 may intra-predict a current video block, as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra block copy prediction performed by the intra BC unit 48, as described above. In particular, the intra prediction processing unit 46 may determine an intra prediction mode to use to encode a current block.
  • the intra prediction processing unit 46 may encode a current block using various intra prediction modes, e.g., during separate encoding passes, and the intra prediction processing unit 46 (or a mode selection unit, in some examples) may select an appropriate intra prediction mode to use from the tested intra prediction modes.
  • the intra prediction processing unit 46 may provide information indicative of the selected intra-prediction mode for the block to the entropy encoding unit 56.
  • the entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in a bitstream.
  • the summer 50 forms a residual block by subtracting the predictive block from the current video block.
  • the residual video data in the residual block may be included in one or more TUs and is provided to the transform processing unit 52.
  • the transform processing unit 52 transforms the residual video data into transform coefficients using a transform, such as a Discrete Cosine Transform (DCT) or a conceptually similar transform.
  • DCT Discrete Cosine Transform
  • the transform processing unit 52 may send the resulting transform coefficients to the quantization unit 54.
  • the quantization unit 54 quantizes the transform coefficients to further reduce the bit rate.
  • the quantization process may also reduce the bit depth associated with some or all of the coefficients.
  • the degree of quantization may be modified by adjusting a quantization parameter.
  • the quantization unit 54 may then perform a scan of a matrix including the quantized transform coefficients.
  • the entropy encoding unit 56 may perform the scan. [0061] Following quantization, the entropy encoding unit 56 may use an entropy encoding technique to encode the quantized transform coefficients into a video bitstream, e.g., using Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), Syntax-based context-adaptive Binary Arithmetic Coding (SBAC), Probability Interval Partitioning Entropy (PIPE) coding, or another entropy encoding methodology or technique.
  • CAVLC Context Adaptive Variable Length Coding
  • CABAC Context Adaptive Binary Arithmetic Coding
  • SBAC Syntax-based context-adaptive Binary Arithmetic Coding
  • PIPE Probability Interval Partitioning Entropy
  • the encoded bitstream may then be transmitted to the video decoder 30 as shown in FIG.1 or archived in the storage device 32 as shown in FIG.
  • the entropy encoding unit 56 may also use an entropy encoding technique to encode the motion vectors and the other syntax elements for the current video frame being coded.
  • the inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual block in the pixel domain for generating a reference block for prediction of other video blocks. A reconstructed residual block may be generated thereof.
  • the motion compensation unit 44 may generate a motion compensated predictive block from one or more reference blocks of the frames stored in the DPB 64.
  • the motion compensation unit 44 may also apply one or more interpolation filters to the predictive block to calculate sub-integer pixel values for use in motion estimation.
  • the summer 62 adds the reconstructed residual block to the motion compensated predictive block produced by the motion compensation unit 44 to produce a reference block for storage in the DPB 64.
  • the reference block may then be used by the intra BC unit 48, the motion estimation unit 42, and the motion compensation unit 44 as a predictive block to inter predict another video block in a subsequent video frame.
  • FIG. 3 is a block diagram illustrating an exemplary video decoder 30 in accordance with some implementations of the present application.
  • the video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, a summer 90, and a DPB 92.
  • the prediction processing unit 81 further includes a motion compensation unit 82, an intra prediction unit 84, and an intra BC unit 85.
  • the video decoder 30 may perform a decoding process generally reciprocal to the encoding process described above with respect to the video encoder 20 in connection with FIG. 2.
  • the motion compensation unit 82 may generate prediction data based on motion vectors received from the entropy decoding unit 80, while the intra prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from the entropy decoding unit 80.
  • a unit of the video decoder 30 may be tasked to perform the implementations of the present application.
  • the implementations of the present disclosure may be divided among one or more of the units of the video decoder 30.
  • the intra BC unit 85 may perform the implementations of the present application, alone, or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80.
  • the video decoder 30 may not include the intra BC unit 85 and the functionality of intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.
  • the video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by the other components of the video decoder 30.
  • the video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source, such as a camera, via wired or wireless network communication of video data, or by accessing physical data storage media (e.g., a flash drive or hard disk).
  • the video data memory 79 may include a Coded Picture Buffer (CPB) that stores encoded video data from an encoded video bitstream.
  • the DPB 92 of the video decoder 30 stores reference video data for use in decoding video data by the video decoder 30 (e.g., in intra or inter predictive coding modes).
  • the video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including Synchronous DRAM (SDRAM), Magneto-resistive RAM (MRAM), Resistive RAM (RRAM), or other types of memory devices.
  • DRAM dynamic random access memory
  • SDRAM Synchronous DRAM
  • MRAM Magneto-resistive RAM
  • RRAM Resistive RAM
  • the video data memory 79 and the DPB 92 are depicted as two distinct components of the video decoder 30 in FIG.3.
  • the video data memory 79 and the DPB 92 may be provided by the same memory device or separate memory devices.
  • the video data memory 79 may be on-chip with other components of the video decoder 30, or off-chip relative to those components.
  • the video decoder 30 receives an encoded video bitstream that represents video blocks of an encoded video frame and associated syntax elements.
  • the video decoder 30 may receive the syntax elements at the video frame level and/or the video block level.
  • the entropy decoding unit 80 of the video decoder 30 may use an entropy decoding technique to decode the bitstream to obtain quantized coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements.
  • the entropy decoding unit 80 then forwards the motion vectors or intra-prediction mode indicators and other syntax elements to the prediction processing unit 81.
  • the intra prediction unit 84 of the prediction processing unit 81 may generate prediction data for a video block of the current video frame based on a signaled intra-prediction mode and reference data from previously decoded blocks of the current frame.
  • the motion compensation unit 82 of the prediction processing unit 81 produces one or more predictive blocks for a video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80.
  • Each of the predictive blocks may be produced from a reference frame within one of the reference frame lists.
  • the video decoder 30 may construct the reference frame lists, e.g., List 0 and List 1, using default construction techniques based on reference frames stored in the DPB 92.
  • the intra BC unit 85 of the prediction processing unit 81 produces predictive blocks for the current video block based on block vectors and other syntax elements received from the entropy decoding unit 80.
  • the predictive blocks may be within a reconstructed region of the same picture as the current video block processed by the video encoder 20.
  • the motion compensation unit 82 and/or the intra BC unit 85 determines prediction information for a video block of the current video frame by parsing the motion vectors and other syntax elements, and then uses the prediction information to produce the predictive blocks for the current video block being decoded.
  • the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code video blocks of the video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter predictive encoded video block of the frame, inter prediction status for each inter predictive coded video block of the frame, and other information to decode the video blocks in the current video frame.
  • a prediction mode e.g., intra or inter prediction
  • an inter prediction frame type e.g., B or P
  • construction information for one or more of the reference frame lists for the frame e.g., motion vectors for each inter predictive encoded video block of the frame, inter prediction status for each inter predictive coded video block of the frame, and other information to decode the video blocks in the current video frame.
  • the intra BC unit 85 may use some of the received syntax elements, e.g., a flag, to determine that the current video block was predicted using the intra BC mode, construction information of which video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information to decode the video blocks in the current video frame.
  • the motion compensation unit 82 may also perform interpolation using the interpolation filters as used by the video encoder 20 during encoding of the video blocks to calculate interpolated values for sub-integer pixels of reference blocks.
  • the motion compensation unit 82 may determine the interpolation filters used by the video encoder 20 from the received syntax elements and use the interpolation filters to produce predictive blocks.
  • the inverse quantization unit 86 inversely quantizes the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding unit 80 using the same quantization parameter calculated by the video encoder 20 for each video block in the video frame to determine a degree of quantization.
  • the inverse transform processing unit 88 applies an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct the residual blocks in the pixel domain.
  • the summer 90 reconstructs a decoded video block for the current video block by summing the residual block from the inverse transform processing unit 88 and a corresponding predictive block generated by the motion compensation unit 82 and the intra BC unit 85.
  • the decoded video block may also be referred to as a reconstructed block for the current video block.
  • An in-loop filter 91 such as a deblocking filter, SAO filter, CCSAO filter, and/or ALF may be positioned between the summer 90 and the DPB 92 to further process the decoded video block.
  • the in-loop filter 91 may be omitted, and the decoded video block may be directly provided by the summer 90 to the DPB 92.
  • the decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames used for subsequent motion compensation of next video blocks.
  • the DPB 92, or a memory device separate from the DPB 92 may also store decoded video for later presentation on a display device, such as the display device 34 of FIG.1.
  • a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted SL, SCb, and SCr.
  • SL is a two-dimensional array of luma samples.
  • SCb is a two-dimensional array of Cb chroma samples.
  • SCr is a two-dimensional array of Cr chroma samples.
  • a frame may be monochrome and therefore includes only one two-dimensional array of luma samples.
  • the video encoder 20 (or more specifically the partition unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs.
  • a video frame may include an integer number of CTUs arranged consecutively in a raster scan order from left to right and from top to bottom.
  • Each CTU is a largest logical coding unit and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set, such that all the CTUs in a video sequence have the same size being one of 128 ⁇ 128, 64 ⁇ 64, 32 ⁇ 32, and 16 ⁇ 16. But it should be noted that a CTU in the present disclosure is not necessarily limited to a particular size. As shown in FIG.4B, each CTU may include one CTB of luma samples, two corresponding coding tree blocks of chroma samples, and syntax elements used to code the samples of the coding tree blocks.
  • a CTU may include a single coding tree block and syntax elements used to code the samples of the coding tree block.
  • a coding tree block may be an N ⁇ N block of samples.
  • the video encoder 20 may recursively perform tree partitioning such as binary-tree partitioning, ternary-tree partitioning, quad-tree partitioning or a combination thereof on the coding tree blocks of the CTU and divide the CTU into smaller CUs.
  • the 64 ⁇ 64 CTU 400 is first divided into four smaller CUs, each having a block size of 32 ⁇ 32.
  • CU 410 and CU 420 are each divided into four CUs of 16 ⁇ 16 by block size.
  • the two 16 ⁇ 16 CUs 430 and 440 are each further divided into four CUs of 8 ⁇ 8 by block size.
  • FIG.4D depicts a quad-tree data structure illustrating the end result of the partition process of the CTU 400 as depicted in FIG. 4C, each leaf node of the quad-tree corresponding to one CU of a respective size ranging from 32 ⁇ 32 to 8 ⁇ 8.
  • each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of a frame of the same size, and syntax elements used to code the samples of the coding blocks.
  • a CU may include a single coding block and syntax structures used to code the samples of the coding block.
  • quad-tree partitioning depicted in FIGS. 4C and 4D is only for illustrative purposes and one CTU can be split into CUs to adapt to varying local characteristics based on quad/ternary/binary-tree partitions.
  • each quad-tree leaf CU can be further partitioned by a binary and ternary tree structure.
  • FIG. 4E there are multiple possible partitioning types of a coding block having a width W and a height H, i.e., quaternary partitioning, vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, vertical extended ternary partitioning, horizontal ternary partitioning, and horizontal extended ternary partitioning.
  • the video encoder 20 may further partition a coding block of a CU into one or more M ⁇ N PBs.
  • a PB may include a rectangular (square or non-square) block of samples on which the same prediction, inter or intra, is applied.
  • a PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements used to predict the PBs.
  • a PU may include a single PB and syntax structures used to predict the PB.
  • the video encoder 20 may generate predictive luma, Cb, and Cr blocks for luma, Cb, and Cr PBs of each PU of the CU. [0080]
  • the video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks for a PU.
  • the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of the frame associated with the PU. If the video encoder 20 uses inter prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of one or more frames other than the frame associated with the PU.
  • the video encoder 20 may generate a luma residual block for the CU by subtracting the CU’s predictive luma blocks from its original luma coding block such that each sample in the CU’s luma residual block indicates a difference between a luma sample in one of the CU’s predictive luma blocks and a corresponding sample in the CU’s original luma coding block.
  • the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, such that each sample in the CU’s Cb residual block indicates a difference between a Cb sample in one of the CU’s predictive Cb blocks and a corresponding sample in the CU’s original Cb coding block, and each sample in the CU’s Cr residual block may indicate a difference between a Cr sample in one of the CU’s predictive Cr blocks and a corresponding sample in the CU’s original Cr coding block.
  • video encoder 20 may use quad-tree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks respectively.
  • a transform block may include a rectangular (square or non-square) block of samples on which the same transform is applied.
  • a TU of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements used to transform the transform block samples.
  • each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block.
  • the luma transform block associated with the TU may be a sub-block of the CU’s luma residual block.
  • the Cb transform block may be a sub-block of the CU’s Cb residual block.
  • the Cr transform block may be a sub-block of the CU’s Cr residual block.
  • a TU may include a single transform block and syntax structures used to transform the samples of the transform block.
  • Video encoder 20 may apply one or more transforms to a luma transform block of a TU to generate a luma coefficient block for the TU.
  • a coefficient block may be a two-dimensional array of transform coefficients.
  • a transform coefficient may be a scalar quantity.
  • the video encoder 20 may apply one or more transforms to a Cb transform block of a TU to generate a Cb coefficient block for the TU.
  • the video encoder 20 may apply one or more transforms to a Cr transform block of a TU to generate a Cr coefficient block for the TU.
  • the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression.
  • the video encoder 20 may apply an entropy encoding technique to encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream that includes a sequence of bits that form a representation of coded frames and associated data, which is either saved in the storage device 32 or transmitted to the destination device 14. [0085] After receiving a bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct the frames of the video data based at least in part on the syntax elements obtained from the bitstream.
  • the process of reconstructing the video data is generally reciprocal to the encoding process performed by the video encoder 20.
  • the video decoder 30 may perform inverse transforms on the coefficient blocks associated with TUs of a current CU to reconstruct residual blocks associated with the TUs of the current CU.
  • the video decoder 30 also reconstructs the coding blocks of the current CU by adding the samples of the predictive blocks for PUs of the current CU to corresponding samples of the transform blocks of the TUs of the current CU. After reconstructing the coding blocks for each CU of a frame, video decoder 30 may reconstruct the frame.
  • video coding achieves video compression using primarily two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction).
  • Intra Block Copy IBC
  • inter-frame prediction contributes more to the coding efficiency than intra-frame prediction because of the use of motion vectors for predicting a current video block from a reference video block.
  • the motion vector predictor of the current CU is subtracted from the actual motion vector of the current CU to produce a Motion Vector Difference (MVD) for the current CU.
  • MVD Motion Vector Difference
  • a set of rules can be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also known as a “merge list”) for a current CU using those potential candidate motion vectors associated with spatially neighboring CUs and/or temporally co-located CUs of the current CU and then selecting one member from the motion vector candidate list as a motion vector predictor for the current CU.
  • a motion vector candidate list also known as a “merge list”
  • CMV partitioning in Enhanced Compression Model ECM
  • a CTU can be split into CUs by using a quaternary-tree structure (denoted as a coding tree) to adapt to various local characteristics.
  • a decision whether to code a picture area using inter-picture (temporal) or intra-picture (spatial) prediction can be made at the leaf CU level.
  • Each leaf CU can be further split into one, two, or four PUs according to a PU splitting type. Within each PU, the same prediction process can be applied, and the relevant information can be transmitted to the video decoder 30 on a PU basis.
  • the leaf CU After obtaining a residual block by applying the prediction process based on the PU splitting type, the leaf CU can be partitioned into transform units (TUs) according to another quaternary-tree structure similar to the coding tree for the CU.
  • TUs transform units
  • a feature of the HEVC structure includes that it has multiple partition unit concepts such as CU, PU, and TU.
  • a quadtree with a nested multi-type tree using a binary-split or ternary-split structure replaces the concepts of the multiple partition unit types (e.g., CU, PU, TU) in HEVC.
  • the separation of the CU, PU, and TU concepts is removed except as needed for CUs that have a size too large for the maximum transform length, thereby supporting a higher flexibility for CU partition shapes.
  • a CU can have either a square or rectangular shape.
  • a CTU is first partitioned by a quaternary tree (a.k.a. quadtree) structure.
  • the quaternary tree leaf nodes can be further partitioned by a multi-type tree structure.
  • a multi-type tree structure As shown in FIG. 4E, there are various splitting types in the multi-type tree structure, including vertical binary splitting (SPLIT_BT_VER), horizontal binary splitting (SPLIT_BT_HOR), vertical ternary splitting (SPLIT_TT_VER), and horizontal ternary splitting (SPLIT_TT_HOR).
  • the multi-type tree leaf nodes are referred to as CUs. Unless a CU is too large for the maximum transform length, this segmentation with the multi-type tree structure is used for prediction and transform processing without any further partitioning.
  • FIG. 5 illustrates a diagram of intra modes in accordance with some examples.
  • a basic intra prediction scheme applied in VVC is almost the same as that of HEVC, except that several prediction tools are further extended, added and/or improved, e.g., extended intra prediction with wide-angle intra modes, Multiple Reference Line (MRL) intra prediction, Position-Dependent intra Prediction Combination (PDPC), ISP prediction, Cross-Component Linear Model (CCLM) prediction, and Matrix weighted Intra Prediction (MIP).
  • extended intra prediction with wide-angle intra modes e.g., Multiple Reference Line (MRL) intra prediction, Position-Dependent intra Prediction Combination (PDPC), ISP prediction, Cross-Component Linear Model (CCLM) prediction, and Matrix weighted Intra Prediction (MIP).
  • MIP Matrix weighted Intra Prediction
  • the number of angular intra modes is extended from 33 in HEVC to 93 in VVC.
  • modes 2 to 66 are conventional angular intra modes
  • modes -1 to -14 and modes 67 to 80 are wide-angle intra modes.
  • the planar mode (mode 0 in FIG.5) and Direct Current (DC) mode (mode 1 in FIG.5) of HEVC are also applied in VVC.
  • angular intra modes may be selected from the 93 angular intra modes for different block shapes. For example, for both square and rectangular video blocks, besides planar and DC modes, 65 angular intra modes among the 93 angular intra modes are also supported for each block shape.
  • an index of a wide-angle intra mode of the video block may be adaptively determined by video decoder 30 according to an index of a conventional angular intra mode received from video encoder 20 using a mapping relationship as shown in Table 1 below.
  • the wide-angle intra modes are signaled by video encoder 20 using the indexes of the conventional angular intra modes, which are mapped to indexes of the wide- angle intra modes by video decoder 30 after being parsed, thus ensuring that a total number (i.e., 67) of intra modes (i.e., the planar mode, the DC mode and 65 angular intra modes among the 93 angular intra modes) is unchanged, and the intra mode coding method is unchanged. As a result, a good efficiency of signaling intra modes is achieved while providing a consistent design across different block sizes.
  • Table 1 shows a mapping relationship between indexes of conventional angular intra modes and indexes of wide-angle intra modes for the intra prediction of different block shapes in VCC, wherein W represents a width of a video block, and H represents a height of the video block.
  • top reference samples (illustrated in gray color) with length 2W+1 and the left reference samples (illustrated in gray color) with length 2H+1 are used for wide-angle intra prediction to support the angular intra modes.
  • a current video block e.g., a current CU
  • two vertically-adjacent predicted samples e.g., 702 and 704
  • two non-adjacent reference samples e.g., 706 and 708
  • Low-pass reference samples filter and side smoothing can be applied to the wide-DQJOH ⁇ SUHGLFWLRQ ⁇ WR ⁇ UHGXFH ⁇ WKH ⁇ QHJDWLYH ⁇ HIIHFW ⁇ RI ⁇ WKH ⁇ LQFUHDVHG ⁇ JDS ⁇ ⁇ S ⁇ in FIG. 7.
  • a wide-angle mode represents a non-fractional offset
  • 8 modes in the wide-angle PRGHV ⁇ VDWLVI ⁇ WKLV ⁇ FRQGLWLRQ ⁇ ZKLFK ⁇ DUH ⁇ > ⁇ @ ⁇ :KHQ ⁇ D ⁇ video block is predicted by these modes, samples in the reference buffer are directly copied without applying any interpolation. With such a modification, the number of samples needed to be smoothed is reduced.
  • the modification aligns the design of non-fractional modes in the conventional prediction modes and wide-angle modes.
  • 4:2:2 and 4:4:4 chroma formats are supported as well as 4:2:0.
  • Chroma derived mode (DM) derivation table for 4:2:2 chroma format was initially ported from HEVC extending the number of entries from 35 to 67 to align with the extension of intra prediction modes. Since HEVC specification does not support interpolation angles EHORZ ⁇ GHJUHHs and above 45 degrees, luma intra prediction modes ranging from 2 to 5 are mapped to 2.
  • chroma DM derivation table for 4:2:2: chroma format is updated by replacing some values of the entries of the mapping table to convert interpolation angle more precisely for chroma blocks.
  • the intra prediction samples are generated from a set of neighboring reference samples, which may introduce discontinuities along block boundaries between a current video block and neighboring video blocks thereof.
  • the PDPC tool can be used in VVC to solve such problems by employing a weighted combination of intra prediction samples with boundary reference samples.
  • PDPC may be enabled for the following intra modes without signaling: planar mode, DC mode, angular intra modes with indexes less than or equal to that of a horizontal intra mode (i.e., mode 18), and angular intra modes with indexes greater than or equal to that of a vertical intra mode (i.e., mode 50) and less than or equal to 80.
  • a Block Differential Pulse Coded Modulation (BDPCM) mode is applied for the current block or an index of a selected row/column of reference samples for MRL intra prediction is greater than 0, PDPC is not applied.
  • BDPCM Block Differential Pulse Coded Modulation
  • sample 802 is one of samples in the current video block that is to be predicted/interpolated.
  • Reference samples of the current video block for interpolating samples (e.g., 802) of the current video block located above and left to the current video block are illustrated in gray squares.
  • Reference sample 808 has the same horizontal coordinate as sample 802 and reference sample 810 has the same vertical coordinate as sample 802. If sample 802 locates at coordinate (x, y), reference samples 808 and 810 locate at (x, -1) and (-1, y), respectively.
  • FIG.9 is a block diagram illustrating an exemplary sample prediction process 900 in accordance with some implementations of the present disclosure.
  • sample prediction process 900 can be performed by prediction processing unit 41 of video encoder 20, or prediction processing unit 81 of video decoder 30.
  • sample prediction process 900 may be performed by a processor (e.g., a processor 2520 as shown in FIG. 25) on an encoder side or a decoder side.
  • a processor e.g., a processor 2520 as shown in FIG. 25
  • sample prediction process 900 may include a reference sample determination 902, a block-level interpolation direction determination 904 or a sample-specific interpolation direction determination 906, and a sample interpolation 908.
  • FIG.9 is described below together with FIGS.10-15.
  • the processor may receive a plurality of reconstructed samples in neighboring block regions (e.g., previously decoded blocks) in a video frame of a video.
  • the neighboring video blocks are located on a left neighboring region of the current video block, a top neighboring region of the current video block, or both illustrated in gray squares as shown in FIG.8.
  • the reconstructed samples may be located on any neighboring regions of the current video block illustrated in gray squares as shown in FIG. 10.
  • the processor may determine reference samples in the neighboring video blocks according to two slant lines through a sample of the current video block. One of the two slant lines is along an interpolation direction and the other slant line is perpendicular to the first slant line.
  • slant line 1012 is perpendicular to slant line 1014 on sample 1002.
  • four reconstructed samples e.g., sample 1004, sample 1006, sample 1008, and sample 1010 are determined by the processor according to slant lines 1012 and 1014 as reference samples for interpolating sample 1002 in the current video block.
  • the processor may generate a prediction of sample 1002 based on sample 1004, sample 1006, sample 1008, and sample 1010 according to bilinear interpolation.
  • the processor interpolates each of samples in the current video block along a single interpolation direction.
  • the interpolation direction is a block- level interpolation direction.
  • a block-level interpolation direction with interpolation angles of ⁇ 1 and ⁇ 2 is used to interpolate all samples in the current video block (e.g., samples 1102 and 1104).
  • block-level interpolation direction determination 904 may be implemented by a processor in an encoder (e.g., video encoder 20). The processor determines the block-level interpolation direction of the current video block according to a predetermined set of candidate interpolation directions.
  • the predetermined set of candidate interpolation directions may include but not limited to (i.e., ⁇ 0, 30°, 45°, 60°, 135° ⁇ ).
  • the processor calculates the rate-distortion cost of the current video block when the video block is interpolated according to each of the candidate interpolation directions.
  • the processor first determines reference samples along the candidate interpolation direction for each sample and interpolates the sample based on the determined reference samples. The distance between the sample and each of the reference samples are used as weights in the interpolation.
  • the processor then calculates a rate-distortion cost of the sample, where the rate-distortion cost of the sample is determined based on an amount of distortion between the interpolated sample and the original, uncoded sample.
  • the processor further sums up the rate-distortion costs of all the samples in the current video block as the rate-distortion cost of the current video block.
  • the processor determines the candidate interpolation direction associated with the rate-distortion cost having a minimum value as the block-level interpolation direction.
  • the processor may generate a syntax element (e.g., planar_pred_dir) and signal the determined block-level interpolation direction into a bitstream to a decoder (e.g., decoder 30).
  • a processor in the decoder e.g., video decoder 30
  • the processor in the decoder may decode the coded current video block based on the received the syntax element.
  • all reference samples used for interpolating samples in the current video block e.g., samples 1102 and 1104 lie on the interpolation direction. In some implementations, reference samples do not lie on the interpolation direction.
  • FIG. 12 illustrates a diagram of intra prediction using fractional reference samples to interpolate a sample in a video block in accordance with some implementations of the present disclosure.
  • Interpolation angle ⁇ in FIG.12 is not equal to 45° or 135°, some of the reconstructed samples (illustrated in gray squares) in the neighboring block regions may not lie on the interpolation direction (illustrated in dashed arrow lines).
  • the processor generates fractional reference samples (e.g., samples 1204, 1206, 1208, and 1210) by interpolating two adjacent reconstructed samples nearest to the interpolation direction (e.g., dash dot lines 1212 and 1214). As shown in FIG.12, fractional reference sample 1204 (illustrated in dashed square) is generated by interpolating reconstructed samples 1204-1 and 1204-2.
  • fractional reference sample 1206 is generated by interpolating reconstructed samples 1206-1 and 1206-02.
  • fractional reference sample 1208 is generated by interpolating reconstructed samples 1208-1 and 1208-02.
  • fractional reference sample 1210 is generated by interpolating reconstructed samples 1210-1 and 1210-02. [0108]
  • the processor can calculate coordinates of the fractional reference samples based on the width and the height of the current video block and the interpolation d irection of the current video block according to Equations (3-1) – (6-2):
  • W and H denote a width and a height of the current video block
  • denotes an interpolation angle of the current video block and denotes the coordinate of the sample to be interpolated (e.g., sample 1202 in FIG. 12)
  • (x 1 , y 1 ) denotes the coordinate of the fractional reference sample (e.g., sample 1204 in FIG.12) in the neighboring block region that is right to the current video block
  • (x2, y2) denotes the coordinate of the fractional reference sample (e.g., sample 1206 in FIG. 12) in the neighboring block region that is left to the current video block
  • (x 3 , y 3 ) denotes the coordinate of the fractional reference sample (e.g., sample 1208 in FIG.
  • (x4, y4) denotes the coordinate of the fractional reference sample (e.g., sample 1210 in FIG.12) in the neighboring block region that is below the current video block.
  • the processor may determine weights used for interpolating each of the fractional reference samples based on the calculated coordinate of the fractional reference sample and the two adjacent reconstructed samples.
  • the processor further interpolates the sample (e.g., sample 1202 in FIG.12) in the current video block based on the four fractional reference samples generated by the processor. [0109]
  • the processor may use finite-precision interpolation for generating the fractional reference samples and interpolating the sample in the current video block.
  • typical interpolation precision applied by the processor includes integer, 1 ⁇ 2, 1 ⁇ 4, 1/8, 1/16, etc.
  • the processor calculates the coordinate of the fractional reference sample using any of Equations (3-1) – (6-2)
  • the calculated coordinate of the fractional reference samples is rounded to the nearest allowed fractional position.
  • the reference samples below and right to the current video block are not used for interpolating the current video block. For example, if the video is coded via VVC or ECM standards, the processor does not interpolate sample 1202 in FIG.
  • the processor interpolates sample 1202 based on samples 1204 and 1210. Instead, the processor interpolates sample 1202 based on samples 1206 and 1208. If the reference samples below and right to the current video block can be generated for interpolating the current video block using other methods or in other standards, four reference samples are used for interpolating the current video block. [0111] In some implementations, to implement block-level interpretation direction determination 904, the interpolation direction of the current video block is inferred from the neighboring reconstructed samples in the encoder (e.g., video encoder 20) or the decoder (e.g., decoder 30). For example, FIG.
  • FIG. 13 illustrates a diagram of intra prediction using second order gradients of reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure.
  • Three neighboring rows/columns of reconstructed sample e.g., a zero th line 1301, a first line 1303, and a second line 1305) in FIG.13 are used to infer the interpolation direction of the current video block.
  • second order gradients of the neighboring reconstructed samples are used to decide the block-level interpolation direction. For each sample within the current video block (e.g., sample 1302 in FIG.
  • the second order gradients g 1 and g 2 along the inferred interpolation direction (e.g., line 1320) and its perpendicular direction (e.g., line 1322) are calculated according t o Equation (7-1) and (7-2) as follows: where ⁇ denote the right neighboring samples along the interpolation direction (e.g., line 1320), and denote the left neighboring samples along the perpendicular interpolation direction (e.g., line 1322).
  • L1 norm or L2 norm is used to measure energy of the variation caused by the change between neighbouring reconstructed samples.
  • a cost of the current video block can be calculated by summing up the costs of all samples in the current video block, where the cost of each sample in the current video block is calculated based on the second order gradients according to Equations (7-1) and (7-2) in L1 norm or L2 norm.
  • the processor may calculate the cost of the current video block according t o Equations (8) or (9), respectively.
  • the first order gradient is used to generate the second order gradient.
  • the first order gradients may be normalized based on distances between the neighboring reconstructed samples used for calculating the respective first order gradients.
  • the second order gradients g1 and g2 are then calculated based on the normalized first o rder gradients according to Equations (10-1) and (10-2): where denotes the distance between reconstructed samples denotes the distance between reconstructed samples denotes the distance between reconstructed samples , and , and denotes the distance between reconstructed samples [0113]
  • reference samples in the zero th line, the first line, or the second line may not lie on the interpolation direction.
  • the processor may generate fractional reference samples (e.g., samples 1404, 1406, 1408, 1410, 1412, and 1414 in FIG.14) by interpolating two adjacent reconstructed samples in a same line (e.g., the zero th line, the first line, or the second line) and nearest to the interpolation direction (e.g., dash dot lines 1420 and 1422).
  • the processor interpolates samples 1404, 1406, 1408, 1410, 1412, and 1414 using in a same interpolation method as it does for samples 1204, 1206, 1208, and 1210 in FIG.12.
  • the processor may generate different sample-specific interpolation directions for interpolating each of a plurality of samples in the current video block.
  • FIG.15 illustrates a diagram of intra prediction using different sample-specific interpolation directions to interpolate samples in a video block in accordance with some implementations of the present disclosure. Lines 1510 and 1512 in FIG.
  • the processor determines a sample-specific interpolation direction for each individual sample based on a cost when the sample is interpolated according to each of the plurality of hypothesis interpolation directions.
  • the cost of the sample (e.g., sample 1302) at coordinates (x, y) may be calculated according to L1 norm or L2 of the second order gradient using Equation (11) or Equation (12) as f ollows: wherein ⁇ , , , denote the right neighboring samples along the interpolation direction (e.g., line 1320), and denote the left neighboring samples along the perpendicular interpolation direction (e.g., line 1322). Further, the processor calculates a cost according to each of the hypothesis interpolation directions of the sample according to Equations (11) or (12). The processor determines the hypothesis interpolation direction associated with the cost having a minimum value as the sample-specific interpolation direction.
  • first order gradients in Equations (11) and (12) may be normalized based on distances between the neighboring reconstructed samples used for calculating the respective first order gradients.
  • Cost1 in L1 norm and cost 2 in L2 norm may be calculated based on the normalized first order gradients according to Equations (13) and ( 14) as follows: where ⁇ ⁇ denotes the distance between reconstructed samples denotes the distance between reconstructed samples and denotes the distance between reconstructed samples , and denotes the distance between reconstructed samples [0117]
  • the processor may first generate a fractional reference sample by interpolating two adjacent reconstructed samples nearest to the hypothesis interpolation direction as shown in FIG.14.
  • the processor uses the generated fractional reference samples to interpolate the sample along the hypothesis interpolation direction.
  • the processor may interpolate the current video block based on either the determined block-level interpolation direction or sample-specific interpolation block. If the processor is on the encoder side and the block-level interpolation direction is determined from a predetermined set of candidate interpolation directions, the processor may generate an index of the predetermined block-level interpolation direction and then signal the index in a bitstream to the decoder.
  • FIG.16 is a flow chart of an exemplary method for performing intra prediction on a video block in accordance with some implementations of the present disclosure.
  • Method 1600 may be implemented by a processor associated with video encoder 20 or video decoder 30. The sample prediction process described in connection with FIG.9 may be used to implement method 1600.
  • Method 1600 may include steps 1602-1610, among which steps 1604-1606 may be optional, as described below. Some of the steps may be optional to perform the disclosure provided herein.
  • the processor may receive a video frame of a video.
  • the video frame may include a group of reconstructed samples or blocks that are neighboring block regions of a video block to be predicted (e.g., current video block in FIGS.10-15).
  • the current video block can be a CTU, or a CU/PU.
  • the processor may further receive a predetermined set of candidate interpolation direction coded in the current video block or the video frame.
  • steps 1604 and 1606 may be optionally performed to determine the interpolation direction used in step 1608.
  • the processor may determine a block-level interpolation direction for the current video block based on the received reconstructed samples in the neighboring block regions.
  • an explicit method may be used to determine the block-level interpolation direction on the encoder side.
  • the processor may determine reference samples based on the received set of candidate interpolation directions.
  • the processor may calculate a rate- distortion cost of the current video block when the current video block is interpolated according to each of a plurality of candidate interpolation directions.
  • the candidate interpolation direction associated with the rate-distortion cost having a minimum value is determined by the processor as the block-level interpolation direction.
  • the processor determines the block-level interpolation direction implicitly based on second order gradients of the neighboring reconstructed samples.
  • the implicit method can be performed on either the encoder side or the decoder side.
  • the processor first calculates a cost of each sample in the current video block based on the second order gradients of the neighboring reconstructed samples in each hypothesis interpolation direction. A sum of the cost of each sample is used as a cost of the current video block to determine the block-level interpolation direction among the hypothesis interpolation directions. That is, the processor determines a hypothesis interpolation direction associated with the cost of the current video block having a minimum value as the block-level interpolation direction.
  • the processor may determine different sample- specific interpolation directions for each of the samples in the current video block. That is, each sample in the current video block uses an individual sample-specific interpolation direction for interpolation. To determine the sample-specific interpolation direction for each sample, the processor may calculate a cost of each sample in the current video block based on the second order gradients of the neighboring reconstructed samples in each hypothesis interpolation direction. The processor further determines a hypothesis interpolation direction associated with the cost of the sample having a minimum value as the sample-specific interpolation direction for the sample.
  • the processor may generate an index for the block-level interpolation direction and signal the index in a bitstream to the decoder.
  • the processor determines reference samples in neighboring video blocks of the video block along the interpolation direction of each sample of the current video block. For example, the processor determines that reconstructed samples lie on a line through the sample along the interpolation direction or a line through the sample along the perpendicular interpolation direction as the reference samples for interpolating the corresponding sample in the current video block.
  • the processor may generate fractional reference samples based on the two adjacent reconstructed samples nearest to the line along the interpolation direction or the line along the perpendicular interpolation direction. The fractional reference samples are then used for interpolating the corresponding sample in the current video block. [0126] In step 1610, the processor may interpolate each sample of the current video block based on reference samples. [0127] In some implementations, if the processor is on the decoder side, it may receive an index indicating a block-level interpolation direction along with coded video block, and interpolate the coded video block based on the block-level interpolation direction signaled in the received bitstream.
  • the decoder processor may determine the interpolation direction on its own, e.g., using an implicit method described in part of steps 1604 (to determine a block-level interpolation direction) and 1606 (to determine a sample-specific interpolation direction).
  • reference samples in the planar mode are first smoothed before being used to interpolate samples in the current video block. For example, in the VVC and ECM standards, the reference samples are filtered by a fixed filter with coefficients [ ⁇ @ ⁇ EHIRUH ⁇ being used to interpolate other samples.
  • ALF Adaptive Loop Filter
  • an adaptive reference sample filter can be used to filter the reference samples for intra prediction in planar mode.
  • FIG. 17 is an illustration of exemplary adaptive reference sample filtering in accordance with some implementations of the present disclosure.
  • a three-tap filter [r 0 , r 1 , r 2 @ ⁇ shown in FIG. 17 is used to smooth reference samples (e.g., sample 1504) in the neighboring video blocks above the current video block, and another three-tap filter [c0, c1, c2@ ⁇ LV ⁇ XVHG ⁇ WR ⁇ VPRRWK ⁇ UHIHUHQFH ⁇ VDPSOHV ⁇ (e.g., sample 1506) in the neighboring video blocks left to the current video block.
  • Samples 1704 and 1706 in FIG.17 are reference samples used to interpolate sample 1702 in plana mode. Consistent with the present disclosure, if sample 1702 locates at coordinate (x, y), samples 1704 and 1706 locate at coordinates (x, -1) and (-1, y), respectively.
  • a filtered value of sample 1704 can be calculated based on unfdtered values of sample 1704 and its two adjacent samples (e.g., samples 1704-1 and 1704-2) in the same row based on filter
  • a filtered value of sample 1706 can be calculated based on unfiltered values of sample 1704 and its two adjacent samples (e.g., samples 1706-1 and 1706-2) in the same column based on filter [
  • the filtered value of samples 1704 and 1706 can be calculated according to Equations (15-1) and (15-2) as follows: where P/[x][— 1] denotes the filtered value of sample 1704 based on filter p[x — 1] [— 1] denotes the unfiltered value of sample 1704-1, denotes the unfiltered value of sample 1704, denotes the unfiltered value of sample 1704-2, denotes the filtered value of sample 1706 based on denotes the unfdtered value of sample 1706-1, denotes the unfiltered value of sample 1706, and denotes
  • horizontal interpolated values and vertical interpolated values for sample 1702 in planar mode can be calculated according to Equations (16-1) and (16-2):
  • Apredicted value of sample 1702 can be obtainedbased on an average of the horizontal and vertical interpolated values according to Equation (17) as follows:
  • a cost function of samples (e.g., sample 1702) in the current video block is defined as: where s[x][y] denotes the original value of the sample, and q[x] [y] is the predicted value of the sample interpolated from the reference samples.
  • Equation (18) can be solved with Wiener-Hopf equations as in ALF method.
  • the processor may use a least square method to optimize the filter coefficients and/or [c 0 , c 1 , c 2 @) to minimize the cost value in the cost function (e.g., Equation (18)).
  • the processor When the processor is in the encoder (e.g., video encoder 20), the processor signals the optimized filter coefficients in a bitstream to the decoder (e.g., decoder 30).
  • the processor in the encoder may receive a set of predetermined candidate filters. The processor calculates the cost value using Equation (18) according to each of the received candidate filters. The processor then determines the filter associated with the cost having a minimum value as the optimal filter. The processor may quantize the optimal filter into integer type. Further, the processor generates an index of the optimal filter in a bitstream and signals the index to the decoder.
  • filter used for filtering reference samples is not limited to a 3-tap filter, any other type of filters (e.g., 2-tap filter, 4-tap filter) can be incorporated into this disclosure.
  • a single filter is used for filtering all reference samples.
  • different filters e.g., filter [r0, r1, r2@ ⁇ DQG ⁇ ILOWHU ⁇ >c0, c1, c2@ in FIG.17
  • filter coefficients can be derived using reconstructed samples by a processor either on the encoder side or on the decoder side. For example, FIG.
  • FIG. 18 is an illustration of exemplary derivation of an adaptive reference sample filter using reconstructed samples in accordance with some implementations of the present disclosure.
  • four lines of reconstructed samples in neighboring blocks e.g., zero th line 1801, first line 1803, second line 1805, and third line 1807) are used for determining adaptive reference sample filters (e.g., filter [r 0 , r 1 , r 2 @ ⁇ DQG ⁇ ILOWHU ⁇ >c 0 , c 1 , c 2 @ ⁇
  • Third line 1807 is used as reference samples to predict samples in zero th line 1801, first line 1803, and second line 1805.
  • the filter [r 0 , r 1 , r 2 @ ⁇ filter may filter the samples in row of third line 1807, and the filter [c0, c1, c2@ ⁇ PD ⁇ ILOWHU ⁇ WKH ⁇ VDPSOHV ⁇ LQ ⁇ column of third line 1807.
  • Each sample in zeroth line 1801, first line 1803, and second line 1805 can be interpolated by filtered samples in third line 1907.
  • samples 1804-1 and 1804-2 are first filtered using filter [r0, r1, r2@ ⁇ DQG ⁇ ILOWHU ⁇ >c0, c1, c2@ by equations like Equations (15-1), (15-2), respectively.
  • sample 1804 can be interpolated based on filtered sample 1804-1 and 1804-2 by equations like Equations (16-1), (16-2), and (17).
  • a cost function, like Equation (18), for all of the predictive samples e.g., samples in zero th line 1801, first line 1803, second line 1805, and third line 1807) can be optimized and the filter coefficients (e.g., [r0, r 1 , r 2 @, [c 0 , c 1 , c 2 @ ⁇ can be solved with Wiener-Hopf equations.
  • the optimized filters may be used to filter reference samples (e.g., in zero th line 1801).
  • the filtered reference samples are used to interpolate samples in the current video block in planar mode.
  • FIG.19 is a flow chart of an exemplary method for performing planar prediction with an adaptive reference sample filter in accordance with some implementations of the present disclosure.
  • Method 1900 may be implemented by a processor associated with video encoder 20 or video decoder 30. Method 1900 may include steps 1902-1908 as described below. Some of the steps may be optional to perform the disclosure provided herein. Further, some of the steps may be performed simultaneously, or in a different order.
  • the processor may receive a video frame of a video.
  • the video frame may include a group of reconstructed samples or blocks that are neighboring block regions of a video block to be predicted (e.g., current video block in FIGS.17-18).
  • the current video block can be a CTU, or a CU/PU.
  • the processor may determine the reference samples for performing planar prediction.
  • samples 1704 and 1706 are determined by the processor as the reference samples for interpolating sample 1702 in planar mode.
  • the processor applies at least one adaptive reference sample filter to the reference samples determined in step 1904. For example, as shown in FIG.17, filter [r0, r1, r2@ ⁇ and filter [c0, c1, c2@ ⁇ DUH ⁇ DSSOLHG ⁇ to samples 1704 and 1706, respectively.
  • the processor performs the planar prediction on each of the samples in the current video block using the reference samples filtered in step 1906. For example, sample 1702 in FIG.17 is interpolated in planar mode based on filtered samples 1704 and 1706.
  • adaptive sample filtering can be performed in conjunction with directional planar interpolation (e.g., method 1600). For example, method 1900 may be performed between steps 1608 and 1610 of method 1600. However, it is contemplated that adaptive sample filtering and directional planar interpolation can also be applied separately and independently from each other. Either technique provides improvements to the performance of intra-prediction.
  • FIG.20 is a block diagram illustrating an exemplary block size-based reference sample filtering process 2000 (hereafter referred to as “process 2000”) in accordance with some implementations of the present disclosure. In some implementations, process 2000 can be performed by prediction processing unit 41 of video encoder 20, or prediction processing unit 81 of video decoder 30.
  • process 2000 may be performed by a processor (e.g., a processor 2520 as shown in FIG.25) on an encoder side or a decoder side.
  • a processor e.g., a processor 2520 as shown in FIG.25
  • process 2000 may include a reference sample receiving 2002, a reference sample filter determination 2004, and a reference sample filtering 2006.
  • the processor may receive a plurality of reference samples in neighboring block regions (e.g., previously decoded blocks) of a video block to be predicted in a video frame of a video in reference sample receiving 2002 (e.g., current video block in FIGS.17-18).
  • a video frame in the video may be divided into a plurality of CTUs, then each CTU may be split into smaller video blocks (e.g., CUs) to adapt to varying local characteristics. These video blocks of the video frame may have different sizes, as shown in FIGS. 4C and 4E.
  • the processor may adaptively determine a reference sample filter based on the size of the current video block and filter the reference samples with that filter before they are used to predict the block.
  • the determined reference sample filter is among a plurality of reference sample filters preprogrammed in the processor.
  • the reference sample filters may be trained offline, and then the filter coefficients of the trained filters are preprogrammed into the processor in the encoder and/or the processor in the decoder. Because the reference sample filters are trained offline and separately preprogramed into the encoder and decoder, no signaling of these filters is necessary between the encoder and decoder.
  • the offline training of the reference sample filters can be performed on a same processor later used for intra prediction, or a separate processor. Images or video frames for training the reference sample filters may be divided into blocks based on statistics or varying local characteristics of the images or the video frames. Blocks of the same size are collected for training a corresponding reference sample filter for that block size.
  • reference samples of the video blocks of the same size are used as the input of training data, and original samples of the video blocks of the same size are used as the target of the training data for deriving filter coefficients of the reference sample filter for that block size.
  • the filter coefficients of the reference sample filter may be derived using a least square method (e.g., Equation (18)).
  • training samples may be collected for different Quantization Parameters (QPs). Accordingly, different reference sample filters may be trained for the different QPs. These reference sample filters may be associated with a same block size but corresponding to different QPs. Each of the reference sample filters are derived using training data compressed with the encoder using a different QP.
  • one reference sample filter may be trained using training data corresponding to all the different QPs collectively.
  • the determined reference sample filter used to filter the reference samples of the video block is among a plurality of reference sample filters derived adaptively by the encoder based on each video frame.
  • the processor in the encoder may adaptively derive a plurality of reference sample filters based on each video frame.
  • Each of the derived reference sample filters is corresponding to a different video block size in the video frame.
  • the processor then may quantize and signal the derived reference sample filters in a bit stream to the decoder. For example, the filter coefficients of the derived reference sample filters are signalled.
  • the reference sample filters may be adaptively derived by the processor in the encoder based on two-pass encoding. For example, in a first pass, a default reference sample filter (e.g., > ⁇ @ ⁇ PD ⁇ EH ⁇ XVHG ⁇ WR ⁇ ILOWHU ⁇ WKH ⁇ UHIHUHQFH ⁇ VDPSOHs of each video block in the video frame.
  • the processor then performs an intra prediction (e.g., angular intra prediction, or planar intra prediction) of the video block using the filtered reference samples to obtain intra prediction samples of each video block.
  • This first pass of compression creates a statistical summary of the video data. For example, covariances for the filters may be collected.
  • the processor in the encoder may derive the reference sample filters each associated with a different video block size guided by the first- pass compression of the video blocks, obtained using the default reference sample filter above. For example, the collected covariances for the filters may be used to derive the reference sample filters.
  • filter coefficients of the reference sample filter may be derived using a least square method (e.g., Equation (18)).
  • PDPC may be applied after the prediction of angular intra mode.
  • the processor may first perform angular intra prediction on the video blocks using the filtered reference samples, and then perform PDPC to the predicted samples of the video blocks to obtain final intra perdition samples of the video blocks for deriving the reference sample filters.
  • the processor then compresses each video block by filtering the reference samples using the derived a reference sample filter according to the size of that video block.
  • the processor may apply the determined reference sample filter to the reference samples in reference sample filtering process 2006.
  • the processor may then perform an intra prediction (e.g., planar prediction) on the current video block using the filtered reference samples.
  • the reference sample filters may be retrieved from the memory, or adaptively derived.
  • FIG.21 is a flow chart of an exemplary method 2100 for performing reference sample filtering with block size-based reference sample filters in accordance with some implementations of the present disclosure.
  • Method 2100 may be implemented by a processor associated with video encoder 20 or video decoder 30.
  • Method 2100 may include steps 2102-2108 as described below. Some of the steps may be optional to perform the disclosure provided herein. Further, some of the steps may be performed simultaneously, or in a different order.
  • the processor may receive a video frame of a video.
  • the video frame may include a group of reference samples or blocks that are neighboring block regions of a video block to be predicted (e.g., current video block in FIGS.17-18).
  • the current video block can be a CTU, or a CU/PU.
  • the processor may determine the size of each video block, and for each video block size, the processor may determine a reference sample filter to filter the received reference samples of the video blocks of that size.
  • the processor may determine the reference sample filter among a plurality of reference sample filters that are preprogrammed in the processor. The preprogrammed reference sample filters may be trained offline by the same processor or a different processor.
  • FIG.22 is a flow chart of an exemplary method 2200 for training fixed block size-based reference sample filters offline in accordance with some implementations of the present disclosure.
  • the processor may receive input training data and target training data.
  • the input training data may be reference samples obtained by compressing original samples of video blocks at different sizes with an encoder.
  • the target training data may be the corresponding original samples of the video blocks.
  • the processor may derive a plurality of reference sample filters based on the input training data and the target training data using a least square method (e.g., Equation (18)).
  • a reference sample filter associated with the corresponding block size may be derived for each different QP or for all the different QPs collectively.
  • the filter coefficients of the derived plurality of reference sample filters are preprogramed in the processor of the encoder and/or the decoder.
  • the derived reference sample filters may also be pre-stored in a lookup table and saved in a memory (e.g., memory 2530 in FIG.25).
  • the processor may determine the reference sample filter among a plurality of reference sample filters that are adaptively derived based on the video frame.
  • FIG.23 is a flow chart of an exemplary method for determining adaptive block size-based reference sample filters in accordance with some implementations of the present disclosure.
  • WKH ⁇ SURFHVVRU ⁇ PD ⁇ DSSO ⁇ D ⁇ GHIDXOW ⁇ UHIHUHQFH ⁇ VDPSOH ⁇ ILOWHU ⁇ H ⁇ J ⁇ > ⁇ @ ⁇ to reference samples of each video block in the video frame to obtained filtered reference samples.
  • the processor may perform an intra prediction (e.g., planar prediction, angular intra prediction) on each video block using the filtered reference samples of the video block to obtain the intra prediction samples of each video block.
  • an intra prediction e.g., planar prediction, angular intra prediction
  • the processor may further derive a reference sample filter for each video block size of the video frame using a least square method (e.g., Equation (18)) based on the reference samples of each video block of that size and the corresponding predicted samples of the video block (predicted in step 2304).
  • the derived reference sample filters are signalled in a bit stream to the decoder.
  • the processor applies the determined reference sample filter, according to the size of the current video block, to the reference samples of the video block in step 2106.
  • the determined reference sample filter is retrieved from the processor or memory if it is preprogrammed, or obtained from the signaling in the bit stream if it is adaptively derived based on the video frame.
  • step 2108 the processor performs the intra prediction (e.g., planar prediction) on samples in the video block using the reference samples filtered in step 2106.
  • block size-based reference sample filtering e.g., method 2100
  • directional planar interpolation e.g., method 1600
  • block size-based reference sample filtering and directional planar interpolation can also be applied separately and independently from each other. Either technique provides improvements to the performance of intra-prediction.
  • 24A and 24B illustrate diagrams of reference samples for PDPC in a top-right diagonal mode and a bottom-left diagonal mode respectively.
  • the prediction sample pred(x, y) is located at (x, y) in the prediction block.
  • a modified prediction sample pred’(x, y) obtained by performing the PDPC can be calculated according to Equation (19): ’ ⁇ , y)+ 32 )>>6) (19), where Bitdepth represents a bit depth of samples; Rx’, ⁇ 1 and R ⁇ 1,y’ represent reference samples located at top and left boundaries of the current sample, respectively; wL and wT are weights which are adaptively selected according to an intra mode and a block size of the current block; “>>” represents a bitwise right shift operation; and “ ⁇ ” indicates a bitwise left shift operation.
  • FIG. 25 shows a computing environment 2510 coupled with a user interface 2550, according to some implementations of the present disclosure.
  • the computing environment 2510 can be part of a data processing server. Consistent with the present disclosure, video encoder 20 and video decoder 30 can be implemented using the computing environment 2010.
  • the computing environment 2510 includes a processor 2520, a memory 2530, and an Input/Output (I/O) interface 2540.
  • the processor 2520 typically controls overall operations of the computing environment 2510, such as the operations associated with display, data acquisition, data communications, and image processing.
  • Processor 2520 may include one or more processors to execute instructions to perform all or some of the steps in the above-described methods. Moreover, processor 2520 may include one or more modules that facilitate the interaction between the processor 2520 and other components.
  • the processor 2520 may be a Central Processing Unit (CPU), a microprocessor, a single chip machine, a Graphical Processing Unit (GPU), or the like.
  • Memory 2530 is configured to store various types of data to support the operation of the computing environment 2510.
  • the memory 2530 may include predetermined software 2532. Examples of such data include instructions for any applications or methods operated on the computing environment 2510, video datasets, image data, etc.
  • the memory 2530 may be implemented by using any type of volatile or non-volatile memory devices, or a combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk.
  • SRAM Static Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • PROM Programmable Read-Only Memory
  • ROM Read-Only Memory
  • magnetic memory a magnetic memory
  • flash memory a flash memory
  • the I/O interface 2540 provides an interface between the processor 2520 and peripheral interface modules, such as a keyboard, a click wheel, buttons, or the like.
  • the buttons may include but are not limited to, a home button, a start scan button
  • the I/O interface 2540 can be coupled with an encoder and decoder.
  • a non-transitory computer-readable storage medium comprising a plurality of programs, for example, in the memory 2530, executable by the processor 2520 in the computing environment 2510, for performing the above-described methods.
  • the non-transitory computer-readable storage medium may have stored therein a bitstream or a data stream comprising encoded video information (for example, video information comprising one or more syntax elements) generated by an encoder (for example, video encoder 20 in FIG. 2) using, for example, the encoding method described above for use by a decoder (for example, video decoder 30 in FIG. 3) in decoding video data.
  • the non-transitory computer-readable storage medium may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device or the like.
  • a computing device comprising one or more processors (for example, the processor 2520); and the non-transitory computer-readable storage medium or the memory 2530 having stored therein a plurality of programs executable by the one or more processors, wherein the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described methods.
  • a computer program product comprising a plurality of programs, for example, in memory 2530, executable by the processor 2520 in the computing environment 2510, for performing the above-described methods.
  • the computer program product may include the non-transitory computer-readable storage medium.
  • the computing environment 2510 may be implemented with one or more ASICs, DSPs, Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), FPGAs, GPUs, controllers, micro-controllers, microprocessors, or other electronic components, for performing the above methods.

Abstract

Implementations of the disclosure provide a video processing apparatus and method for performing intra prediction on a video block. The video processing method may include receiving, by a processor, reference samples from a video frame of a video comprising the video block. The video processing method may further include determining, by the processor, a reference sample filter based on a size of each video block. The reference sample filter is among a plurality of reference sample filters each derived for a different video block size. The video processing method may also include applying, by the processor, the determined reference sample filter to the received reference samples. The video processing method may additionally include performing, by the processor, the intra prediction on the video block using the filtered reference samples.

Description

PLANAR MODE IMPROVEMENT FOR INTRA PREDICTION
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application is based upon and claims priority to U.S. Provisional Application No. 63/322,478, filed March 22, 2022. This application is a continuation-in-part of PCT Application No. PCT/US22/50696, filed November 22, 2022, which claims priority to U.S. Provisional Application No. 63/281,822, filed November 22, 2021. The content of all above applications is incorporated herein by reference in their entirety.
TECHNICAL FIELD
[0002] This application is related to video coding and compression. More specifically, this application relates to video processing apparatuses and methods for intra prediction with reference sample filters.
BACKGROUND
[0003] Digital video is supported by a variety of electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video gaming consoles, smart phones, video teleconferencing devices, video streaming devices, etc. The electronic devices transmit and receive or otherwise communicate digital video data across a communication network, and/or store the digital video data on a storage device. Due to a limited bandwidth capacity of the communication network and limited memory' resources of the storage device, video coding may be used to compress the video data according to one or more video coding standards before it is communicated or stored. For example, video coding standards include Versatile Video Coding (VVC), Joint Exploration test Model (JEM), High-Efficiency Video Coding (HEVC/H.265), Advanced Video Coding (AVC/H.264), Moving Picture Expert Group (MPEG) coding, or the like. Video coding generally utilizes prediction methods (e.g., inter-prediction, intra-prediction, or the like) that take advantage of redundancy inherent in the video data. Video coding aims to compress video data into a form that uses a lower bit rate, while avoiding or minimizing degradations to video quality. SUMMARY [0004] Implementations of the disclosure provide a video processing apparatus and method for performing intra prediction on a video block. The video processing method may include receiving, by a processor, reference samples from a video frame of a video comprising the video block. The video processing method may further include determining, by the processor, a reference sample filter based on a size of each video block. The reference sample filter is among a plurality of reference sample filters each derived for a different video block size. The video processing method may also include applying, by the processor, the determined reference sample filter to the received reference samples. The video processing method may additionally include performing, by the processor, the intra prediction on the video block using the filtered reference samples. [0005] Implementations of the present disclosure also provide a video processing apparatus for performing intra prediction on a video block. The video processing apparatus may include a memory and one or more processors coupled to the memory. The one or more processors may be configured to receive reference samples from a video frame of a video comprising the video block. The one or more processors may be further configured to determine a reference sample filter based on a size of each video block. The reference sample filter is among a plurality of reference sample filters each derived for a different video block size. The one or more processors may also be configured to apply the determined reference sample filter to the received reference samples. The one or more processors may also be configured to perform the intra prediction on the video block using the filtered reference samples. [0006] Implementations of the present disclosure further provide a non-transitory computer- readable storage medium having stored therein instructions which, when executed by one or more processors, cause the one or more processors to perform a video processing method for performing intra prediction on a video block. The video processing method may include receiving reference samples from a video frame of a video comprising the video block. The video processing method may further include determining a reference sample filter based on a size of each video block. The reference sample filter is among a plurality of reference sample filters each derived for a different video block size. The video processing method may also include applying the determined reference sample filter to the received reference samples. The video processing method may additionally include performing the intra prediction on the video block using the filtered reference samples. [0007] It is to be understood that both the foregoing general description and the following detailed description are examples only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS [0008] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. [0009] FIG.1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks in accordance with some implementations of the present disclosure. [0010] FIG.2 is a block diagram illustrating an exemplary video encoder in accordance with some implementations of the present disclosure. [0011] FIG.3 is a block diagram illustrating an exemplary video decoder in accordance with some implementations of the present disclosure. [0012] FIGS. 4A through 4E are graphical representations illustrating how a frame is recursively partitioned into multiple video blocks of different sizes and shapes in accordance with some implementations of the present disclosure. [0013] FIG.5 illustrates a diagram of intra modes in accordance with some implementations of the present disclosure. [0014] FIGS. 6A and 6B illustrate exemplary reference samples for wide-angular intra prediction in accordance with some implementations of the present disclosure. [0015] FIG. 7 illustrates an exemplary discontinuity in case of wide-angle intra prediction direction in accordance with some implementations of the present disclosure. [0016] FIG. 8 illustrates an interpolation of a sample in a current video block for intra prediction in planar mode in accordance with some implementations of the present disclosure. [0017] FIG. 9 is a block diagram illustrating an exemplary sample prediction process in accordance with some implementations of the present disclosure. [0018] FIG.10 illustrates a diagram of intra prediction along an interpolation direction and the perpendicular interpolation direction through a sample of the video block in accordance with some implementations of the present disclosure. [0019] FIG. 11 illustrates a diagram of intra prediction using a block-level interpolation direction to interpolate samples in a video block in accordance with some implementations of the present disclosure. [0020] FIG.12 illustrates a diagram of intra prediction using fractional reference samples to interpolate a sample in a video block in accordance with some implementations of the present disclosure. [0021] FIG. 13 illustrates a diagram of intra prediction using second order gradients of reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure. [0022] FIG. 14 illustrates a diagram of intra prediction using second order gradients of fractional reference samples generated based on the reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure. [0023] FIG. 15 illustrates a diagram of intra prediction using different sample-specific interpolation directions to interpolate samples in a video block in accordance with some implementations of the present disclosure. [0024] FIG.16 is a flow chart of an exemplary method for performing intra prediction on a video block in accordance with some implementations of the present disclosure. [0025] FIG. 17 is an illustration of exemplary adaptive reference sample filtering in accordance with some implementations of the present disclosure. [0026] FIG.18 is an illustration of exemplary derivation of an adaptive reference sample filter using reconstructed samples in accordance with some implementations of the present disclosure. [0027] FIG.19 is a flow chart of an exemplary method for performing planar prediction with an adaptive reference sample filter in accordance with some implementations of the present disclosure. [0028] FIG.20 is a block diagram illustrating an exemplary block size-based reference sample filtering process in accordance with some implementations of the present disclosure. [0029] FIG. 21 is a flow chart of an exemplary method for performing reference sample filtering with block size-based reference sample filters in accordance with some implementations of the present disclosure. [0030] FIG. 22 is a flow chart of an exemplary method for training fixed block size-based reference sample filters offline in accordance with some implementations of the present disclosure. [0031] FIG.23 is a flow chart of an exemplary method for determining adaptive block size- based reference sample filters in accordance with some implementations of the present disclosure. [0032] FIGS. 24A and 24B illustrate diagrams of reference samples for Position-Dependent intra Prediction Combination (PDPC) in a top-right diagonal mode and a bottom-left diagonal mode, respectively, in accordance with some implementations of the present disclosure. [0033] FIG.25 is a block diagram illustrating a computing environment coupled with a user interface in accordance with some implementations of the present disclosure. DETAILED DESCRIPTION [0034] Reference will now be made in detail to specific implementations, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to assist in understanding the subject matter presented herein. But it will be apparent to one of ordinary skill in the art that various alternatives may be used without departing from the scope of claims and the subject matter may be practiced without these specific details. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities. [0035] It should be illustrated that the terms “first,” “second,” and the like used in the description, claims of the present disclosure, and the accompanying drawings are used to distinguish objects, and not used to describe any specific order or sequence. It should be understood that the data used in this way may be interchanged under an appropriate condition, such that the embodiments of the present disclosure described herein may be implemented in orders besides those shown in the accompanying drawings or described in the present disclosure. [0036] FIG. 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel in accordance with some implementations of the present disclosure. As shown in FIG. 1, the system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14. The source device 12 and the destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or the like. In some implementations, the source device 12 and the destination device 14 are equipped with wireless communication capabilities. [0037] In some implementations, the destination device 14 may receive the encoded video data to be decoded via a link 16. The link 16 may include any type of communication medium or device capable of forwarding the encoded video data from the source device 12 to the destination device 14. In one example, the link 16 may include a communication medium to enable the source device 12 to transmit the encoded video data directly to the destination device 14 in real time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the destination device 14. The communication medium may include any wireless or wired communication medium, such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from the source device 12 to the destination device 14. [0038] In some other implementations, the encoded video data may be transmitted from an output interface 22 to a storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the destination device 14 via an input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, Digital Versatile Disks (DVDs), Compact Disc Read-Only Memories (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data. In a further example, the storage device 32 may correspond to a file server or another intermediate storage device that may store the encoded video data generated by the source device 12. The destination device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing the encoded video data and transmitting the encoded video data to the destination device 14. Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, Network Attached Storage (NAS) devices, or a local disk drive. The destination device 14 may access the encoded video data through any standard data connection, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., Digital Subscriber Line (DSL), cable modem, etc.), or any combination thereof that is suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both. [0039] As shown in FIG.1, the source device 12 includes a video source 18, a video encoder 20, and the output interface 22. The video source 18 may include a source such as a video capturing device, e.g., a video camera, a video archive containing previously captured video, a video feeding interface to receive video data from a video content provider, and/or a computer graphics system for generating computer graphics data as the source video, or a combination of such sources. As one example, if the video source 18 is a video camera of a security surveillance system, the source device 12 and the destination device 14 may include camera phones or video phones. However, the implementations described in the present disclosure may be applicable to video coding in general, and may be applied to wireless and/or wired applications. [0040] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored onto the storage device 32 for later access by the destination device 14 or other devices, for decoding and/or playback. The output interface 22 may further include a modem and/or a transmitter. [0041] The destination device 14 includes the input interface 28, a video decoder 30, and a display device 34. The input interface 28 may include a receiver and/or a modem and receive the encoded video data over the link 16. The encoded video data communicated over the link 16, or provided on the storage device 32, may include a variety of syntax elements generated by the video encoder 20 for use by the video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server. [0042] In some implementations, the destination device 14 may include the display device 34, which can be an integrated display device and an external display device that is configured to communicate with the destination device 14. The display device 34 displays the decoded video data for a user, and may include any of a variety of display devices such as a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device. [0043] The video encoder 20 and the video decoder 30 may operate according to proprietary or industry standards, such as VVC, HEVC, MPEG-4, Part 10, AVC, or extensions of such standards. It should be understood that the present disclosure is not limited to a specific video encoding/decoding standard and may be applicable to other video encoding/decoding standards. It is generally contemplated that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that the video decoder 30 of the destination device 14 may be configured to decode video data according to any of these current or future standards. [0044] The video encoder 20 and the video decoder 30 each may be implemented as any of a variety of suitable encoder and/or decoder circuitry, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. When implemented partially in software, an electronic device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding/decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in a respective device. [0045] FIG. 2 is a block diagram illustrating an exemplary video encoder 20 in accordance with some implementations described in the present application. The video encoder 20 may perform intra and inter predictive coding of video blocks within video frames. Intra predictive coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter predictive coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that the term “frame” may be used as synonyms for the term “image” or “picture” in the field of video coding. [0046] As shown in FIG.2, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a Decoded Picture Buffer (DPB) 64, a summer 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra prediction processing unit 46, and an intra Block Copy (BC) unit 48. In some implementations, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and a summer 62 for video block reconstruction. An in-loop filter 63, such as a deblocking filter, may be positioned between the summer 62 and the DPB 64 to filter block boundaries to remove block artifacts from reconstructed video data. Another in-loop filter, such as an SAO filter, Cross Component Sample Adaptive Offset (CCSAO) filter, and/or Adaptive in-Loop Filter (ALF), may also be used in addition to the deblocking filter to filter an output of the summer 62. It should be illustrated that for the CCSAO technique, the present application is not limited to the embodiments described herein, and instead, the application may be applied to a situation where an offset is selected for any of a luma component, a Cb chroma component and a Cr chroma component according to any other of the luma component, the Cb chroma component and the Cr chroma component to modify said any component based on the selected offset. Further, it should also be illustrated that a first component mentioned herein may be any of the luma component, the Cb chroma component and the Cr chroma component, a second component mentioned herein may be any other of the luma component, the Cb chroma component and the Cr chroma component, and a third component mentioned herein may be a remaining one of the luma component, the Cb chroma component and the Cr chroma component. In some examples, the in- loop filters may be omitted, and the decoded video block may be directly provided by the summer 62 to the DPB 64. The video encoder 20 may take the form of a fixed or programmable hardware unit or may be divided among one or more of the illustrated fixed or programmable hardware units. [0047] The video data memory 40 may store video data to be encoded by the components of the video encoder 20. The video data in the video data memory 40 may be obtained, for example, from the video source 18 as shown in FIG.1. The DPB 64 is a buffer that stores reference video data (for example, reference frames or pictures) for use in encoding video data by the video encoder 20 (e.g., in intra or inter predictive coding modes). The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various examples, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components. [0048] As shown in FIG. 2, after receiving the video data, the partition unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning may also include partitioning a video frame into slices, tiles (for example, sets of video blocks), or other larger Coding Units (CUs) according to predefined splitting structures such as a Quad-Tree (QT) structure associated with the video data. The video frame is or may be regarded as a two- dimensional array or matrix of samples with sample values. A sample in the array may also be referred to as a pixel or a pel. A number of samples in horizontal and vertical directions (or axes) of the array or picture define a size and/or a resolution of the video frame. The video frame may be divided into multiple video blocks by, for example, using QT partitioning. The video block again is or may be regarded as a two-dimensional array or matrix of samples with sample values, although of smaller dimension than the video frame. A number of samples in horizontal and vertical directions (or axes) of the video block define a size of the video block. The video block may further be partitioned into one or more block partitions or sub-blocks (which may form again blocks) by, for example, iteratively using QT partitioning, Binary-Tree (BT) partitioning, Triple- Tree (TT) partitioning or any combination thereof. It should be noted that the term “block” or “video block” as used herein may be a portion, in particular a rectangular (square or non- square) portion, of a frame or a picture. With reference to, for example, HEVC and VVC, the block or video block may be or correspond to a Coding Tree Unit (CTU), a CU, a Prediction Unit (PU), or a Transform Unit (TU), and/or may be or correspond to a corresponding block, e.g., a Coding Tree Block (CTB), a Coding Block (CB), a Prediction Block (PB), or a Transform Block (TB). Alternatively or additionally, the block or video block may be or correspond to a sub-block of a CTB, a CB, a PB, a TB, etc. [0049] The prediction processing unit 41 may select one of a plurality of possible predictive coding modes, such as one of a plurality of intra predictive coding modes or one of a plurality of inter predictive coding modes, for the current video block based on error results (e.g., coding rate and the level of distortion). The prediction processing unit 41 may provide the resulting intra or inter prediction coded block (e.g., a predictive block) to the summer 50 to generate a residual block and to the summer 62 to reconstruct the encoded block for use as part of a reference frame subsequently. The prediction processing unit 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partition information, and other such syntax information to the entropy encoding unit 56. [0050] In order to select an appropriate intra predictive coding mode for the current video block, the intra prediction processing unit 46 within the prediction processing unit 41 may perform intra predictive coding of the current video block relative to one or more neighbor blocks in the same frame as the current block to be coded to provide spatial prediction. The motion estimation unit 42 and the motion compensation unit 44 within the prediction processing unit 41 perform inter predictive coding of the current video block relative to one or more predictive blocks in one or more reference frames to provide temporal prediction. The video encoder 20 may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data. [0051] In some implementations, the motion estimation unit 42 determines the inter prediction mode for a current video frame by generating a motion vector, which indicates the displacement of a video block within the current video frame relative to a predictive block within a reference frame, according to a predetermined pattern within a sequence of video frames. Motion estimation, performed by the motion estimation unit 42, may be a process of generating motion vectors, which may estimate motion for video blocks. A motion vector, for example, may indicate the displacement of a video block within a current video frame or picture relative to a predictive block within a reference frame. The predetermined pattern may designate video frames in the sequence as P frames or B frames. The intra BC unit 48 may determine vectors, e.g., block vectors, for intra BC coding in a manner similar to the determination of motion vectors by the motion estimation unit 42 for inter prediction, or may utilize the motion estimation unit 42 to determine the block vectors. [0052] A predictive block for the video block may be or may correspond to a block or a reference block of a reference frame that is deemed as closely matching the video block to be coded in terms of pixel difference, which may be determined by Sum of Absolute Difference (SAD), Sum of Square Difference (SSD), or other difference metrics. In some implementations, the video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision. [0053] The motion estimation unit 42 calculates a motion vector for a video block in an inter prediction coded frame by comparing the position of the video block to the position of a predictive block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in the DPB 64. The motion estimation unit 42 sends the calculated motion vector to the motion compensation unit 44 and then to the entropy encoding unit 56. [0054] Motion compensation, performed by the motion compensation unit 44, may involve fetching or generating the predictive block based on the motion vector determined by the motion estimation unit 42. Upon receiving the motion vector for the current video block, the motion compensation unit 44 may locate a predictive block to which the motion vector points in one of the reference frame lists, retrieve the predictive block from the DPB 64, and forward the predictive block to the summer 50. The summer 50 then forms a residual block of pixel difference values by subtracting pixel values of the predictive block provided by the motion compensation unit 44 from the pixel values of the current video block being coded. The pixel difference values forming the residual block may include luma or chroma component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video blocks of a video frame for use by the video decoder 30 in decoding the video blocks of the video frame. The syntax elements may include, for example, syntax elements defining the motion vector used to identify the predictive block, any flags indicating the prediction mode, or any other syntax information described herein. It is noted that the motion estimation unit 42 and the motion compensation unit 44 may be integrated together, which are illustrated separately for conceptual purposes in FIG.2. [0055] In some implementations, the intra BC unit 48 may generate vectors and fetch predictive blocks in a manner similar to that described above in connection with the motion estimation unit 42 and the motion compensation unit 44, but with the predictive blocks being in the same frame as the current block being coded and with the vectors being referred to as block vectors as opposed to motion vectors. In particular, the intra BC unit 48 may determine an intra- prediction mode to use to encode a current block. In some examples, the intra BC unit 48 may encode a current block using various intra-prediction modes, e.g., during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select, among the various tested intra-prediction modes, an appropriate intra-prediction mode to use and generate an intra-mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values using a rate-distortion analysis for the various tested intra-prediction modes, and select the intra-prediction mode having the best rate-distortion characteristics among the tested modes as the appropriate intra-prediction mode to use. Rate-distortion analysis generally determines an amount of distortion (or error) between an encoded block and an original, unencoded block that was encoded to produce the encoded block, as well as a bitrate (i.e., a number of bits) used to produce the encoded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various encoded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block. [0056] In other examples, the intra BC unit 48 may use the motion estimation unit 42 and the motion compensation unit 44, in whole or in part, to perform such functions for Intra BC prediction according to the implementations described herein. In either case, for intra block copy, a predictive block may be a block that is deemed as closely matching the block to be coded, in terms of pixel difference, which may be determined by SAD, SSD, or other difference metrics, and identification of the predictive block may include calculation of values for sub-integer pixel positions. [0057] Whether the predictive block is from the same frame according to intra prediction, or from a different frame according to inter prediction, the video encoder 20 may form a residual block by subtracting pixel values of the predictive block from the pixel values of the current video block being coded, forming pixel difference values. The pixel difference values forming the residual block may include both luma and chroma component differences. [0058] The intra prediction processing unit 46 may intra-predict a current video block, as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra block copy prediction performed by the intra BC unit 48, as described above. In particular, the intra prediction processing unit 46 may determine an intra prediction mode to use to encode a current block. For example, the intra prediction processing unit 46 may encode a current block using various intra prediction modes, e.g., during separate encoding passes, and the intra prediction processing unit 46 (or a mode selection unit, in some examples) may select an appropriate intra prediction mode to use from the tested intra prediction modes. The intra prediction processing unit 46 may provide information indicative of the selected intra-prediction mode for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in a bitstream. [0059] After the prediction processing unit 41 determines the predictive block for the current video block via either inter prediction or intra prediction, the summer 50 forms a residual block by subtracting the predictive block from the current video block. The residual video data in the residual block may be included in one or more TUs and is provided to the transform processing unit 52. The transform processing unit 52 transforms the residual video data into transform coefficients using a transform, such as a Discrete Cosine Transform (DCT) or a conceptually similar transform. [0060] The transform processing unit 52 may send the resulting transform coefficients to the quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, the quantization unit 54 may then perform a scan of a matrix including the quantized transform coefficients. Alternatively, the entropy encoding unit 56 may perform the scan. [0061] Following quantization, the entropy encoding unit 56 may use an entropy encoding technique to encode the quantized transform coefficients into a video bitstream, e.g., using Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), Syntax-based context-adaptive Binary Arithmetic Coding (SBAC), Probability Interval Partitioning Entropy (PIPE) coding, or another entropy encoding methodology or technique. The encoded bitstream may then be transmitted to the video decoder 30 as shown in FIG.1 or archived in the storage device 32 as shown in FIG. 1 for later transmission to or retrieval by the video decoder 30. The entropy encoding unit 56 may also use an entropy encoding technique to encode the motion vectors and the other syntax elements for the current video frame being coded. [0062] The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual block in the pixel domain for generating a reference block for prediction of other video blocks. A reconstructed residual block may be generated thereof. As noted above, the motion compensation unit 44 may generate a motion compensated predictive block from one or more reference blocks of the frames stored in the DPB 64. The motion compensation unit 44 may also apply one or more interpolation filters to the predictive block to calculate sub-integer pixel values for use in motion estimation. [0063] The summer 62 adds the reconstructed residual block to the motion compensated predictive block produced by the motion compensation unit 44 to produce a reference block for storage in the DPB 64. The reference block may then be used by the intra BC unit 48, the motion estimation unit 42, and the motion compensation unit 44 as a predictive block to inter predict another video block in a subsequent video frame. [0064] FIG. 3 is a block diagram illustrating an exemplary video decoder 30 in accordance with some implementations of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, a summer 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra prediction unit 84, and an intra BC unit 85. The video decoder 30 may perform a decoding process generally reciprocal to the encoding process described above with respect to the video encoder 20 in connection with FIG. 2. For example, the motion compensation unit 82 may generate prediction data based on motion vectors received from the entropy decoding unit 80, while the intra prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from the entropy decoding unit 80. [0065] In some examples, a unit of the video decoder 30 may be tasked to perform the implementations of the present application. Also, in some examples, the implementations of the present disclosure may be divided among one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform the implementations of the present application, alone, or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80. In some examples, the video decoder 30 may not include the intra BC unit 85 and the functionality of intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82. [0066] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by the other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source, such as a camera, via wired or wireless network communication of video data, or by accessing physical data storage media (e.g., a flash drive or hard disk). The video data memory 79 may include a Coded Picture Buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use in decoding video data by the video decoder 30 (e.g., in intra or inter predictive coding modes). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including Synchronous DRAM (SDRAM), Magneto-resistive RAM (MRAM), Resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are depicted as two distinct components of the video decoder 30 in FIG.3. But it will be apparent to one skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or off-chip relative to those components. [0067] During the decoding process, the video decoder 30 receives an encoded video bitstream that represents video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive the syntax elements at the video frame level and/or the video block level. The entropy decoding unit 80 of the video decoder 30 may use an entropy decoding technique to decode the bitstream to obtain quantized coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-prediction mode indicators and other syntax elements to the prediction processing unit 81. [0068] When the video frame is coded as an intra predictive coded (e.g., I) frame or for intra coded predictive blocks in other types of frames, the intra prediction unit 84 of the prediction processing unit 81 may generate prediction data for a video block of the current video frame based on a signaled intra-prediction mode and reference data from previously decoded blocks of the current frame. [0069] When the video frame is coded as an inter-predictive coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 produces one or more predictive blocks for a video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each of the predictive blocks may be produced from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, e.g., List 0 and List 1, using default construction techniques based on reference frames stored in the DPB 92. [0070] In some examples, when the video block is coded according to the intra BC mode described herein, the intra BC unit 85 of the prediction processing unit 81 produces predictive blocks for the current video block based on block vectors and other syntax elements received from the entropy decoding unit 80. The predictive blocks may be within a reconstructed region of the same picture as the current video block processed by the video encoder 20. [0071] The motion compensation unit 82 and/or the intra BC unit 85 determines prediction information for a video block of the current video frame by parsing the motion vectors and other syntax elements, and then uses the prediction information to produce the predictive blocks for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code video blocks of the video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter predictive encoded video block of the frame, inter prediction status for each inter predictive coded video block of the frame, and other information to decode the video blocks in the current video frame. [0072] Similarly, the intra BC unit 85 may use some of the received syntax elements, e.g., a flag, to determine that the current video block was predicted using the intra BC mode, construction information of which video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information to decode the video blocks in the current video frame. [0073] The motion compensation unit 82 may also perform interpolation using the interpolation filters as used by the video encoder 20 during encoding of the video blocks to calculate interpolated values for sub-integer pixels of reference blocks. In this case, the motion compensation unit 82 may determine the interpolation filters used by the video encoder 20 from the received syntax elements and use the interpolation filters to produce predictive blocks. [0074] The inverse quantization unit 86 inversely quantizes the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding unit 80 using the same quantization parameter calculated by the video encoder 20 for each video block in the video frame to determine a degree of quantization. The inverse transform processing unit 88 applies an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct the residual blocks in the pixel domain. [0075] After the motion compensation unit 82 or the intra BC unit 85 generates the predictive block for the current video block based on the vectors and other syntax elements, the summer 90 reconstructs a decoded video block for the current video block by summing the residual block from the inverse transform processing unit 88 and a corresponding predictive block generated by the motion compensation unit 82 and the intra BC unit 85. The decoded video block may also be referred to as a reconstructed block for the current video block. An in-loop filter 91 such as a deblocking filter, SAO filter, CCSAO filter, and/or ALF may be positioned between the summer 90 and the DPB 92 to further process the decoded video block. In some examples, the in-loop filter 91 may be omitted, and the decoded video block may be directly provided by the summer 90 to the DPB 92. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames used for subsequent motion compensation of next video blocks. The DPB 92, or a memory device separate from the DPB 92, may also store decoded video for later presentation on a display device, such as the display device 34 of FIG.1. [0076] In a typical video coding process (e.g., including a video encoding process and a video decoding process), a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other instances, a frame may be monochrome and therefore includes only one two-dimensional array of luma samples. [0077] As shown in FIG.4A, the video encoder 20 (or more specifically the partition unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs arranged consecutively in a raster scan order from left to right and from top to bottom. Each CTU is a largest logical coding unit and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set, such that all the CTUs in a video sequence have the same size being one of 128×128, 64×64, 32×32, and 16×16. But it should be noted that a CTU in the present disclosure is not necessarily limited to a particular size. As shown in FIG.4B, each CTU may include one CTB of luma samples, two corresponding coding tree blocks of chroma samples, and syntax elements used to code the samples of the coding tree blocks. The syntax elements describe properties of different types of units of a coded block of pixels and how the video sequence can be reconstructed at the video decoder 30, including inter or intra prediction, intra-prediction mode, motion vectors, and other parameters. In monochrome pictures or pictures having three separate color planes, a CTU may include a single coding tree block and syntax elements used to code the samples of the coding tree block. A coding tree block may be an N×N block of samples. [0078] To achieve a better performance, the video encoder 20 may recursively perform tree partitioning such as binary-tree partitioning, ternary-tree partitioning, quad-tree partitioning or a combination thereof on the coding tree blocks of the CTU and divide the CTU into smaller CUs. As depicted in FIG.4C, the 64×64 CTU 400 is first divided into four smaller CUs, each having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four CUs of 16×16 by block size. The two 16×16 CUs 430 and 440 are each further divided into four CUs of 8×8 by block size. FIG.4D depicts a quad-tree data structure illustrating the end result of the partition process of the CTU 400 as depicted in FIG. 4C, each leaf node of the quad-tree corresponding to one CU of a respective size ranging from 32×32 to 8×8. Like the CTU depicted in FIG.4B, each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of a frame of the same size, and syntax elements used to code the samples of the coding blocks. In monochrome pictures or pictures having three separate colour planes, a CU may include a single coding block and syntax structures used to code the samples of the coding block. It should be noted that the quad-tree partitioning depicted in FIGS. 4C and 4D is only for illustrative purposes and one CTU can be split into CUs to adapt to varying local characteristics based on quad/ternary/binary-tree partitions. In the multi-type tree structure, one CTU is partitioned by a quad-tree structure and each quad-tree leaf CU can be further partitioned by a binary and ternary tree structure. As shown in FIG. 4E, there are multiple possible partitioning types of a coding block having a width W and a height H, i.e., quaternary partitioning, vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, vertical extended ternary partitioning, horizontal ternary partitioning, and horizontal extended ternary partitioning. [0079] In some implementations, the video encoder 20 may further partition a coding block of a CU into one or more M×N PBs. A PB may include a rectangular (square or non-square) block of samples on which the same prediction, inter or intra, is applied. A PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements used to predict the PBs. In monochrome pictures or pictures having three separate color planes, a PU may include a single PB and syntax structures used to predict the PB. The video encoder 20 may generate predictive luma, Cb, and Cr blocks for luma, Cb, and Cr PBs of each PU of the CU. [0080] The video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks for a PU. If the video encoder 20 uses intra prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of the frame associated with the PU. If the video encoder 20 uses inter prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of one or more frames other than the frame associated with the PU. [0081] After the video encoder 20 generates predictive luma, Cb, and Cr blocks for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the CU’s predictive luma blocks from its original luma coding block such that each sample in the CU’s luma residual block indicates a difference between a luma sample in one of the CU’s predictive luma blocks and a corresponding sample in the CU’s original luma coding block. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, such that each sample in the CU’s Cb residual block indicates a difference between a Cb sample in one of the CU’s predictive Cb blocks and a corresponding sample in the CU’s original Cb coding block, and each sample in the CU’s Cr residual block may indicate a difference between a Cr sample in one of the CU’s predictive Cr blocks and a corresponding sample in the CU’s original Cr coding block. [0082] Furthermore, as illustrated in FIG.4C, video encoder 20 may use quad-tree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks respectively. A transform block may include a rectangular (square or non-square) block of samples on which the same transform is applied. A TU of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements used to transform the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with the TU may be a sub-block of the CU’s luma residual block. The Cb transform block may be a sub-block of the CU’s Cb residual block. The Cr transform block may be a sub-block of the CU’s Cr residual block. In monochrome pictures or pictures having three separate color planes, a TU may include a single transform block and syntax structures used to transform the samples of the transform block. [0083] Video encoder 20 may apply one or more transforms to a luma transform block of a TU to generate a luma coefficient block for the TU. A coefficient block may be a two-dimensional array of transform coefficients. A transform coefficient may be a scalar quantity. The video encoder 20 may apply one or more transforms to a Cb transform block of a TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to a Cr transform block of a TU to generate a Cr coefficient block for the TU. [0084] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. After the video encoder 20 quantizes a coefficient block, the video encoder 20 may apply an entropy encoding technique to encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream that includes a sequence of bits that form a representation of coded frames and associated data, which is either saved in the storage device 32 or transmitted to the destination device 14. [0085] After receiving a bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct the frames of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally reciprocal to the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform inverse transforms on the coefficient blocks associated with TUs of a current CU to reconstruct residual blocks associated with the TUs of the current CU. The video decoder 30 also reconstructs the coding blocks of the current CU by adding the samples of the predictive blocks for PUs of the current CU to corresponding samples of the transform blocks of the TUs of the current CU. After reconstructing the coding blocks for each CU of a frame, video decoder 30 may reconstruct the frame. [0086] As noted above, video coding achieves video compression using primarily two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction). It is noted that Intra Block Copy (IBC) could be regarded as either intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to the coding efficiency than intra-frame prediction because of the use of motion vectors for predicting a current video block from a reference video block. [0087] But with the ever-improving video data capturing technology and more refined video block size for preserving details in the video data, the amount of data required for representing motion vectors for a current frame also increases substantially. One way of overcoming this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial and temporal domains have similar video data for predicting purpose but the motion vectors between these neighboring CUs are also similar. Therefore, it is possible to use the motion information of spatially neighboring CUs and/or temporally co-located CUs as an approximation of the motion information (e.g., motion vector) of a current CU by exploring their spatial and temporal correlation, which is also referred to as “Motion Vector Predictor (MVP)” of the current CU. [0088] Instead of encoding an actual motion vector of the current CU into the video bitstream (e.g., the actual motion vector being determined by the motion estimation unit 42 as described above in connection with FIG.2), the motion vector predictor of the current CU is subtracted from the actual motion vector of the current CU to produce a Motion Vector Difference (MVD) for the current CU. By doing so, there is no need to encode the motion vector determined by the motion estimation unit 42 for each CU of a frame into the video bitstream, and the amount of data used for representing motion information in the video bitstream can be significantly decreased. [0089] Like the process of choosing a predictive block in a reference frame during inter-frame prediction of a code block, a set of rules can be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also known as a “merge list”) for a current CU using those potential candidate motion vectors associated with spatially neighboring CUs and/or temporally co-located CUs of the current CU and then selecting one member from the motion vector candidate list as a motion vector predictor for the current CU. By doing so, there is no need to transmit the motion vector candidate list itself from the video encoder 20 to the video decoder 30, and an index of the selected motion vector predictor within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor within the motion vector candidate list for encoding and decoding the current CU. Thus, only the index of the selected motion vector predictor needs to be sent from the video encoder 20 to the video decoder 30. [0090] A brief description for CTU partitioning in Enhanced Compression Model (ECM) is provided herein. In HEVC, a CTU can be split into CUs by using a quaternary-tree structure (denoted as a coding tree) to adapt to various local characteristics. A decision whether to code a picture area using inter-picture (temporal) or intra-picture (spatial) prediction can be made at the leaf CU level. Each leaf CU can be further split into one, two, or four PUs according to a PU splitting type. Within each PU, the same prediction process can be applied, and the relevant information can be transmitted to the video decoder 30 on a PU basis. After obtaining a residual block by applying the prediction process based on the PU splitting type, the leaf CU can be partitioned into transform units (TUs) according to another quaternary-tree structure similar to the coding tree for the CU. A feature of the HEVC structure includes that it has multiple partition unit concepts such as CU, PU, and TU. [0091] In VVC, a quadtree with a nested multi-type tree using a binary-split or ternary-split structure replaces the concepts of the multiple partition unit types (e.g., CU, PU, TU) in HEVC. For example, in VCC the separation of the CU, PU, and TU concepts is removed except as needed for CUs that have a size too large for the maximum transform length, thereby supporting a higher flexibility for CU partition shapes. In the coding tree structure, a CU can have either a square or rectangular shape. A CTU is first partitioned by a quaternary tree (a.k.a. quadtree) structure. Then, the quaternary tree leaf nodes can be further partitioned by a multi-type tree structure. As shown in FIG. 4E, there are various splitting types in the multi-type tree structure, including vertical binary splitting (SPLIT_BT_VER), horizontal binary splitting (SPLIT_BT_HOR), vertical ternary splitting (SPLIT_TT_VER), and horizontal ternary splitting (SPLIT_TT_HOR). The multi-type tree leaf nodes are referred to as CUs. Unless a CU is too large for the maximum transform length, this segmentation with the multi-type tree structure is used for prediction and transform processing without any further partitioning. This means that, in most cases, the CU, PU, and TU have the same block size in the quadtree with the nested multi-type tree coding block structure. An exception occurs when the supported maximum transform length is smaller than a width or height of the color component of the CU. [0092] FIG. 5 illustrates a diagram of intra modes in accordance with some examples. In general, a basic intra prediction scheme applied in VVC is almost the same as that of HEVC, except that several prediction tools are further extended, added and/or improved, e.g., extended intra prediction with wide-angle intra modes, Multiple Reference Line (MRL) intra prediction, Position-Dependent intra Prediction Combination (PDPC), ISP prediction, Cross-Component Linear Model (CCLM) prediction, and Matrix weighted Intra Prediction (MIP). [0093] A brief description for extended intra prediction with wide-angle intra modes is provided herein. Like HEVC, VVC uses a set of reference samples neighboring a current CU (e.g., samples above the current CU and left to the current CU) to predict samples of the current CU. However, to capture finer edge directions present in natural video (especially for video content in high resolutions, e.g., 4K), the number of angular intra modes is extended from 33 in HEVC to 93 in VVC. As shown in FIG.5, among the 93 angular intra modes, modes 2 to 66 are conventional angular intra modes, and modes -1 to -14 and modes 67 to 80 are wide-angle intra modes. In addition to the angular intra modes, the planar mode (mode 0 in FIG.5) and Direct Current (DC) mode (mode 1 in FIG.5) of HEVC are also applied in VVC. [0094] Since a quad/binary/ternary tree partition structure is applied in VVC, besides video blocks in a square shape, rectangular video blocks also exist for the intra prediction in VVC. Due to unequal width and height of one given video block, various sets of angular intra modes may be selected from the 93 angular intra modes for different block shapes. For example, for both square and rectangular video blocks, besides planar and DC modes, 65 angular intra modes among the 93 angular intra modes are also supported for each block shape. When a rectangular block shape of a video block satisfies a certain condition, an index of a wide-angle intra mode of the video block may be adaptively determined by video decoder 30 according to an index of a conventional angular intra mode received from video encoder 20 using a mapping relationship as shown in Table 1 below. That is, for non-square blocks, the wide-angle intra modes are signaled by video encoder 20 using the indexes of the conventional angular intra modes, which are mapped to indexes of the wide- angle intra modes by video decoder 30 after being parsed, thus ensuring that a total number (i.e., 67) of intra modes (i.e., the planar mode, the DC mode and 65 angular intra modes among the 93 angular intra modes) is unchanged, and the intra mode coding method is unchanged. As a result, a good efficiency of signaling intra modes is achieved while providing a consistent design across different block sizes. [0095] The following Table 1 shows a mapping relationship between indexes of conventional angular intra modes and indexes of wide-angle intra modes for the intra prediction of different block shapes in VCC, wherein W represents a width of a video block, and H represents a height of the video block. Table 1
Figure imgf000026_0001
Figure imgf000027_0001
[0096] As shown in FIGS 6A and 6B, top reference samples (illustrated in gray color) with length 2W+1 and the left reference samples (illustrated in gray color) with length 2H+1 are used for wide-angle intra prediction to support the angular intra modes. [0097] As shown in FIG.7, a current video block (e.g., a current CU) is a flat rectangle and an interpolation angle Į^^^^^ degrees, two vertically-adjacent predicted samples (e.g., 702 and 704) may be respectively predicted based on two non-adjacent reference samples (e.g., 706 and 708) in the case of wide-angle intra prediction. Low-pass reference samples filter and side smoothing can be applied to the wide-DQJOH^SUHGLFWLRQ^WR^UHGXFH^WKH^QHJDWLYH^HIIHFW^RI^WKH^LQFUHDVHG^JDS^¨SĮ in FIG. 7. When a wide-angle mode represents a non-fractional offset, 8 modes in the wide-angle PRGHV^VDWLVI\^WKLV^FRQGLWLRQ^^ZKLFK^DUH^>í^^^^í^^^^í^^^^í^^^^^^^^^^^^^^^^^@^^:KHQ^D^video block is predicted by these modes, samples in the reference buffer are directly copied without applying any interpolation. With such a modification, the number of samples needed to be smoothed is reduced. In addition, the modification aligns the design of non-fractional modes in the conventional prediction modes and wide-angle modes. [0098] In VVC, 4:2:2 and 4:4:4 chroma formats are supported as well as 4:2:0. Chroma derived mode (DM) derivation table for 4:2:2 chroma format was initially ported from HEVC extending the number of entries from 35 to 67 to align with the extension of intra prediction modes. Since HEVC specification does not support interpolation angles EHORZ^í^^^^GHJUHHs and above 45 degrees, luma intra prediction modes ranging from 2 to 5 are mapped to 2. Therefore, chroma DM derivation table for 4:2:2: chroma format is updated by replacing some values of the entries of the mapping table to convert interpolation angle more precisely for chroma blocks. [0099] As mentioned earlier, the intra prediction samples are generated from a set of neighboring reference samples, which may introduce discontinuities along block boundaries between a current video block and neighboring video blocks thereof. The PDPC tool can be used in VVC to solve such problems by employing a weighted combination of intra prediction samples with boundary reference samples. In VVC, PDPC may be enabled for the following intra modes without signaling: planar mode, DC mode, angular intra modes with indexes less than or equal to that of a horizontal intra mode (i.e., mode 18), and angular intra modes with indexes greater than or equal to that of a vertical intra mode (i.e., mode 50) and less than or equal to 80. If a Block Differential Pulse Coded Modulation (BDPCM) mode is applied for the current block or an index of a selected row/column of reference samples for MRL intra prediction is greater than 0, PDPC is not applied. [0100] FIG. 8 illustrates an interpolation of a sample in a current video block for intra prediction in planar mode in accordance with some implementations of the present disclosure. As shown in FIG. 8, sample 802 is one of samples in the current video block that is to be predicted/interpolated. Reference samples of the current video block for interpolating samples (e.g., 802) of the current video block located above and left to the current video block are illustrated in gray squares. A top-right reference sample 804 located at coordinate (W, -1) with a value of p>:@>-^@^ LV^ XVHG^ DV^ D^ ULJKW^ UHIHUHQFH^ IRU^ DOO^ WKH^ KRUL]RQWDO^ ILOWHULQJ. Similarly, a bottom-left reference sample 806 located at coordinate (-1, H) with a value of p[-^@>+@^LV^XVHG^DV^a bottom reference for all the vertical operations, where W and H are the width and the height of the current video block, respectively. Reference sample 808 has the same horizontal coordinate as sample 802 and reference sample 810 has the same vertical coordinate as sample 802. If sample 802 locates at coordinate (x, y), reference samples 808 and 810 locate at (x, -1) and (-1, y), respectively. A horizontal prediction ph>[@>\@^DQG^a vertical prediction pv>[@>\@^IRU^sample 802 are calculated according to Equations (1-1) and (1-2) as follows:
Figure imgf000028_0001
[0101] A prediction value of sample 802 is calculated by averaging the horizontal and the vertical predictions on sample basis according to Equation (2):
Figure imgf000029_0001
where ب denotes a bitwise right shift operation, and ا denotes a bitwise left shift operation. [0102] FIG.9 is a block diagram illustrating an exemplary sample prediction process 900 in accordance with some implementations of the present disclosure. In some implementations, sample prediction process 900 can be performed by prediction processing unit 41 of video encoder 20, or prediction processing unit 81 of video decoder 30. In some implementations, sample prediction process 900 may be performed by a processor (e.g., a processor 2520 as shown in FIG. 25) on an encoder side or a decoder side. For illustration purposes only, the following description of FIG.9 is provided with respect to the processor. In some implementations, sample prediction process 900 may include a reference sample determination 902, a block-level interpolation direction determination 904 or a sample-specific interpolation direction determination 906, and a sample interpolation 908. FIG.9 is described below together with FIGS.10-15. [0103] Initially, the processor may receive a plurality of reconstructed samples in neighboring block regions (e.g., previously decoded blocks) in a video frame of a video. In VVC and ECM standards, the neighboring video blocks are located on a left neighboring region of the current video block, a top neighboring region of the current video block, or both illustrated in gray squares as shown in FIG.8. In other current or future standards, the reconstructed samples may be located on any neighboring regions of the current video block illustrated in gray squares as shown in FIG. 10. [0104] In some implementations, to implement reference sample determination 902, the processor may determine reference samples in the neighboring video blocks according to two slant lines through a sample of the current video block. One of the two slant lines is along an interpolation direction and the other slant line is perpendicular to the first slant line. For example, as shown in FIG.10, slant line 1012 is perpendicular to slant line 1014 on sample 1002. When the interpolation direction of sample 1002 is along with slant line 1012, four reconstructed samples (e.g., sample 1004, sample 1006, sample 1008, and sample 1010) are determined by the processor according to slant lines 1012 and 1014 as reference samples for interpolating sample 1002 in the current video block. The processor may generate a prediction of sample 1002 based on sample 1004, sample 1006, sample 1008, and sample 1010 according to bilinear interpolation. [0105] In some implementations, the processor interpolates each of samples in the current video block along a single interpolation direction. That is, the interpolation direction is a block- level interpolation direction. For example, as shown in FIG. 11, a block-level interpolation direction with interpolation angles of ^1 and ^2 is used to interpolate all samples in the current video block (e.g., samples 1102 and 1104). [0106] In some implementations, block-level interpolation direction determination 904 may be implemented by a processor in an encoder (e.g., video encoder 20). The processor determines the block-level interpolation direction of the current video block according to a predetermined set of candidate interpolation directions. For example, the predetermined set of candidate interpolation directions may include but not limited to
Figure imgf000030_0001
(i.e., {0, 30°, 45°, 60°, 135°}). The processor calculates the rate-distortion cost of the current video block when the video block is interpolated according to each of the candidate interpolation directions. In some implementations, for each candidate interpolation direction, the processor first determines reference samples along the candidate interpolation direction for each sample and interpolates the sample based on the determined reference samples. The distance between the sample and each of the reference samples are used as weights in the interpolation. The processor then calculates a rate-distortion cost of the sample, where the rate-distortion cost of the sample is determined based on an amount of distortion between the interpolated sample and the original, uncoded sample. The processor further sums up the rate-distortion costs of all the samples in the current video block as the rate-distortion cost of the current video block. The processor determines the candidate interpolation direction associated with the rate-distortion cost having a minimum value as the block-level interpolation direction. The processor may generate a syntax element (e.g., planar_pred_dir) and signal the determined block-level interpolation direction into a bitstream to a decoder (e.g., decoder 30). A processor in the decoder (e.g., video decoder 30) may receive coded current video block and an index (e.g., the syntax element) signaling the block-level interpolation direction. The processor in the decoder may decode the coded current video block based on the received the syntax element. [0107] As shown in FIG.11, because interpolation angles θ1 = 45° and θ2 = 135°, all reference samples used for interpolating samples in the current video block (e.g., samples 1102 and 1104) lie on the interpolation direction. In some implementations, reference samples do not lie on the interpolation direction. For example, FIG. 12 illustrates a diagram of intra prediction using fractional reference samples to interpolate a sample in a video block in accordance with some implementations of the present disclosure. Interpolation angleθ in FIG.12 is not equal to 45° or 135°, some of the reconstructed samples (illustrated in gray squares) in the neighboring block regions may not lie on the interpolation direction (illustrated in dashed arrow lines). The processor generates fractional reference samples (e.g., samples 1204, 1206, 1208, and 1210) by interpolating two adjacent reconstructed samples nearest to the interpolation direction (e.g., dash dot lines 1212 and 1214). As shown in FIG.12, fractional reference sample 1204 (illustrated in dashed square) is generated by interpolating reconstructed samples 1204-1 and 1204-2. Similarly, fractional reference sample 1206 (illustrated in dashed square) is generated by interpolating reconstructed samples 1206-1 and 1206-02. Fractional reference sample 1208 (illustrated in dashed square) is generated by interpolating reconstructed samples 1208-1 and 1208-02. Fractional reference sample 1210 (illustrated in dashed square) is generated by interpolating reconstructed samples 1210-1 and 1210-02. [0108] In some implementations, the processor can calculate coordinates of the fractional reference samples based on the width and the height of the current video block and the interpolation direction of the current video block according to Equations (3-1) – (6-2):
Figure imgf000031_0001
Figure imgf000032_0001
where W and H denote a width and a height of the current video block, θ denotes an interpolation angle of the current video block and denotes the coordinate of the sample to be
Figure imgf000032_0002
interpolated (e.g., sample 1202 in FIG. 12), (x1, y1) denotes the coordinate of the fractional reference sample (e.g., sample 1204 in FIG.12) in the neighboring block region that is right to the current video block, (x2, y2) denotes the coordinate of the fractional reference sample (e.g., sample 1206 in FIG. 12) in the neighboring block region that is left to the current video block, (x3, y3) denotes the coordinate of the fractional reference sample (e.g., sample 1208 in FIG. 12) in the neighboring block region that is above the current video block, (x4, y4) denotes the coordinate of the fractional reference sample (e.g., sample 1210 in FIG.12) in the neighboring block region that is below the current video block. The processor then may determine weights used for interpolating each of the fractional reference samples based on the calculated coordinate of the fractional reference sample and the two adjacent reconstructed samples. The processor further interpolates the sample (e.g., sample 1202 in FIG.12) in the current video block based on the four fractional reference samples generated by the processor. [0109] The processor may use finite-precision interpolation for generating the fractional reference samples and interpolating the sample in the current video block. In some implementations, typical interpolation precision applied by the processor includes integer, ½, ¼, 1/8, 1/16, etc. For example, when the processor calculates the coordinate of the fractional reference sample using any of Equations (3-1) – (6-2), the calculated coordinate of the fractional reference samples is rounded to the nearest allowed fractional position. [0110] Consistent with the present disclosure, in VVC or ECM standards, because reconstructed samples below and right to the current video block are padded from the above-right and left-bottom samples of the current video block, the reference samples below and right to the current video block are not used for interpolating the current video block. For example, if the video is coded via VVC or ECM standards, the processor does not interpolate sample 1202 in FIG. 12 based on samples 1204 and 1210. Instead, the processor interpolates sample 1202 based on samples 1206 and 1208. If the reference samples below and right to the current video block can be generated for interpolating the current video block using other methods or in other standards, four reference samples are used for interpolating the current video block. [0111] In some implementations, to implement block-level interpretation direction determination 904, the interpolation direction of the current video block is inferred from the neighboring reconstructed samples in the encoder (e.g., video encoder 20) or the decoder (e.g., decoder 30). For example, FIG. 13 illustrates a diagram of intra prediction using second order gradients of reconstructed samples in neighboring video blocks to interpolate a sample in a video block in accordance with some implementations of the present disclosure. Three neighboring rows/columns of reconstructed sample (e.g., a zeroth line 1301, a first line 1303, and a second line 1305) in FIG.13 are used to infer the interpolation direction of the current video block. In some implementations, second order gradients of the neighboring reconstructed samples are used to decide the block-level interpolation direction. For each sample within the current video block (e.g., sample 1302 in FIG. 13), the second order gradients g1 and g2 along the inferred interpolation direction (e.g., line 1320) and its perpendicular direction (e.g., line 1322) are calculated according to Equation (7-1) and (7-2) as follows:
Figure imgf000033_0001
where ^ denote the right neighboring samples along the interpolation direction
Figure imgf000033_0003
(e.g., line 1320), and denote the left neighboring samples along the
Figure imgf000033_0004
perpendicular interpolation direction (e.g., line 1322). In some implementations, L1 norm or L2 norm is used to measure energy of the variation caused by the change between neighbouring reconstructed samples. A cost of the current video block can be calculated by summing up the costs of all samples in the current video block, where the cost of each sample in the current video block is calculated based on the second order gradients according to Equations (7-1) and (7-2) in L1 norm or L2 norm. The processor may calculate the cost of the current video block according to Equations (8) or (9), respectively.
Figure imgf000033_0002
Figure imgf000034_0001
[0112] In some implementations, as shown in Equations (7-1) and (7-2), the first order gradient is used to generate the second order gradient. The first order gradients
Figure imgf000034_0010
Figure imgf000034_0002
may be normalized based on distances between the neighboring reconstructed samples used for calculating the respective first order gradients. The second order gradients g1 and g2 are then calculated based on the normalized first order gradients according to Equations (10-1) and (10-2):
Figure imgf000034_0003
where denotes the distance between reconstructed samples
Figure imgf000034_0004
denotes the distance between reconstructed samples
Figure imgf000034_0008
denotes the distance between reconstructed samples
Figure imgf000034_0006
, and
Figure imgf000034_0007
, and denotes the distance between reconstructed
Figure imgf000034_0009
samples
Figure imgf000034_0005
[0113] In some implementations, reference samples in the zeroth line, the first line, or the second line may not lie on the interpolation direction. Consistent with the present disclosure, the processor may generate fractional reference samples (e.g., samples 1404, 1406, 1408, 1410, 1412, and 1414 in FIG.14) by interpolating two adjacent reconstructed samples in a same line (e.g., the zeroth line, the first line, or the second line) and nearest to the interpolation direction (e.g., dash dot lines 1420 and 1422). For example, the processor interpolates samples 1404, 1406, 1408, 1410, 1412, and 1414 using in a same interpolation method as it does for samples 1204, 1206, 1208, and 1210 in FIG.12. The generated fractional reference samples are then used to calculate a cost of the sample (e.g., sample 1402) in the current video block according to Equation (8) or Equation (9). [0114] In some implementations, to implement sample-specific interpolation direction determination 906, the processor may generate different sample-specific interpolation directions for interpolating each of a plurality of samples in the current video block. For example, FIG.15 illustrates a diagram of intra prediction using different sample-specific interpolation directions to interpolate samples in a video block in accordance with some implementations of the present disclosure. Lines 1510 and 1512 in FIG. 15 infer a hypothesis interpolation direction and the perpendicular hypothesis interpolation direction used for interpolating sample 1502, and lines 1514 and 1516 infer a hypothesis interpolation direction and the hypothesis perpendicular interpolation direction used for interpolating sample 1504. [0115] For each of the plurality of the samples in the current video block, the processor determines a sample-specific interpolation direction for each individual sample based on a cost when the sample is interpolated according to each of the plurality of hypothesis interpolation directions. The cost of the sample (e.g., sample 1302) at coordinates (x, y) may be calculated according to L1 norm or L2 of the second order gradient using Equation (11) or Equation (12) as follows:
Figure imgf000035_0001
wherein ^
Figure imgf000035_0002
, , , denote the right neighboring samples along the interpolation direction (e.g., line 1320), and
Figure imgf000035_0003
denote the left neighboring samples along the perpendicular interpolation direction (e.g., line 1322). Further, the processor calculates a cost according to each of the hypothesis interpolation directions of the sample according to Equations (11) or (12). The processor determines the hypothesis interpolation direction associated with the cost having a minimum value as the sample-specific interpolation direction. [0116] In some implementations, consistent with the present disclosure, first order gradients in Equations (11)
Figure imgf000035_0004
and (12) may be normalized based on distances between the neighboring reconstructed samples used for calculating the respective first order gradients. Cost1 in L1 norm and cost 2 in L2 norm may be calculated based on the normalized first order gradients according to Equations (13) and (14) as follows:
Figure imgf000035_0005
where ^^ denotes the distance between reconstructed samples denotes the
Figure imgf000035_0007
distance between reconstructed samples and denotes the distance between
Figure imgf000035_0006
reconstructed samples
Figure imgf000036_0002
, and denotes the distance between reconstructed samples
Figure imgf000036_0001
[0117] Consistent with the present disclosure, when one or more reconstructed samples in the neighboring block regions do not lie on the hypothesis interpolation direction of the sample, the processor may first generate a fractional reference sample by interpolating two adjacent reconstructed samples nearest to the hypothesis interpolation direction as shown in FIG.14. The processor then uses the generated fractional reference samples to interpolate the sample along the hypothesis interpolation direction. [0118] Referring to FIG. 9, to implement sample interpolation 908, the processor may interpolate the current video block based on either the determined block-level interpolation direction or sample-specific interpolation block. If the processor is on the encoder side and the block-level interpolation direction is determined from a predetermined set of candidate interpolation directions, the processor may generate an index of the predetermined block-level interpolation direction and then signal the index in a bitstream to the decoder. If the processor is on the decoder side and receives an index indicating a block-level interpolation direction along with coded video block, the processor may interpolate the coded video block based on the received block-level interpolation direction. [0119] FIG.16 is a flow chart of an exemplary method for performing intra prediction on a video block in accordance with some implementations of the present disclosure. Method 1600 may be implemented by a processor associated with video encoder 20 or video decoder 30. The sample prediction process described in connection with FIG.9 may be used to implement method 1600. Method 1600 may include steps 1602-1610, among which steps 1604-1606 may be optional, as described below. Some of the steps may be optional to perform the disclosure provided herein. Further, some of the steps may be performed simultaneously, or in a different order than shown in FIG.16. [0120] In step 1602, the processor may receive a video frame of a video. The video frame may include a group of reconstructed samples or blocks that are neighboring block regions of a video block to be predicted (e.g., current video block in FIGS.10-15). The current video block can be a CTU, or a CU/PU. The processor may further receive a predetermined set of candidate interpolation direction coded in the current video block or the video frame. [0121] In some implementations of method 1600, steps 1604 and 1606 may be optionally performed to determine the interpolation direction used in step 1608. [0122] In step 1604, the processor may determine a block-level interpolation direction for the current video block based on the received reconstructed samples in the neighboring block regions. In some implementations, an explicit method may be used to determine the block-level interpolation direction on the encoder side. The processor may determine reference samples based on the received set of candidate interpolation directions. The processor may calculate a rate- distortion cost of the current video block when the current video block is interpolated according to each of a plurality of candidate interpolation directions. The candidate interpolation direction associated with the rate-distortion cost having a minimum value is determined by the processor as the block-level interpolation direction. In some implementations, the processor determines the block-level interpolation direction implicitly based on second order gradients of the neighboring reconstructed samples. The implicit method can be performed on either the encoder side or the decoder side. For example, the processor first calculates a cost of each sample in the current video block based on the second order gradients of the neighboring reconstructed samples in each hypothesis interpolation direction. A sum of the cost of each sample is used as a cost of the current video block to determine the block-level interpolation direction among the hypothesis interpolation directions. That is, the processor determines a hypothesis interpolation direction associated with the cost of the current video block having a minimum value as the block-level interpolation direction. [0123] In Alternative to step 1604, in step 1606, the processor may determine different sample- specific interpolation directions for each of the samples in the current video block. That is, each sample in the current video block uses an individual sample-specific interpolation direction for interpolation. To determine the sample-specific interpolation direction for each sample, the processor may calculate a cost of each sample in the current video block based on the second order gradients of the neighboring reconstructed samples in each hypothesis interpolation direction. The processor further determines a hypothesis interpolation direction associated with the cost of the sample having a minimum value as the sample-specific interpolation direction for the sample. [0124] If the processor is on the encoder side and the block-level interpolation direction is selected from the predetermined set of candidate interpolation directions, after step 1604 or 1606, the processor may generate an index for the block-level interpolation direction and signal the index in a bitstream to the decoder. [0125] In step 1608, the processor determines reference samples in neighboring video blocks of the video block along the interpolation direction of each sample of the current video block. For example, the processor determines that reconstructed samples lie on a line through the sample along the interpolation direction or a line through the sample along the perpendicular interpolation direction as the reference samples for interpolating the corresponding sample in the current video block. If the reconstructed samples do not lie on the interpolation direction or on the perpendicular interpolation direction, the processor may generate fractional reference samples based on the two adjacent reconstructed samples nearest to the line along the interpolation direction or the line along the perpendicular interpolation direction. The fractional reference samples are then used for interpolating the corresponding sample in the current video block. [0126] In step 1610, the processor may interpolate each sample of the current video block based on reference samples. [0127] In some implementations, if the processor is on the decoder side, it may receive an index indicating a block-level interpolation direction along with coded video block, and interpolate the coded video block based on the block-level interpolation direction signaled in the received bitstream. In some other implementations, the decoder processor may determine the interpolation direction on its own, e.g., using an implicit method described in part of steps 1604 (to determine a block-level interpolation direction) and 1606 (to determine a sample-specific interpolation direction). In some implementations, reference samples in the planar mode are first smoothed before being used to interpolate samples in the current video block. For example, in the VVC and ECM standards, the reference samples are filtered by a fixed filter with coefficients [^^^^^@^^^EHIRUH^ being used to interpolate other samples. In another example, Adaptive Loop Filter (ALF) technique is used to capture the diverse property of video coding by deriving the filtering coefficient for each CTU. In some implementations, an adaptive reference sample filter can be used to filter the reference samples for intra prediction in planar mode. For example, FIG. 17 is an illustration of exemplary adaptive reference sample filtering in accordance with some implementations of the present disclosure. A three-tap filter [r0, r1, r2@^ shown in FIG. 17 is used to smooth reference samples (e.g., sample 1504) in the neighboring video blocks above the current video block, and another three-tap filter [c0, c1, c2@^LV^XVHG^WR^VPRRWK^UHIHUHQFH^VDPSOHV^(e.g., sample 1506) in the neighboring video blocks left to the current video block. Samples 1704 and 1706 in FIG.17 are reference samples used to interpolate sample 1702 in plana mode. Consistent with the present disclosure, if sample 1702 locates at coordinate (x, y), samples 1704 and 1706 locate at coordinates (x, -1) and (-1, y), respectively. A filtered value of sample 1704 can be calculated based on unfdtered values of sample 1704 and its two adjacent samples (e.g., samples 1704-1 and 1704-2) in the same row based on filter Similarly, a filtered value of sample 1706 can be
Figure imgf000039_0006
calculated based on unfiltered values of sample 1704 and its two adjacent samples (e.g., samples 1706-1 and 1706-2) in the same column based on filter [
Figure imgf000039_0015
The filtered value of samples 1704 and 1706 can be calculated according to Equations (15-1) and (15-2) as follows:
Figure imgf000039_0001
where P/[x][— 1] denotes the filtered value of sample 1704 based on filter
Figure imgf000039_0007
p[x — 1] [— 1] denotes the unfiltered value of sample 1704-1, denotes the unfiltered
Figure imgf000039_0017
value of sample 1704, denotes the unfiltered value of sample 1704-2,
Figure imgf000039_0016
Figure imgf000039_0014
denotes the filtered value of sample 1706 based on denotes the unfdtered
Figure imgf000039_0008
value of sample 1706-1, denotes the unfiltered value of sample 1706, and
Figure imgf000039_0009
Figure imgf000039_0013
denotes the unfdtered value of sample 1706-2.
[0128] Consistent with the present disclosure, horizontal interpolated values
Figure imgf000039_0010
and vertical interpolated values
Figure imgf000039_0012
for sample 1702 in planar mode can be calculated according to Equations (16-1) and (16-2):
Figure imgf000039_0002
[0129] Apredicted value of sample 1702 can be obtainedbased on an average of the horizontal and vertical interpolated values
Figure imgf000039_0011
according to Equation (17) as follows:
Figure imgf000039_0003
[0130] In some implementations, a cost function of samples (e.g., sample 1702) in the current video block is defined as:
Figure imgf000039_0004
where s[x][y] denotes the original value of the sample, and q[x] [y] is the predicted value of the sample interpolated from the reference samples. In some implementations, Equation (18) can be solved with Wiener-Hopf equations as in ALF method. In some alternative implementations, the processor may use a least square method to optimize the filter coefficients
Figure imgf000039_0005
and/or [c0, c1, c2@) to minimize the cost value in the cost function (e.g., Equation (18)). When the processor is in the encoder (e.g., video encoder 20), the processor signals the optimized filter coefficients in a bitstream to the decoder (e.g., decoder 30). [0131] In some implementations, the processor in the encoder may receive a set of predetermined candidate filters. The processor calculates the cost value using Equation (18) according to each of the received candidate filters. The processor then determines the filter associated with the cost having a minimum value as the optimal filter. The processor may quantize the optimal filter into integer type. Further, the processor generates an index of the optimal filter in a bitstream and signals the index to the decoder. It is understood that the type of filter used for filtering reference samples is not limited to a 3-tap filter, any other type of filters (e.g., 2-tap filter, 4-tap filter) can be incorporated into this disclosure. In some implementations, a single filter is used for filtering all reference samples. In some alternative implementations, different filters (e.g., filter [r0, r1, r2@^DQG^ILOWHU^>c0, c1, c2@ in FIG.17) are used for filtering different reference samples. [0132] In some implementations, filter coefficients can be derived using reconstructed samples by a processor either on the encoder side or on the decoder side. For example, FIG. 18 is an illustration of exemplary derivation of an adaptive reference sample filter using reconstructed samples in accordance with some implementations of the present disclosure. As shown in FIG.18, four lines of reconstructed samples in neighboring blocks (e.g., zeroth line 1801, first line 1803, second line 1805, and third line 1807) are used for determining adaptive reference sample filters (e.g., filter [r0, r1, r2@^DQG^ILOWHU^>c0, c1, c2@^^ Third line 1807 is used as reference samples to predict samples in zeroth line 1801, first line 1803, and second line 1805. The filter [r0, r1, r2@^filter may filter the samples in row of third line 1807, and the filter [c0, c1, c2@^PD\^ ILOWHU^ WKH^ VDPSOHV^ LQ^ column of third line 1807. Each sample in zeroth line 1801, first line 1803, and second line 1805 can be interpolated by filtered samples in third line 1907. For example, as shown in FIG. 18, samples 1804-1 and 1804-2 are first filtered using filter [r0, r1, r2@^DQG^ILOWHU^>c0, c1, c2@ by equations like Equations (15-1), (15-2), respectively. Then, sample 1804 can be interpolated based on filtered sample 1804-1 and 1804-2 by equations like Equations (16-1), (16-2), and (17). A cost function, like Equation (18), for all of the predictive samples (e.g., samples in zeroth line 1801, first line 1803, second line 1805, and third line 1807) can be optimized and the filter coefficients (e.g., [r0, r1, r2@, [c0, c1, c2@^ can be solved with Wiener-Hopf equations. The optimized filters may be used to filter reference samples (e.g., in zeroth line 1801). The filtered reference samples are used to interpolate samples in the current video block in planar mode. [0133] It is understood that the type of filter used for filtering reconstructed samples is not limited to a 3-tap filter, any other type of filters (e.g., 2-tap filter, 4-tap filter) can be incorporated into this disclosure. In some implementations, a single filter can be used for filtering all reconstructed samples. In some alternative implementations, different filters (e.g., filter [r0, r1, r2@^ and filter [c0, c1, c2@^LQ^),*^^^8) are used for filtering different reconstructed samples. [0134] FIG.19 is a flow chart of an exemplary method for performing planar prediction with an adaptive reference sample filter in accordance with some implementations of the present disclosure. Method 1900 may be implemented by a processor associated with video encoder 20 or video decoder 30. Method 1900 may include steps 1902-1908 as described below. Some of the steps may be optional to perform the disclosure provided herein. Further, some of the steps may be performed simultaneously, or in a different order. [0135] In step 1902, the processor may receive a video frame of a video. The video frame may include a group of reconstructed samples or blocks that are neighboring block regions of a video block to be predicted (e.g., current video block in FIGS.17-18). The current video block can be a CTU, or a CU/PU. [0136] In step 1904, for each sample in the current video block, the processor may determine the reference samples for performing planar prediction. For example, as shown in FIG.17, samples 1704 and 1706 are determined by the processor as the reference samples for interpolating sample 1702 in planar mode. [0137] In step 1906, the processor applies at least one adaptive reference sample filter to the reference samples determined in step 1904. For example, as shown in FIG.17, filter [r0, r1, r2@^ and filter [c0, c1, c2@^DUH^DSSOLHG^to samples 1704 and 1706, respectively. [0138] In step 1908, the processor performs the planar prediction on each of the samples in the current video block using the reference samples filtered in step 1906. For example, sample 1702 in FIG.17 is interpolated in planar mode based on filtered samples 1704 and 1706. [0139] In some implementations, adaptive sample filtering (e.g., method 1900) can be performed in conjunction with directional planar interpolation (e.g., method 1600). For example, method 1900 may be performed between steps 1608 and 1610 of method 1600. However, it is contemplated that adaptive sample filtering and directional planar interpolation can also be applied separately and independently from each other. Either technique provides improvements to the performance of intra-prediction. [0140] FIG.20 is a block diagram illustrating an exemplary block size-based reference sample filtering process 2000 (hereafter referred to as “process 2000”) in accordance with some implementations of the present disclosure. In some implementations, process 2000 can be performed by prediction processing unit 41 of video encoder 20, or prediction processing unit 81 of video decoder 30. In some implementations, process 2000 may be performed by a processor (e.g., a processor 2520 as shown in FIG.25) on an encoder side or a decoder side. For illustration purposes only, the following description of FIG.20 is provided with respect to the processor. In some implementations, process 2000 may include a reference sample receiving 2002, a reference sample filter determination 2004, and a reference sample filtering 2006. [0141] Initially, the processor may receive a plurality of reference samples in neighboring block regions (e.g., previously decoded blocks) of a video block to be predicted in a video frame of a video in reference sample receiving 2002 (e.g., current video block in FIGS.17-18). [0142] As mentioned earlier, a video frame in the video may be divided into a plurality of CTUs, then each CTU may be split into smaller video blocks (e.g., CUs) to adapt to varying local characteristics. These video blocks of the video frame may have different sizes, as shown in FIGS. 4C and 4E. In some implementations, to implement reference sample filter determination 2004 on a current video block that is to be predicted based on the plurality of reference samples in neighboring block regions, the processor may adaptively determine a reference sample filter based on the size of the current video block and filter the reference samples with that filter before they are used to predict the block. [0143] In some implementations, the determined reference sample filter is among a plurality of reference sample filters preprogrammed in the processor. For example, the reference sample filters may be trained offline, and then the filter coefficients of the trained filters are preprogrammed into the processor in the encoder and/or the processor in the decoder. Because the reference sample filters are trained offline and separately preprogramed into the encoder and decoder, no signaling of these filters is necessary between the encoder and decoder. [0144] The offline training of the reference sample filters can be performed on a same processor later used for intra prediction, or a separate processor. Images or video frames for training the reference sample filters may be divided into blocks based on statistics or varying local characteristics of the images or the video frames. Blocks of the same size are collected for training a corresponding reference sample filter for that block size. In some implementations, reference samples of the video blocks of the same size are used as the input of training data, and original samples of the video blocks of the same size are used as the target of the training data for deriving filter coefficients of the reference sample filter for that block size. In some implementations, the filter coefficients of the reference sample filter may be derived using a least square method (e.g., Equation (18)). In some implementations, training samples may be collected for different Quantization Parameters (QPs). Accordingly, different reference sample filters may be trained for the different QPs. These reference sample filters may be associated with a same block size but corresponding to different QPs. Each of the reference sample filters are derived using training data compressed with the encoder using a different QP. In some alternative implementations, one reference sample filter may be trained using training data corresponding to all the different QPs collectively. [0145] In some alternative implementations, the determined reference sample filter used to filter the reference samples of the video block is among a plurality of reference sample filters derived adaptively by the encoder based on each video frame. For example, the processor in the encoder may adaptively derive a plurality of reference sample filters based on each video frame. Each of the derived reference sample filters is corresponding to a different video block size in the video frame. The processor then may quantize and signal the derived reference sample filters in a bit stream to the decoder. For example, the filter coefficients of the derived reference sample filters are signalled. [0146] The reference sample filters may be adaptively derived by the processor in the encoder based on two-pass encoding. For example, in a first pass, a default reference sample filter (e.g., >^^^^^@^^^^PD\^EH^XVHG^WR^ILOWHU^WKH^UHIHUHQFH^VDPSOHs of each video block in the video frame. The processor then performs an intra prediction (e.g., angular intra prediction, or planar intra prediction) of the video block using the filtered reference samples to obtain intra prediction samples of each video block. This first pass of compression creates a statistical summary of the video data. For example, covariances for the filters may be collected. The processor in the encoder may derive the reference sample filters each associated with a different video block size guided by the first- pass compression of the video blocks, obtained using the default reference sample filter above. For example, the collected covariances for the filters may be used to derive the reference sample filters. In some implementations, filter coefficients of the reference sample filter may be derived using a least square method (e.g., Equation (18)). [0147] In some implementations, when the video is coded in VVC and ECM, PDPC may be applied after the prediction of angular intra mode. For example, in the first pass, the processor may first perform angular intra prediction on the video blocks using the filtered reference samples, and then perform PDPC to the predicted samples of the video blocks to obtain final intra perdition samples of the video blocks for deriving the reference sample filters. [0148] In a second pass, the processor then compresses each video block by filtering the reference samples using the derived a reference sample filter according to the size of that video block. [0149] In some implementations, the processor may apply the determined reference sample filter to the reference samples in reference sample filtering process 2006. The processor may then perform an intra prediction (e.g., planar prediction) on the current video block using the filtered reference samples. When the processor is in the encoder, the reference sample filters may be retrieved from the memory, or adaptively derived. When the processor is in the encoder and the reference sample filters are adaptively derived by the processor, reference sample filtering process 2006 may be the second pass described above. When the processor is in the decoder, the he reference sample filters may be retrieved from the memory, or obtained from the signalling in the bitstream received from the encoder. [0150] FIG.21 is a flow chart of an exemplary method 2100 for performing reference sample filtering with block size-based reference sample filters in accordance with some implementations of the present disclosure. Method 2100 may be implemented by a processor associated with video encoder 20 or video decoder 30. Method 2100 may include steps 2102-2108 as described below. Some of the steps may be optional to perform the disclosure provided herein. Further, some of the steps may be performed simultaneously, or in a different order. [0151] In step 2102, the processor may receive a video frame of a video. The video frame may include a group of reference samples or blocks that are neighboring block regions of a video block to be predicted (e.g., current video block in FIGS.17-18). The current video block can be a CTU, or a CU/PU. [0152] In step 2104, the processor may determine the size of each video block, and for each video block size, the processor may determine a reference sample filter to filter the received reference samples of the video blocks of that size. In some implementations, the processor may determine the reference sample filter among a plurality of reference sample filters that are preprogrammed in the processor. The preprogrammed reference sample filters may be trained offline by the same processor or a different processor. [0153] For example, FIG.22 is a flow chart of an exemplary method 2200 for training fixed block size-based reference sample filters offline in accordance with some implementations of the present disclosure. In step 2202, the processor may receive input training data and target training data. For example, the input training data may be reference samples obtained by compressing original samples of video blocks at different sizes with an encoder. The target training data may be the corresponding original samples of the video blocks. In step 2204, the processor may derive a plurality of reference sample filters based on the input training data and the target training data using a least square method (e.g., Equation (18)). In some implementations, when the training data are collected and compressed with the encoder using different QPs, a reference sample filter associated with the corresponding block size may be derived for each different QP or for all the different QPs collectively. In step 2206, the filter coefficients of the derived plurality of reference sample filters are preprogramed in the processor of the encoder and/or the decoder. The derived reference sample filters may also be pre-stored in a lookup table and saved in a memory (e.g., memory 2530 in FIG.25). [0154] Returning to step 2104 of FIG.21, in some alternative implementations, the processor may determine the reference sample filter among a plurality of reference sample filters that are adaptively derived based on the video frame. [0155] For example, FIG.23 is a flow chart of an exemplary method for determining adaptive block size-based reference sample filters in accordance with some implementations of the present disclosure. In step 2302, WKH^SURFHVVRU^PD\^DSSO\^D^GHIDXOW^UHIHUHQFH^VDPSOH^ILOWHU^^H^J^^^>^^^^^@^^^^ to reference samples of each video block in the video frame to obtained filtered reference samples. In step 2304, the processor may perform an intra prediction (e.g., planar prediction, angular intra prediction) on each video block using the filtered reference samples of the video block to obtain the intra prediction samples of each video block. In step 2306, the processor may further derive a reference sample filter for each video block size of the video frame using a least square method (e.g., Equation (18)) based on the reference samples of each video block of that size and the corresponding predicted samples of the video block (predicted in step 2304). The derived reference sample filters are signalled in a bit stream to the decoder. [0156] Returning to FIG. 21, the processor applies the determined reference sample filter, according to the size of the current video block, to the reference samples of the video block in step 2106. When the processor is in the decoder, the determined reference sample filter is retrieved from the processor or memory if it is preprogrammed, or obtained from the signaling in the bit stream if it is adaptively derived based on the video frame. [0157] In step 2108, the processor performs the intra prediction (e.g., planar prediction) on samples in the video block using the reference samples filtered in step 2106. [0158] In some implementations, block size-based reference sample filtering (e.g., method 2100) can be performed in conjunction with directional planar interpolation (e.g., method 1600). For example, method 2100 may be performed between steps 1608 and 1610 of method 1600. However, it is contemplated that block size-based reference sample filtering and directional planar interpolation can also be applied separately and independently from each other. Either technique provides improvements to the performance of intra-prediction. [0159] FIGS. 24A and 24B illustrate diagrams of reference samples for PDPC in a top-right diagonal mode and a bottom-left diagonal mode respectively. The prediction sample pred(x, y) is located at (x, y) in the prediction block. The reference sample Rx’,í1 has a horizontal coordinate of x’=x+y+1 and a vertical coordinate of -1, and the reference sample Rí1,y’ has a horizontal coordinate of -1 and a vertical coordinate of y’=x+y+1. [0160] Assuming that pred(x, y) is the prediction sample of a current sample, a modified prediction sample pred’(x, y) obtained by performing the PDPC can be calculated according to Equation (19):
Figure imgf000046_0001
’ ^^^ , y)+ 32 )>>6) (19), where Bitdepth represents a bit depth of samples; Rx’,í1 and Rí1,y’ represent reference samples located at top and left boundaries of the current sample, respectively; wL and wT are weights which are adaptively selected according to an intra mode and a block size of the current block; “>>” represents a bitwise right shift operation; and “<<” indicates a bitwise left shift operation. [0161] The function Clip3(x, y, z) in the above equation may be defined as in Equation (20): ^ ^ < ^
Figure imgf000046_0002
[0162] FIG. 25 shows a computing environment 2510 coupled with a user interface 2550, according to some implementations of the present disclosure. The computing environment 2510 can be part of a data processing server. Consistent with the present disclosure, video encoder 20 and video decoder 30 can be implemented using the computing environment 2010. The computing environment 2510 includes a processor 2520, a memory 2530, and an Input/Output (I/O) interface 2540. [0163] The processor 2520 typically controls overall operations of the computing environment 2510, such as the operations associated with display, data acquisition, data communications, and image processing. Processor 2520 may include one or more processors to execute instructions to perform all or some of the steps in the above-described methods. Moreover, processor 2520 may include one or more modules that facilitate the interaction between the processor 2520 and other components. The processor 2520 may be a Central Processing Unit (CPU), a microprocessor, a single chip machine, a Graphical Processing Unit (GPU), or the like. [0164] Memory 2530 is configured to store various types of data to support the operation of the computing environment 2510. The memory 2530 may include predetermined software 2532. Examples of such data include instructions for any applications or methods operated on the computing environment 2510, video datasets, image data, etc. The memory 2530 may be implemented by using any type of volatile or non-volatile memory devices, or a combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk. [0165] The I/O interface 2540 provides an interface between the processor 2520 and peripheral interface modules, such as a keyboard, a click wheel, buttons, or the like. The buttons may include but are not limited to, a home button, a start scan button, and a stop scan button. The I/O interface 2540 can be coupled with an encoder and decoder. [0166] In some implementations, there is also provided a non-transitory computer-readable storage medium comprising a plurality of programs, for example, in the memory 2530, executable by the processor 2520 in the computing environment 2510, for performing the above-described methods. Alternatively, the non-transitory computer-readable storage medium may have stored therein a bitstream or a data stream comprising encoded video information (for example, video information comprising one or more syntax elements) generated by an encoder (for example, video encoder 20 in FIG. 2) using, for example, the encoding method described above for use by a decoder (for example, video decoder 30 in FIG. 3) in decoding video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device or the like. [0167] In some implementations, there is also provided a computing device comprising one or more processors (for example, the processor 2520); and the non-transitory computer-readable storage medium or the memory 2530 having stored therein a plurality of programs executable by the one or more processors, wherein the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described methods. [0168] In some implementations, there is also provided a computer program product comprising a plurality of programs, for example, in memory 2530, executable by the processor 2520 in the computing environment 2510, for performing the above-described methods. For example, the computer program product may include the non-transitory computer-readable storage medium. [0169] In some implementations, the computing environment 2510 may be implemented with one or more ASICs, DSPs, Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), FPGAs, GPUs, controllers, micro-controllers, microprocessors, or other electronic components, for performing the above methods. [0170] The description of the present disclosure has been presented for the purpose of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative implementations will be apparent to those of ordinary skill in the art having the benefit of the teachings presented in the foregoing descriptions and the associated drawings. [0171] Unless specifically stated otherwise, an order of steps of the method according to the present disclosure is only intended to be illustrative, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but may be changed according to practical conditions. In addition, at least one of the steps of the method according to the present disclosure may be adjusted, combined or deleted according to practical requirements. [0172] The examples were chosen and described in order to explain the principles of the disclosure and to enable others skilled in the art to understand the disclosure for various implementations and to best utilize the underlying principles and various implementations with various modifications as are suited to the particular use contemplated. Therefore, it is to be understood that the scope of the disclosure is not to be limited to the specific examples of the implementations disclosed and that modifications and other implementations are intended to be included within the scope of the present disclosure.

Claims

CLAIMS What is claimed is: 1. A video processing method for performing intra prediction on a video block, comprising: receiving, by a processor, reference samples from a video frame of a video comprising the video block; determining, by the processor, a reference sample filter based on a size of each video block, wherein the reference sample filter is among a plurality of reference sample filters each derived for a different video block size; applying, by the processor, the determined reference sample filter to the received reference samples; and performing, by the processor, the intra prediction on the video block using the filtered reference samples.
2. The video processing method of claim 1, wherein the plurality of reference sample filters are trained offline and preprogramed in the processor.
3. The video processing method of claim 2, wherein the plurality of reference sample filters are trained with training data, comprising reference samples obtained by compressing original samples at the different video block sizes with an encoder as input training data and the corresponding original samples as target training data.
4. The video processing method of claim 3, wherein, for each different video block size, the reference samples are obtained by compressing the original samples by the encoder using different Quantization Parameters (QPs).
5. The video processing method of claim 4, wherein the reference sample filter for each different video block size comprises a group of reference sample filters each derived using training data corresponding to each different QP.
6. The video processing method of claim 4, wherein the reference sample filter for each different video block size is derived using training data corresponding to all the different QPs collectively.
7. The video processing method of claim 2, wherein filter coefficients of each reference sample filter are preprogrammed in the processor, wherein the filter coefficients are derived by optimizing a least-square cost function.
8. The video processing method of claim 1, wherein the processor is in an encoder, wherein the video processing method further comprises: deriving, by the processor, the plurality of reference sample filters for the different video block sizes; and signaling, by the processor, the derived reference sample filters in a bit stream to a decoder.
9. The video processing method of claim 1, wherein the plurality of reference sample filters are adaptively derived, by the processor, for each video frame of the video, wherein the derived reference sample filters are signaled for each video frame.
10. The video processing method of claim 8, wherein deriving, by the processor, the plurality of reference sample filters for the different video block sizes further comprises: applying a default reference sample filter to the received reference samples; performing a first-pass compression on the video blocks using the filtered reference samples; and deriving the plurality of reference sample filters for the different video block sizes using the first-pass compression result.
11. The video processing method of claim 10, wherein the default reference sample ILOWHU^KDV^ILOWHU^FRHIILFLHQWV^RI^>^^^^^@^^^
12. The video processing method of claim 8, wherein the intra prediction is a planar intra prediction.
13. The video processing method of claim 10, wherein the intra prediction is an angular intra prediction.
14. The video processing method of claim 13, wherein performing the first-pass compression on each video block comprises: performing the angular intra prediction on the video block using the filtered reference samples to obtain predicted samples of the video block; and performing Position Dependent Intra Prediction Combination (PDPC) to the predicted samples of the video block to obtain intra prediction samples of the video block.
15. The video processing method of claim 1, wherein the processor is in a decoder, wherein the video processing method further comprises: receiving a bitstream comprising a coded video block and signaling of the plurality of reference sample filters for the different video block sizes.
16. The video processing method of claim 1, wherein the video block is a coding unit (CU).
17. A video processing apparatus for performing intra prediction on a video block, comprising: a memory coupled to one or more processors; and the one or more processors configured to: receive reference samples from a video frame of a video comprising the video block; determine a reference sample filter based on a size of each video block, wherein the reference sample filter is among a plurality of reference sample filters each derived for a different video block size; apply the determined reference sample filter to the received reference samples; and perform the intra prediction on the video block using the filtered reference samples.
18. The video processing apparatus of claim 17, wherein the plurality of reference sample filters are trained offline and preprogramed in the one or more processors.
19. The video processing apparatus of claim 18, wherein the plurality of reference sample filters are trained with training data, comprising reference samples obtained by compressing original samples at the different video block sizes with an encoder as input training data and the corresponding original samples as target training data.
20. The video processing apparatus of claim 19, wherein, for each different video block size, the reference samples are obtained by compressing the original samples by the encoder using different Quantization Parameters (QPs).
21. The video processing apparatus of claim 20, wherein the reference sample filter for each different video block size comprises a group of reference sample filters each derived using training data corresponding to each different QP.
22. The video processing apparatus of claim 20, wherein the reference sample filter for each different video block size is derived using training data corresponding to all the different QPs collectively.
23. The video processing apparatus of claim 18, wherein filter coefficients of each reference sample filter are preprogrammed in the one or more processors, wherein the filter coefficients are derived by optimizing a least-square cost function.
24. The video processing apparatus of claim 17, wherein the one or more processors are in an encoder, wherein the one or more processors are further configured to: derive the plurality of reference sample filters for the different video block sizes; and signal the derived reference sample filters in a bit stream to a decoder.
25. The video processing apparatus of claim 17, wherein the plurality of reference sample filters are adaptively derived, by the one or more processors, for each video frame of the video, wherein the derived reference sample filters are signaled for each video frame.
26. The video processing apparatus of claim 24, wherein to derive the plurality of reference sample filters for the different video block sizes, the one or more processors are further configured to: apply a default reference sample filter to the received reference samples; perform a first-pass compression on the video blocks using the filtered reference samples; and derive the plurality of reference sample filters for the different video block sizes using the first-pass compression result.
27. The video processing apparatus of claim 26, wherein the default reference sample ILOWHU^KDV^ILOWHU^FRHIILFLHQWV^RI^>^^^^^@^^^ 28. The video processing apparatus of claim 24, the intra prediction is a planar intra prediction. 29. The video processing apparatus of claim 26, the intra prediction is an angular intra prediction. 30. The video processing apparatus of claim 29, wherein to perform the first-pass compression on each video block, the one or more processors are further configured to: perform the angular intra prediction on the video block using the filtered reference samples to obtain predicted samples of the video block; and perform Position Dependent Intra Prediction Combination (PDPC) to the predicted samples of the video block to obtain intra prediction samples of the video block. 31. The video processing apparatus of claim 17, wherein the one or more processors are in a decoder, wherein the one or more processors are further configured to: receive a bitstream comprising a coded video block and signaling of the plurality of reference sample filters for the different video block sizes. 32. The video processing apparatus of claim 17, wherein the video block is a coding unit (CU). 33. A non-transitory computer-readable storage medium having stored therein instructions which, when executed by one or more processors, cause the one or more processors to perform a video processing method for performing intra prediction on a video block, comprising: receiving reference samples from a video frame of a video comprising the video block; determining a reference sample filter based on a size of each video block, wherein the reference sample filter is among a plurality of reference sample filters each derived for a different video block size; applying the determined reference sample filter to the received reference samples; and performing the intra prediction on the video block using the filtered reference samples.
PCT/US2023/015869 2022-03-22 2023-03-22 Planar mode improvement for intra prediction WO2023183366A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US202263322478P 2022-03-22 2022-03-22
US63/322,478 2022-03-22
PCT/US2022/050696 WO2023091780A1 (en) 2021-11-22 2022-11-22 Planar mode improvement for intra prediction
USPCT/US2022/050696 2022-11-22

Publications (1)

Publication Number Publication Date
WO2023183366A1 true WO2023183366A1 (en) 2023-09-28

Family

ID=88101905

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2023/015869 WO2023183366A1 (en) 2022-03-22 2023-03-22 Planar mode improvement for intra prediction

Country Status (1)

Country Link
WO (1) WO2023183366A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020060449A1 (en) * 2018-09-23 2020-03-26 Huawei Technologies Co., Ltd. Method and apparatus for intra reference sample interpolation filter switching
WO2020112768A1 (en) * 2018-11-27 2020-06-04 Tencent America LLC Reference sample filter selection in intra prediction
WO2020216255A1 (en) * 2019-04-25 2020-10-29 Mediatek Inc. Method and apparatus of encoding or decoding with mode dependent intra smoothing filter in intra prediction
US20210021818A1 (en) * 2018-03-09 2021-01-21 Electronics And Telecommunications Research Institute Image encoding/decoding method and apparatus using sample filtering

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210021818A1 (en) * 2018-03-09 2021-01-21 Electronics And Telecommunications Research Institute Image encoding/decoding method and apparatus using sample filtering
WO2020060449A1 (en) * 2018-09-23 2020-03-26 Huawei Technologies Co., Ltd. Method and apparatus for intra reference sample interpolation filter switching
WO2020112768A1 (en) * 2018-11-27 2020-06-04 Tencent America LLC Reference sample filter selection in intra prediction
WO2020216255A1 (en) * 2019-04-25 2020-10-29 Mediatek Inc. Method and apparatus of encoding or decoding with mode dependent intra smoothing filter in intra prediction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
M. SANTAMARIA, J. LAINEMA, F. CRICRI, R. G. YOUVALARI, H. ZHANG, G. RANGU, H. R. TAVAKOLI, H. AFRABANDPEY, M. M. HANNUKSELA (NOKIA: "AHG11: Content-adaptive post-processing filter", 25. JVET MEETING; 20220112 - 20220121; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-Y0059, 11 January 2022 (2022-01-11), XP030300260 *

Similar Documents

Publication Publication Date Title
JP2019508971A (en) Predicting filter coefficients from fixed filters for video coding
CN114501000B (en) Method and electronic device for video encoding
US20220109886A1 (en) Methods and system of subblock transform for video coding
WO2020247577A1 (en) Adaptive motion vector resolution for affine mode
US11943468B2 (en) Methods and apparatus of video coding using prediction refinement with optical flow
CN116614625B (en) Video coding method, device and medium
WO2023023197A1 (en) Methods and devices for decoder-side intra mode derivation
WO2022178433A1 (en) Improved local illumination compensation for inter prediction
EP4042698A1 (en) Methods and apparatus of video coding in 4:4:4 chroma format
CN116320457A (en) Method and apparatus for video encoding and decoding in 4:4:4 chroma format
WO2023183366A1 (en) Planar mode improvement for intra prediction
WO2023091780A1 (en) Planar mode improvement for intra prediction
WO2023049486A1 (en) Adaptive coding order for intra prediction in video coding
WO2022170073A1 (en) Cross-component adaptive loop filter
EP4367887A1 (en) Geometry partitioning for affine motion compensated prediction in video coding
WO2024073145A1 (en) Methods and devices for adaptive loop filtering and cross-component adaptive loop filter
WO2023055968A1 (en) Methods and devices for decoder-side intra mode derivation
WO2024039803A1 (en) Methods and devices for adaptive loop filter
WO2022271635A1 (en) Side window bilateral filtering for video coding
WO2023129744A1 (en) Methods and devices for decoder-side intra mode derivation
WO2023038916A1 (en) Adaptive bilateral filtering for video coding
WO2023034152A1 (en) Methods and devices for decoder-side intra mode derivation
WO2022271756A1 (en) Video coding using multi-direction intra prediction
WO2023114155A1 (en) Methods and devices for decoder-side intra mode derivation
WO2024054686A1 (en) Methods and devices for adaptive loop filtering

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23775583

Country of ref document: EP

Kind code of ref document: A1