Neural network filtering in video coding
Patent Information
- Application Number
- CN202111163044.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-10-02
- Filing Date
- 2021-09-30
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2041-09-30
Smart Images

Figure CN114390288B_ABST
Abstract
Description
[0001] Cross-reference to related applications
[0002] This application promptly claims priority and benefit to U.S. Provisional Patent Application No. 63 / 087,113, filed October 2, 2020, in accordance with applicable patent law and / or the Paris Convention. For all purposes required by law, the entire disclosure of the aforementioned application is incorporated herein by reference as part of the disclosure of this application. Technical Field
[0003] This patent document relates to digital media encoding and decoding. Background Technology
[0004] Digital video accounts for the largest share of bandwidth usage on the Internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demand for digital video is expected to continue to grow. Summary of the Invention
[0005] This document discloses techniques that can be used by image, audio, or video encoders and decoders to ensure the integrity of encoding operations, decoding operations, and encoded digital media segments.
[0006] In one example aspect, a method for processing visual media data is disclosed. The method includes a conversion between the visual media data and a bitstream of the visual media data; determining, according to rules, how to apply one or more convolutional neural network filters to at least some samples of video units of the visual media data; and performing the conversion based on that determination.
[0007] In another example aspect, a video processing apparatus is disclosed. This video processing apparatus includes a processor configured to implement the methods described above.
[0008] In yet another example, a method for storing visual media data to a file comprising one or more bitstreams is disclosed. This method corresponds to the method described above and also includes storing the one or more bitstreams to a non-transitory computer-readable recording medium.
[0009] In yet another example, a computer-readable medium for storing a bitstream is disclosed. This bitstream is generated according to the method described above.
[0010] In yet another example, a video processing apparatus for storing bitstreams is disclosed, wherein the video processing apparatus is configured to implement the above-described method.
[0011] In yet another example, a computer-readable medium is disclosed on which a bitstream conforms to a file format generated according to the method described above.
[0012] These and other features are described throughout this document. Attached Figure Description
[0013] Figure 1 An image with an 18x12 brightness CTU is shown, which is divided into 12 slices and 3 raster scan strips.
[0014] Figure 2 An image with an 18x12 luminance CTU is shown, which is divided into 24 panels and 9 rectangular strips.
[0015] Figure 3 The image shows the structure divided into 4 pieces, 11 bricks, and 4 rectangular strips.
[0016] Figures 4A-4C An example of CTB crossing the image boundary is shown, (a) K = M, L <N;(b)K<M,L=N;(c)K<M,L<N。
[0017] Figure 5 An example of a codec block diagram is shown.
[0018] Figure 6 It is an illustration of image samples on an 8×8 grid, as well as horizontal and vertical block boundaries, and non-overlapping blocks of 8×8 samples that can be de-blocked in parallel.
[0019] Figure 7 The pixels involved in filter on / off decisions and strong / weak filter selection are shown.
[0020] Figure 8 Four 1-D orientation patterns for EO sample point classification are shown: horizontal (EO class = 0), vertical (EO class = 1), 135° diagonal (EO class = 2), and 45° diagonal (EO class = 3).
[0021] Figure 9 The shapes of GALF filters are shown (left: 5×5 rhombus, middle: 7×7 rhombus, right: 9×9 rhombus).
[0022] Figures 10A-10C The relative coordinates used for 5×5 rhombus filter support are shown. Figure 10A Show the diagonal, Figure 10B Showing vertical flip, and Figure 10C Rotational support is shown.
[0023] Figure 11 An example of relative coordinates for 5×5 rhombus filter support is shown.
[0024] Figure 12A and Figure 12B The architecture of the proposed CNN filter is shown. Figure 12A The diagram shows that M represents the number of feature maps. N represents the number of samples in one dimension. Figure 12B It shows Figure 12A The construction of ResBlock (residual block) in the code.
[0025] Figure 13 This is a block diagram of an example video processing system.
[0026] Figure 14 This is a block diagram of a video processing device.
[0027] Figure 15 This is a flowchart of an example method for video processing.
[0028] Figure 16 This is a block diagram illustrating a video encoding / decoding system according to some embodiments of the present disclosure.
[0029] Figure 17 This is a block diagram illustrating an encoder according to some embodiments of the present disclosure.
[0030] Figure 18 This is a block diagram illustrating a decoder according to some embodiments of the present disclosure.
[0031] Figure 19 An example filter architecture is shown.
[0032] Figure 20 A flowchart is shown illustrating an example method for processing visual media data based on some implementations of the disclosed technology. Detailed Implementation
[0033] For ease of understanding, chapter headings are used in this document, and the applicability of the techniques and embodiments disclosed in each chapter is not limited to that chapter. Furthermore, the use of H.266 terminology in some descriptions is merely for ease of understanding and not to limit the scope of the disclosed techniques. Thus, the techniques described herein are also applicable to other video codec protocols and designs.
[0034] 1. Preliminary Discussion
[0035] This document relates to video codec technology. Specifically, it relates to loop filters in image / video codecs. It can be applied to existing video codec standards, such as High Efficiency Video Codec (HEVC), Multi-Functional Video Codec (VVC), or pending standards (e.g., AVS3). It can also be applied to future video codec standards or video codecs, or used as a post-processing method outside the encoding / decoding process.
[0036] 2. Introduction to Video Encoding and Decoding
[0037] Video codec standards have primarily evolved through the well-known developments of ITU-T and ISO / IEC. ITU-T developed H.261 and H.263, while ISO / IEC developed MPEG-1 and MPEG-4 Vision. These two organizations jointly developed the H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Codec (AVC) and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec architecture, utilizing temporal prediction plus transform coding. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, many new methods have been adopted by JVET and incorporated into reference software called the Joint Exploration Model (JEM). In April 2018, a Joint Video Experts Team (JVET) was created between VCEG (Q6 / 16) and ISO / IEC JTC1SC29 / WG11 (MPEG) to work on the VVC standard, which aims to reduce the bitrate by 50% compared to HEVC. The first version of VVC was finalized in July 2020.
[0038] The latest version of the VVC draft, namely the Multi-Functional Video Codec (Draft 10), can be found here:
[0039] phenix.it-sudparis.eu / jvet / doc_end_user / current_document.php? id=10399
[0040] The latest reference software for VVC is called VTM, which can be found at:
[0041] vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM / - / tags / VTM-10.0
[0042] 2.1 Color Space and Chromaticity Subsampling
[0043] A color space, also known as a color model (or color system), is an abstract mathematical model that simply describes the range of colors as tuples of numbers, typically 3 or 4 values or color components (e.g., RGB). Essentially, a color space is a refinement of a coordinate system and its subspaces.
[0044] For video compression, the most commonly used color spaces are YCbCr and RGB.
[0045] YCbCr, Y'CbCr, or Y Pb / Cb Pr / Cr, also written as YCBCR or Y'CBCR, is a series of color spaces used as part of the color imaging pipeline in video digital camera systems. Y' is the luminance component, and CB and CR are the blue and red difference chromaticity components. Y' (with an apostrophe) is different from Y, where Y is luminance, meaning that the light intensity is non-linearly encoded based on gamma-corrected RGB primary colors.
[0046] Chromatic subsampling is a practice that utilizes the advantage that the human visual system is less sensitive to color difference than to luminance, and encodes and decodes images by achieving a lower resolution for chromatic information than for luminance information. 2.1.1.4:4:4
[0048] Each of the three Y'CbCr components has the same sampling rate, therefore there is no chromaticity subsampling. This scheme is sometimes used in high-end cinema scanners and film post-production. 2.1.2.4:2:2
[0050] The two chroma components are sampled at half the luminance sampling rate: the horizontal chroma resolution is halved. This results in a one-third reduction in the bandwidth of the uncompressed video signal with almost no visual difference. 2.1.3.4:2:0
[0052] In 4:2:0, the horizontal sampling is doubled compared to 4:1:1, but the vertical resolution is halved because the Cb and Cr channels are sampled only on each alternating line. Therefore, the data rate is the same. Cb and Cr are each subsampled by a factor of 2 in both the horizontal and vertical directions. There are three variants of the 4:2:0 scheme with different horizontal and vertical addressing.
[0053] In MPEG-2, Cb and Cr are co-addressable in the vertical direction. Cb and Cr are located between pixels in the vertical direction (in the gap).
[0054] • In JPEG / JIF, H.261, and MPEG-1, Cb and Cr are located in the gaps between alternating luminance samples.
[0055] In a 4:2:0 DV configuration, Cb and Cr are co-located in the horizontal direction. In the vertical direction, they are co-located on alternating lines.
[0056] 2.2 Definition of Video Unit
[0057] The image is divided into one or more slice rows and one or more slice columns. A slice is a series of CTUs that cover a rectangular area of the image.
[0058] The sheet is divided into one or more bricks, each brick consisting of multiple CTU rows within the sheet.
[0059] A slice that is not divided into multiple bricks is also called a brick. However, a brick that is a proper subset of a slice is not called a slice.
[0060] A strip either contains multiple slices of an image or multiple bricks of a slice.
[0061] It supports two stripe modes: raster scan stripe mode and rectangular stripe mode. In raster scan stripe mode, the stripe contains a series of slices from a raster scan of the image. In rectangular stripe mode, the stripe contains multiple tiles from the image, which together form a rectangular area of the image. The tiles within the rectangular stripe are arranged in the order of the raster scan of the stripe.
[0062] Figure 1 An example of raster scan strip segmentation of an image is shown, where the image is divided into 12 slices and 3 raster scan strips.
[0063] In the VVC specification Figure 2 An example of rectangular strip segmentation of an image is shown, where the image is divided into 24 slices (6 slice columns and 4 slice rows) and 9 rectangular strips.
[0064] Figure 3 The VVC specification shows an example of an image divided into slices, bricks, and rectangular strips, where the image is divided into 4 slices (2 slice columns and 2 slice rows), 11 bricks (the top left slice contains 1 brick, the top right slice contains 5 bricks, the bottom left slice contains 2 bricks, and the bottom right slice contains 3 bricks) and 4 rectangular strips.
[0065] 2.2.1. CTU / CTB Size
[0066] In VVC, the CTU size, which is signaled in SPS by the syntax element log2_CTU_size_minus2, can be as small as 4×4.
[0067] 7.3.2.3 Sequence Parameter Set (RBSP) Syntax
[0068]
[0069]
[0070]
[0071] The increment of 2 in log2_ctu_size_minus2 specifies the size of the luminance codec tree block for each CTU.
[0072] log2_min_luma_coding_block_size_minus2 plus 2 specifies the minimum luma encoding / decoding block size.
[0073] The variables CtbLog2SizeY, CtbSizeY, MinCbLog2SizeY, MinCbSizeY, MinTbLog2SizeY, MaxTbLog2SizeY, MinTbSizeY, MaxTbSizeY, PicWidthInCtbsY, PicHeightInCtbsY, PicSizeInCtbsY, PicWidthInMinCbsY, PicHeightInMinCbsY, PicSizeInMinCbsY, PicSizeInSamplesY, PicWidthInSamplesC, and PicHeightInSamplesC are derived as follows:
[0074] CtbLog2SizeY=log2_ctu_size_minus2+2 (7-9)
[0075] CtbSizeY = 1 <CtbLog2SizeY (7-10)
[0076] MinCbLog2SizeY=log2_min_luma_coding_block_size_minus2+2 (7-11)
[0077] MinCbSizeY=1< <MinCbLog2SizeY (7-12)
[0078] MinTbLog2SizeY=2 (7-13)
[0079] MaxTbLog2SizeY=6 (7-14)
[0080] MinTbSizeY=1< <MinTbLog2SizeY (7-15)
[0081] MaxTbSizeY = 1 <MaxTbLog2SizeY (7-16)
[0082] PicWidthInCtbsY=Ceil(pic_width_in_luma_samples÷CtbSizeY) (7-17)
[0083] PicHeightInCtbsY = Ceil(pic_height_in_luma_samples ÷ CtbSizeY) (7-18)
[0084] PicSizeInCtbsY = PicWidthInCtbsY * PicHeightInCtbsY (7-19)
[0085] PicWidthInMinCbsY = pic_width_in_luma_samples / MinCbSizeY (7-20)
[0086] PicHeightInMinCbsY = pic_height_in_luma_samples / MinCbSizeY (7-21)
[0087] PicSizeInMinCbsY = PicWidthInMinCbsY * PicHeightInMinCbsY (7-22)
[0088] PicSizeInSamplesY = pic_width_in_luma_samples * pic_height_in_luma_samples (7-23)
[0089] PicWidthInSamplesC = pic_width_in_luma_samples / SubWidthC (7-24)
[0090] PicHeightInSamplesC = pic_height_in_luma_samples / SubHeightC (7-25)
[0091] 2.2.2 CTUs in a Picture
[0092] Assume that the size of CTB / LCU is indicated by M×N (as defined in HEVC / VVC, M is generally equal to N), and for a CTB located at the boundary of a picture (or a slice, or a tile, or other types, the picture boundary is taken as an example), K×L samples are within the picture boundary, where K < M or L < N. For those CTBs as depicted in Figures 4A-4B , the CTB size is still equal to M×N, however, the bottom boundary / right boundary of the CTB is outside the picture.
[0093] Figure 4A shows a CTB crossing the bottom picture boundary. Figure 4B shows a CTB crossing the right boundary. Figure 4C The CTB (Content Boundary) is shown across the bottom right edge of the image.
[0094] 2.3. Encoding and decoding process of typical video codecs
[0095] Figure 5 An example of a VVC encoder block diagram is shown, comprising three in-loop filtering blocks: Deblocking Filter (DF), Sample Adaptive Offset (SAO), and ALF. Unlike DF, which uses predefined filters, SAO and ALF utilize the raw samples of the current image, adding offsets and applying finite impulse response (FIR) filters respectively by employing encoder-decoder side information of signaling offsets and filter coefficients to reduce the mean square error between the raw and reconstructed samples. ALF is located in the final processing stage of each image and can be viewed as a tool attempting to capture and repair artifacts caused by previous stages.
[0096] 2.4. Deblocking Filter (DB)
[0097] The input to DB is the reconstructed sample points before the filter in the loop.
[0098] First, the vertical edges in the image are filtered. Then, using samples modified by the vertical edge filtering process as input, the horizontal edges in the image are filtered. Vertical and horizontal edges in the CTB of each CTU are processed separately on a codec unit basis. Vertical edges of the codec blocks within a codec unit are filtered, starting from the left edge of the codec block and proceeding geometrically through that edge towards the right edge. Horizontal edges of the codec blocks within a codec unit are filtered, starting from the top edge of the codec block and proceeding geometrically through that edge towards the bottom edge.
[0099] 2.4.1 Boundary Decision
[0100] The filter is applied to the 8×8 block boundary. Furthermore, it must be a transform block boundary or an encoder / decoder sub-block boundary (e.g., ATMVP due to the use of affine motion prediction). For boundaries that are not such, the filter is disabled.
[0101] 2.4.4 Boundary Strength Calculation
[0102] For transform block boundaries / encoder / decoder sub-block boundaries, if it lies within an 8×8 grid, it can be filtered, and the bS[xD] of that edge... i ][yD j (where [xD]) i ][yD j The settings for (representing coordinates) are defined in Table 1 and Table 2, respectively.
[0103] Table 1. Boundary Strength (when SPS IBC is disabled)
[0104]
[0105]
[0106] Table 2. Boundary Strength (when SPS IBC is enabled)
[0107]
[0108] 2.4.3 Deblocking decision for the luminance component
[0109] This section describes the decision-making process for removing blocks.
[0110] Figure 7 The pixels involved in filter on / off decisions and strong / weak filter selection are shown.
[0111] The wider-stronger luminance filter is a filter that is only used when conditions 1, 2, and 3 are all true.
[0112] Condition 1 is the "large block condition". This condition detects whether the samples at the P-side and Q-side belong to a large block, and is represented by the variables bSidePisLargeBlk and bSideQisLargeBlk, respectively. bSidePisLargeBlk and bSideQisLargeBlk are defined as follows.
[0113] bSidePisLargeBlk = ((edge type is vertical, and p0 belongs to a CU with width >= 32) || (edge type is horizontal, and p0 belongs to a CU with height >= 32)) ? TRUE: FALSE
[0114] bSideQisLargeBlk = ((edge type is vertical, q0 belongs to CU with width >= 32) || (edge type is horizontal, q0 belongs to CU with height >= 32)) ? TRUE:FALSE
[0115] Based on bSidePisLargeBlk and bSideQisLargeBlk, condition 1 is defined as follows.
[0116] Condition 1=(bsidepislageblk||bsidepislageblk)? ? TRUE:FALSE
[0117] Next, if condition 1 is true, condition 2 will be further checked. First, the following variables are derived:
[0118] - In HEVC, for example, first export dp0, dp3, dq0, and dq3.
[0119] -If (p-side is greater than or equal to 32)
[0120] dp0=(dp0+Abs(p50-2*p40+p30)+1)>>1
[0121] dp3=(dp3+Abs(p53-2*p43+p33)+1)>>1
[0122] -If (q-side is greater than or equal to 32)
[0123] dq0=(dq0+Abs(q50-2*q40+q30)+1)>>1
[0124] dq3=(dq3+Abs(q53-2*q43+q33)+1)>>1
[0125] Condition 2 = (d < β)? TRUE: FALSE
[0126] Where d = dp0 + dq0 + dp3 + dq3.
[0127] If conditions 1 and 2 are valid, then further check if any block uses a sub-block:
[0128] If (bSidePisLargeBlk)
[0129] {
[0130] If (mode block (mode block) P == SUBBLOCKMODE)
[0131] Sp = 5
[0132] otherwise
[0133] Sp=7
[0134] }
[0135] otherwise
[0136] Sp = 3
[0137] If (bSideQisLargeBlk)
[0138] {
[0139] If (mode block Q == SUBBLOCKMODE)
[0140] Sq = 5
[0141] otherwise
[0142] Sq = 7
[0143] }
[0144] otherwise
[0145] Sq = 3
[0146] Finally, if both conditions 1 and 2 are valid, the proposed deblocking method will check condition 3 (large block strong filtering condition), which is defined as follows.
[0147] In condition 3, the strong filtering condition, the following variables were derived:
[0148] For example, in HEVC, export dpq.
[0149] For example, in HEVC, sp3 = Abs(p3 - p0).
[0150] If (p-side is greater than or equal to 32)
[0151] If (Sp == 5)
[0152] sp3=(sp3+Abs(p5-p3)+1)>>1
[0153] otherwise
[0154] sp3=(sp3+Abs(p7-p3)+1)>>1
[0155] For example, in HEVC, sq3 = Abs(q0-q3).
[0156] If (q-side is greater than or equal to 32)
[0157] If (Sq == 5)
[0158] sq3=(sq3+Abs(q5-q3)+1)>>1
[0159] otherwise
[0160] sq3=(sq3+Abs(q7-q3)+1)>>1
[0161] In HEVC, StrongFilterCondition = (dpq < (β >> 2), sp3 + sq3 < (3 * β >> 5), and Abs(p0 - q0) < (5 * t). C +1)>>1)? TRUE:FALSE.
[0162] 2.4.4 A more robust deblocking filter for luminance (designed for larger blocks)
[0163] A bilinear filter is used when samples located on either side of the boundary belong to a large block. Samples belonging to a large block are defined as those where the width of the vertical edge is greater than or equal to 32 and the height of the horizontal edge is greater than or equal to 32.
[0164] The following lists bilinear filters.
[0165] Then, the block boundary samples pi (i = 0 to Sp-1) and qi (j = 0 to Sq-1) (in the above HEVC deblocking, pi and qi are the i-th sample in the row used to filter vertical edges, or the i-th sample in the column used to filter horizontal edges) are replaced by linear interpolation, as shown below:
[0166] -p i ′=(f i *Middle s,t +(64-f i )*P s +32)>>6), trim to p i ±tcPD i
[0167] -q j ′=(g j *Middle s,t +(64-g j )*Q s +32)>>6), trim to q j ±tcPD j
[0168] tcPD i and tcPD j The term is the position-related clipping described in Section 2.4.7, and g is given below. j Middle s,t P s and Q s .
[0169] 2.4.5. Color deblocking control
[0170] A strong chroma filter is 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 is satisfied: The first is the decision for boundary strength and the size of the block. The proposed filter can be applied when the block width or height orthogonally crossing the block edge is equal to or greater than 8 in the chroma sampling domain. The second and third are essentially the same as the HEVC luminance deblocking decision, namely the on / off decision and the strong filter decision, respectively.
[0171] In the first decision, the boundary strength (bS) is modified for chroma filtering, and the conditions are checked sequentially. If a condition is met, the remaining conditions with lower priority are skipped.
[0172] Chromatic deblocking is performed when bS equals 2, or when bS equals 1 when a large block boundary is detected.
[0173] The second and third conditions are basically the same as the HEVC brightness strong filter decision, as shown below.
[0174] In the second condition:
[0175] Then, as in the HEVC luminance deblock, export d.
[0176] The second condition will be true when d is less than β.
[0177] In the third condition, StrongFilterCondition is derived as follows:
[0178] For example, in HEVC, export dpq.
[0179] For example, in HEVC, sp3 = Abs(p3-p0).
[0180] For example, in HEVC, sq3 = Abs(q0-q3).
[0181] As in HEVC design, StrongFilterCondition = (dpq < (β >> 2), sp3 + sq3 < (β >> 3), and Abs(p0 - q0) < (5 * t) C +1)>>1)
[0182] 2.4.6. Strong deblocking filter for chroma
[0183] Strong deblocking filters for the following chroma are defined:
[0184] p2′=(3*p3+2*p2+p1+p0+q0+4)>>3
[0185] p1′=(2*p3+p2+2*p1+p0+q0+q1+4)>>3
[0186] p0′=(p3+p2+p1+2*p0+q0+q1+q2+4)>>3
[0187] The proposed chromaticity filter performs deblocking on a 4×4 chromaticity sample grid.
[0188] 2.4.7 Position-related clipping
[0189] Position-dependent clipping (tcPD) is applied to the output samples of the luminance filtering process, which involves modifying the strong and long filters at the boundaries of 7, 5, and 3 samples. Assuming a quantization error distribution, it is recommended to increase the clipping values of samples expected to have higher quantization noise; therefore, the expected reconstructed sample values will deviate significantly from the true sample values.
[0190] For each P or Q boundary filtered by the asymmetric filter, a location-related threshold table is selected from two tables (i.e., Tc7 and Tc3 listed below) based on the results of the decision-making process in Section 2.4.2, which is provided to the decoder as side information:
[0191] Tc7={6,5,4,3,2,1,1}; Tc3={6,4,2};
[0192] tcPD=(Sp==3)? Tc3:Tc7;
[0193] tcQD=(Sq==3)? Tc3:Tc7;
[0194] For P or Q boundaries filtered by a short symmetric filter, apply a lower-amplitude position correlation threshold:
[0195] Tc3 = {3, 2, 1};
[0196] After defining the threshold, the filtered p' is p' is p' p' p'' p''''''''''''''''"" ""...' ... i and q' i Clipping of sample values:
[0197] p” i =Clip3(p' i +tcP i ,p' i –tcP i ,p' i );
[0198] q” j =Clip3(q' j +tcQ j ,q' j –tcQ j ,q' j );
[0199] Among them, p' i and q' i It is the filtered sample value, p” i and q” j It is the output sample value after clipping, and tcP i tcP iThe clipping threshold is derived from the VVC tc parameters and tcPD and tcQD. The function Clip3 is the clipping function specified in VVC.
[0200] 2.4.8. Sub-block Removal and Adjustment
[0201] To enable parallel and user-friendly use of both long filters and sub-block filters for deblocking, the long filter is restricted to modifying a maximum of 5 samples on the side using sub-block deblocking (AFFINE, ATMVP, or DMVR), as shown in the brightness control of the long filter. Furthermore, sub-block deblocking is adjusted so that sub-block boundaries on the 8×8 grid near the CU or implicit TU boundaries are restricted to modifying a maximum of two samples per side.
[0202] The following applies to sub-block boundaries that are not aligned with the CU boundary.
[0203] If (!(implicit TU&&(edge==(64 / 4))))
[0204] If (edge == 2 || edge == (orthogonalLength - 2) || edge == (56 / 4) || edge == (72 / 4))
[0205] Sp = Sq = 2;
[0206] otherwise
[0207] Sp = Sq = 3;
[0208] otherwise
[0209] Sp=Sq=bSideQisLargeBlk? 5:3
[0210] }
[0211] Here, an edge equal to 0 corresponds to the CU boundary, an edge equal to 2 or orthogonalLength-2 corresponds to 8 samples of the sub-block boundary from the CU boundary, and so on. If implicit partitioning of TU is used, then implicit TU is true.
[0212] 2.5.SAO
[0213] The input to SAO is the reconstructed samples after DB (Database Optimization). The concept of SAO is to reduce the average sample distortion of a region by first classifying region samples into multiple categories using a selected classifier, obtaining an offset for each category, and then adding that offset to each sample in that category. The classifier index and the region offset are encoded and decoded in the bitstream. In HEVC and VVC, the region (the unit of SAO parameter signaling) is defined as a CTU (Center Unit).
[0214] HEVC employs two SAO types that meet low complexity requirements. These two types are Edge Offset (EO) and Band Offset (BO), which will be discussed in more detail below. The index of the SAO type is encoded and decoded (within the range [0, 2]). For EO, sample classification is based on a comparison between the current sample and its neighboring samples, according to a 1-D orientation pattern: horizontal, vertical, 135° diagonal, and 45° diagonal.
[0215] Figure 8 Four 1-D orientation patterns for EO sample point classification are shown: horizontal (EO class = 0), vertical (EO class = 1), 135° diagonal (EO class = 2), and 45° diagonal (EO class = 3).
[0216] For a given EO class, each sample point within the CTB is classified into one of five categories. The current sample point value, labeled "c", is compared with its two neighboring sample point values along the selected 1-D pattern. The classification rules for each sample point are summarized in Table I. Categories 1 and 4 are associated with local valleys and local peaks along the selected 1-D pattern, respectively. Categories 2 and 3 are associated with concave and convex angles along the selected 1-D pattern, respectively. If the current sample point does not belong to EO categories 1–4, it is classified as category 0 and SAO is not applied.
[0217] Table 3: Sampling classification rules for edge offset
[0218]
[0219] 2.6. Adaptive Loop Filter Based on Geometric Transformation in JEM
[0220] The input to DB is the reconstructed samples after DB and SAO. The sample classification and filtering process is based on the reconstructed samples after DB and SAO.
[0221] In JEM, a geometric transformation-based adaptive loop filter (GALF) with block-based filter adaptation [3] is applied. For the luminance component, one of 25 filters is selected for each 2×2 block based on the direction and activity of the local gradient.
[0222] 2.6.1. Filter Shape
[0223] In JEM, up to three diamond filter shapes can be selected for the luminance component (e.g., Figure 9 (As shown). The image-level signaling notification index indicates the filter shape used for the luminance component. Each square represents a sample point, and Ci (i is 0–6 (left), 0–12 (middle), 0–20 (right)) represents the coefficient applied to the sample point. For the chrominance component in the image, a 5×5 rhombus is always used.
[0224] 2.6.1.1 Block Classification
[0225] Each 2×2 block is classified into one of 25 categories. As shown below, the classification index C is based on its orientation D and the quantification value of its activity. The conclusion is:
[0226]
[0227] To calculate D and First, the gradients in the horizontal, vertical, and two diagonal directions are calculated using the 1-D Laplacian operator:
[0228]
[0229]
[0230]
[0231]
[0232] Indices i and j refer to the coordinates of the top-left sample point in the 2×2 block, and R(i,j) indicates the reconstructed sample point at coordinates (i,j).
[0233] The maximum and minimum values of the gradient D in the horizontal and vertical directions are then set as follows:
[0234]
[0235] Furthermore, the maximum and minimum values of the gradients in the two diagonal directions are set as follows:
[0236]
[0237] To derive the directional value D, these values are compared with each other and with two thresholds t1 and t2:
[0238] Step 1. If and If both are true, then D is set to 0.
[0239] Step 2. If Continue from step 3; otherwise, continue from step 4.
[0240] Step 3. If Then D is set to 2; otherwise, D is set to 1.
[0241] Step 4. If Then D is set to 4; otherwise, D is set to 3.
[0242] Activity value A is calculated as follows:
[0243]
[0244] A is further quantized to the range of 0 to 4, inclusive. The quantized value is represented as... For the two chromaticity components in the image, no classification method is applied; that is, a single set of ALF coefficients is applied to each chromaticity component.
[0245] 2.6.1.2. Geometric Transformation of Filter Coefficients
[0246] Figures 10A-10C The relative coordinates used for 5×5 rhombus filter support are shown (diagonal, vertical flip, and rotation, respectively).
[0247] Before filtering each 2×2 block, a geometric transformation, such as rotation, diagonalization, and vertical flip, is applied to the filter coefficients f(k, l) associated with coordinates (k, l), depending on the gradient values calculated for that block. This is equivalent to applying these transformations to samples within the filter's support region. The idea is to make different blocks to which ALF has been applied more similar by aligning their orientations.
[0248] Three geometric transformations are introduced: diagonal, vertical flip, and rotation.
[0249] Diagonal: f D (k, l) = f(l, k),
[0250] Vertical flip: f V (k, l) = f(k, Kl-1), (9)
[0251] Rotation: f R (k, l) = f(Kl-1, k).
[0252] Where K is the size of the filter, and 0 ≤ k, l ≤ K-1 are the coefficient coordinates such that position (0, 0) is in the upper left corner and position (K-1, K-1) is in the lower right corner. The transform is applied to the filter coefficients f(k, l) based on the gradient values calculated for this block. Table 4 summarizes the relationship between the transform and the four gradients in the four directions. Figure 9 The transformed coefficients are shown for each position based on a 5×5 rhombus.
[0253] Table 4: Mapping of gradients and transformations computed for a block
[0254] gradient value Transformation <![CDATA[g d2 <g d1 And g h <g v ]]> No transformation <![CDATA[g d2 <g d1 And g v <g h ]]> diagonal <![CDATA[g d1 <g d2 And g h <g v ]]> Vertical flip <![CDATA[g d1 <g d2 And g v <g h ]]> Rotation
[0255] 2.6.1.3. Filter Parameter Signaling
[0256] In JEM, the GALF filter parameters are signaled for the first CTU, i.e., after the stripe header of the first CTU and before the SAO parameters. A set of up to 25 luminance filter coefficients can be signaled. To reduce bit overhead, filter coefficients from different categories can be merged. Furthermore, the GALF coefficients of a reference image are stored and can be reused as GALF coefficients for the current image. The current image can optionally use the GALF coefficients stored for the reference image and bypass the GALF coefficient signaling. In this case, only the index of one of the reference images is signaled, and the currently image inherits the stored GALF coefficients of the indicated reference image.
[0257] 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 an image, the corresponding filter set can be added to the candidate list. Once the size of the candidate list reaches the maximum allowed value (i.e., 6 in the current JEM), new filter sets will overwrite the oldest sets in decoding order; that is, a first-in-first-out (FIFO) rule will be applied to update the candidate list. To avoid duplication, a set is added to the list only if the corresponding image 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 the temporal layer index (TempIdx) can form a filter set from previously decoded images with a lower TempIdx. For example, the k-th array is assigned to be associated with a TempIdx equal to k, and it contains only filter sets from images with TempIdx less than or equal to k. After an image is encoded or decoded, the set of filters associated with that image will be used to update the arrays associated with those equal to or greater than TempIdx.
[0258] Temporal prediction of GALF coefficients is used for inter-frame encoding / decoding to minimize signaling overhead. For intra-frame frames, temporal prediction is not available, and a set of 16 fixed filters is assigned to each class. To indicate the use of fixed filters, signaling is used to notify a flag for each class, and, if necessary, the index of the selected fixed filter. Even when a fixed filter is selected for a given class, the coefficients of the adaptive filter f(k, l) can still be sent for that class; in this case, the coefficients of the filter applied to the reconstructed image are the sum of the two sets of coefficients.
[0259] The filtering process for the luminance component can be controlled at the CU level. Signaling flags indicate whether GALF is applied to the luminance component of the CU. For the chrominance component, the application of GALF is only indicated at the image level.
[0260] 2.6.1.4. Filtering process
[0261] On the decoder side, when GALF is enabled for a block, each sample R(i,j) in that block is filtered to obtain sample values R′(i,j) as shown below, where L represents the filter length, f m,n Let f(k, l) represent the filter coefficients, and let f(k, l) represent the decoded filter coefficients.
[0262]
[0263] Figure 11 This example illustrates the relative coordinates supported by a 5×5 diamond filter, assuming the current sample point's coordinates (i, j) are (0, 0). Sample points at different coordinates, filled with the same color, are multiplied by the same filter coefficients.
[0264] 2.7. Geometric Transformation-Based Adaptive Loop Filter (GALF) in VVC
[0265] 2.7.1. GALF in VTM-4
[0266] In VTM 4.0, the filtering process of the adaptive loop filter is performed as follows:
[0267] O(x, y) = ∑ (i,j) w(i,j).I(x+i,y+j) (11)
[0268] Here, sample I(x+i, y+j) are the input samples, O(x, y) are the filtered output samples (i.e., the filtering result), and w(i, j) represent the filtering coefficients. In fact, in VTM 4.0, it uses an integer algorithm to implement fixed-point precision calculation:
[0269]
[0270] Where L represents the filter length, and w(i,j) are the fixed-point filter coefficients.
[0271] Compared to JEM, the current design of GALF in VVC has the following main changes:
[0272] 1) Adaptive filter shapes have been removed. Only 7×7 filter shapes are allowed for the luminance component, and only 5×5 filter shapes are allowed for the chrominance component.
[0273] 2) The signaling of ALF parameters has been moved from the strip / picture level to the CTU level.
[0274] 3) The class index is computed at a 4×4 level instead of a 2×2 level. Furthermore, as proposed in JVET-L0147, a subsampling Laplacian computation method for ALF classification is utilized. More specifically, it is not necessary to compute the horizontal / vertical / 45-degree diagonal / 135-degree gradients for every sample point within a block. Instead, 1:2 subsampling is used.
[0275] 2.8. Nonlinear ALF in Current VVC
[0276] 2.8.1. Re-formulation of Filtering
[0277] Equation (111) can be reformulated into the following expression without affecting encoding / decoding efficiency: 111
[0278] O(x, y) = I(x, y) + ∑ (i,j)≠(0,0) w(i,j).(I(x+i,y+j)-I(x,y)) (13)
[0279] Among them, w(i,j) is the same as the filter coefficient in equation (11) [except for w(0,0) which is equal to 1 in equation (13), while in equation (11 it is equal to 1-∑ (i,j)≠(0,0) w(i,j)].
[0280] Using the filter formula in (13) above, VVC introduces nonlinearity. When the adjacent sample values (I(x+i, y+j)) differ too much from the current sample value (I(x, y)) being filtered, the influence of the adjacent sample values is reduced by using a simple clipping function, thereby making ALF more effective.
[0281] More specifically, the ALF filter is modified as follows:
[0282] O′(x, y)=I(x, y)+∑ (i,j)≠(0,0) w(i,j).K(I(x+i,y+j)-I(x,y),k(i,j)) (14)
[0283] Where K(d, b) = min(b, max(-b, d)) is the pruning function, and k(i, j) is the pruning parameter, which depends on the (i, j) filter coefficients. The encoder performs optimization to find the optimal k(i, j).
[0284] In the JVET-N0242 implementation, the clipping parameter k(i, j) is specified for each ALF filter, and each filter coefficient signals one clipping value. This means that each luminance filter can signal a maximum of 12 clipping values in the bitstream, while a chroma filter can signal a maximum of 6 clipping values.
[0285] To limit signaling costs and encoder complexity, only four fixed values were used, which are the same for inter-frame and intra-frame stripes.
[0286] Because the variance of local differences in luminance is typically higher than that in chrominance, two different sets of filters are applied for luminance and chrominance. A maximum sample value is also introduced in each set (here, 1024 for a 10-bit bit depth) so that clipping can be disabled if not needed.
[0287] Table 5 provides a set of clipping values used in the JVET-N0242 test. These four values were selected by dividing the entire range of luminance sample values (encoded in 10 bits) and chrominance ranges from 4 to 1024 in the logarithmic domain by approximately equal division.
[0288] More precisely, the brightness table of the clipping values is obtained using the following formula:
[0289]
[0290] Where M = 2 10 And N = 4. (15)
[0291] Similarly, the colorimetric table for clipping values is obtained according to the following formula:
[0292] Where M = 2 10 ,
[0293] N = 4 and A = 4. (16)
[0294] Table 5: Authorized Clip Values
[0295]
[0296] The selected clipped value is encoded and decoded in the "alf_data" syntax element using the Golomb encoding scheme corresponding to the index of the clipped value in Table 5 above. This encoding scheme is the same as that used for the filter index.
[0297] 2.9. Loop Filters Based on Convolutional Neural Networks for Video Encoding and Decoding
[0298] 2.9.1. Convolutional Neural Networks
[0299] In deep learning, convolutional neural networks (CNNs or ConvNets) are a type of deep neural network most commonly used for analyzing visual images. They have been very successful in image and video recognition / processing, recommender systems, image classification, medical image analysis, and natural language processing.
[0300] CNNs are a regularized version of multilayer perceptrons. Multilayer perceptrons typically mean fully connected networks, where each neuron in one layer is connected to all neurons in the next layer. This "fully connectedness" makes them prone to overfitting data. Typical methods of regularization involve adding some form of magnitude measure of the weights to the loss function. CNNs take a different approach to regularization: they utilize hierarchical patterns in the data and assemble more complex patterns using smaller, simpler patterns. Therefore, CNNs are at the lower extremes in terms of connectivity and complexity.
[0301] Compared to other image classification / processing algorithms, CNNs use relatively little preprocessing. This means the network learns filters that are hand-designed in traditional algorithms. This independence from prior knowledge and human intervention in feature design is a major advantage.
[0302] 2.9.2. Deep Learning for Image / Video Encoding and Decoding
[0303] Deep learning-based image / video compression generally has two meanings: end-to-end compression purely based on neural networks and traditional frameworks enhanced by neural networks. The first type typically employs an autoencoder-like structure, implemented either through convolutional neural networks or recurrent neural networks. While relying solely on neural networks for image / video compression avoids any manual optimization or design, the compression efficiency may not be satisfactory. Therefore, work distributed across the second type uses neural networks as an aid and enhances traditional compression frameworks by replacing or augmenting some modules. In this way, they can inherit the advantages of highly optimized traditional frameworks. For example, Li et al. proposed a fully connected network for intra-frame prediction in HEVC. In addition to intra-frame prediction, deep learning has also been used to enhance other modules. For example, Dai et al. replaced the intra-loop filters in HEVC with convolutional neural networks and achieved encouraging results (see Yuanying Dai, Dong Liu, and Feng Wu. 2017. Convolutional Neural Network Method for HEVC Intra-Frame Encoding and Decoding Post-Processing. In MMM. Springer, 28-39). The work in the references (see Rui Song, Dong Liu, Houqiang Li and Feng Wu. 2017. Neural network-based arithmetic codec for intra-prediction modes in HEVC. In VCIP. IEEE, 1-4) applies neural networks to improve arithmetic codec engines.
[0304] 2.9.3. In-loop filtering based on convolutional neural networks
[0305] In lossy image / video compression, the reconstructed frame is an approximation of the original frame because the quantization process is irreversible, thus leading to distortion in the reconstructed frame. To mitigate this distortion, convolutional neural networks can be trained to learn the mapping from distorted frames to the original frames. In practice, this training must be performed before deploying CNN-based in-loop filtering.
[0306] 2.9.3.1. Training
[0307] The goal of training is to find the optimal values of parameters, including weights and biases.
[0308] First, codecs (such as HM, JEM, VTM, etc.) are used to compress the training dataset to generate distorted reconstructed frames.
[0309] The reconstructed frames are then fed into the CNN, and the cost is calculated using the CNN's output and the ground truth frames (original frames). Common cost functions include SAD (Sum of Absolute Differences) and MSE (Mean Squared Error). Next, the gradient of the cost with respect to each parameter is derived using backpropagation. This gradient is used to update the parameter values. This process is repeated until the convergence criterion is met. After training is complete, the derived optimal parameters are saved for use in the inference phase.
[0310] 2.9.3.2 Convolution Process
[0311] During convolution, the filter moves across the image from left to right and from top to bottom, changing the column by one pixel horizontally and then the row by one pixel vertically. The amount of movement between the filter's application to the input image is called the stride, and it is almost always symmetrical in the height and width dimensions. For height and width movements, the default stride in both dimensions is (1, 1).
[0312] In most deep convolutional neural networks, residual blocks are used as basic modules and are stacked several times to build the final network, where in one example, such as Figure 12B As shown, residual blocks are obtained by combining convolutional layers, ReLU / PReLU activation functions, and convolutional layers.
[0313] 2.9.3.3 Inference
[0314] During the inference phase, distorted reconstructed frames are fed into the CNN and processed by the CNN model, whose parameters have been determined during the training phase. The input samples to the CNN can be reconstructed samples before or after DB, or before or after SAO, or before or after ALF.
[0315] 3. The technical problem solved by the disclosed technical solution
[0316] Current CNN-based loop filtering has the following problems:
[0317] 1. The input samples of a CNN are filtered by one or more traditional loop filters, including DB, SAO, or ALF. These filtering processes may result in information loss.
[0318] 2. CNN-based loop filtering does not fully utilize available information that could be beneficial to filtering, such as prediction, segmentation, and other patterns.
[0319] 3. The training process may be suboptimal because the cost function is non-convex and therefore difficult to optimize.
[0320] 4. In existing technologies, CNN-based loop filters are used on all reconstructed frames, leading to over-filtering of later encoded and decoded frames.
[0321] a. For example, in a random access (RA) configuration, blocks in frames within higher temporal layers are likely to select skip mode, meaning the reconstruction of the current frame is copied from the previously reconstructed frame. Since the previous frame was filtered using a CNN-based loop filter, applying a CNN-based loop filter to the current frame is equivalent to applying the CNN filter twice to the same content.
[0322] 5. Use a fixed step size (e.g., 1×1). However, other step sizes can be used, which affects how the filter is applied to the image and, in turn, the size of the resulting feature map.
[0323] 4. List of Technical Solutions
[0324] The following list should be considered as examples to illustrate general concepts. These terms should not be interpreted narrowly. Furthermore, these terms can be combined in any way.
[0325] One or more convolutional neural network (CNN) filter models are trained as in-loop filters or post-processing methods to reduce distortion caused during compression. This invention will discuss the interaction between CNN filtering and non-deep learning filtering methods represented by NDLF, the control of our CNN filtering methods, and CNN filter models. In one example, NDLF may include one or more of deblocking filters, SAO, ALF, CC-ALF, LMCS, bilateral filters, transform domain filtering methods, etc.
[0326] Regarding interaction with NDLF
[0327] 1. The proposed CNN filter can be used exclusively, that is, when applying the CNN filter, one or more NDLFs can be omitted, and vice versa.
[0328] a. In one example, the proposed CNN-based in-loop filter is used exclusively with all types of NDLF.
[0329] i. In one example, when the CNN filter is applied, the original loop filters, such as DB, SAO, ALF, and CC-ALF, are turned off.
[0330] b. In one example, the proposed CNN-based filter is used exclusively with certain NDLFs.
[0331] i. In one example, a CNN filter can be applied when ALF is disabled.
[0332] ii. In one example, when CC-ALF is disabled, a CNN filter can be applied to the chroma component.
[0333] iii. Alternatively, ALF can be applied when CNN filters are disabled.
[0334] iv. Alternatively, CC-ALF can be applied when the CNN filter is disabled for the chroma component.
[0335] c. In one example, suppose that when applying CNN-based filtering, it is determined that the first type of NDLF is off, then when CNN-based filtering is on, no signaling is sent to inform information related to the first type of NDLF.
[0336] i. In one example, when no signaling notification is given regarding information related to the first type of NDLF while CNN-based filtering is enabled, it is inferred that the first type of NDLF is disabled.
[0337] ii. Alternatively, signaling notification may be used to inform information related to the first type of NDLF, but this information should indicate that no signaling notification of the first type of NDLF is required if CNN-based filtering is enabled.
[0338] iii. Alternatively, signaling may be used to provide information related to the first type of NDLF, but this information is required to indicate that the first type of NDLF should not be applied if CNN-based filtering is enabled.
[0339] d. In one example, assuming that when the first type of NDLF is applied, it is determined that the CNN filter is turned off, then when the first type of NDLF is turned on, no signaling is sent to inform information related to the CNN filter.
[0340] i. In one example, when no signaling notification is given regarding information related to the CNN filter when the first type of NDLF is enabled, it is inferred that the CNN filter is disabled.
[0341] ii. Alternatively, signaling may be used to provide information related to the CNN filter, but this information should indicate that the CNN filter should not be applied if the first type of NDLF is enabled.
[0342] e. In one example, the above method can be applied to video units such as CTU / CTB, CTU / CTB lines, strips, slices, pictures, sequences, and sub-pictures.
[0343] 2. The proposed CNN filter can be used in conjunction with NDLF.
[0344] a. In one example, the proposed CNN filter can be applied before or after a given NDLF (e.g., DB / SAO / ALF / CC-ALF).
[0345] b. In one example, for a given video unit (e.g., sequence / picture / subpicture / strip / piece / CTU / CTB / CU / PU / TU), a CNN filter can be applied when NDLF is not applied.
[0346] i. In one example, a CNN filter can be applied to samples where one type of NDLF (e.g., ALF / CC-ALF) is disabled.
[0347] ii. In one example, for samples where CNN filtering is disabled, an NDLF (e.g., ALF / CC-ALF) can be applied.
[0348] Regarding the use of CNN filtering
[0349] 3. In one example, based on the reference image list information, the proposed CNN-based filter can be applied to certain strip / image types, certain temporal layers, or certain strips / images.
[0350] a. In one example, a CNN filter is applied to the I-strip, with DB, SAO, ALF, and CC-AFL turned off for the I-strip via a high-level syntax.
[0351] b. In one example, the CNN filter is applied to the B stripe with time-domain layer id equal to 0. For the B stripe with time-domain layer id equal to 0, DB, SAO, ALF and CC-ALF are turned off by high-level syntax.
[0352] 4. Whether and / or how to use CNN filters (represented as CNN information) may depend on the video standard profile or level.
[0353] 5. Whether and / or how to use CNN filters (represented as CNN information) can be controlled at the video unit level (e.g., sequence / picture / strip / piece / brick / subpicture / CTU / CTU line / one or more CTs or CTU / CTN).
[0354] a. CNN information can include
[0355] i. Instructions for enabling / disabling CNN filters.
[0356] ii. Which CNN filter to apply.
[0357] iii. CNN filtering parameters.
[0358] iv. CNN model
[0359] v. Stride size of the convolutional layer
[0360] vi. Precision of CNN parameters
[0361] vii. Instructions on how to map decimal precision to integer precision
[0362] b. In one example, CNN information can be communicated via signaling at the video unit level.
[0363] i. In one example, CNN information can be signaled in SPS / PPS / Image Header / Strip Header / CTU / CTB.
[0364] ii. In one example, CNN information can be conditionally signaled, for example, depending on the use of NDLF.
[0365] 1. In one example, when applying NDLF, it is possible to notify the CNN of information without signaling.
[0366] a. In this case, it can be inferred that the CNN filter is disabled.
[0367] c. Alternatively, the use of CNN filters can be implicitly derived, for example, on the fly based on the information decoded.
[0368] i. In one example, the use of CNN filters can be conditional on strip type and / or temporal layer ID.
[0369] 1. In one example, a CNN filter is applied based on the strip type.
[0370] a. In one example, for the I-strip, the CNN filter is always enabled.
[0371] 2. In one example, the CNN filter is applied to the B strip of the temporal layer where id equals 0.
[0372] 3. In one example, the CNN filter is applied to both the I-strip and the B-strip where the temporal layer id is equal to 0.
[0373] ii. In one example, the use of CNN filters can be determined based on the encoding / decoding mode, block dimension, block position, etc.
[0374] 1. In one example, for blocks encoded with IBC or palette, CNN filters can be implicitly disabled.
[0375] iii. In one example, the use of CNN filters may depend on the information decoded, which includes the prediction mode (e.g., intra / inter / IBC), transform type (e.g., MTS or LFNST), skip flag, CBF value, etc.
[0376] 1. In one example, a CNN filter is used on blocks where the CBF value is greater than 0.
[0377] 2. In one example, a CNN filter is used on a non-skipped codec block.
[0378] 3. The use of CNN filters can depend on the block level, TU level, PU level, CU level, CTU level, strip level, or image level, or be signaled at these levels.
[0379] 4. In one example, the CNN filter is disabled on the block where the CBF value is equal to 0.
[0380] 5. In one example, the CNN filter is disabled on the skip codec block.
[0381] 6. Alternatively, when the CNN filter is disabled, there is no longer an indication in the bitstream that the CNN filter is being used.
[0382] iv. Alternatively, when it is determined that a CNN filter should be applied, the indication for NDFL may not be signaled and may be inferred as the default value (e.g., disabled).
[0383] 6. CNN information (e.g., on / off, collection of CNN filter models) can be controlled at a granularity smaller than video units (e.g., strip / picture / slice / subpicture / CTB / CTU).
[0384] a. In one example, CNN information can be controlled at the sample / pixel level.
[0385] i. Whether and / or how to use CNN filters for each pixel can be determined explicitly or implicitly.
[0386] b. In one example, CNN information can be controlled at the row / column / line level.
[0387] i. In one example, CNN can be applied in different ways to samples at block boundaries and samples not at block boundaries.
[0388] c. In one example, the samples within a video cell can determine whether a CNN filter is applied, even if a CNN filter for that video cell is applied (e.g., a flag indicating that a CNN filter is used is true).
[0389] i. In one example, the decision could depend on the location of the sample points.
[0390] 1. In one example, the CNN filter is applied only to samples near the boundaries of the video unit.
[0391] ii. In one example, the decision may depend on information being decoded, such as the location of the sample, the encoding / decoding mode, the CBF value, the skip flag, etc.
[0392] iii. In one example, the decision may depend on the reference sample value and / or whether the sample has been filtered by one or more other filters (e.g., NDFL).
[0393] iv. Alternatively, the decision is made immediately rather than by signaling.
[0394] d. In one example, the current sample within a video unit can determine which CNN filter model set to use based on the sample value.
[0395] i. In one example, the sample value is the value of the current sample.
[0396] ii. In one example, the sample value may include the values of the neighboring samples of the current sample.
[0397] iii. In one example, the sample value may include the value of the reference sample value, and / or the predicted sample value of the current sample and / or its neighboring samples.
[0398] iv. In one example, instead of using sample values directly, a function of the sample values (e.g., gradient, Laplacian activity) can be used to select the CNN filter model.
[0399] v. In one example, a CNN filter model set is selected for samples in video units with a value greater than value_threshold, while a different CNN filter model set is selected for samples in video units with a value less than or equal to value_threshold. Here, value_threshold can be implicitly or explicitly derived.
[0400] e. In one example, the sample points within a video unit can determine which CNN filter model set to use based on the sample point location.
[0401] f. In one example, samples can be grouped into multiple classes (e.g., depending on the sample value or sample location). CNN filters are then applied differently to the different classes.
[0402] 7. The difference between a CNN-filtered sample and its unfiltered version can be cropped to a certain range.
[0403] a. In one example, the absolute difference between the filtered sample and its unfiltered version (referred to as diff_cnn_filter) is clipped such that diff_cnn_filter <= max_diff_cnn_filter.
[0404] i. In one example, the signaling notification is max_diff_cnn_filter for the video unit.
[0405] ii. In one example, max_diff_cnn_filter is implicitly exported for video units.
[0406] b. Different cutting methods can be used for different sample points or sample groups.
[0407] c. Trimming can be applied to the final output.
[0408] 8. CNN information for different color components can be signaled or derived individually or in different ways.
[0409] a. In one example, CNN information for luminance and chrominance can be signaled or derived separately or in different ways.
[0410] 9. CNN information can be signaled at different granularities.
[0411] a. In one example, multiple levels of control over CNN filters can be applied.
[0412] i. In one example, the second level (at the smaller video unit) control may depend on the first level control information (at the larger video unit containing the smaller video unit).
[0413] b. In one example, the use of CNN filters is determined at the strip level.
[0414] i. In one example, a signaling notification indicator (e.g., a flag) is included in the strip header to indicate whether a CNN filter is activated for the current strip.
[0415] c. In one example, the use of the CNN filter is determined at the CTU level. For each CTU, a signaling flag indicates whether the CNN filter should be applied to the current CTU.
[0416] 10. CNN information can be signaled as SEI messages.
[0417] Categories of CNN filtering models
[0418] 11. The number of different CNN filter models and / or the set of CNN filter models can be signaled to the decoder.
[0419] a. The number of CNN filter models used for different color components can be signaled separately.
[0420] 12. For different situations, such as based on the decoded information, use different sets of CNN filter models.
[0421] a. In one example, there exists a set of different CNN filter models corresponding to different color components, and / or different stripe types, and / or different QPs.
[0422] i. In one example, QPs can be categorized into several groups. For example, different CNN filter models can be used for different QP / M, where M is an integer, such as 6.
[0423] b. In one example, the luminance and chrominance components use different sets of CNN filter models.
[0424] i. In one example, a first set of CNN filter models is applied to the luminance component, and a second set of CNN filter models is applied to the two chrominance components.
[0425] ii. In one example, each color component is associated with its own set of CNN filter models.
[0426] iii. Alternatively, the number of CNN filter models to apply to the three color components may also depend on the strip / image type and / or the segmentation tree type (single-tree or dual-tree), etc.
[0427] c. In one example, two strip types (e.g., I strips and B (or P) strips) can utilize different sets of CNN filter models.
[0428] d. In one example, for the first color component, the two strip types (e.g., I strip and B (or P) strip) can utilize different sets of CNN filter models; while for the second color component, the two strip types (e.g., I strip and B (or P) strip) can utilize the same set of CNN filter models.
[0429] e. In one example, the choice of the CNN filter set may depend on the temporal layer identifier (e.g., TemporalId in the VVC specification) and / or the GOP size.
[0430] i. In one example, stripes or images in different time-domain layers can utilize different sets of CNN filter models.
[0431] ii. In one example, strips or images in different temporal layers share a set of CNN filter models.
[0432] iii. In one example, the strips or images with a temporal layer id of 0 use one set of CNN filter models, while the strips with a temporal layer id of greater than 0 use another set of CNN filter models.
[0433] iv. In one example, the strips or images in temporal layer i use the i-th CNN filter model set, that is, the number of CNN filter model sets is equal to the number of temporal layers.
[0434] v. In one example, TemporalId can be classified into more than one category, and for each category, a given set of CNN filter models can be applied.
[0435] 1. In one example, the category could include {[0, 0], [1, k], [k+1, m]...}, where k is an integer greater than 1 and m is an integer greater than k.
[0436] 2. In one example, the classification may depend on the GOP size.
[0437] f. In one example, the selection of the CNN filter set may depend on the information decoded (e.g., the encoding / decoding mode, CBF value, skip mode flag) and / or the sample values before filtering using the CNN filters.
[0438] g. In one example, the selection of the CNN filter set may depend on the reference sample information and / or whether the samples have been filtered by one or more other filters (e.g., NDFL).
[0439] h. In one example, for each QP or QP group, one CNN filter model is trained. The number of CNN models is equal to the number of QPs or QP groups.
[0440] i. In one example, a set of CNN filter models can be shared for QP groups.
[0441] iv. In one example, a QP group consists of QPs within a given QP range.
[0442] ii. In one example, train a set of K (e.g., K = 13) CNN models.
[0443] 1. In one example, 13 ensembles of CNN models (e.g., an ensemble containing one CNN model) are applied to the following 13 QP ranges: [1, 4], [5, 9], [10, 14], [15, 19], [20, 24], [25, 29], [30, 34], [35, 39], [40, 44], [45, 49], [50, 54], [55, 59], [60, 63]
[0444] iii. In one example, K can depend on color components, stripe type, temporal layer information, etc.
[0445] Regarding the input of CNN filters
[0446] 13. A method for inputting pattern information and / or other relevant information into CNN filters was proposed.
[0447] a. In one example, the input includes reconstructed samples and decoding information (e.g., segmentation information, prediction information).
[0448] i. In one example, the segmentation information has the same resolution as the reconstructed frame. The sample values in the segmentation are derived by averaging the reconstructed samples in the encoding / decoding unit.
[0449] ii. In one example, the prediction information is prediction samples generated from intra-frame prediction or IBC prediction.
[0450] iii. In one example, the above method can be applied to I-strips / images, for example, to train CNN filters to enhance the quality of reconstructed samples in I-strips.
[0451] b. Information related to the first color component can be used as input to the CNN filtering process applied to the second color component.
[0452] i. Luminance information can be used as input for the chromaticity CNN filtering process.
[0453] a. In one example, luminance reconstructed samples before filtering by an NDLF or luminance CNN filter can be utilized.
[0454] i. Alternatively, luminance reconstruction samples filtered by NDLF or luminance CNN filters can be used.
[0455] b. In one example, the input to the CNN contains both chroma reconstruction samples and luminance reconstruction samples.
[0456] c. In one example, the above method can be applied to the chroma filtering process, for example, training a CNN filter to enhance the quality of the chroma reconstruction samples.
[0457] ii. Chromaticity information can be used as input for the luminance CNN filtering process.
[0458] a. In one example, chromaticity reconstructed samples before filtering by NDLF or chromaticity CNN filters can be utilized.
[0459] i. Alternatively, chromaticity reconstructed samples filtered by NDLF or chromaticity CNN filters can be used.
[0460] b. In one example, the input to the CNN contains both chroma reconstruction samples and luminance reconstruction samples.
[0461] c. In one example, the above method can be applied to the luminance filtering process, for example, training a CNN filter to enhance the quality of luminance reconstruction samples.
[0462] iii. A chromaticity component (e.g., Cb) information can be used as input to the CNN filtering process for a color chromaticity component (e.g., Cr).
[0463] c. In one example, the input includes reconstructed samples and decoding information (e.g., pattern information and prediction information).
[0464] i. In one example, the mode information is a binary frame, where each value indicates whether the sample belongs to a unit that skips encoding / decoding.
[0465] ii. In one example, the prediction information is derived via motion compensation of the codec unit used for inter-frame encoding and decoding.
[0466] iii. In one example, the above method can be applied to inter-frame strips / images (e.g., B / P strips), for example, training CNN filters to enhance the quality of reconstructed samples in B strips.
[0467] d. In one example, the input includes the predicted sample points of the current sample point, for example, via intra-frame or inter-frame prediction.
[0468] e. In one example, the input includes samples that are not adjacent to the current sample, such as results from block vector or motion vector or template matching.
[0469] f. In one example, the input includes information derived from reconstructed samples located in different video units (e.g., strips / pictures).
[0470] i. In one example, the reconstructed samples are only from a reference image of the current strip / image, which includes the samples to be filtered by the CNN filtering method.
[0471] ii. In one example, the reconstructed samples are those after applying a CNN or NDFL filtering method.
[0472] iii. In one example, the reconstructed samples are those before the application of the CNN or NDFL filtering method.
[0473] g. In one example, the input includes information derived from reconstructed samples located in the same video unit (e.g., strip / picture).
[0474] i. In one example, the reconstructed samples are those samples that are applied after the CNN is applied or before the CNN filtering method is applied.
[0475] 14. In a CNN filter, the location of the input sample used to obtain the output of the first sample can be restricted to a range determined by the location of the first sample.
[0476] a. In one example, a virtual boundary can be defined for the first sample. Samples above (or below), to the left, or to the right of the virtual boundary cannot be used in the CNN filter to obtain the output of the first sample.
[0477] 15. The proposed CNN filter comprises multiple convolutional layers. To reduce complexity and increase the receptive field, convolutional layers with a stride K (e.g., K = 2) greater than 1 are used in the proposed network.
[0478] a. In one example, the proposed CNN includes a convolutional layer with a stride K (e.g., K = 2) greater than 1 at the beginning to increase the receptive field.
[0479] b. Alternatively, the step size can be set differently for the horizontal and vertical directions.
[0480] i. In one example, if the width of the video unit (image / strip) to be filtered is larger than the vertical width, the horizontal step size can be set to a larger value.
[0481] c. When the step size is changed to (2, 2), the effect is that during feature map creation, for each horizontal movement of the filter, the filter moves two pixels to the right, and for each vertical movement, the filter moves two pixels down. Therefore, the resolution of the output feature map is reduced to half that of the input in both the horizontal and vertical directions.
[0482] d. In one example, the proposed CNN filter can be adopted Figures 12A-12B The architecture is shown. To increase the receptive field and reduce complexity, the proposed CNN includes a convolutional layer with a stride of 2 at the beginning. After passing through this layer, the spatial resolution of the feature map is reduced to half that of the input in both the horizontal and vertical directions. Then, the output feature map from the first convolutional layer passes through several sequentially stacked residual blocks. The last convolutional layer takes the feature map from the last residual block as input and produces 4 N×N feature maps. Finally, a shuffle layer is used to generate a filtered image with the same spatial resolution as the input to the CNN (i.e., 2N×2N).
[0483] i. In one example, the number of feature maps, i.e. Figure 12A-12B M is set to 128.
[0484] ii. In one example, such as Figure 12A-12B As shown, the number of sequentially stacked residual blocks is set to 16.
[0485] iii. In one example, such as Figure 12B As shown, Figure 12A The residual block in the model consists of three sequentially connected components: a convolutional layer, a PReLU activation function, and another convolutional layer. The input to the first convolutional layer is added to the output of the second convolutional layer.
[0486] 5. Examples
[0487] This contribution presents an in-loop filter based on a convolutional neural network (CNN) to improve the quality of reconstructed frames. The proposed CNN architecture features convolutional layers with a stride of 2 and several residual blocks to increase the effective receptive field and achieve smooth optimization. To avoid filtering artifacts, the proposed CNN-based in-loop filter is applied only to the I-strip and the B-strip where the temporal layer id equals 0. Compared to VTM-9.0, the proposed method achieves average BD-rate reductions of 7.45%, 12.24%, and 10.67% for Y, Cb, and Cr, respectively, under the AI configuration, and average BD-rate reductions of x%, x%, and x% for Y, Cb, and Cr, respectively, under the RA configuration.
[0488] introduce
[0489] In this contribution, convolutional neural networks are trained as in-loop filters to reduce distortion generated during compression. To increase the receptive field and reduce complexity, the proposed CNN contains convolutional layers with a stride of 2 at the beginning. To alleviate the training difficulty of deep networks, residual blocks are used as basic modules and stacked multiple times to build the final network. Different networks are trained for I-strips and B-strips. In addition, different networks are considered for luma and chroma. To evaluate performance, the proposed CNN-based in-loop filters are tested on VTM-9.0[1] in both intra-frame and random access configurations. The proposed CNN-based in-loop filters are exclusively used for I-strips and B-strips with temporal layer id equal to 0, which means that the original in-loop filters in VTM, including DB, SAO, ALF and CC-ALF, are turned off on I-strips and B-strips with temporal layer id equal to 0.
[0490] The proposed method
[0491] Network architecture
[0492] The backbone of the proposed CNN filter is as follows: Figure 19 As shown. To increase the receptive field and reduce complexity, the proposed CNN includes a convolutional layer with a stride of 2 at the beginning. After this layer, the spatial resolution of the feature map is reduced to half that of the input in both the horizontal and vertical directions. Then, the output feature map from the first convolutional layer passes through several sequentially stacked residual blocks. The last convolutional layer takes the feature map from the last residual block as input and produces 4 N×N feature maps. Finally, a shuffling layer is used to generate a filtered image with the same spatial resolution as the CNN input (i.e., 2N×2N). Other details related to the network architecture are shown below:
[0493] 1. A 3×3 kernel size is used for all convolutional layers. The number of feature maps is set to 128 for the inner convolutional layers. PReLU is used as the activation function.
[0494] 2. Train separate models for the luminance and chrominance components.
[0495] 3. Train different model groups for the I-band and B-band respectively.
[0496] 4. When training the CNN filter for the chroma component, the luminance reconstruction samples are also used as input.
[0497] 5. When training CNN filters for I-strips, prediction and segmentation information are also fed into the network.
[0498] Figure 19 (a) illustrates the architecture of the proposed CNN filter, where M represents the number of feature maps. N represents the number of samples in one dimension, and Figure 19 (b) shows Figure 19 Construction of the residual block in (a).
[0499] infer
[0500] LibTorch is used to perform inference of the proposed CNN filters in VTM. Currently, the proposed CNN filters are only applied to the I-strip and the B-strip where the temporal layer id equals 0. As suggested in the preprint arXiv arXiv:1703.00395 (2017) by Lucas Theis, Wenzhe Shi, Andrew Cunningham, and Ferenchusza Huszár. 2017. Lossy Image Compression Using Compression Autoencoders. arXiv:1703.00395 (2017), the network information during the inference stage is provided in the table below.
[0501] Table 6. Network information used for testing NN-based video codec tools during the inference phase
[0502]
[0503] train
[0504] PyTorch was used as the training platform. CNN filters for I-strip and B-strip models were trained using the DIV2K dataset (see Jiahao Li, Bin Li, Jizheng Xu, Ruiqin Xiong, and Wen Gao. 2018. Intra-frame prediction based on fully connected networks for image encoding and decoding. IEEE Image Processing Transactions 27, 7(2018), 3236-3247) and the BVI-DVC dataset (see Yuanying Dai, Dong Liu, and Feng Wu. 2017. Convolutional neural network methods for post-processing in HEVC intra-frame encoding and decoding. InMMM. Springer, 28-39). Different CNN models were trained to adapt to different QP points. As suggested in LucasTheis, Wenzhe Shi, Andrew Cunningham and Ferenchusza Huszár. Lossy image compression using a compression autoencoder. arXiv preprint arXiv:1703.00395 (2017), the following table provides network information during the training phase.
[0505] Table 7. Network information used for testing NN-based video encoding / decoding tools during the training phase.
[0506]
[0507]
[0508] Experimental results
[0509] The proposed CNN filter was tested on VTM-9.0 based on the common test conditions defined in Rui Song, Dong Liu, Houqiang Li and Feng Wu. 2017. HEVC. In VCI. IEEE, 1-4. Tables 9 and 9 show the test results.
[0510] From Table 8, we can see that, under the RA configuration, the proposed CNN-based in-loop filter can reduce the average BD rate by xx%, xx%, and xx% for Y, Cb, and Cr, respectively.
[0511] As shown in Table 9, under the AI configuration, the proposed CNN-based in-loop filter can bring average BD rate reductions of 7.45%, 12.24%, and 10.67% for Y, Cb, and Cr, respectively.
[0512] Table 8. Performance of the proposed in-loop CNN filter based on VTM 9.0 in RA configuration.
[0513]
[0514]
[0515] Table 9. Performance of the proposed in-loop CNN filter based on VTM 9.0 under AI configuration
[0516]
[0517] in conclusion
[0518] This contribution presents a CNN-based model for in-loop filtering. The proposed CNN-based filters are used to replace the original in-loop filters in VTM, including DB, SAO, ALF, and CC-ALF, and the encoding / decoding gains are shown. Further research on CNN-based in-loop filters is recommended in the Ad-Hoc group.
[0519] Figure 13This is a block diagram illustrating an example video processing system 1900, in which various techniques disclosed herein can be implemented. Various implementations may include some or all of the components of system 1900. System 1900 may include an input 1902 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8 or 10-bit multi-component pixel values, or it may be in a compressed or encoded format. Input 1902 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet and Passive Optical Network (PON), and wireless interfaces such as Wi-Fi and cellular interfaces.
[0520] System 1900 may include codec component 1904, which can implement the various codec or encoding methods described in this document. Codec component 1904 can reduce the average bit rate of the video from input 1902 to the output of codec component 1904 to produce a codec representation of the video. Therefore, codec techniques are sometimes referred to as video compression or video transcoding techniques. The output of codec component 1904 may be stored or transmitted via connected communication (as represented by component 1906). Component 1908 can use the stored or communicated bitstream (or codec) representation of the video received at input 1902 to generate pixel values or displayable video that is sent to display interface 1910. The process of generating user-visible video from a bitstream representation is sometimes referred to as video decompression. Furthermore, although some video processing operations are referred to as “codec” operations or tools, it should be understood that codec tools or operations are used at the encoder, and the corresponding decoding tools or operations that inversely represent the codec results will be performed by the decoder.
[0521] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), or DisplayPort. Examples of storage interfaces include SATA (Serial Advanced Technology Accessory), PCI, IDE, etc. The technologies described in this document can be embodied in a variety of electronic devices, such as mobile phones, laptops, smartphones, or other devices capable of performing digital data processing and / or video display.
[0522] Figure 14This is a block diagram of a video processing apparatus 3600. Apparatus 3600 can be used to implement one or more methods described herein. Apparatus 3600 can be embodied in smartphones, tablets, computers, Internet of Things (IoT) receivers, etc. Apparatus 3600 may include one or more processors 3602, one or more memories 3604, and video processing hardware 3606. The processors 3602 can be configured to implement one or more methods described herein. The memories 3604 can be used to store data and code for implementing the methods and techniques described herein. The video processing hardware 3606 can be used to implement some of the techniques described herein in hardware circuitry.
[0523] Figure 16 This is a block diagram illustrating an example video codec system 100 that can utilize the techniques disclosed herein.
[0524] like Figure 16 As shown, the video encoding / decoding system 100 may include a source device 110 and a destination device 120. The source device 110 generates encoded video data and may be referred to as a video encoding device. The destination device 120 can decode the encoded video data generated by the source device 110 and may be referred to as a video decoding device.
[0525] The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.
[0526] Video source 112 may include sources such as video capture devices, interfaces for receiving video data from video content providers, and / or computer graphics systems for generating video data, or combinations of these sources. Video data may include one or more pictures. Video encoder 114 encodes the video data from video source 112 to generate a bitstream. The bitstream may include a sequence of bits forming an encoded representation of the video data. The bitstream may include encoded pictures and associated data. The encoded pictures are encoded representations of the pictures. Associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. I / O 116 may include a modulator / demodulator (modem) and / or a transmitter. Encoded video data may be transmitted directly to destination device 120 via network 130a through I / O interface 116. Encoded video data may also be stored on storage medium / server 130b for access by destination device 120.
[0527] Destination device 120 may include I / O interface 126, video decoder 124 and display device 122.
[0528] I / O interface 126 may include a receiver and / or a modem. I / O interface 126 may acquire encoded video data from source device 110 or storage medium / server 130b. Video decoder 124 may decode the encoded video data. Display device 122 may display the decoded video data to a user. Display device 122 may be integrated with destination device 120, or may be external to destination device 120 configured to interface with an external display device.
[0529] The video encoder 114 and the video decoder 124 can operate according to video compression standards, such as the High Efficiency Video Codec (HEVC) standard, the Multi-Functional Video Codec (VVC) standard, and other current and / or further standards.
[0530] Figure 17 This is a block diagram illustrating an example of a video encoder 200, which can be... Figure 16 The video encoder 114 in the system 100 shown.
[0531] The video encoder 200 can be configured to perform any or all of the technologies disclosed herein. Figure 17 In the example, the video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared among the various components of the video encoder 200. In some examples, the processor can be configured to perform any or all of the techniques described in this disclosure.
[0532] The functional components of the video encoder 200 may include a segmentation unit 201, a prediction unit 202, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy coding unit 214. The prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205, and an intra-frame prediction unit 206.
[0533] In other examples, the video encoder 200 may include more, fewer, or different functional components. In one example, the prediction unit 202 may include an intra-block copy (IBC) unit. The IBC unit can perform prediction in IBC mode, where at least one reference picture is the picture containing the current video block.
[0534] Furthermore, some components, such as the motion estimation unit 204 and the motion compensation unit 205, can be highly integrated, but for interpretive purposes, in Figure 17 The example is shown separately.
[0535] The segmentation unit 201 can segment an image into one or more video blocks. The video encoder 200 and the video decoder 300 can support various video block sizes.
[0536] The mode selection unit 203 can select one of the encoding / decoding modes (intra-frame or inter-frame) based, for example, on the error result, and provide the resulting intra-frame or inter-frame encoded / decoded block to the residual generation unit 207 to generate residual block data, and provide it to the reconstruction unit 212 to reconstruct the encoded block for use as a reference picture. In some examples, the mode selection unit 203 can select a combined intra-frame and inter-frame prediction (CIIP) mode, where the prediction is based on the inter-frame prediction signal and the intra-frame prediction signal. In the case of inter-frame prediction, the mode selection unit 203 can also select the resolution of the motion vector for the block (e.g., sub-pixel or integer pixel precision).
[0537] To perform inter-frame prediction on the current video block, motion estimation unit 204 can generate motion information for the current video block by comparing one or more reference frames from buffer 213 with the current video block. Motion compensation unit 205 can determine the predicted video block for the current video block based on motion information from images from buffer 213 other than the images associated with the current video block, and decoded samples.
[0538] The motion estimation unit 204 and the motion compensation unit 205 can perform different operations on the current video block, for example, depending on whether the current video block is in an I-band, P-band, or B-band.
[0539] In some examples, motion estimation unit 204 can perform unidirectional prediction on the current video block, and can search for a reference video block for the current video block in the reference images of list 0 or list 1. Then, motion estimation unit 204 can generate a reference index indicating the reference image containing the reference video block in list 0 or list 1, and a motion vector indicating the spatial displacement between the current video block and the reference video block. Motion estimation unit 204 can output the reference index, prediction direction indicator, and motion vector as motion information for the current video block. Motion compensation unit 205 can generate a predicted video block for the current block based on the reference video block indicated by the motion information of the current video block.
[0540] In other examples, motion estimation unit 204 can perform bidirectional prediction on the current video block. Motion estimation unit 204 can search for a reference video block for the current video block in the reference images in list 0, and can also search for another reference video block for the current video block in the reference images in list 1. Motion estimation unit 204 can then generate reference indices indicating the reference images containing the reference video blocks in lists 0 and 1, and motion vectors indicating the spatial displacement between the reference video blocks and the current video block. Motion estimation unit 204 can output the reference index and motion vector of the current video block as the motion information of the current video block. Motion compensation unit 205 can generate a predicted video block for the current video block based on the reference video blocks indicated by the motion information of the current video block.
[0541] In some examples, the motion estimation unit 204 can output a complete set of motion information for use in the decoder's decoding process.
[0542] In some examples, motion estimation unit 204 may not output the complete set of motion information for the current video. Instead, motion estimation unit 204 may signal the motion information of the current video block by referencing the motion information of another video block. For example, motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of neighboring video blocks.
[0543] In one example, the motion estimation unit 204 may indicate a value in the syntax structure associated with the current video block that indicates to the video decoder 300 that the current video block has the same motion information as another video block.
[0544] In another example, motion estimation unit 204 can identify another video block and motion vector difference (MVD) within the syntax structure associated with the current video block. The motion vector difference indicates the difference between the motion vector of the current video block and the motion vector of the indicated video block. Video decoder 300 can use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.
[0545] As described above, the video encoder 200 can predictively signal motion vectors. Two examples of predictive signaling techniques that can be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and merge mode signaling.
[0546] Intra-prediction unit 206 can perform intra-prediction on the current video block. When intra-prediction unit 206 performs intra-prediction on the current video block, it can generate prediction data for the current video block based on decoded samples from other video blocks in the same frame. The prediction data for the current video block can include the predicted video block and various syntax elements.
[0547] The residual generation unit 207 can generate residual data for the current video block by subtracting (e.g., indicated by a minus sign) one or more predicted video blocks from the current video block. The residual data for the current video block can include residual video blocks corresponding to different sample components of the samples in the current video block.
[0548] In other examples, such as in skip mode, there may be no residual data for the current video block, and the residual generation unit 207 may not perform the subtraction operation.
[0549] The transform processing unit 208 can generate one or more transform coefficient video blocks of the current video block by applying one or more transforms to the residual video block associated with the current video block.
[0550] After the transform processing unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 can quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.
[0551] Inverse quantization unit 210 and inverse transform unit 211 can apply inverse quantization and inverse transform to the transform coefficient video block, respectively, to reconstruct the residual video block from the transform coefficient video block. Reconstruction unit 212 can add the reconstructed residual video block to the corresponding samples of one or more predicted video blocks generated by prediction unit 202 to generate a reconstructed video block associated with the current block, which is then stored in buffer 213.
[0552] After the video block is reconstructed by reconstruction unit 212, a loop filtering operation can be performed to reduce video block artifacts in the video block.
[0553] Entropy encoding unit 214 can receive data from other functional components of video encoder 200. When entropy encoding unit 214 receives data, it can perform one or more entropy encoding operations to generate entropy-encoded data and output a bitstream including the entropy-encoded data.
[0554] Figure 18 This is a block diagram illustrating an example of a video decoder 300, which can be... Figure 16 The video decoder 114 in the system 100 shown.
[0555] The video decoder 300 can be configured to perform any or all of the technologies disclosed herein. Figure 18In the example, the video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared among the various components of the video decoder 300. In some examples, the processor can be configured to perform any or all of the techniques described in this disclosure.
[0556] exist Figure 18 In the example, the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra-frame prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306, and a buffer 307. In some examples, the video decoder 300 can perform functions typically associated with the video encoder 200. Figure 17 The encoding process described is the opposite of the decoding process.
[0557] The entropy decoding unit 301 can retrieve the encoded bitstream. The encoded bitstream may include entropy-coded video data (e.g., encoded video data blocks). The entropy decoding unit 301 can decode the entropy-coded video data, and based on the entropy-coded video data, the motion compensation unit 302 can determine motion information including motion vectors, motion vector precision, reference image list index, and other motion information. The motion compensation unit 302 can determine such information, for example, by performing AMVP and merging modes.
[0558] The motion compensation unit 302 can generate motion compensation blocks, possibly performing interpolation based on an interpolation filter. The syntax elements can include identifiers of the interpolation filters to be used with sub-pixel precision.
[0559] The motion compensation unit 302 can use an interpolation filter, such as that used by the video encoder 200 during the encoding of a video block, to calculate the interpolated values of sub-integer pixels of the reference block. The motion compensation unit 302 can determine the interpolation filter used by the video encoder 200 based on the received syntax information, and use the interpolation filter to generate predictive blocks.
[0560] Motion compensation unit 302 may use some of the syntax information to determine the size of the blocks used to encode one or more frames and / or one or more stripes of the encoded video sequence, segmentation information describing how each macroblock of the picture of the encoded video sequence is segmented, a pattern indicating how each segment is encoded, one or more reference frames (and a list of reference frames) for each inter-frame encoded block, and other information for decoding the encoded video sequence.
[0561] Intra-prediction unit 303 can use, for example, an intra-prediction mode received in the bitstream to form prediction blocks from spatially adjacent blocks. Inverse quantization unit 30 performs inverse quantization, i.e., dequantization, on the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. Inverse transform unit 303 applies an inverse transform.
[0562] The reconstruction unit 306 can add the residual block to the corresponding prediction block generated by the motion compensation unit 202 or the intra-frame prediction unit 303 to form the decoded block. If necessary, a deblocking filter can also be applied to filter the decoded block to remove block artifacts. The decoded video block is then stored in a buffer 307, which provides a reference block for subsequent motion compensation / intra-frame prediction and also generates the decoded video for presentation on the display device.
[0563] The following is a list of preferred solutions for some embodiments.
[0564] The first set of solutions is provided below. The following solutions illustrate example embodiments of the techniques discussed in previous sections (e.g., items 1-3).
[0565] 1. A digital media processing method (e.g., Figure 15 The method described in (1500) includes: performing (1502) a conversion between a video and a video codec representation comprising multiple video blocks, wherein the conversion includes selectively applying convolutional neural network (CNN) filters to some of the video blocks based on rules; wherein the rules define whether and how the CNN filters are applied together with filters having a non-deep learning filter (NDLF) filter type during the conversion.
[0566] 2. As in Solution 1, where the rule specifies that NDLF type filters are not allowed when a CNN filter is applied to a given edge.
[0567] 3. As in Solution 1, where encoding and decoding represent identifying which NDLF type filters are allowed or not allowed to be applied with CNN filters.
[0568] 4. The method of any one of solutions 1-3, wherein rules are specified on the basis of video regions, wherein the video regions include stripes, codec tree units (CTUs), codec tree blocks (CTBs) or CTU / CTB lines, stripes, slices, sub-pictures, pictures or sequences.
[0569] 5. The method of Solution 1, wherein the rule specifies that when a CNN filter is applied to a video block, a first filter of type NDLF is enabled for that video block, and wherein the rule also specifies the order in which the CNN filter and the first filter are applied.
[0570] The following solutions illustrate example embodiments of the techniques discussed in previous sections (e.g., items 3-8).
[0571] 6. A video processing method, comprising: determining the applicability of a convolutional neural network (CNN) filter to the current video block based on encoding and decoding conditions of a current video block according to rules; and performing a conversion between video and video encoding and decoding representations based on the determination.
[0572] 7. As in Solution 6, where the rule specifies that the CNN filter is applicable to the current video block, which belongs to the type of strip, or the type of picture, or the identifier of the temporal layer, or a condition regarding the list of reference pictures.
[0573] 8. As in solutions 6-7, where the rules further specify how to apply CNN filters based on the format to which the video profile or codec representation is configured.
[0574] 9. The method of any of solutions 6-8, wherein rules are specified on a basis for each color component.
[0575] 10. The method of any of solutions 6-9, wherein the rules are indicated in the supplementary enhancement information field of the encoding / decoding representation.
[0576] The following solutions illustrate example embodiments of the techniques discussed in previous sections (e.g., items 9-10).
[0577] 11. A video processing method comprising: performing a conversion between a video and a video codec representation, wherein the codec representation conforms to a format rule; wherein the format rule specifies that a syntax field includes information about one or more filter models of a convolutional neural network filter applicable to the conversion.
[0578] 12. As in Solution 11, where the formatting rules also specify that the syntax fields are specific to the color components.
[0579] The following solutions illustrate example embodiments of the techniques discussed in previous sections (e.g., items 11-13).
[0580] 13. A video processing method, comprising: for a conversion between a current video block and a codec representation of the video, operating a convolutional neural filter on the current video block using input information; and performing the conversion based on the operation.
[0581] 14. The method of solution 13, wherein the input information includes decoding information of the current video block.
[0582] 15. The method of any of solutions 13-14, wherein the input information includes the color components of the current video block or color information different from the color components of the current video block.
[0583] 16. The method of Solution 13, wherein the input information includes the reconstructed sample information of the current video block.
[0584] 17. The method of any of solutions 13-16, wherein the input information includes the predicted samples of the current video block.
[0585] 18. The method of any of the above solutions, wherein the NDLF type includes a deblocking filter, a sample adaptive offset filter, an adaptive loop filter, or a cross-component adaptive loop filter.
[0586] 19. The method of any of the above solutions, wherein the CNN includes a loop filter.
[0587] 20. The method of any one of solutions 1-19, wherein the conversion includes generating a codec representation of the video.
[0588] 21. The method of any one of solutions 1-19, wherein the conversion includes generating video by decoding the codec representation.
[0589] 22. A video decoding apparatus, comprising a processor configured to implement one or more of the methods described in solutions 1 to 21.
[0590] 23. A video encoding apparatus, comprising a processor configured to implement one or more of the methods described in solutions 1 to 21.
[0591] 24. A computer program product having computer code stored thereon, which, when executed by a processor, causes the processor to implement the method described in any one of solutions 1 to 21.
[0592] 25. A computer-readable medium on which a bitstream representation conforms to a file format generated according to any one of solutions 1 to 21.
[0593] 26. The methods, apparatus or systems described in this document.
[0594] The second set of solutions provides example embodiments of the techniques discussed in previous sections (e.g., items 5.c.iii, 6, 12.e).
[0595] 1. A method for processing visual media data (e.g., such as...) Figure 20 The method shown (2010) includes: for the conversion between visual media data and the bitstream of visual media data, determining, according to rules, how to apply one or more convolutional neural network filters to at least some samples of video units of the visual media data; and performing the conversion based on the determination.
[0596] 2. As in Solution 1, where a convolutional neural network is used to implement the convolutional neural network filter.
[0597] 3. The method of Solution 1, wherein the rule specifies that the determination is based on decoding information associated with the video unit, wherein the decoding information includes at least one of prediction mode, transform type, skip flag, or codec block flag (CBF) value.
[0598] 4. The method of Solution 1, wherein the rule specifies information associated with one or more convolutional neural network filters with granularity smaller than that of a video unit.
[0599] 5. As in Solution 4, where the video unit is a strip, picture, slice, sub-picture, codec tree block, or codec tree unit.
[0600] 6. The method of Solution 4, wherein the information is controlled at the sample point or pixel level.
[0601] 7. As in Solution 4, wherein the information is controlled at the row, column, or line level.
[0602] 8. As in Solution 4, where the rule specifies that the set of convolutional neural network filters is determined based on the values or positions of samples within video units of visual media data.
[0603] 9. The method of Solution 1, wherein the rule specifies that the selection of the set of convolutional neural network filters depends on the temporal layer identifier of the video unit and / or the group of pictures (GOP) size of the video unit.
[0604] 10. The method of Solution 1, wherein the temporal layer identifier is classified into more than one category, and a given set of convolutional neural network filters is applied to the corresponding category.
[0605] 11. The method of Solution 10, wherein the classification of temporal layer identifiers is based on GOP size.
[0606] 12. The method of Solution 11, wherein the rule specifies a set of convolutional neural network filters for video units with different temporal layers.
[0607] 13. The method of any one of solutions 1 to 12, wherein the conversion includes generating a bitstream from visual media data.
[0608] 14. The method of any one of solutions 1 to 12, wherein the conversion includes generating visual media data from the bitstream.
[0609] 15. An apparatus for processing visual media data, comprising a processor and a non-transitory memory having instructions thereon, wherein, when the instructions are executed by the processor, the processor: determines, according to rules, how to apply one or more convolutional neural network filters to at least some samples of video units of the visual media data for a conversion between the visual media data and a bitstream of the visual media data; and performs the conversion based on the determination.
[0610] 16. The apparatus of solution 15, wherein the rule specifies that the determination is based on decoding information associated with the video unit, wherein the decoding information includes at least one of prediction mode, transform type, skip flag, or codec block flag (CBF) value.
[0611] 17. The apparatus of solution 15, wherein the rule specifies control of information associated with one or more convolutional neural network filters at a granularity smaller than that of a video unit.
[0612] 18. A non-transitory computer-readable storage medium storing instructions that cause a processor to: determine, according to rules, how to apply one or more convolutional neural network filters to at least some samples of video units of the visual media data for a conversion between visual media data and a bitstream of the visual media data; and perform the conversion based on the determination.
[0613] 19. A non-transitory computer-readable storage medium such as Solution 18, wherein the rule specifies that the determination is based on decoding information associated with the video unit, wherein the decoding information includes at least one of prediction mode, transform type, skip flag, or codec block flag (CBF) value.
[0614] 20. A non-transitory computer-readable storage medium, such as Solution 18, wherein the rule specifies control over information associated with one or more convolutional neural network filters at a granularity smaller than that of a video unit.
[0615] 21. A video processing apparatus comprising a method configured to implement any one or more of the methods described in solutions 1 to 14.
[0616] 22. A method for storing a bitstream of visual media data, comprising the method described in any one of solutions 1 to 14, and further comprising storing the bitstream to a non-transitory computer-readable recording medium.
[0617] 23. A computer-readable medium storing program code that, when executed, causes a processor to implement the methods described in any one or more of solutions 1 to 14.
[0618] 24. A computer-readable medium for storing a bit stream generated according to any of the above methods.
[0619] 25. A video processing apparatus for storing bit streams, wherein the video processing apparatus is configured to implement the methods described in any one or more of solutions 1 to 14.
[0620] 26. A computer-readable medium on which a bitstream representation conforms to a file format generated according to any one of solutions 1 to 14.
[0621] In this document, the term "media or video processing" can refer to media encoding, media decoding, media compression, or media decompression. The terms media and visual media data can refer to video, audio, or images. For example, a video compression algorithm can be applied during the conversion from a pixel representation of a video to a corresponding bitstream representation, and vice versa. As defined by the syntax, for example, the bitstream representation of the current video block can correspond to bits that are co-located or scattered at different locations within the bitstream. For example, macroblocks can be encoded based on the error residuals of the transformation and encoding / decoding, and can also use bits in the header and other fields in the bitstream. Furthermore, as described in the solutions above, during the conversion, the decoder can parse the bitstream based on this determination, knowing that some fields may or may not be present. Similarly, the encoder can determine whether to include certain syntax fields and generate the codec representation accordingly by including or excluding those syntax fields from the codec representation.
[0622] The disclosed and other solutions, examples, embodiments, modules, and functional operations described in this document can be implemented in digital electronic circuit systems, or in computer software, firmware, or hardware, including the structures disclosed in this document and their structural equivalents, or in combinations thereof. 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 control of the operation of a data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of substances influencing machine-readable propagation signals, or a combination thereof. The term "data processing apparatus" encompasses all means, devices, and machines for processing data, including, as examples, a programmable processor, a computer, or multiple processors or computers. In addition to hardware, the apparatus may include code that creates an execution environment for the computer program in question, for example, code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination thereof. Propagation signals are artificially generated signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information for transmission to a suitable receiver device.
[0623] A computer program (also known as a program, software, software application, script, or code) can be written in any programming language, including compiled or interpreted languages, and can be deployed in any form, including as a standalone 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 as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language file), in a single file dedicated to the program in question, or in multiple co-located files (e.g., a file storing one or more modules, subroutines, or portions of code). A computer program can be deployed to execute on a single computer, or on multiple computers located at a single site or distributed across multiple sites and interconnected by a communication network.
[0624] The processes and logic flows described in this document can be executed by one or more programmable processors, which execute one or more computer programs to perform functions by manipulating input data and generating outputs. These processes and logic flows can also be executed by special-purpose logic circuits, and the devices can be implemented as special-purpose logic circuits, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits).
[0625] For example, processors suitable for executing computer programs include both general-purpose and special-purpose microprocessors, as well as any one or more processors in any type of digital computer. Typically, the processor receives instructions and data from read-only memory or random access memory, or both. The basic components of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include, or be operatively coupled to, one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, to receive data from or transfer data to, or both. However, a computer does not need to 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, as examples, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD-ROMs and DVD-ROMs. The processor and memory may be complemented or integrated therein by dedicated logic circuitry.
[0626] Although this patent document contains numerous details, these details should not be construed as limiting any subject matter or the scope of the claims, but rather as descriptions of features that may be specific to particular embodiments of a particular technology. Certain features described in the context of individual embodiments in this patent document may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually in multiple embodiments or in any suitable sub-combination. Furthermore, although features may be described above as functioning in certain combinations, and even initially claimed in this way, in some cases, one or more features from the claimed combination may be removed from that combination, and the claimed combination may be for sub-combinations or variations thereof.
[0627] Similarly, although operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order or sequential order shown, or requiring all of the shown operations to obtain the desired result. Furthermore, the separation of various system components in the embodiments described in this patent document should not be construed as requiring such separation in all embodiments.
[0628] Only some implementation methods and examples are described, and other implementation methods, enhancements and variations can be made based on the content described and explained in this patent document.
Claims
1. A method for processing visual media data, comprising: For the conversion between visual media data and the bitstream of the visual media data, determine according to rules how to apply one or more convolutional neural network filters to at least some samples of the video units of the visual media data; as well as The conversion is performed based on the determination. The rule specifies that the selection of the convolutional neural network filter set depends on the temporal layer identifier of the video unit and / or the group of pictures (GOP) size corresponding to the video unit. The temporal layer identifier is classified into more than one category, and a given set of convolutional neural network filters is applied to the corresponding category. The classification of the temporal layer identifier is based on the GOP size.
2. The method according to claim 1, wherein, The convolutional neural network filter is implemented using a convolutional neural network.
3. The method according to claim 1, wherein, The rule also specifies that the determination is based on decoding information associated with the video unit, wherein the decoding information includes at least one of prediction mode, transform type, skip flag, or codec block flag (CBF) value.
4. The method according to claim 1, wherein, The rule also specifies that information associated with the one or more convolutional neural network filters should be controlled at a granularity smaller than that of the video unit.
5. The method according to claim 4, wherein, The video unit is a strip, image, slice, sub-image, codec tree block, or codec tree unit.
6. The method according to claim 4, wherein, The information can be controlled at the sample level or the pixel level.
7. The method according to claim 4, wherein, Control the information at the row, column, or line level.
8. The method according to claim 4, wherein, The rule specifies that the set of convolutional neural network filters is determined based on the values or positions of samples within the video units of the visual media data.
9. The method according to claim 1, wherein, The rule specifies that the set of convolutional neural network filters is used for video units with different temporal layers.
10. The method according to any one of claims 1 to 9, wherein, The conversion includes generating the bitstream from the visual media data.
11. The method according to any one of claims 1 to 9, wherein, The conversion includes generating the visual media data from the bitstream.
12. The method according to claim 1, wherein, The conversion includes generating the bitstream from the visual media data, and the method further includes: The bitstream is stored in a non-transitory computer-readable recording medium.
13. A video processing apparatus comprising a processor configured to implement the method described in any one of claims 1 to 12.
14. A computer-readable medium storing program code that, when executed, causes a processor to perform the method described in any one of claims 1 to 12.
15. A video processing apparatus for storing bitstreams, wherein, The video processing apparatus is configured to implement the method described in any one of claims 1 to 12.
Citation Information
Patent Citations
Method and apparatus of neural network based processing in video coding
EP3342164A1
Method and apparatus for filtering with multi-branch deep learning
EP3451293A1
Video encoder bit rate stabilization
US10341670B1