Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
PARTITIONING INFORMATION IN NEURAL NETWORK-BASED VIDEO CODING
Document Type and Number:
WIPO Patent Application WO/2023/245194
Kind Code:
A1
Abstract:
A method implemented by a video coding apparatus. The method includes applying a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample. The NN filter includes an NN filter model generated based on partitioning information of the video unit. Usage of the NN filter is indicated by one or more syntax elements in a bitstream. A conversion is performed between a video media file and a bitstream based on the filtered sample.

Inventors:
LI YUE (US)
ZHANG KAI (US)
ZHANG LI (US)
Application Number:
PCT/US2023/068631
Publication Date:
December 21, 2023
Filing Date:
June 16, 2023
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
BYTEDANCE INC (US)
International Classes:
H04N19/70; H04N19/82; G06N3/0464; G06N3/08
Foreign References:
US20220191483A12022-06-16
US20220394288A12022-12-08
Attorney, Agent or Firm:
HOWELL, Brandt D. (US)
Download PDF:
Claims:
CLAIMS

What is claimed is:

1. A method implemented by a video coding apparatus, comprising: applying a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; and performing a conversion between a video media file and the bitstream based on the filtered sample.

2. The method of claim 1, wherein the one or more syntax elements include a sequence parameter set (SPS) convolutional neural network loop filter (CNNLF) enabled flag (sps_cnnlf_enabled_flag), and wherein sps_cnnlf_enabled flag equal to 1 specifies that a NN- based filter is enabled for a coded layer video sequence (CLVS) and sps_cnnlf_enabled_flag equal to 0 specifies that the CNNLF is disabled for the CLVS.

3. The method of any of claims 1 -2, wherein the one or more syntax elements include a SPS CNNLF infer size base (sps_cnnlf_infer_size_base), wherein sps_cnnlf_infer_size_base specifies a base inference block size of a NN-based filter for a CLVS, and wherein a CNNLF infer size (cnnlfInferSize[3]) variable is set equal to {sps_cnnlf_infer_size_base » 1, sps cnnlf infer size base, sps cnnlf infer size base « 1 } where » is a right bit shift and « is a left bitshift.

4. The method of any of claims 1-3, wherein the one or more syntax elements include a SPS CNNLF infer size extension (sps cnnlf infer size entension), and wherein sps cnnlf infer size entension specifies a size of extended samples at a boundary of a NN inference block for a CLVS.

5. The method of any of claims 1 -4, wherein the one or more syntax elements include a SPS CNNLF maximum number parameters (sps_cnnlf_max_num_params), and wherein sps_cnnlf_max_num_params specifies a maximum number of NN filter parameter candidates of each block for a CLVS.

6. The method of any of claims 1 -5, wherein the one or more syntax elements include a first slice CNNLF mode (slice_cnnlf_mode[0]), and wherein slice_cnnlf_mode[0] equal to 0 indicates that the NN filter is not used for a luma component of any blocks in a slice, slice_cnnlf_mode[0] equal to i indicates that an itfl NN filter parameter candidate is used for the luma component of all blocks in the slice where i is equal to 1, 2, sps_cnnlf_max_num_params, and slice_cnnlf_mode[0] equal to sps_cnnlf_max_num_params+l indicates that a parameter candidate of each block is decided by a parameter index (cnnlfParamldx) of each block.

7. The method of any of claims 1-6, wherein the one or more syntax elements include a second slice CNNLF mode (slice_cnnlf_mode[l]), and wherein slice_cnnlf_mode[l] equal to 0 indicates that the NN filter is not used for a chroma component of any blocks in a slice, slice_cnnlf_mode[l] equal to i indicates that an itfl NN filter parameter candidate is used for the chroma component of all blocks in the slice where i is equal to 1, 2, sps_cnnlf_max_num_params, and slice_cnnlf_mode[l] equal to sps_cnnlf_max_num_params+ l indicates that a parameter candidate of each block is decided by a parameter index (cnnlfParamldx) of each block.

8. The method of any of claims 1-7, wherein the one or more syntax elements include a slice CNNLF scale flag (slice_cnnlf_scale_flag) with a parameter index parameter (paramldx) and a channel index parameter (chai), wherein slice cnnlf scale flag [paramldx] [chai] equal to 1 specifies that residual scaling is enabled for a parameter candidate indexed by paramldx for a channel indexed by chai, and wherein [paramldx] [chai] equal to 0 specifies that residual scaling is disabled for the parameter candidate indexed by paramldx for the channel indexed by chai.

9. The method of any of claims 1 -8, wherein the one or more syntax elements include a NN scale (nnScale) with a paramldx and a chai, and wherein nnScale [paramldx] [chai] specifies a scaling factor for a parameter candidate indexed by paramldx for a channel indexed by chai.

10. The method of any of claims 1 -9, wherein the one or more syntax elements include a use CNNLF (useCnnlf), and wherein useCnnlf equal to 1 specifies that a NN-based filter is enabled for a block and useCnnlf equal to 0 specifies that the NN-based filter is disabled for the block.

11. The method of any of claims 1-10, wherein the one or more syntax elements include a use first parameter (useFirstParam), and wherein useFirstParam equal to 1 specifies that a first parameter candidate of the NN filter is used for a block and useFirstParam equal to 0 specifies that the first parameter candidate of the NN filter is not used for the block.

12. The method of any of claims 1-11, wherein the one or more syntax elements include a CNNLF parameter index minus two (cnnlfParamIdxMinus2), wherein cnnlfParam!dxMinus2 specifies an index of a parameter candidate of a NN filter for a block, and wherein a variable CNNLF parameter index with a chai a unit index (cnnlfParamIdx[chal][unitIdx]) is set equal to cnnlfParam!dxMinus2 + 2.

13. The method of any of claims 1-12, wherein a number of inference units with a chai (numlnferUnitsfchal]) refers to a number of inference blocks for a channel indexed by chai in a slice and is derived as follows: if( sh slice type == I ) { cnnlflnferSizeLuma = sps cnnl f in! er size base « 1 cnnlflnferSizeChroma = sps cnnlf infer size base « 1

} else if ( SliceQpy < 23 ) { cnnlflnferSizeLuma = sps cnnlf infer size base cnnlflnferSizeChroma = sps cnnlf infer size base

} else if ( SliceQpy < 29 ) { cnnlflnferSizeLuma = sps cnnlf infer size base cnnlflnferSizeChroma = sps cnnlf infer size base « 1

} else { if (pps_pic_width_in_luma_samples <= 832) cnnlflnferSizeLuma = sps cnnlf infer size base else cnnlflnferSizeLuma = sps cnnlf infer size base « 1 cnnlflnferSizeChroma = sps cnnlf infer size base

} numInferUnits[O] = ( (pps_pic_width_in_luma_samples + cnnlflnferSizeLuma - 1) / cnnlflnferSizeLuma ) * ((pps_pic_height_in_luma_samples + cnnlflnferSizeLuma - 1) / cnnlflnferSizeLuma) numlnferUnitsfl] = ( (pps_pic_width_in_luma_samples + cnnlflnferSizeChroma - 1) / cnnlflnferSizeChroma ) * ((pps_pic_height_in_luma_samples + cnnlflnferSizeChroma - 1) / cnnlflnferSizeChroma), where sh slice type is a slice type in a slice header, cnnlflnferSizeLuma is a CNNLF infer size luma variable, cnnlflnferSizeChroma is a CNNLF infer size chroma variable, SliceQpY, is a slice luma quantization parameter, pps_pic_width_in_luma_samples is a picture parameter set (PPS) picture with in luma samples in a PPS, and pps_pic_height_in_luma_samples is a PPS picture height in luma samples in the PPS.

14. The method of any of claims 1-13, wherein usage of the NN filter is indicated in a SPS in the bitstream as follows: sp s_cnnlf_enabled_flag if( sps_cnnlf_enabled_flag ) { sps cnnlf infer size base sp s cnnlf infer size extension sp s cnnl f max num params }

15. The method of any of claims 1-14, wherein usage of the NN filter is indicated in a slice header in the bitstream as follows: if( sps_cnnlf_enabled_flag ) { for ( chai = 0; chai < ( sps_chroma_format_idc != 0 ? 2 : 1 ); chal++ ) { slice cnnlf mode [chai] if ( slice_cnnlf_mode[chal] ) { if ( slice_cnnlf_mode[chal] == sps_cnnlf_max_num_params + 1 ) { for (paramldx = 0; paramldx < sps_cnnlf_max_num_param; paramldx ++){ slice_cnnlf_scale_flag [paramldx] [chai] if (slice_cnnlf_scale_flag[paramldx] [chai]) nnScale[paramIdx] [chai]

}

} else { slice_cnnlf_scale_flag [slice_cnnlf_mode[chal] - 1 ] [chai] if (slice_cnnlf_scale_flag[slice_cnnlf_mode[chal]-l] [chai]) nnS cale [slice cnnlf mode [chai] - 1 ] [chai] }

}

}

} where sps_chroma_format_idc is a SPS chroma format identification code.

16. The method of any of claims 1-15, wherein usage of the NN filter is indicated in a coding tree unit syntax in the bitstream as follows: if ( CtbAddrX = = 0 && CtbAddrY = = 0 && sps_cnnlf_enabled_flag ) { for ( chai = 0; chai < ( sps_chroma_format_idc != 0 ? 2 : 1 ); chal++) { for (unitldx = 0; unitldx < numlnferUnitsfchal]; unitldx ++) { if (slice_cnnlf_mode[chal] < sps_cnnlf_max_num_params + 1) { cnnlfParamldxfchal] [unitldx] = slice cnnlf modefchal]

} else { useCnnlf if ( sps cnnlf max num params == 1 ) { cnnlfParamldxfchal] [unitldx] = useCnnlf ? 1 : 0

} else if { ! useCnnlf) { cnnlfParamldxfchal] [unitldx] = 0

} else { useFirstParam if ( sps_cnnlf_max_num_params == 2 ) { cnnlfParamldxfchal] [unitldx] = useFirstParam ? 1 : 2

} else if ( useFirstParam ) { cnnlfParamldxfchal] [unitldx] = 1

} else { cnnlfParamIdxMinus2 cnnlfParamldxfchal] [unitldx] = cnnlfParam!dxMinus2 + 2

}

}

}

}

}

} where CtbAddrX is a coding tree block (CTB) address on an X axis and CtbAddrY is a CTB address on a Y axis.

17. An apparatus for processing video data comprising: a processor; and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform the method of any of claims 1-16.

18. A non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of claims 1-16.

19. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining to apply a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; and generating a bitstream based on the determining.

20. A method for storing bitstream of a video comprising: determining to apply a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; generating a bitstream based on the determining, and storing the bitstream in a non-transitory computer-readable recording medium.

Description:
Partitioning Information In Neural Network-Based Video Coding

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This patent application claims the benefit of U.S. Provisional Patent Application No. 63/353,513, filed June 17, 2022. All the aforementioned patent applications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

[0002] The present disclosure is generally related to image and video coding and decoding.

BACKGROUND

[0003] Digital video accounts for the largest bandwidth use on the internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, it is expected that the bandwidth demand for digital video usage will continue to grow.

SUMMARY

[0004] A first aspect relates to a method implemented by a coding apparatus. The method includes applying a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit. Usage of the NN filter is indicated by one or more syntax elements in a bitstream. The method also includes performing a conversion between a video media file and the bitstream based on the filtered sample.

[0005] A second aspect relates to a non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of the preceding aspects.

[0006] A third aspect relates to a non-transitory' computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus. The method comprises: determining to apply a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; and generating a bitstream based on the determining. [0007] A fourth aspect relates to a method for storing bitstream of a video comprising: determining to apply a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; generating a bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable recording medium.

[0008] For the purpose of clarity, any one of the foregoing embodiments may be combined with any one or more of the other foregoing embodiments to create a new embodiment within the scope of the present disclosure.

[0009] These and other features wi 11 be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings and claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] For a more complete understanding of this disclosure, reference is now made to the following brief description, taken in connection with the accompanying drawings and detailed description, wherein like reference numerals represent like parts.

[0011] FIG. 1 is an example of raster-scan slice partitioning of a picture.

[0012] FIG. 2 is an example of rectangular slice partitioning of a picture.

[0013] FIG. 3 is an example of a picture partitioned into tiles, bricks, and rectangular slices.

[0014] FIG. 4A is an example of coding tree blocks (CTBs) crossing the bottom picture border.

[0015] FIG. 4B is an example of CTBs crossing the right picture border.

[0016] FIG. 4C is an example of CTBs crossing the right bottom picture border.

[0017] FIG. 5 is an example of encoder block diagram.

[0018] FIG. 6 is an illustration of samples within 8x8 blocks of samples.

[0019] FIG. 7 is an example of pixels involved in filter on/off decision and strong/weak filter selection.

[0020] FIG. 8 shows four one dimensional (1-D) directional patterns for EO sample classification.

[0021] FIG. 9 shows examples of geometry' transformation-based adaptive loop filter (GALF) filter shapes.

[0022] FIG. 10 shows an example of relative coordinates used for the 5x5 diamond filter support. [0023] FIG. 11 shows another example of relative coordinates used for the 5x5 diamond filter support.

[0024] FIG. 12A is an example architecture of the proposed CNN filter.

[0025] FIG. 12B is an example of construction of residual block (ResBlock).

[0026] FIG. 13 is an example of a process for generating filtered samples based on a neural network filter model that receives a coding parameter as an input in accordance with various examples.

[0027] FIG. 14 is an example of applying an attention obtained using external information, such as a coding parameter, on feature maps of a neural network filter model to provide recalibrated feature maps in accordance with various examples.

[0028] FIG. 15 is an example of a process for applying a neural network filter having a configurable depth to an unfiltered sample of a video unit to generate a filtered sample.

[0029] FIG. 16A is a schematic block diagram of architecture of a neural network filtering method in accordance with various examples, and FIG. 16B is a schematic block diagram of an attention residual block used in the architecture of FIG. 16A in accordance with various examples.

[0030] FIG. 17 is an example of a hierarchical coding structure for a random-access setting, in accordance with various examples.

[0031] FIGS. 18A-18C illustrate an example of an over-filtering phenomenon.

[0032] FIG. 19 is an example of a hybrid video coding scheme including a filter in accordance with various examples.

[0033] FIG. 20 is an example of a proposed convolutional neural network for filtering a luma component in accordance with various examples.

[0034] FIG. 21 A is an example of plain or conventional training using a VTM encoder to compress training images, in accordance with various examples.

[0035] FIG. 21 B is an example of iterative training in accordance with various examples.

[0036] FIG. 22A is an example of an encoder strategy for selecting a filter in accordance with various examples.

[0037] FIG. 22B is an example of a decoder strategy for selecting a filter in accordance with various examples.

[0038] FIG. 23A is a schematic diagram of a conditional in-loop filter in accordance with various examples.

[0039] FIG. 23B is an example of expanding a quantization parameter into a 1-dimensional vector in accordance with various examples. [0040] FIG. 24A is a schematic block diagram of another architecture of a neural network filtering method in accordance with various examples, and FIG. 24B is a schematic block diagram of an attention residual block used in the architecture of FIG. 24A in accordance with various examples.

[0041] FIG. 25 is a block diagram showing an example video processing system.

[0042] FIG. 26 is a block diagram of a video processing apparatus.

[0043] FIG. 27 is a block diagram that illustrates an example video coding system.

[0044] FIG. 28 is a block diagram illustrating an example of video encoder.

[0045] FIG. 29 is a block diagram illustrating an example of video decoder.

[0046] FIG. 30 is a flowchart for an example method 3000 of video processing.

DETAILED DESCRIPTION

[0047] It should be understood at the outset that although an illustrative implementation of one or more embodiments are provided below, the disclosed systems and/or methods may be implemented using any number of techniques, whether currently known or in existence. The disclosure should in no way be limited to the illustrative implementations, drawings, and techniques illustrated below, including the exemplary designs and implementations illustrated and described herein, but may be modified within the scope of the appended claims along with their full scope of equivalents.

[0048] Versatile Video Coding (VVD), also known as H.266, terminology is used in some description only for ease of understanding and not for limiting scope of the disclosed techniques. As such, the techniques described herein are applicable to other video codec protocols and designs also.

[0049] This patent document is related to video coding. Specifically, this description is related to a loop filter in image/video coding. The disclosed examples may be applied individually or in various combinations, for video bitstreams coded using existing video coding standards, such as the VVC standard, the High-Efficiency Video Coding (HEVC) standard, or the standards to be finalized (e.g., third-generation Audio Video Coding Standard (AVS3)). The disclosed examples may also be applicable to future video coding standards, future video codecs, or as a post-processing method outside of an encoding/decoding process.

[0050] Video coding standards have evolved primarily through the development of the well- known International Telecommunication Union - Telecommunication (ITU-T) and International Organization for Standardization (ISO)/Intemational Electrotechnical Commission (IEC) standards. The ITU-T produced H.261 and H.263, ISO/IEC produced Moving Picture Experts Group (MPEG)-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4 Advanced Video Coding (AVC) and H.265/High Efficiency Video Coding (HEVC) standards.

[0051] Since H.262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, Joint Video Exploration Team (JVET) was founded by Video Coding Experts Group (VCEG) and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM).

[0052] In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standard targeting at fifty percent (50%) bitrate reduction compared to HEVC. VVC version 1 was finalized in July 2020. [0053] Color space and chroma subsampling are discussed. Color space, also known as the color model (or color system), is an abstract mathematical model which simply describes the range of colors as tuples of numbers, typically as 3 or 4 values or color components (e.g., red green blue (RGB)). Basically speaking, color space is an elaboration of the coordinate system and sub-space.

[0054] For video compression, the most frequently used color spaces are YCbCr and RGB. YCbCr, Y'CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR orY'CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y’ is the luma component and CB and CR are the blue-difference and red-difference chroma components. Y’ (with prime) is distinguished from Y, which is luminance, meaning that light intensity is nonlinearly encoded based on gamma corrected RGB primaries.

[0055] Chroma subsampling is the practice of encoding images by implementing less resolution for chroma information than for luma information, taking advantage of the human visual system’s lower acuity for color differences than for luminance.

[0056] For 4:4:4 chroma subsampling, each of the three Y’CbCr components have the same sample rate, thus there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and cinematic post production.

[0057] For 4:2:2 chroma subsampling, the two chroma components are sampled at half the sample rate of luma: the horizontal chroma resolution is halved. This reduces the bandwidth of an uncompressed video signal by one-third with little to no visual difference.

[0058] For 4:2:0 chroma subsampling, the horizontal sampling is doubled compared to 4:1 :1, but as the Cb and Cr channels are only sampled on each alternate line in this scheme, the vertical resolution is halved. The data rate is thus the same. Cb and Cr are each subsampled at a factor of two both horizontally and vertically. There are three variants of 4:2:0 schemes, having different horizontal and vertical siting.

[0059] In MPEG-2, Cb and Cr are co-sited horizontally. Cb and Cr are sited between pixels in the vertical direction (sited interstitially). In Joint Photographic Experts Group (JPEG)/JPEG File Interchange Format (JFIF), H.261, and MPEG-1, Cb and Cr are sited interstitially, halfway between alternate luma samples. In 4:2:0 DV, Cb and Cr are co-sited in the horizontal direction. In the vertical direction, they are co-sited on alternating lines.

[0060] Definitions of video units are provided. A picture is divided into one or more tile rows and one or more tile columns. A tile is a sequence of coding tree units (CTUs) that covers a rectangular region of a picture. A tile is divided into one or more bricks, each of which consists of a number of CTU rows within the tile. A tile that is not partitioned into multiple bricks is also referred to as a brick. However, a brick that is a true subset of a tile is not referred to as a tile. A slice either contains a number of tiles of a picture or a number of bricks of a tile.

[0061] Two modes of slices are supported, namely the raster-scan slice mode and the rectangular slice mode. In the raster-scan slice mode, a slice contains a sequence of tiles in a tile raster scan of a picture. In the rectangular slice mode, a slice contains a number of bricks of a picture that collectively form a rectangular region of the picture. The bricks within a rectangular slice are in the order of brick raster scan of the slice.

[0062] FIG. 1 is an example of raster-scan slice partitioning of a picture 100, where the picture is divided into twelve tiles 102 and three raster-scan slices 104. As shown, each of the tiles 102 and slices 104 contains a number of CTUs 106.

[0063] FIG. 2 is an example of rectangular slice partitioning of a picture 200 according to the VVC specification, where the picture is divided into twenty-four tiles 202 (six tile columns 203 and four tile rows 205) and nine rectangular slices 204. As shown, each of the tiles 202 and slices 204 contains a number of CTUs 206.

[0064] FIG. 3 is an example of a picture 300 partitioned into tiles, bricks, and rectangular slices according to the VVC specification, where the picture is divided into four tiles 302 (two tile columns 303 and two tile rows 305), eleven bricks 304 (the top-left tile contains one brick, the top-right tile contains five bricks, the bottom-left tile contains two bricks, and the bottomright tile contain three bricks), and four rectangular slices 306.

[0065] CTU and coding tree block (CTB) sizes are discussed. In VVC, the coding tree unit (CTU) size, which is signaled in a sequence parameter set (SPS) by the syntax element Iog2_ctu_size_minus2, could be as small as 4x4. The sequence parameter set raw byte sequence payload (RBSP) syntax is below.

[0066] Iog2_ctu_size_minus2 plus 2 specifies the luma coding tree block size of each CTU. [0067] log2 min luma coding block size minus2 plus 2 specifies the minimum luma coding block size.

[0068] The variables CtbLog2SizeY, CtbSizeY, MinCbLog2SizeY, MinCbSizeY, MinTbLog2SizeY, MaxTbLog2SizeY, MinTbSizeY, MaxTbSizeY, PicWidthlnCtbsY, PicHeightlnCtbsY, PicSizelnCtbsY, PicWidthlnMinCbsY, PicHeightlnMinCbsY, PicSizelnMinCbsY, PicSizelnSamplesY, PicWidthlnSamplesC and PicHeightlnSamplesC are derived as follows.

[0069] CtbLog2SizeY = Iog2_ctu_size_minus2 + 2 (7-9)

[0070] CtbSizcY - I « CtbLog2SizcY (7-10)

[0071] MinCbLog2SizeY = Iog2_min_luma_coding_block_size_minus2 + 2 (7-11)

[0072] MinCbSizeY = 1 « MinCbLog2SizeY (7-12)

[0073] MinTbLog2SizeY = 2 (7-13)

[0074] MaxTbLog2SizeY = 6 (7-14)

[0075] MinTbSizeY = 1 « MinTbLog2SizeY (7-15)

[0076] MaxTbSizeY = 1 « MaxTbLog2SizeY (7-16)

[0077] PicWidthlnCtbsY = Ceil( pic width in luma samples + CtbSizeY ) (7-17)

[0078] PicHeightlnCtbsY = Ceil( pic height in luma samples + CtbSizeY ) (7-18)

[0079] PicSizelnCtbsY = PicWidthlnCtbsY * PicHeightlnCtbsY (7-19)

[0080] PicWidthlnMinCbsY = pic_width_in_luma_samples / MinCbSizeY (7-20)

[0081] PicHeightlnMinCbsY = pic height in luma samples / MinCbSizeY (7-21)

[0082] PicSizelnMinCbsY = PicWidthlnMinCbsY * PicHeightlnMinCbsY (7-22)

[0083] PicSizelnSamplesY = pic width in luma samples * pic height in luma samples (7-23)

[0084] PicWidthlnSamplesC = pic width in luma samples / SubWidthC (7-24)

[0085] PicHeightlnSamplesC = pic height in luma samples / SubHeightC (7-25)

[0086] FIG. 4A is an example of CTBs crossing the bottom picture border. FIG. 4B is an example of CTBs crossing the right picture border. FIG. 4C is an example of CTBs crossing the right bottom picture border. In FIGS. 4A-4C, K=M, L<N; K<M, L=N; K<M, L<N, respectively. [0087] CTUs in a picture 400 are discussed with reference to FIGS. 4A-4C. Suppose the CTB/largest coding unit (LCU) size indicated by Mx N (typically M is equal to N, as defined in HEVC/WC), and for a CTB located at picture (or tile or slice or other kinds of types, picture border is taken as an example) border, K x L samples are within picture border wherein either K<M or L<N. For those CTBs 402 as depicted in FIG. 4A-4C, the CTB size is still equal to MxN, however, the bottom boundary/right boundary of the CTB is outside the picture 400.

[0088] The coding flow of a typical video coder/decoder (a.k.a., codec) is discussed. FIG. 5 is an example of encoder block diagram of VVC, which contains three in-loop filtering blocks: deblocking filter (DF), sample adaptive offset (SAO) and adaptive loop filter (ALF). Unlike DF, which uses predefined filters, SAO and ALF utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, with coded side information signaling the offsets and filter coefficients. ALF is located at the last processing stage of each picture and can be regarded as a tool trying to catch and fix artifacts created by the previous stages.

[0089] FIG. 5 is a schematic diagram of an encoder 500. The encoder 500 is suitable for implementing the techniques of VVC. The encoder 500 includes three in-loop filters, namely a deblocking filter (DF) 502, a sample adaptive offset (SAO) 504, and an ALF 506. Unlike the DF 502, which uses predefined filters, the SAO 504 and the ALF 506 utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a FIR filter, respectively, with coded side information signaling the offsets and filter coefficients. The ALF 506 is located at the last processing stage of each picture and can be regarded as a tool try ing to catch and fix artifacts created by the previous stages.

[0090] The encoder 500 fiirther includes an intra prediction component 508 and a motion estimation/compensation (ME MO) component 510 configured to receive input video. The intra prediction component 508 is configured to perform intra prediction, while the ME/MC component 510 is configured to utilize reference pictures obtained from a reference picture buffer 512 to perform inter prediction. Residual blocks from inter prediction or intra prediction are fed into a transform component 514 and a quantization component 516 to generate quantized residual transform coefficients, which are fed into an entropy coding component 518. The entropy coding component 518 entropy codes the prediction results and the quantized transform coefficients and transmits the same toward a video decoder (not shown). Quantization components output from the quantization component 516 may be fed into an inverse quantization component 520, an inverse transform component 522, and a reconstruction (REC) component 524. The REC component 524 is able to output images to the DF 502, the SAO 504, and the ALF 506 for filtering prior to those images being stored in the reference picture buffer 512.

[0091] The input of the DF 502 is the reconstructed samples before in-loop filters. The vertical edges in a picture are filtered first. Then the horizontal edges in a picture are filtered with samples modified by the vertical edge filtering process as input. The vertical and horizontal edges in the CTBs of each CTU are processed separately on a coding unit basis. The vertical edges of the coding blocks in a coding unit are filtered starting with the edge on the left-hand side of the coding blocks proceeding through the edges towards the right-hand side of the coding blocks in their geometrical order. The horizontal edges of the coding blocks in a coding unit are filtered starting with the edge on the top of the coding blocks proceeding through the edges towards the bottom of the coding blocks in their geometrical order.

[0092] FIG. 6 is an illustration 600 of samples 602 within 8x8 blocks of samples 604. As shown, the illustration 600 includes horizontal and vertical block boundaries on an 8x8 grid 606, 608, respectively. In addition, the illustration 600 depicts the nonoverlapping blocks of the 8x8 samples 610, which can be deblocked in parallel.

[0093] The boundary decision is discussed. Filtering is applied to 8x8 block boundaries. In addition, it must be a transform block boundary or a coding subblock boundary (e.g., due to usage of Affine motion prediction, Alternative temporal motion vector prediction (ATMVP)). For those which are not such boundaries, the filter is disabled.

[0094] The boundary strength calculation is discussed. For a transform block boundary/coding subblock boundary, if it is located in the 8x8 grid, the transform block boundary/ coding subblock boundary may be filterd and the setting of bS[ xDi ][ yDj ] (wherein [ xDi ][ yDj ] denotes the coordinate) for this edge is defined in Tabel 1 and Table 2, respectively.

Table 1. Boundary strength (when SPS IBC is disabled)

Table 2. Boundary strength (when SPS IBC is enabled)

[0095] The deblocking decision for a luma component is discussed.

[0096] FIG. 7 is an example 700 of pixels involved in filter on/off decision and strong/weak filter selection. A wider-stronger luma filter is used only if all of the Condition 1, Condition 2, and Condition 3 are TRUE. The Condition 1 is the “large block condition.” This condition detects whether the samples at P-side and Q-side belong to large blocks, which are represented by the variable bSidePisLargeBlk and bSideQisLargeBlk, respectively. The bSidePisLargeBlk and bSideQisLargeBlk are defined as follows. bSidePisLargeBlk = ((edge type is vertical and po belongs to CU with width >= 32) | | (edge type is horizontal and po belongs to CU with height >= 32))? TRUE: FALSE bSideQisLargeBlk = ((edge type is vertical and qo belongs to CU with width >= 32) | | (edge type is horizontal and qo belongs to CU with height >= 32))? TRUE: FALSE

[0097] Based on bSidePisLargeBlk and bSideQisLargeBlk, the Condition 1 is defined as follows.

[0098] Condition 1 = (bSidePisLargeBlk | bSidePisLargeBlk) ? TRUE: FALSE

[0099] Next, if Condition 1 is true, the Condition 2 will be fiirther checked. First, the following variables are derived. dpO, dp3, dqO, dq3 are first derived as in HEVC if (p side is greater than or equal to 32) dpO = ( dpO + Abs( p5o - 2 * p4o + p3o ) + 1 ) » 1 dp3 = ( dp3 + Abs( p5s - 2 * p4s + p3s ) + 1 ) » 1 if (q side is greater than or equal to 32) dqO = ( dqO + Abs( q5o - 2 * q4o + q3o ) + 1 ) » 1 dq3 = ( dq3 + Abs( q5s - 2 * q4; + q3s ) + 1 ) » 1

Condition 2 = (d < 0) ? TRUE: FALSE where d= dpO + dqO + dp3 + dq3.

[00100] If Condition 1 and Condition 2 are valid, whether any of the blocks uses sub-blocks is further checked.

If (bSidePisLargeBlk)

{

If (mode block P == SUBBLOCKMODE)

Sp =5 else

Sp =7

} else

Sp = 3

If (bSideQisLargeBlk)

{

If (mode block Q == SUBBLOCKMODE)

Sq =5 else

Sq =7

} else

Sq = 3 [00101] Finally, if both the Condition 1 and Condition 2 are valid, the proposed deblocking method will check the condition 3 (the large block strong filter condition), which is defined as follows.

[00102] In the Conditions StrongFilterCondition, the following variables are derived. dpq is derived as in HEVC. sps = Abs( ps ~ po ), derived as in HEVC if (p side is greater than or equal to 32) if(Sp=5) sp3 = ( sps + Abs( P5 - P3 ) + 1) » 1 else

SP3 = ( SP3 + Abs( P7 - P3 ) + 1) » 1 sq3 = Abs( qo - qs ), derived as in HEVC if (q side is greater than or equal to 32)

If(Sq=5) sq3 = ( sq3 + Abs( qs — q3 ) + 1) » 1 else sq3 = ( sq3 + Abs( q 7 - qs ) + 1) » 1

[00103] As in HEVC, StrongFilterCondition = (dpq is less than ( 0 » 2 ), sps + sq3 is less than ( 3*0 » 5 ), and Abs( po - qo ) is less than ( 5 * tc + 1 ) » 1) ? TRUE : FALSE.

[00104] A stronger deblocking filter for luma (designed for larger blocks) is discussed.

[00105] Bilinear filter is used when samples at either one side of a boundary belong to a large block. A sample belonging to a large block is defined as when the width >= 32 for a vertical edge, and when height >= 32 for a horizontal edge.

[00106] The bilinear filter is listed below.

[00107] Block boundary samples pi for i=0 to Sp-1 and qi for j=0 to Sq-1 (pi and qi are the i- th sample within a row for filtering vertical edge, or the i-th sample within a column for filtering horizontal edge) in HEVC deblocking described above) are then replaced by linear interpolation as follows.

Pi' = (ft * Middle s t + (64 — ft) * P s + 32) » 6), clipped to p t ± tcPD, where tcPDt and tcPDj term is a position dependent clipping described in below and gj, ft, are given below'.

[00108] A deblocking control for chroma is discussed.

[00109] The chroma strong filters are used on both sides of the block boundary. Here, the chroma filter is selected when both sides of the chroma edge are greater than or equal to 8 (chroma position), and the following decision with three conditions are satisfied: the first one is for decision of boundary strength as well as large block. The proposed filter can be applied when the block width or height which orthogonally crosses the block edge is equal to or larger than 8 in chroma sample domain. The second and third one is basically the same as for HEVC luma deblocking decision, which are on/off decision and strong filter decision, respectively.

[00110] In the first decision, boundary strength (bS) is modified for chroma filtering and the conditions are checked sequentially. If a condition is satisfied, then the remaining conditions with lower priorities are skipped.

[00111] Chroma deblocking is performed when bS is equal to 2, or bS is equal to 1 when a large block boundary is detected.

[00112] The second and third condition is basically the same as HEVC luma strong filter decision as follows.

[00113] In the second condition: d is then derived as in HEVC luma deblocking. The second condition will be TRUE when d is less than 0.

[00114] In the third condition StrongFilterCondition is derived as follows. dpq is derived as in HEVC sps = Abs( ps - po ), derived as in HEVC sq3 = Abs( qo - q3 ), derived as in HEVC

[00115] As in HEVC design, StrongFilterCondition = (dpq is less than ( 0 » 2 ), sp3 + sq3 is less than ( 0 » 3 ), and Abs( po - qo ) is less than ( 5 * tc + 1 ) » 1).

[00116] A strong deblocking filter for chroma is discussed. The following strong deblocking filter for chroma is defined.

P2 '= (3*ps+2*p2+pi+po+qo+4) » 3 pi - (2*p 3 +p2+2*pi+po+qo+qi+4) » 3 po - (p3+p2 + pi+2*po+qo+qi+q2+4) » 3

[00117] The proposed chroma filter performs deblocking on a 4x4 chroma sample grid. [00118] Position dependent clipping (tcPD) is discussed. The position dependent clipping tcPD is applied to the output samples of the luma filtering process involving strong and long filters that are modifying 7, 5, and 3 samples at the boundary. Assuming quantization error distribution, it is proposed to increase clipping value for samples which are expected to have higher quantization noise, thus expected to have higher deviation of the reconstructed sample value from the true sample value.

[00119] For each P or Q boundary filtered with asymmetrical filter, depending on the result of decision-making process in the boundary strength calculation, position dependent threshold table is selected from two tables (i.e., Tc7 and Tc3 tabulated below) that are provided to decoder as a side information.

Tc7 = {6, 5, 4, 3, 2, 1, 1}; Tc3 = {6, 4, 2 }; tcPD = (Sp == 3) ? Tc3 : Tc7; tcQD = (Sq == 3) ? Tc3 : Tc7;

[00120] For the P or Q boundaries being filtered with a short symmetrical filter, position dependent threshold of lower magnitude is applied.

Tc3 = {3. 2, 1 };

[00121] Following defining the threshold, filtered p ’t and q ’i sample values are clipped according to tcP and tcQ clipping values. p ”i = Clip3(p ’i + tcPi, p \ - tcPi, p ’i ); q ”j = Clip3(q + tcQj, q - tcQj, q ’,); where p ’i and q ’i are filtered sample values, p ”t and q ”j are output sample value after the clipping, and tcP, are clipping thresholds that are derived from the VVC tc parameter and tcPD and tcQD. The function Clip3 is a clipping function as it is specified in VVC.

[00122] Sub-block deblocking adjustment is now discussed. To enable parallel friendly deblocking using both long filters and sub-block deblocking the long filters is restricted to modify at most 5 samples on a side that uses sub-block deblocking (AFFINE or ATMVP or decoder side motion vector refinement (DMVR)) as shown in the luma control for long filters. Additionally, the sub-block deblocking is adjusted such that sub-block boundaries on an 8x8 grid that are close to a coding unit (CU) or an implicit TU boundary' is restricted to modify at most two samples on each side

[00123] The following applies to sub-block boundaries that not are aligned with the CU boundary.

If (mode block Q == SUBBLOCKMODE && edge !=0) { if (!(implicitTU && (edge == (64 / 4)))) if (edge == 2 || edge == (orthogonalLength - 2) || edge == (56 / 4) | edge == (72 / 4)) Sp = Sq = 2; else

Sp = Sq = 3; else

Sp = Sq = bSideQisLargeBlk ? 5:3

}

[00124] Where edge equal to 0 corresponds to CU boundary, edge equal to 2 or equal to orthogonalLength-2 corresponds to sub-block boundary 8 samples from a CU boundary, etc. Where implicit TU is true if implicit split of TU is used.

[00125] Sample adaptive offset (SAO) is discussed. The input of SAO is the reconstructed samples after deblocking (DB). The concept of SAO is to reduce mean sample distortion of a region by first classifying the region samples into multiple categories with a selected classifier, obtaining an offset for each category, and then adding the offset to each sample of the category, where the classifier index and the offsets of the region are coded in the bitstream. In HEVC and VVC, the region (the unit for SAO parameters signaling) is defined to be a CTU.

[00126] Two SAO types that can satisfy the requirements of low complexify are adopted in HEVC. Those two types are edge offset (EO) and band offset (BO), which are discussed in further detail below. An index of an SAO type is coded (which is in the range of [0, 2]). For EO, the sample classification is based on comparison between cunent samples and neighboring samples according to 1 -D directional patterns: horizontal, vertical, 135° diagonal, and 45° diagonal.

[00127] FIG. 8 shows four one dimensional (1-D) directional patterns 800 for EO sample classification: horizontal (EO class = 0), vertical (EO class = 1), 135° diagonal (EO class = 2), and 45° diagonal (EO class = 3).

[00128] For a given EO class, each sample inside the CTB is classified into one of five categories. The current sample value, labeled as “c,” is compared with its two neighbors along the selected 1-D pattern. The classification rules for each sample are summarized in Table 3. Categories 1 and 4 are associated with a local valley and a local peak along the selected 1-D pattern, respectively. Categories 2 and 3 are associated with concave and convex comers along the selected 1-D pattern, respectively. If the current sample does not belong to EO categories 1- 4, then it is category 0 and SAO is not applied. Table 3: Sample Classification Rules for Edge Offset Category' Condition

1 c<a and c<b

2 ( c < a && c=b) ||(c == a && c < b)

3 ( c > a && c=b) ||(c == a && c > b)

4 c > a && c > b

5 None of above

[00129] Geometry transformation-based adaptive loop filter in Joint Exploration Model (JEM) is discussed. The input of DB is the reconstructed samples after DB and S AO. The sample classification and filtering process are based on the reconstructed samples after DB and SAO.

[00130] In the JEM, a geometry transformation-based adaptive loop filter (GALF) with blockbased filter adaption is applied. For the luma component, one among twenty-five filters is selected for each 2><2 block, based on the direction and activity of local gradients.

[00131] The filter shape is discussed. FIG. 9 shows examples of GALF filter shapes 900, including on the left a 5- z 5 diamond, in the middle a 7- z 7 diamond, and one the right a 9- z 9 diamond. In the JEM, up to three diamond filter shapes (as shown in FIG. 9) can be selected for the luma component. An index is signaled at the picture level to indicate the filter shape used for the luma component. Each square represents a sample, and Ci (i being 0~6 (left), 0~l 2 (middle), 0~20 (right)) denotes the coefficient to be applied to the sample. For chroma components in a picture, the 5x5 diamond shape is always used.

[00132] Block classification is discussed. Each 2 x 2 block is categorized into one out of twenty-five classes. The classification index C is derived based on its directionality D and a quantized value of activity A. as follows.

C = 5D + A. (1)

[00133] To calculate D and A, gradients of the horizontal, vertical and two diagonal direction are first calculated using 1 -D Laplacian. (4) | (5)

[00134] Indices i and j refer to the coordinates of the upper left sample in the 2 x 2 block and

R(i,J) indicates a reconstructed sample at coordinate (i,j).

[00135] Then D maximum and minimum values of the gradients of horizontal and vertical directions are set as:

[00136] and the maximum and minimum values of the gradient of two diagonal directions are set as: (7)

[00137] To derive the value of the directionality D, these values are compared against each other and with two thresholds and t 2 :

Step 1. I are true, D is set to 0.

Step 2. If ^ continue from Step 3; otherwise continue from Step 4.

Step 3. If g D is set to 2; otherwise D is set to 1.

Step 4. I , D i s set to 4; otherwise D is set to 3.

[00138] The activity value A is calculated as: (8)

[00139] A is further quantized to the range of 0 to 4, inclusively, and the quantized value is denoted as A.

[00140] For both chroma components in a picture, no classification method is applied, i.e. a single set of ALF coefficients is applied for each chroma component.

[00141] Geometric transformation of filter coefficients is discussed.

[00142] FIG. 10 shows relative coordinates 1000 for the 5x5 diamond filter support - diagonal, vertical flip, and rotation, respectively (from left to right). [00143] Before filtering each 2x2 block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients f(k, Z), which is associated with the coordinate (k, I), depending on gradient values calculated for that block. This is equivalent to applying these transformations to the samples in the filter support region. The idea is to make different blocks to which ALF is applied more similar by aligning their directionality. [00144] Three geometric transformations, including diagonal, vertical flip, and rotation are introduced:

Diagonal: f D (k,l) = f(l, /c)«

Vertical flip: f v (k, Z) = f(k, K — I — 1), (9)

Rotation: f R (k, Z) = f(K — Z — 1, Ze). where K is the size of the filter and 0 < k, I < K — 1 are coefficients coordinates, such that location (0,0) is at the upper left comer and location (K — 1, K — 1) is at the lower right comer. The transformations are applied to the filter coefficients f (k, I) depending on gradient values calculated for that block. The relationship between the transformation and the four gradients of the four directions are summarized in Table 4.

Table 1 : Mapping of the gradient calculated for one block and the transformations

Gradient values Transformation gd2 < gat and g h < gv No transformation gd2 < gdi and g v < gh Diagonal gdi < gd2 and gh< gv Vertical flip gdi < gd2 and g v < gh Rotation

[00145] Filter parameters signaling is discussed. In the JEM, GALF filter parameters are signalled for the first CTU, i.e., after the slice header and before the SAO parameters of the first CTU. Up to 25 sets of luma filter coefficients could be signalled. To reduce bits overhead, filter coefficients of different classification can be merged. Also, the GALF coefficients of reference pictures are stored and allowed to be reused as GALF coefficients of a current picture. The current picture may choose to use GALF coefficients stored for the reference pictures and bypass the GALF coefficients signalling. In this case, only an index to one of the reference pictures is signalled, and the stored GALF coefficients of the indicated reference picture are inherited for the current picture. [00146] To support GALF temporal prediction, a candidate list of GALF filter sets is maintained. At the beginning of decoding a new sequence, the candidate list is empty. After decoding one picture, the corresponding set of filters may be added to the candidate list. Once the size of the candidate list reaches the maximum allowed value (i.e., 6 in current JEM), a new set of filters overwrites the oldest set in decoding order, and that is, first-in-first-out (FIFO) rule is applied to update the candidate list. To avoid duplications, a set could only be added to the list when the corresponding picture does not use GALF temporal prediction. To support temporal scalability, there are multiple candidate lists of filter sets, and each candidate list is associated with a temporal layer. More specifically, each array assigned by temporal layer index (Templdx) may compose filter sets of previously decoded pictures with equal to lower Templdx. For example, the k-th array is assigned to be associated with Templdx equal to k, and the k-th array only contains filter sets from pictures with Templdx smaller than or equal to k. After coding a certain picture, the filter sets associated with the picture will be used to update those arrays associated with equal or higher Templdx.

[00147] Temporal prediction of GALF coefficients is used for inter coded frames to minimize signalling overhead. For mtra frames, temporal prediction is not available, and a set of 16 fixed filters is assigned to each class. To indicate the usage of the fixed filter, a flag for each class is signalled and if required, the index of the chosen fixed filter. Even when the fixed filter is selected for a given class, the coefficients of the adaptive filter f(k, I) can still be sent for this class in which case the coefficients of the filter which will be applied to the reconstructed image are sum of both sets of coefficients

[00148] The filtering process of luma component can be controlled at the CU level. A flag is signalled to indicate whether GALF is applied to the luma component of a CU. For chroma component, whether GALF is applied or not is indicated at picture level only.

[00149] The filtering process is discussed. At the decoder side, when GALF is enabled for a block, each sample R(i, j) within the block is filtered, resulting in sample value R'(i, j) as shown below, where L denotes filter length, f m n represents filter coefficient, and f(k, Z) denotes the decoded filter coefficients.

[00150] FIG. 11 shows an example of relative coordinates used for 5x5 diamond filter support supposing the current sample’s coordinate (i, j) to be (0, 0). Samples in different coordinates filled with the same color are multiplied with the same filter coefficients. [00151] Geometry transformation-based adaptive loop filter (GALF) in VVC is discussed. In VVC test model 4.0 (VTM4.0), the filtering process of the Adaptive Loop Filter, is performed as follows: (11) where samples l(x + i,y + y) are input samples, 0(x, y) is the filtered output sample (i.e., filter result), and w( i,j) denotes the filter coefficients. In practice, in VTM4.0 it is implemented using integer arithmetic for fixed point precision computations (12) where L denotes the filter length, and where w(t,y) are the filter coefficients in fixed point precision.

[00152] The current design of GALF in VVC has the following major changes compared to that in JEM:

1) The adaptive filter shape is removed. Only 7x7 filter shape is allowed for luma component and 5x5 filter shape is allowed for chroma component.

2) Signaling of ALF parameters in removed from slice/picture level to CTU level.

3) Calculation of class index is performed in 4x4 level instead of 2x2. In addition, as proposed in JVET-L0147, sub-sampled Laplacian calculation method for ALF classification is utilized. More specifically, there is no need to calculate the honzontal/vertical/45 diagonal /135 degree gradients for each sample within one block. Instead, 1 :2 subsampling is utilized.

[00153] Non-linear ALF in the current VVC is discussed with regard to filtering reformulation.

[00154] Equation (11) can be reformulated, without coding efficiency impact, in the following expression: (13) where vv(ij) are the same filter coefficients as in equation (11) [excepted w(0, 0) which is equal to 1 in equation (13) while it is equal to 1 — in equation (11)].

[00155] Using the above filter formula of (13), VVC introduces the non-linearity to make ALF more efficient by using a simple clipping function to reduce the impact of neighbor sample values (/ (x + i, y + y ) ) when they are too different with the current sample value (I (x, y) ) being filtered.

[00156] More specifically, the ALF filter is modified as follows: 0'{x, y) = 7(x, y) + + i, y +;) - I(x, y), (14) where K(d, b) = min(b, max(— b, d)) is the clipping function, and k^i,]) are clipping parameters, which depends on the (i,j) filter coefficient. The encoder performs the optimization to find the best k(i,j).

[00157] In the JVET-N0242 implementation, the clipping parameters k(i, j') are specified for each ALF filter, one clipping value is signaled per filter coefficient. It means that up to 12 clipping values can be signalled in the bitstream per Luma filter and up to 6 clipping values for the Chroma filter.

[00158] In order to limit the signaling cost and the encoder complexity, only 4 fixed values which are the same for INTER and INTRA slices are used.

[00159] Because the variance of the local differences is often higher for Luma than for Chroma, two different sets for the Luma and Chroma filters are applied. The maximum sample value (here 1024 for 10 bits bit-depth) in each set is also introduced, so that clipping can be disabled if it is not necessary.

[00160] The sets of clipping values used in the JVET-N0242 tests are provided in the Table 5. The 4 values have been selected by roughly equally splitting, in the logarithmic domain, the full range of the sample values (coded on 10 bits) for Luma, and the range from 4 to 1024 for Chroma. [00161] More precisely, the Luma table of clipping values have been obtained by the following formula:

AlfClipL= L with M=2 10 and N=4. (15)

[00162] Similarly, the Chroma tables of clipping values is obtained according to the following formula:

AlfClipc= with M=2 10 , N=4 and A=4. (16)

Table 5: Authorized clipping values

INTRA/INTER tile group

LUMA { 1024, 181, 32, 6 }

CHROMA { 1024, 161, 25, 4 }

[00163] The selected clipping values are coded in the “alf data” syntax element by using a Golomb encoding scheme corresponding to the index of the clipping value in the above Table 5. This encoding scheme is the same as the encoding scheme for the filter index.

[00164] Convolutional Neural network-based loop filters for video coding are discussed. [00165] In deep learning, a convolutional neural network (CNN, or ConvNet) is a class of deep neural networks, most commonly applied to analyzing visual imagery. They have very successful applications in image and video recognition/processing, recommender systems, image classification, medical image analysis, natural language processing.

[00166] CNNs are regularized versions of multilayer perceptrons. Multilayer perceptrons usually mean fully connected networks, that is, each neuron in one layer is connected to all neurons in the next layer. The “fully-connectedness” of these networks makes them prone to overfitting data. Typical ways of regularization include adding some form of magnitude measurement of weights to the loss function. CNNs take a different approach towards regularization: they take advantage of the hierarchical pattern in data and assemble more complex patterns using smaller and simpler patterns. Therefore, on the scale of connectedness and complexity, CNNs are on the lower extreme.

[00167] CNNs use relatively little pre-processing compared to other image classification/processing algorithms. This means that the network learns the filters that in traditional algorithms were hand-engineered. This independence from prior knowledge and human effort in feature design is a major advantage.

[00168] Deep learning-based image/video compression typically has two implications: end- to-end compression purely based on neural networks, and traditional frameworks enhanced by neural networks. End-to-end compression purely based on neural networks are discussed in Johannes Balle, Valero Laparra, and Eero P. Simoncelli, “End-to-end optimization of nonlinear transform codes for perceptual quality,” Tn: 2016 Picture Coding Symposium (PCS), pp. 1 -5, Institute of Electrical and Electronics Engineers (IEEE) and Lucas Theis, Wenzhe Shi, Andrew Cunningham, and Ferenc Huszar, “Lossy image compression with compressive autoencoders,” arXiv preprint arXiv: 1703.00395 (2017). Traditional frameworks enhanced by neural networks are discussed in Jiahao Li, Bin Li, Jizheng Xu, Ruiqm Xiong, and Wen Gao, “Fully Connected Network-Based Intra Prediction for Image Coding,” IEEE Transactions on Image Processing 27, 7 (2018), 3236-3247, Yuanying Dai, Dong Liu, and Feng Wu, “A convolutional neural network approach for post-processing in HEVC intra coding,” MMM. Springer, 28-39, Rui Song, Dong Liu, Houqiang Li, and Feng Wu, “Neural network-based arithmetic coding of intra prediction modes in HEVC,” VCIP. IEEE, 1-4, and J. Pfaff, P. Helle, D. Maniry, S. Kaltenstadler, W. Samek, H. Schwarz, D. Marpe, andT. Wiegand, “Neural network based intra prediction for video coding,” Applications of Digital Image Processing XLI, Vol. 10752. International Society for Optics and Photonics, 1075213. [00169] The first type usually takes an auto-encoder like structure, either achieved by convolutional neural networks or recurrent neural networks. While purely relying on neural networks for image/ video compression can avoid any manual optimizations or hand-crafted designs, compression efficiency may be not satisfactory. Therefore, works distributed in the second type take neural networks as an auxiliary, and enhance traditional compression frameworks by replacing or enhancing some modules. In this way, they can inherit the merits of the highly optimized traditional frameworks. For example, a fully connected network for the intra prediction is proposed in HEVC as discussed in Jiahao Li, Bin Li, Jizheng Xu, Ruiqin Xiong, and Wen Gao, “Fully Connected Network-Based Intra Prediction for Image Coding,” IEEE Transactions on Image Processing 27, 7 (2018), p. 3236-3247.

[00170] In addition to intra prediction, deep learning is also exploited to enhance other modules. For example, the in-loop filters of HEVC are replaced with a convolutional neural network and achieve promising results in Yuanying Dai, Dong Liu, and Feng Wu, “A convolutional neural network approach for post-processing in HEVC intra coding,” MMM. Springer, 28-39. The work in Rui Song, Dong Liu, Houqiang Li, and Feng Wu, “Neural network-based arithmetic coding of mtra prediction modes in HEVC,” VCIP. IEEE, 1-4 applies neural networks to improve the arithmetic coding engine.

[00171] Convolutional neural network based in-loop filtering is discussed. In lossy image/video compression, the reconstructed frame is an approximation of the original frame, since the quantization process is not invertible and thus incurs distortion to the reconstructed frame. To alleviate such distortion, a convolutional neural network could be trained to learn the mapping from the distorted frame to the original frame. In practice, training must be performed prior to deploying the CNN-based in-loop filtering.

[00172] Training is discussed. The purpose of the training processing is to find the optimal value of parameters including weights and bias.

[00173] First, a codec (e.g. HM, JEM, VTM, etc.) is used to compress the training dataset to generate the distorted reconstruction frames. Then, the reconstructed frames are fed into the CNN and the cost is calculated using the output of CNN and the groundtruth frames (original frames). Commonly used cost functions include Sum of Absolution Difference (SAD) and Mean Square Error (MSE). Next, the gradient of the cost with respect to each parameter is derived through the back propagation algorithm. With the gradients, the values of the parameters can be updated. The above process repeats until the convergence criteria is met. After completing the training, the derived optimal parameters are saved for use in the inference stage. [00174] The convolutional process is discussed. During convolution, the filter is moved across the image from left to right, top to bottom, with a one-pixel column change on the horizontal movements, then a one-pixel row change on the vertical movements. The amount of movement between applications of the filter to the input image is referred to as the stride, and it is almost always symmetrical in height and width dimensions. The default stride or strides in two dimensions is (1,1) for the height and the width movement.

[00175] FIG. 12A is an example architecture 1200 of the proposed CNN filter, and FIG. 12B is an example of construction 1250 of residual block (ResBlock). In most of deep convolutional neural networks, residual blocks are utilized as the basic module and stacked several times to construct the final network wherein in one example, the residual block is obtained by combining a convolutional layer, a ReLU/PReLU activation function and a convolutional layer as shown in FIG. 12B.

[00176] Inference is discussed. During the inference stage, the distorted reconstruction frames are fed into CNN and processed by the CNN model whose parameters are already determined in the training stage. The input samples to the CNN can be reconstructed samples before or after DB, or reconstructed samples before or after SAG, or reconstructed samples before or after ALF. [00177] The current CNN-based loop filtering has certain problems. For example, a NN model does not use or otherw ise leverage external information (e.g., including information from a video codec, such as coding parameters and/or coding syntax, which is information external to that generated by the NN model itself) as attention, or as an attention mechanism. Accordingly, information including various coding parameters such as prediction (e g., prediction mode, motion vectors, and the like), split (e g., partitioning information), and the like may not be fully exploited, such as to recalibrate feature maps.

[00178] Disclosed herein are techniques that solve one or more of the foregoing problems. For example, the present disclosure provides one or more neural network (NN) filter models trained as coding tools to improve the efficiency of video coding. The NN-based coding tools can be used to replace or otherwise enhance the modules involved in a video codec. For example, a NN model can serve as an additional intra prediction mode, inter prediction mode, transform kernel, or loop filter. The present disclosure also elaborates on how to design a NN model that is based on partitioning information of the video unit For example, the partitioning information (e.g., split) may be used as an attention or an attention mechanism, which are described further below. It should be noted that the NN models could be used as any coding tools, such as NN- based intra/inter prediction, NN-based super-resolution, NN-based motion compensation, NN- based reference generation, NN-based fractional pixel interpolation, NN-based in-loop/post filtering, and the like.

[00179] The listing of embodiments below should be considered as examples to explain general concepts. These embodiments should not be interpreted in a narrow way. Furthermore, these embodiments can be combined in any manner.

[00180] In the disclosure, a NN model can include any kind of NN architecture, such as a convolutional neural network (CNN) or a fully connected NN, or a combination of CNNs and fully connected NNs. In the following discussion, an NN model may also be referred to as a CNN model.

[00181] In the following discussion, a video unit may be a sequence, a picture, a slice, a tile, a brick, a subpicture, a CTU/CTB, a CTU/CTB row, one or multiple CUs/coding blocks (CBs), one or multiple CTUs/CTBs, one or multiple Virtual Pipeline Data Unit (VPDU), a sub-region within a picture/slice/tile/brick. A father video unit represents a unit larger than the video unit. Typically, a father unit will contain several video units, for example, when the video unit is CTU, the father unit could be slice, CTU row, multiple CTUs, etc. In some embodiments, the video unit may be a sample/pixel.

[00182] FIG. 13 is an example of a process 1300 for generating filtered samples based on a NN filter model that receives a coding parameter (e.g., external information to the NN filter model) as an input. The NN filter model has an attention mechanism that is based on the coding parameter input. The attention mechanism is configured to generate or obtain an attention, which is useful to mimic cognitive attention and, in effect, enhances some parts of data input to the NN filter while diminishing other parts of data input to the NN filter. For example, an attention may be obtained by processing external information to the NN filter model, such as one or more coding parameters, to extract the attention. The attention is configured to be applied to one or more feature maps, such as by weighting the feature maps according to the attention.

[00183] In the process 1300 shown in FIG. 13, at least some unfiltered samples are provided as input into an NN filter. In an example, an unfiltered sample is a sample (e.g., a pixel) of a video unit that has not been subjected to any filtering yet, or has not been subjected to a sufficient amount of filtering yet. The output of the NN filter may thus be a filtered sample. The output of the NN filter is also based on an NN filter model generated using a coding parameter input. The coding parameter input may be related to a reconstruction of the video unit, a split or partitioning scheme for the video unit, a prediction mode of the video unit, a quantization parameter (QP) associated with the video unit, and/or a boundary strength parameter for a boundary of the video unit. [00184] For example, convolutional layers may be used to extract features from the coding parameters (e.g., external information), or from both the coding parameters and internal information, such as features extracted inside the NN filter model. At least one of the extracted features is used as an obtained attention in the NN filter model.

[00185] In another example, the coding parameter provided as input to the NN filter is more particularly partitioning information of the video unit. In some cases, the NN filter model on which the NN filter is based is configured to obtain the attention based on the partitioning information.

[00186] The partitioning information may comprise a mean pixel value for each of one or more CUs of the video unit. In this example, each CU can be represented by its average pixel value (or sample value), so that CUs can be differentiated from each other, because different CUs often have different average pixel values (or sample values). Thus, the mean pixel value for the CUs (e.g., of a CTU) may be useful to represent how the CTU is split or partitioned into CUs. In a particular example, the mean pixel value for a CU is an average of luma values of the pixels in the CU, or an average of chroma values of pixels in the CU. For example, luma partitioning can be represented by an average of luma samples in the CU, while chroma partitioning can be represented by an average of chroma samples in the CU.

[00187] The partitioning information may also comprise pixel values for each of one or more CUs of the video unit. For example, the pixel values may be based on a proximity of the pixel to a boundary of the CU. A pixel nearer to the boundary of the CU may have a first value, while a pixel farther away from the boundary of the CU may have a second value different than the first value.

[00188] In some examples, the partitioning information is represented by a MxN array, in which M is a width of the video unit to be coded, and N is a height of the video unit to be coded. In another example, M is a number of columns of another input to the NN filter model, and N is a number of rows of the other input to the NN filter model. For example, M may be a number of columns of the video unit to be coded, while N is a number of rows of the video unit to be coded. [00189] The partitioning information may include sample boundary values, luma component values, color component values, or combinations thereof

[00190] The unfiltered sample may include a luma component and a chroma component. In some examples, the NN filter model is generated based on the luma component and the chroma component. For example, a first value is assigned to the luma component and a second value is assigned to the chroma component. The second value may be different than the first value, and the NN filter model is generated based on the first and second values. [00191] In some examples, the NN filter model is additionally generated based on a quantization parameter (QP) of the video unit, a slice type of the video unit, a temporal layer identifier of the video unit, a boundary strength of the video unit, a motion vector of the video unit, a prediction mode of the video unit, an intra-prediction mode of the video unit, a scaling factor of the video unit, or combinations thereof.

[00192] A granularity of the NN filter model specifies a size of a video unit to which the NN filter model can be applied. The NN filter model granularity may be derived in some examples. In other examples, the NN filter model granularity may be signaled in the bitstream, such as within a sequence header, a picture header, a slice header, a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), or combinations thereof.

[00193] FIG. 14 is an example of a process 1400 applying an attention obtained using external information, such as a coding parameter or, more specifically, partitioning information, on feature maps of a NN filter model to provide recalibrated feature maps in accordance with some examples. The feature maps of a NN filter model are the result of applying the filters to an input image (or a feature map that is provided as output by a prior layer). For example, at each layer of the NN filter model, the feature map is the output of that layer. Accordingly, feature maps produced by layers internal to the NN filter model may be referred to as intermediate feature maps, while a feature map produced by a final layer of the NN filter model may be referred to as a final feature map. For example, a final output of the NN filter model may be the final feature map.

[00194] In the example of FIG. 14, an operation performed by the convolutional layer(s) of the NN filter model is denoted as a, while external information (e.g., coding parameters) are denoted as E, and internal information (e.g., feature maps extracted inside the NN filter model) are denoted as I. The obtained attention is denoted as A. The process 1400 applies the attention A on feature maps Gto generate recalibrated feature maps </>.

[00195] Accordingly, the operation a is applied to the external information (e.g., coding parameters), or a concatenation of the external information and internal information, to extract or otherwise obtain the attention A. The attention A is applied to feature maps G to generate recalibrated feature maps 0. For example, applying the attention A to the feature maps G effectively reweights the feature maps G (e.g., applies different weights to different elements of the feature maps G), and the recalibrated feature maps </> are the reweighted feature maps that result from the application of the attention A to the feature maps G. In the process 1400, N is a channel number, W is a channel width, and H is a channel height. [00196] In FIG. 14, the intermediate feature maps of the NN filter model are denoted as G, where G G RNXWXH -p ke o b( amed attention is denoted as A, where A G R WxH represents the obtained attention. In this context, the G symbol indicates that G is an element of a set given by set given by R WxH .

[00197] For example, R is a domain that a specific element in the feature map or attention belongs to. R may be a domain including any real numbers, or a domain including any integer real numbers. In some examples, a feature map is a two-dimensional or three-dimensional array. Accordingly, a feature map G, such as an intermediate feature map G, where G G R NXWXH , indicates that each element of the feature map G belongs to R. and there are NxWxH elements in the feature map G. In this example, having values for N, W, and H indicates that the feature map G is a three-dimensional array, with the dimensionality of the value of N, W, and H, respectively, along each dimension. In another example, such as an attention A, where A G R WxH . each element of the attention A belongs to R, and there are WxH elements in the attention A. In this example, having values for W and H indicates that the attention A is a two-dimensional array, with the dimensionality of the value of W and H, respectively, along each dimension.

[00198] In one example, the recalibrated feature maps are generated according to:

[00199] In another example, the recalibrated feature maps are generated according to: represents a mapping function applied on each element of the attention.

[00200] In yet another example, the recalibrated feature maps are generated according to: represents a mapping function applied on each element of the attention.

[00201] As described above, residual blocks are utilized as the basic module of NN models, and multiple residual blocks can be stacked to construct the final network. For example, a residual block can be obtained by combining a convolutional layer, a ReLU/PreLU activation function, and another convolutional layer as shown in FIG. 12B. Accordingly, in at least some examples, an attention is only applied to the last layer (e.g., on a feature map output of the last layer) of a residual block, rather than on every layer of the residual block. An example of applying an attention in this way is also shown in FIG. 16B, discussed further below.

[00202] In another example, an attention is only applied to specified layers (e.g., on feature maps output by the specified layers) of the NN filter model, rather than on every layer of the NN filter model. The specified layers may be specified by a topological structure of the NN filter model.

[00203] FIG. 15 is an example of a process 1500 for applying a neural network filter having a configurable depth to an unfiltered sample of a video unit to generate a filtered sample. In the process 1500 shown in FIG. 15, at least some unfiltered samples are provided as an input to the filtering system 1502. In an example, an unfiltered sample is a sample (e.g., a pixel) of a video unit that has not been subjected to any filtering yet, or has not been subjected to a sufficient amount of filtering yet. The output of the filtering system 1502 may thus be a filtered sample. [00204] The filtering system 1502 includes NN filter 1504 based on an NN filter model having a first depth, and a NN filter 1506 based on an NN filter model having a second depth. The depth of the filtering system 1502, or the NN filter models thereof, is thus configurable. The NN filters 1504, 1506 are similar to those described above, such as with respect to FIGS. 12A and 12B. As described above, the NN filters 1504, 1506 include multiple residual blocks, and the number of residual blocks of each NN filter 1504, 1506 is adepth of that NN filter 1504, 1506. The example shown in FIG. 15 is illustrative, and in other examples the filtering system 1502 may include more than two filters (e.g., the two-filter example shown is not intended to be limiting unless explicitly stated). Accordingly, more than two depths may be implemented by the applied NN filter(s).

[00205] As described above, in some examples, NN filter models may have different depths, which may be selected in a predefined manner, or derived in an on-the-fly manner. In some cases, the filtering system 1502 includes a NN filter having a configurable depth, which is represented by the NN filter 1504 (based on a filter model having a first depth) and the NN filter 1506 (based on a filter model having a second depth). In other cases, the filtering system 1502 includes multiple NN filters 1504, 1506, each based on an NN filter model having a different depth, and one of the NN filters 1504, 1506 is selected (e.g., by filter selection logic 1508) to be used as the NN filter, depending on various characteristics of the video unit or unfiltered sample thereof.

[00206] In various examples, a NN filter is applied to the unfiltered sample to generate a filtered sample. In FIG. 15, a depth of the NN filter model is selectable, and thus the NN filter may be a first NN filter 1504 (using a NN filter model having a first depth) or a second NN filter 1506 (using a NN filter model having a second depth). The filtering system 1502 includes filter selection logic 1508, which is configured to determine a depth to be applied to the unfiltered sample, and select one of the NN filters 1504, 1506 (or filter models used thereby) based on the depth to be applied. For example, the filter selection logic 1508 may determine to apply the NN filter 1504 having a first depth to a first video unit, and to apply the NN filter 1506 having a second depth to a second video unit.

[00207] Irrespective of the depth of the NN filter model selected by the filter selection logic 1508, applying the NN filter having a certain depth to the unfiltered sample generates the filtered sample (e.g., an output of the filtering system 1502). A conversion between a video media file and a bitstream can then be performed based on the filtered sample that was generated, as described above.

[00208] In an example, the filter selection logic 1508 is configured to determine the depth based on one or more of: a temporal layer of the video unit, a type of a slice or a picture (e.g., ‘i’ for intra, ‘e’ for inter, or ‘b’ for bidirectional) that contains the video unit, a list of reference pictures that are matched to the video unit, a color component of the video unit, and a color format (e.g., luma-chroma or RGB) of the video unit.

[00209] In some examples, the filter selection logic 1508 is configured to determine to apply NN filter models having different depths to different video units in a picture or a slice. For example, the NN filter 1504 is selected for a first video unit in the picture or the slice, while the NN filter 1506 is selected for a second video unit in the picture or the slice.

[00210] In other examples, the filter selection logic 1508 is configured to determine to apply NN filter models having different depths to different video units in different pictures or slices. For example, the NN filter 1504 is selected for a first video unit in a first picture or a first slice, while the NN filter 1506 is selected for a second video unit in a second picture or a second slice.

[00211] In still other examples, the filter selection logic 1508 is configured to determine to apply NN filter models having different depths to video units based on a temporal layer or a slice type of the video unit. In some cases, temporal layers are grouped into subgroups, and a NN filter model having a same depth is applied to video units in temporal layers in a particular subgroup, while NN filter models having different depths are applied to video units in temporal layers in different subgroups.

[00212] In some examples, the filter selection logic 1508 is configured to determine to apply NN filter models having different depths based on whether the video unit is a coding tree unit (CTU), a coding tree block (CTB), a row of a CTU, a row of a CTB, a slice, a tile, a picture, a sequence, or a subpicture.

[00213] The depth for a particular video unit may also be signaled, such as by an encoder of the video unit to a decoder of the video unit. For example, the depth may be signaled to the decoder using a supplemental enhancement information (SEI) message, a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a video parameter set (VPS), a picture header, or a slice header.

[00214] In some examples, different depths are signaled for different video units. In other examples, such as where the unfdtered sample includes a luma component and a chroma component, different depths may be independently signaled for each of the luma component and the chroma component.

[00215] A discussion of the model selection is provided.

[00216] Example 1

[00217] 1. A NN filter model may use external information such as a reconstruction parameter, a split or partitioning parameter, a prediction parameter, a boundary strength parameter, a QP, and the like (generally, coding parameters related to a video unit being filtered) as an input to obtain an attention. For example, the NN filter model has an attention mechanism that is based on a coding parameter input.

[00218] a. In one example, convolutional layers of the NN filter model are used to extract features from external information or both external and internal information, where the internal information refers to the features extracted inside the network while the external information refers to other information that cannot be obtained from the features inside the network, such as coding parameters related to the video unit being filtered. At least one of those extracted features will be used as attention. As described above, FIG. 14 provides an illustration of an attention mechanism in accordance with some examples, where the operation performed by the convolutional layer(s) is denoted as a, the external information is denoted as E, the internal information is denoted as I, and the obtained attention is denoted as A.

[00219] i. In one example, E is one of a reconstruction parameter, a split or partitioning parameter, a prediction parameter, a boundary strength parameter, a QP, and the like.

[00220] ii. In one example, E could be any combination of a reconstruction parameter, a split or partitioning parameter, a prediction parameter, a boundary strength parameter, a QP, and the like.

[00221] hi. In one example, I is an intermediate feature map(s) of the NN models that will be recalibrated by the obtained attention.

[00222] iv. In one example, A = cr(E).

[00223] v. In one example, A = a(E, I), where E and I are concatenated first and then fed into the convolutional layers. [00224] vi. In one example, A = a(E). where E is a concatenation of the reconstruction image and the split image, a is a two-layer convolutional neural network, A is a single channel feature map whose spatial resolution is the same as the feature maps that A is going to apply on.

[00225] b. In one example, the obtained attention is used to recalibrate the intermediate feature maps. The intermediate feature maps of the NN model are denoted as G, where G 6 R NXW *H. p[ are th e channel numbers, width, and height respectively. The obtained attention is denoted as A, where A G R WXH represent the obtained attention. In this context, the G symbol indicates that G is an element of a set given by R NXWXH , and that A is an element of a set given by R WXH .

[00226] i. In one example, the process of applying the attention could be written as:

_ Qi,i ,k x fiGk, i<i< N, l<j< W, l<k< H, where c/> is the recalibrated feature maps.

[00227] ii. In one example, the process of applying the attention could be written as: the recalibrated feature maps, f stands for a mapping function applied on each element of the attention. The mapping function may be a sigmoid function, a hyperbolic tangent (e.g., tanh) function, and the like. For example, a sigmoid function is a function having a characteristic ‘S’-shaped or sigmoid curve. The hyperbolic tangent function is one example of a sigmoid function.

[00228] 1. In one example, for different channels of feature maps, different A and/or different f may be used.

[00229] iii. In one example, the process of applying the attention could be written as: the recalibrated feature maps, f stands for a mapping function applied on each element of the attention. The mapping function may be a sigmoid function, a hyperbolic tangent (e.g., tanh) function, and the like.

[00230] 1. In one example, for different channels of feature maps, different A and/or different f may be used.

[00231] iv. In one example, the attention operation may be applied to specified layers inside the network.

[00232] 1. In one example, when the network contains residual blocks, the attention operation is only applied on the feature maps from the last layer of each residual block.

[00233] Example 2 [00234] 2. In a second embodiment, the external attention mechanism described here may be applied in various ways. For example, the proposed external attention mechanism can be used in any NN models for video coding, such as NN-based intra/inter prediction, NN-based superresolution, NN-based motion compensation, NN-based reference generation, NN-based fractional pixel interpolation, NN-based in-loop/post filtering, and the like.

[00235] a. In one example, the external attention mechanism is used in NN-based in-loop filtering.

[00236] Example 3

[00237] 3. In a third embodiment, a NN model depth may be specified in various ways. For example, the depth of NN models (e.g., the number of residual blocks) may be pre-defined or derived on-the-fly.

[00238] a. In one example, the derivation may depend on the coded information, such as temporal layers, slice/picture types, reference picture list information, characteristics of a video unit wherein the NN model is applied to, color component, color format.

[00239] b. In one example, the depth may be adaptive for different video units within one picture/slice.

[00240] c. In one example, the depth may be adaptive for two video units in two different pictures/slices.

[00241] d. In one example, the depth of NN models may be the same or different for video units in different temporal layers or different types of slices or different slices or different pictures, or any video units.

[00242] e. In one example, for video units in different temporal layers or different types of slices, the depth of NN models may be the same.

[00243] f. In one example, a different network depth is used for each temporal layer or each type of slice.

[00244] i. In one example, for video units in higher temporal layers, the depth of NN models is smaller.

[00245] 1. In one example, the NN model for higher temporal layers comprises several residual blocks as shown in FIG. 12A. The number of residual blocks is 8 for a higher temporal layer (e g., relative to a lower temporal layer).

[00246] ii. In one example, for video units in inter slices, the depth of NN models is smaller. [00247] 1. In one example, the NN model for the inter slice comprises several residual blocks as shown in FIG. 12A. The number of residual blocks is 8.

[00248] iii. In one example, for video units in intra slices, the depth of NN models is larger. [00249] 1. In one example, the NN model for the intra slice comprises several residual blocks as shown in FIG. 12A. The number of residual blocks is 32.

[00250] g. In one example, temporal layers are grouped into several subgroups. For each subgroup, a kind of network depth is used.

[00251] Example 4

[00252] 4. In a fourth embodiment, an indication of the depth of NN models for a video unit depth may be signaled to a decoder.

[00253] a. In one example, indication of at least one depth of NN models may be signaled in SEI message/SPS/PPS/APS/VPS/picture header/slice header/CTU, etc.

[00254] b. In one example, multiple depths of NN models may be signaled to the decoder.

[00255] c. In one example, the depth of NN models for luma and the depth of NN models for chroma may be signaled to the decoder individually.

[00256] Example 5

[00257] 5. In a fifth embodiment, a NN model may additionally take or receive partitioning information of a video unit as input.

[00258] a. In one example, partitioning information is derived by filling each coding unit (CU) with its mean value.

[00259] b. In one example, partitioning information is derived by setting different pixel values for samples near a CU boundary relative to samples inside the CU.

[00260] c. In one example, partitioning information may be represented by a MxN array.

[00261 ] i. In one example, M and N may represent a width and a height of the video unit or image to be coded.

[00262] ii. In one example, M and N may represent a number of columns and a number of rows of another array, such as the video unit to be coded, which is to be input to the NN model.

[00263] Example 6

[00264] 6. In a sixth embodiment, a shared NN model can be used to handle both luma and chroma components. For example, the NN model may be generated based on a luma component and a chroma component of an unfiltered sample.

[00265] a. In one example, the shared NN model may additionally take color component information as input.

[00266] i. In one example, different values are assigned to different color components.

[00267] ii. In one example, different values are assigned to the luma component and the chroma components.

[00268] b. In one example, component information may be represented by a MxN array. [00269] i. In one example, M and N may represent the width and height of the video unit or image to be coded.

[00270] ii. In one example, M and N may represent a number of columns and a number of rows of another array, such as the video unit to be coded, which is to be input to the NN model. [00271] c. As an input, partitioning information may be represented by numbers.

[00272] i. For example, samples at boundaries of blocks and samples not at boundaries of blocks may be represented by different numbers (such as 0 and 1) .

[00273] ii. As an input, a color component may be represented as a number. E.g., luma: 0, Cb: 1, Cr: 2.

[00274] Example 7

[00275] 7. In a seventh embodiment, the output of a NN model may be conditioned or generated on any information which may be a signaled syntax element or derived information.

[00276] a. In one example, the NN model may additionally take or receive a quantization parameter (QP) as input. For example, the output of the NN model may be conditioned on the QP value.

[00277] b. In one example, the NN model may additionally take or receive a slice type and/or a temporal layer identifier (ID) of the video unit as input. For example, the output of NN model may be conditioned on the slice type and/or temporal layer ID.

[00278] c. In one example, the NN model may additionally take or receive a boundary strength of the video unit or a function based on the boundary strength of the video unit as input. [00279] d. In one example, the NN model may additionally take or receive motion information, such as a motion vector of the video unit, as input.

[00280] e. In one example, the NN model may additionally take or receive a prediction mode of the video unit as input.

[00281] f. In one example, the NN model may additionally take or receive an intra-prediction mode of the video unit as input.

[00282] g. In one example, the NN model may take or receive a scaling factor of the video unit as input. For example, the output of NN model may be conditioned on the scaling factor.

[00283] i. In one example, the scaling factor refers to the factor scaling the difference between the reconstruction and the output of NN model.

[00284] h. In one example, the information may be represented by a M*N array.

[00285] i. In one example, M and N may represent the width and height of the video unit or image to be coded. [00286] ii. In one example, M and N may represent a number of columns and a number of rows of another array, such as the video unit to be coded, which is to be input to the NN model. [00287] i. As an input, the information may be represented by numbers.

[00288] Example 8

[00289] 8. In an eighth embodiment, the indication of NN models may be adaptively binarized.

[00290] a. In one example, the binarization of NN models may depend on slice type, and/or color component, and/or temporal layer ID.

[00291] b. In one example, the binarization of NN models may be signaled from the encoder to the decoder.

[00292] Example 9

[00293] 9. In a ninth embodiment, a NN model granularity (e.g., of applying NN models or performing NN model selection) may be signaled in the bitstream or derived on-the-fly.

[00294] a. In one example, indication of the granularity is signaled in the bitstream within a sequence header, a picture header, a slice header, a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), or combinations thereof, and the NN filter model granularity' specifies a size of a video unit to which the NN model can be applied. [00295] A first exemplary embodiment is discussed.

[00296] This first exemplary embodiment presents a convolutional neural network-based inloop filtering method wherein adaptive model selection is introduced. The proposed Deep inloop filter with Adaptive Model selection (DAM) method is developed from the prior contribution JVET-V0100, introducing a new network structure to the code base of VTM- 11.0+NewMCTF. Compared with VTM-11.0+NewMCTF, the proposed method demonstrates BD-rate reductions for {Y, Cb, Cr}, under artificial intelligence Al, RA, and LDB configurations. [00297] In this first exemplary embodiment, convolutional neural networks (CNN) are utilized to construct in-loop filters for reducing the distortion incurred during compression. The network structure is revised from the one discussed in Yue Li, Li Zhang, Kai Zhang, “Deep inloop filter with adaptive model selection,” JVET-V0100. Similar to JVET-V0100, residual blocks are utilized as the basic module and stacked several times to construct the final network. As a further development from JVET-V0100, external attention mechanism is introduced in this contribution, leading to an increased representation capability with a similar model size. In addition, to deal with different types of content, individual networks are trained for different types of slices and quality levels. [00298] The first exemplary embodiment is related to that shown in FIGS. 12A and 12B. To improve the architecture, FIG. 16A and 16B are now introduced, which include the external attention mechanism. FIG. 16A is a schematic block diagram of architecture 1600 of a NN filtering method in accordance with various examples, and FIG. 16B is a schematic block diagram showing the construction of an attention residual block 1650 used in the architecture 1600 of FIG. 16A in accordance with various examples.

[00299] In addition to the attention residual block 1650, other parts of the architecture 1600 are the same as those in JVET-V0100. The calculation process in the attention module 1650 can be written as:

F ont - F in X f (Rec, Pred) + F in

[00300] Where F in and F out denote the input and the output of the attention module 1650, respectively. Rec and Pred stand for the reconstmction and the prediction, respectively. In this example,/ comprises 2 convolutional layers, where an activation function is applied after the first convolutional layer. The objective of / is to generate a spatial attention map from external information, which then recalibrates the feature maps F in.

[00301] In the proposed technique of the first exemplary embodiment, each slice or block could determine whether to apply the CNN-based filter or not. When the CNN-based filter is determined to be applied to a slice/block, which model from a candidate model list including three models could be further decided. To this end, individual models are trained with QPs in {17, 22, 27, 32, 37, 42}. Given a test QP for a sequence, denoted as q, the candidate model list includes models trained with QPs equal to {q, q-5, q-10}. The selection process is based on the rate-distortion cost at the encoder side. Indication of on/off control as well as the model index, if needed, are signalled in the bitstream Other details regarding the model selection are provided as below.

[00302] The granularity of the filter determination and the model selection is dependent on resolution and QP. In the proposed scheme, given a higher resolution and a larger QP, the determination and selection will be performed for a larger region.

[00303] The candidate model list is different across different temporal layers. For a low temporal layer, the third candidate is replaced by the intra-slice NN filter model if the ratio of intra-coded samples is no smaller than a threshold. For a high temporal layer, the third candidate, i.e. the model corresponding to q-10, is replaced by the model corresponding to q+5.

[00304] For all-intra configuration, model selection is disabled while on/off control is still preserved. [00305] An open source machine learning framework, such as PyTorch, is useful for performing the inference of the proposed CNN filters in VTM. The network information in the inference stage is provided in Table 1-1 as suggested by S. Liu, A. Segall, E. Alshina, R.-L. Liao., “JVET common test conditions and evaluation procedures for neural network-based video coding technology,” JVET-V2016.

Table 1-1. Network Information for NN-based Video Coding Tool Testing in Inference Stage

[00306] PyTorch may also be used as the training platform. The DIV2K (from https://data.vision.ee.ethz.ch/cvl/DIV2K/, R. Timofte, E. Agustsson, S. Gu, J. Wu, A. Ignatov, L. V. Gool) and BVI-DVC (from Ma, Di, Fan Zhang, and David R. Bull. "BVI-DVC: A Training Database for Deep Video Compression." arXiv preprint arXiv:2003.13552 (2020).) datasets are adopted to train the CNN filters of I slices and B slices, respectively. Different CNN models are trained to adapt to different QP points. The network information in the training stage is provided in Table 1-2 as suggested by S. Liu, A. Segall, E. Alshina, R.-L. Liao., “JVET common test conditions and evaluation procedures for neural network-based video coding technology,” JVET- V2016.

Table 1-2. Network Information for NN-based Video Coding Tool Testing in Training Stage

[00307] The proposed CNN-based in-loop filtering method is tested on top of VTM-11 .0 + new MCTF (from https://vcgit.hhi.fraunhofer.de/jvet/WCSoftware_VTM/-/tags/V TM-l 1.0) according to the common test conditions suggested by S. Liu, A. Segall, E. Alshina, R.-L. Liao., “JVET common test conditions and evaluation procedures for neural network-based video coding technology,” JVET-V2016. The new MCTF patch is from https://vcgit.hhi.fraunhofer.de/jvet-ahg-nnvc/nnvc-ctc/-/tre e/master/Software%20Patches.

[00308] Deblocking filtering and SAO are disabled while ALF (and CCALF) is placed after the proposed CNN-based filtering. Test results are shown in Table 1-3 through Table 1-5. Under Al configurations, the proposed method can bring 9.12%, 22.39%, and 22.60% BD-rate reductions on average for Y, Cb, and Cr, respectively. Under RA configurations, the proposed method can bring 12.32%, 27.48%, and 27.22% BD-rate reductions on average for Y, Cb, and Cr, respectively. Under LDB configurations, the proposed method can bring %, %, and % BD- rate reductions on average for Y, Cb, and Cr, respectively.

Table 1-3. Performance ofthe proposed method on top ofVTMl 1.0 + new MCTF (RA)

Table 1-4. Performance of the proposed method on top of VTM11.0 + new MCTF (LDB)

Table 1-5. Performance of the proposed method on top of VTM11.0 + new MCTF (Al)

[00309] The first exemplary embodiment presents a CNN-based in-loop filtering method.

The proposed CNN-based filtering method demonstrates useful coding gains.

[00310] A second exemplary embodiment is discussed.

[00311] As a rapid development of NN-based machine learning algorithms, deep learning methods are being tentatively used in a much wider range than well-known artificial intelligence applications such as face recognition or auto-driving. Recently, deep learning models are investigated intensively to improve the compression efficiency for video coding, especially at the in-loop filtering stage. Although deep learning-based in-loop filtering methods in prior arts have already shown a remarkable potential capability in video coding, content propagation issue is still not well recognized and addressed yet.

[00312] Content propagation is the fact that contents of reference frames are propagated to frames referring to them, which typically leads to over-filtering issues. In some examples, an iteratively trained deep in-loop filter with adaptive model selection (iDAM) addresses the content propagation issue. First, an iterative training scheme may be useful, which enables the network to gradually take into account the impacts of content propagation. Second, a filter selection mechanism may be useful, such as by allowing a block to select from a set of candidate filters with different filtering strengths. Besides, one approach is to design a conditional in-loop filtering method that can deal with multiple quality levels with a single model and serve the functionality of filter selection by modifying the input parameters. Extensive experiments on top of the latest video coding standard (e.g., Versatile Video Coding, VVC) have been conducted to evaluate the proposed techniques. Compared with the VVC reference software VTM-11.0, certain examples described herein achieve a new state-of-the-art, leading to {7.91%, 20.25%, 20.44%}, {11.64%, 26.40%, 26.50%}, and {10.97%, 26.63%, 26.77%} BD-rate reductions on average for {Y, Cb, Cr} under all-intra, random-access, and low-delay configurations respectively. The proposed iDAM scheme provides improved coding performance compared to existing solutions. In addition, the syntax elements of the proposed scheme were adopted at the 76th meeting of Audio Video coding Standard (AVS).

[00313] Various described examples include adaptive model selection, convolutional neural networks, conditional in-loop filtering, deep in-loop filtering, iterative training, and VVC.

[00314] Lossy video coding incurs distortion on reconstructed images. The distortion brings damages in two aspects. First, it directly affects the compression efficiency by degrading the objective as well as subjective quality of a reconstructed image. Second, it indirectly lowers the compression efficiency by weakening correlations between a distorted frame and a frame referring to it. To reduce the distortion, in-loop filters are integrated for improving compression efficiency as well as promoting subjective quality in video coding.

[00315] The latest video coding standard (i.e., VVC), includes three kinds of in-loop filters known as deblocking filter, sample adaptive offset (SAO), and adaptive loop filter (ALF). Deblocking filter is designed to reduce blocking artifacts caused by block-based partitioning while SAO and ALF target alleviating reconstruction artifacts due to quantization. [00316] Though in-loop filters in VVC could reduce compression distortion, those handcrafted filters are insufficient to accommodate complicated natural videos. Learning-based filtering has considered, which can be classified into out-of-loop filtering (also known as post processing or post filtering) and in-loop filtering, where a filtered frame cannot be referred to by a following frame in the former scheme while it can be in the latter scheme.

[00317] Post-filtering for image coding has been considered, especially JPEG. For example, a 4-layer convolutional neural network (CNN) for compression artifacts reduction has been proposed, which achieves more than IdB improvement in PSNR compared with JPEG. Postfiltering for video coding has also been proposed, such as High Efficiency Video Coding (HEVC), which is a video coding standard prior to VVC. Improving the quality of a frame by exploiting its neighboring frames with higher qualities is possible. Further, in-loop filtering has several advantages over post filtering, including guaranteed quality level from content providers, potential saving of the frame buffer, improved objective and subjective qualities due to availability of better references, and lower decoding complexity because of less residues. However, in-loop filtering, which integrates learning-based filters into the coding loop, may be more challenging as a filtered frame will serve as a reference frame and will affect the compression of succeeding frames. Incorporating deep networks into the in-loop filtering stage has been considered. For example, training a 3-layer CNN as an in-loop filter for HEVC is possible. To deal with different quality levels in the testing stage, two models are trained, corresponding to low QP range 20-29 and high QP range 30-39, one model for each frame is selected based on the frame QP. During testing, CNN-based filtering is activated either based on picture order count (POC) or frame level cost. An attention-based CNN for the in-loop filtering of VVC may be possible. To prevent cases where CNN filters fail to generate improved results, a block-level on/off control mechanism may be introduced.

[00318] Although deep learning-based in-loop filtering methods have improved potential capability in video coding, they still face a major obstacle — content propagation issue. Content propagation is an inherent feature of video compression and typically means that contents of a reference frame will be propagated to a frame referring to it. For example, when using skip mode, a current block is predicted from a previous coded reference block without signaling additional residues. If the deep filter is applied on both the reference block and the current block, it is equivalent to applying the filter twice, leading to over-filtering of the current block. If the content propagation issue is not addressed, it can hinder the perfomiance of deep in-loop filters. For example, certain prior approaches achieve much less significant gains under the randomaccess configuration. [00319] In some of the examples described herein, an Iteratively trained Deep in-loop filter with Adaptive Model selection (iDAM) may be useful to address the content propagation issue in video coding. First, iterative training may enable the network to gradually take into account the influence of content propagation. By generating training samples iteratively, the filtering applied on reference frames is implicitly considered during the training process. Second, a filter selection strategy may enable a block to select an appropriate one from several NN-based filters having different filtering strengths. Considering that filters trained at low quality levels need to compensate more for the large distortions and vice versa, filters are obtained with different filtering strengths by reusing models trained at several quality levels. In addition, conditional inloop filters may be trained by feeding an auxiliary parameter based on QP into the NN. The conditional filter could deal with multiple quality levels with a single model. Moreover, the conditional filter equipped with parameter selection could serve the functionality of filter selection as well, and could deliver comparable performances compared to individual filters trained according to each quality level.

[00320] Experiments demonstrate the usefulness of the proposed techniques. Specifically, VTM-11.0 is a platform to evaluate potentials of the proposed techniques. Experimental results showthat certain examples described herein achieve meaningful improvements, such as {7.91%, 20.25%, 20.44%}, {11.64%, 26.40%, 26.50%}, and {10.97%, 26.63%, 26.77%} BD-rate reductions on average for {Y, Cb, Cr} under all-intra, random-access, and low-delay configurations respectively. These represent relatively large coding gains achieved by a single deep tool on top of VVC. In addition, effectiveness of iterative training and filters selection are verified in the simulation. With various proposed techniques, these examples rank highly among NN-based ones under all configurations at 21 st and 22nd meetings of the Joint Video Exploration Team (JVET). In addition, the syntax elements of the proposed scheme were adopted at the 76th meeting of AVS.

[00321] Development of filtering improvements is useful for video coding technology. In general, filtering methods in video coding could be classified into two categories, in-loop filtering, wherein a filtered picture may be used to predict succeeding pictures, and out-loop filtering, a.k.a. post-filtering, wherein a filtered picture cannot be used to predict succeeding pictures. In-loop filtering is useful because it can be a part of the video coding standard. In-loop filters such as deblocking filter (DF), sample adaptive offset (SAO), and adaptive loop filter (ALF), have evolved with the development of video coding standards for decades.

[00322] Filtering methods play an important role in video coding due to some intrinsic weaknesses of a hybrid video coding scheme. Modem video coding standards, such as AVC, HEVC, VVC are built upon ahybrid coding structure using block-based prediction and transform coding. Although the hybrid coding structure has been proved to be a high-efficient practical coding scheme, it incurs several inevitable artifacts. On one hand, block-based transforms for the intra and inter frame prediction error coding may cause discontinuities at block boundaries due to coarse quantization on transformed coefficients.

[00323] In addition, block-based inter prediction, i.e., copying interpolated samples from different locations of possibly different reference frames, may deteriorate the boundary discontinuities further. On the other hand, quantization errors and the low-pass fractional interpolation filter may bring ringing artifacts. For attenuating the boundary artifacts, DF has been introduced to AVC. DF can detect discontinuities based on quantization steps, coding modes, motion information, and sample values along a block boundary. When discontinuities are found, samples along a boundary are processed by non-linear filtering with predefined low- pass characteristics. For reducing ringing artifacts, SAO has been adopted by HEVC and VVC. SAO can reduce the average distortion of a region by first classifying the region samples into multiple categories with a selected classifier, obtaining an offset for each category, and then adding the offset to each sample of the category, where the classifier index and the offsets of the region are signaled in the bit-stream. ALF has also been considered in relation to HEVC and was finally adopted into VVC. On top of DF and SAO, ALF tries to catch and fix artifacts induced by previous stages through a Wiener-based adaptive filter. The suitable filter coefficients for different regions are determined by solving a Wiener-Hopf equation at the encoder and signaled to the decoder.

[00324] DF, SAO, and ALF are designed from the perspective of signal processing, with a premise of stationary signal assumption. However, complex characteristics of natural videos may make those filters suboptimal. Note that although ALF could be considered as a learningbased filter, its one-layer structure may limit the efficiency. To make use of the powerful learning capability of deep neural networks and abundant external datasets that could be obtained relatively easily, deep learning-based out-of-loop filtering and in-loop filtering are proposed.

[00325] Conventionally, the focus of deep-based filtering has been on post-filtering for image coding, especially JPEG. For example, a 4-layer CNN has been introduced for compression artifacts reduction, namely artifacts reduction CNN (ARCNN). ARCNN provides more than IdB improvement in PSNR over JPEG. A 20-layer CNN trained with residual learning has been proposed, leading to better performance than ARCNN. Dual-domain processing has also been considered for the sake of better reducing compression artifacts. For example, an approach is proposed where a very deep convolutional network is jointly learned in both DCT (Discrete Cosine Transform) and pixel domains. The dual-domain representation may make full use of DCT-domain prior knowledge of JPEG compression, which is usually ignored in traditional network-based approaches. Advanced loss functions for achieving better visual quality are also considered. In addition, it is considered how to handle general image restoration tasks with one model, e.g. JPEG post-filtering, denoising, super-resolution, etc.

[00326] Studies have been performed for out-of-loop filtering in video coding, especially EIEVC and VVC. For example, a 4-layer CNN featuring variable filter size and residue connection (VRCNN) has been proposed for post-filtering of HEVC intra frames. VRCNN can achieve on average 5% bit-rate reduction compared to HEVC under all-intra configuration. A 10-layer CNN for out-of-loop filtering may be useful. During training data generation, transform unit size is considered for balancing training samples. In some cases, this may provide more than 5% bit-rate reduction under all configurations.

[00327] Training different CNN models for intra frames and inter frames respectively may provide benefits. Different than examples that consider a single frame, some examples study how to collect information from multiple frames for quality enhancement. For example, it may be possible to develop a bidirectional long short-term memory-based detector to locate peak quality frames. Then, a multi-frame CNN-based enhancer takes as input the current frame and its nearest two peak quality frames. To align motion of multiple frames, motion compensation network is integrated. While the aforementioned examples only use decoded frames as input, some examples may feed auxiliary' information such as partitioning, residue, etc. For using a single model to cover multiple quality levels, it may be possible to input both decoded frame and quantization parameter into the CNN. In addition, model quantization and fixed point computation may be performed to ensure consistency among different computing platforms.

[00328] While using CNN as post-filtering could avoid interactions with the compression process and thus simplify the design, it also loses several advantages of in-loop filtering described above.

[00329] It is more challenging to integrate CNN-based filters into the coding loop because filtered frames will serve as references and will interact with other coding tools. Training a 3- layer CNN as an in-loop filter for HEVC may be possible. To deal with different quality levels in the testing stage, two models are trained corresponding to low QP range 20-29 and high QP range 30-39, and one model is selected for each frame based on its QP. The CNN replaces SAO as an in-loop filter. During testing, CNN-based filtering may be activated either based on picture order count (POC) or frame level cost. Such a proposed filter may achieve a bit-rate savings over HEVC for low-delay and random-access configurations. A network featuring multi-channel and long-short-term dependency for in-loop filtering is considered. The multi-channel may be able to solve the illumination discrepancy between the mean magnitudes of predicted and ground truth images. The network takes decoded frame and partitioning information as input, and is trained with a mix loss Multi-Scale Structural Similarity Index Measure (MS-SSIM). The proposed scheme may achieve more than 8% and 7% BD-rate savings under low-delay and random-access configurations respectively. Another network for in-loop filtering in HEVC may be built upon residual highway units. To maximize the performance, different models are trained for frames of different types. To consider the impact of quality levels, an individual model is trained corresponding to each QP range. Regarding test results, the proposed method delivers around 4% BD-rate savings than HEVC under the random-access configuration. However, it is also noted that the advantage of the proposed deep filter over ALF is not obvious. A dense residual network comprising multiple dense residual units for m-loop filtering in HEVC may be considered. Different models are trained for different QPs. A deep CNN for in-loop filtering in HEVC may be considered. Analyzing the impact of network depth and connection units to design an efficient network is performed. Multiple models may be trained in an iterative manner based on distortions of filtered samples. To avoid the overhead for signaling model index, a classification network is further trained to predict the best model of each block. Test results report on average 4.1%, 6.0%, and 6.0% BD-rate reductions under all-intra, low-delay, and random-access configurations, respectively.

[00330] While aforementioned deep filters are designed for HEVC, some examples include in-loop filtering of VVC. As WC achieves a higher quality over HEVC at the same bitrate and additionally includes the adaptive loop filter, it is more challenging to design deep filters for VVC. A CNN may be built upon attention blocks for the in-loop filtering of VVC. A blocklevel on/off control mechanism avoids cases where CNN filter may generate a bad or undesirable output. Experimental results show that the proposed filter can bring 6.54% and 2.81% BD-rate savings under all-intra and random-access configurations respectively.

[00331] A CNN architecture featuring multi-level feature review and residual dense blocks is included in some examples, for post-filtering and in-loop filtering of HEVC and VVC. The proposed in-loop filtering and out-of-loop filtering reportedly show 4.6% and 6.7% BD-rate savings respectively on top of VVC for random-access testing.

[00332] A multi-density attention network for VVC in-loop filtering is also included in some examples. Multi-scale features are extracted with multi-resolution convolutional streams, using a single attention branch to learn sample correlations, and finally fusing information from multiple branches. The proposed network achieves 6.57% BD-rate reduction under the random- access configuration. Recent JVET meetings focus on deep-based in-loop filtering of VVC. For example, a deep filter with cores including taking boundary strengths as input, applying residual scaling to network output, and adopting wide convolutional layers. The deep filter achieves 8.09% and 8.28% BD-rate savings under low-delay and random-access configurations.

[00333] The deep-based in-loop filtering has attracted attention, yet most of the focus is on designing advanced network architectures or tackling varying characteristics of video samples. In the meanwhile, the content propagation issue is rarely studied or being considered as a nontrivial problem, leading to limited performance of deep-based in-loop filtering. Examples described herein leverage careful treatment of this issue, which enables the potential of deepbased in-loop filtering to be improved.

[00334] FIG. 17 is an example 1700 of the hierarchical coding structure for the random-access setting, which is adopted by most video coding standards. POC, or picture order count, determines the display (output) order of decoded frames, while coding order decides the order of encoding those frames. In such a coding structure, each picture, except picture POC 0 and POC 8 at temporal layer 0, will have reference pictures in both forward and backward directions. Along with this prediction process, contents propagate from the reference frame to frames referring to it, as indicated by the arrows in FIG. 17. Such a reference structure can provide a more efficient coding performance. FIG. 17 also shows a temporal layer identifier (ID) of each frame.

[00335] A frame at a lower temporal layer is encoded ahead, typically with a higher quality, and treated as a reference for remaining frames. Therefore, a frame at a higher temporal layer can be well predicted, and is more likely to choose the skip mode. It is worth noting that in the random-access setting, encoding/decoding frames after a random access point (RAP) is independent of any pictures that appeared earlier, therefore content propagates between two adjacent random access points.

[00336] Different from the random-access setting, pictures are coded in their display order under the low-delay configuration. In addition, temporal prediction process can last until finishing decoding all frames. In other words, contents can propagate much longer in this setting. [00337] Content propagation is essentially inevitable while exploiting temporal redundancy in video coding. However, content propagation may deteriorate the efficiency of in-loop deepbased filtering significantly. Through content propagation, samples filtered in one frame may be to a following frame, where they may be filtered again.

[00338] As the propagation extends, the over-filtering phenomenon will be more and more severe. An example is demonstrated in FIGS. 18A-18C. In this example, the sequence is coded by VTM-11.0 at QP 37 using a low-delay B configuration. CNN-based in-loop filtering is applied on the reconstructed frame. FIG. 18A shows original frames from a “blowing bubbles” sequence. FIG. 18B shows filtered results without iterative training, in which over-filtering occurs on wall and face areas as POC increases. FIG. 18C shows filtering results with iterative training, in which both objective and subjective qualities are improved, particularly as POC increases.

[00339] To address the content propagation problem, examples described herein include a method of iterative in-loop filtering with adaptive models (iDAM). Details of the design of iDAM, including the framework of iDAM, network structure, training process, and selection of filters, are provided below.

[00340] Deep neural networks are good at learning hierarchical representations that are vital to solve a specific task. To give networks maximum freedom to decide what to learn, end-to-end formulation has been emphasized. In view of this, examples described herein place the proposed filter right after initial reconstruction, i.e., the one not being processed by existing handcrafted filters. FIG. 19 illustrates an example 1900 of a hybrid video coding scheme including a proposed filter according to examples of this description. As shown in FIG. 19, unfiltered reconstruction as well as prediction samples are input into the example network 1900. Note that prediction is rarely used as auxiliary information for in-loop filtering in prior-arts, yet it may be useful, especially for inter slices. The benefits of using prediction are twofold. First, inter prediction contains temporal information, making it equivalent or similar to having multiple frames as input. Moreover, reusing inter prediction could avoid additional motion compensation process, which is otherwise necessary for aligning multiple frames. Second, inter prediction indirectly helps resolve the content propagation issue, as prediction together with reconstruction could reflect the proportion of content propagated from reference frames and serve as a clue for the network to leam appropriate filtering strengths.

[00341] As shown in FIG. 19, the output of the proposed filter will be processed by the ALF and then put into decoded picture buffer as references. DF and S AO are not used in this example, because in some cases no additional benefits are observable from experimental results.

[00342] FIG. 20 provides a proposed CNN 2000 for filtering a luma component in one example. In FIG. 20, N is a spatial width (height), M is a number of feature maps, and R is a number of residual blocks. When the spatial width or resolution changes, this is shown at the bottom of or below the feature maps. The CNN 2000 of FIG. 20 includes three portions, an input portion, a backbone portion, and an output portion

[00343] The input is responsible for aggregating information from both reconstruction and prediction. To this end, individual features are extracted from each of reconstruction and prediction frames, feature maps are concatenated together along channel dimension, and then shrunk through a 1x1 convolutional layer for information aggregation and complexity reduction. [00344] The network backbone consists of a convolutional layer and several sequentially stacked residual blocks. For increasing the receptive field as well as saving computations, a stride of the first layer may be set as 2. The adoption of residual blocks enables a faster convergence. [00345] Numbers of feature maps (M) and residual blocks (R) control the network size. Currently, M and R are empirically set as 96 and 32, respectively. The output first maps the latent representation from backbone into four sub-images, which are then shuffled to generate the high-resolution reconstruction.

[00346] Traditional tools, such as cross component linear model (CCLM) and cross component adaptive loop filter (CCALF), utilize luma information for chroma prediction and may provide benefits. Examples of this description may feed luma information for the in-loop filtering of chroma. Considering the resolution of luma is higher than chroma in YUV 4:2:0 format, features are first extracted from luma and chroma separately, and then luma feature maps are down-sampled before concatenating them with chroma feature maps. Regarding network backbone, chroma components share the same one as luma components.

[00347] FIG. 21A is an example 2100 of plain or conventional training, in which a VTM encoder, which is a reference software for VVC, is used to compress training images (or videos) for obtaining distorted reconstruction and other auxiliary information. That information is then paired with the corresponding groundtruth to form training samples. When the trained models are integrated for testing, their effects may degrade due to statistics shifting between training samples and testing samples. Reasons for the statistics shifting are described further below.

[00348] First, content propagation is a dominant factor. Since CNN-based filtering is only applied in testing, the quality of reference frames becomes higher in testing than in the training process.

[00349] After inheriting contents from reference frames, qualities of the current frame are improved as well. Ignoring that the current frame may have been indirectly affected by in-loop filtering on previous frames, one immediate consequence is over-filtering.

[00350] Second, improved qualities in reference frames may change the optimal partitioning structure of the current frame For example, more larger partitioning blocks may be preferred by the encoder. Since compression artifacts (e.g. blocking artifacts) are highly related to partitioning structures, they will be changed as well. [00351] Third, improved qualities in reference frames means improved qualities in prediction samples. As prediction serves as the auxiliary information during in-loop filtering, the trained models may behave in an unexpected way.

[00352] To resolve those issues, embodiments of this description include an iterative training scheme including three phases as shown in FIG. 21B. FIG. 21B is an example 2150 of iterative training in accordance with examples of this description, in which a VTM encoder is used to generate training samples in phase I. Then, trained models from the previous phase are integrated into VTM for generating training samples in a subsequent or next phase. In FIGS. 21A and 21B, lines labeled CNN Intra indicate integration of intra slice models, while lines labeled CNN Inter indicate integration of inter slice models.

[00353] In training phase I, the VTM encoder compresses training images under all-intra configuration. The reconstructed images together with other auxiliary information are utilized for training intra frame filters.

[00354] In training phase II, training videos are compressed using random-access setting, with intra frames being processed by the filters obtained in phase I. Note that since intra frames are compressed with a higher quality, they will more likely to be referred to by other frames. Therefore, effects of CNN-based in-loop filtering will be reflected in all frames. By collecting training samples from phase II, the impact of filtering applied on reference frames is taken into account. After completing training phase II, filters are obtained for inter frames. Nevertheless, directly deploying those filters may still result in suboptimal results, because inter frames themselves are processed by CNN-based filtering in testing but not in training.

[00355] To further reduce the gap, training phase III is provided. Specifically, training videos are compressed under random-access configuration again, with intra frames being processed by filters obtained in phase I and inter frames being processed by filters obtained in phase II. Then, training samples are collected for training final inter frame filters. Note that in phase III, unfiltered reconstruction for training is extracted, rather than the one being filtered by CNNbased in-loop filtering. The purpose of applying CNN-based in-loop filtering is to make statistics of reference frames as close to their final states as possible.

[00356] It can be inferred that content propagation varies with temporal layers. For example, frames at higher temporal layers are affected by more contents propagated from previous coded frames. Meanwhile, if blocks are not coded by skip mode in high temporal layers, their transform coefficients are quantized coarsely, resulting in larger distortions. Thus, frames at different temporal layers may prefer different filtering strengths. Moreover, different regions in a frame with varieties of contents, which may be coded with different modes or predicted from different reference frames, may also demand different filter strengths. To this end, embodiments of this description include a filter selection mechanism, which offers candidate filters of different filtering strengths to be selected for a particular block. Without loss of generality, a candidate list may contain three models in one example. Note that more candidates may improve performance, but potentially at the cost of higher encoding complexity.

[00357] FIG. 22A shows an encoder strategy 2200 designed for the aforementioned filter selection scheme. All blocks in the current frame need to be processed by the three models first. Then, five costs (e.g., Cost O through Cost_4) are calculated and compared against each other to achieve optimum rate-distortion performance. In Cost O, CNN-based filter is prohibited for all blocks. In Costyi, where i = 1, 2, 3, the ith CNN-based filter is used for all blocks. In Cost_4, different blocks may prefer different models, and the information regarding whether to use CNNbased filter or which filter to be used is signaled for each block.

[00358] FIG. 22B shows an associated decoder strategy 2250. At the decoder side, whether to use CNN-based filter or which filter to be used for a block is based on the Model_Id parsed from the bitstream as shown in FIG. 22B. Note that filter selection does not impose any additional burden for the decoder compared with single filter-based scheme.

[00359] Considering that filters trained at low quality levels need to compensate more due to large distortions and vice versa, filters are obtained of different filtering strengths by reusing the models trained at different quality levels in this description. In this way, training extra models for filter selection can be avoided. Regarding granularity of filter selection, the granularity can be dependent on resolution and bitrate. For a higher resolution, the granularity will be coarser, as content tends to change more slowly. For ahigher bitrate, the granularity will be finer, because more overhead can be afforded, or is otherwise available.

[00360] To handle multiple quality levels and enable filter selection, several filters are trained corresponding to different quantization parameters (QPs) at sequence level. However, it takes a larger memory to store multiple models. In addition, filter selection requires model switches when processing different blocks within a frame, which may be unfriendly to the hardware implementation. To address those concerns, embodiments of this description may include a conditional in-loop filter 2300 that is capable of adjusting filtering strengths using an auxiliary input parameter. In this way, a single model can handle multiple quality levels. Moreover, the conditional filter can mimic the model selection mechanism using parameter selection, avoiding model switches.

[00361] As shown in FIG. 23 A, the overall structure of the conditional in-loop filter 2300 is similar to the one shown in FIG. 20, but with two exceptions in input and backbone respectively. First, there is an additional input plane, which is derived by tiling the QP into a 2-dimensional QP map. Second, QP is used as external attention. Specifically, QP is expanded into a 1- dimensional vector with several fully connected layers as shown in example 2350 of FIG. 23B. The vector then serves as channel-wise scaling factors to recalibrate the convolutional feature maps. For reducing complexity, external attention is not added for each residual block. Instead, the residual blocks are evenly divided into four groups, and the output of each group is multiplied with an attention vector. In this example, two fully connected layers are used at each location. [00362] Conventionally, use of QP has not been efficient enough to exploit the information indicated by QP values. Therefore, embodiments of this description additionally use QP as external attention. One rationale behind the design is that QP has a high correlation with the distortion level, and accordingly is useful to control magnitudes of intermediate feature maps. [00363] The proposed methods make the in-loop filtering process conditional on QP, in terms of both input and internal computations. To handle a specific quality level, a corresponding QP is input into the filter. To facilitate filter selection, filters are constructed with different filtering strengths by modifying QPs to corresponding values.

[00364] A third exemplary embodiment is discussed.

[00365] This embodiment describes a CNN-based in-loop filtering method in which adaptive model selection is implemented.

[00366] The backbone of the proposed CNN filtering method is shown in FIG. 24A, which is similar to FIG. 16A described above but with a number of residual blocks equal to 8, rather than 32 as in FIG. 16A. To increase the receptive field and reduce the complexity, the proposed method contains a convolutional layer with a stride of 2 at the beginning. After passing through this layer, the spatial resolution of feature maps reduces to half of the input size along both horizontal and vertical direction. The feature maps output from the first convolutional layer then go through several sequentially stacked residual blocks. The last convolutional layer takes the feature maps from the last residual block as an input and produces 4 feature maps of NxN. Finally, a shuffle layer is adopted to generate the filter image whose spatial resolution is the same as the input to the CNN, (i.e., 2Nx2N). Other details related to the network architecture are described below.

[00367] For all of convolutional layers, akemel size of 3x3 is used. For internal convolutional layers, a number of feature maps is M (M=96). For the activation function, PReLU is used.

[00368] The structure of Res Block is illustrated in FIG. 24B, in which the calculation process in the attention module can be written as F ont = F in X f (Rec, Pred, QP) + F in. [00369] Different groups of models are trained for I slice and B slice, respectively.

[00370] When training the CNN filters for intra slices, prediction, partitioning, boundary strengths, and QP information are additionally fed into the network.

[00371] When training the CNN filters for inter slices, prediction, boundary strengths, and QP information are additionally fed into the network.

[00372] In this proposed embodiment, each slice or block could determine whether to apply the CNN-based filter. When the CNN-based filter is determined to be applied to a slice/block, the filter model can be decided from a candidate model list including three models. To this end, individual models are trained with QPs in {17, 22, 27, 32, 37, 42}. Given atest QP for coding a sequence, denoted as q, the candidate model list includes models trained with QPs equal to {q, q-5, q-10}. The selection process is based on the rate-distortion cost at the encoder side. Indication of on/off control as well as the model index, if needed, may be signaled in the bitstream.

[00373] In an example, the granularity of the filter determination and the model selection is dependent on resolution and QP. In the proposed scheme, given a higher resolution and a larger QP, the NN model determination and selection will be performed for a larger region.

[00374] The candidate model list is different across different temporal layers. For a low temporal layer, the third candidate is replaced by the intra-slice NN filter model if the ratio of intra-coded samples is no smaller than a threshold. For a high temporal layer, the third candidate, i.e. the NN model corresponding to q-10, is replaced by the model corresponding to q+5.

[00375] For all-intra configuration, model selection may be disabled while on/off control is still preserved.

[00376] When the proposed NN filter is applied to reconstructed pictures, a scaling factor may be signaled for each color component in picture headers. The difference between the input samples and the NN filtered samples (residues) may be scaled by the scaling factors before being added to input samples.

[00377] A fourth exemplary embodiment is discussed.

[00378] An example syntax is provided that is related to the CNN-based in-loop filter. The following Table 4-1 demonstrates an example slice header syntax.

Table 4-1 . Slice Header Syntax.

[00379] The following Table 4-2 demonstrates an example coding tree unit syntax.

Table 4-2. Coding Tree Unit Syntax.

[00380] A fifth exemplary embodiment is discussed.

[00381] An example syntax is provided that is related to the CNN-based in-loop filter. The following Table 5-1 demonstrates an example Sequence parameter set RBSP syntax.

Table 5-1. Slice Header Syntax.

[00382] The following Table 5-2 demonstrates an example slice header syntax.

Table 5-2. Slice Header Syntax.

[00383] The following Table 5-3 demonstrates an example coding tree unit syntax.

Table 5-3. Coding Tree Unit Syntax.

[00384] Semantics

[00385] sps cnnlf enabled flag equal to 1 specifies that NN-based filter is enabled for the CLVS. sps cnnlf enabled flag equal to 0 specifies that CNNLF is disabled for the CLVS.

[00386] sps cnnlf infer size base specifies the base inference block size of NN-based filter for the CLVS.

[00387] The variable cnnlflnferSize[3] is set equal to {sps_cnnlf_infer_size_base » 1, sps_cnnlf_infer_size_base, sps_cnnlf_infer_size_base « 1 }.

[00388] sps cnnlf infer size entension specifies the size of extended samples at the boundary of NN inference block for the CLVS.

[00389] sps cnnlf max num params specifies the maximum number of NN filter parameter candidates of each block for the CLVS

[00390] slice_cnnlf_mode[0] equal to 0 indicates that the NN filter will not be used for the luma component of any blocks in the slice. slice_cnnlf_mode[0] equal to i (i =1, 2, ..., sps cnnlf max num params) indicates that the I th NN filter parameter candidate will be used for the luma component of all blocks in the slice. slice_cnnlf_mode[0] equal to sps_cnnlf_max_num_params+l indicates that the parameter candidate of each block is decided by the parameter index of each block, i.e. cnnlfParamldx.

[00391] slice_cnnlf_mode[l] equal to 0 indicates that the NN filter will not be used for the chroma component of any blocks in the slice. slice_cnnlf_mode[l] equal to i (i =1, 2, ..., sps_cnnlf_max_num_params) indicates that the i th NN filter parameter candidate will be used for the chroma component of all blocks in the slice. slice_cnnlf_mode[0] equal to sps_cnnlf_max_num_params+l indicates that the parameter candidate of each block is decided by the parameter index of each block, i.e. cnnlfParamldx. [00392] slice cnnlf scale flag [paramldx] [chai] equal to 1 specifies that residual scaling is enabled for the parameter candidate indexed by paramldx for the channel indexed by chai, [paramldx] [chai] equal to 0 specifies that residual scaling is disabled for the parameter candidate indexed by paramldx for the channel indexed by chai.

[00393] nnScale [paramldx] [chai] specifies the scaling factor for the parameter candidate indexed by paramldx for the channel indexed by chai.

[00394] useCnnlf equal to 1 specifies that NN-based filter is enabled for the block. useCnnlf equal to 0 specifies that NN-based filter is disabled for the block.

[00395] useFirstParam equal to 1 specifies that the first parameter candidate of NN filter is used for the block. useFirstParam equal to 0 specifies that the first parameter candidate of NN filter is not used for the block.

[00396] cnnlfParamIdxMinus2 specifies the index of the parameter candidate of NN filter for the block.

[00397] The variable cnnlfParamldxfchal] [unitldx] is set equal to cnnlfParamIdxMinus2 + 2 [00398] num!nferUnits[ chai ] refers to the number of inference blocks for the channel indexed by chai in the slice and is derived as follows. if( sh slice type == I ) { cnnlflnferSizeLuma = sps cnnlf infer size base « 1 cnnlflnferSizeChroma = sps cnnlf infer size base « 1

} else if ( SliceQpy < 23 ) { cnnlflnferSizeLuma = sps cnnlf infer size base cnnlflnferSizeChroma = sps cnnlf infer size base

} else if ( SliceQpY< 29 ) { cnnlflnferSizeLuma = sps cnnlf infer size base cnnlflnferSizeChroma = sps cnnlf infer size base « 1

} else { if (pps_pic_width_in_luma_samples <= 832) cnnlflnferSizeLuma = sps cnnlf infer size base else cnnlflnferSizeLuma = sps cnnlf infer size base « 1 cnnlflnferSizeChroma = sps cnnlf infer size base

} numInferUnits[0] = ( (pps_pic_width_in_luma_samples + cnnlflnferSizeLuma - 1) / cnnlflnferSizeLuma ) * ((pps_pic_height_in_luma_samples + cnnlflnferSizeLuma - 1) / cnnlflnferSizeLuma) numInferUnits[l] = ( (pps_pic_width_in_luma_samples + cnnlflnferSizeChroma - 1) / cnnlflnferSizeChroma ) * ((pps_pic_height_in_luma_samples + cnnlflnferSizeChroma - 1) / cnnlflnferSizeChroma)

[00399] Turning now to FIG. 25, a block diagram showing an example video processing system 2500 in which various techniques disclosed herein may be implemented. Various implementations may include some or all ofthe components ofthe video processing system 2500. The video processing system 2500 may include input 2502 for receiving video content. The video content may be received in a raw or uncompressed format, e.g., 8- or 10-bit multicomponent pixel values, or may be in a compressed or encoded format. The input 2502 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interface include wired interfaces such as Ethernet, passive optical network (PON), etc. and wireless interfaces such as Wi-Fi or cellular interfaces.

[00400] The video processing system 2500 may include a coding component 2504 that may implement the various coding or encoding methods described in the present document. The coding component 2504 may reduce the average bitrate of video from the input 2502 to the output of the coding component 2504 to produce a coded representation of the video. The coding techniques are therefore sometimes called video compression or video transcoding techniques. The output of the coding component 2504 may be either stored, or transmitted via a communication connected, as represented by the component 2506. The stored or communicated bitstream (or coded) representation of the video received at the input 2502 may be used by the component 2508 for generating pixel values or displayable video that is sent to a display interface 2510. The process of generating user- viewable video from the bitstream representation is sometimes called video decompression. Furthermore, while certain video processing operations are referred to as “coding” operations or tools, it will be appreciated that the coding tools or operations are used at an encoder and corresponding decoding tools or operations that reverse the results of the coding will be performed by a decoder.

[00401] Examples of a peripheral bus interface or a display interface may include universal serial bus (USB) or high definition multimedia interface (HDMI) or Displayport, and so on. Examples of storage interfaces include serial advanced technology attachment (SATA), Peripheral Component Interconnect (PCI), Integrated Drive Electronics (IDE) interface, and the like. The techniques described in the present document may be embodied in various electronic devices such as mobile phones, laptops, smartphones or other devices that are capable of performing digital data processing and/or video display.

[00402] FIG. 26 is a block diagram of a video processing apparatus 2600. The apparatus 2600 may be used to implement one or more of the methods described herein. The apparatus 2600 may be embodied in a smartphone, tablet, computer, Internet of Things (loT) receiver, and so on. The apparatus 2600 may include one or more processors 2602, one or more memories 2604 and video processing hardware 2606 (a.k.a., video processing circuitry). The processor(s) 2602 may be configured to implement one or more methods described in the present document. The memory (memories) 2604 may be used for storing data and code used for implementing the methods and techniques described herein. The video processing hardware 2606 may be used to implement, in hardware circuitry, some techniques described in the present document. In some embodiments, the hardware 2606 may be partly or completely located within the processor 2602, e.g., a graphics processor.

[00403] FIG. 27 is a block diagram that illustrates an example video coding system 2700 that may utilize the techniques of this disclosure. As shown in FIG. 27, the video coding system 2700 may include a source device 2710 and a destination device 2720. Source device 2710 generates encoded video data which may be referred to as a video encoding device. Destination device 2720 may decode the encoded video data generated by source device 2710 which may be referred to as a video decoding device.

[00404] Source device 2710 may include a video source 2712, a video encoder 2714, and an input/output (I/O) interface 2716.

[00405] Video source 2712 may include a source such as a video capture device, an interface to receive video data from a video content provider, and/or a computer graphics system for generating video data, or a combination of such sources. The video data may comprise one or more pictures. Video encoder 2714 encodes the video data from video source 2712 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. I/O interface 2716 may include a modulator/demodulator (modem) and/or a transmitter. The encoded video data may be transmitted directly to destination device 2720 via I/O interface 2716 through network 2730. The encoded video data may also be stored onto a storage medium/server 2740 for access by destination device 2720. [00406] Destination device 2720 may include an I/O interface 2726, a video decoder 2724, and a display device 2722.

[00407] I/O interface 2726 may include a receiver and/or a modem. I/O interface 2726 may acquire encoded video data from the source device 2710 or the storage medium/ server 2740. Video decoder 2724 may decode the encoded video data Display device 2722 may display the decoded video data to a user. Display device 2722 may be integrated with the destination device 2720, or may be external to destination device 2720 which may be configured to interface with an external display device.

[00408] Video encoder 2714 and video decoder 2724 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVC) standard, and other current and/or further standards.

[00409] FIG. 28 is a block diagram illustrating an example of video encoder 2800, which may be video encoder 2714 in the video coding system 2700 illustrated in FIG. 27.

[00410] Video encoder 2800 may be configured to perform any or all of the techniques of this disclosure. In the example of FIG. 28, video encoder 2800 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of video encoder 2800. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

[00411] The functional components of video encoder 2800 may include a partition unit 2801 , a prediction unit 2802 which may include a mode select unit 2803, a motion estimation unit 2804, a motion compensation unit 2805 and an intra prediction unit 2806, a residual generation unit 2807, a transform unit 2808, a quantization unit 2809, an inverse quantization unit 2810, an inverse transform unit 2811, a reconstruction unit 2812, a buffer 2813, and an entropy encoding unit 2814.

[00412] In other examples, video encoder 2800 may include more, fewer, or different functional components. In an example, prediction unit 2802 may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode in which at least one reference picture is a picture where the current video block is located.

[00413] Furthermore, some components, such as motion estimation unit 2804 and motion compensation unit 2805 may be highly integrated, but are represented in the example of FIG. 28 separately for purposes of explanation.

[00414] Partition unit 2801 may partition a picture into one or more video blocks. Video encoder 2714 and video decoder 2724 of FIG. 27 may support various video block sizes. [00415] Mode select unit 2803 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra- or inter-coded block to a residual generation unit 2807 to generate residual block data and to a reconstruction unit 2812 to reconstruct the encoded block for use as a reference picture. In some examples, mode select unit 2803 may select a combination of intra and inter prediction (CIIP) mode in which the prediction is based on an inter prediction signal and an intra prediction signal. Mode select unit 2803 may also select a resolution for a motion vector (e.g, a sub-pixel or integer pixel precision) for the block in the case of inter-prediction.

[00416] To perform inter prediction on a current video block, motion estimation unit 2804 may generate motion information for the current video block by comparing one or more reference frames from buffer 2813 to the current video block. Motion compensation unit 2805 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from buffer 2813 other than the picture associated with the current video block.

[00417] Motion estimation unit 2804 and motion compensation unit 2805 may perform different operations for a current video block, for example, depending on whether the current video block is in an I slice, a P slice, or a B slice. I-slices (or I-frames) are the least compressible but don't require other video frames to decode. S-slices (or P-frames) can use data from previous frames to decompress and are more compressible than I-frames. B-slices (or B-frames) can use both previous and forward frames for data reference to get the highest amount of data compression.

[00418] In some examples, motion estimation unit 2804 may perform uni-directional prediction for the current video block, and motion estimation unit 2804 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. Motion estimation unit 2804 may then generate a reference index that indicates the reference picture in list 0 or list 1 that contains the reference video block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. Motion estimation unit 2804 may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. Motion compensation unit 2805 may generate the predicted video block of the current block based on the reference video block indicated by the motion information of the current video block.

[00419] In other examples, motion estimation unit 2804 may perform bi-directional prediction for the current video block, motion estimation unit 2804 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. Motion estimation unit 2804 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. Motion estimation unit 2804 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. Motion compensation unit 2805 may generate the predicted video block of the cunent video block based on the reference video blocks indicated by the motion information of the current video block.

[00420] In some examples, motion estimation unit 2804 may output a full set of motion information for decoding processing of a decoder.

[00421] In some examples, motion estimation unit 2804 may not output a full set of motion information for the current video. Rather, motion estimation unit 2804 may signal the motion information of the current video block with reference to the motion information of another video block. For example, motion estimation unit 2804 may determine that the motion information of the cunent video block is sufficiently similar to the motion information of a neighboring video block.

[00422] In one example, motion estimation unit 2804 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 2724 that the current video block has the same motion information as another video block.

[00423] In another example, motion estimation unit 2804 may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 2724 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the cunent video block.

[00424] As discussed above, video encoder 2714 may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder 2714 include advanced motion vector prediction (AMVP) and merge mode signaling.

[00425] Intra prediction unit 2806 may perform intra prediction on the current video block. When intra prediction unit 2806 performs intra prediction on the current video block, intra prediction unit 2806 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements. [00426] Residual generation unit 2807 may generate residual data for the current video block by subtracting (e.g., indicated by the minus sign) the predicted video block(s) of the cunent video block from the current video block. The residual data of the cunent video block may include residual video blocks that conespond to different sample components of the samples in the cunent video block.

[00427] In other examples, there may be no residual data for the cunent video block, for example in a skip mode, and residual generation unit 2807 may not perform the subtracting operation.

[00428] Transform unit 2808 may generate one or more transform coefficient video blocks for the cunent video block by applying one or more transforms to a residual video block associated with the cunent video block.

[00429] After transform unit 2808 generates a transform coefficient video block associated with the cunent video block, quantization unit 2809 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the cunent video block.

[00430] Inverse quantization unit 2810 and inverse transform unit 2811 may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. Reconstruction unit 2812 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the prediction unit 2802 to produce a reconstructed video block associated with the current block for storage in the buffer 2813.

[00431] After reconstruction unit 2812 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.

[00432] Entropy encoding unit 2814 may receive data from other functional components of the video encoder 2800. When entropy encoding unit 2814 receives the data, entropy encoding unit 2814 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

[00433] FIG. 29 is a block diagram illustrating an example of video decoder 2900, which may be video decoder 2724 in the video coding system 2700 illustrated in FIG. 27.

[00434] The video decoder 2900 may be configured to perform any or all of the techniques of this disclosure. In the example of FIG. 29, the video decoder 2900 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder 2900. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure. [00435] In the example of FIG. 29, video decoder 2900 includes an entropy decoding unit 2901, a motion compensation unit 2902, an intra prediction unit 2903, an inverse quantization unit 2904, an inverse transformation unit 2905, and a reconstruction unit 2906 and a buffer 2907. Video decoder 2900 may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder 2714 (FIG. 27).

[00436] Entropy decoding unit 2901 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). Entropy decoding unit 2901 may decode the entropy coded video data, and from the entropy decoded video data, motion compensation unit 2902 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. Motion compensation unit 2902 may, for example, determine such information by performing the AMVP and merge mode signaling.

[00437] Motion compensation unit 2902 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.

[00438] Motion compensation unit 2902 may use interpolation filters as used by video encoder 2714 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. Motion compensation unit 2902 may determine the interpolation filters used by video encoder 2714 according to received syntax information and use the interpolation filters to produce predictive blocks.

[00439] Motion compensation unit 2902 may use some of the syntax information to determine sizes of blocks used to encode frame(s) and/or slice(s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-encoded block, and other information to decode the encoded video sequence.

[00440] Intra prediction unit 2903 may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. Inverse quantization unit 2904 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 2901 Inverse transform unit 2905 applies an inverse transform.

[00441] Reconstruction unit 2906 may sum the residual blocks with the corresponding prediction blocks generated by motion compensation unit 2902 or intra-prediction unit 2903 to form decoded blocks. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in buffer 2907, which provides reference blocks for subsequent motion compensation/intra prediction and also produces decoded video for presentation on a display device.

[00442] FIG. 30 is a flowchart for an example method 3000 of video processing. The method 3000 determines to apply a NN filter to an unfiltered sample of a video unit to generate a filtered sample at step 3002. The NN filter includes an NN filter model generated based on partitioning information of the video unit. Usage of the NN filter is indicated by one or more syntax elements in a bitstream. A conversion is performed between a video media data file and a bitstream based on the EDRAP sample on the filtered sample at step 3004. The conversion may include encoding at an encoder, decoding at a decoder, or combinations thereof.

[00443] It should be noted that the method 3000 can be implemented in an apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, such as encoder 500, video encoder 2800, and/or video decoder 2900. In such a case, the instructions upon execution by the processor, cause the processor to perform the method 3000. Further, the method 3000 can be performed by a non-transitory computer readable medium comprising a computer program product for use by a video coding device. The computer program product comprises computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method 3000.

[00444] A listing of solutions preferred by some embodiments is provided next.

[00445] The following solutions show example embodiments of techniques discussed in the present disclosure.

[00446] 1. A method implemented by a video coding apparatus, comprising: applying a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; and performing a conversion between a video media file and the bitstream based on the filtered sample.

[00447] 2. The method of solution 1 , wherein the one or more syntax elements include a sequence parameter set (SPS) convolutional neural network loop filter (CNNLF) enabled flag (sps_cnnlf_enabled_flag), and wherein sps_cnnlf_enabled_flag equal to 1 specifies that a NN- based filter is enabled for a coded layer video sequence (CLVS) and sps_cnnlf_enabled_flag equal to 0 specifies that the CNNLF is disabled for the CLVS. [00448] 3. The method of any of solutions 1-2, wherein the one or more syntax elements include a SPS CNNLF infer size base (sps cnnlf infer size base), wherein sps_cnnlf_infer_size_base specifies a base inference block size of aNN-based filter for a CLVS, and wherein a CNNLF infer size (cnnlf!nferSize[3]) variable is set equal to {sps_cnnlf_infer_size_base » 1, sps_cnnlf_infer_size_base, sps_cnnlf_infer_size_base « 1} where » is a right bit shift and « is a left bitshift.

[00449] 4. The method of any of solutions 1-3, wherein the one or more syntax elements include a SPS CNNLF infer size extension (sps_cnnlf_infer_size_entension), and wherein sps_cnnlf_infer_size_entension specifies a size of extended samples at a boundary of a NN inference block for a CLVS.

[00450] 5. The method of any of solutions 1-4, wherein the one or more syntax elements include a SPS CNNLF maximum number parameters (sps_cnnlf_max_num_params), and wherein sps cnnlf max num params specifies a maximum number of NN filter parameter candidates of each block for a CLVS.

[00451] 6. The method of any of solutions 1-5, wherein the one or more syntax elements include a first slice CNNLF mode (slice_cnnlf_mode[OJ), and wherein slice_cnnlf_mode[0] equal to 0 indicates that the NN filter is not used for a luma component of any blocks in a slice, slice_cnnlf_mode[0] equal to i indicates that an i tfl NN filter parameter candidate is used for the luma component of all blocks in the slice where i is equal to 1, 2, ..., sps_cnnlf_max_num_params, and shce_cnnlf_mode[0] equal to sps_cnnlf_max_num_params+l indicates that a parameter candidate of each block is decided by a parameter index (cnnlfParamldx) of each block.

[00452] 7. The method of any of solutions 1-6, wherein the one or more syntax elements include a second slice CNNLF mode (slice cnnlf mode[l]), and wherein slice cnnlf mode[l] equal to 0 indicates that the NN filter is not used for a chroma component of any blocks in a slice, slice_cnnlf_mode[l] equal to i indicates that an i tfl NN filter parameter candidate is used for the chroma component of all blocks in the slice where i is equal to 1, 2, ..., sps cnnlf max num params, and slice cnnlf mode] 1 1 equal to sps_cnnlf_max_num_params+l indicates that a parameter candidate of each block is decided by a parameter index (cnnlfParamldx) of each block.

[00453] 8. The method of any of solutions 1-7, wherein the one or more syntax elements include a slice CNNLF scale flag (slice_cnnlf_scale_flag) with a parameter index parameter (paramldx) and a channel index parameter (chai), wherein slice_cnnlf_scale_flag [paramldx] [chai] equal to 1 specifies that residual scaling is enabled for a parameter candidate indexed by paramldx for a channel indexed by chai, and wherein [paramldx] [chai] equal to 0 specifies that residual scaling is disabled for the parameter candidate indexed by paramldx for the channel indexed by chai.

[00454] 9. The method of any of solutions 1 -8, wherein the one or more syntax elements include a NN scale (nnScale) with a paramldx and a chai, and wherein nnScale [paramldx] [chai] specifies a scaling factor for a parameter candidate indexed by paramldx for a channel indexed by chai.

[00455] 10. The method of any of solutions 1-9, wherein the one or more syntax elements include a use CNNLF (useCnnlf), and wherein useCnnlf equal to 1 specifies that a NN-based filter is enabled for a block and useCnnlf equal to 0 specifies that the NN-based filter is disabled for the block.

[00456] 11. The method of any of solutions 1-10, wherein the one or more syntax elements include a use first parameter (useFirstParam), and wherein useFirstParam equal to 1 specifies that a first parameter candidate of the NN filter is used for a block and useFirstParam equal to 0 specifies that the first parameter candidate of the NN filter is not used for the block.

[00457] 12. The method of any of solutions 1-11, wherein the one or more syntax elements include a CNNLF parameter index minus two (cnnlfParam!dxMinus2), wherein cnnlfParam!dxMinus2 specifies an index of a parameter candidate of a NN filter for a block, and wherein a variable CNNLF parameter index with a chai a unit index (cnnlfParamldx[chal][unitldx]) is set equal to cnnlfParamldxMinus2 + 2

[00458] 13. The method of any of solutions 1-12, wherein a number of inference units with a chai (numInferUnits[ chai ]) refers to a number of inference blocks for a channel indexed by chai in a slice and is derived as follows: if( sh slice type == I ) { cnnlflnferSizeLuma = sps cnnlf infer size base « 1 cnnlflnferSizeChroma = sps cnnlf infer size base « 1

} else if ( SliceQpy < 23 ) { cnnlflnferSizeLuma = sps cnnlf infer size base cnnlflnferSizeChroma = sps cnnlf infer size base } else if ( SliceQpy < 29 ) { cnnlflnferSizeLuma = sps cnnlf infer size base cnnlflnferSizeChroma = sps cnnlf infer size base « 1 } else { if (pps_pic_width_in_luma_samples <= 832) cnnlflnferSizeLuma = sps cnnlf infer size base else cnnlflnferSizeLuma = sps cnnlf infer size base « 1 cnnlflnferSizeChroma = sps cnnlf infer size base } numInferUnits[O] = ( (pps_pic_width_in_luma_samples + cnnlflnferSizeLuma - 1) / cnnlflnferSizeLuma ) * ((pps_pic_height_in_luma_samples + cnnlflnferSizeLuma - 1) / cnnlflnferSizeLuma) numlnferUnitsfl] = ( (pps_pic_width_in_luma_samples + cnnlflnferSizeChroma - 1) / cnnlflnferSizeChroma ) * ((pps_pic_height_in_luma_samples + cnnlflnferSizeChroma - 1) / cnnlflnferSizeChroma), where sh slice type is a slice type in a slice header, cnnlflnferSizeLuma is a CNNLF infer size luma variable, cnnlflnferSizeChroma is a CNNLF infer size chroma variable, SliceQpY, is a slice luma quantization parameter, pps_pic_width_in_luma_samples is a picture parameter set (PPS) picture with in luma samples in a PPS, and pps pic heighl in luma samples is a PPS picture height in luma samples in the PPS.

[00459] 14. The method of any of solutions 1-13, wherein usage of the NN filter is indicated in a SPS in the bitstream as follows: sps_cnnlf_enabled_flag if( sps_cnnlf_enabled_flag ) { sps cnnlf infer size base sp s cnnlf infer size extension sp s cnnlf max num params

}

[00460] 15. The method of any of solutions 1-14, wherein usage of the NN filter is indicated in a slice header in the bitstream as follows: if( sps_cnnlf_enabled_flag ) { for ( chai = 0; chai < ( sps chroma format idc != 0 ? 2 : 1 ); chal++ ) { slice cnnlf mode [chai] if ( slice_cnnlf_mode[chal] ) { if ( slice_cnnlf_mode[chal] == sps_cnnlf_max_num_params + 1 ) { for (paramldx = 0; paramldx < sps_cnnlf_max_num_param; paramldx ++){ slice_cnnlf_scale flag [paramldx] [chai] if (slice_cnnlf_scale_flag[paramldx] [chai]) nnScale[paramIdx] [chai]

}

} else { slice_cnnlf_scale_flag [slice_cnnlf_mode[chal] - 1 ] [chai] if (slice_cnnlf_scale_flag[slice_cnnlf _mode[chal]-l] [chai]) nnS cale [slice cnnlf mode [chai] - 1 ] [chai]

}

}

}

} where sps_chroma_format_idc is a SPS chroma format identification code.

[00461] 16. The method of any of solutions 1-15, wherein usage of the NN filter is indicated in a coding tree unit syntax in the bitstream as follows: if ( CtbAddrX = = 0 && CtbAddrY = = 0 && sps_cnnlf_enabled_flag ) { for ( chai = 0; chai < ( sps chroma format idc != 0 ? 2 : 1 ); chal++) { for (unitldx = 0; unitldx < numlnferUnitsfchal ]; unitldx ++) { if (slice_cnnlf_mode[chal] < sps_cnnlf_max_num_params + 1) { cnnlfParamIdx[chal] [unitldx] = slice cnnlf mode[chal]

} else { useCnnlf if ( sps cnnlf max num params == 1 ) { cnnlfParamldxfchal] [unitldx] = useCnnlf ? 1 : 0

} else if { ! useCnnlf) { cnnlfParamldxfchal] [unitldx] = 0

} else { useFirstParam if ( sps_cnnlf_max_num_params == 2 ) { cnnlfParamldxfchal] [unitldx] = useFirstParam ? 1 : 2

} else if ( useFirstParam ) { cnnl fParam!dx[ chai ] [unitldx] = 1

} else { cnnlfParamIdxMinus2 cnnlfParamldxfchal] [unitldx] = cnnlfParamIdxMinus2 + 2

}

}

}

}

}

} where CtbAddrX is a coding tree block (CTB) address on an X axis and CtbAddrY is a CTB address on a Y axis.

[00462] 17. An apparatus for processing video data comprising: a processor; and a non- transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform the method of any of solutions 1-16.

[00463] 18. A non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of solutions 1-16.

[00464] 19. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises: determining to apply a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; and generating a bitstream based on the determining.

[00465] 20. A method for storing bitstream of a video comprising: determining to apply a neural network (NN) filter to an unfiltered sample of a video unit to generate a filtered sample, wherein the NN filter includes an NN filter model generated based on partitioning information of the video unit, and wherein usage of the NN filter is indicated by one or more syntax elements in a bitstream; generating a bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable recording medium.

[00466] The following documents are incorporated by reference in their entirety:

[1] Johannes Balle, Valero Laparra, and Eero P Simoncelli, “End-to-end optimization of nonlinear transform codes for perceptual quality,” PCS IEEE (2016), 1-5. [2] Lucas Theis, Wenzhe Shi, Andrew Cunningham, and Ferenc Huszar, “Lossy image compression with compressive autoencoders,” arXiv preprint arXiv: 1703.00395 (2017).

[3] Jiahao Li, Bin Li, Jizheng Xu, Ruiqin Xiong, and Wen Gao, “Fully Connected Network-Based Intra Prediction for Image Coding, “IEEE Transactions on Image Processing” 27, 7 (2018), 3236-3247.

[4] Yuanying Dai, Dong Liu, and Feng Wu, “A convolutional neural network approach for post-processing in HEVC intra coding,” MMM. Springer, 28-39.

[5] Rui Song, Dong Liu, Houqiang Li, and Feng Wu, “Neural network-based arithmetic coding of intra prediction modes in HEVC,” VCIP IEEE (2017), 1-4.

[6] J. Pfaff, P. Helle, D. Maniry, S. Kaltenstadler, W. Samek, H. Schwarz, D. Marpe, and T. Wiegand, “Neural network based intra prediction for video coding,” Applications of Digital Image Processing XLI, Vol. 10752. International Society for Optics and Photonics, 1075213 (2018).

[00467] The disclosed and other solutions, examples, embodiments, modules and the functional operations described in this document can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this document and their structural equivalents, or in combinations of one or more of them. The disclosed and other embodiments can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter effecting a machine-readable propagated signal, or a combination of one or more them. The term “data processing apparatus” encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A propagated signal is an artificially generated signal, e g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus.

[00468] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

[00469] The processes and logic flows described in this document can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an field programmable gate array (FPGA) or an application specific integrated circuit (ASIC).

[00470] Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random-access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and compact disk read-only memory (CD ROM) and digital versatile disc-read only memory (DVD-ROM) disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[00471] While this patent document contains many specifics, these should not be construed as limitations on the scope of any subject matter or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular techniques. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

[00472] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be perforated, to achieve desirable results. Moreover, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[00473] Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this patent document.

[00474] While this patent document contains many specifics, these should not be construed as limitations on the scope of any subject matter or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular techniques. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a subcombination.

[00475] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Moreover, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments. [00476] Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this patent document.