Deblocking filter improvement
By optimizing the method for determining the boundary strength and length of the deblocking filter in the video encoder and decoder, the problem of insufficient encoding and decoding efficiency and quality in the existing technology is solved, and more efficient video processing and bandwidth utilization are achieved.
Patent Information
- Application Number
- CN202180061270.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-07-27
- Filing Date
- 2021-07-26
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2041-07-26
AI Technical Summary
Existing video encoding and decoding technologies lack sufficient methods for determining the boundary strength and filter length of deblocking filters when processing video, resulting in poor encoding and decoding efficiency and quality, and making it difficult to meet the requirements of efficient parallel processing and MTU size matching.
By determining the boundary strength and maximum filter length of the deblocking filter for video units, the video processing method is optimized, and more refined filtering techniques are adopted, including filtering of 4×4 block boundaries and position-dependent cropping, to adapt to different block sizes and shapes, thereby achieving more efficient video encoding and decoding.
It improves the efficiency of video encoding and decoding, reduces encoding and decoding overhead, supports more efficient parallel processing and MTU size matching, and enhances video quality and bandwidth utilization.
Smart Images

Figure CN116250239B_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] Pursuant to the applicable Patent Act and / or the Paris Convention, this application promptly claims priority and benefit to U.S. Provisional Patent Application No. 63 / 057291, filed July 27, 2020. For all legal purposes, the entire disclosure of the aforementioned application is incorporated herein by reference as a part of this application disclosure. Technical Field
[0003] This patent document relates to image and video encoding and decoding. Background Technology
[0004] Digital video consumes the largest share of bandwidth in 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 video encoders and decoders for processing encoded and decoded representations of video or images.
[0006] In one example aspect, a video processing method is disclosed. The method includes: for a conversion between a video and a video bitstream, determining, according to rules, the boundary strength of a deblocking filter applied to at least some samples of video units in the video; and performing the conversion based on the determination.
[0007] In another example, a video processing method is disclosed. The method includes, for a conversion between video units and a bitstream of a video, determining, according to rules, the maximum filter length of a deblocking filter used to filter at least some samples of the video units; and performing the conversion based on the determination.
[0008] In yet another example, a video encoder apparatus is disclosed. This video encoder includes a processor configured to implement the methods described above.
[0009] In yet another example, a video decoder apparatus is disclosed. This video decoder includes a processor configured to implement the methods described above.
[0010] In yet another example, a computer-readable medium on which code is stored is disclosed. This code embodies one of the methods described herein in the form of processor-executable code.
[0011] These and other features are described throughout this document. Attached Figure Description
[0012] Figure 1An example of raster scan slice partitioning of a picture is shown, where the picture is divided into 12 tiles and 3 raster scan slices.
[0013] Figure 2 An example of rectangular slice partitioning of a picture is shown, where the picture is divided into 24 tiles (6 tile columns and 4 tile rows) and 9 rectangular slices.
[0014] Figure 3 An example of a picture partitioned into tiles and rectangular slices is shown, where the picture is divided into 4 tiles (2 tile columns and 2 tile rows) and 4 rectangular slices.
[0015] Figure 4 A picture partitioned into 15 tiles, 24 slices, and 24 sub-pictures is shown.
[0016] Figure 5 is a block diagram of an example video processing system.
[0017] Figure 6 is a block diagram of a video processing apparatus.
[0018] Figure 7 is a flowchart of an example method of video processing.
[0019] Figure 8 is a block diagram illustrating a video coding system in accordance with some embodiments of the disclosure.
[0020] Figure 9 is a block diagram illustrating an encoder in accordance with some embodiments of the disclosure.
[0021] Figure 10 is a block diagram illustrating a decoder in accordance with some embodiments of the disclosure.
[0022] Figure 11 An example of an encoder block diagram is shown.
[0023] Figure 12 is an illustration of picture samples on an 8x8 grid and horizontal and vertical block boundaries, and non-overlapping 8x8 sample blocks that can be parallel deblocked.
[0024] Figure 13 Pixels involved in filter on / off decision and strong / weak filter selection are shown.
[0025] Figure 14A and 14B A flowchart of an example method of video processing based on some implementations of the disclosed technology is shown. DETAILED DESCRIPTION
[0026] Section headings are used in this document for ease of understanding and do not limit the applicability of the technology and embodiments disclosed in each section to only that section. Furthermore, the use of H.266 terminology in some descriptions is merely for ease of understanding and is not intended to limit the scope of the disclosed technology. Thus, the technology described herein is applicable to other video codec protocols and designs as well. In this document, editorial changes have been made to the text relative to the current draft of the VVC specification, where double brackets indicate cancelled text and bold italic indicates added text.
[0027] 1. INTRODUCTION
[0028] This document is related to video coding technology. Specifically, it is about deblocking filtering. It is applicable to any video coding standard or non-standard video codec that supports single-layer video coding and multi-layer video coding, such as the Versatile Video Coding (VVC) that is under development.
[0029] 2. ABBREVIATIONS
[0030] ALF Adaptive Loop Filtering
[0031] APS Adaptation Parameter Set
[0032] AU Access Unit
[0033] AUD Access Unit Delimiter
[0034] AVC Advanced Video Coding
[0035] CLVS Coded Layer Video Sequence
[0036] CPB Coded Picture Buffer
[0037] CRA Clean Random Access
[0038] CTU Coding Tree Unit
[0039] CVS Coded Video Sequence
[0040] DPB Decoded Picture Buffer
[0041] DPS Decoding Parameter Set
[0042] EOB End of Bitstream
[0043] EOS End of Sequence
[0044] GDR Gradual Decoding Refresh
[0045] HEVC High Efficiency Video Coding
[0046] IDR Instantaneous Decoding Refresh
[0047] JEM Joint Exploration Model
[0048] MCTS Motion-constrained tile set
[0049] NAL Network Abstraction Layer
[0050] OLS Output Layer Set
[0051] PH Picture Header
[0052] PPS Picture Parameter Set
[0053] PU Picture Unit
[0054] RBSP Raw Byte Sequence Payload
[0055] SAO Sample Adaptive Offset
[0056] SEI Supplemental Enhancement Information
[0057] SPS Sequence Parameter Set
[0058] VCL Video Coding Layer
[0059] VPS Video Parameter Set
[0060] VTM VVC Test Model
[0061] VUI Video Usability Information
[0062] VVC Versatile Video Coding
[0063] 3. BACKGROUND
[0064] Video coding standards have evolved mainly through the development of the well-known ITU-T and ISO / IEC standards. The ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262 / MPEG-2 Visual and H.264 / MPEG-4 Advanced Video Coding (AVC) and H.265 / HEVC standards. Since H.262, the video coding standards are based on the hybrid video coding structure, where temporal prediction plus transform coding are utilized. To explore future video coding technologies beyond HEVC, the Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by the JVET and put into the reference software named Joint Exploration Model (JEM). Meanwhile, the JVET meeting is held every quarter, and the new coding standard targets at 50% bit rate reduction compared to HEVC. The new video coding standard was officially named as Versatile Video Coding (VVC) in the April 2018 JVET meeting, and the first version of VVC test model (VTM) was released at that time. As the contribution to the VVC standardization continues, new coding techniques are adopted into the VVC standard in every JVET meeting. Then, the working draft of VVC and the test model VTM are updated after every meeting. The VVC project now strives for technical completion (FDIS) in the July 2020 meeting.
[0065] 3.1. Picture partitioning schemes in HEVC
[0066] HEVC includes four different picture partitioning schemes, namely regular slices, dependent slices, tiles, and Wavefront Parallel Processing (WPP), which can be applied for maximum transmission unit (MTU) size matching, parallel processing, and reduced end-to-end delay.
[0067] Regular slices are similar to H.264 / AVC. Each regular slice is encapsulated in its own NAL unit, and intra-picture prediction (intra-sample prediction, motion information prediction, coding mode prediction) and entropy coding dependencies across slice boundaries are disabled. Therefore, a regular slice can be reconstructed independently from other regular slices within the same picture (although there can still be inter-dependencies due to in-loop filtering operations).
[0068] Conventional slices are the only tool that can be used for parallelization, and are also available in H.264 / AVC in almost the same form. Conventional slice-based parallelization does not require much inter-processor or inter-core communication (except for inter-processor or inter-core data sharing for motion compensation when decoding a predictive coded picture, which is typically much heavier than inter-processor or inter-core data sharing due to intra-picture prediction). However, for the same reason, the use of conventional slices incurs a large coding overhead due to the bit cost of the slice header and the lack of prediction across slice boundaries. Furthermore, due to the intra-picture independence of conventional slices and the fact that each conventional slice is encapsulated in its own NAL unit, conventional slices also serve as a key mechanism for bitstream segmentation to match MTU size requirements. In many cases, the goals of parallelization and MTU size matching place conflicting requirements on the slice layout in a picture. Recognition of this situation led to the development of the parallelization tools mentioned below.
[0069] Dependent slices have short slice headers and allow segmentation of the bitstream at treeblock boundaries without breaking any intra-picture prediction. Essentially, dependent slices provide the slicing of conventional slices into multiple NAL units to provide reduced end-to-end delay by allowing a portion of a conventional slice to be sent out before the encoding of the entire conventional slice is complete.
[0070] In WPP, a picture is segmented into single-row coded treeblocks (CTBs). Entropy decoding and prediction are allowed to use data from CTBs in other segments. Parallel processing is possible by parallel decoding of CTB rows, with the start of decoding of a CTB row delayed by two CTBs to ensure that data related to CTBs above and to the right of the subject CTB are available before the subject CTB is decoded. Using this staggered start (which looks like a wavefront when represented graphically), parallelization can use as many processors / cores as there are CTB rows contained in the picture. Because intra-picture prediction between adjacent treeblock rows within a picture is permitted, the inter-processor / inter-core communication required to enable intra-picture prediction can be substantial. WPP segmentation does not result in the creation of additional NAL units compared to when it is not applied, so WPP is not a tool for MTU size matching. However, if MTU size matching is required, conventional slices can be used with WPP, with some degree of coding overhead.
[0071] Tiles define horizontal and vertical boundaries that segment a picture into tile columns and rows. Tile columns extend from the top of the picture to the bottom of the picture. Likewise, tile rows extend from the left side of the picture to the right side of the picture. The number of tiles in a picture can simply be derived by multiplying the number of tile columns by the number of tile rows.
[0072] Before decoding the top-left CTB of the next slice in the order of the slice's tile raster scan, the scan order of the CTBs is changed to be local within the slice (in the order of the slice's CTB raster scan). Similar to regular slices, slices break the intra-picture prediction dependencies as well as the entropy decoding dependencies. However, they do not need to be included in separate NAL units (same as WPP in this respect); therefore, slices cannot be used for MTU size matching. Each slice can be processed by one processor / core, and the inter-processor / core communication needed for intra-picture prediction between processing units of neighboring slices is limited to communicating the shared slice header in case one slice spans more than one tile, and loop filtering related to sharing of reconstructed samples and metadata. When more than one slice or WPP segment is included in one slice, the entry point byte offset of each slice or WPP segment other than the first one in the slice is signaled in the slice header.
[0073] For simplicity, HEVC has specified restrictions on the application of four different picture partitioning schemes. A given coded video sequence cannot include both slices and wavefronts of most profiles specified in HEVC. For each slice and tile, one or both of the following conditions must be met: 1) all coding tree blocks in the slice belong to the same tile; 2) all coding tree blocks in the tile belong to the same slice. Finally, a wavefront segment contains exactly one CTB row, and when WPP is in use, if a slice starts from within a CTB row, it must end on the same CTB row.
[0074] The latest revision to HEVC is specified in the JCT-VC output document JCTVC-AC1005, J. Boyce, A. Ramasubramonian, R. Skupin, G. J. Sullivan, A. Tourapis, Y.-K. Wang (editors), "HEVC Additional Supplemental Enhancement Information (Draft 4)," publicly released on October 24, 2017: http: / / phenix.int- evry.fr / jct / doc_end_user / documents / 29_Macau / wg11 / JCTVC-AC1005-v2.zip. With the inclusion of this revision, HEVC specifies three MCTS-related SEI messages, namely the temporal MCTS SEI message, the MCTS extraction information set SEI message, and the MCTS extraction information nesting SEI message.
[0075] Temporal MCTS SEI messages indicate the presence of MCTSs in the bitstream and signal the MCTSs. For each MCTS, the motion vectors are restricted to full-sample positions pointing inside the MCTS and fractional-sample positions inside the MCTS that are only needed for interpolation, and the use of motion vector candidates for temporal motion vector prediction derived from blocks outside the MCTS is not allowed. This way, each MCTS can be decoded independently without the need for the presence of slices not included in the MCTS.
[0076] The MCTS extraction information set SEI message provides supplemental information (specified as part of the semantics of SEI messages) that can be used in the MCTS sub-bitstream extraction to generate conforming bitstreams for the MCTS set. This information consists of a number of extraction information sets, each defining a number of MCTS sets and containing the RBSP bytes of replacement VPSs, SPSs, and PPSs to be used during the MCTS sub-bitstream extraction process. When extracting a sub-bitstream according to the MCTS sub-bitstream extraction process, the parameter sets (VPSs, SPSs, and PPSs) need to be rewritten or replaced, and the slice headers need to be slightly updated as one or all of the slice address related syntax elements (including first_slice_segment_in_pic_flag and slice_segment_address) generally need to have different values.
[0077] 3.2. Picture partitioning in VVC
[0078] In VVC, a picture is divided into one or more tile rows and one or more tile columns. A tile is a sequence of CTUs that covers a rectangular region of a picture. The CTUs in a tile are scanned in the tile in the raster scan order.
[0079] A slice consists of an integer number of complete tiles or an integer number of consecutive complete CTU rows within a tile of a picture.
[0080] Two slice modes are supported, namely the raster-scan slice mode and the rectangular slice mode. In the raster-scan slice mode, a slice contains a complete sequence of tiles in the raster scan of a picture. In the rectangular slice mode, a slice contains a number of complete tiles that together form a rectangular region of a picture, or a number of consecutive complete CTU rows of one tile that together form a rectangular region of a picture. The tiles within a rectangular slice are scanned in the tile raster scan order within the rectangular region corresponding to the slice.
[0081] A subpicture contains one or more slices that together cover a rectangular region of a picture.
[0082] Figure 1 An example of a raster-scan slice partitioning of a picture is shown, where the picture is divided into 12 tiles and 3 raster-scan slices.
[0083] Figure 2 An example of rectangular slice partitioning of a picture is shown, where the picture is divided into 24 tiles (6 tile columns and 4 tile rows) and 9 rectangular slices.
[0084] Figure 3 An example of a picture partitioned into tiles and rectangular slices is shown, where the picture is divided into 4 tiles (2 tile columns and 2 tile rows) and 4 rectangular slices.
[0085] Figure 4 An example of subpicture partitioning of a picture is shown, where the picture is partitioned into 18 tiles, each of the 12 on the left covering one 4x4 CTU slice and each of the 6 tiles on the right covering 2 2x2 CTU vertically stacked slices, resulting in 24 slices of different dimensions and 24 subpictures (one per slice) in total.
[0086] 3.3. Signaling of subpictures, slices and tiles in VVC
[0087] In the latest VVC draft text, the information of subpictures includes the subpicture layout (i.e., the number of subpictures per picture and the position and size of each picture) and other sequence-level subpicture information, which are signaled in the SPS. The order of subpictures signaled in the SPS defines the subpicture index. A list of subpicture IDs (each subpicture has one ID) can be explicitly signaled, e.g., in the SPS or PPS.
[0088] The tiles in VVC are conceptually the same as the tiles in HEVC, i.e., each picture is partitioned into tile columns and tile rows, but the signaling of tiles in the PPS is different.
[0089] In VVC, the slice mode is also signaled in the PPS. When the slice mode is the rectangular slice mode, the slice layout of each picture (i.e., the number of slices per picture and the position and size of each slice) is signaled in the PPS. The order of rectangular slices within a picture signaled in the PPS defines the picture-level slice index. The subpicture-level slice index is defined as the order of slices within a subpicture in the increasing order of their picture-level slice index. The position and size of a rectangular slice are signaled / derived based on the subpicture position and size signaled in the SPS (when each subpicture contains only one slice) or based on the tile position and size signaled in the PPS (when a subpicture can contain more than one slice). When the slice mode is the raster scan slice mode, similar to HEVC, the slice layout within a picture is signaled in the slice itself, with different details.
[0090] 3.4. In-loop filtering in VVC
[0091] Figure 11An example of an encoder block diagram of VVC is shown, which contains three in-loop filtering blocks: Deblocking Filter (DF), Sample Adaptive Offset (SAO), and ALF. Unlike DF which uses a pre-defined filter, SAO and ALF utilize the original samples of the current picture to reduce the mean square error between the original and reconstructed samples by adding an offset and applying a Finite Impulse Response (FIR) filter, respectively, with the codec side information of the offset and filter coefficients signaled. ALF is located at the last processing stage of each picture and can be regarded as a tool that attempts to capture and fix artifacts created by previous stages.
[0092] 3.5. Deblocking Filter (DB)
[0093] The input of DB is the reconstructed samples before loop filtering.
[0094] The vertical edges in a picture are filtered first. Then, the horizontal edges in the picture are filtered with the samples modified by the vertical edge filtering process as input. The vertical and horizontal edges in a CTB of each CTU are processed separately on a coding unit basis. The vertical edges of a coding block in a coding unit start from the left side of the coding block and go through the edges towards the right side of the coding block in their geometric order. The horizontal edges of a coding block in a coding unit start from the top of the coding block and go through the edges towards the bottom of the coding block in their geometric order.
[0095] Figure 12 is an illustration of picture samples and horizontal and vertical block boundaries on an 8x8 grid, and non-overlapping 8x8 blocks of samples that can be deblocked in parallel.
[0096] 3.5.1. Edge Decision
[0097] In HEVC, the filtering is applied to 8x8 block boundaries as shown in Figure 13 However, in VVC, a finer filtering is used, where 4x4 block boundaries are filtered. In addition, it has to be a transform block boundary or a coding sub-block boundary (e.g., due to the use of affine motion prediction, ATMVP). For those that are not, the filter is disabled.
[0098] 3.5.2. Edge Strength Calculation
[0099] For transform block boundaries / coding sub-block boundaries, if they are located in an 8x8 grid, they can be filtered, and bS[xD i ][yD j ](where [xD i ][yD j ] denotes the coordinates) is set as defined in Table 3-1 and Table 3-2, respectively.
[0100] Table 0-1. Boundary strength (when SPS IBC is disabled)
[0101]
[0102] Table 0-2. Boundary strength (when SPS IBC is enabled)
[0103]
[0104] 3.5.3. Deblocking decision for luma components
[0105] This subsection describes the deblocking decision process.
[0106] The wider and stronger luma filter is used only when condition 1, condition 2 and condition 3 are all TRUE.
[0107] Condition 1 is the "large block condition". This condition checks whether the samples on the P-side and the Q-side belong to a large block, denoted by the variables bSidePisLargeBlk and bSideQisLargeBlk, respectively. bSidePisLargeBlk and bSideQisLargeBlk are defined as follows.
[0108] 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
[0109] bSideQisLargeBlk = ((edge type is vertical and q0 belongs to a CU with width >= 32) || (edge type is horizontal and q0 belongs to a CU with height >= 32))? TRUE : FALSE
[0110] Based on bSidePisLargeBlk and bSideQisLargeBlk, condition 1 is defined as follows.
[0111] Condition 1 = (bSidePisLargeBlk || bSidePisLargeBlk)? TRUE : FALSE
[0112] Next, if condition 1 is true, condition 2 will be further checked. First, the following variables are derived:
[0113] - dp0, dp3, dq0, dq3 are first derived in the way as in HEVC
[0114] - if (p-side is greater than or equal to 32)
[0115] dp0 = (dp0 + Abs(p50 - 2*p40 + p30) + 1) » 1
[0116] dp3 = (dp3 + Abs(p53 - 2*p43 + p33) + 1) » 1
[0117] - if ( (q side >= 32)
[0118] dq0 = (dq0 + Abs(q50 - 2*q40 + q30) + 1) » 1
[0119] dq3 = (dq3 + Abs(q53 - 2*q43 + q33) + 1) » 1
[0120] Condition2 = (d < beta)? TRUE : FALSE
[0121] where d = dp0 + dq0 + dp3 + dq3.
[0122] If Condition1 and Condition2 are valid, then further check if any of the blocks use sub-blocks:
[0123]
[0124]
[0125] Finally, if both Condition1 and Condition2 are valid, then the proposed deblocking method will check Condition3 (StrongFilterCondition), which is defined as follows.
[0126] In Condition3, StrongFilterCondition, the following variables are derived:
[0127] dpq is derived in the same way as in HEVC.
[0128] sp3 = Abs(p3 - p0) is derived in the same way as in HEVC.
[0129] if ( (p side >= 32)
[0130]
[0131] sq3 = Abs(q0 - q3) is derived in the same way as in HEVC.
[0132] if ( (q side >= 32)
[0133]
[0134] As in HEVC, StrongFilterCondition = (dpq < (beta >> 2), sp3 + sq3 < (3*beta >> 5), and Abs(p0 - q0) < (5*beta >> 6). C+ 1)? TRUE : FALSE.
[0135] 3.5.4 More aggressive luma deblocking filter (designed for larger blocks)
[0136] When the samples on either side of the boundary belong to a large block, a bilinear filter is used. A sample belonging to a large block is defined as when the width of the vertical edge >= 32 and when the height of the horizontal edge >= 32.
[0137] The bilinear filter is shown below.
[0138] In the above HEVC deblocking, the block boundary samples p i and q i for i = 0 to Sp - 1 (pi and qi are the i-th sample within the row for filtering the vertical edge, or within the column for filtering the horizontal edge) are replaced by linear interpolation as follows:
[0139] - p i ' = (f i * Middlew s,t + (64 - f i ) * P s + 32) » 6), clipped to p i ± tcPD i
[0140] - q j ' = (g j * Middle s,t + (64 - g j ) * Q s + 32) » 6), clipped to q j ± tcPD j where tcPD i and tcPD j terms are the position dependent clipping described in section 3.5.7, and g j , f i , Middle s,t , P s and Q s are given as follows:
[0141] 3.5.5 Chroma deblocking control
[0142] A chroma strong filter is used on both sides of the block boundary. Here, when both sides of the chroma edge are greater than or equal to 8 (chroma position) and the following three conditions are met, the chroma filter is selected. The proposed filter can be applied when the block width or height orthogonal to the block edge is equal to or greater than 8 in the chroma sample domain. The second and third are basically the same as the HEVC luma deblocking decisions, open / closed decision and strong filter decision, respectively.
[0143] In the first decision, the boundary strength (bS) is modified for chroma filtering and the conditions are checked sequentially. If a certain condition is met, the remaining conditions with lower priority are skipped.
[0144] When bS is equal to 2, or when a large block boundary is detected, bS is equal to 1, chroma deblocking is performed.
[0145] The second and third conditions are basically the same as the HEVC luma strong filter decisions, as follows.
[0146] In the second condition:
[0147] Then d is derived in the same way as in the HEVC luma deblocking.
[0148] The second condition will be TRUE when d is less than β.
[0149] In the third condition, StrongFilterCondition is derived as follows:
[0150] dpq is derived in the same way as in the HEVC.
[0151] sp3 = Abs(p3 - p0) is derived in the same way as in the HEVC.
[0152] sq3 = Abs(q0 - q3) is derived in the same way as in the HEVC.
[0153] As in the HEVC design, StrongFilterCondition = (dpq is less than (β » 2), sp3 + sq3 is less than (β » 3), and Abs(p0 - q0) is less than (5 * t C + 1) » 1).
[0154] 3.5.6 Strong deblocking filter for chroma
[0155] The following strong deblocking filter for chroma is defined:
[0156] p2' = (3 * p3 + 2 * p2 + p1 + p0 + q0 + 4) » 3
[0157] p1' = (2 * p3 + p2 + 2 * p1 + p0 + q0 + q1 + 4) » 3
[0158] p0' = (p3 + p2 + p1 + 2 * p0 + q0 + q1 + q2 + 4) » 3
[0159] The proposed chroma filter performs de-blocking on a 4x4 chroma sample grid.
[0160] 3.5.7. Position dependent clipping
[0161] Position dependent clipping tcPD is applied to the output samples of the luma filtering process which involves strong and long filters that modify 7, 5 and 3 samples at the boundaries. Assuming a quantization error distribution, it is proposed to increase the clipping values for samples that are expected to have higher quantization noise, and thus are expected to have a larger deviation of the reconstructed sample value from the true sample value.
[0162] For each P or Q boundary filtered with asymmetric filters, depending on the result of the decision making process in section 3.5.2, a position dependent threshold table is selected from two tables provided to the decoder as side information, namely Tc7 and Tc3 in the following tables:
[0163] Tc7 = {6, 5, 4, 3, 2, 1, 1}; Tc3 = {6, 4, 2};
[0164] tcPD = (Sp == 3)? Tc3 : Tc7;
[0165] tcQD = (Sq == 3)? Tc3 : Tc7;
[0166] For P or Q boundaries filtered with short symmetric filters, a lower amplitude of position dependent threshold is applied:
[0167] Tc3 = {3, 2, 1};
[0168] After the threshold values are defined, the filtered p' i and q' i sample values are clipped according to the tcP and tcQ clipping values:
[0169] p" i = Clip3(p' i + tcP i , p' i - tcP i , p' i );
[0170] q" j = Clip3(q' j + tcQ j , q' j– tcQ j , q' j );
[0171] where p' i and q' i are the filtered sample values, p" i and q" j are the clipped output sample values, and tcP i tcP i is the clipping threshold derived from the VVC tc parameters and tcPDand tcQD. The function Clip3 is the clipping function specified in VVC.
[0172] 3.5.8. Subblock Deblocking Adjustment
[0173] To enable parallel friendly de-blocking with long filter and subblock deblocking, the long filter is restricted to modify at most 5 samples on one side of the usage of subblock deblocking (AFFINE or ATMVP or DMVR) as shown in the long filter luma control. In addition, the subblock deblocking is adjusted such that the subblock boundaries close to the CU or implicit TU boundaries on the 8x8 grid are restricted to modify at most two samples per side.
[0174] The following applies to subblock boundaries that are not aligned with the CU boundaries.
[0175]
[0176] where the edges equal to 0 correspond to the CU boundaries, the edges equal to 2 or equal to orthogonalLength - 2 correspond to the subblock boundaries 8 samples from the CU boundaries, etc. Where the implicit TU is true if the implicit partitioning of the TU is used.
[0177] 3.5.9. Deblocking filter in VVC described in JVET-S2001vE
[0178] 8.8.3 Deblocking filter process
[0179] 8.8.3.1 Overview
[0180] The input of the process is the reconstructed picture before deblocking, i.e. the array recPicture L , when sps_chroma_format_idc is not equal to 0, the array recPicture Cb and recPicture Cr .
[0181] The output of the process is the modified reconstructed picture after deblocking, i.e. the array recPicture LWhen sps_chroma_format_idc is not equal to 0, the array recPicture Cb and recPicture Cr .
[0182] The vertical edges in a picture are filtered first. Then, the horizontal edges in the picture are filtered with the samples modified by the vertical edge filtering process as input. The vertical and horizontal edges in each CTB of a CTU are processed separately on a coding unit basis. The vertical edges of the coding blocks in a coding unit start from the left side of the coding blocks and proceed through the edges towards the right side of the coding blocks in their geometric order. The horizontal edges of the coding blocks in a coding unit start from the top of the coding blocks and proceed through the edges towards the bottom of the coding blocks in their geometric order.
[0183] NOTE - Although the filtering processes are specified in this Specification on a picture basis, the filtering processes can be implemented on a coding unit basis and produce equivalent results if the decoder correctly takes into account the processing dependency order and thus produces the same output values.
[0184] The Deblocking Filter process is not applied to the following types of edges of a picture:
[0185] - edges at picture boundaries,
[0186] - edges coinciding with a subpicture boundary of subpicture index subpicldx and sps_loop_filter_across_subpic_enabled_flag[ subpicldx ] equal to 0,
[0187] - edges coinciding with a virtual boundary of the picture when VirtualBoundariesPresentFlag is equal to 1,
[0188] - edges coinciding with a tile boundary when pps_loop_filter_across_tiles_enabled_flag is equal to 0,
[0189] - edges coinciding with a slice boundary when pps_loop_filter_across_slices_enabled_flag is equal to 0,
[0190] - edges coinciding with a top or left boundary of a slice for which sh_deblocking_filter_is_enabled_flag is equal to 1,
[0191] - edges within a slice for which sh_deblocking_filter_is_enabled_flag is equal to 1,
[0192] - an edge not corresponding to a 4x4 samples grid boundary of the luma component,
[0193] - an edge not corresponding to a 8x8 samples grid boundary of the chroma component,
[0194] - an edge within the luma component for which both sides of the edge intra bdpcm luma flag are equal to 1,
[0195] - an edge within the chroma component for which both sides of the edge intra bdpcm chroma flag are equal to 1,
[0196] - a chroma sub-block edge that is not an associated transform unit edge.
[0197] The edge type (vertical or horizontal) is denoted by the variable edgeType specified in Table 42.
[0198] Table 42 - edgeType association name
[0199] edgeType edgeType name 0 (vertical edge) EDGE_VER 1 (horizontal edge) EDGE_HOR
[0200] When sh_deblocking_filter_disabled_flag of the current slice is equal to 0, the following applies:
[0201] - the variable treeType is set equal to DUAL_TREE_LUMA.
[0202] - the deblocking filter for one direction process specified in subclause 8.8.3.2 is invoked with the variable treeType, the reconstructed picture before deblocking (i.e. the array recPicture L ) and the variable edgeType set equal to EDGE_VER as inputs and the modified reconstructed picture after deblocking (i.e. the array recPicture L ) as output, the vertical edges are filtered.
[0203] - the deblocking filter for one direction process specified in subclause 8.8.3.2 is invoked with the variable treeType, the modified reconstructed picture after deblocking (i.e. the array recPicture L ) and the variable edgeType set equal to EDGE_HOR as inputs and the modified reconstructed picture after deblocking (i.e. the array recPicture L ) as output, the horizontal edges are filtered.
[0204] - When sps_chroma_format_idc is not equal to 0, the following applies:
[0205] - the variable treeType is set equal to DUAL_TREE_CHROMA
[0206] - the de-blocking filter for one direction process as specified in subclause 8.8.3.2 is invoked with the variable treeType, the reconstructed picture before de-blocking, i.e. the arrays recPicture Cb and recPicture Cr , and the variable edgeType set equal to EDGE_VER as inputs, and the modified reconstructed picture after de-blocking, i.e. the arrays recPicture Cb and recPicture Cr , as outputs, filtering for vertical edges.
[0207] - the de-blocking filter for one direction process as specified in subclause 8.8.3.2 is invoked with the variable treeType, the modified reconstructed picture after de-blocking, i.e. the arrays recPicture Cb and recPicture Cr , and the variable edgeType set equal to EDGE_HOR as inputs, and the modified reconstructed picture after de-blocking, i.e. the arrays recPicture Cb and recPicture Cr , as outputs, filtering for horizontal edges.
[0208] 8.8.3.2 De-blocking filter for one direction process
[0209] The inputs of the process include:
[0210] - the variable treeType specifying whether the luma (DUAL_TREE_LUMA) or the chroma component (DUAL_TREE_CHROMA) is currently processed,
[0211] - when treeType is equal to DUAL_TREE_LUMA, the reconstructed picture before de-blocking, i.e. the arrays recPicture L ,
[0212] - when sps_chroma_format_idc is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA, the arrays recPicture Cb and recPicture Cr .
[0213] - the variable edgeType specifying whether filtering is performed for vertical (EDGE_VER) or for horizontal (EDGE_HOR) edges.
[0214] The output of the process is the deblocking post- modified reconstructed picture, i.e.:
[0215] - When treeType is equal to DUAL_TREE_LUMA, the array recPicture L ,
[0216] - When sps_chroma_format_idc is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA, the array recPicture Cb and recPicture Cr .
[0217] The variables firstCompIdx and lastCompIdx are derived as follows:
[0218] firstCompIdx = (treeType == DUAL_TREE_CHROMA)? 1 : 0 (1203)
[0220] lastCompIdx = (treeType == DUAL_TREE_LUMA ||
[0221] sps_chroma_format_idc == 0)? 0 : 2 (1204)
[0222] For each coding unit and each coding block of the coding unit in terms of color component indicated by the color component index cldx ranging from firstCompIdx to lastCompIdx, inclusive, the edges of the coding block are filtered by the following sequential steps when cldx is equal to 0, or when cldx is not equal to 0 and edgeType is equal to EDGE_VER and xCb % 8 is equal to 0, or when cldx is not equal to 0 and edgeType is equal to EDGE_HOR and yCb % 8 is equal to zero, where the coding block width is nCbW, the coding block height is nCbH and the position of the top-left sample of the coding block is (xCb, yCb):
[0223] 1. The variable filterEdgeFlag is derived as follows:
[0224] - If edgeType is equal to EDGE_VER, and one or more of the following conditions are true, filterEdgeFlag is set equal to 0:
[0225] - The left boundary of the current coding block is the left boundary of the picture.
[0226] - The left boundary of the current coding block coincides with the left boundary of the current subpicture and sps_loop_filter_across_subpic_enabled_flag[ CurrSubpicldx ] or sps_loop_filter_across_subpic_enabled_flag[ subpicldx ] is equal to 0, where subpicldx is the subpicture index of the subpicture whose right subpicture boundary coincides with the left boundary of the current coding block.
[0227] - The left boundary of the current coding block is the left boundary of a tile and pps_loop_filter_across_tiles_enabled_flag is equal to 0.
[0228] - The left boundary of the current coding block is the left boundary of a slice and pps_loop_filter_across_slices_enabled_flag is equal to 0.
[0229] - Otherwise, if edgeType is equal to EDGE HOR and one or more of the following conditions are true, the variable filterEdgeFlag is set equal to 0:
[0230] - The top boundary of the current luma coding block is the top boundary of the picture.
[0231] - The top boundary of the current coding block coincides with the top boundary of the current subpicture and sps_loop_filter_across_subpic_enabled_flag[ CurrSubpicldx ] or sps_loop_filter_across_subpic_enabled_flag[ subpicldx ] is equal to 0, where subpicldx is the subpicture index of the subpicture whose bottom subpicture boundary coincides with the top boundary of the current coding block.
[0232] - The top boundary of the current coding block is the top boundary of a tile and pps_loop_filter_across_tiles_enabled_flag is equal to 0.
[0233] - The top boundary of the current coding block is the top boundary of a slice and pps_loop_filter_across_slices_enabled_flag is equal to 0.
[0234] - Otherwise, filterEdgeFlag is set equal to 1.
[0235] 2. All elements of the two-dimensional (nCbW) x (nCbH) array edgeFlags, maxFilterLengthQs and maxFilterLengthPs are initialized to be equal to zero.
[0236] 3. The derivation process of transform block boundaries as specified in subclause 8.8.3.3 is invoked with luma_sample_position(xCb, yCb), block width nCbW, block height nCbH, variable cldx, variable filterEdgeFlag, array edgeFlags, array maxFilterLengthPs and maxFilterLengthQs, and variable edgeType as inputs, and modified array edgeFlags, modified array maxFilterLengthPs and maxFilterLengthQs as outputs.
[0237] 4. The derivation process of sub-block boundaries as specified in subclause 8.8.3.4 is invoked with luma_sample_position(xCb, yCb), block width nCbW, block height nCbH, array edgeFlags, array maxFilterLengthPs and maxFilterLengthQs, and variable edgeType as inputs, and modified array edgeFlags, modified array maxFilterLengthPs and maxFilterLengthQs as outputs, when cldx is equal to 0.
[0238] 5. The picture sample array recPicture is derived as follows:
[0239] - If cldx is equal to 0, recPicture is set equal to the reconstructed luma picture sample array before the deblocking recPicture L
[0240] - Otherwise, if cldx is equal to 1, recPicture is set equal to the reconstructed chroma picture sample array before the deblocking recPicture Cb
[0241] - Otherwise (cldx is equal to 2), recPicture is set equal to the reconstructed chroma picture sample array before the deblocking recPicture Cr
[0242] 6. The derivation process of the boundary filter strength as specified in subclause 8.8.3.5 is invoked with picture sample array recPicture, position (xCb, yCb), coded block width nCbW, coded block height nCbH, variable edgeType, variable cldx and array edgeFlags as input and with (nCbW)x(nCbH) array bS as output.
[0243] 7. The edge filter process for one direction for one coded block as specified in subclause 8.8.3.6 is invoked with variable edgeType, variable cldx, the reconstructed picture before deblocking recPicture, position (xCb, yCb), coded block width nCbW, coded block height nCbH and arrays bS, maxFilterLengthPs and maxFilterLengthQs as input and with the modified reconstructed picture recPicture as output.
[0244] 8.8.3.3 Derivation process of transform block edges
[0245] The inputs of the process comprise:
[0246] - position (xCb, yCb) specifying the top-left sample of the current coded block relative to the top-left sample of the current picture,
[0247] - variable nCbW specifying the width of the current coded block,
[0248] - variable nCbH specifying the height of the current coded block,
[0249] - variable cldx specifying the color component of the current coded block,
[0250] - variable filterEdgeFlag,
[0251] - two-dimensional (nCbW)x(nCbH) array edgeFlags,
[0252] - two-dimensional (nCbW)x(nCbH) arrays maxFilterLengthQs and maxFilterLengthPs,
[0253] - variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge.
[0254] The outputs of the process comprise:
[0255] - the modified two-dimensional (nCbW)x(nCbH) array edgeFlags,
[0256] - the modified two-dimensional (nCbW) x (nCbH) array maxFilterLengthQs, maxFilterLengthPs.
[0257] Depending on edgeType, the arrays edgeFlags, maxFilterLengthPs and maxFilterLengthQs are derived as follows:
[0258] - The variable gridSize is set as follows:
[0259] gridSize = cldx == 0? 4 : 8 (1205)
[0260] - If edgeType is equal to EDGE_VER, the following applies:
[0261] - The variable numEdges is set equal to Max(1, nCbW / gridSize).
[0262] - For xEdge = 0..numEdges - 1 and y = 0..nCbH - 1, the following applies:
[0263] - The horizontal position x within the current coding block is set equal to xEdge * gridSize.
[0264] - The value of edgeFlags[x][y] is derived as follows:
[0265] - If x is equal to 0, edgeFlags[x][y] is set equal to filterEdgeFlag.
[0266] - Otherwise, if the position (xCb + x, yCb + y) is located at the transform block edge, edgeFlags[x][y] is set equal to 1.
[0267] - When edgeFlags[x][y] is equal to 1, the following applies:
[0268] - If cldx is equal to 0, the following applies:
[0269] - The value of maxFilterLengthQs[x][y] is derived as follows:
[0270] - If the width of the luma samples of the transform block at luma position (xCb + x, yCb + y) is equal to or smaller than 4, or the width of the luma samples of the transform block at luma position (xCb + x - 1, yCb + y) is equal to or smaller than 4, maxFilterLengthQs[x][y] is set equal to 1.
[0271] - Otherwise, if the width of luma samples of the transform block at luma position ( xCb + x, yCb + y ) is equal to or greater than 32, maxFilterLengthQs[ x ][ y ] is set equal to 7.
[0272] - Otherwise, maxFilterLengthQs[ x ][ y ] is set equal to 3.
[0273] - The value of maxFilterLengthPs[ x ][ y ] is derived as follows:
[0274] - If the width of luma samples of the transform block at luma position ( xCb + x, yCb + y ) is equal to or less than 4, or the width of luma samples of the transform block at luma position ( xCb + x - 1, yCb + y ) is equal to or less than 4, maxFilterLengthPs[ x ][ y ] is set equal to 1.
[0275] - Otherwise, if the width of luma samples of the transform block at luma position ( xCb + x - 1, yCb + y ) is equal to or greater than 32, maxFilterLengthPs[ x ][ y ] is set equal to 7.
[0276] - Otherwise, maxFilterLengthPs[ x ][ y ] is set equal to 3.
[0277] - Otherwise ( cldx is not equal to 0 ), the values of maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are derived as follows:
[0278] - If the width of chroma samples of the transform block at chroma position ( xCb + x, yCb + y ) and the width at chroma position ( xCb + x - 1, yCb + y ) are both equal to or greater than 8, maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are set equal to 3.
[0279] - Otherwise, maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are set equal to 1.
[0280] - Otherwise ( edgeType is equal to EDGE_HOR ), the following applies:
[0281] - The variable numEdges is set equal to Max( 1, nCbH / gridSize ).
[0282] - For yEdge = 0..numEdges - 1 and x = 0..nCbW - 1, the following applies:
[0283] - The vertical position y within the current coding block is set equal to yEdge * gridSize.
[0284] - The value of edgeFlags[ x ][ y ] is derived as follows:
[0285] - If y is equal to 0, edgeFlags[ x ][ y ] is set equal to filterEdgeFlag.
[0286] - Otherwise, if the position ( xCb + x, yCb + y ) is on the edge of the transform block, edgeFlags[ x ][ y ] is set equal to 1.
[0287] - When edgeFlags[ x ][ y ] is equal to 1, the following applies:
[0288] - If cldx is equal to 0, the following applies:
[0289] - The value of maxFilterLengthQs[ x ][ y ] is derived as follows:
[0290] - If the height of luma samples of the transform block at luma position ( xCb + x, yCb + y ) is equal to or smaller than 4, or the height of luma samples of the transform block at luma position ( xCb + x, yCb + y - 1 ) is equal to or smaller than 4, maxFilterLengthQs[ x ][ y ] is set equal to 1.
[0291] - Otherwise, if the height of luma samples of the transform block at luma position ( xCb + x, yCb + y - 1 ) is equal to or greater than 32, maxFilterLengthQs[ x ][ y ] is set equal to 7.
[0292] - Otherwise, maxFilterLengthQs[ x ][ y ] is set equal to 3.
[0293] - The value of maxFilterLengthPs[ x ][ y ] is derived as follows:
[0294] - If the height of luma samples of the transform block at luma position ( xCb + x, yCb + y ) is equal to or smaller than 4, or the height of luma samples of the transform block at luma position ( xCb + x, yCb + y - 1 ) is equal to or smaller than 4, maxFilterLengthPs[ x ][ y ] is set equal to 1.
[0295] - Otherwise, if the height of luma samples of the transform block at luma position ( xCb + x, yCb + y - 1 ) is equal to or greater than 32, maxFilterLengthPs[ x ][ y ] is set equal to 7.
[0296] - Otherwise, maxFilterLengthPs[ x ][ y ] is set equal to 3.
[0297] - Otherwise (cldx is not equal to 0), the values of maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are derived as follows:
[0298] - If the height of the transform block at chroma location ( xCb + x, yCb + y ) and the height of the transform block at chroma location ( xCb + x, yCb + y - 1 ) are both equal to or larger than 8, the following applies:
[0299] - If ( yCb + y ) % CtbHeightC is larger than 0, i.e. the horizontal edge does not overlap with the top boundary of the chroma CTB, both maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are set equal to 3
[0300] - Otherwise (( yCb + y ) % CtbHeightC is equal to 0, i.e. the horizontal edge overlaps with the top boundary of the chroma CTB), maxFilterLengthPs[ x ][ y ] is set equal to 1 and maxFilterLengthQs[ x ][ y ] is set equal to 3.
[0301] - Otherwise, maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are set equal to 1.
[0302] 8.8.3.4 Derivation process for sub-block boundaries
[0303] The input of this process comprises:
[0304] - a position ( xCb, yCb ) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[0305] - a variable nCbW specifying the width of the current coding block,
[0306] - a variable nCbH specifying the height of the current coding block,
[0307] - a two-dimensional ( nCbW ) x ( nCbH ) array edgeFlags,
[0308] - a two-dimensional ( nCbW ) x ( nCbH ) array maxFilterLengthQs and maxFilterLengthPs,
[0309] - a variable edgeType specifying whether to filter vertical (EDGE VER) or horizontal (EDGE HOR) edges.
[0310] The output of the process comprises:
[0311] - a modified two-dimensional (nCbW) x (nCbH) array edgeFlags,
[0312] - a modified two-dimensional (nCbW) x (nCbH) array maxFilterLengthQs and maxFilterLengthPs.
[0313] The number of sub-blocks in the horizontal direction numSbX and in the vertical direction numSbY are derived as follows:
[0314] - If inter affine flag [ xCb ][ yCb ] is equal to 1 or merge subblock flag [ xCb ][ yCb ] is equal to 1, numSbX and numSbY are set equal to NumSbX [ xCb ][ yCb ] and NumSbY [ xCb ][ yCb ], respectively.
[0315] - Otherwise, numSbX and numSbY are both set equal to 1.
[0316] Depending on the value of edgeType, the following applies:
[0317] - If edgeType is equal to EDGE VER, the following applies:
[0318] - A variable sbW is set equal to Max(8, nCbW / numSbX).
[0319] - An array edgeTbFlags is set equal to edgeFlags.
[0320] - For xEdge = 0.. min((nCbW / 8) - 1, numSbX - 1), y = 0.. nCbH - 1:
[0321] - A horizontal position x within the current coding block is set equal to xEdge * sbW.
[0322] - The value of edgeFlags [ x ][ y ] is derived as follows:
[0323] edgeFlags [ x ][ y ] = 2 (1206)
[0324] - When edgeFlags [ x ][ y ] is equal to 1 or 2, maxFilterLengthPs [ x ][ y ]
[0325] and the value of maxFilterLengthQs[ x ][ y ] is modified as follows:
[0326] – If x is equal to 0, the following applies:
[0327] – When numSbX is greater than 1, the following applies:
[0328] maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1207)
[0329] – When inter affme flag[ xCb - 1 ][ yCb + y ] is equal to 1 or merge subblock flag[ xCb - 1 ][ yCb + y ] is equal to 1, the following applies:
[0330] maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1208)
[0331] – Otherwise, if edgeTbFlags[ x ][ y ] is equal to 1, the following applies:
[0332] maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1209)
[0333] maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1210)
[0334] – Otherwise, if one or more of the following conditions are true:
[0335] – edgeTbFlags[ x - 4 ][ y ] is equal to 1,
[0336] – edgeTbFlags[ x + 4 ][ y ] is equal to 1,
[0337] the following applies:
[0338] maxFilterLengthPs[ x ][ y ] = 1 (1211)
[0339] maxFilterLengthQs[ x ][ y ] = 1 (1212)
[0340] – Otherwise, if one or more of the following conditions are true:
[0341] - xEdge is equal to 1,
[0342] - xEdge is equal to (nCbW / 8) - 1,
[0343] - edgeTbFlags[ x - sbW ][ y ] is equal to 1,
[0344] - edgeTbFlags[ x + sbW ][ y ] is equal to 1,
[0345] The following applies:
[0346] maxFilterLengthPs[ x ][ y ] = 2 (1213)
[0347] maxFilterLengthQs[ x ][ y ] = 2 (1214)
[0348] - Otherwise, the following applies:
[0349] maxFilterLengthPs[ x ][ y ] = 3 (1215)
[0350] maxFilterLengthQs[ x ][ y ] = 3 (1216)
[0351] - Otherwise, if edgeType is equal to EDGE_HOR, the following applies:
[0352] - The variable sbH is set equal to Max(8, nCbH / numSbY).
[0353] - The array edgeTbFlags is set equal to edgeFlags.
[0354] - For yEdge = 0.. min((nCbH / 8) - 1, numSbY - 1), x = 0.. nCbW - 1:
[0355] - The vertical position y within the current coding block is set equal to yEdge * sbH.
[0356] - The value of edgeFlags[ x ][ y ] is derived as follows:
[0357] edgeFlags[ x ][ y ] = 2 (1217)
[0358] - When edgeFlags[ x ][ y ] is equal to 1 or 2, the values of maxFilterLengthPs[ x ][ y ] and maxFilterLengthQs[ x ][ y ] are modified as follows:
[0359] - If y is equal to 0, the following applies:
[0360] - When numSbY is greater than 1, the following applies:
[0361] maxFilterLengthQs[x][y] = Min(5, maxFilterLengthQs[x][y]) (1218)
[0362] - When inter affme flag[xCb+x][yCb-1] is equal to 1 or merge subblock flag[xCb+x][yCb-1] is equal to 1, the following applies:
[0363] maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) (1219)
[0364] - Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:
[0365] maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) (1220)
[0366] maxFilterLengthQs[x][y] = Min(5, maxFilterLengthQs[x][y]) (1221)
[0367] - Otherwise, if one or more of the following conditions are true:
[0368] - edgeTbFlags[x][y-4] is equal to 1,
[0369] - edgeTbFlags[x][y+4] is equal to 1,
[0370] the following applies:
[0371] maxFilterLengthPs[x][y] = 1 (1222)
[0372] maxFilterLengthQs[x][y] = 1 (1223)
[0373] - Otherwise, if one or more of the following conditions are true:
[0374] - yEdge is equal to 1,
[0375] - yEdge is equal to (nCbH / 8) - 1.
[0376] - edgeTbFlags[ x ][ y - sbH ] is equal to 1,
[0377] - edgeTbFlags[ x ][ y + sbH ] is equal to 1,
[0378] The following applies:
[0379] maxFilterLengthPs[ x ][ y ] = 2 (1224)
[0380] maxFilterLengthQs[ x ][ y ] = 2 (1225)
[0381] - Otherwise, the following applies:
[0382] maxFilterLengthPs[ x ][ y ] = 3 (1226)
[0383] maxFilterLengthQs[ x ][ y ] = 3 (1227)
[0384] 8.8.3.5 Derivation process of the boundary filter strength
[0385] The inputs of this process comprise:
[0386] - the picture sample array recPicture,
[0387] - the position ( xCb, yCb ) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[0388] - the variable nCbW specifying the width of the current coding block,
[0389] - the variable nCbH specifying the height of the current coding block,
[0390] - the variable edgeType specifying whether to filter a vertical ( EDGE_VER ) or a horizontal ( EDGE_HOR ) edge,
[0391] - the variable cldx specifying the colour component of the current coding block,
[0392] - the two-dimensional ( nCbW ) x ( nCbH ) array edgeFlags.
[0393] The output of this process is the two-dimensional ( nCbW ) x ( nCbH ) array bS specifying the boundary filter strength.
[0394] The variables xD i , yD j , xN and yN are derived as follows:
[0395] - The variable gridSize is set as follows:
[0396] gridSize = cldx == 0? 4 : 8 (1228)
[0397] - If edgeType is equal to EDGE VER, the following applies:
[0398] xD i = (i * gridSize) (1229)
[0399] yD j = cldx == 0? (j « 2) : (j « 1) (1230)
[0400] xN = Max(0, (nCbW / gridSize) - 1) (1231)
[0401] yN = cldx == 0? (nCbH / 4) - 1 : (nCbH / 2) - 1 (1232)
[0402] - Else (edgeType is equal to EDGE HOR), the following applies:
[0403] xD i = cldx == 0? (i « 2) : (i « 1) (1233)
[0404] yD j = j * gridSize (1234)
[0405] xN = cldx == 0? (nCbW / 4) - 1 : (nCbW / 2) - 1 (1235)
[0406] yN = Max(0, (nCbH / gridSize) - 1) (1236)
[0407] For xD i and yD j , the following applies:
[0408] - If edgeFlags[xD i ][yD j ] is equal to 0, the variable bS[xD i ][yD j ] is set equal to 0.
[0409] - Otherwise, if edgeType is equal to EDGE_VER, VirtualBoundariesPresentFlag is equal to 1, and for any n = 0..NumVerVirtualBoundaries - 1, (xCb+ xD i ) is equal to VirtualBoundaryPosX[n] / scaleWidth, the variable bS[xD i ][yD j ] is set equal to 0.
[0410] - Otherwise, if edgeType is equal to EDGE_HOR, VirtualBoundariesPresentFlag is equal to 1, and for any n = 0..NumHorVirtualBoundaries - 1, (yCb+ yDj) is equal to VirtualBoundaryPosY[n] / scaleHeight, the variable bS[xDi][yDj] is set equal to 0.
[0411] - Otherwise, the following applies:
[0412] - The sample values p0 and q0 are derived as follows:
[0413] - If edgeType is equal to EDGE_VER, p0 is set equal to recPicture[xCb+ xD i -1][yCb+ yD j ] and q0 is set equal to recPicture[xCb+ xD i ][yCb+ yD j ].
[0414] - Otherwise (edgeType is equal to EDGE_HOR), p0 is set equal to recPicture[xCb+ xD i ][yCb+ yD j -1] and q0 is set equal to recPicture[xCb+ xD i ][yCb+ yD j ].
[0415] - The variable bS[xD i ][yD j ] is derived as follows:
[0416] - If cIdx is equal to 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm luma flag is equal to 1, bS[xDi][yDj] is set equal to 0.
[0417] – Otherwise, if cIdx is greater than 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm chroma flag is equal to 1, bS[ xDi ][ yDj ] is set equal to 0.
[0418] – Otherwise, if sample p0 or q0 is located in a coding block of the coding unit that is coded with CuPredMode equal to MODE_INTRA, bS[ xDi ][ yDj ] is set equal to 2.
[0419] – Otherwise, if sample p0 or q0 is located in a coding block for which ciip_flag is equal to 1, bS[ xDi ][ yDj ] is set equal to 2.
[0420] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is located in a transform block containing one or more non-zero transform coefficient levels, bS[ xDi ][ yDj ] is set equal to 1.
[0421] – Otherwise, if cIdx is equal to 0, edgeFlags[ xDi ][ yDj ] is equal to 2 and one or more of the following conditions are true, bS[ xDi ][ yD i ][yD j ] is set equal to 1:
[0422] – The CuPredMode of the sub-block containing sample p0 is different from the CuPredMode of the sub-block containing sample q0.
[0423] – Both the sub-block containing sample p0 and the sub-block containing sample q0 are coded in IBC prediction mode and the absolute difference between the horizontal or vertical components of the block vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample).
[0424] – For the prediction of the sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the sub-block containing sample q0.
[0425] NOTE 1 - Determining whether the reference pictures used for the two coding sub-blocks are the same or different is based only on the reference pictures, not considering whether the prediction is formed using the index in RPL 0 or the index in RPL 1, nor considering whether the index positions in the RPLs are different.
[0426] NOTE 2 - The number of motion vectors used for the prediction of the sub-block covering the top-left sample of (xSb, ySb) is equal to PredFlagL0[ xSb ][ ySb ] + PredFlagL1[ xSb ][ ySb ].
[0427]
[0428] - the sub-block containing sample p0 is predicted using one motion vector, the sub-block containing sample q0 is predicted using one motion vector, and the absolute difference between the horizontal or vertical components of the used motion vectors is greater than or equal to 8 (unit: 1 / 16 luma samples).
[0429] 1 / 16 luma samples).
[0430] - the sub-block containing sample p0 is predicted using two motion vectors and two different reference pictures, the sub-block containing sample q0 is predicted using two motion vectors of the same two reference pictures, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two sub-blocks of the same reference picture is greater than or equal to 8 (unit: 1 / 16 luma samples).
[0431] - the sub-block containing sample p0 is predicted using two motion vectors of the same reference picture, the sub-block containing sample q0 is predicted using two motion vectors of the same reference picture, and both of the following conditions are true:
[0432] - the absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit:
[0433] 1 / 16 luma samples), or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma samples).
[0434] - the absolute difference between the horizontal or vertical components of the list 0 motion vector used in the prediction of the sub-block containing sample p0 and the list 1 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma samples), or the absolute difference between the horizontal or vertical components of the list 1 motion vector used in the prediction of the sub-block containing sample p0 and the list 0 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma samples).
[0435] - Otherwise, the variable bS[xD i ][yD j ] is set equal to 0.
[0436] 8.8.3.6 Filtering process for a side of one direction
[0437] 8.8.3.6.1 Overview
[0438] The inputs of the process include:
[0439] - the variable edgeType specifying whether the current processing is a vertical side (EDGE_VER) or a horizontal side (EDGE_HOR),
[0440] - variable cldx specifying the current color component,
[0441] - reconstructed picture recPicture before deblocking,
[0442] - position (xcb, ycb) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[0443] - variable ncbw specifying the width of the current coding block,
[0444] - variable ncbh specifying the height of the current coding block,
[0445] - array bs specifying the boundary strength,
[0446] - arrays maxFilterLengthPs and maxFilterLengthQs.
[0447] The output of the process is the modified reconstructed picture recPicture after deblocking.
[0448] For the edge filtering process, the following applies:
[0449] - variable gridSize is set as follows:
[0450] gridSize = cldx == 0? 4 : 8 (1237)
[0451] - variables subw, subh, xn, yn are derived as follows:
[0452] subw = cldx == 0? 1 : SubWidthC (1238)
[0453] subh = cldx == 0? 1 : SubHeightC (1239)
[0454] xn = edgeType == EDGE_VER? Max(0, (ncbw / gridSize) - 1) : (ncbw / (4 / subw)) - 1 (1240)
[0455] yn = edgeType == EDGE_VER? (ncbh / (4 / subh)) - 1:
[0456] Max(0, (ncbh / gridSize) - 1) (1241)
[0457] - variable xD for k = 0..xn k and yD for m = 0..yn m are derived as follows:
[0458] xD k =edgeType ==EDGE_VER? (k*gridSize):
[0459] (k<<(2 / subW)) (1242)
[0460] yD m =edgeType==EDGE_VER? (m<<(2 / subH)):
[0461] (m*gridSize) (1243)
[0462] –For xD where k = 0..xN k and yD of m = 0..yN m The following applies:
[0463] –When bS[xD k ][yD m When the value is greater than 0, the following sequence of steps applies:
[0464] – If cIdx equals 0, the filtering process for the edges in the current luminance codec block includes the following sequential steps:
[0465] 1. Set the position of the luminance image sample array recPicture, the luminance codec block (xCb, yCb), and the value equal to (xD). k ,yD m The block's brightness position (xBl, yBl), edge direction edgeType, and boundary filter intensity bS[xD] are determined. k ][yD m Set to equal maxFilterLengthPs[xD] k ][yD m The maximum filter length is set to maxFilterLengthP, and is also set to be equal to maxFilterLengthQs[xD]. k ][yD m The maximum filter lengths MaxFilterLengthQ are taken as input, along with the decisions dE, dEp, and dEq, the modified maximum filter lengths MaxFilterLengthP and maxFilterLengthQ, and the variable t. C As output, the decision process for the luminance block edge as specified in sub-clause 8.8.3.6.2 is invoked.
[0466] 2. Set the position of the luminance image sample array recPicture, the luminance codec block (xCb, yCb), and the value equal to (xD). k,yD m The block's brightness position (xBl, yBl), edge direction edgeType, decision dE, dEp and dEq, maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and variable t C As input and as output the modified luminance image sample array recPicture, the block edge filtering process specified in sub-clause 8.8.3.6.3 is invoked.
[0467] Otherwise (cIdx is not equal to 0), the filtering process for edges in the chroma codec block of the current codec unit specified by cIdx includes the following sequential steps:
[0468] 1. Set the chroma image sample array recPicture, the position of the chroma codec block (xCb, yCb), and set it to equal (xD). k ,yD m The chroma block position (xBl, yBl), edge direction edgeType, variable cIdx, and boundary filter intensity bS[xD] are all specified. k ][yD m Set to equal maxFilterLengthPs[xD] k ][yD m The maximum filter length, maxFilterLengthP, is set to be equal to maxFilterLengthQs[xD]. k ][yD m The maximum filter length maxFilterLengthQ is taken as input, and the modified maximum filter lengths maxFilterLengthP and maxFilterLengthQ and the variable tC are taken as output, and the edge decision process of the chroma block as specified in sub-clause 8.8.3.6.4 is invoked.
[0469] 2. When maxFilterLengthQ is greater than 0, set the position of the chroma image sample array recPicture, the chroma codec block (xCb, yCb), and the value equal to (xD). k ,yD m The chromaticity position (xBl, yBl) of the block, the edge direction edgeType, and the variable t C The filter process for chroma block edges is called, taking the maximum filter lengths maxFilterLengthP and maxFilterLengthQ as inputs and the modified chroma image sample array recPicture as output. It calls the chroma block edge filtering process specified in sub-clause 8.8.3.6.5.
[0470] 8.8.3.6.2 Decision process for luma block edges
[0471] The input of the process comprises:
[0472] - the picture sample array recPicture,
[0473] - the position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[0474] - the position (xBl, yBl) specifying the top-left sample of the current block relative to the top-left sample of the current coding block,
[0475] - the variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge,
[0476] - the variable bS specifying the boundary filter strength,
[0477] - the variable maxFilterLengthP specifying the maximum filter length,
[0478] - the variable maxFilterLengthQ specifying the maximum filter length.
[0479] The output of the process comprises:
[0480] - the variables dE, dEp and dEq containing the decision,
[0481] - the modified filter length variables maxFilterLengthP and maxFilterLengthQ,
[0482] - the variable t C .
[0483] The sample values p i,k and q j,k for i = 0..Max(2, maxFilterLengthP), j = 0..Max(2, maxFilterLengthQ) and k = 0 and 3 are derived as follows:
[0484] - if edgeType is equal to EDGE_VER, the following applies:
[0485] q j,k = recPicture[xCb+xBl+j][yCb+yBl+k] (1244)
[0486] p i,k = recPicture[xCb+xBl-i-1][yCb+yBl+k] (1245)
[0487] - Otherwise (edgeType is equal to EDGE_HOR), the following applies:
[0488] q j,k = recPicture[ xCb + xBl + k ][ yCb + yBl + j ] (1246)
[0489] p i,k = recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] (1247)
[0490] The variable qpOffset is derived as follows:
[0491] - If sps_ladf_enabled_flag is equal to 1, the following applies:
[0492] - The variable lumaLevel that is used to reconstruct the luma level is derived as follows:
[0493] lumaLevel = ( ( p 0,0 + p 0,3 + q 0,0 + q 0,3 ) >> 2 ) (1248)
[0494] - The variable qpOffset is set equal to sps_ladf_lowest_interval_qp_offset and modified as follows:
[0495]
[0496] - Otherwise, qpOffset is set equal to 0.
[0497] The variables Qp Q and Qp P are set equal to the Qp Y values of the coding units that include the coding blocks containing the samples q 0,0 and p 0,0 respectively.
[0498] The variable qP is derived as follows:
[0499] qP = ( ( Qp Q + Qp P + 1 ) >> 1 ) + qpOffset (1250)
[0500] The value of the variable β' is determined based on the quantization parameter Q according to the specification of Table 43, where the quantization parameter Q is derived as follows:
[0501] Q=Clip3(0,63,qP+(sh_luma_beta_offset_div2<<1)) (1251)
[0502] Where sh_luma_beta_offset_div2 contains sample points q 0,0 The value of the syntax element sh_luma_beta_offset_div2 for the stripe.
[0503] The variable β is derived as follows:
[0504] β=β′*(1<<(BitDepth-8)) (1252)
[0505] variable t C The value of ′ is determined based on the quantization parameter Q according to the provisions of Table 43, where the quantization parameter Q is derived as follows:
[0506] Q=Clip3(0,65,qP+2*(bS-1)+(sh_luma_tc_offset_div2<<1)) (1253)
[0507] Where sh_luma_tc_offset_div2 is the value containing sample point q 0,0 The value of the syntax element sh_luma_tc_offset_div2 for the stripe.
[0508] variable t C Export as follows:
[0509] roundOffset=1<<(9-BitDepth) (1254)
[0510] t C =BitDepth<10? (t) C ′+roundOffset)>>(10-BitDepth):
[0511] t C ′*(1<<(BitDepth-10)) (1255)
[0512] Apply the following sequence of steps:
[0513] 1. The variables dp0, dp3, dq0, and dq3 are exported as follows:
[0514] dp0 = Abs(p 2,0 -2*p 1,0 +p 0,0 (1256)
[0515] dp3 = Abs(p2,3 - 2 * p 1,3 + p 0,3 ) (1257)
[0516] dq0 = Abs(q 2,0 - 2 * q 1,0 + q 0,0 ) (1258)
[0517] dq3 = Abs(q 2,3 - 2 * q 1,3 + q 0,3 ) (1259)
[0518] 2. When maxFilterLengthP and maxFilterLengthQ are both equal to or greater than 3, the variables spO, sqO, spqO, sp3, sq3 and spq3 are derived as follows:
[0519] spO = Abs(p 3,0 - p 0,0 ) (1260)
[0520] sqO = Abs(q 0,0 - q 3,0 ) (1261)
[0521] spqO = Abs(p 0,0 - q 0,0 ) (1262)
[0522] sp3 = Abs(p 3,3 - p 0,3 ) (1263)
[0523] sq3 = Abs(q 0,3 - q 3,3 ) (1264)
[0524] spq3 = Abs(p 0,3 - q 0,3 ) (1265)
[0525] 3. The variables sidePisLargeBlk and sideQisLargeBlk are set equal to 0.
[0526] 4. When maxFilterLengthP is greater than 3, sidePisLargeBlk is set equal to 1.
[0527] 5. When maxFilterLengthQ is greater than 3, sideQisLargeBlk is set equal to 1.
[0528] 6. When edgeType is equal to EDGE_HOR and (yCb + yBl) % CTBsizeY is equal to 0, sidePisLargeBlk is set equal to 0.
[0529] 7. The variables dSam0 and dSam3 are initialized to 0.
[0530] 8. When sidePisLargeBlk or sideQisLargeBlk is greater than 0, the following applies:
[0531] a. The variables dp0L, dp3L are derived and maxFilterLengthP is modified as follows:
[0532] - If sidePisLargeBlk is equal to 1, the following applies:
[0533] dp0L = (dp0 + Abs(p 5,0 - 2 * p 4,0 + p 3,0 ) + 1) » 1 (1266)
[0534] dp3L = (dp3 + Abs(p 5,3 - 2 * p 4,3 + p 3,3 ) + 1) » 1 (1267)
[0535] - Otherwise, the following applies:
[0536] dp0L = dp0 (1268)
[0537] dp3L = dp3 (1269)
[0538] maxFilterLengthP = 3 (1270)
[0539] b. The variables dq0L and dq3L are derived as follows:
[0540] - If sideQisLargeBlk is equal to 1, the following applies:
[0541] dq0L = (dq0 + Abs(q 5,0 - 2 * q 4,0 + q 3,0 ) + 1) » 1 (1271)
[0542] dq3L = (dq3 + Abs(q 5,3 - 2 * q 4,3 + q 3,3 ) + 1) » 1 (1272)
[0543] - Otherwise, the following applies:
[0544] dq0L = dq0 (1273)
[0545] dq3L = dq3 (1274)
[0546] c. The variables sp0Land sp3Land derived as follows:
[0547] - If maxFilterLengthP is equal to 7, the following applies:
[0548] sp0L = sp0 + Abs(p 7,0 -p 6,0 -p 5,0 +p 4,0 ) (1275)
[0549] sp3L = sp3 + Abs(p 7,3 -p 6,3 -p 5,3 +p 4,3 ) (1276)
[0550] - Otherwise, the following applies:
[0551] sp0L = sp0 (1277)
[0552] sp3L = sp3 (1278)
[0553] d. The variables sq0Land sq3Land derived as follows:
[0554] - If maxFilterLengthQ is equal to 7, the following applies:
[0555] sq0L = sq0 + Abs(q 4,0 -q 5,0 -q 6,0 +q 7,0 ) (1279)
[0556] sq3L = sq3 + Abs(q 4,3 -q 5,3 -q 6,3 +q 7,3 ) (1280)
[0557] - Otherwise, the following applies:
[0558] sq0L = sq0 (1281)
[0559] sq3L = sq3 (1282)
[0560] e. The variables dpq0L, dpq3Land dLand derived as follows:
[0561] dpq0L = dp0L + dq0L (1283)
[0562] dpq3L = dp3L + dq3L (1284)
[0563] dL = dpq0L + dpq3L (1285)
[0564] f. When dL is less than β, the following sequential steps apply:
[0565] i. The variable dpq is set equal to 2*dpq0L.
[0566] ii. The variable sp is set equal to sp0L, the variable sq is set equal to sq0L, and the variable spq is set equal to spq0.
[0567] iii. The variables p0, p3, q o and q3 are first initialized to 0, and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows:
[0568] - When sidePisLargeBlk is equal to 1, the following apply:
[0569] p3 = p 3,0 (1286)
[0570] p0 = p maxFilterLengthP,0 (1287)
[0571] - When sideQisLargeBlk is equal to 1, the following apply:
[0572] q3 = q 3,0 (1288)
[0573] q0 = q maxFilterLengthQ,0 (1289)
[0574] iv. For the sample position (xCb+xBl, yCb+yBl), the decision process for luma samples as specified in subclause 8.8.3.6.6 is invoked with the sample values p0, p3, q0, q3, the variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t C as inputs, and the output is assigned to the decision dSam0.
[0575] v. The variable dpq is set equal to 2*dpq3L.
[0576] vi. The variable sp is set equal to sp3L, the variable sq is set equal to sq3L, and the variable spq is set equal to spq3.
[0577] vii. The variables p0, p3, q0, q3 are first initialized to 0, and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows:
[0578] - When sidePisLargeBlk is equal to 1, the following applies:
[0579] p3 = p 3,3 (1290)
[0580] p0 = p maxFilterLengthP,3 (1291)
[0581] - When sideQisLargeBlk is equal to 1, the following applies:
[0582] q3 = q 3,3 (1292)
[0583] q0 = q maxFilterLengthQ,3 (1293)
[0584] viii. When edgeType is equal to EDGE_VER for the sample position (xCb+xBl, yCb+yBl+3) or edgeType is equal to EDGE_HOR for the sample position (xCb+xBl+3, yCb+yBl), the decision process for luma samples as specified in subclause
[0585] 8.8.3.6.6 is invoked with the sample values p0, p3, q0, q3, the variables dpq, sp, sq, spq,
[0586] sidePisLargeBlk, sideQisLargeBlk, β and t as inputs, and the output is assigned to the decision dSam3.
[0587] C as specified in subclause
[0588] 8.8.3.6.6, and the output is assigned to the decision dSam3.
[0589] 9. The variables dE, dEp and dEq are derived as follows:
[0590] - If both dSam0 and dSam3 are equal to 1, the variable dE is set equal to 3, dEp is set equal to 1, and dEq is set to 1.
[0591] - Otherwise, the following sequential steps apply:
[0592] a. The variables dpq0, dpq3, dp, dq and d are derived as follows:
[0593] dpq0 = dp0 + dq0 (1294)
[0594] dpq3 = dp3 + dq3 (1295)
[0595] dp = dp0 + dp3 (1296)
[0596] dq = dq0 + dq3 (1297)
[0597] d = dpq0 + dpq3 (1298)
[0598] b. The variables dE, dEp, dEq, sidePisLargeBlk and sideQisLargeBlk are set equal to 0.
[0599] c. When d is smaller than β and both maxFilterLengthP and maxFilterLengthQ are larger than 2, the following sequence of steps applies:
[0600] i. The variable dpq is set equal to 2*dpq0.
[0601] ii. The variable sp is set equal to sp0, the variable sq is set equal to sq0 and the variable spq is set equal to spq0.
[0602] iii. For the sample position (xCb + xBl, yCb + yBl), the variables p0, p3, q0, q3, dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t are set equal to 0. C As input, the decision process for luma samples as specified in subclause 8.8.3.6.6 is invoked and the output is assigned to the decision dSam0.
[0603] iv. The variable dpq is set equal to 2*dpq3.
[0604] v. The variable sp is set equal to sp3, the variable sq is set equal to sq3 and the variable spq is set equal to spq3.
[0605] vi. When edgeType is equal to EDGE_VER for the sample position (xCb + xBl, yCb + yBl + 3) or when edgeType is equal to EDGE_HOR for the sample position (xCb + xBl + 3, yCb + yBl), the variables p0, p3, q0, q3, the variable dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t are all set equal to 0 C As input, the sample decision process specified in subclause 8.8.3.6.6 is invoked and the output is assigned to the decision dSam3.
[0606] d. When d is less than β, the following ordered steps apply:
[0607] i. The variable dE is set equal to 1.
[0608] ii. When dSam0 is equal to 1 and dSam3 is equal to 1, the variable dE is set equal to 2 and maxFilterLengthP and maxFilterLengthQ are set equal to 3.
[0609] iii. When maxFilterLengthP is greater than 1 and maxFilterLengthQ is greater than 1 and dp is less than (β + (β » 1)) » 3, the variable dEp is set equal to 1.
[0610] iv. When maxFilterLengthP is greater than 1 and maxFilterLengthQ is greater than 1 and dq is less than (β + (β » 1)) » 3, the variable dEq is set equal to 1.
[0611] v. When dE is equal to 1, maxFilterLengthP is set equal to 1 + dEp and maxFilterLengthQ is set equal to 1 + dEq.
[0612] Table 43 - Derivation of threshold variables β' and t from input Q C '
[0613] Q 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 β′ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 <![CDATA[t C ′]]> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Q 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 β′ 7 8 9 10 11 12 13 14 15 16 17 18 20 22 24 26 28 t C ′]]> 0 3 4 4 4 4 5 5 5 5 7 7 8 9 10 10 11 Q 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 β′ 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 t C ′]]> 13 14 15 17 19 21 24 25 29 33 36 41 45 51 57 64 71 Q 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 β′ 64 66 68 70 72 74 76 78 80 82 84 86 88 - - t C ′]]> 80 89 100 112 125 141 157 177 198 222 250 280 314 352 395
[0614] 8.8.3.6.3 Filtering process for luma block edges
[0615] The inputs of this process comprise:
[0616] - the picture sample array recPicture,
[0617] - the position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[0618] - position (xBl, yBl) specifying the top-left sample of the current block relative to the top-left sample of the current coding block,
[0619] - variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge,
[0620] - variables dE, dEp and dEq containing decisions,
[0621] - variables maxFilterLengthP and maxFilterLengthQ containing the maximum filter length,
[0622] - variable t C .
[0623] The output of the process is the modified picture sample array recPicture.
[0624] Depending on the value of edgeType, the following applies:
[0625] - if edgeType is equal to EDGE_VER, the following sequential steps apply:
[0626] 1. samples i = 0..maxFilterLengthP, j = 0..maxFilterLengthQ and k = 0..3
[0627] values p i,k and q j,k are derived as follows:
[0628] q j,k = recPicture[xCb+xBl+j][yCb+yBl+k] (1299)
[0629] p i,k = recPicture[xCb+xBl-i-1][yCb+yBl+k] (1300)
[0630] 2. When dE is not equal to 0 and dE is not equal to 3, for each sample position (xCb+xBl, yCb+yBl+k), k = 0..3, the following sequential steps apply:
[0631] a. with samples values p i,k , q j,k , decisions dE, variables dEp and dEq, and variable tC As input, and with the number of filter samples nDp and nDq from each side of the block boundary, and the filter sample values p i ' and q j ' as output, the filtering process for luma samples using short filters as specified in subclause 8.8.3.6.7 is invoked.
[0632] b. When nDp is greater than 0, the filter sample values p i ' for i = 0..nDp - 1 replace the corresponding samples inside the sample array recPicture as follows:
[0633] recPicture[xCb+xBl-i-1][yCb+yBl+k] = p i ' (1301)
[0634] c. When nDq is greater than 0, the filter sample values q j ' for j = 0..nDq - 1 replace the corresponding samples inside the sample array recPicture as follows:
[0635] recPicture[xCb+xBl+j][yCb+yBl+k] = q j ' (1302)
[0636] 3. When dE is equal to 3, for each sample position (xCb+xBl, yCb+yBl+k), k = 0..3, the following sequence of steps applies:
[0637] a. With the variables maxFilterLengthP, maxFilterLengthQ, the sample values p i,k , q j,k , and t C for i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ as input, and with the filtered sample values p i ' and q j ' as output, the filtering process for luma samples using long filters as specified in subclause 8.8.3.6.8 is invoked.
[0638] b. The filter sample values p i ' for i = 0..maxFilterLengthP - 1 replace the corresponding samples inside the sample array recPicture as follows:
[0639] recPicture[xCb+xBl-i-1][yCb+yBl+k] = p i ' (1303)
[0640] cj = 0..maxFilterLengthQ-1, the filter sample value q j Replace the corresponding sample points inside the sample point array recPicture, as shown below:
[0641] recPicture[xCb+xBl+j][yCb+yBl+k]=q j ′ (1304)
[0642] – Otherwise (edgeType equals EDGE_HOR), the following sequence of steps applies:
[0643] 1. Sample values p where i = 0..maxFilterLengthP, j = 0..maxFilterLengthQ, and k = 0..3 i,k and q j,k Export as follows:
[0644] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j] (1305)
[0645] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (1306)
[0646] 2. When dE is not equal to 0 and dE is not equal to 3, for each sample point location (xCb+xBl+k, yCb+yBl), k = 0..3, the following sequential steps apply:
[0647] a. Using the sample values p of variables maxFilterLengthP, maxFilterLengthQ, i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i,k q j,k Decision dE, variables dEp and dEq, and variable t C As input, along with the number of filtered samples nDp and nDq from each side of the block boundary, and the filtered sample value p i ′ and q j As output, the filtering procedure for the luminance samples using a short filter, as specified in sub-clause 8.8.3.6.7, is invoked.
[0648] b. When nDp is greater than 0, the filtered sample value p of i = 0..nDp–1 i Replace the corresponding sample points inside the sample point array recPicture, as shown below:
[0649] recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] = p i ′ (1307)
[0650] c. When nDq is greater than 0, the filtered sample values q j ′ replace the corresponding samples inside the sample array recPicture as follows:
[0651] recPicture[ xCb + xBl + k ][ yCb + yBl + j ] = q j ′ (1308)
[0652] 3. When dE is equal to 3, for each sample position ( xCb + xBl + k, yCb + yBl ), k = 0..3, the following sequence of steps applies:
[0653] a. The filtered sample values p i,k , q j,k , and the variable tC with the variables maxFilterLengthP, maxFilterLengthQ, i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ as input, and the filtered sample values p i ′ and q j ′ as output, the filtering process for luma samples using long filters as specified in subclause 8.8.3.6.8 is invoked.
[0654] b. The filtered sample values p i ′ replace the corresponding samples inside the sample array recPicture as follows:
[0655] recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] = p i ′ (1309)
[0656] c. The filtered sample values q j ′ replace the corresponding samples inside the sample array recPicture as follows:
[0657] recPicture[ xCb + xBl + k ][ yCb + yBl + j ] = q j ′ (1310)
[0658] 8.8.3.6.4 Decision process for chroma block edges
[0659] The process is invoked only when sps_chroma_format_idc is not equal to 0.
[0660] The inputs of the process comprise:
[0661] - the chroma picture sample array recPicture,
[0662] - the chroma position (xCb, yCb) specifying the top-left sample of the current chroma coding block relative to the top-left chroma sample of the current picture,
[0663] - the chroma position (xBl, yBl) specifying the top-left sample of the current chroma block relative to the top-left sample of the current chroma coding block,
[0664] - the variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge,
[0665] - the variable cldx, the color component index,
[0666] - the variable bS specifying the boundary filter strength,
[0667] - the variable maxFilterLengthP specifying the maximum filter length,
[0668] - the variable maxFilterLengthQ specifying the maximum filter length.
[0669] The output of the process is
[0670] - the modified filter length variables maxFilterLengthP and maxFilterLengthQ,
[0671] - the variable t C .
[0672] The variable maxK is derived as follows:
[0673] - if edgeType is equal to EDGE_VER, the following applies:
[0674] maxK = (SubHeightC == 1)? 3 : 1 (1311)
[0675] - else (edgeType is equal to EDGE_HOR), the following applies:
[0676] maxK = (SubWidthC == 1)? 3 : 1 (1312)
[0677] The values of i = 0..maxFilterLengthP, j = 0..maxFilterLengthQ, and k = 0..maxK are p. i,k and q j,k Export as follows:
[0678] –If edgeType equals EDGE_VER, the following applies:
[0679] q j,k =recPicture[xCb+xBl+j][yCb+yBl+k] (1313)
[0680] p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (1314)
[0681] subSampleC=SubHeightC (1315)
[0682] – Otherwise (edgeType equals EDGE_HOR), the following applies:
[0683] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j] (1316)
[0684] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (1317)
[0685] subSampleC = SubWidthC (1318)
[0686] variable Qp P Export as follows:
[0687] – Brightness position (xTb) P ,yTb P Set as a value relative to the brightness sample point in the upper left corner of the image, including sample point p. 0,0 The position of the upper left brightness sample point of the transform block.
[0688] –If TuCResMode[xTb P ][yTb P If ] equals 2, then Qp P Set to equal to the sample point p 0,0 Qp′ of the transform block CbCr .
[0689] Otherwise, if cIdx equals 1, then Qp P Set to equal to the sample point p0,0 Qp′ of the transform block Cb .
[0690] Otherwise, Qp P Set to equal to the sample point p 0,0 Qp′ of the transform block Cr .
[0691] variable Qp Q Export as follows:
[0692] – Brightness position (xTb) Q ,yTb Q Set as the value containing sample q relative to the brightness sample point in the upper left corner of the image. 0,0 The position of the upper left brightness sample point of the transform block.
[0693] –If TuCResMode[xTb Q ][yTb Q If ] equals 2, then Qp Q Set to equal to the number of sample points q 0,0 Qp′ of the transform block CbCr .
[0694] Otherwise, if cIdx equals 1, then Qp Q Set to equal to the number of sample points q 0,0 Qp′ of the transform block Cb .
[0695] Otherwise, Qp Q Set to equal to the number of sample points q 0,0 Qp′ of the transform block Cr .
[0696] variable Qp C Export as follows:
[0697] Qp C =(Qp Q -QpBdOffset+Qp P -QpBdOffset+1)>>1 (1319)
[0698] The value of variable β′ is determined based on the quantization parameter Q according to the provisions of Table 43, where the quantization parameter Q is derived as follows:
[0699] sliceBetaOffsetDiv2=(cIdx==1?sh_cb_beta_offset_div2:
[0700] sh_cr_beta_offset_div2)
[0701] Q = Clip3(0, 63, Qp + sliceBetaOffsetDiv2 « 1) (1320) C
[0702] where sh_cb_beta_offset_div2 and sh_cr_beta_offset_div2 are the values of the syntax elements sh_cb_beta_offset_div2 and sh_cr_beta_offset_div2, respectively, of the slice containing the sample q 0,0 .
[0703] The variable β is derived as follows:
[0704] β = β' * (1 « (BitDepth - 8)) (1321)
[0705] The value of the variable t C ' is determined based on the chroma quantization parameter Q according to the specification of Table 43, where the chroma quantization parameter Q is derived as follows:
[0706] sliceTcOffsetDiv2 = (cIdx == 1? sh_cb_tc_offset_div2 :
[0707] sh_cr_tc_offset_div2)
[0708] Q = Clip3(0, 65, Qp + 2 * (bS - 1) + (sliceTcOffsetDiv2 « 1)) (1322) C
[0709] where sh_cb_tc_offset_div2 and sh_cr_tc_offset_div2 are the values of the syntax elements sh_cb_tc_offset_div2 and sh_cr_tc_offset_div2, respectively, of the slice containing the sample q 0,0 .
[0710] The value of the variable t C is derived as follows:
[0711] t C = (BitDepth < 10)? (t C ' + 2) » (10 - BitDepth) :
[0712] t C ' * (1 « (BitDepth - 10)) (1323)
[0713] When maxFilterLengthP and maxFilterLengthQ are both equal to 1 and bS is not equal to 2, maxFilterLengthP and maxFilterLengthQ are both set equal to 0.
[0714] When maxFilterLengthQ is equal to 3, the following sequential steps apply:
[0715] 1. The variable n1 is derived as follows:
[0716] n1 = subSampleC == 2? 1 : 3 (1324)
[0717] 2. When maxFilterLengthP is equal to 1, the samples p 3,0 and p 2,0 are both set equal to p 1,0 , and the samples p 3,n1 , p 2,n1 are both set equal to p 1,n1 .
[0718] 3. The variables dpq0, dpq1, dp, dq and d are derived as follows:
[0719] dp0 = Abs(p 2,0 - 2 * p 1,0 + p 0,0 ) (1325)
[0720] dp1 = Abs(p 2,n1 - 2 * p 1,n1 + p 0,n1 ) (1326)
[0721] dq0 = Abs(q 2,0 - 2 * q 1,0 + q 0,0 ) (1327)
[0722] dq1 = Abs(q 2,n1 - 2 * q 1,n1 + q 0,n1 ) (1328)
[0723] dpq0 = dp0 + dq0 (1329)
[0724] dpq1 = dp1 + dq1 (1330)
[0725] dp = dp0 + dp1 (1331)
[0726] dq = dq0 + dq1 (1332)
[0727] d = dpq0 + dpq1 (1333)
[0728] 4. The variables dSam0 and dSam1 are both set equal to 0.
[0729] 5. When d is smaller than β, the following sequential steps apply:
[0730] a. The variable dpq is set equal to 2*dpq0.
[0731] b. For the sample positions (xCb+xBl, yCb+yBl), with the sample values p 0,0 , p 3,0 , q 0,0 and q 3,0 , the variable dpq, β and t C as inputs, the variable dSam0 is derived by invoking the decision process for chroma samples as specified in subclause 8.8.3.6.9 and the output is assigned to the decision dSam0.
[0732] c. The variable dpq is set equal to 2*dpq1.
[0733] d. The variable dSam1 is modified as follows:
[0734] - If edgeType is equal to EDGE_VER, for the sample positions (xCb+xBl, yCb+yBl+n1), with the sample values p 0,n1 , p 3,n1 , q 0,n1 and q 3,n1 , the variable dpq, β and t C as inputs, the decision process for chroma samples as specified in subclause 8.8.3.6.9 is invoked and the output is assigned to the decision dSam1.
[0735] - Otherwise (edgeType is equal to EDGE_HOR), for the sample positions (xCb+xBl+n1, yCb+yBl), with the sample values p 0,n1 , p 3,n1 , q 0,n1 and q 3,n1 , the variable dpq, β and t C as inputs, the decision process for chroma samples as specified in subclause 8.8.3.6.9 is invoked and the output is assigned to the decision dSam1.
[0736] 6. When dSam0 is equal to 0 or dSam1 is equal to 0, both maxFilterLengthP and maxFilterLengthQ are set equal to 1.
[0737] 8.8.3.6.5 Filter process for chroma block edges
[0738] The process is invoked only if sps_chroma_format_idc is not equal to 0.
[0739] The inputs of the process comprise:
[0740] - the chroma picture sample array recPicture,
[0741] - the chroma position (xCb, yCb) specifying the top-left sample of the current chroma coding block relative to the top-left chroma sample of the current picture,
[0742] - the chroma position (xBl, yBl) specifying the top-left sample of the current chroma block relative to the top-left sample of the current chroma coding block,
[0743] - the variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge,
[0744] - the variable maxFilterLengthP specifying the maximum filter length,
[0745] - the variable maxFilterLengthQ specifying the maximum filter length,
[0746] - the variable tC.
[0747] The output of the process is the modified chroma picture sample array recPicture.
[0748] The variable maxK is derived as follows:
[0749] - if edgeType is equal to EDGE_VER, the following applies:
[0750] maxK = (SubHeightC == 1)? 3 : 1 (1334)
[0751] - else (edgeType is equal to EDGE_HOR), the following applies:
[0752] maxK = (SubWidthC == 1)? 3 : 1 (1335)
[0753] for i = 0..maxFilterLengthP i,k for j = 0..maxFilterLengthQ j,k and k = 0..maxK, the values are derived as follows:
[0754] - if edgeType is equal to EDGE_VER, the following applies:
[0755] q j,k =recPicture[xCb+xBl+j][yCb+yBl+k] (1336)
[0756] p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (1337)
[0757] – Otherwise (edgeType equals EDGE_HOR), the following applies:
[0758] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j] (1338)
[0759] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (1339)
[0760] Depending on the value of edgeType, the following applies:
[0761] – If edgeType equals EDGE_VER, for each sample point location (xCb+xBl, yCb+yBl+k), k = 0..maxK, the following sequential steps apply:
[0762] 1. Using the variables maxFilterLengthP and maxFilterLengthQ, and the sample values p of i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i,k q j,k and with variable t C The input is a filter sample value p with i = 0..maxFilterLengthP-1 and j = 0..maxFilterLengthQ–1. i ′ and q j As output, call the sub-clause
[0763] The filtering process for chromaticity samples as specified in 8.8.3.6.10.
[0764] 2. The filter sample values p where i = 0..maxFilterLengthP-1 and j = 0..maxFilterLengthQ-1 i ′ and q j Replace the corresponding sample points inside the sample point array recPicture, as shown below:
[0765] recPicture[xCb + xBl + j][yCb + yBl + k] = q j ′ (1340)
[0766] recPicture[xCb + xBl - i - 1][yCb + yBl + k] = p i ′ (1341)
[0767] - Otherwise (edgeType is equal to EDGE_HOR), for each sample position (xCb + xBl + k, yCb + yBl), k = 0..maxK, the following ordered steps apply:
[0768] 1. With the variable maxFilterLengthP and maxFilterLengthQ, i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ sample values p i,k , q j,k , and the variable t C as input, and with the filtered sample values pi' and qj' for i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 as output, the filtering process for chroma samples as specified in subclause 8.8.3.6.10 is invoked.
[0769] 2. The filtered sample values p i ' and q j ' for i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 replace the corresponding samples within the sample array recPicture as follows:
[0770] recPicture[xCb + xBl + k][yCb + yBl + j] = q j ′ (1342)
[0771] recPicture[xCb + xBl + k][yCb + yBl - i - 1] = p i ′ (1343)
[0772] 8.8.3.6.6 Decision process for luma samples
[0773] The inputs to the process include:
[0774] - the sample values p0, p3, q0 and q3,
[0775] - the variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t C .
[0776] The output of this process is the variable dSam containing the decision.
[0777] The variables sp and sq are modified as follows:
[0778] - When sidePisLargeBlk is equal to 1, the following applies:
[0779] sp = (sp + Abs(p3 - p0) + 1) » 1 (1344)
[0780] - When sideQisLargeBlk is equal to 1, the following applies:
[0781] sq = (sq + Abs(q3 - q0) + 1) » 1 (1345)
[0782] The variables sThr1 and sThr2 are derived as follows:
[0783] - If sidePisLargeBlk is equal to 1 or sideQisLargeBlk is equal to 1, the following applies:
[0784] sThr1 = 3 * β » 5 (1346)
[0785] sThr2 = β » 4 (1347)
[0786] - Otherwise, the following applies:
[0787] sThr1 = β » 3 (1348)
[0788] sThr2 = β » 2 (1349)
[0789] The variable dSam is specified as follows:
[0790] - If all the following conditions are true, dSam is set equal to 1:
[0791] - dpq is less than sThr2,
[0792] - sp + sq is less than sThr1,
[0793] - spq is less than (5 * t C + 1) » 1.
[0794] - Otherwise, dSam is set equal to 0.
[0795] 8.8.3.6.7 Filtering process using short filtered luma samples
[0796] The input of the process comprises:
[0797] - the variables maxFilterLengthP and maxFilterLengthQ,
[0798] - the sample values p for i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i and q j ,
[0799] - the variable dE,
[0800] - the variables dEp and dEq containing the decision for the filter samples p1 and q1 respectively,
[0801] - the variable t C .
[0802] The output of the process comprises:
[0803] - the number of filtered samples nDp and nDq,
[0804] - the filtered sample values p i ' and q j ' for i = 0..nDp - 1, j = 0..nDq - 1.
[0805] Depending on the value of dE, the following applies:
[0806] - if the variable dE is equal to 2, both nDp and nDq are set equal to 3 and the following strong filtering applies:
[0807] p0' = Clip3(p0 - 3 * t C , p0 + 3 * t C , (p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) » 3) (1350)
[0808] p1' = Clip3(p1 - 2 * t C , p1 + 2 * t C , (p2 + p1 + p0 + q0 + 2) » 2) (1351)
[0809] p2' = Clip3(p2 - 1 * t C , p2 + 1 * t C , (2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) » 3) (1352)
[0810] q0' = Clip3(q0 - 3 * t C,q0+3*t C ,(p1+2*p0+2*q0+2*q1+q2+4)>>3) (1353)
[0811] q1′=Clip3(q1-2*t C ,q1+2*t C ,(p0+q0+q1+q2+2)>>2) (1354)
[0812] q2′=Clip3(q2-1*t C ,q2+1*t C ,(p0+q0+q1+3*q2+2*q3+4)>>3) (1355)
[0813] Otherwise, both nDp and nDq are set to 0, and the following weak filtering applies:
[0814] – The following applies:
[0815] Δ=(9*(q0-p0)-3*(q1-p1)+8)>>4 (1356)
[0816] – When Abs(Δ) is less than t C *10. The following sequence of steps applies:
[0817] – The filter sample values p0′ and q0′ are specified as follows:
[0818] Δ=Clip3(-t C ,t C ,Δ) (1357)
[0819] p0′=Clip1(p0+Δ) (1358)
[0820] q0′=Clip1(q0-Δ) (1359)
[0821] – When dEp equals 1, the filter sample value p1′ is specified as follows:
[0822] Δp=Clip3(-(t C >>1),t C >>1,(((p2+p0+1)>>1)-p1+Δ)>>1) (1360)
[0823] p1′=Clip1(p1+Δp) (1361)
[0824] – When dEq equals 1, the filter sample value q1′ is specified as follows:
[0825] Δq=Clip3(-(t C >>1),tC >>1, (((q2 + q0 + 1) » 1) - q1 - D) » 1) (1362)
[0826] q1' = Clip1(q1 + Dq) (1363)
[0827] - nDp is set equal to dEp + 1 and nDq is set equal to dEq + 1.
[0828] When nDp is greater than 0 and pred_mode_plt_flag equal to 1 for the coding unit including the coding block containing sample p0, nDp is set equal to 0.
[0829] When nDq is greater than 0 and pred_mode_plt_flag equal to 1 for the coding unit including the coding block containing sample q0, nDq is set equal to 0:
[0830] 8.8.3.6.8 Filtering process using long filtered luma samples
[0831] The inputs of the process include:
[0832] - the variables maxFilterLengthP and maxFilterLengthQ,
[0833] - the sample values p for i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i and q j ,
[0834] - the variable t C .
[0835] The outputs of the process include:
[0836] - the filtered sample values p i ' and q j ' for i = 0..maxFilterLengthP - 1, j = 0..maxFilterLengthQ - 1.
[0837] The variable refMiddle is derived as follows:
[0838] - If maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is equal to 5, the following applies:
[0839] refMiddle = (p4 + p3 + 2 * (p2 + p1 + p0 + q0 + q1 + q2) + q3 + q4 + 8) » 4 (1364)
[0841] - Otherwise, if maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is not equal to 5, the following applies:
[0842] refMiddle = (p6 + p5 + p4 + p3 + p2 + p1 + 2 * (p0 + q0) + q1 + q2 + q3 + q4 + q5 + q6 + 8) » 4 (1365)
[0843] - Otherwise, if one of the following conditions is true:
[0844] - maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 5,
[0845] - maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 7,
[0846] the following applies:
[0847] refMiddle = (p5 + p4 + p3 + p2 + 2 * (p1 + p0 + q0 + q1) + q2 + q3 + q4 + q5 + 8) » 4 (1366)
[0848] - Otherwise, if one of the following conditions is true:
[0849] - maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 3,
[0850] - maxFilterLengthQ is equal to 3 and maxFilterLengthP is equal to 5,
[0851] the following applies:
[0852] refMiddle = (p3 + p2 + p1 + p0 + q0 + q1 + q2 + q3 + 4) » 3 (1367)
[0853] - Otherwise, if maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 3, the following applies:
[0854] refMiddle = (2 * (p2 + p1 + p0 + q0) + p0 + p1 + q1 + q2 + q3 + q4 + q5 + q6 + 8) » 4 (1368)
[0855] - Otherwise, the following applies:
[0856] refMiddle = ( p6 + p5 + p4 + p3 + p2 + pi + 2 * ( q2 + qi + qo + po ) + qo + qi + 8 ) » 4 (1369) The variables refP and refQ are derived as follows:
[0857] refP = ( p maxFilterLengtP + p maxFilterLengthP-1 + 1 ) » 1 (1370)
[0858] refQ = ( q maxFilterLengtQ + q maxFilterLengthQ-1 + 1 ) » 1 (1371)
[0859] The variables f i and t C PD i are defined as follows:
[0860] - If maxFilterLengthP is equal to 7, the following apply:
[0861] f 0..6 = { 59, 50, 41, 32, 23, 14, 5} (1372)
[0862] t C PD 0..6 = { 6, 5, 4, 3, 2, 1, 1} (1373)
[0863] - Else if maxFilterLengthP is equal to 5, the following apply:
[0864] f 0..4 = { 58, 45, 32, 19, 6} (1374)
[0865] t C PD 0..4 = { 6, 5, 4, 3, 2} (1375)
[0866] - Else, the following apply:
[0867] f 0..2 = { 53, 32, 11} (1376)
[0868] t C PD 0..2 = { 6, 4, 2} (1377)
[0869] The variables g j and t C QD j are defined as follows:
[0870] - If maxFilterLengthQ is equal to 7, the following apply:
[0871] g 0..6 ={59,50,41,32,23,14,5} (1378)
[0872] t C QD 0..6 ={6,5,4,3,2,1,1} (1379)
[0873] Otherwise, if maxFilterLengthQ equals 5, the following applies:
[0874] g 0..4 ={58,45,32,19,6} (1380)
[0875] t C QD 0..4 ={6,5,4,3,2} (1381)
[0876] –Otherwise, the following applies:
[0877] g 0..2 ={53,32,11} (1382)
[0878] t C QD 0..2 ={6,4,2} (1383)
[0879] The filter sample value p where i = 0..maxFilterLengthP-1 and j = 0..maxFilterLengthQ-1 i ′ and q j Export as follows:
[0880] p i =Clip3(p i -(t C *t C PD i >>1),p i +(t C *t C PD i >>1),(refMiddle*f i +refP*(64-f i )+32)>>6) (1384)
[0881] q j =Clip3(q) j -(t C *t C QD j >>1),q j +(t Ct C QD j >>1),(refMiddle*g j +refQ*(64-g j )+32)>>6) (1385)
[0882] When pred_mode_plt_flag of the coding unit including the coded block containing sample p i is equal to 1, the filtered sample value p i ' is replaced by the corresponding input sample value p i for i = 0..maxFilterLengthP - 1.
[0883] When pred_mode_plt_flag of the coding unit including the coded block containing sample q i is equal to 1, the filtered sample value q i ' is replaced by the corresponding input sample value q j for j = 0..maxFilterLengthQ - 1.
[0884] 8.8.3.6.9 Decision process for chroma samples
[0885] The inputs of the process include:
[0886] - the sample values p0, p3, q0 and q3,
[0887] - the variables dpq, β and t C .
[0888] The output of the process is the variable dSam containing the decision.
[0889] The variable dSam is specified as follows:
[0890] - dSam is set equal to 1 if all the following conditions are true:
[0891] - dpq is less than (β » 2),
[0892] - Abs(p3 - p0) + Abs(q0 - q3) is less than (β » 3),
[0893] - Abs(p0 - q0) is less than (5 * t C + 1) » 1.
[0894] - Otherwise, dSam is set equal to 0.
[0895] 8.8.3.6.10 Filtering process for chroma samples
[0896] The process is invoked only if sps_chroma_format_idc is not equal to 0.
[0897] The inputs to the process comprise:
[0898] - variables maxFilterLengthP and maxFilterLengthQ,
[0899] - chroma sample values p for i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i and q j ,
[0900] - variable t C .
[0901] The outputs of the process are filtered sample values p i ' and q j ' for i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1.
[0902] The filtered sample values p i ' and q j ' for i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 are derived as follows:
[0903] - If both maxFilterLengthP and maxFilterLengthQ are equal to 3, the following strong filtering applies:
[0904] p0' = Clip3( p0 - t C , p0 + t C , ( p3 + p2 + p1 + 2 * p0 + q0 + q1 + q2 + 4 ) » 3 ) (1386)
[0905] p1' = Clip3( p1 - t C , p1 + t C , ( 2 * p3 + p2 + 2 * p1 + p0 + q0 + q1 + 4 ) » 3 ) (1387)
[0906] p2' = Clip3( p2 - t C , p2 + t C , ( 3 * p3 + 2 * p2 + p1 + p0 + q0 + 4 ) » 3 ) (1388)
[0907] q0' = Clip3( q0 - t C , q0 + t C , ( 3 * p3 + 2 * p2 + p1 + p0 + 4 ) » 3 ) (1389), (p2 + p1 + p0 + 2 * q0 + q1 + q2 + q3 + 4) » 3) (1389) q1' = Clip3(q1 - t C , q1 + t C , (p1 + p0 + q0 + 2 * q1 + q2 + 2 * q3 + 4) » 3) (1390)
[0908] q2' = Clip3(q2 - t C , q2 + t C , (p0 + q0 + q1 + 2 * q2 + 3 * q3 + 4) » 3) (1391)
[0909] - Otherwise, if the variable maxFilterLengthP is equal to 1 and maxFilterLengthQ is equal to 3, the following filtering applies:
[0910] p0' = Clip3(p0 - t C , p0 + t C , (3 * p1 + 2 * p0 + q0 + q1 + q2 + 4) » 3) (1392)
[0911] q0' = Clip3(q0 - t C , q0 + t C , (2 * p1 + p0 + 2 * q0 + q1 + q2 + q3 + 4) » 3) (1393) q1' = Clip3(q1 - t C , q1 + t C , (p1 + p0 + q0 + 2 * q1 + q2 + 2 * q3 + 4) » 3) (1394)
[0912] q2' = Clip3(q2 - t C , q2 + t C , (p0 + q0 + q1 + 2 * q2 + 3 * q3 + 4) » 3) (1395)
[0913] - Otherwise, the following weak filtering applies:
[0914] D = Clip3(-t C , t C , ( (((q0 - p0) « 2) + p1 - q1 + 4) » 3 )) (1396)
[0915] p0' = Clip1(p0 + D) (1397)
[0916] q0' = Clip1(q0 - D) (1398)
[0917] When including sample pi When the pred_mode_plt_flag of the codec unit of the codec block is equal to 1, the filtered sample value p i The corresponding input sample value p of i = 0..maxFilterLengthP-1 i replace.
[0918] When including sample point q i When the pred_mode_plt_flag of the codec unit of the codec block is equal to 1, the filtered sample value q i The corresponding input sample value q of i = 0..maxFilterLengthQ-1 i replace.
[0919] 4. Question
[0920] Existing VVC designs used for deblocking filtering have the following problems:
[0921] 1) edgeFlags were not properly considered when deriving the boundary strength.
[0922] 2) Blocks encoded and decoded using affine and sub-block-based temporal motion vector prediction (sbTMVP) modes should be considered in different ways.
[0923] 3) In sub-clause 8.8.3.5, the boundary strength decision is based on edgeFlags[xD] i ][yD j Is it equal to 2? That is, only for sub-block boundaries, if p0 or q0 is located in a transform block containing only zero coefficients, the BS value of the current luminance sample can be set to 1.
[0924] 4) Blocks using affine, sub-block-based temporal motion vector prediction (sbTMVP), or DMVR or BDOF encoding / decoding can be similarly processed in terms of filter length (number of samples to be filtered).
[0925] 5. Technical Solution
[0926] To address the aforementioned issues, the following summarized methods are presented. These items should be considered as examples for explaining general concepts and should not be interpreted in a narrow way. Furthermore, these items can be applied individually or in combination in any way.
[0927] 1. To solve the first problem, if condition A is satisfied and edgeFlags[xD]... i ][yD j If ] equals 1 or 2, then bS[xD i ][yD j Set it to equal to 1.
[0928] a. Or, if condition A is met and edgeFlags[ xD i ][ yD j ] is not equal to 0, then
[0929] bS[ xD i ][ yD j ] is set equal to 1.
[0930] b. Or, if condition A is met and edgeFlags[ xD i ][ yD j ] is greater than 0, then
[0931] bS[ xD i ][ yD j ] is set equal to 1.
[0932] c. Or, if condition A is met without considering edgeFlags[ xD i ][ yD j ], then bS[ xD i ][ yD j ] is set equal to 1.
[0933] 2. In one example, condition A in item 1 is met if one or more of the following conditions are true.
[0934] a. Or, condition A in item 1 is met if and only if one or more of the following conditions are true.
[0935] b. The following conditions are:
[0936] 1) The CuPredMode of the sub-block containing sample p0 is different from the CuPredMode of the sub-block containing sample q0.
[0937] 2) Both the sub-block containing sample p0 and the sub-block containing sample q0 are coded in IBC prediction mode, and the absolute difference between the horizontal or vertical components of the block vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample).
[0938] 3) For the prediction of the sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the sub-block containing sample q0.
[0939] Note 1 - Determining whether the reference pictures used for the two coded sub-blocks are the same or different is based only on the reference pictures, not considering whether the prediction is formed using the index in RPL 0 or the index in RPL 1, nor considering whether the index positions within the RPLs are different.
[0940] NOTE 2 - The number of motion vectors used to predict the sub-block of the top-left sample of the coverage (xSb, ySb) is equal to PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb].
[0941] 4) One motion vector is used to predict the sub-block containing sample p0, one motion vector is used to predict the sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the motion vectors used for the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample).
[0942] 5) Two motion vectors and two different reference pictures are used to predict the sub-block containing sample p0, two motion vectors of the same two reference pictures are used to predict the sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two sub-blocks of the same reference picture is greater than or equal to 8 (unit: 1 / 16 luma sample).
[0943] 6) Two motion vectors of the same reference picture are used to predict the sub-block containing sample p0, two motion vectors of the same reference picture are used to predict the sub-block containing sample q0, and the following
[0944] both conditions are true:
[0945] a. The absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample), or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample).
[0946] b. The absolute difference between the horizontal or vertical components of the list 0 motion vector used in the prediction of the sub-block containing sample p0 and the list 1 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma sample), or the absolute difference between the horizontal or vertical components of the list 1 motion vector used in the prediction of the sub-block containing sample p0 and the list 0 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma sample).3. In one example, entry 1 is only performed when cldx is equal to 0.
[0947] 4. In one example, bS[xD i ][yD j ] is set according to the following rules:
[0948] - If cldx is equal to 0 and both samples p0 and q0 are located in a coded block for which intra bdpcm luma flag is equal to 1, then bS[xD i ][yDj ] is set equal to 0.
[0949] - Otherwise, if cldx is greater than 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm chroma flag is equal to 1, then bS[xD i ][yD j ] is set equal to 0.
[0950] - Otherwise, if sample p0 or q0 is located in a coding block of the coding unit that is coded with CuPredMode equal to MODE INTRA, then bS[xD i ][yD j ] is set equal to 2.
[0951] - Otherwise, if sample p0 or q0 is located in a coding block for which ciip flag is equal to 1, then bS[xD i ][yD j ] is set equal to 2.
[0952] - Otherwise, if the block edge is also a transform block edge and samples p0 and q0 are located in a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set equal to 1.
[0953] - Otherwise, if cldx is equal to 0, then bS[xD i ][yD j ] is set according to the rule in item 1.
[0954] - Otherwise, variable bS[xD i ][yD j ] is set equal to 0.
[0955] 5. For a CU boundary or a coding block boundary or a transform block boundary (e.g., edgeFlags[xDi][yDj] equal to 1), whether to set the BS value to 1 or 0 can follow the same rule as for sub-block boundaries (e.g., in case of edgeFlags[xDi][yDj] equal to 2).
[0956] 6. Whether to set maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) for deblocking and whether to code a block along a boundary (such as block P in JVET-S2001) by sbTMVP mode are decoupled.
[0957] a. In one example, whether to limit the filter length on the P side (e.g., no larger than K (e.g., K = 5)) can only depend on whether the block containing p0 sample is coded in affine mode type.
[0958] b. In one example, whether to limit the filter length on the P side (e.g., no larger than K (e.g., K = 5)) can only depend on whether the block containing p0 sample is coded in affine mode type if the current block containing q0 sample is coded in one subblock mode (e.g., affine mode or sbTMVP mode).
[0959] i. In one example, if the current block containing q0 sample is coded in one subblock mode (e.g., affine mode or sbTMVP mode), and the block containing p0 sample is coded in sbTMVP mode, the filter length can be larger than 5 (e.g., 7).
[0960] 7. To solve the third problem, for the first kind of boundary (such as CU boundary or coded block boundary or transform block boundary, e.g., edgeFlags[xD i ][yD j ] equal to 1), bS[xD i ][yD j ] can be set to 1 even if p0 or q0 is in a transform block containing only zero coefficients.
[0961] a. In addition, optionally, for the first kind of boundary (such as CU boundary or coded block boundary or transform block boundary, e.g., edgeFlags[xD i ][yD j ] equal to 1), whether to set the BS value to 1 or 0 can follow the same rule as the second kind of boundary (such as subblock boundary, e.g., edgeFlags[xD i ][yD j ] equal to 2).
[0962] i. In addition, optionally, the above rule can be invoked only when both blocks containing p0 and q0 have all zero coefficients and neither of them is coded with CIIP / INTRA / BDPCM.
[0963] 8. To solve the fourth problem, how to set the maximum number of samples to be filtered can depend on the subblock technique / decoder side refinement technique, which includes at least one of DMVR / BDOF.
[0964] a. In one example, for the block containing q0 sample coded in the subblock technique / decoder side refinement technique, the filter length can be limited to no larger than K.
[0965] b.In one example, for a block containing q0 samples coded with subblock technology / decoder-side refinement technology and a block containing p0 samples coded with subblock technology / decoder-side refinement technology, the filter length for p0 can be limited to be no larger than K.
[0966] 6. Embodiments
[0967] The modified text is based on the latest VVC text in JVET-S2001-vE. Most of the added or modified relevant parts are highlighted in bold and italic, and the most relevant parts that are deleted are highlighted in double brackets (e.g., [[a]] means the deleted character 'a'). There are also some other changes that are editorial, and thus not highlighted.
[0968] 6.1 First embodiment
[0969] 8.8.3.5 Derivation process of boundary filter strength
[0970] The inputs of this process include:
[0971] - picture sample array recPicture,
[0972] - position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[0973] - variable nCbW specifying the width of the current coding block,
[0974] - variable nCbH specifying the height of the current coding block,
[0975] - variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge,
[0976] - variable cldx specifying the color component of the current coding block,
[0977] - two-dimensional (nCbW) x (nCbH) array edgeFlags.
[0978] The output of this process is a two-dimensional (nCbW) x (nCbH) array bS specifying the boundary filter strength.
[0979] The variables xD i , yD j , xN and yN are derived as follows:
[0980] - variable gridSize is set as follows:
[0981] gridSize = cldx == 0? 4 : 8 (1228)
[0982] - If edgeType is equal to EDGE_VER, the following applies:
[0983] xD i = (i * gridSize) (1229)
[0984] yD j = cldx == 0? (j « 2) : (j « 1) (1230)
[0985] xN = Max(0, (nCbW / gridSize) - 1) (1231)
[0986] yN = cldx == 0? (nCbH / 4) - 1 : (nCbH / 2) - 1 (1232)
[0987] - Else (edgeType is equal to EDGE_HOR), the following applies:
[0988] xD i = cldx == 0? (i « 2) : (i « 1) (1233)
[0989] yD j = j * gridSize (1234)
[0990] xN = cldx == 0? (nCbW / 4) - 1 : (nCbW / 2) - 1 (1235)
[0991] yN = Max(0, (nCbH / gridSize) - 1) (1236)
[0992] For xD i and yD j , the following applies:
[0993] - If edgeFlags[xD i ][yD j ] is equal to 0, the variable bS[xD i ][yD j ] is set equal to 0.
[0994] - Else, if edgeType is equal to EDGE_VER, VirtualBoundariesPresentFlag is equal to 1 and for any n = 0..NumVerVirtualBoundaries - 1, (xCb + xD i ) is equal to VirtualBoundaryPosX[n] / scaleWidth, the variable bS[xD i ][yDj ] is set equal to 0.
[0995] - Otherwise, if edgeType is equal to EDGE_HOR, VirtualBoundariesPresentFlag is equal to 1 and, for any n = 0..NumHorVirtualBoundaries - 1, (yCb + yDj) is equal to VirtualBoundaryPosY[n] / scaleHeight, the variable bS[xDi][yDj] is set equal to 0.
[0996] - Otherwise, the following applies:
[0997] - The sample values p0 and q0 are derived as follows:
[0998] - If edgeType is equal to EDGE_VER, p0 is set equal to recPicture[xCb + xD i -1][yCb + yD j ] and q0 is set equal to recPicture[xCb + xD i ][yCb + yD j ].
[0999] - Otherwise (edgeType is equal to EDGE_HOR), p0 is set equal to recPicture[xCb + xD i ][yCb + yD j -1] and q0 is set equal to recPicture[xCb + xD i ][yCb + yD j ].
[1000] - The variable bS[xD i ][yD j ] is derived as follows:
[1001] - If cIdx is equal to 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm luma flag is equal to 1, bS[xDi][yDj] is set equal to 0.
[1002] - Otherwise, if cIdx is greater than 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm chroma flag is equal to 1, bS[xDi][yDj] is set equal to 0.
[1003] - Otherwise, if either sample p0 or q0 is located in a coding block of a coding unit that is coded with CuPredMode equal to MODE_INTRA, bS[xDi][yDj] is set equal to 2.
[1004] – Otherwise, if sample p0 or q0 is located in a coding block for which ciip_flag is equal to 1, bS[xDi][yDj] is set equal to 2.
[1005] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is located in a transform block containing one or more non-zero transform coefficient levels, bS[xDi][yDj] is set equal to 1.
[1006] – Otherwise, if cIdx is equal to 0 [[, edgeFlags[xDi][yDj] is equal to 2,]] and one or more of the following conditions are true, bS[xD i ][yD j ] is set equal to 1:
[1007] – The CuPredMode of the sub-block containing sample p0 is different from the CuPredMode of the sub-block containing sample q0.
[1008] – Both the sub-block containing sample p0 and the sub-block containing sample q0 are coded in IBC prediction mode and the absolute difference between the horizontal or vertical components of the block vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1009] – For the prediction of the sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the sub-block containing sample q0.
[1010] NOTE 1 - Determining whether the reference pictures used for the two coded sub-blocks are the same or different is based only on the reference pictures, not considering whether the prediction is formed using the index in RPL 0 or the index in RPL 1, nor considering whether the index positions in the RPLs are different.
[1011] NOTE 2 - The number of motion vectors used for the prediction of the sub-block covering the top-left sample of (xSb, ySb) is equal to
[1012] PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb].
[1013] – The sub-block containing sample p0 is predicted using one motion vector, the sub-block containing sample q0 is predicted using one motion vector, and the absolute difference between the horizontal or vertical components of the used motion vectors is greater than or equal to 8 (unit:
[1014] 1 / 16 luma samples).
[1015] - the sub-block containing sample p0 is predicted using two motion vectors and two different reference pictures, the sub-block containing sample q0 is predicted using two motion vectors of the same two reference pictures, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two sub-blocks of the same reference picture is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1016] - the sub-block containing sample p0 is predicted using two motion vectors of the same reference picture, the sub-block containing sample q0 is predicted using two motion vectors of the same reference picture, and both of the following conditions are true:
[1017] - the absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit:
[1018] 1 / 16 luma samples), or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1019] - the absolute difference between the horizontal or vertical components of the list 0 motion vector used in the prediction of the sub-block containing sample p0 and the list 1 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma samples), or the absolute difference between the horizontal or vertical components of the list 1 motion vector used in the prediction of the sub-block containing sample p0 and the list 0 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1020] - Otherwise, the variable bS[xD i ][yD j ] is set equal to 0.
[1021] 6.2 Second embodiment
[1022] 8.8.3.5 Derivation process of the boundary filter strength
[1023] The inputs of the process include:
[1024] - the picture sample array recPicture,
[1025] - the position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[1026] - the variable nCbW specifying the width of the current coding block,
[1027] - the variable nCbH specifying the height of the current coding block,
[1028] - a variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge,
[1029] - a variable cldx specifying the color component of the current coding block,
[1030] - a two-dimensional (nCbW) x (nCbH) array edgeFlags.
[1031] The output of the process is a two-dimensional (nCbW) x (nCbH) array bS specifying the boundary filter strength.
[1032] The variables xD i , yD j , xN and yN are derived as follows:
[1033] - a variable gridSize is set as follows:
[1034] gridSize = cldx == 0? 4 : 8 (1228)
[1035] - if edgeType is equal to EDGE_VER, the following applies:
[1036] xD i = (i * gridSize) (1229)
[1037] yD j = cldx == 0? (j « 2) : (j « 1) (1230)
[1038] xN = Max(0, (nCbW / gridSize) - 1) (1231)
[1039] yN = cldx == 0? (nCbH / 4) - 1 : (nCbH / 2) - 1 (1232)
[1040] - else (edgeType is equal to EDGE_HOR), the following applies:
[1041] xD i = cldx == 0? (i « 2) : (i « 1) (1233)
[1042] yD j = j * gridSize (1234)
[1043] xN = cldx == 0? (nCbW / 4) - 1 : (nCbW / 2) - 1 (1235)
[1044] yN = Max(0, (nCbH / gridSize) - 1) (1236)
[1045] for i = 0..xN of xD i and j = 0..yN of yD j the following applies:
[1046] - If edgeFlags[ xD i ][ yD j ] is equal to 0, the variable bS[ xD i ][ yD j ] is set equal to 0.
[1047] - Otherwise, if edgeType is equal to EDGE_VER, VirtualBoundariesPresentFlag is equal to 1 and for any n = 0..NumVerVirtualBoundaries - 1, ( xCb + xD i ) is equal to VirtualBoundaryPosX[ n ] / scaleWidth, the variable bS[ xD i ][ yD j ] is set equal to 0.
[1048] - Otherwise, if edgeType is equal to EDGE_HOR, VirtualBoundariesPresentFlag is equal to 1 and for any n = 0..NumHorVirtualBoundaries - 1, ( yCb + yDj ) is equal to VirtualBoundaryPosY[ n ] / scaleHeight, the variable bS[ xDi ][ yDj ] is set equal to 0. - Otherwise, the following applies:
[1049] - The sample values p0 and q0 are derived as follows:
[1050] - If edgeType is equal to EDGE_VER, p0 is set equal to recPicture[ xCb + xD i - 1 ][ yCb + yD j ] and q0 is set equal to recPicture[ xCb + xD i ][ yCb + yD j ].
[1051] - Otherwise (edgeType is equal to EDGE_HOR), p0 is set equal to recPicture[ xCb + xD i ][ yCb + yD j - 1 ] and q0 is set equal to recPicture[ xCb + xD i ][ yCb + yD j].
[1052] – variable bS[ xD i ][ yD j ] is derived as follows:
[1053] – If cldx is equal to 0 and both samples p0 and q0 are located in a coding block with intra bdpcm luma flag equal to 1, then bS[ xD
[1054] is set equal to 0.
[1055] – Otherwise, if cldx is greater than 0 and both samples p0 and q0 are located in a coding block with intra bdpcm chroma flag equal to 1, then bS[ xD
[1056] is set equal to 0.
[1057] – Otherwise, if either sample p0 or q0 is located in a coding block of the coding unit that is coded with CuPredMode equal to MODE INTRA, then bS[ xD
[1058] – Otherwise, if either sample p0 or q0 is located in a coding block with ciip flag equal to 1, then bS[ xD
[1059] – Otherwise, if the block edge is also a transform block edge and either sample p0 or q0 is located in a transform block containing one or more non-zero transform coefficient levels, then bS[ xD
[1060] is set equal to 1.
[1061] – Otherwise, if cldx is equal to 0, edgeFlags[ xD i ][ yD j ] is set
[1062] equal to 1:
[1063] – The CuPredMode of the sub-block containing sample p0 is different from the CuPredMode of the sub-block containing sample q0.
[1064] – Both the sub-block containing sample p0 and the sub-block containing sample q0 are coded in IBC prediction mode and the absolute difference between the horizontal or vertical components of the block vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1065] - For the prediction of the sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the sub-block containing sample q0.
[1066] NOTE 1 - Determining whether the reference pictures for the two coded sub-blocks are the same or different is based only on the reference pictures, without considering whether the prediction is formed using the index in RPL 0 or the index in RPL 1, nor whether the index positions in the RPLs are different.
[1067] NOTE 2 - The number of motion vectors used for the prediction of the sub-block covering the top-left sample of (xSb, ySb) is equal to
[1068] PredFlagL1[xSb][ySb].
[1069] - The sub-block containing sample p0 is predicted using one motion vector, the sub-block containing sample q0 is predicted using one motion vector, and the absolute difference between the horizontal or vertical components of the used motion vectors is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1070] - The sub-block containing sample p0 is predicted using two motion vectors and two different reference pictures, the sub-block containing sample q0 is predicted using two motion vectors of the same two reference pictures, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two sub-blocks of the same reference picture is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1071] - The sub-block containing sample p0 is predicted using two motion vectors of the same reference picture, the sub-block containing sample q0 is predicted using two motion vectors of the same reference picture, and both of the following conditions are true:
[1072] - The absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit:
[1073] 1 / 16 luma samples), or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1074] - the absolute difference between the horizontal or vertical components of the List 0 motion vector used in the prediction of the sub-block containing sample p0 and the List 1 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma sample), or the absolute difference between the horizontal or vertical components of the List 1 motion vector used in the prediction of the sub-block containing sample p0 and the List 0 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma sample).
[1075] - Otherwise, the variable bS[ xD i ][ yD j ] is set equal to 0.
[1076] 6.3. Third embodiment
[1077] 8.8.3.5 Derivation process of the boundary filter strength
[1078] The input of this process comprises:
[1079] - the picture sample array recPicture,
[1080] - the position ( xCb, yCb ) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[1081] - the variable nCbW specifying the width of the current coding block,
[1082] - the variable nCbH specifying the height of the current coding block,
[1083] - the variable edgeType specifying whether the filtering is performed on a vertical ( EDGE_VER ) or on a horizontal ( EDGE_HOR ) edge,
[1084] - the variable cldx specifying the color component of the current coding block,
[1085] - the two-dimensional ( nCbW ) x ( nCbH ) array edgeFlags.
[1086] The output of this process is the two-dimensional ( nCbW ) x ( nCbH ) array bS specifying the boundary filter strength.
[1087] The variables xD i , yD j , xN and yN are derived as follows:
[1088] - The variable gridSize is set as follows:
[1089] gridSize = cldx == 0? 4 : 8 (1228)
[1090] –If edgeType equals EDGE_VER, the following applies:
[1091] xD i = (i * gridSize) (1229)
[1092] yD j =cIdx==0? (j<<2):(j<<1) (1230)
[1093] xN=Max(0,(nCbW / gridSize)-1) (1231)
[1094] yN=cIdx==0? (nCbH / 4)-1:(nCbH / 2)-1 (1232)
[1095] – Otherwise (edgeType equals EDGE_HOR), the following applies:
[1096] xD i =cIdx==0? (i<<2):(i<<1) (1233)
[1097] yD j = j * gridSize (1234)
[1098] xN=cIdx==0? (nCbW / 4)-1:(nCbW / 2)-1 (1235)
[1099] yN=Max(0,(nCbH / gridSize)-1) (1236)
[1100] For xD where i = 0..xN i and yD of j = 0..yN j The following applies:
[1101] –If edgeFlags[xD i ][yD j If bS[xD] equals 0, then the variable bS[xD] i ][yD j Set it to equal to 0.
[1102] Otherwise, if edgeType equals EDGE_VER, then VirtualBoundariesPresentFlag equals 1, and for any n = 0..NumVerVirtualBoundaries-1, (xCb+xD) i ) equals VirtualBoundaryPosX[n] / scaleWidth, variable bS[xD i ][yDj ] is set equal to 0.
[1103] - Otherwise, if edgeType is equal to EDGE_HOR, VirtualBoundariesPresentFlag is equal to 1 and, for any n = 0..NumHorVirtualBoundaries - 1, (yCb + yDj) is equal to VirtualBoundaryPosY[n] / scaleHeight, the variable bS[xDi][yDj] is set equal to 0.
[1104] - Otherwise, the following applies:
[1105] - The sample values p0 and q0 are derived as follows:
[1106] - If edgeType is equal to EDGE_VER, p0 is set equal to recPicture[xCb + xD i -1][yCb + yD j ] and q0 is set equal to recPicture[xCb + xD i ][yCb + yD j ].
[1107] - Otherwise (edgeType is equal to EDGE_HOR), p0 is set equal to recPicture[xCb + xD i ][yCb + yD j -1] and q0 is set equal to recPicture[xCb + xD i ][yCb + yD j ].
[1108] - The variable bS[xD i ][yD j ] is derived as follows:
[1109] - If cIdx is equal to 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm luma flag is equal to 1, bS[xDi][yDj] is set equal to 0.
[1110] - Otherwise, if cIdx is greater than 0 and both samples p0 and q0 are located in a coding block for which intra bdpcm chroma flag is equal to 1, bS[xDi][yDj] is set equal to 0.
[1111] - Otherwise, if either sample p0 or q0 is located in a coding block of a coding unit that is coded with CuPredMode equal to MODE_INTRA, bS[xDi][yDj] is set equal to 2.
[1112] – Otherwise, if sample p0 or q0 is located in a coding block for which ciip_flag is equal to 1, bS[xDi][yDj] is set equal to 2.
[1113] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is located in a transform block containing one or more non-zero transform coefficient levels, bS[xDi][yDj] is set equal to 1.
[1114] – Otherwise, if cIdx is equal to 0, edgeFlags[xDi][yDj] is equal to 1 or 2, and one or more of the following conditions are true, bS[xD i ][yD j ] is set equal to 1:
[1115] – The CuPredMode of the sub-block containing sample p0 is different from the CuPredMode of the sub-block containing sample q0.
[1116] – Both the sub-block containing sample p0 and the sub-block containing sample q0 are coded in IBC prediction mode and the absolute difference between the horizontal or vertical components of the block vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma samples).
[1117] – For the prediction of the sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the sub-block containing sample q0.
[1118] NOTE 1 - Determining whether the reference pictures used for the two coded sub-blocks are the same or different is based only on the reference pictures, not considering whether the prediction is formed using the index in RPL 0 or the index in RPL 1, nor considering whether the index positions in the RPLs are different.
[1119] NOTE 2 - The number of motion vectors used for the prediction of the sub-block covering the top-left sample of (xSb, ySb) is equal to
[1120] PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb].
[1121] – One motion vector is used for the prediction of the sub-block containing sample p0, one motion vector is used for the prediction of the sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the used motion vectors is greater than or equal to 8 (unit:
[1122] 1 / 16 luma samples).
[1123] - the sub-block containing sample p0 is predicted using two motion vectors and two different reference pictures, the sub-block containing sample q0 is predicted using two motion vectors of the same two reference pictures, and the absolute difference between the horizontal or vertical components of the two motion vectors used in the prediction of the two sub-blocks of the same reference picture is greater than or equal to 8 (unit: 1 / 16 luma sample).
[1124] - the sub-block containing sample p0 is predicted using two motion vectors of the same reference picture, the sub-block containing sample q0 is predicted using two motion vectors of the same reference picture, and both of the following conditions are true:
[1125] - the absolute difference between the horizontal or vertical components of the list 0 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample), or the absolute difference between the horizontal or vertical components of the list 1 motion vectors used in the prediction of the two sub-blocks is greater than or equal to 8 (unit: 1 / 16 luma sample).
[1126] - the absolute difference between the horizontal or vertical components of the list 0 motion vector used in the prediction of the sub-block containing sample p0 and the list 1 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma sample), or the absolute difference between the horizontal or vertical components of the list 1 motion vector used in the prediction of the sub-block containing sample p0 and the list 0 motion vector used in the prediction of the sub-block containing sample q0 is greater than or equal to 8 (unit: 1 / 16 luma sample).
[1127] - Otherwise, the variable bS[xD i ][yD j ] is set equal to 0.
[1128] 6.4. Second embodiment
[1129] 8.8.3.4 Derivation process of sub-block boundaries
[1130] The inputs of the process include:
[1131] - the position (xCb, yCb) specifying the top-left sample of the current coding block relative to the top-left sample of the current picture,
[1132] - the variable nCbW specifying the width of the current coding block,
[1133] - the variable nCbH specifying the height of the current coding block,
[1134] - the two-dimensional (nCbW) x (nCbH) array edgeFlags,
[1135] - two-dimensional (nCbW) x (nCbH) array maxFilterLengthQs and maxFilterLengthPs,
[1136] - variable edgeType specifying whether to filter a vertical (EDGE_VER) or a horizontal (EDGE_HOR) edge.
[1137] The output of the process comprises:
[1138] - modified two-dimensional (nCbW) x (nCbH) array edgeFlags,
[1139] - modified two-dimensional (nCbW) x (nCbH) array maxFilterLengthQs and maxFilterLengthPs.
[1140] The number of sub-blocks in the horizontal direction numSbX and in the vertical direction numSbY is derived as follows:
[1141] - If inter affine flag [ xCb ][ yCb ] is equal to 1 or merge subblock flag [ xCb ][ yCb ] is equal to 1, numSbX and numSbY are set equal to NumSbX [ xCb ][ yCb ] and NumSbY [ xCb ][ yCb ], respectively.
[1142] - Otherwise, numSbX and numSbY are both set equal to 1.
[1143] Depending on the value of edgeType, the following applies:
[1144] - If edgeType is equal to EDGE_VER, the following applies:
[1145] - variable sbW is set equal to Max(8, nCbW / numSbX).
[1146] - array edgeTbFlags is set equal to edgeFlags.
[1147] - for xEdge = 0.. min((nCbW / 8) - 1, numSbX - 1), y = 0.. nCbH - 1:
[1148] - horizontal position x within the current coding block is set equal to xEdge * sbW.
[1149] - the value of edgeFlags [ x ][ y ] is derived as follows:
[1150] edgeFlags [ x ][ y ] = 2 (1206)
[1151] - When edgeFlags[ x ][ y ] is equal to 1 or 2, maxFilterLengthPs[ x ][ y ]
[1152] and maxFilterLengthQs[ x ][ y ] are modified as follows:
[1153] - If x is equal to 0, the following applies:
[1154] - When numSbX is greater than 1, the following applies:
[1155] maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1207)
[1156] - When inter affme flag[ xCb-1 ][ yCb+y ] is equal to 1 [[ or merge subblock flag[ xCb-1 ][ yCb+y ] is equal to 1 ]], the following applies:
[1157] maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1208)
[1158] - Otherwise, if edgeTbFlags[ x ][ y ] is equal to 1, the following applies:
[1159] maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1209)
[1160] maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1210)
[1161] - Otherwise, if one or more of the following conditions are true:
[1162] - edgeTbFlags[ x-4 ][ y ] is equal to 1,
[1163] - edgeTbFlags[ x+4 ][ y ] is equal to 1,
[1164] the following applies:
[1165] maxFilterLengthPs[ x ][ y ] = 1 (1211)
[1166] maxFilterLengthPs[x][y] = 2 (1213)
[1167] – Otherwise, if one or more of the following conditions are true:
[1168] – xEdge is equal to 1,
[1169] – xEdge is equal to (nCbW / 8) - 1,
[1170] – edgeTbFlags[x-sbW][y]] is equal to 1,
[1171] – edgeTbFlags[x+sbW][y] is equal to 1,
[1172] The following applies:
[1173] maxFilterLengthPs[x][y] = 2 (1213)
[1174] maxFilterLengthQs[x][y] = 2 (1214)
[1175] – Otherwise, the following applies:
[1176] maxFilterLengthPs[x][y] = 3 (1215)
[1177] maxFilterLengthQs[x][y] = 3 (1216)
[1178] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:
[1179] – The variable sbH is set equal to Max(8, nCbH / numSbY).
[1180] – The array edgeTbFlags is set equal to edgeFlags.
[1181] – For yEdge = 0..min((nCbH / 8)-1, numSbY-1), x = 0..nCbW-1:
[1182] – The vertical position y within the current coding block is set equal to yEdge*sbH.
[1183] – The value of edgeFlags[x][y] is derived as follows:
[1184] edgeFlags[x][y] = 2 (1217)
[1185] – When edgeFlags[ x ][ y ] is equal to 1 or 2, maxFilterLengthPs[ x ][ y ]
[1186] and the values of maxFilterLengthQs[ x ][ y ] are modified as follows:
[1187] – If y is equal to 0, the following applies:
[1188] – When numSbY is greater than 1, the following applies:
[1189] maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1218)
[1190] – When inter affme flag[ xCb + x ][ yCb - 1 ] is equal to 1 [[ or merge subblock flag[ xCb + x ][ yCb - 1 ] is equal to 1 ]], the following applies:
[1191] maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1219)
[1192] – Otherwise, if edgeTbFlags[ x ][ y ] is equal to 1, the following applies:
[1193] maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1220)
[1194] maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1221)
[1195] – Otherwise, if one or more of the following conditions are true:
[1196] – edgeTbFlags[ x ][ y - 4 ] is equal to 1,
[1197] – edgeTbFlags[ x ][ y + 4 ] is equal to 1,
[1198] the following applies:
[1199] maxFilterLengthPs[ x ][ y ] = 1 (1222)
[1200] maxFilterLengthQs[ x ][ y ] = 1 (1223)
[1201] - Otherwise, if one or more of the following conditions are true:
[1202] - yEdge is equal to 1,
[1203] - yEdge is equal to (nCbH / 8) - 1.
[1204] - edgeTbFlags[x][y - sbH] is equal to 1,
[1205] - edgeTbFlags[x][y + sbH] is equal to 1,
[1206] The following applies:
[1207] maxFilterLengthPs[x][y] = 2 (1224)
[1208] maxFilterLengthQs[x][y] = 2 (1225)
[1209] - Otherwise, the following applies:
[1210] maxFilterLengthPs[x][y] = 3 (1226)
[1211] maxFilterLengthQs[x][y] = 3 (1227)
[1212] Figure 5 FIG. 19 is a block diagram illustrating an example video processing system 1900 in which various techniques disclosed herein can be implemented. Various implementations can include some or all of the components of the system 1900. The system 1900 can include an input 1902 for receiving video content. The video content can be received in a raw or uncompressed format, e.g., 8-bit or 10-bit multi-component pixel values, or in a compressed or encoded format. The input 1902 can represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, Passive Optical Network (PON), etc., and wireless interfaces such as Wi-Fi or cellular interfaces, etc.
[1213] The system 1900 can include a coding component 1904, which can implement various coding or decoding methods described in this document. The coding component 1904 can reduce the average bitrate of a video from the input 1902 to the output of the coding component 1904 to produce a coded representation of the video. Thus, the coding techniques are sometimes called video compression or video transcoding techniques. The output of the coding component 1904 can be stored, or transmitted via a communication connection, represented by the component 1906. The bitstream (or coded) representation of the video storage or communication received at the input 1902 can be used by the component 1908 to generate pixel values or displayable video sent to the display interface 1910. The process of generating user-viewable video from the bitstream representation is sometimes called video decompression. Also, while certain video processing operations are referred to as “coding” operations or tools, it should be understood that the encoding tools or operations are used at an encoder, and a decoder will perform corresponding decoding tools or operations that reverse the encoding results.
[1214] Examples of peripheral bus interfaces or display interfaces can include a Universal Serial Bus (USB) or a High Definition Multimedia Interface (HDMI) or DisplayPort, etc. Examples of storage interfaces include a Serial Advanced Technology Attachment (SATA), PCI, IDE interface, etc. The techniques described in this document can be embodied in various electronic devices, such as mobile telephones, laptop computers, smart phones, or other devices capable of performing digital data processing and / or video display.
[1215] Figure 6 is a block diagram of a video processing device 3600. The device 3600 can be used to implement one or more methods described herein. The device 3600 can be embodied in a smart phone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. The device 3600 can include one or more processors 3602, one or more memories 3604, and video processing hardware 3606. The processor(s) 3602 can be configured to implement one or more methods described in this document. The memory(ies) 3604 can be used for storing data and code used for implementing the methods and techniques described herein. The video processing hardware 3606 can be used to implement, in hardware circuitry, some of the techniques described in this document.
[1216] Figure 8 is a block diagram illustrating an example video coding system 100 that can utilize the techniques of this disclosure.
[1217] As Figure 8As shown, video coding system 100 can include a source device 110 and a destination device 120. Source device 110 generates encoded video data, which can be referred to as a video encoding device. Destination device 120 can decode the encoded video data generated by source device 110, and destination device 120 can be referred to as a video decoding device.
[1218] Source device 110 can include a video source 112, a video encoder 114, and an input / output (VO) interface 116.
[1219] Video source 112 can include a source such as a video capture device, an interface to receive video data from a video content provider, and / or a computer graphics system for generating video data, or a combination of such sources. Video data can comprise one or more pictures. Video encoder 114 encodes video data from video source 112 to generate a bitstream. The bitstream can include a sequence of bits that form a coded representation of the video data. The bitstream can include coded pictures and associated data. A coded picture is a coded representation of a picture. Associated data can include sequence parameter sets, picture parameter sets, and other syntax structures. VO interface 116 can include a modulator / demodulator (modem) and / or a transmitter. Encoded video data can be transmitted directly to destination device 120 via VO interface 116, through network 130a. The encoded video data can also be stored onto a storage medium / server 130b for access by destination device 120.
[1220] Destination device 120 can include an VO interface 126, a video decoder 124, and a display device 122.
[1221] VO interface 126 can include a receiver and / or a modem. VO interface 126 can acquire encoded video data from source device 110 or storage medium / server 130b. Video decoder 124 can decode the encoded video data. Display device 122 can display the decoded video data to a user. Display device 122 can be integrated with destination device 120, or can be external to destination device 120 which is configured to interface with an external display device.
[1222] Video encoder 114 and video decoder 124 can operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, the Versatile Video Coding (VVM) standard, and other current and / or further standards.
[1223] Figure 9 is a block diagram illustrating an example of a video encoder 200, which can be Figure 8The video encoder 114 in the illustrated system 100.
[1224] The video encoder 200 can be configured to perform any or all of the techniques of this disclosure. In Figure 9 In an example, the video encoder 200 includes a plurality of 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.
[1225] The functional components of the video encoder 200 can include a partition unit 201, a prediction unit 202 (which can include a mode select unit 203, a motion estimation unit 204, a motion compensation unit 205, and an intra-prediction unit 206), 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 encoding unit 214.
[1226] In other examples, the video encoder 200 can include more, less, or different functional components. In an example, the prediction unit 202 can include an Intra Block Copy (IBC) unit. The IBC unit can perform prediction in an IBC mode, where at least one reference picture is the picture in which the current video block is located.
[1227] Furthermore, some components, such as the motion estimation unit 204 and the motion compensation unit 205, can be highly integrated, but are represented separately in Figure 9 for purposes of explanation.
[1228] The partition unit 201 can partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 can support various video block sizes.
[1229] The mode select unit 203 can select one of the coding modes (intra or inter coding mode), e.g., based on the error results, and provide the resulting intra-coded or inter-coded block to the residual generation unit 207 to generate residual block data and to the reconstruction unit 212 to reconstruct the coded block for use as a reference picture. In some examples, the mode select unit 203 can select a Combination of Intra and Inter Prediction (CIIP) mode, where the prediction is based on both an inter-prediction signal and an intra-prediction signal. In the case of inter-prediction, the mode select unit 203 can also select a resolution for the motion vectors (e.g., sub-pixel or integer pixel precision) for the block.
[1230] To perform inter prediction on a 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 to the current video block. Motion compensation unit 205 can determine a predicted video block for the current video block based on the motion information and decoded samples for pictures from buffer 213 other than the picture associated with the current video block.
[1231] Motion estimation unit 204 and motion compensation unit 205 can perform different operations on a current video block, e.g., depending on whether the current video block is in an I slice, a P slice, or a B slice.
[1232] In some examples, motion estimation unit 204 can perform uni-prediction on a current video block, and motion estimation unit 202 can search for a reference video block for the current video block in reference pictures in list 0 or list 1. Motion estimation unit 204 can then generate a reference index indicating a reference picture containing the reference video block in list 0 or list 1 and a motion vector indicating a spatial displacement between the current video block and the reference video block. Motion estimation unit 204 can output the reference index, the prediction direction indicator, and the 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 for the current video block.
[1233] In other examples, motion estimation unit 204 can perform bi-prediction on a current video block, motion estimation unit 204 can search for a reference video block for the current video block in reference pictures in list 0, and can also search for another reference video block for the current video block in reference pictures in list 1. Motion estimation unit 204 can then generate a reference index indicating reference pictures containing the reference video blocks in list 0 and list 1 and a motion vector indicating a spatial displacement between the reference video blocks and the current video block. Motion estimation unit 204 can output the reference index and the motion vector as motion information for 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 for the current video block.
[1234] In some examples, motion estimation unit 204 can output a full set of motion information for decoder-side decoding processing.
[1235] In some examples, motion estimation unit 204 can not output a full set of motion information for a current video. Instead, motion estimation unit 204 can signal motion information for the current video block with reference to motion information for another video block. For example, motion estimation unit 204 can determine that the motion information for the current video block is sufficiently similar to motion information for a neighboring video block.
[1236] In one example, the motion estimation unit 204 can indicate a value in a 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.
[1237] In another example, the motion estimation unit 204 can identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference between a motion vector of the current video block and a motion vector of the indicated video block. The 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.
[1238] As described above, the video encoder 200 can predictively signal motion vectors. Two examples of prediction signaling techniques that can be implemented by the video encoder 200 include advanced motion vector predication (AMVP) and merge mode signaling.
[1239] The intra prediction unit 206 can perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 can generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block can include a predicted video block and various syntax elements.
[1240] The residual generation unit 207 can generate residual data in the current video block by subtracting (e.g., indicated by a negative sign) the prediction video block(s) for the current video block from the current video block. The residual data for the current video block can include residual video blocks corresponding to different sample components of samples in the current video block.
[1241] In other examples, such as in skip mode, there can be no residual data for the current video block for the current video block, and the residual generation unit 207 can not perform the subtraction operation.
[1242] The transform processing unit 208 can generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to the residual video blocks associated with the current video block.
[1243] After the transform processing unit 208 generates the transform coefficient video blocks associated with the current video block, the quantization unit 209 can quantize the transform coefficient video blocks associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.
[1244] Inverse quantization unit 210 and inverse transform unit 211 can apply inverse quantization and inverse transform, respectively, to the transform coefficient video block to reconstruct a residual video block from the transform coefficient video block. Reconstruction unit 212 can add the reconstructed residual video block to corresponding samples of one or more prediction video blocks generated from prediction unit 202 to produce a reconstructed video block associated with the current block for storage in buffer 213.
[1245] After reconstruction unit 212 reconstructs the video block, in-loop filtering operations can be performed to reduce video block artifacts in the video block.
[1246] Entropy encoding unit 214 can receive data from other functional components of video encoder 200. When entropy encoding unit 214 receives data, entropy encoding unit 213 can perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.
[1247] Figure 10 is a block diagram illustrating an example of a video decoder 300 that can be Figure 8 the video decoder 114 in the system 100 shown.
[1248] Video decoder 300 can be configured to perform any or all of the techniques of this disclosure. In Figure 10 example, video decoder 300 includes a plurality of functional components. The techniques described in this disclosure can be shared among the various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.
[1249] In Figure 10 example, video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, and a reconstruction unit 306 and a buffer 307. In some examples, video decoder 300 performs a decoding process generally reciprocal to the encoding process described with respect to video encoder 200 Figure 9 ) above.
[1250] Entropy decoding unit 301 can retrieve an encoded bitstream. The encoded bitstream can include entropy encoded video data (e.g., encoded blocks of video data). Entropy decoding unit 301 can decode the entropy encoded video data, and from the entropy decoded video data, motion compensation unit 302 can determine motion information including motion vectors, motion vector precision, and reference picture list indices, among other motion information. Motion compensation unit 302 can determine such information, for example, by performing AMVP and merge modes.
[1251] Motion compensation unit 302 can generate a motion compensated block, possibly performing interpolation based on an interpolation filter. An interpolation filter identifier used with sub-pixel accuracy can be included in the syntax elements.
[1252] Motion compensation unit 302 can use the interpolation filter used by video encoder 200 during encoding of the video block to calculate the interpolation of sub-integer pixels of the reference block. Motion compensation unit 302 can determine the interpolation filter used by video encoder 200 from the received syntax information and use the interpolation filter to generate the prediction block.
[1253] Motion compensation unit 302 can use some of the syntax information to determine the size of the blocks used to encode the frame(s) and / or slice(s) of the encoded video sequence, partition information describing how each macroblock of a coded video sequence picture is partitioned, modes indicating how each partition is coded, one or more reference frames (and lists of reference frames) for each inter-coded block, and other information used for decoding the encoded video sequence.
[1254] Intra prediction unit 303 can use, for example, intra prediction modes received in the bitstream to form a prediction block from spatially neighboring blocks. Inverse quantization unit 303 inverse quantizes, i.e., de-quantizes, quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. Inverse transform unit 303 applies an inverse transform.
[1255] Reconstruction unit 306 can add the residual block to the corresponding prediction block generated by motion compensation unit 202 or intra prediction unit 303 to form a decoded block. If desired, a deblocking filter can also be applied to the decoded block to filter out blockiness artifacts. The decoded video blocks are then stored in buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction, and also produces decoded video for presentation on a display device.
[1256] Next, a list of preferred solutions for some embodiments is provided.
[1257] A first set of solutions is provided below. The following solutions show example embodiments of the techniques discussed in the previous section (e.g., items 1-8).
[1258] 1. A video processing method (e.g., the method 700) comprising: Figure 7 determining (702) one or more parameters of a deblocking filter process; and performing (704) a conversion between a video and a bitstream representation of the video comprising filtering a video block according to the one or more parameters.
[1259] 2. The method of solution 1, wherein the one or more parameters are determined according to the techniques described in this document.
[1260] 3. The method of any of solutions 1-2, wherein the one or more parameters are included in a bitstream representation as one or more syntax elements.
[1261] 4. The method of any of solutions 1-3, wherein the conversion comprises encoding the video into a codec representation.
[1262] 5. The method of any of solutions 1-3, wherein the conversion comprises decoding the codec representation to generate pixel values of the video.
[1263] 6. A video decoding apparatus comprising a processor configured to implement a method recited in one or more of solutions 1-5.
[1264] 7. A video encoding apparatus comprising a processor configured to implement a method recited in one or more of solutions 1-5.
[1265] 8. A computer program product having computer code stored thereon, the code, when executed by a processor, causing the processor to implement a method recited in any of solutions 1-5.
[1266] 9. A method, device or system described in this document.
[1267] The second set of solutions show example embodiments of the techniques discussed in the previous section (e.g., items 1-8).
[1268] 1. A method of processing video data (e.g., a method 1400 as shown in Figure 14A FIG. 14), comprising, for a conversion between a video and a bitstream of the video, determining 1402, according to a rule, a boundary strength of a deblocking filter applied to at least some samples of a video unit of the video; and performing 1404 the conversion based on the determination.
[1269] 2. The method of solution 1, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 1 when 1) one or more conditions are met, and 2) an edge flag array edgeFlags[xD i ][yD j ] is equal to 1 or 2, where [xDi][yDj] represents a position of a sample of a video unit, and i and j are integers.
[1270] 3. The method of any of techniques 2, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 1 when one or more conditions are met and the edge flag array edgeFlags[xD i ][yD j ] is not equal to 0, where [xDi][yDj] represents coordinates and i and j are integers.
[1271] 4. The method of any of techniques 2, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 1 when one or more conditions are met and the edge flag array edgeFlags[xD i ][yD j ] is greater than 0, where [xDi][yDj] represents coordinates and i and j are integers.
[1272] 5. The method of any of techniques 2, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 1 when one or more conditions are met without considering the edge flag array edgeFlags[xD i ][yD j ], where [xDi][yDj] represents coordinates and i and j are integers.
[1273] 6. The method of any of techniques 2 to 5, wherein the rule specifies that the one or more conditions are met when a first condition is met, i.e., a variable (CuPredMode) corresponding to a first sub-block containing a first sample is different from a variable (CuPredMode) corresponding to a second sub-block containing a second sample.
[1274] 7. The method of any of techniques 2 to 5, wherein the rule specifies that the one or more conditions are met when a second condition is met, i.e., both the first sub-block containing the first sample and the second sub-block containing the second sample are coded in Intra Block Copy (IBC) and an absolute difference between a horizontal or vertical component of a block vector used in the prediction of the first sub-block and the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples.
[1275] 8. The method of any of techniques 2 to 5, wherein the rule specifies that the one or more conditions are met when a third condition is met, i.e., a reference picture or multiple motion vectors used in the prediction of the first sub-block containing the first sample is different from a reference picture or multiple motion vectors used in the prediction of the second sub-block containing the second sample.
[1276] 9. The method of any of techniques 2-5, wherein the rule specifies that the one or more conditions are satisfied when a fourth condition is satisfied, i.e., a first motion vector is used to predict a first sub-block containing first samples, and a second motion vector is used to predict a second sub-block containing second samples, and an absolute difference between horizontal or vertical components of the used first and second motion vectors is greater than or equal to 8, in units of 1 / 16 luma samples.
[1277] 10. The method of any of techniques 2-5, wherein the rule specifies that the one or more conditions are satisfied when a fifth condition is satisfied, i.e., two first motion vectors of two reference pictures are used to predict a first sub-block containing first samples, two second motion vectors of the two reference pictures are used to predict a second sub-block containing second samples, and an absolute difference between horizontal or vertical components of the used first and second motion vectors in the prediction of the first and second sub-blocks of one of the two reference pictures is greater than or equal to 8, in units of 1 / 16 luma samples.
[1278] 11. The method of any of techniques 2-5, wherein the rule specifies that the one or more conditions are satisfied when a sixth condition is satisfied, i.e., two first motion vectors of a reference picture are used to predict a first sub-block containing first samples, two second motion vectors of the reference picture are used to predict a second sub-block containing second samples, and a seventh condition related to the used motion vectors in the prediction of the first and second sub-blocks is satisfied.
[1279] 12. The method of technique 11, wherein the seventh condition is that an absolute difference between horizontal or vertical components of list 0 motion vectors used in the prediction of the first and second sub-blocks is greater than or equal to 8, in units of 1 / 16 luma samples, or an absolute difference between horizontal or vertical components of list 1 motion vectors used in the prediction of the first and second sub-blocks is greater than or equal to 8, in units of 1 / 16 luma samples.
[1280] 13. The method of technique 11, wherein the seventh condition is that an absolute difference between horizontal or vertical components of a list 0 motion vector used in the prediction of the first sub-block and a list 1 motion vector used in the prediction of the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples, or an absolute difference between horizontal or vertical components of a list 1 motion vector used in the prediction of the first sub-block and a list 0 motion vector used in the prediction of the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples.
[1281] 14. The method according to any of the preceding claims, wherein the rule only applies to video units having a color component index cldx equal to 0.
[1282] 15. The method according to claim 14, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 0 in case cldx is equal to or larger than 0 and the first and second samples are located in a video block of the video unit, wherein a block-based differential pulse code modulation (BDPCM) flag indicates that BDPCM is applied to the video unit.
[1283] 16. The method according to claim 14, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 2 in case the first or second sample is located in a video block of a video unit coded with a prediction mode variable equal to MODE INTRA.
[1284] 17. The method according to claim 14, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 2 in case the first or second sample is located in a video block of the video unit and a combined inter picture merge and intra picture prediction (CIIP) flag is equal to 1.
[1285] 18. The method according to claim 14, wherein the rule specifies that the boundary strength bS[xD i ][yD j ] is determined to be 1 in case the boundary strength is a block edge and the block edge is also a transform block edge and the first or second sample is located in a transform block containing one or more non-zero transform coefficient levels.
[1286] 19. The method according to claim 1, wherein the rule determines whether to set the boundary strength of a first type of boundary associated with an edge flag array equal to 1 to 1 or 0.
[1287] 20. The method according to claim 19, wherein the rule determines whether to set the boundary strength of a second type of boundary associated with an edge flag array equal to 2.
[1288] 21. The method according to any of the preceding claims 19 or 20, wherein the first type of boundary is a coding unit boundary or a coding block boundary or a transform block boundary and the second type of boundary is a sub-block boundary.
[1289] 22. The method according to any of solutions 19 to 21, wherein the rule is invoked in case two video blocks containing the first sample and the second sample, respectively, have all-zero coefficients and neither of the two video blocks is coded with combined inter-picture merge and intra-picture prediction (CIIP), intra mode or block-based differential pulse code modulation (BDPCM).
[1290] 23. The method according to solution 1, wherein the rule specifies that whether maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) for deblocking is decoupled from whether the blocks along the edge are coded by sbTMVP mode, wherein maxFilterLengthPs[x][y] indicates a maximum filter length array.
[1291] 24. The method according to solution 23, wherein the rule further specifies that whether the filter length on P side is limited depends only on whether the block containing the first sample is coded with affine mode type.
[1292] 25. The method according to solution 24, wherein the rule is applied to a video unit corresponding to a video block containing the second sample coded with a sub-block mode.
[1293] 26. The method according to solution 25, wherein the sub-block mode is affine mode or sub-block based temporal motion vector prediction (sbTMVP) mode.
[1294] 27. The method according to solution 1, the rule specifies that a boundary strength bS[xD i ][yD j ] of a first type boundary associated with an edge flag array equal to 1 is determined as 1 regardless of whether the first sample or the second sample is located in a transform block containing only zero coefficients.
[1295] 28. The method according to solution 1, the rule specifies that a boundary strength bS[xD i ][yD j ] of a first type boundary associated with an edge flag array equal to 1 is determined as 1 regardless of whether the first sample or the second sample is located in a transform block containing only zero coefficients.
[1296] 29. The method of solution 28, wherein the rule is invoked in a case where two video blocks containing the first sample and the second sample, respectively, have all-zero coefficients and neither of the two video blocks is coded using combined inter-picture merge and intra-picture prediction (CIIP), intra mode, or block-based differential pulse code modulation (BDPCM).
[1297] 30. A method of processing video data (e.g., the method 1410 shown in FIG. 15), comprising: determining 1412, for a conversion between a video unit of a video and a bitstream of the video, a maximum filter length of a deblocking filter that filters at least some samples of the video unit according to a rule; and performing 1414 the conversion based on the determination. Figure 14B
[1298] 31. The method of solution 30, wherein the rule specifies that the maximum filter length is limited to no more than K in a case where a first video block contains the first sample and is coded in a subblock mode and a decoder-side refinement mode, where K is an integer.
[1299] 32. The method of solution 31, wherein the rule specifies that the maximum filter length is limited to no more than K in a case where a first video block containing the first sample and a second video block containing the second sample are coded in a subblock mode and a decoder-side refinement mode, where K is an integer.
[1300] 33. The method of any of solutions 1 to 32, wherein the first sample corresponds to p0 closest to a left side of a boundary and the second sample corresponds to q0 closest to a right side of the boundary.
[1301] 34. The method of any of solutions 1 to 33, wherein the conversion comprises encoding the video into the bitstream.
[1302] 35. The method of any of solutions 1 to 33, wherein the conversion comprises decoding the video from the bitstream.
[1303] 36. The method of any of solutions 1 to 33, wherein the conversion comprises generating the bitstream from the video, and the method further comprises storing the bitstream in a non-transitory computer-readable recording medium.
[1304] 37. A video processing apparatus comprising a processor configured to implement any one or more of the methods of solutions 1 to 36.
[1305] 38. A method of storing a bitstream of a video, comprising any of the methods of clauses 1-36, further comprising storing the bitstream to a non-transitory computer-readable recording medium.
[1306] 39. A computer-readable medium storing program code that, when executed, causes a processor to implement any one or more of the methods of clauses 1-36.
[1307] 40. A computer-readable medium storing a bitstream generated according to any of the methods described above.
[1308] 41. A video processing apparatus for storing a bitstream, wherein the video processing apparatus is configured to implement any one or more of the methods of clauses 1-36.
[1309] In the solutions described herein, an encoder can conform to a format rule by generating a coded representation according to the format rule. In the solutions described herein, a decoder can parse syntax elements in a coded representation using a format rule and understand the presence and absence of syntax elements according to the format rule to generate a decoded video.
[1310] In this document, the term “video processing” can refer to video encoding, video decoding, video compression, or video decompression. For example, a video compression algorithm can be applied during a conversion of a pixel representation of a video to a corresponding bitstream representation, or vice versa. A bitstream representation of a current video block may, for example, correspond to bits that are collocated or spread out at different locations within the bitstream as defined by the syntax. For example, a macroblock can be encoded according to a transform and an encoded error residual value, and can also be encoded using bits in a header and other fields in the bitstream. Furthermore, during the conversion, a decoder can parse the bitstream with knowledge of the presence or absence of certain fields, as described in the solutions above, based on the determination. Similarly, an encoder can determine whether to include certain syntax fields and generate a coded representation accordingly by including or excluding syntax fields from the coded representation.
[1311] The disclosed and other solutions, examples, embodiments, modules and functional operations described herein can be realized in digital electronic circuitry, or in a computer software, firmware, or hardware, including the structural equivalents of such disclosure as set forth in the appended file, or in combinations of one or more of them. The disclosed and other embodiments can be realized as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer-readable medium for execution by, or to control the operation of, data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of a device, a substrate, or material, affecting a machine-readable propagated signal, or one or more of them. The term "data processing apparatus" includes all apparatus, devices, and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. In addition to hardware, the apparatus can also include code that creates an execution environment for the computer program in question, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or one or more of them. The propagated signal is an artificially generated signal, for example, a machine-generated electrical, optical, or electromagnetic signal, which is generated to encode information to be transmitted to a suitable receiver device.
[1312] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one or more computers that are situated on one site or distributed across multiple sites and interconnected by a communication network.
[1313] The processes and logic flows described in this document can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, and the apparatus can be implemented as special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
[1314] Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[1315] Although this patent document contains many details, it should not be construed to limit the scope of any subject matter or of any claims under any circumstances, but rather should be construed as a description of features that can be part of particular embodiments of certain technologies. Some of the features described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented separately or in any suitable subcombination. Moreover, although features can be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination and the claimed combination can be directed to a subcombination or variation of a subcombination.
[1316] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such an order, or that all illustrated operations be performed, to accomplish such a process, or that the illustrated operations make up an exhaustive listing of such a process. Moreover, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[1317] Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this patent document.
Claims
1. A method of processing video data, comprising: for a conversion between a video and a bitstream of the video, determining a boundary strength of a deblocking filter applied to at least some samples of a video unit of the video according to a rule; and performing the conversion based on the determining, wherein the rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 1 when 1) one or more conditions are met, and 2) an edge flag array edgeFlags[ xDi ][ yDj ] is equal to 1 or 2, wherein [ xDi ][ yDj ] represents coordinates of the samples of the video unit, and i and j are integers.
2. The method of claim 1, wherein, the rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 1 when one or more conditions are met and an edge flag array edgeFlags[ xDi ][ yDj ] is not equal to 0, wherein [ xDi ][ yDj ] represents coordinates, and i and j are integers.
3. The method of claim 1, wherein, the rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 1 when one or more conditions are met and an edge flag array edgeFlags[ xDi ][ yDj ] is greater than 0, wherein [ xDi ][ yDj ] represents coordinates, and i and j are integers.
4. The method of claim 1, wherein, the rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 1 when one or more conditions are met regardless of an edge flag array edgeFlags[ xDi ][ yDj ], wherein [ xDi ][ yDj ] represents coordinates, and i and j are integers.
5. The method of any one of claims 1 to 4, wherein, the rule specifies that the one or more conditions are met when a first condition is met, i.e., a variable CuPredMode corresponding to a first sub-block containing a first sample is different from a variable CuPredMode corresponding to a second sub-block containing a second sample.
6. The method of any one of claims 1 to 4, wherein, the rule specifies that the one or more conditions are met when a second condition is met, i.e., a first sub-block containing a first sample and a second sub-block containing a second sample are both coded in intra block copy, IBC, and an absolute difference between a horizontal or vertical component of a block vector used in prediction of the first sub-block and the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples.
7. The method of any one of claims 1 to 4, wherein, the rule specifies that the one or more conditions are met when a third condition is met, i.e., a reference picture or multiple motion vectors used in prediction of a first sub-block containing a first sample is different from a reference picture or multiple motion vectors used in prediction of a second sub-block containing a second sample.
8. The method of any one of claims 1 to 4, wherein, the rule specifies that the one or more conditions are met when a fourth condition is met, i.e., a first motion vector is used to predict a first sub-block containing a first sample, and a second motion vector is used to predict a second sub-block containing a second sample, and an absolute difference between a horizontal or vertical component of the first motion vector and the second motion vector used is greater than or equal to 8, in units of 1 / 16 luma samples.
9. The method of any one of claims 1 to 4, wherein, The rule specifies that the one or more conditions are satisfied when a fifth condition is satisfied, i.e., two first motion vectors of two reference pictures are used to predict a first sub-block containing first samples, two second motion vectors of the two reference pictures are used to predict a second sub-block containing second samples, and an absolute difference between horizontal or vertical components of the first motion vectors and the second motion vectors used in the prediction of the first sub-block and the second sub-block of one of the two reference pictures is greater than or equal to 8, in units of 1 / 16 luma samples.
10. The method of any one of claims 1 to 4, wherein, The rule specifies that the one or more conditions are satisfied when a sixth condition is satisfied, i.e., two first motion vectors of a reference picture are used to predict a first sub-block containing first samples, two second motion vectors of the reference picture are used to predict a second sub-block containing second samples, and a seventh condition related to motion vectors used in the prediction of the first sub-block and the second sub-block is satisfied.
11. The method of claim 10, wherein, The seventh condition is that an absolute difference between horizontal or vertical components of list 0 motion vectors used in the prediction of the first sub-block and the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples, or an absolute difference between horizontal or vertical components of list 1 motion vectors used in the prediction of the first sub-block and the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples.
12. The method of claim 10, wherein, The seventh condition is that an absolute difference between horizontal or vertical components of a list 0 motion vector used in the prediction of the first sub-block and a list 1 motion vector used in the prediction of the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples, or an absolute difference between horizontal or vertical components of a list 1 motion vector used in the prediction of the first sub-block and a list 0 motion vector used in the prediction of the second sub-block is greater than or equal to 8, in units of 1 / 16 luma samples.
13. The method of claim 1, wherein, The rule only applies to the video unit having a color component index cldx equal to 0.
14. The method of claim 13, wherein, The rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 0 when cldx is equal to or greater than 0 and the first sample and the second sample are located in a video block of the video unit, where a block-based differential pulse code modulation (BDPCM) flag indicates that BDPCM is applied to the video unit.
15. The method of claim 13, wherein, The rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 2 when the first sample or the second sample is located in a video block of the video unit coded with a prediction mode variable equal to MODE INTRA.
16. The method of claim 13, wherein, The rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 2 when the first sample or the second sample is located in a video block of the video unit and a combined inter picture merge and intra picture prediction (CIIP) flag is equal to 1.
17. The method of claim 13, wherein, The rule specifies that the boundary strength bS[ xDi ][ yDj ] is determined to be 1 in case the boundary strength is a block edge and the block edge is also a transform block edge and the first sample or the second sample is located in a transform block containing one or more non-zero transform coefficient levels.
18. The method of claim 1, wherein, The rule determines whether to set the boundary strength of a first type of boundary associated with a boundary flag array equal to 1 to 1 or 0.
19. The method of claim 18, wherein, The rule determines whether to set the boundary strength of a second type of boundary associated with a boundary flag array equal to 2.
20. The method of claim 19, wherein, The first type of boundary is a coding unit boundary or a coding block boundary or a transform block boundary and the second type of boundary is a sub-block boundary.
21. The method of claim 18, wherein, The rule is invoked in case two video blocks containing the first sample and the second sample, respectively, have all-zero coefficients and neither of the two video blocks is coded with combined inter-picture merge and intra-picture prediction CIIP, intra mode or block-based differential pulse code modulation BDPCM.
22. The method of claim 1, wherein, The rule specifies whether setting maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) for deblocking is decoupled from whether the block along the edge is coded by sbTMVP mode, where maxFilterLengthPs[ x ][ y ] indicates a maximum filter length array.
23. The method of claim 22, wherein, The rule further specifies that whether limiting the filter length on the P side depends only on whether the block containing the first sample is coded with an affine mode type.
24. The method of claim 23, wherein, The rule is applied to the video unit corresponding to a video block containing the second sample coded in a sub-block mode.
25. The method of claim 24, wherein, The sub-block mode is an affine mode or a sub-block based temporal motion vector prediction sbTMVP mode.
26. The method of claim 1, the rule specifies that the boundary strength bS[ xDi ][ yDj ] of a first type of boundary associated with a boundary flag array equal to 1 is determined to be 1 regardless of whether the first sample or the second sample is located in a transform block containing only zero coefficients.
27. The method of claim 1, the rule specifies that the boundary strength bS[ xDi ][ yDj ] of a first type of boundary associated with a boundary flag array equal to 1 is determined to be 1 regardless of whether the first sample or the second sample is located in a transform block containing only zero coefficients.
28. The method of claim 27, wherein, The rule is invoked in case two video blocks containing the first sample and the second sample, respectively, have all-zero coefficients and neither of the two video blocks is coded using combined inter-picture merge and intra-picture prediction CIIP, intra mode or block-based differential pulse code modulation BDPCM.
29. The method of claim 1, further comprising: determining, for the conversion, a maximum filter length of a deblocking filter used for filtering at least some samples of the video unit according to the rule.
30. The method of claim 29, wherein, The rule specifies that the maximum filter length is limited to no more than K, where K is an integer, if the first video block contains the first sample and is coded in the sub-block mode and the decoder-side refinement mode.
31. The method of claim 30, wherein, The rule specifies that the maximum filter length is limited to no more than K, where K is an integer, if the first video block containing the first sample and the second video block containing the second sample are coded in the sub-block mode and the decoder-side refinement mode.
32. The method of claim 5, wherein, The first sample corresponds to p0 closest to the left side of the boundary and the second sample corresponds to q0 closest to the right side of the boundary.
33. The method of claim 1, wherein, The conversion includes encoding the video into the bitstream.
34. The method of claim 1, wherein, The conversion includes decoding the video from the bitstream.
35. The method of claim 1, wherein, The conversion includes generating the bitstream from the video, and the method further includes storing the bitstream in a non-transitory computer-readable recording medium.
36. A video processing apparatus comprising a processor configured to implement a method recited in any of claims 1 to 35.
37. A computer readable medium storing program code that, when executed, causes a processor to implement a method recited in any of claims 1 to 35.
Citation Information
Patent Citations
Method, apparatus and system for predicting a block of video samples
US10021403B2
Method and apparatus for deblocking an image
WO2020123442A1
Deblocking filtering using motion prediction
WO2020147805A1