TW202337207A - Video coding method and apparatus thereof - Google Patents

Video coding method and apparatus thereof Download PDF

Info

Publication number
TW202337207A
TW202337207A TW112100602A TW112100602A TW202337207A TW 202337207 A TW202337207 A TW 202337207A TW 112100602 A TW112100602 A TW 112100602A TW 112100602 A TW112100602 A TW 112100602A TW 202337207 A TW202337207 A TW 202337207A
Authority
TW
Taiwan
Prior art keywords
candidate
decoding
encoding
modes
mode
Prior art date
Application number
TW112100602A
Other languages
Chinese (zh)
Inventor
江嫚書
陳俊嘉
徐志瑋
莊子德
陳慶曄
向時達
黃毓文
Original Assignee
聯發科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 聯發科技股份有限公司 filed Critical 聯發科技股份有限公司
Publication of TW202337207A publication Critical patent/TW202337207A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A video coder receives data for a block of pixels to be encoded or decoded as the current block of a current picture of a video. The video coder identifies multiple candidate coding modes applicable to the current block. The video coder identifies a first group of candidate coding modes that is a subset of the plurality of candidate coding modes. The first group of candidate coding modes may be the highest priority candidate coding modes identified based on cost. The number of candidate coding modes in the first group is less than the number of candidate coding modes in the plurality of candidate coding modes. The video coder selects a candidate coding mode in the first group of candidate coding modes. the video coder encodes or decodes the current block by using the selected candidate coding mode.

Description

視訊編解碼的邊界匹配Boundary matching of video codecs

本公開一般涉及視訊編解碼。特別地,本公開涉及基於邊界匹配的候選編解碼模式的排序。This disclosure relates generally to video codecs. In particular, the present disclosure relates to ranking of candidate codec modes based on boundary matching.

除非本文另有說明,否則本節中描述的方法不是下面列出的申請專利範圍的習知技術,並且不因包含在本節中而被承認為習知技術。Unless otherwise indicated herein, the methods described in this section are not in the art within the scope of the claims listed below and are not admitted to be in the art by inclusion in this section.

高效視訊編解碼(High-Efficiency Video Coding,簡稱HEVC)是由視訊編解碼聯合協作小組(Joint Collaborative Team on Video Coding,簡稱JCT-VC)開發的國際視訊編解碼標準。HEVC基於混合的基於塊的運動補償類DCT變換編解碼架構。壓縮的基本單元,被稱為編解碼單元(coding unit,簡稱CU),是2Nx2N的方形區塊,每個CU可以被遞迴地分成四個更小的CU,直到達到預定的最小尺寸。每個CU包含一個或多個預測單元(prediction unit,簡稱PU)。High-Efficiency Video Coding (HEVC) is an international video codec standard developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is based on a hybrid block-based motion compensation-like DCT transform coding and decoding architecture. The basic unit of compression, called a coding unit (CU), is a 2Nx2N square block. Each CU can be recursively divided into four smaller CUs until a predetermined minimum size is reached. Each CU contains one or more prediction units (PU).

多功能視訊編解碼(Versatile Video Coding,簡稱VVC)是一種編解碼器,旨在滿足視訊會議、OTT(over-the-top)流媒體、行動電話等方面即將到來的需求。VVC旨在提供多種功能,滿足從低解析度和低位元速率到高解析度和高位元速率、高動態範圍(high dynamic range,簡稱HDR)、360全向等的所有視訊需求。Versatile Video Coding (VVC) is a codec designed to meet the upcoming needs of video conferencing, OTT (over-the-top) streaming media, mobile phones, etc. VVC is designed to provide a variety of functions to meet all video needs from low resolution and low bit rate to high resolution and high bit rate, high dynamic range (HDR), 360 omnidirectional, etc.

對於每個幀間預測的CU,由運動向量、參考圖片索引和參考圖片列表使用索引以及額外資訊組成的運動參數用於幀間預測樣本生成。運動參數可以顯式或隱式方式發送。當CU以跳過模式進行編解碼時,CU與一個PU相關聯並且沒有顯著的殘差係數,沒有編解碼的運動向量增量或參考圖片索引。合併模式被指定,當前CU的運動參數從相鄰CU獲得,包括空間和時間候選,以及VVC中引入的額外排程(schedules)。合併模式可以應用於任一幀間預測的CU。合併模式的可選方案是運動參數的顯式傳輸,其中運動向量、每個參考圖片列表的相應參考圖片索引和參考圖片列表使用標誌以及其他所需資訊按每個CU顯式地發送。For each inter-predicted CU, motion parameters consisting of a motion vector, a reference picture index, a reference picture list usage index, and additional information are used for inter-prediction sample generation. Motion parameters can be sent explicitly or implicitly. When a CU is coded in skip mode, the CU is associated with a PU and has no significant residual coefficients, no codec motion vector increments, or reference picture indexes. The merging mode is specified, and the motion parameters of the current CU are obtained from neighboring CUs, including spatial and temporal candidates, as well as additional schedules introduced in VVC. Merge mode can be applied to any inter-predicted CU. An alternative to merge mode is explicit transmission of motion parameters, where motion vectors, corresponding reference picture indexes for each reference picture list and reference picture list usage flags, and other required information are sent explicitly per CU.

除了HEVC中的幀間編解碼功能外,VVC還包括幾個新的和改進的幀間預測編解碼工具,如下所列: - 擴展合併預測 - 具有MVD(MMVD)的合併模式 - 對稱MVD(SMVD)發送 - 仿射運動補償預測 - 基於子塊的時間運動向量預測(Subblock-based temporal motion vector prediction,簡稱SbTMVP) - 適應性運動向量分辨率(Adaptive motion vector resolution,簡稱AMVR) - 運動場存儲:1/16 th亮度樣本MV存儲和8x8運動場壓縮 - CU級權重雙向預測(Bi-prediction with CU level weight,簡稱BCW) - 雙向光流(Bi-directional optical flow,簡稱BDOF) - 解碼器側運動向量細化(Decoder side motion vector refinement,簡稱DMVR) - 幾何分區模式(Geometric partitioning mode,簡稱GPM) - 組合幀間和幀內預測(Combined inter and intra prediction,簡稱CIIP) In addition to the inter codec features in HEVC, VVC also includes several new and improved inter prediction codec tools, listed below: - Extended merge prediction - Merge mode with MVD (MMVD) - Symmetric MVD (SMVD ) Send - Affine motion compensation prediction - Subblock-based temporal motion vector prediction (SbTMVP) - Adaptive motion vector resolution (AMVR) - Motion field storage: 1 / 16th brightness sample MV storage and 8x8 motion field compression - Bi-prediction with CU level weight (BCW) - Bi-directional optical flow (BDOF) - Decoder side motion vector fineness Decoder side motion vector refinement (DMVR) - Geometric partitioning mode (GPM) - Combined inter and intra prediction (CIIP)

以下概述僅是說明性的,並不旨在以任何方式進行限制。即,提供以下概述以介紹本文描述的新穎的和非顯而易見的技術的概念、亮點、好處和優點。 在下面的詳細描述中進一步描述了選擇的而不是所有的實施方式。因此,以下概述不旨在識別要求保護的主題的基本特徵,也不旨在用於確定要求保護的主題的範圍。The following overview is illustrative only and is not intended to be limiting in any way. That is, the following summary is provided to introduce the concepts, highlights, benefits, and advantages of the novel and non-obvious technologies described herein. Selected, but not all, embodiments are further described in the detailed description below. Accordingly, the following summary is not intended to identify essential features of the claimed subject matter, nor is it intended to be used to determine the scope of the claimed subject matter.

一些實施例提供了一種使用成本來選擇候選編解碼模式以對當前塊進行編碼或解碼的方法。視訊編解碼器接收像素塊的資料,該像素塊的資料將被編碼或解碼為視訊的當前圖片的當前塊。視訊編解碼器識別適用於當前塊的多個候選編解碼模式。視訊編解碼器識別第一候選編解碼模式組,該第一候選編解碼模式組為多個候選編解碼模式的子集。第一候選編解碼模式組可以是基於成本識別的最高優先級候選編解碼模式。第一候選編解碼模式組中的候選編解碼模式的數量少於多個候選編解碼模式中的候選編解碼模式的數量。視訊編解碼器從第一候選編解碼模式組中選擇一個候選編解碼模式。視訊編解碼器使用所選擇的候選編解碼模式對當前塊進行編碼或解碼。Some embodiments provide a method of using costs to select candidate codec modes to encode or decode the current block. The video codec receives data for a block of pixels that will be encoded or decoded into the current block of the current picture of the video. The video codec identifies multiple candidate codec modes that are suitable for the current block. The video codec identifies a first candidate codec mode group, which is a subset of a plurality of candidate codec modes. The first candidate codec mode group may be the highest priority candidate codec mode identified based on cost. The number of candidate coding and decoding modes in the first candidate coding and decoding mode group is less than the number of candidate coding and decoding modes in the plurality of candidate coding and decoding modes. The video codec selects a candidate codec mode from the first candidate codec mode group. The video codec uses the selected candidate codec mode to encode or decode the current block.

在一些實施例中,多個候選編解碼模式包括當前塊的合併候選。當前塊的合併候選可以包括(i)使用組合的幀間和幀內預測的合併候选和/或(ii)使用仿射變換運動補償預測的合併候選。在一些實施例中,多個候選編解碼模式包括對應於不同組合的候選編解碼模式,該不同組合用於細化運動資訊的距離和偏移。在一些實施例中,多個候選編解碼模式包括對應於不同線性模型的候選編解碼模式,該不同線性模型的候選編解碼模式用於基於當前塊的亮度樣本導出當前塊的色度樣本的預測子。在一些實施例中,多個候選編解碼模式包括對應於不同候選權重的候選編解碼模式,該不同候選權重用於組合不同方向的幀間預測。In some embodiments, the plurality of candidate codec modes include merge candidates for the current block. Merging candidates for the current block may include (i) merging candidates using combined inter- and intra-prediction and/or (ii) merging candidates using affine transform motion compensated prediction. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different combinations for refining distance and offset of motion information. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different linear models for deriving predictions of chroma samples of the current block based on luma samples of the current block. son. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different candidate weights for combining inter predictions in different directions.

在一些實施例中,第一候選編解碼模式組是基於多個候選編解碼模式的成本識別的最高優先級候選編解碼模式。編解碼器可以根據候選編解碼模式的優先級對所識別的候選編解碼模式組中的候選編解碼模式進行索引或者將碼字分配給所識別的候選編解碼模式組中的候選編解碼模式。在一些實施例中,候選編解碼模式的成本藉由比較以下樣本來進行計算:(i)與當前塊相鄰的重構樣本以及(ii)根據候選編解碼模式生成的當前塊沿當前塊邊界的預測樣本。In some embodiments, the first candidate codec mode group is the highest priority candidate codec mode identified based on the cost of the plurality of candidate codec modes. The codec may index the candidate codec modes in the identified candidate codec mode group or assign codewords to the candidate codec modes in the identified candidate codec mode group according to the priority of the candidate codec mode. In some embodiments, the cost of the candidate codec mode is calculated by comparing the following samples: (i) reconstructed samples adjacent to the current block and (ii) the current block generated according to the candidate codec mode along the current block boundary. prediction sample.

在一些實施例中,多個候選編解碼模式中的每個候選編解碼模式被分配給多個候選編解碼模式組中的一個候選編解碼模式組。例如,在一些實施例中,多個候選編解碼模式中的每個候選編解碼模式與原始候選索引相關聯,其中每個候選編解碼模式基於原始索引模(modulo)K或者原始索引除以K的結果被分配給K個候選編解碼模式組中的一個候選編解碼模式組。在一些實施例中,對應於空間合併候選的候選編解碼模式被分配給同一候選編解碼模式組。在一些實施例中,對應於空間合併候選的候選編解碼模式被分配給不同的候選編解碼模式組。在一些實施例中,具有運動差小於閾值的合併候選的候選編解碼模式被分配給同一候選編解碼模式組。在一些實施例中,具有大於閾值的運動差的合併候選的候選編解碼模式被分配給同一候選編解碼模式組。在一些實施例中,編碼器識別在多個候選編解碼模式組中具有最低代表成本的一個候選編解碼模式組,以及發送索引,該索引用於從所識別的候選編解碼模式組中選擇候選編解碼模式。已識別組的代表成本可以是已識別組的候選編解碼模式的成本(例如,邊界匹配成本)的平均值、最大值或最小值。在一些實施例中,編碼器發送用於選擇候選編解碼模式組的索引,以及基於所選擇的候選編解碼模式組的成本(例如,邊界匹配成本)從所選擇的候選編解碼模式組中識別候選編解碼模式。In some embodiments, each candidate codec mode in the plurality of candidate codec modes is assigned to a candidate codec mode group in the plurality of candidate codec mode groups. For example, in some embodiments, each candidate codec mode in the plurality of candidate codec modes is associated with an original candidate index, wherein each candidate codec mode is based on the original index modulo K or the original index divided by K The result is assigned to one candidate encoding and decoding mode group among the K candidate encoding and decoding mode groups. In some embodiments, candidate codec modes corresponding to spatial merging candidates are assigned to the same candidate codec mode group. In some embodiments, candidate codec modes corresponding to spatial merging candidates are assigned to different candidate codec mode groups. In some embodiments, candidate codec modes having merge candidates with motion differences less than a threshold are assigned to the same candidate codec mode group. In some embodiments, candidate codec modes that are merged candidates with a motion difference greater than a threshold are assigned to the same candidate codec mode group. In some embodiments, the encoder identifies one candidate codec mode group with the lowest representation cost among the plurality of candidate codec mode groups, and sends an index used to select a candidate from the identified candidate codec mode group Codec mode. The representative cost of an identified group may be the average, maximum, or minimum value of the costs (eg, boundary matching costs) of candidate codec modes for the identified group. In some embodiments, the encoder sends an index for selecting the set of candidate codec modes, and identifies from the selected set of candidate codec modes based on a cost (eg, a boundary matching cost) of the set of candidate codec modes. Candidate codec mode.

在下面的詳細描述中,許多具體細節藉由示例的方式被闡述,以便提供對相關教導的透徹理解。基於本文描述的教導的任一變化、推導和/或擴展都在本公開的保護範圍內。在一些情況下,與本文公開的一個或多個示例實現有關的眾所周知的方法、處理、組件和/或電路可以在相對較高的水平上描述而不具備細節,以避免不必要地模糊本公開的教導的方面。In the following detailed description, many specific details are set forth by way of examples in order to provide a thorough understanding of the relevant teachings. Any changes, derivations, and/or extensions based on the teachings described herein are within the scope of the present disclosure. In some cases, well-known methods, processes, components and/or circuits related to one or more example implementations disclosed herein may be described at a relatively high level without detail in order to avoid unnecessarily obscuring the present disclosure. aspects of teaching.

隨著視訊編解碼的改進,更多的編解碼工具被開發。然而,這些不同編解碼工具的編解碼增益不是叠加的。這是因為(1)並非所有新的編解碼模式都可以成為塊的候選模式,尤其是在考慮語法開銷時,以及(2)隨著塊的候選模式增加,需要更長的碼字來指示來自多個候選模式的編解碼模式。As video codecs improve, more codec tools are developed. However, the coding and decoding gains of these different coding and decoding tools are not additive. This is because (1) not all new codec modes can be candidate modes for a block, especially when syntax overhead is taken into account, and (2) as candidate modes for a block increase, longer codewords are needed to indicate from Codec modes for multiple candidate modes.

例如,在HEVC之後,新的合併候選(例如成對平均合併候選、HMVP合併候選等)被建議添加到合併候選列表中。最佳合併候選的索引被編碼/解碼以指示當前塊選擇的合併候選。然而,合併候選列表中的合併候選的數量被限制為預定的數量,因此並不是所有的合併候選都可以被添加到合併候選列表中。隨著合併候選列表中合併候選數量的增加,最佳合併候選的索引的碼字長度也增加。For example, after HEVC, new merging candidates (such as pairwise average merging candidates, HMVP merging candidates, etc.) are proposed to be added to the merging candidate list. The index of the best merge candidate is encoded/decoded to indicate the merge candidate selected by the current block. However, the number of merging candidates in the merging candidate list is limited to a predetermined number, so not all merging candidates can be added to the merging candidate list. As the number of merge candidates in the merge candidate list increases, the codeword length of the index of the best merge candidate also increases.

本公開的一些實施例提供了一種用於對候選模式適應性地重新排序的方案。根據該方案,視訊編碼器/解碼器計算每個候選模式的成本,其可以是另一個工具的合併候選和/或候選模式。視訊編解碼器根據成本確定候選模式的優先順序。(在一些實施例中,具有較小成本的候選模式獲得較高優先順序。在一些其他實施例中,具有較小成本的候選模式獲得較低優先順序。)然後,候選模式根據優先順序被重新排序。Some embodiments of the present disclosure provide a scheme for adaptively reordering candidate patterns. According to this scheme, the video encoder/decoder calculates the cost of each candidate mode, which can be a merge candidate and/or a candidate mode of another tool. The video codec prioritizes candidate modes based on cost. (In some embodiments, candidate patterns with smaller cost get higher priority. In some other embodiments, candidate patterns with smaller cost get lower priority.) The candidate patterns are then re-prioritized according to the priority order. Sort.

在一些實施例中,視訊編解碼器使用減少的、重新排序的候選模式集,其僅包括具有更高優先順序的前k個候選模式(k<所有可能的候選模式的數量)。由於候選模式集中的候選模式的數量減少,用於指示所選候選模式的語法也被減少。索引可被用來指代重新排序後選擇的候選模式,使得較小的索引值可以指代具有較高優先順序的候選模式。(換句話說,索引值是指候選模式在候選列表中的索引,在應用重新排序之後,索引值是指候選模式重新排序後的索引。)在一些實施例中,對於具有較高優先順序的候選模式,較短的碼字被用來進行編碼/解碼。具有最高優先順序的候選模式可以被隱式地設置為當前塊的編解碼模式。In some embodiments, the video codec uses a reduced, reordered set of candidate modes that only includes the top k candidate modes with higher priority (k < the number of all possible candidate modes). As the number of candidate patterns in the candidate pattern set is reduced, the syntax used to indicate the selected candidate pattern is also reduced. The index can be used to refer to the selected candidate patterns after reordering so that smaller index values can refer to candidate patterns with higher priority. (In other words, the index value refers to the index of the candidate pattern in the candidate list, and after the reordering is applied, the index value refers to the reordered index of the candidate pattern.) In some embodiments, for the candidate pattern with a higher priority Candidate mode, shorter codewords are used for encoding/decoding. The candidate mode with the highest priority can be implicitly set as the codec mode of the current block.

在一些實施例中,視訊編解碼器基於邊界匹配來確定候選模式集中的候選模式的優先順序。對於每個候選模式,用於使用候選模式來編解碼當前塊的邊界匹配成本被計算,以及候選模式在重新排序的候選模式列表中的優先順序根據候選模式的邊界匹配成本確定。In some embodiments, the video codec prioritizes candidate modes in a set of candidate modes based on boundary matching. For each candidate mode, the boundary matching cost for encoding and decoding the current block using the candidate mode is calculated, and the priority of the candidate mode in the reordered candidate mode list is determined based on the boundary matching cost of the candidate mode.

、邊界匹配成本, boundary matching cost

候選模式的邊界匹配成本是指從候選模式生成的當前預測(當前塊的預測樣本或預測子)與相鄰重構(一個或多個相鄰塊內的重構樣本)之間的不連續性測量(包括頂部邊界匹配和/或左邊界匹配)。頂部邊界匹配是指當前頂部預測樣本與相鄰頂部重構樣本的比較,左邊界匹配是指當前左預測樣本與相鄰左重構樣本的比較。The boundary matching cost of a candidate mode refers to the discontinuity between the current prediction generated from the candidate mode (the prediction samples or predictors of the current block) and the adjacent reconstruction (the reconstructed samples within one or more adjacent blocks) Measurements (including top boundary match and/or left boundary match). Top boundary matching refers to the comparison of the current top prediction sample and the adjacent top reconstructed sample, and the left boundary matching refers to the comparison of the current left prediction sample and the adjacent left reconstructed sample.

第1圖示出在邊界匹配中使用的重構的相鄰樣本和預測樣本。如圖所示,pred x,0是沿頂部邊界的預測樣本,reco x,-1是沿頂部邊界的重構相鄰樣本;其中pred 0,y是沿左邊界的預測樣本,reco -1,y是沿左邊界重構的相鄰樣本。 Figure 1 shows reconstructed neighbor samples and predicted samples used in boundary matching. As shown in the figure, pred x,0 is the predicted sample along the top boundary, reco x,-1 is the reconstructed adjacent sample along the top boundary; where pred 0,y is the predicted sample along the left boundary, reco -1, y is the reconstructed adjacent sample along the left boundary.

在一些實施例中,當前預測的預定子集被用來計算邊界匹配成本。例如,當前塊內的頂部邊界的n行和/或當前塊內的左邊界的m行可被使用。在這些實施例的一些中,頂部相鄰重構的n 2行和/或左相鄰重構的m 2行可用於邊界匹配。 In some embodiments, a predetermined subset of the current predictions is used to calculate the boundary matching cost. For example, n rows of the top boundary within the current block and/or m rows of the left boundary within the current block may be used. In some of these embodiments, the n 2 rows of the top adjacent reconstruction and/or the m 2 rows of the left adjacent reconstruction may be used for boundary matching.

示例邊界匹配成本根據以下公式計算,其中n = 2,m = 2,n 2=2,m 2= 2: Example boundary matching cost is calculated according to the following formula, where n = 2, m = 2, n 2 =2, m 2 = 2:

在此示例中,沿頂部和左邊界的兩行預測樣本和兩行重構的相鄰樣本用於計算差度量(或相似性度量)。權重(a, b, c, d, e, f, g, h, i, j, k, l)可以是任一正整數,例如,a = 2, b = 1, c = 1, d = 2 , e = 1, f = 1, g = 2, h = 1, i = 1, j = 2, k = 1, l = 1。另一個計算邊界匹配成本的例子如下,其中n = 2, m = 2, n 2= 1, m 2= 1: In this example, two rows of predicted samples and two rows of reconstructed adjacent samples along the top and left boundaries are used to compute the difference metric (or similarity metric). The weights (a, b, c, d, e, f, g, h, i, j, k, l) can be any positive integer, for example, a = 2, b = 1, c = 1, d = 2 , e = 1, f = 1, g = 2, h = 1, i = 1, j = 2, k = 1, l = 1. Another example of calculating the boundary matching cost is as follows, where n = 2, m = 2, n 2 = 1, m 2 = 1:

其中權重(a, b, c, g, h, i)可以是任一正整數,例如 a = 2, b = 1, c = 1, g = 2, h = 1, i = 1。另一個計算邊界匹配成本的例子如下,其中n = 1,m = 1,n 2= 2,m 2= 2: The weights (a, b, c, g, h, i) can be any positive integer, such as a = 2, b = 1, c = 1, g = 2, h = 1, i = 1. Another example of calculating the boundary matching cost is as follows, where n = 1, m = 1, n 2 = 2, m 2 = 2:

其中權重(d, e, f, j, k, l)可以是任一正整數,例如,d = 2, e = 1, f = 1, j = 2, k = 1, l = 1。另一個計算邊界匹配成本的例子如下,其中n = 1,m = 1,n 2= 1,m 2= 1: The weights (d, e, f, j, k, l) can be any positive integer, for example, d = 2, e = 1, f = 1, j = 2, k = 1, l = 1. Another example of calculating the boundary matching cost is as follows, where n = 1, m = 1, n 2 = 1, m 2 = 1:

其中權重(a, c, g, i)可以是任一正整數,例如 a = 1, c = 1, g = 1, i = 1。另一個計算邊界匹配成本的例子如下,其中n = 2, m = 1, n 2= 2, m 2= 1: The weights (a, c, g, i) can be any positive integer, such as a = 1, c = 1, g = 1, i = 1. Another example of calculating the boundary matching cost is as follows, where n = 2, m = 1, n 2 = 2, m 2 = 1:

其中權重(a, b, c, d, e, f, g, i)可以是任一正整數,例如,a = 2, b = 1, c = 1, d = 2, e = 1, f = 1, g = 1, i = 1。另一個計算邊界匹配成本的例子如下,其中n = 1, m = 2, n 2= 1, m 2= 2: The weights (a, b, c, d, e, f, g, i) can be any positive integer, for example, a = 2, b = 1, c = 1, d = 2, e = 1, f = 1, g = 1, i = 1. Another example of calculating the boundary matching cost is as follows, where n = 1, m = 2, n 2 = 1, m 2 = 2:

其中權重(a, c, g, h, i, j, k, l)可以是任一正整數,例如,a = 1, c = 1, g = 2, h = 1, i = 1, j = 2、k = 1, l = 1。概括地說,n或n 2可以是1、2、3、4等任一正整數,m或m 2可以是1、2、3、4等任一正整數。在一些實施例中,n和/或m隨塊寬度、高度或面積而變化。例如,對於更大的塊(面積>閾值),m變大,閾值可以是64、128或256,當面積>閾值時,m可以從1增加到2,或者從1或2增加到4。又例如,對於更高的塊(高度>閾值*寬度),m變大和/或n變小,閾值可以是1,2或4;當高度>閾值*寬度時,m可能從1增加到2,或者從1或2增加到4。再比如,對於更大的塊(面積>閾值),n變大,閾值可能是64,128或256 ;當面積>閾值時,n從1增加到2,或者從1或2增加到4。再比如,對於更寬的塊(寬度>閾值*高度),n變大和/或m變小,閾值=1,2或4;當寬度>閾值*高度時,n從1增加到2;當寬度>閾值*高度時,n從1或2增加到4。 The weights (a, c, g, h, i, j, k, l) can be any positive integer, for example, a = 1, c = 1, g = 2, h = 1, i = 1, j = 2. k = 1, l = 1. In summary, n or n 2 can be any positive integer such as 1, 2, 3, 4, etc., and m or m 2 can be any positive integer such as 1, 2, 3, 4, etc. In some embodiments, n and/or m vary with block width, height, or area. For example, for larger blocks (area > threshold), m becomes larger, and the threshold can be 64, 128, or 256. When area > threshold, m can increase from 1 to 2, or from 1 or 2 to 4. As another example, for taller blocks (height > threshold * width), m becomes larger and/or n becomes smaller, the threshold can be 1, 2 or 4; when height > threshold * width, m may increase from 1 to 2, Or increase from 1 or 2 to 4. For another example, for larger blocks (area > threshold), n becomes larger, and the threshold may be 64, 128 or 256; when area > threshold, n increases from 1 to 2, or from 1 or 2 to 4. For another example, for wider blocks (width > threshold * height), n becomes larger and/or m becomes smaller, threshold = 1, 2 or 4; when width > threshold * height, n increases from 1 to 2; when width > When threshold*height, n increases from 1 or 2 to 4.

又例如,n和/或m可以在視訊編解碼標準中定義或取決於在CU/CB、PU/PB、TU/TB、CTU/CTB、圖塊、片段、圖片級別、sps級別和/或pps級別中發送出的編解碼視訊語法或去解析的編解碼視訊語法。As another example, n and/or m may be defined in the video codec standard or depend on the code in CU/CB, PU/PB, TU/TB, CTU/CTB, tile, segment, picture level, sps level and/or pps The codec video syntax sent out in the level or the codec video syntax to be parsed.

在一些實施例中,當當前塊位於CTU行內的頂部邊界時,頂部邊界匹配不被使用和/或僅左邊界匹配被使用。(交叉CTU行處的相鄰重構樣本不被使用。)在一些實施例中,當當前塊位於CTU內的左邊界時,左邊界匹配不被使用和/或僅頂部邊界匹配被使用。在一些實施例中,當當前塊較高時(高度>閾值*寬度),僅左邊界匹配被使用。在一些實施例中,當當前塊較寬(寬度>閾值*高度)時,僅頂部邊界匹配被使用。In some embodiments, when the current block is at the top boundary within a CTU row, top boundary matching is not used and/or only left boundary matching is used. (Adjacent reconstructed samples at crossing CTU rows are not used.) In some embodiments, when the current block is at the left boundary within the CTU, left boundary matching is not used and/or only top boundary matching is used. In some embodiments, when the current block is taller (height > threshold*width), only left boundary matching is used. In some embodiments, only top boundary matching is used when the current block is wider (width > threshold*height).

在一些實施例中,左上相鄰的重構樣本(reco -1,1)可以用於邊界匹配。例如,邊界匹配成本加上以下項: In some embodiments, the upper left adjacent reconstructed sample (reco -1,1 ) may be used for boundary matching. For example, the boundary matching cost plus:

在一些實施例中,在計算邊界匹配成本時,還可以在當前預測(或當前塊的預測子)上加上殘差來重構當前塊的樣本,當前塊的重構樣本被用來計算邊界匹配成本。例如,殘差藉由在變換處理之後恢復DC和/或所有AC係數或AC係數的任一子集來生成。變換處理可以使用任一預定的變換內核進行二次變換和/或一次變換。例如,用於二次變換的變換内核是指低頻不可分離變換(Low Frequency Non-Separable Transform,簡稱LFNST)變換内核。例如,用於初級變換的變換內核指的是DCT2和/或用於多變換選擇(Multiple Transform Selection,簡稱MTS)的任一變換內核,例如DST7。例如,變換内核指的是在當前塊的變換模組中應用的真實變換。In some embodiments, when calculating the boundary matching cost, residuals can also be added to the current prediction (or predictor of the current block) to reconstruct the samples of the current block, and the reconstructed samples of the current block are used to calculate the boundary. Matching costs. For example, the residual is generated by recovering DC and/or all AC coefficients or any subset of AC coefficients after the transform process. The transformation process may use any predetermined transformation kernel for secondary transformation and/or primary transformation. For example, the transformation kernel used for secondary transformation refers to the Low Frequency Non-Separable Transform (LFNST) transformation kernel. For example, the transformation kernel used for primary transformation refers to DCT2 and/or any transformation kernel used for multiple transform selection (Multiple Transform Selection, MTS for short), such as DST7. For example, the transformation kernel refers to the actual transformation applied in the current block's transformation module.

、作為候選模式的合併候選, as a merge candidate for candidate mode

本公開的一些實施例提供了一種重新排序和/或減少合併候選的方案。在一些實施例中,最佳合併候選的索引(index_best_merge)不是指代合併候選列表中合併候選的順序,而是指代基於邊界匹配成本的優先順序。在一些實施例中,只有前k個合併候選(具有較高優先順序)可以是候選模式。Some embodiments of the present disclosure provide a solution for reordering and/or reducing merge candidates. In some embodiments, the index of the best merge candidate (index_best_merge) does not refer to the order of the merge candidates in the merge candidate list, but to the priority order based on the boundary matching cost. In some embodiments, only the top k merge candidates (with higher priority) may be candidate patterns.

例如,對於合併候選列表{cand0, cand1, cand2, cand3, cand4, cand5, ...},合併候選的邊界匹配成本被計算為{cost_cand0, cost_cand1, cost_cand2, ...},這樣cost_cand0指的是cand0的邊界匹配成本,cost_cand1是指cand1的邊界匹配成本,cost_cand2是指cand2的邊界匹配成本,等等。視訊編解碼器然後根據邊界匹配成本重新排序{cand0,cand1,cand2,...}。例如cost_cand0 > cost_cand1 > cost_cand2 > cost_cand3 > cost_cand4 > cost_cand5,則重新排序後的合併候選成為{cand5, cand4, cand3, cand2, cand1, cand0},index_best_merge 0可以指代cand5(具有最小成本的合併候選使用最短的碼字發送),index_best_merge 1可以指代cand4,index_best_merge 2可以指代cand3,等等。For example, for the merge candidate list {cand0, cand1, cand2, cand3, cand4, cand5, ...}, the boundary matching cost of the merge candidate is calculated as {cost_cand0, cost_cand1, cost_cand2, ...}, so that cost_cand0 refers to The boundary matching cost of cand0, cost_cand1 refers to the boundary matching cost of cand1, cost_cand2 refers to the boundary matching cost of cand2, and so on. The video codec then reorders {cand0, cand1, cand2,...} based on the boundary matching cost. For example, cost_cand0 > cost_cand1 > cost_cand2 > cost_cand3 > cost_cand4 > cost_cand5, then the reordered merge candidates become {cand5, cand4, cand3, cand2, cand1, cand0}, and index_best_merge 0 can refer to cand5 (the merge candidate with the smallest cost uses the shortest codeword is sent), index_best_merge 1 can refer to cand4, index_best_merge 2 can refer to cand3, and so on.

在一些實施例中,候選模式集僅包括前k個合併候選(根據邊界匹配成本的排序),而不是由常數(例如,VVC中的MaxNumMergeCand,其可以是6)決定。例如,在一些實施例中,k可以是4,以及每個合併候選的信令可以包括:index_best_merge 0指代具有碼字0的cand5(具有最大成本的合併候選使用最短碼字發送);index_best_merge 1指代具有碼字10的cand4;index_best_merge 2指代具有代碼字110的cand3;以及index_best_merge 3指代具有碼字111的cand2。否則,例如,如果cost_cand0<cost_cand1<cost_cand2<cost_cand3<cost_cand4<cost_cand5,則合併候選的順序可以與原始列表相同而無需重新排序:index_best_merge 0指代具有碼字0的cand0;index_best_merge 1指代具有碼字10的cand1;index_best_merge 2指代具有碼字110的cand2;以及index_best_merge 3指代具有碼字111的cand3,等等。In some embodiments, the candidate pattern set only includes the top k merge candidates (ordered according to boundary matching cost), rather than being determined by a constant (eg, MaxNumMergeCand in VVC, which can be 6). For example, in some embodiments, k may be 4, and the signaling for each merge candidate may include: index_best_merge 0 refers to cand5 with codeword 0 (the merge candidate with the largest cost is sent using the shortest codeword); index_best_merge 1 refers to cand4 with codeword 10; index_best_merge 2 refers to cand3 with codeword 110; and index_best_merge 3 refers to cand2 with codeword 111. Otherwise, for example, if cost_cand0 < cost_cand1 < cost_cand2 < cost_cand3 < cost_cand4 < cost_cand5, the order of the merge candidates can be the same as the original list without reordering: index_best_merge 0 refers to cand0 with codeword 0; index_best_merge 1 refers to cand0 with codeword 0 cand1 of 10; index_best_merge 2 refers to cand2 with codeword 110; and index_best_merge 3 refers to cand3 with codeword 111, and so on.

在一些實施例中,具有最大成本的合併候選使用最短碼字發送。再例如,如果cost_cand0<cost_cand1<cost_cand2<cost_cand3<cost_cand4< cost_cand5,則重新排序的合併候選成為{cand5,cand4,cand3,cand2,cand1,cand0},這樣index_best_merge 0指代具有碼字0的cand5(最大成本使用最短碼字);index_best_merge 1指代具有碼字10的cand4;以及index_best_merge 2指代具有碼字110的cand3。In some embodiments, the merge candidate with the largest cost is sent using the shortest codeword. For another example, if cost_cand0<cost_cand1<cost_cand2<cost_cand3<cost_cand4<cost_cand5, then the reordered merge candidates become {cand5, cand4, cand3, cand2, cand1, cand0}, so that index_best_merge 0 refers to cand5 with codeword 0 (maximum cost using the shortest codeword); index_best_merge 1 refers to cand4 with codeword 10; and index_best_merge 2 refers to cand3 with codeword 110.

在一些子實施例中,是使用減少和重新排序的合併候選列表(基於邊界匹配成本重新排序以及限於k個候選)還是原始合併候選列表(沒有重新排序)基於預定規則來決定(例如隱式地取決於塊寬度、塊高度或塊區域,或顯式地取決於CU/CB、PU/PB、TU/TB、CTU/CTB、圖塊、片段級別、圖片級別、SPS 級別和/或PPS級別)。當減少和重新排序的合併候選列表被使用時,用於發送的熵編解碼上下文可能不同於使用原始合併候選列表。In some sub-embodiments, whether to use the reduced and reordered merge candidate list (reordered based on boundary matching cost and limited to k candidates) or the original merge candidate list (without reordering) is decided based on predetermined rules (e.g. implicitly Dependent on block width, block height or block area, or explicitly on CU/CB, PU/PB, TU/TB, CTU/CTB, tile, fragment level, picture level, SPS level and/or PPS level) . When a reduced and reordered merge candidate list is used, the entropy encoding and decoding context used for transmission may be different than when the original merge candidate list was used.

在一些實施例中,對於index_best_merge變數,較小的值用較短的碼字長度進行編解碼。index_best_merge變數可以用截斷的一元碼字進行編解碼。In some embodiments, for the index_best_merge variable, smaller values are encoded with shorter codeword lengths. The index_best_merge variable can be encoded and decoded with truncated unary codewords.

在一些實施例中,重新排序僅應用於合併候選列表的子集。例如,子集可以參考原來的前n個候選cand0,cand1,cand2,這樣index_best_merge 0/1/2指代基於邊界匹配的優先順序,index_best_merge 3/4/5指代原始cand 3/4/5。又例如,子集指的是原來的最後n個候選cand3,cand4,cand5。那麼index_best_merge 3/4/5指代基於邊界匹配的優先順序,index_best_merge 0/1/2指代原始cand 0/1/2。又例如,該子集可以指代空間合併候選。In some embodiments, reordering is applied only to a subset of the merge candidate list. For example, the subset can refer to the original top n candidates cand0, cand1, and cand2, so that index_best_merge 0/1/2 refers to the priority order based on boundary matching, and index_best_merge 3/4/5 refers to the original cand 3/4/5. For another example, the subset refers to the original last n candidates cand3, cand4, and cand5. Then index_best_merge 3/4/5 refers to the priority order based on boundary matching, and index_best_merge 0/1/2 refers to the original cand 0/1/2. As another example, the subset may refer to spatial merging candidates.

在一些實施例中,最佳合併候選被推斷為所有合併候選中具有最小邊界匹配成本的合併候選。在一些實施例中,最佳合併候選被推斷為所有合併候選中具有最大邊界匹配成本的合併候選。在這些實施例的一些中,index_best_merge沒有被編碼器/解碼器發送/解析,以及可以被推斷為0。In some embodiments, the best merge candidate is inferred to be the merge candidate with the smallest boundary matching cost among all merge candidates. In some embodiments, the best merge candidate is inferred to be the merge candidate with the largest boundary matching cost among all merge candidates. In some of these embodiments, index_best_merge is not sent/parsed by the encoder/decoder, and may be inferred to be 0.

在一些實施例中,合併候選被分成幾個組。每個組的邊界匹配成本被計算。有希望的組被隱式地標識為具有最高優先順序的組。如果在識別的有希望的組中包括一個以上的合併候選,則減少的合併索引被發送/被解析以指示來自有希望的組的合併候選。由於每個組中的合併候選數量少於原始合併候選列表中的合併候選數量,因此減少的合併索引將比原始合併索引佔用更少的碼字。In some embodiments, merge candidates are divided into several groups. The boundary matching cost for each group is calculated. The promising group is implicitly identified as the group with the highest priority. If more than one merge candidate is included in the identified promising group, a reduced merge index is sent/parsed to indicate the merge candidates from the promising group. Since the number of merge candidates in each group is less than the number of merge candidates in the original merge candidate list, the reduced merge index will occupy fewer codewords than the original merge index.

在一些實施例中,如果k組被使用以及原始合併候選列表中的合併候選的數量為N,則每個組中的合併候選的數量為“N/k”以及分組規則取決於合併索引和/或合併類型。例如,具有相同“合併索引% k”(模運算子的餘數)值的合併候選在同一組中。又例如,具有相同“合併索引/ k”(除法運算子的商)值的合併候選在同一組中。又例如,空間合併候選在同一組中。又例如,k隨塊寬度,塊高度和/或塊面積而變化。又例如,運動差小的合併候選在同一組中。運動差包括mv差和/或參考圖片差。計算候選0和候選1之間的mv差(表示為mv_diff)的一個例子是: mv_diff = |(mvx_cand0 –mvx_cand1)| + |(mvy_cand0 –mvy_cand1)| In some embodiments, if k groups are used and the number of merge candidates in the original merge candidate list is N, then the number of merge candidates in each group is "N/k" and the grouping rules depend on the merge index and/or or merge type. For example, merge candidates with the same Merge Index % k (remainder of the modulo operator) value are in the same group. As another example, merge candidates with the same "merge index/k" (quotient of the division operator) value are in the same group. As another example, spatial merging candidates are in the same group. As another example, k varies with block width, block height, and/or block area. For another example, merge candidates with small motion differences are in the same group. Motion differences include mv differences and/or reference picture differences. An example of calculating the mv difference (denoted as mv_diff) between candidate 0 and candidate 1 is: mv_diff = |(mvx_cand0 –mvx_cand1)| + |(mvy_cand0 –mvy_cand1)|

如果參考圖片相同和/或mv差小於預定閾值,則運動差較小。If the reference pictures are the same and/or the mv difference is less than a predetermined threshold, the motion difference is smaller.

在一些實施例中,當一個組包含一個以上的合併候選時,該組的成本(該組的代表成本)是該組中所有合併候選的成本的平均成本。在一些子實施例中,當一個組包含一個以上的合併候選時,該組的代表成本是來自該組中所有合併候選的成本的平均、最大或最小成本。In some embodiments, when a group contains more than one merge candidate, the cost of the group (the representative cost of the group) is the average cost of the costs of all merge candidates in the group. In some sub-embodiments, when a group contains more than one merge candidate, the representative cost of the group is the average, maximum or minimum cost from the costs of all merge candidates in the group.

在一些實施例中,合併候選被劃分成幾個子集,以及子集的選擇被顯式地發送給解碼器。此外,合併候選子集中的合併候選的選擇藉由使用邊界匹配成本來進行。子集分區規則可以取決於合併索引和/或合併類型。例如,具有相同“合併索引% k”值的合併候選在同一個子集中。又例如,具有相同“合併索引/k”值的合併候選在同一子集中(k可能隨著塊寬度、塊高度和/或塊面積而變化。)又例如,空間合併候選在不同子集中。又例如,具有較大運動差的合併候選在同一子集中。運動差包括mv差和/或參考圖片差。計算候選0和候選1之間的mv差(表示為mv_diff)的一個例子是: mv_diff = |(mvx_cand0 –mvx_cand1)| + |(mvy_cand0 –mvy_cand1)| In some embodiments, the merge candidates are divided into several subsets, and the selection of subsets is explicitly sent to the decoder. Furthermore, selection of merge candidates in the subset of merge candidates is performed using boundary matching costs. Subset partitioning rules can depend on the merge index and/or merge type. For example, merge candidates with the same "Merge Index % k" value are in the same subset. As another example, merge candidates with the same "merge index/k" value are in the same subset (k may vary with block width, block height, and/or block area.) As another example, spatial merge candidates are in different subsets. For another example, merge candidates with larger motion differences are in the same subset. Motion differences include mv differences and/or reference picture differences. An example of calculating the mv difference (denoted as mv_diff) between candidate 0 and candidate 1 is: mv_diff = |(mvx_cand0 –mvx_cand1)| + |(mvy_cand0 –mvy_cand1)|

如果參考圖片不同和/或mv差大於預定閾值,則運動差很大。If the reference pictures are different and/or the mv difference is larger than a predetermined threshold, the motion difference is large.

在一些實施例中,CU的合併候選包括一個或多個以下候選:(1)來自空間相鄰CU的空間合併候選或空間MVP,(2)來自同位CU的時間MVP,(3)來自FIFO表的基於歷史的MVP,(4)成對平均MVP,和/或(5)零MV。In some embodiments, the CU's merge candidates include one or more of the following candidates: (1) spatial merge candidates or spatial MVPs from spatially neighboring CUs, (2) temporal MVPs from co-located CUs, (3) from the FIFO table of history-based MVP, (4) pairwise average MVP, and/or (5) zero MV.

在一些實施例中,該部分中的合併候選指的是用於組合幀間和幀內預測(combined inter and intra prediction,簡稱CIIP)的合併候選。當前塊內的預測樣本生成為CIIP處理。在一些實施例中,本節中的合併候選是指子塊合併候選的合併候選,例如仿射合併候選。當前塊內的預測樣本由仿射處理生成,例如,基於塊的仿射變換運動補償預測。In some embodiments, the merging candidates in this section refer to merging candidates for combined inter and intra prediction (CIIP). The prediction samples within the current block are generated as CIIP processing. In some embodiments, a merge candidate in this section refers to a merge candidate of a sub-block merge candidate, such as an affine merge candidate. Prediction samples within the current block are generated by affine processing, e.g., block-based affine transform motion compensated prediction.

a.a. 空間合併候選Spatial merge candidates

在位於CU周圍位置的候選中最多選擇四個合併候選,如第2圖所示,它顯示了空間合併候選的位置。推導順序為B 0、A 0、B 1、A 1、B 2。僅在位置B 0、A 0、B 1、A 1的一個或多個CU不可用(例如,因為它屬於另一個片段或圖塊)或被幀內編解碼時,位置B 2才被考慮。位置A 1的候選被添加後,對剩餘候選的添加進行冗餘校驗(redundancy check),以保證具有相同運動資訊的候選被排除在列表之外,從而提高編解碼效率。為了降低計算複雜度,在提到的冗餘校驗中並未考慮所有可能的候選對。只有當用於冗餘校驗的對應候選不具有相同的運動資訊時,候選才被添加到列表中。僅以下候選對被考慮:(A 1, B 1), (A 1, A 0), (A 1, B 2), (B 1, B 0), (B 1, B 2)。 At most four merging candidates are selected among the candidates located at positions around the CU, as shown in Figure 2, which shows the locations of spatial merging candidates. The derivation sequence is B 0 , A 0 , B 1 , A 1 , B 2 . Position B 2 is only considered if one or more CUs at position B 0 , A 0 , B 1 , A 1 are not available (for example, because it belongs to another segment or tile) or are intra-coded. After the candidate at position A 1 is added, a redundancy check is performed on the remaining candidates to ensure that candidates with the same motion information are excluded from the list, thereby improving encoding and decoding efficiency. In order to reduce the computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Candidates are added to the list only if the corresponding candidates used for redundancy checking do not have the same motion information. Only the following candidate pairs are considered: (A 1 , B 1 ), (A 1 , A 0 ), (A 1 , B 2 ), (B 1 , B 0 ), (B 1 , B 2 ).

b.b. 時間合併候選Time merge candidates

只有一個時間合併候選被添加到合併候選列表。具體地,在該時間合併候選的推導中,縮放的運動向量基於同位CU來導出,該同位CU屬於同位參考圖片。用於推導同位的CU的參考圖片列表和參考索引在片段報頭中顯式地發送。如第3圖中的虛線所示,時間合併候選的縮放運動向量被獲取,其示出時間合併候選的運動向量縮放。縮放的運動向量使用圖片順序計數(picture order count,簡稱POC)距離tb和td從同位的CU的運動向量進行縮放,其中tb定義為當前圖片的參考圖片與當前圖片之間的POC差,以及td定義為同位圖片的參考圖片和同位圖片之間的POC差。時間合併候選的參考圖片索引被設置為等於零。時間候選的位置在候選C 0和C 1之間選擇,如第4圖所示,其示出當前塊的時間合併候選的候選位置。如果位置C 0處的CU不可用,被幀內編解碼或在當前CTU行之外,則位置C 1用於時間合併候選。否則,位置C 0用於推導時間合併候選。 Only one time merge candidate is added to the merge candidate list. Specifically, in the derivation of this temporal merging candidate, the scaled motion vector is derived based on the co-located CU, which belongs to the co-located reference picture. The reference picture list and reference index used to derive co-located CUs are sent explicitly in the segment header. The scaled motion vector of the temporal merging candidate is obtained as shown by the dashed line in Figure 3, which shows the scaling of the motion vector of the temporal merging candidate. The scaled motion vector is scaled from the motion vector of the co-located CU using picture order count (POC) distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td It is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero. The position of the temporal candidate is selected between candidates C 0 and C 1 , as shown in Figure 4 , which shows the candidate position of the temporal merging candidate of the current block. If the CU at position C 0 is not available, is intra-coded, or is outside the current CTU row, then position C 1 is used as a temporal merging candidate. Otherwise, position C 0 is used to derive temporal merge candidates.

c.c. 基於歷史的合併候選History-Based Merger Candidates

基於歷史的MVP(history-based motion vector prediction,簡稱HMVP)合併候選被添加到空間MVP和TMVP之後的合併列表中。在該方法中,先前編解碼塊的運動資訊存儲在表中並用作當前CU的MVP。在編碼/解碼處理中,具有多個HMVP候選的表被維護。當遇到新的CTU行時,該表將被重置(清空)。每當存在非子塊幀間編解碼CU時,相關聯的運動資訊將作為新的HMVP候選添加到該表的最後一個條目。History-based motion vector prediction (HMVP) merge candidates are added to the merge list after spatial MVP and TMVP. In this method, the motion information of the previous codec block is stored in the table and used as the MVP of the current CU. During the encoding/decoding process, a table with multiple HMVP candidates is maintained. The table is reset (emptied) when a new CTU row is encountered. Whenever a non-subblock inter-codec CU exists, the associated motion information is added to the last entry of the table as a new HMVP candidate.

HMVP表大小S設置為6,這表示最多可以將5個基於歷史的MVP(HMVP)候選添加到表中。當向表中插入新的運動候選時,受約束的先進先出(first-in-first-out,簡稱FIFO)規則被應用,其中冗餘校驗首先被應用以查閱資料表中是否存在相同的HMVP。如果找到,相同的HMVP被從表中移除以及之後的所有HMVP候選被向前移動,並且相同的HMVP被插入到表的最後條目。The HMVP table size S is set to 6, which means that up to 5 history-based MVP (HMVP) candidates can be added to the table. When inserting a new motion candidate into the table, the constrained first-in-first-out (FIFO) rule is applied, where a redundancy check is first applied to check whether the same motion candidate exists in the data table. HMVP. If found, the same HMVP is removed from the table and all subsequent HMVP candidates are moved forward and the same HMVP is inserted into the last entry of the table.

HMVP候選可用於合併候選列表構建處理。表中最新的幾個HMVP候選被依次檢查,以及被插入到候選列表中位於TMVP候選之後。冗餘校驗應用於HMVP候選到空間或時間合併候選。HMVP candidates can be used in the merge candidate list building process. The latest several HMVP candidates in the table are checked sequentially and inserted into the candidate list after the TMVP candidates. Redundancy checks are applied from HMVP candidates to spatial or temporal merge candidates.

在一些實施例中,為了減少冗餘校驗操作的數量,表中的最後兩個條目分別對A 1和B 1空間候選進行冗餘校驗。一旦可用的合併候選總數達到允許的最大合併候選減1,HMVP的合併候選列表構建處理就終止了。 In some embodiments, in order to reduce the number of redundant check operations, the last two entries in the table perform redundant checks on the A 1 and B 1 space candidates respectively. Once the total number of available merge candidates reaches the maximum allowed merge candidate minus 1, HMVP's merge candidate list construction process is terminated.

d.d. 成對平均合併候選Pairwise average merge candidates

成對平均候選藉由使用前兩個合併候選對現有合併候選列表中的預定候選對進行平均來生成。第一合併候選被定義為p0Cand,第二合併候選可以被定義為p1Cand。根據p0Cand和p1Cand的運動向量分別對每個參考列表的可用性來計算平均運動向量。如果兩個運動向量在一個列表中可用,即使這兩個運動向量指向不同的參考圖片,也會對其進行平均,以及其參考圖片被設置為屬於p0Cand和p1Cand之一的參考圖片或用於p0Cand和p1Cand之一的參考圖片(例如設置為p0Cand的參考圖片或設置為p1Cand的參考圖片)”;如果只有一個運動向量可用,則直接使用那個運動向量所對應的合併候選;如果沒有運動向量可用,則保持此列表無效。另外,如果p0Cand和p1Cand的半像素插值濾波器索引(half-pel inerpolation filter index)不同,它被設置為0。在一些實施例中,當合併列表未滿時,在成對平均合併候選被添加之後,最後零MVP被插入,直到遇到最大合併候選數量。Pairwise average candidates are generated by averaging a predetermined pair of candidates in the existing merge candidate list using the first two merge candidates. The first merge candidate is defined as pOCand, and the second merge candidate may be defined as p1Cand. The average motion vector is calculated based on the availability of the motion vectors of p0Cand and p1Cand to each reference list respectively. If two motion vectors are available in a list, they will be averaged even if they point to different reference pictures, and their reference picture is set to the reference picture belonging to one of p0Cand and p1Cand or for p0Cand and p1Cand one of the reference pictures (such as the reference picture set to p0Cand or the reference picture set to p1Cand)"; if only one motion vector is available, the merge candidate corresponding to that motion vector is directly used; if no motion vector is available, then keep this list invalid. In addition, if the half-pel inerpolation filter index of p0Cand and p1Cand is different, it is set to 0. In some embodiments, when the merge list is not full, the After the average merge candidates are added, finally zero MVPs are inserted until the maximum number of merge candidates is encountered.

e.e. 組合幀間和幀內預測(Combined inter and intra prediction ( Combined inter and intra predictionCombined inter and intra prediction ,簡稱, abbreviation CIIPCIIP )

當CU以合併模式編解碼時,如果CU包含至少64個亮度樣本(即CU寬度乘以CU高度等於或大於64),以及如果CU寬度和CU高度都小於128個亮度樣本,額外標誌可以被發送以指示組合幀間/幀內預測(CIIP)模式是否應用於當前CU。CIIP預測將幀間預測訊號與幀內預測訊號組合。CIIP模式中的幀間預測訊號 P inter 使用與應用於常規合併模式相同的幀間預測處理導出;以及幀內預測訊號 P intra 依照常規幀內預測處理導出,使用的一種或多種幀內預測模式為平面模式(planar mode)或從預定機制導出的一種或多種幀內預測模式。例如,在下文中,預定機制基於當前塊的相鄰參考區域(範本)。CU的幀內預測模式由編碼器和解碼器處的相鄰範本隱式地導出,而不是作為準確的幀內預測模式位元發送給解碼器。對每個候選模式的範本參考樣本生成範本的預測樣本。成本被計算為範本的預測樣本和重構樣本之間的SATD。具有最小成本的幀內預測模式和/或一些具有較小成本的幀內預測模式被選擇以及用於CU的幀內預測。候選模式可以是所有MPM和/或MPM的任一子集,如VVC中的67種幀內預測模式或擴展到131種幀內預測模式。幀內和幀間預測訊號使用加權平均進行組合,其中權重值根據頂部和左側相鄰塊的編解碼模式來計算。CIIP預測 P CIIP 的構成如下:( wt為權重值) When the CU is encoded in merged mode, the extra flag may be sent if the CU contains at least 64 luma samples (i.e., CU width times CU height is equal to or greater than 64), and if both CU width and CU height are less than 128 luma samples. To indicate whether combined inter/intra prediction (CIIP) mode is applied to the current CU. CIIP prediction combines inter prediction signals with intra prediction signals. The inter prediction signal P inter in CIIP mode is derived using the same inter prediction process as applied to the conventional merge mode; and the intra prediction signal P intra is derived according to the conventional intra prediction process using one or more intra prediction modes: Planar mode or one or more intra prediction modes derived from a predetermined mechanism. For example, in the following, the predetermined mechanism is based on the neighboring reference areas (templates) of the current block. The intra prediction mode of a CU is implicitly derived from the neighboring templates at the encoder and decoder, rather than being sent to the decoder as the exact intra prediction mode bits. Generate prediction samples of the template for each candidate pattern's template reference sample. The cost is calculated as the SATD between the predicted sample and the reconstructed sample of the template. The intra prediction mode with minimum cost and/or some intra prediction mode with smaller cost is selected and used for intra prediction of the CU. Candidate modes can be all MPMs and/or any subset of MPMs, such as the 67 intra prediction modes in VVC or extended to 131 intra prediction modes. The intra- and inter-prediction signals are combined using a weighted average, where the weight values are calculated based on the codec mode of the top and left neighboring blocks. CIIP predicts P The composition of CIIP is as follows: ( wt is the weight value)

f.f. 仿射合併候選Affine merge candidates

視訊中的物件可能有不同類型的運動,包括平移運動、放大/縮小運動、旋轉運動、透視運動和其他不規則運動。在一些實施例中,使用基於塊的仿射變換運動補償預測來解決這些不同類型的運動。VVC提供基於塊的仿射變換運動補償預測。具體來說,當前塊的仿射運動場可以用兩個控制點的運動資訊(例如,在塊的右上角和左上角)(4參數)或三個控制點的運動資訊(例如,在塊的右上角、左上角和左下角)(6參數)。對於4參數仿射運動模型,塊中樣本位置(x, y)處的運動向量導出為: Objects in the video may have different types of motion, including translational motion, zoom-in/zoom-out motion, rotational motion, perspective motion, and other irregular motions. In some embodiments, block-based affine transform motion compensated prediction is used to account for these different types of motion. VVC provides block-based affine transform motion compensated prediction. Specifically, the affine motion field of the current block can use the motion information of two control points (for example, at the upper right corner and the upper left corner of the block) (4 parameters) or the motion information of three control points (for example, at the upper right corner of the block). corner, upper left corner and lower left corner) (6 parameters). For a 4-parameter affine motion model, the motion vector at sample position (x, y) in the block is derived as:

對於6參數仿射運動模型,塊中樣本位置(x, y)處的運動向量導出為: For a 6-parameter affine motion model, the motion vector at sample position (x, y) in the block is derived as:

其中(mv 0x,mv 0y)為左上角控制點的運動向量,(mv 1x,mv 1y)為右上角控制點的運動向量,(mv 2x,mv 2y)為左下角的運動向量控制點。 Among them (mv 0x ,mv 0y ) is the motion vector of the upper left corner control point, (mv 1x ,mv 1y ) is the motion vector of the upper right corner control point, (mv 2x ,mv 2y ) is the motion vector control point of the lower left corner.

仿射合併模式,或AF_MERGE模式可以應用於寬度和高度都大於或等於8的CU。在這種模式下,當前CU的控制點(motion vector at the control points,簡稱CPMV)處的運動向量根據空間相鄰CU運動資訊生成。最多可以有五個CPMVP候選,以及所以被發送以用來指示要用於當前CU的那個候選。以下三種CPMV候選用於形成仿射合併候選列表:(1)繼承仿射合併候選,從相鄰CU的CPMV中推斷出來;(2)構建的仿射合併候選CPMVP,這些CPMVP使用相鄰CU的平移MV導出;(3)零MV。Affine merge mode, or AF_MERGE mode, can be applied to CUs with both width and height greater than or equal to 8. In this mode, the motion vector at the control point (CPMV) of the current CU is generated based on the motion information of spatially adjacent CUs. There can be up to five CPMVP candidates, and so is sent to indicate which candidate is to be used for the current CU. The following three types of CPMV candidates are used to form the affine merge candidate list: (1) inherited affine merge candidates, which are inferred from the CPMVs of neighboring CUs; (2) constructed affine merge candidate CPMVPs, which use the CPMVs of neighboring CUs. Translational MV export; (3) Zero MV.

在VVC中,最多有兩個繼承的仿射候選,它們來自相鄰塊的仿射運動模型,一個來自左相鄰CU(左側預測子),一個來自頂部相鄰CU(頂部預測子)。 對於左側的預測子,掃描順序是A0->A1,對於頂部的預測子,掃描順序是B0->B1->B2。僅每一側的第一繼承候選被選擇。在兩個繼承的候選之間不執行修剪檢查(pruning check)。當相鄰的仿射CU被識別時,其控制點運動向量用於導出當前CU的仿射合併列表中的CPMVP候選。當相鄰仿射CU採用6個參數的仿射模式進行編解碼時,根據相鄰仿射CU的左上角、右上角和左下角的運動向量計算當前CU的三個CPMV。當相鄰仿射CU採用4個參數的仿射模型進行編解碼時,根據相鄰仿射CU的左上角和右上角的運動向量計算當前CU的兩個CPMV。In VVC, there are at most two inherited affine candidates from the affine motion models of neighboring blocks, one from the left neighboring CU (left predictor) and one from the top neighboring CU (top predictor). For the left predictor, the scan order is A0->A1, and for the top predictor, the scan order is B0->B1->B2. Only the first inheritance candidate on each side is selected. No pruning check is performed between two inherited candidates. When a neighboring affine CU is identified, its control point motion vector is used to derive the CPMVP candidate in the affine merge list of the current CU. When the adjacent affine CU adopts the 6-parameter affine mode for encoding and decoding, the three CPMVs of the current CU are calculated based on the motion vectors of the upper left corner, upper right corner and lower left corner of the adjacent affine CU. When an adjacent affine CU uses a 4-parameter affine model for encoding and decoding, two CPMVs of the current CU are calculated based on the motion vectors of the upper left corner and upper right corner of the adjacent affine CU.

構建的仿射候選藉由結合每個控制點的相鄰平移運動資訊來構建。控制點的運動資訊來自當前塊的空間相鄰塊(A0、A1、A2、B0、B1、B2、B3)和時間相鄰塊。CPMV k(k=1, 2, 3, 4)表示第k個控制點的MV。對於CPMV1,B2->B3->A2塊被檢查以及第一可用塊的MV被使用。對於CPMV 2,B1->B0塊被檢查,以及對於CPMV3,A1->A0塊被檢查。如果TMVP可用,則將其用作 CPMV4。 The constructed affine candidates are constructed by combining the adjacent translational motion information of each control point. The motion information of the control point comes from the spatial adjacent blocks (A0, A1, A2, B0, B1, B2, B3) and temporal adjacent blocks of the current block. CPMV k (k=1, 2, 3, 4) represents the MV of the kth control point. For CPMV1, the B2->B3->A2 blocks are checked and the MV of the first available block is used. For CPMV 2 , the B1->B0 blocks are checked, and for CPMV3, the A1->A0 blocks are checked. If TMVP is available, use it as CPMV4.

獲得四個控制點的MV後,仿射合併候選基於這些運動資訊被構建。以下控制點MV的組合依次用於構建:{CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2 }, {CPMV1, CPMV3}。3個CPMV的組合構建一個6參數仿射合併候選,2個CPMV的組合構建一個4參數仿射合併候選。為了避免運動縮放處理,如果控制點的參考索引不同,則控制點MV的相關組合被丟棄。繼承仿射合併候選和構建的仿射合併候選被檢查後,如果候選列表仍未滿,則零MV被插入到列表末尾。After obtaining the MVs of the four control points, affine merging candidates are constructed based on these motion information. The following combinations of control point MVs are used in the construction: {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, { CPMV1, CPMV3}. The combination of 3 CPMVs builds a 6-parameter affine merge candidate, and the combination of 2 CPMVs builds a 4-parameter affine merge candidate. To avoid motion scaling processing, relevant combinations of control point MVs are discarded if their reference indices are different. After the inherited affine merge candidates and the constructed affine merge candidates have been checked, if the candidate list is still not full, zero MV is inserted at the end of the list.

, MMVDMMVD 作為候選模式as a candidate model

具有運動向量差的合併模式(Merge Mode with Motion vector Difference,簡稱MMVD)是適用於多功能視訊編解碼(Versatile Video Coding,簡稱VVC)標準的新編解碼工具。與常規合併模式(隱式地導出的運動資訊直接用於當前CU的預測樣本的生成)不同,在MMVD中,導出的運動資訊藉由運動向量差MVD被進一步細化。MMVD還藉由基於預定偏移量(也被稱為MMVD偏移量)添加額外的MMVD候選來擴展合併模式的候選列表。Merge Mode with Motion Vector Difference (MMVD) is a new codec tool suitable for the Versatile Video Coding (VVC) standard. Different from the conventional merging mode (in which the implicitly derived motion information is directly used to generate prediction samples for the current CU), in MMVD, the derived motion information is further refined by motion vector difference MVD. MMVD also extends the candidate list of merge modes by adding additional MMVD candidates based on predetermined offsets (also known as MMVD offsets).

在發送跳過標誌和合併標誌以指定MMVD模式是否用於CU之後,MMVD標誌可以被發送。如果MMVD模式被使用,則選擇的合併候選將藉由MVD資訊進行細化。MVD資訊還包括合併候選標誌、用於指定運動幅度的距離索引和用於指示運動方向的索引。合併候選標誌被發送以指定前兩個合併候選中的哪一個要用作起始MV。The MMVD flag may be sent after the skip flag and merge flag are sent to specify whether MMVD mode is used for the CU. If MMVD mode is used, the selected merge candidates will be refined by MVD information. MVD information also includes merge candidate flags, a distance index that specifies the magnitude of motion, and an index that indicates the direction of motion. The merge candidate flag is sent to specify which of the first two merge candidates is to be used as the starting MV.

距離索引被用來藉由指示距起始MV的預定偏移量來指定運動幅度資訊。偏移量可以添加到起始MV的水平分量或垂直分量。從距離索引到預定偏移量的示例映射在以下表Ⅲ-1中指定: Ⅲ-1 . 距離索引 距離索引 0 1 2 3 4 5 6 7 偏移量 ( 以亮度樣本為單位 ) 1/4 1/2 1 2 4 8 16 32   The distance index is used to specify motion amplitude information by indicating a predetermined offset from the starting MV. The offset can be added to the horizontal or vertical component of the starting MV. An example mapping from distance index to predetermined offset is specified in the following Table III-1: Table III-1 . Distance Index distance index 0 1 2 3 4 5 6 7 Offset ( in luma samples ) 1/4 1/2 1 2 4 8 16 32  

方向索引表示MVD相對於起點的方向。方向索引可以表示如表Ⅲ-2所示的四個方向之一。 Ⅲ-2. 方向索引指定的 MV 偏移量符號 距離索引 00 01 10 11 x- + N/A N/A y- N/A N/A +   The direction index represents the direction of the MVD relative to the starting point. The direction index can represent one of the four directions shown in Table III-2. Table III-2. MV offset symbols specified by direction index distance index 00 01 10 11 x- axis + N/A N/A y- axis N/A N/A +  

需要注意的是,MVD標誌的含義可能會根據起始MV的資訊而有所不同。當起始MV是un-predictionMV或雙向預測(bi-prediction)MV,兩個列表都指向當前圖片的同一側(即兩個參考圖片的圖片順序計數或POC都大於當前圖片的POC,或者都小於當前圖片的POC),表Ⅲ-2中的符號指定添加到起始MV的MV偏移量的符號。當起始MV為雙向預測MV時,兩個MV指向當前圖片的不同側(即一個參考的POC大於當前圖片的POC,另一個參考的POC小於當前圖片的POC),表Ⅲ-2中的每個符號指定添加到起始MV的列表0 MV分量的MV偏移量的符號,列表1 MV的符號具有相反的值。在一些實施例中,MMVD候選的預定偏移量(MmvdOffset)源自或表示為距離值(MmvdDistance)和方向符號(MmvdSign或MmvdDirection)。It should be noted that the meaning of the MVD mark may differ depending on the information of the starting MV. When the starting MV is an un-prediction MV or a bi-prediction MV, both lists point to the same side of the current picture (i.e., the picture order count or POC of the two reference pictures are both greater than the POC of the current picture, or both are less than POC of the current picture), the symbols in Table III-2 specify the symbols of the MV offset added to the starting MV. When the starting MV is a bidirectional prediction MV, the two MVs point to different sides of the current picture (that is, the POC of one reference is greater than the POC of the current picture, and the POC of the other reference is smaller than the POC of the current picture). Each of the MVs in Table III-2 symbols specifies the sign of the MV offset added to the list 0 MV component of the starting MV, the sign of the list 1 MV has the opposite value. In some embodiments, the predetermined offset of the MMVD candidate (MmvdOffset) is derived or represented as a distance value (MmvdDistance) and a direction sign (MmvdSign or MmvdDirection).

第5圖概念性地示出MMVD候選及其相應的偏移量。該圖示出作為起始MV的合併候選510以及垂直方向和水平方向上的若干MMVD候選。每個MMVD候選藉由將偏移量應用於起始MV 510來導出。例如,MMVD候選522藉由將偏移量2添加到合併候選510的水平分量來導出,而MMVD候選524藉由將偏移量-1添加到合併候選510的垂直分量來導出。在水平方向上具有偏移的MMVD候選,例如MMVD候選522,被稱為水平MMVD候選。在垂直方向上具有偏移的MMVD候選,例如MMVD候選524,被稱為垂直MMVD候選。Figure 5 conceptually illustrates MMVD candidates and their corresponding offsets. The figure shows the merge candidate 510 as the starting MV and several MMVD candidates in the vertical and horizontal directions. Each MMVD candidate is derived by applying an offset to the starting MV 510. For example, MMVD candidate 522 is derived by adding an offset of 2 to the horizontal component of merge candidate 510 , while MMVD candidate 524 is derived by adding an offset of -1 to the vertical component of merge candidate 510 . MMVD candidates that have an offset in the horizontal direction, such as MMVD candidate 522, are called horizontal MMVD candidates. MMVD candidates with an offset in the vertical direction, such as MMVD candidate 524, are called vertical MMVD candidates.

在一些實施例中,候選模式減少/重新排序方案用於重新排序MMVD候選以改進特定語法元素。下面是VVC標準中MMVD的語法表。                            if( mmvd_merge_flag[ x0 ][ y0 ]  = =  1 ) {                                  if( MaxNumMergeCand > 1 )                                         mmvd_cand_flag[ x0 ][ y0 ] ae(v)                                   mmvd_distance_idx[ x0 ][ y0 ] ae(v)                                   mmvd_direction_idx[ x0 ][ y0 ] ae(v) In some embodiments, a candidate pattern reduction/reordering scheme is used to reorder MMVD candidates to improve specific syntax elements. The following is the syntax table of MMVD in the VVC standard. if( mmvd_merge_flag[ x0 ][ y0 ] = = 1 ) { if(MaxNumMergeCand>1) mmvd_cand_flag [x0][y0] ae(v) mmvd_distance_idx [x0][y0] ae(v) mmvd_direction_idx [x0][y0] ae(v)

語法元素 mmvd_cand_flag[x0][y0]指定合併候選列表中的第一(0)或第二(1)候選是否被使用,該第一(0)或第二(1)候選具有從語法元素mmvd_distance_idx[ x0 ][ y0 ] 和 mmvd_direction_idx導出的運動向量差。陣列索引x0, y0指定所考慮的編解碼塊中左上角亮度樣本相對於圖片左上角亮度樣本的位置(x0, y0)。當 mmvd_cand_flag[x0][ y0]不存在時,它被推斷為等於0。 The syntax element mmvd_cand_flag [x0][y0] specifies whether the first (0) or the second (1) candidate in the merge candidate list with the syntax element mmvd_distance_idx[ x0 ][ y0 ] and mmvd_direction_idx derived motion vector difference. The array index x0, y0 specifies the position (x0, y0) of the upper left luma sample in the codec block considered relative to the upper left luma sample of the picture. When mmvd_cand_flag[x0][y0] does not exist, it is inferred to be equal to 0.

語法元素 mmvd_distance_idx[x0][y0] 指定用於導出變數 MmvdDistance[ x0 ][ y0 ]的索引,如下所述。陣列索引x0, y0指定所考慮的編解碼塊中相對於圖片左上角亮度樣本的左上角亮度樣本位置(x0, y0)。 mmvd_distance_idx[ x0 ][ y0 ] MmvdDistance[ x0 ][ y0 ] ph_mmvd_fullpel_only_flag = = 0 ph_mmvd_fullpel_only_flag = = 1 0 1 4 1 2 8 2 4 16 3 8 32 4 16 64 5 32 128 6 64 256 7 128 512 The syntax element mmvd_distance_idx [x0][y0] specifies the index used to derive the variable MmvdDistance[x0][y0], as described below. The array index x0, y0 specifies the position (x0, y0) of the top-left luma sample in the codec block considered relative to the top-left luma sample of the picture. mmvd_distance_idx[x0][y0] MmvdDistance[x0][y0] ph_mmvd_fullpel_only_flag = = 0 ph_mmvd_fullpel_only_flag = = 1 0 1 4 1 2 8 2 4 16 3 8 32 4 16 64 5 32 128 6 64 256 7 128 512

語法元素mmvd_direction_idx[x0][y0]指定用於導出變數 MmvdSign[x0][y0]的索引,如下所述。陣列索引x0, y0指定所考慮的編解碼塊中相對於圖片左上角亮度樣本的左上角亮度樣本位置(x0, y0)。 mmvd_direction_idx[ x0 ][ y0 ] MmvdSign[ x0 ][ y0 ][ 0 ] MmvdSign[ x0 ][ y0 ][ 1 ] 0 +1 0 1 −1 0 2 0 +1 3 0 −1 The syntax element mmvd_direction_idx[x0][y0] specifies the index used to derive the variable MmvdSign[x0][y0], as described below. The array index x0, y0 specifies the position (x0, y0) of the top-left luma sample in the codec block considered relative to the top-left luma sample of the picture. mmvd_direction_idx[x0][y0] MmvdSign[x0][y0][0] MmvdSign[ x0 ][ y0 ][ 1 ] 0 +1 0 1 −1 0 2 0 +1 3 0 −1

在一些實施例中,語法元素mmvd_cand_flag可以藉由使用減少的/重新排序的候選模式列表來改進。具體地,對每個MMVD模式計算邊界匹配成本,包括MMVD模式0,其中具有第一候選的MMVD在合併候選列表中;以及MMVD模式1,其中具有第二候選的MMVD在合併候選列表中。在一些實施例中,在根據成本重新排序之後,如果MMVD模式0的成本>MMVD模式1的成本,則mmvd_cand_flag等於0表示MMVD模式1以及mmvd_cand_flag等於1表示MMVD模式0。可選地,mmvd_cand_flag是隱式的,以及合併候選列表中的第一或第二候選(具有最小成本)被用於MMVD。In some embodiments, the syntax element mmvd_cand_flag may be improved by using a reduced/reordered candidate pattern list. Specifically, the boundary matching cost is calculated for each MMVD mode, including MMVD mode 0, in which the MMVD with the first candidate is in the merge candidate list; and MMVD mode 1, in which the MMVD with the second candidate is in the merge candidate list. In some embodiments, after reordering according to cost, if the cost of MMVD mode 0 > the cost of MMVD mode 1 , mmvd_cand_flag equal to 0 indicates MMVD mode 1 and mmvd_cand_flag equals 1 indicates MMVD mode 0. Optionally, mmvd_cand_flag is implicit, and the first or second candidate in the merge candidate list (with the smallest cost) is used for MMVD.

在一些實施例中,在根據邊界匹配成本重新排序之後,如果MMVD模式0的成本<MMVD模式1的成本,則mmvd_cand_flag等於0表示MMVD模式1以及mmvd_cand_flag等於1表示MMVD模式0。或者,mmvd_cand_flag是隱式的,合併候選列表中的第一或第二候選(具有最大成本)被用於MMVD。In some embodiments, after reordering according to boundary matching cost, if the cost of MMVD mode 0 < the cost of MMVD mode 1, mmvd_cand_flag equal to 0 indicates MMVD mode 1 and mmvd_cand_flag equals 1 indicates MMVD mode 0. Alternatively, mmvd_cand_flag is implicit and the first or second candidate in the merge candidate list (with the largest cost) is used for MMVD.

在一些實施例中,語法元素mmvd_cand_flag、mmvd_distance_idx和mmvd_direction_idx的發送可以藉由使用減少的/重新排序的候選模式列表來改進。聯合指示(表示為MMVD_joint_idx)被發送/解析/分配以指定 mmvd_cand_flag、mmvd_distance_idx和mmvd_direction_idx的選定組合。MMVD_joint_idx取值範圍為0到“MMVD候選數”(如2)*“MMVD距離數”(如8)*“MMVD方向數”(如4)計算出的值減一(如63)。In some embodiments, the sending of syntax elements mmvd_cand_flag, mmvd_distance_idx and mmvd_direction_idx may be improved by using a reduced/reordered list of candidate modes. A joint indication (denoted as MMVD_joint_idx) is sent/parsed/allocated to specify the selected combination of mmvd_cand_flag, mmvd_distance_idx and mmvd_direction_idx. The value range of MMVD_joint_idx is from 0 to the calculated value of "MMVD candidate number" (such as 2) * "MMVD distance number" (such as 8) * "MMVD direction number" (such as 4) minus one (such as 63).

在一些實施例中,對每個MMVD組合計算邊界匹配成本。在根據成本對不同的MMVD組合進行重新排序之後,MMVD_joint_idx可以用於基於重新排序來選擇MMVD組合。例如,在一些實施例中,如果MMVD組合0的成本>MMVD組合1的成本>...,則MMVD_joint_idx等於0表示MMVD組合63,MMVD_joint_idx等於63表示MMVD組合0。在一些實施例中,MMVD_joint_idx 是隱式的,具有最小成本的MMVD組合用於MMVD。在一些實施例中,MMVD組合的數量被減少以及具有較小成本的MMVD組合被保留在候選模式集中。用於發送/解析MMVD_joint_idx的碼字由此減少。In some embodiments, a boundary matching cost is calculated for each MMVD combination. After reordering different MMVD combinations based on cost, MMVD_joint_idx can be used to select an MMVD combination based on the reordering. For example, in some embodiments, if the cost of MMVD combination 0 > the cost of MMVD combination 1 >..., then MMVD_joint_idx equal to 0 indicates MMVD combination 63, and MMVD_joint_idx equal to 63 indicates MMVD combination 0. In some embodiments, MMVD_joint_idx is implicit and the MMVD combination with the minimum cost is used for MMVD. In some embodiments, the number of MMVD combinations is reduced and MMVD combinations with smaller costs are retained in the candidate mode set. The codewords used to send/parse MMVD_joint_idx are thus reduced.

在一些實施例中,在根據成本對不同的MMVD組合進行重新排序之後,MMVD_joint_idx可以用於基於重新排序來選擇MMVD組合。在一些實施例中,如果MMVD組合0的成本<MMVD組合1的成本<...,則MMVD_joint_idx等於0是指MMVD組合63,以及MMVD_joint_idx等於63是指MMVD組合0。在一些實施例中,MMVD_joint_idx是隱式的,成本最大的MMVD組合被用於MMVD。在一些實施例中,MMVD組合的數量被減少,以及具有較大成本的MMVD組合被保留在候選模式集中。用於發送/解析MMVD_joint_idx的碼字由此減少。類似的方法可以被用來改進mmvd_distance_idx 和/或 mmvd_direction_idx的發送。In some embodiments, after reordering different MMVD combinations based on cost, MMVD_joint_idx may be used to select an MMVD combination based on the reordering. In some embodiments, if the cost of MMVD combination 0 < the cost of MMVD combination 1 <..., then MMVD_joint_idx equal to 0 refers to MMVD combination 63, and MMVD_joint_idx equal to 63 refers to MMVD combination 0. In some embodiments, MMVD_joint_idx is implicit and the most costly MMVD combination is used for MMVD. In some embodiments, the number of MMVD combinations is reduced, and MMVD combinations with larger costs are retained in the candidate mode set. The codewords used to send/parse MMVD_joint_idx are thus reduced. Similar methods can be used to improve the sending of mmvd_distance_idx and/or mmvd_direction_idx.

Ⅳ. BCWⅣ.BCW 權重作為候選模式Weights as candidate patterns

具有CU級權重的雙向預測(Bi-prediction with CU-level Weight,簡稱BCW)是一種用於增強雙向預測的編解碼工具。BCW允許對L0預測和L1預測應用不同的權重,然後將它們組合起來生成CU的雙向預測。對於要由BCW編解碼的CU,一個加權參數w被發送用於L0和L1預測,以便根據以下公式基於w計算雙向預測結果Pbi-pred: Bi-prediction with CU-level Weight (BCW for short) is a coding and decoding tool used to enhance bi-directional prediction. BCW allows applying different weights to L0 predictions and L1 predictions, and then combining them to generate bidirectional predictions for CUs. For CUs to be encoded and decoded by BCW, a weighting parameter w is sent for L0 and L1 prediction so that the bidirectional prediction result Pbi-pred is calculated based on w according to the following formula:

P0表示由L0 MV(或L0預測)預測的像素值。P1表示由L1 MV(或L1預測)預測的像素值。P bi-pred是P0和P1根據w的加權平均值。對於低延遲圖片,即使用具有小圖片順序計數(picture order count,簡稱POC)的參考幀的圖片,w的可能值包括{-2、3、4、5、10},這些也被稱為BCW候選權重。對於非低延遲圖片,w(BCW 候選權重)的可能值包括{3, 4, 5}。在一些實施例中,為了找到用於對當前CU進行編解碼的最佳w,而不是為所有候選雙預測MV位置搜索w的所有可能值,LC-RDO階段可以採用交織搜索模式來搜索BCW加權參數w的最佳值。更多的權重可被支援,如下所示。例如,對於合併模式,權重從{-2, 3, 4, 5, 10}擴展到{-4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7 , 9, 10, 11, 12}或以上的任一子集。當負雙向預測權重不被支援時,合併模式的權重從{-2, 3, 4, 5, 10}擴展到{1, 2, 3, 4, 5, 6, 7}。此外,非合併模式的負雙向預測權重被替換為正權重,即將權重{-2, 10}替換為{1, 7}。 P0 represents the pixel value predicted by L0 MV (or L0 prediction). P1 represents the pixel value predicted by L1 MV (or L1 prediction). P bi-pred is the weighted average of P0 and P1 according to w. For low latency pictures, even pictures using reference frames with small picture order count (POC), possible values of w include {-2, 3, 4, 5, 10}, these are also called BCW Candidate weight. For non-low latency images, possible values for w (BCW candidate weight) include {3, 4, 5}. In some embodiments, in order to find the best w for encoding and decoding the current CU, instead of searching all possible values of w for all candidate bi-predictive MV positions, the LC-RDO stage can adopt an interleaved search mode to search for BCW weights The optimal value of parameter w. More weights may be supported, as shown below. For example, for merge mode, the weights extend from {-2, 3, 4, 5, 10} to {-4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 9 , 10, 11, 12} or any subset of above. When negative bidirectional prediction weights are not supported, the merge mode weights are extended from {-2, 3, 4, 5, 10} to {1, 2, 3, 4, 5, 6, 7}. In addition, the negative bidirectional prediction weights of the non-merging mode are replaced with positive weights, i.e., the weights {-2, 10} are replaced with {1, 7}.

在一些實施例中,所提出的候選模式減少/重新排序方案用於重新排序BCW候選以改進特定語法元素的發送,例如,bcw_idx。下面是VVC標準中BCW的語法表。          if( sps_bcw_enabled_flag  &&  inter_pred_idc[ x0 ][ y0 ]  = =  PRED_BI  &&                                   luma_weight_l0_flag[ ref_idx_l0 [ x0 ][ y0 ] ]  = =    0  &&                                   luma_weight_l1_flag[ ref_idx_l1 [ x0 ][ y0 ] ]  = =    0  &&                                   chroma_weight_l0_flag[ ref_idx_l0 [ x0 ][ y0 ] ]     = =  0  &&                                   chroma_weight_l1_flag[ ref_idx_l1 [ x0 ][ y0 ] ]     = =  0  &&          cbWidth * cbHeight  >=  256 )              bcw_idx[ x0 ][ y0 ] ae(v) In some embodiments, the proposed candidate pattern reduction/reordering scheme is used to reorder BCW candidates to improve the sending of specific syntax elements, eg, bcw_idx. The following is the syntax table of BCW in the VVC standard. if( sps_bcw_enabled_flag && inter_pred_idc[ x0 ][ y0 ] = = PRED_BI && luma_weight_l0_flag[ ref_idx_l0 [ x0 ][ y0 ] ] = = 0 && luma_weight_l1_flag[ ref_idx_l1 [ x0 ][ y0 ] ] = = 0 && chroma_weight_l0_ flag[ ref_idx_l0 [ x0 ][ y0 ] ] = = 0 && chroma_weight_l1_flag[ ref_idx_l1 [ x0 ][ y0 ] ] = = 0 && cbWidth * cbHeight >= 256 ) bcw_idx [x0][y0] ae(v)

語法元素 bcw_idx[x0][y0]指定具有CU權重的雙向預測的權重索引。 陣列索引x0, y0指定所考慮編解碼塊的左上角亮度樣本相對於圖片左上角亮度樣本的位置(x0, y0)。對於每個雙向預測的CU,權重w由以下兩種方式之一確定:1)對於非合併 CU,權重索引在運動向量差之後發送;2)對於合併CU,權重索引根據合併候選索引從相鄰塊中推斷出來。 語法結構 語法元素 二進位化 處理 輸入參數 bcw_idx[ ][ ] TR cMax = NoBackwardPredFlag ? 4: 2, cRiceParam = 0 The syntax element bcw_idx [x0][y0] specifies the weight index of bidirectional prediction with CU weights. The array index x0, y0 specifies the position (x0, y0) of the upper left luma sample of the codec block considered relative to the upper left luma sample of the picture. For each bi-predicted CU, the weight w is determined in one of the following two ways: 1) for non-merged CUs, the weight index is sent after the motion vector difference; 2) for merged CUs, the weight index is sent from the adjacent CU according to the merge candidate index inferred from the block. grammatical structure syntax elements binarization handle input parameters bcw_idx[ ][ ] TR cMax = NoBackwardPredFlag ? 4: 2, cRiceParam = 0

為了減少和重新排序BCW候選,每個BCW候選權重的邊界匹配成本被計算,以及不同的BCW候選權重根據成本進行重新排序。在一個實施例中,預定候選的成本可以被降低。例如,預定候選是指從一個或多個相鄰塊推斷出的候選。在另一實施例中,候選權重(僅)包括兩個相鄰的雙向預測權重(即±1)和繼承(推斷)的雙向預測權重。在一些實施例中,bcw_idx等於0表示具有最小成本的BCW候選權重,bcw_idx等於4表示具有最大成本的BCW候選權重。在一些實施例中,bcw_idx是隱式的,以及具有最小成本的BCW候選權重被使用。在一些實施例中,bcw_idx等於0表示具有最大成本的BCW候選權重,bcw_idx等於4表示具有最小成本的BCW候選權重。在一些實施例中,bcw_idx是隱式的,以及具有最大成本的BCW候選權重被使用。To reduce and reorder BCW candidates, the boundary matching cost of each BCW candidate weight is calculated, and different BCW candidate weights are reordered according to the cost. In one embodiment, the cost of predetermining candidates may be reduced. For example, a predetermined candidate refers to a candidate inferred from one or more neighboring blocks. In another embodiment, the candidate weights include (only) two adjacent bidirectional prediction weights (i.e. ±1) and the inherited (inferred) bidirectional prediction weight. In some embodiments, bcw_idx equal to 0 represents the BCW candidate weight with the minimum cost, and bcw_idx equal to 4 represents the BCW candidate weight with the maximum cost. In some embodiments, bcw_idx is implicit and the BCW candidate weight with minimum cost is used. In some embodiments, bcw_idx equal to 0 represents the BCW candidate weight with maximum cost, and bcw_idx equal to 4 represents the BCW candidate weight with minimum cost. In some embodiments, bcw_idx is implicit and the BCW candidate weight with the largest cost is used.

在一些實施例中,只有前k個BCW權重(因為成本而具有更高的優先順序)可以作為候選模式集中的候選權重(BCW權重的原始數量為5)。在一些實施例中,候選模式集中BCW權重的數量為k(例如3),每個BCW權重的發送如下所示:bcw_idx 0是指使用碼字0的具有最高優先順序的BCW候選;bcw_idx 1 是指使用碼字10具有第二高優先順序的BCW候選;bcw_idx 2是指使用碼字11的具有第三高優先順序的BCW候選。In some embodiments, only the top k BCW weights (with higher priority due to cost) can be used as candidate weights in the candidate pattern set (the original number of BCW weights is 5). In some embodiments, the number of BCW weights in the candidate pattern set is k (e.g., 3), and each BCW weight is sent as follows: bcw_idx 0 refers to the BCW candidate with the highest priority using codeword 0; bcw_idx 1 is refers to the BCW candidate with the second highest priority using codeword 10; bcw_idx 2 refers to the BCW candidate with the third highest priority using codeword 11.

在一些子實施例中,是否使用減少和重新排序的BCW候選(基於邊界匹配成本重新排序以及限於k個候選)或原始BCW候選(沒有重新排序)是基於預定規則(例如隱式地取決於塊寬度、塊高度或塊區域,或顯式地取決於 CU/CB、PU/PB、TU/TB、CTU/CTB、圖塊、片段級別、圖片級別、SPS級別和/或PPS級別的一個或多個標誌。)當減少和重新排序的合併候選列表被使用時,用於發送的熵編解碼上下文可能不同於使用原始合併候選列表。In some sub-embodiments, whether to use reduced and reordered BCW candidates (reordered based on boundary matching cost and limited to k candidates) or original BCW candidates (without reordering) is based on predetermined rules (e.g. implicitly depends on the block Width, block height, or block area, or one or more explicitly dependent on CU/CB, PU/PB, TU/TB, CTU/CTB, tile, fragment level, picture level, SPS level, and/or PPS level flag.) When a reduced and reordered merge candidate list is used, the entropy encoding and decoding context used for transmission may be different than when the original merge candidate list was used.

在一些實施例中,BCW權重被分成幾組。接下來,每個組的邊界匹配成本被計算。然後,一個有希望的組被隱式地選擇作為具有最高優先順序的組。如果一個以上的BCW權重被包括在有希望的組中,則減少的BCW權重索引被發送/解析以指示來自有希望的組的BCW權重。由於每組中BCW權重的數量小於原始BCW權重集合中BCW權重的數量,因此減少後的BCW權重索引可能比原始BCW權重索引佔用更少的碼字。In some embodiments, BCW weights are divided into groups. Next, the boundary matching cost for each group is calculated. Then, a promising group is implicitly selected as the group with the highest priority. If more than one BCW weight is included in the hopeful group, a reduced BCW weight index is sent/parsed to indicate the BCW weight from the hopeful group. Since the number of BCW weights in each group is smaller than the number of BCW weights in the original BCW weight set, the reduced BCW weight index may occupy fewer codewords than the original BCW weight index.

在一些實施例中,如果k組被使用以及原始BCW權重集中的BCW權重的數量為N,則每組中的BCW權重的數量為“N/k”,以及分組規則取決於BCW權重索引和/或BCW權重值。例如,“BCW權重索引%k”值相同的BCW權重屬於同一組。又如,“BCW權重索引/k”值相同的BCW權重屬於同一組。又例如,具有相似值的BCW權重在同一組中(例如,具有負值的BCW權重在一組和/或具有正值的BCW權重在另一組中)。在一些實施例中,k(組中候選的數量)隨塊寬度、塊高度和/或塊面積而變化。In some embodiments, if k groups are used and the number of BCW weights in the original BCW weight set is N, then the number of BCW weights in each group is "N/k" and the grouping rules depend on the BCW weight index and/ Or BCW weight value. For example, BCW weights with the same "BCW weight index %k" value belong to the same group. For another example, BCW weights with the same "BCW weight index/k" value belong to the same group. As another example, BCW weights with similar values are in the same group (e.g., BCW weights with negative values are in one group and/or BCW weights with positive values are in another group). In some embodiments, k (the number of candidates in the group) varies with block width, block height, and/or block area.

在一些實施例中,當一組包含多於一個BCW權重時,該組的成本是來自該組中所有BCW權重的成本的平均成本。在一些實施例中,當一個組包含一個以上的BCW權重時,該組的成本是來自該組中所有BCW權重的成本的平均、最大或最小成本。在一些實施例中,BCW權重被劃分成幾個子集,以及子集的選擇被顯式地發送給解碼器。並且子集的選擇藉由使用邊界匹配成本來進行。In some embodiments, when a group contains more than one BCW weight, the cost of the group is the average cost from the costs of all BCW weights in the group. In some embodiments, when a group contains more than one BCW weight, the cost of the group is the average, maximum, or minimum cost from the costs of all BCW weights in the group. In some embodiments, the BCW weights are divided into several subsets, and the selection of subsets is explicitly sent to the decoder. And subset selection is performed by using boundary matching costs.

在一些實施例中,BCW權重被劃分成多個子集。在一些實施例中,具有相似值的BCW權重被劃分成不同的子集,使得同一子集的BCW權重彼此具有較大的差值。例如,在一些實施例中,具有負值的權重可以被劃分到不同的組中。又例如,在一些實施例中,權重差大於預定閾值的權重被劃分到同一組中。預定閾值可以是固定的或顯式地決定。這可能有助於提高邊界匹配的命中率。In some embodiments, the BCW weights are divided into multiple subsets. In some embodiments, BCW weights with similar values are divided into different subsets, such that BCW weights of the same subset have larger differences from each other. For example, in some embodiments, weights with negative values may be divided into different groups. For another example, in some embodiments, weights whose weight differences are greater than a predetermined threshold are classified into the same group. The predetermined threshold may be fixed or explicitly determined. This may help improve hit rate on boundary matches.

、線性模型作為候選模式, linear model as candidate model

交叉分量線性模型(Cross Component Linear Model,簡稱CCLM)或線性模型(Linear Model,簡稱LM)模式是一種交叉分量預測模式,其中塊的色度分量藉由線性模型從同位的重構亮度樣本中預測。線性模型的參數(例如,比例和偏移)源自與塊相鄰的已經重構的亮度和色度樣本。例如,在VVC中,CCLM 模式利用通道間依賴性從重構的亮度樣本中預測色度樣本。該預測是使用以下形式的線性模型進行的: Cross Component Linear Model (CCLM) or Linear Model (LM) mode is a cross component prediction mode in which the chrominance component of a block is predicted from the co-located reconstructed luminance samples by a linear model . The parameters of the linear model (e.g., scale and offset) are derived from the reconstructed luma and chroma samples adjacent to the block. For example, in VVC, the CCLM mode exploits inter-channel dependence to predict chroma samples from reconstructed luma samples. The prediction is made using a linear model of the form:

表示一個CU中的預測色度樣本(或當前CU的預測色度樣本),以及 表示同一CU的下採樣重構亮度樣本(或當前CU的相應重構亮度樣本)。 represents the predicted chroma samples in a CU (or the predicted chroma samples of the current CU), and Represents a downsampled reconstructed luminance sample of the same CU (or the corresponding reconstructed luminance sample of the current CU).

CCLM模型參數 (縮放參數)和 (偏移參數)基於最多四個相鄰色度樣本及其對應的下採樣亮度樣本導出。在LM_A模式(也表示為LM-T模式或 INTRA_T_CCLM)中,僅上方(又稱頂部)相鄰範本被用來計算線性模型係數。在LM_L模式(也表示為LM-L模式或INTRA_L_CCLM)中,僅左側範本被用來計算線性模型係數。在LM-LA模式(也表示為LM-LT模式或INTRA_LT_CCLM)中,左側和上方範本均用於計算線性模型係數。所提出的方法可以應用於任一交叉分量模式,而不限於應用於LM模式。例如,交叉分量模式使用第一顏色分量(例如Y)的資訊來預測第二/第三顏色分量(例如Cb/Cr)。 CCLM model parameters (scaling parameter) and (offset parameter) is derived based on up to four adjacent chroma samples and their corresponding downsampled luma samples. In LM_A mode (also denoted LM-T mode or INTRA_T_CCLM), only the upper (also called top) neighbor template is used to calculate the linear model coefficients. In LM_L mode (also denoted LM-L mode or INTRA_L_CCLM), only the left template is used to calculate the linear model coefficients. In LM-LA mode (also denoted LM-LT mode or INTRA_LT_CCLM), both the left and upper templates are used to calculate linear model coefficients. The proposed method can be applied to any cross-component mode and is not limited to the LM mode. For example, the cross-component mode uses the information of the first color component (such as Y) to predict the second/third color component (such as Cb/Cr).

在一些實施例中,所提出的候選模式減少/重新排序方案用於重新排序LM候選以改進特定語法的信令,例如cclm_mode_idx。下面是VVC標準中LM的語法表。                                         if( cclm_mode_flag )                                                cclm_mode_idx ae(v) In some embodiments, the proposed candidate mode reduction/reordering scheme is used to reorder LM candidates to improve signaling of specific syntaxes, such as cclm_mode_idx. The following is the syntax table of LM in the VVC standard. if(cclm_mode_flag) cclm_mode_idx ae(v)

語法元素 cclm_mode_idx指定應用LM候選模式(例如,INTRA_LT_CCLM、INTRA_L_CCLM 和 INTRA_T_CCLM)中的哪一個。例如,對不同的LM候選模式計算邊界匹配成本。在根據邊界匹配成本對不同的LM候選模式進行重新排序之後,cclm_mode_idx可以用於基於重新排序來選擇候選LM候選模式。在一些實施例中,cclm_mode_idx等於0是指具有最小成本的LM候選模式,而cclm_mode_idx等於2是指具有最大成本的LM候選模式。在一些實施例中,cclm_mode_idx是隱式的以及具有最小成本的LM候選模式被使用。 The syntax element cclm_mode_idx specifies which of the LM candidate modes (for example, INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM) is applied. For example, boundary matching costs are calculated for different LM candidate patterns. After re-ranking different LM candidate modes based on boundary matching costs, cclm_mode_idx can be used to select candidate LM candidate modes based on the re-ranking. In some embodiments, cclm_mode_idx equal to 0 refers to the LM candidate mode with the minimum cost, and cclm_mode_idx equal to 2 refers to the LM candidate mode with the maximum cost. In some embodiments, cclm_mode_idx is implicit and the LM candidate mode with the smallest cost is used.

在一些實施例中,只有前k個LM候選模式(由於成本而具有更高的優先順序)可以是候選LM模式(LM候選模式的原始數量為3)。在一些實施例中,k=2以及LM候選模式的發送如下:cclm_mode_idx 0指使用碼字0具有最小成本的候選LM模式;cclm_mode_idx 1 指使用碼字1具有第二小成本的候選LM模式。In some embodiments, only the top k LM candidate modes (with higher priority due to cost) may be candidate LM modes (the original number of LM candidate modes is 3). In some embodiments, k=2 and LM candidate modes are sent as follows: cclm_mode_idx 0 refers to the candidate LM mode with the smallest cost using codeword 0; cclm_mode_idx 1 refers to the candidate LM mode with the second smallest cost using codeword 1.

在一些實施例中,根據成本重新排序後,當k=2時,cclm_mode_idx等於0表示成本最大的LM候選模式,cclm_mode_idx等於1表示成本最小的LM候選模式。在一些實施例中,cclm_mode_idx是隱式的以及具有最大成本的LM候選模式被使用。在這些實施例的一些中,cclm_mode_idx 0指使用碼字0的具有最大成本的候選LM模式;cclm_mode_idx 1指使用碼字1具有第二大成本的候選LM模式。In some embodiments, after reordering according to cost, when k=2, cclm_mode_idx equal to 0 indicates the LM candidate mode with the largest cost, and cclm_mode_idx equals 1 indicates the LM candidate mode with the smallest cost. In some embodiments, cclm_mode_idx is implicit and the LM candidate mode with the largest cost is used. In some of these embodiments, cclm_mode_idx 0 refers to the candidate LM mode with the largest cost using codeword 0; cclm_mode_idx 1 refers to the candidate LM mode with the second largest cost using codeword 1.

除了將減少/重新排序的候選模式列表應用於傳統的CCLM模式(其中從亮度分量預測色度分量(Cr或Cb))之外,減少/重新排序的候選模式列表還可以在CCLM的其他變體中使用。這裡CCLM的變體意味著當塊指示(block indication)指的是使用當前塊的交叉分量模式之一(例如CCLM_LT、MMLM_LT、CCLM_L、CCLM_T、MMLM_L、MMLM_T和/或幀內預測模式,不是傳統DC、平面和角度模式之一)時,一些可選模式可被選擇。In addition to applying the reduced/reordered candidate mode list to the traditional CCLM mode where the chrominance component (Cr or Cb) is predicted from the luma component, the reduced/reordered candidate mode list can also be used in other variants of CCLM. used in. The CCLM variant here means that when the block indication refers to using one of the cross-component modes of the current block (e.g. CCLM_LT, MMLM_LT, CCLM_L, CCLM_T, MMLM_L, MMLM_T and/or intra prediction mode, not the traditional DC , planar and angular modes), some optional modes can be selected.

以下是將卷積交叉分量模式(convolutional cross-component mode,簡稱CCCM)作為可選模式的示例。當此可選模式應用於當前塊時,使用模型(包括非線性項)的交叉分量資訊被用來生成色度預測。可選模式可以遵循CCLM的範本選擇,因此CCCM系列包括CCCM_LT CCCM_L和/或CCCM_T。The following is an example of using convolutional cross-component mode (CCCM) as an optional mode. When this optional mode is applied to the current block, cross-component information using the model (including nonlinear terms) is used to generate chroma predictions. Optional modes may follow CCLM's template selection, so the CCCM family includes CCCM_LT CCCM_L and/or CCCM_T.

在一些實施例中,預定候選的成本可以被減少。預定候選可以指代從一個或多個相鄰塊和/或諸如CCLM_LT、MMLM_LT、CCCM_LT的流行或普通模式推斷的候選。在一些實施例中,候選模式(僅)包括相關流行模式和流行模式。在一個示例中,相關的流行模式是CCCM_L和/或CCCM_T,以及流行模式是CCCM_LT。例如,相關的流行模式是CCLM_L和/或CCLM_T,以及流行模式是 CCLM_LT。在另一示例中,相關的流行模式是MMLM_L和/或MMLM_T,以及流行模式是MMLM_LT。在另一個示例中,流行模式指示所使用的參考是來自L、T還是LT。如果使用的參考來自LT,則相關的流行模式是LT的所有變體或變體的子集,例如CCLM_LT、MMLM_LT和CCCM_LT。In some embodiments, the cost of predetermining candidates may be reduced. The predetermined candidates may refer to candidates inferred from one or more neighboring blocks and/or popular or common modes such as CCLM_LT, MMLM_LT, CCCM_LT. In some embodiments, candidate patterns include (only) relevant popular patterns and popular patterns. In one example, the relevant popular modes are CCCM_L and/or CCCM_T, and the popular mode is CCCM_LT. For example, the relevant popular modes are CCLM_L and/or CCLM_T, and the popular mode is CCLM_LT. In another example, the relevant popular modes are MMLM_L and/or MMLM_T, and the popular mode is MMLM_LT. In another example, the popular pattern indicates whether the reference used is from L, T, or LT. If the reference used is from LT, the relevant popular modes are all variants or a subset of variants of LT, such as CCLM_LT, MMLM_LT and CCCM_LT.

在一些實施例中,候選模式對應於線性模型,該線性模型藉由使用Cb和Cr的相鄰重構樣本作為輸入X和Y來導出(即,使用重構的Cb樣本來導出或預測Cr樣本,反之亦然)。在一些實施例中,候選模式對應於從多個同位亮度塊導出的線性模型,用於預測或導出色度分量。在一些實施例中,減小/重新排序的候選列表中的候選模式可以對應於多模型線性模型(multi-model linear model,簡稱MMLM)模式,使得不同的線性模型可以從多個線性模型中選擇來預測不同區域或不同像素組的色度分量。與CCLM類似,MMLM可以具有MMLM_LT、MMLM_L和/或MMLM_T。In some embodiments, the candidate pattern corresponds to a linear model derived by using adjacent reconstructed samples of Cb and Cr as inputs X and Y (i.e., using reconstructed Cb samples to derive or predict Cr samples ,vice versa). In some embodiments, the candidate pattern corresponds to a linear model derived from multiple co-located luma blocks for predicting or deriving chrominance components. In some embodiments, the candidate modes in the reduced/reordered candidate list may correspond to a multi-model linear model (MMLM) mode, so that different linear models can be selected from multiple linear models. To predict the chroma components of different regions or different pixel groups. Similar to CCLM, MMLM can have MMLM_LT, MMLM_L and/or MMLM_T.

減少/重新排序的候選模式列表中的LM候選模式還可以包括任一LM擴展/變體,使得列表中的候選模式的數量也可以增加。隨著LM候選模式數量的增加,使用基於邊界匹配成本的減少/重新排序的候選模式列表的編碼性能改進變得更加顯著。The LM candidate patterns in the reduced/reordered candidate pattern list may also include any LM extension/variant, so that the number of candidate patterns in the list may also be increased. As the number of LM candidate patterns increases, the encoding performance improvement using boundary matching cost-based reduction/reordering of the candidate pattern list becomes more significant.

Ⅵ. MHPⅥ. MHP 作為候選模式as a candidate model

對於應用了多假設預測(multi-hypothesis prediction,簡稱MHP)的塊,一個或多個預測假設(預測訊號)與現有的預測假設相結合,以形成當前塊的最終(結果)預測。MHP可以應用於許多幀間模式,例如合併、子塊合併、幀間AMVP和/或仿射。最終預測可以用預測訊號的每個額外假設反覆運算地累加。累加示例如下所示: For blocks to which multi-hypothesis prediction (MHP) is applied, one or more prediction hypotheses (prediction signals) are combined with existing prediction hypotheses to form the final (resultant) prediction of the current block. MHP can be applied to many inter-modes such as merging, sub-block merging, inter-AMVP and/or affine. The final prediction can be iteratively accumulated with each additional hypothesis of the prediction signal. An accumulation example looks like this:

得到的預測訊號作為最後一個 (即, 具有最大的索引 )。P 0是當前塊的第一(現有)預測。例如,如果MHP應用於合併候選,則p 0由現有合併索引指示。額外預測表示為h,以及將藉由權重α與先前累積的預測進一步組合。因此,對於預測的每個額外假設,加權索引被發送/解析以指示加權,和/或對於預測的每個假設,幀間索引被發送/解析以指示運動候選(用於為此生成預測樣本 假設)。 The predicted signal is obtained as the last (Right now, has the largest index ). P 0 is the first (existing) prediction for the current block. For example, if MHP is applied to a merge candidate, p 0 is indicated by the existing merge index. The additional predictions are denoted h and will be further combined with the previously accumulated predictions by weight α. Therefore, for each additional hypothesis of prediction, a weighting index is sent/parsed to indicate weighting, and/or for each hypothesis of prediction, an inter-frame index is sent/parsed to indicate motion candidates (used to generate prediction sample hypotheses for this ).

需要提出的重新排序方案,以使MHP權重的發送和/或運動候選的發送更有效。在一些實施例中,對每個額外預測假設計算每個MHP候選權重的邊界匹配成本。例如,假定預測假設有兩個候選權重: 步驟0:對於預測的額外假設,cost_w0和cost_w1分別計算為第一和第二候選權重的成本; 步驟1:對於該預測假設,候選權重根據成本進行重新排序。 The proposed reordering scheme is needed to make the sending of MHP weights and/or the sending of motion candidates more efficient. In some embodiments, a boundary matching cost for each MHP candidate weight is calculated for each additional prediction hypothesis. For example, assume that the prediction hypothesis has two candidate weights: Step 0: For the additional assumptions of prediction, cost_w0 and cost_w1 are calculated as the costs of the first and second candidate weights respectively; Step 1: For this prediction hypothesis, candidate weights are reranked based on cost.

在一些子實施例中,具有較小成本的候選權重獲得較高的優先順序。如果cost_w0 > cost_w1,權重索引0指代w1,權重索引1指代w0。否則,重新排序不被使用,權重索引0和1指的是原始的w0和w1。在一些實施例中,具有較大成本的候選權重獲得較高的優先順序。如果cost_w0 < cost_w1,權重索引0指代w1,權重索引1指代w0。否則,重新排序不被使用,權重索引0和1指的是原始的w0和w1。In some sub-embodiments, candidate weights with smaller costs receive higher priority. If cost_w0 > cost_w1, weight index 0 refers to w1, and weight index 1 refers to w0. Otherwise, reordering is not used and weight indices 0 and 1 refer to the original w0 and w1. In some embodiments, candidate weights with larger costs receive higher priority. If cost_w0 < cost_w1, weight index 0 refers to w1, and weight index 1 refers to w0. Otherwise, reordering is not used and weight indices 0 and 1 refer to the original w0 and w1.

在一些實施例中,具有最小成本的候選權重用於當前額外預測假設。 在這種情況下推斷當前額外預測假設的權重索引。在一些實施例中,每個假設或假設的任一子集的權重根據成本隱式設置。一種可能的方式是,權重是成本的縮放值或成本的縮放值的倒數。(例如,如果成本=2,則成本的倒數=1/2。)在一些子實施例中,具有最大成本的候選權重被用於當前額外預測假設。在這種情況下推斷當前額外預測假設的權重索引。In some embodiments, the candidate weight with the smallest cost is used for the current additional prediction hypothesis. In this case the weight index of the current additional forecast hypothesis is inferred. In some embodiments, the weight of each hypothesis or any subset of hypotheses is implicitly set based on cost. One possibility is that the weight is a scaled value of the cost or the reciprocal of a scaled value of the cost. (For example, if cost = 2, then the inverse of cost = 1/2.) In some sub-embodiments, the candidate weight with the largest cost is used for the current additional prediction hypothesis. In this case the weight index of the current additional forecast hypothesis is inferred.

可以對每個額外的預測假設重複步驟0和1,以及得到每個額外的預測假設的每個權重索引的含義。在一些實施例中,假定預測假設有t個候選權重(t可以是任一正整數。在以下示例中取t = 5。) 步驟0:對於預測的額外假設,分別計算每個候選權重的成本。 步驟 1:對於該預測假設,候選權重根據成本重新排序。 Steps 0 and 1 can be repeated for each additional forecast hypothesis and the meaning of each weight index obtained for each additional forecast hypothesis. In some embodiments, it is assumed that the prediction hypothesis has t candidate weights (t can be any positive integer. Take t = 5 in the following examples.) Step 0: For additional assumptions for prediction, calculate the cost of each candidate weight separately. Step 1: For this prediction hypothesis, candidate weights are reranked based on cost.

例如,具有較小成本的候選權重獲得較高的優先順序。又例如,具有較大成本的候選權重獲得較高的優先順序。只有前k個候選權重(優先順序高的)才能作為候選權重。候選模式集僅包括前k個候選權重。在一些實施例中,候選模式集合中的候選權重的數量為k(例如,2)以及每個候選權重的發送如下:weight_idx 0指具有最高優先順序且碼字0的候選;weight_idx 1指代具有第二高優先順序且碼字1的候選。可以對每個額外的預測假設重複步驟0和1,以及對每個額外的預測假設獲得每個權重索引的含義。For example, candidate weights with smaller costs receive higher priority. As another example, candidate weights with larger costs receive higher priority. Only the top k candidate weights (those with high priority) can be used as candidate weights. The set of candidate patterns includes only the top k candidate weights. In some embodiments, the number of candidate weights in the candidate mode set is k (eg, 2) and each candidate weight is sent as follows: weight_idx 0 refers to the candidate with the highest priority and codeword 0; weight_idx 1 refers to the candidate with The candidate with the second highest priority and codeword 1. Steps 0 and 1 can be repeated for each additional forecast hypothesis and the meaning of each weight index obtained for each additional forecast hypothesis.

在一些實施例中,MHP權重被分成幾組。接下來,每個組的邊界匹配成本被計算。然後,有希望的組被隱式地確定為具有最高優先順序的組。如果一個以上的MHP權重被包括在有希望的組中,則減少的MHP權重索引被發送/解析以指示來自有希望的組的MHP權重。由於每組中的MHP權重數小於原始MHP權重集中的MHP權重數,因此減少的MHP權重索引應比原始MHP權重索引佔用更少的碼字。In some embodiments, MHP weights are divided into groups. Next, the boundary matching cost for each group is calculated. The promising group is then implicitly determined as the group with the highest priority. If more than one MHP weight is included in the promising group, a reduced MHP weight index is sent/parsed to indicate the MHP weight from the promising group. Since the number of MHP weights in each group is smaller than the number of MHP weights in the original MHP weight set, the reduced MHP weight index should occupy fewer codewords than the original MHP weight index.

在一些實施例中,如果k組被使用以及原始MHP權重集中的MHP權重數為N,則每組中的MHP權重數為“N/k”以及分組規則取決於MHP權重索引和/或MHP權重值。例如,具有相同的“MHP權重索引%k”值的MHP權重屬於同一組。又如,具有相同的“MHP權重索引/k”的MHP權重屬於同一組。又例如,具有相似值的MHP權重在同一組中(例如,具有負值的MHP權重在一組和/或具有正值的MHP權重在另一組中)又例如,k隨塊寬度、塊高度和/或塊面積而變化。在一些實施例中,當一個組包含一個以上的合併候選時,該組的成本是來自該組中所有合併候選的成本的平均成本。在一些實施例中,當組包含一個以上的合併候選,該組的成本是該組中所有合併候選的成本的平均、最大或最小成本。In some embodiments, if k groups are used and the number of MHP weights in the original MHP weight set is N, then the number of MHP weights in each group is "N/k" and the grouping rules depend on the MHP weight index and/or MHP weight value. For example, MHP weights with the same "MHP weight index %k" value belong to the same group. For another example, MHP weights with the same "MHP weight index/k" belong to the same group. As another example, MHP weights with similar values are in the same group (e.g., MHP weights with negative values are in one group and/or MHP weights with positive values are in another group). Another example, k varies with block width, block height and/or block area varies. In some embodiments, when a group contains more than one merge candidate, the cost of the group is the average cost from the costs of all merge candidates in the group. In some embodiments, when a group contains more than one merge candidate, the cost of the group is the average, maximum, or minimum cost of the costs of all merge candidates in the group.

在一些實施例中,MHP權重被劃分成幾個子集,以及子集選擇被顯式地用發送給解碼器。以及子集中的選擇藉由使用邊界匹配成本來進行。在一些實施例中,彼此具有較大不同值的權重將被劃分在同一子集中。也就是說,具有相似值的權重將被劃分到不同的子集中。這可能有助於提高邊界匹配的命中率。例如,具有負值的權重被劃分到不同的組中。又例如,那些權重差大於預定閾值的權重被劃分到同一組中。預定閾值可以是固定的或被顯式地決定。In some embodiments, the MHP weights are divided into several subsets, and the subset selection is explicitly sent to the decoder. and selection within subsets is performed using boundary matching costs. In some embodiments, weights with larger different values from each other will be grouped into the same subset. That is, weights with similar values will be divided into different subsets. This may help improve hit rate on boundary matches. For example, weights with negative values are divided into different groups. For another example, those weights whose weight differences are greater than a predetermined threshold are classified into the same group. The predetermined threshold may be fixed or explicitly determined.

在一些實施例中,對於每個假設,候選權重的當前預測(用於計算邊界匹配成本)是組合預測(來自運動候選的預測和先前累積的預測的加權平均值)。(運動候選由發送/解析的運動索引指示。)一個示例在下圖顯示。當應用建議的方法對h2的候選權重的發送重新排序時,h2有4個候選權重(包括候選0到 3)。候選n的成本由先前累積預測和h2預測的加權平均進行計算(權重來自候選n)。In some embodiments, for each hypothesis, the current prediction of the candidate weights (used to calculate the boundary matching cost) is the combined prediction (the weighted average of the predictions from the motion candidate and the previously accumulated predictions). (Motion candidates are indicated by the sent/resolved motion index.) An example is shown in the image below. When applying the proposed method to reorder the sending of candidate weights for h2, h2 has 4 candidate weights (including candidates 0 to 3). The cost of candidate n is calculated as the weighted average of the previous cumulative predictions and h2 predictions (the weights come from candidate n).

當對h1的候選權重的發送應用重新排序時,有4個候選權重(包括候選0到3):對於h1,候選0的當前預測= p0預測和h1的預測的加權平均,權重來自候選0;候選1的當前預測= p0預測和h1的預測的加權平均,權重來自候選1。When reordering is applied to the sending of h1's candidate weights, there are 4 candidate weights (including candidates 0 to 3): for h1, candidate 0's current prediction = the weighted average of p0's prediction and h1's prediction, with weights from candidate 0; Candidate 1's current prediction = weighted average of p0's prediction and h1's prediction, with weights from candidate 1.

在一些實施例中,對每個MHP運動候選計算邊界匹配成本。下面的子實施例以MHP為合併方式為例。(MHP可以應用於其他幀間模式,例如幀間AMVP和/或仿射,以及當幀間AMVP或仿射被使用時,以下示例中的“合併”替換為該幀間模式的命名。)在一些實施例中,每個運動候選的邊界匹配成本被計算。例如,候選模式包括候選0到4。最初,索引0(較短的碼字)指的候選0,索引4(較長的碼字)指的是候選4。使用所提出的方法,索引的含義遵循優先順序。如果優先順序(基於邊界匹配成本)指定候選4具有最高優先順序。索引0映射到候選4。In some embodiments, a boundary matching cost is calculated for each MHP motion candidate. The following sub-embodiments take MHP as the merging method as an example. (MHP can be applied to other inter-modes, such as inter-AMVP and/or affine, and when inter-AMVP or affine is used, "merge" in the following examples is replaced with the naming of that inter-mode.) In In some embodiments, a boundary matching cost is calculated for each motion candidate. For example, the candidate pattern includes candidates 0 to 4. Initially, index 0 (shorter codeword) refers to candidate 0, and index 4 (longer codeword) refers to candidate 4. Using the proposed approach, the meaning of the index follows the order of precedence. If the priority order (based on boundary matching cost) specifies that candidate 4 has the highest priority. Index 0 maps to candidate 4.

在一些實施例中,計算每個運動候選的邊界匹配成本。例如,候選模式包括候選0到4。最初,索引0(較短的碼字)指的是候選0,索引4(較長的碼字)指的是候選4。使用所提出的方法,索引的含義遵循優先順序。如果優先順序順序(基於邊界匹配成本)指定候選4具有最高優先順序。該索引未被發送/解析,以及所選擇的運動候選被推斷為具有最高優先順序的運動候選。In some embodiments, a boundary matching cost is calculated for each motion candidate. For example, the candidate pattern includes candidates 0 to 4. Initially, index 0 (shorter codeword) refers to candidate 0, and index 4 (longer codeword) refers to candidate 4. Using the proposed approach, the meaning of the index follows the order of precedence. If the priority order (based on boundary matching cost) specifies that candidate 4 has the highest priority. This index is not sent/parsed, and the selected motion candidate is inferred to be the motion candidate with the highest priority.

在一些實施例中,對於每個假設,運動候選的當前預測(用於計算邊界匹配成本)是由該運動候選產生的運動補償結果。In some embodiments, for each hypothesis, the current prediction of a motion candidate (used to calculate the boundary matching cost) is the motion compensated result produced by that motion candidate.

結合上述兩個子實施例的示例如下所示。例如,如果額外假設的數量等於2,則使用具有較高優先順序的前三個運動候選來形成當前MHP塊的結果預測。又例如,如果額外假設的個數等於2,則現有假設被保留,優先順序較高的兩個運動候選被用來形成額外假設的預測,得到的預測由現有假設和額外假設形成。An example combining the above two sub-embodiments is shown below. For example, if the number of additional hypotheses equals 2, then the top three motion candidates with higher priority are used to form the outcome prediction of the current MHP block. For another example, if the number of additional hypotheses is equal to 2, then the existing hypotheses are retained, and the two motion candidates with higher priority are used to form predictions of the additional hypotheses, and the resulting predictions are formed from the existing hypotheses and the additional hypotheses.

在一些實施例中,運動候選的當前預測(用於計算邊界匹配成本)是組合預測(來自運動候選的預測和現有預測(p0)的加權平均)。(權重由發送/解析的權重索引指示。)In some embodiments, the current prediction of the motion candidate (used to calculate the boundary matching cost) is the combined prediction (the weighted average of the prediction from the motion candidate and the existing prediction (p0)). (The weight is indicated by the weight index sent/parsed.)

在一些實施例中,對於每個假設,運動候選的當前預測(用於計算邊界匹配成本)是組合預測(來自運動候選的預測和先前累積的預測的加權平均)。(權重由發送/解析的權重索引指示。)示例如下圖所示。當應用提出的方法對h2的運動候選的發送重新排序時,h2有4個運動候選(包括候選0到3)。候選n的成本計算為p0的預測、h1的預測和候選n的預測的加權平均。換句話說,對於h2:候選0的當前預測=h1預測和來自候選0的預測的加權平均;候選1的當前預測=h1預測和來自候選1的預測的加權平均。In some embodiments, for each hypothesis, the current prediction of the motion candidate (used to calculate the boundary matching cost) is the combined prediction (the weighted average of the prediction from the motion candidate and the previously accumulated predictions). (The weight is indicated by the weight index sent/parsed.) An example is shown below. When the proposed method is applied to reorder the sending of motion candidates for h2, h2 has 4 motion candidates (including candidates 0 to 3). The cost of candidate n is calculated as the weighted average of p0's prediction, h1's prediction, and candidate n's prediction. In other words, for h2: candidate 0's current prediction = the weighted average of the h1 prediction and the prediction from candidate 0; candidate 1's current prediction = the weighted average of the h1 prediction and the prediction from candidate 1.

當應用建議的方法對h1的運動候選的發送重新排序時,h1有4個運動候選(包括候選0到3):候選0的當前預測=p0預測和來自候選0的預測的加權平均;候選1的當前預測=p0預測和來自候選1的預測的加權平均。When applying the proposed method to reorder the sending of motion candidates for h1, h1 has 4 motion candidates (including candidates 0 to 3): the current prediction of candidate 0 = the weighted average of the p0 prediction and the prediction from candidate 0; candidate 1 The current prediction of = the weighted average of the p0 prediction and the prediction from candidate 1.

在一些實施例中,對每個預測假設的每個MHP組合(運動候選和權重)計算邊界匹配成本。下面的子實施例以MHP為合併方式為例。(MHP可以應用於其他幀間模式,例如幀間AMVP和/或仿射,以及當使用幀間AMVP或仿射時,以下示例中的“合併”將替換為該幀間模式的命名。)In some embodiments, the boundary matching cost is calculated for each MHP combination (motion candidate and weight) of each prediction hypothesis. The following sub-embodiments take MHP as the merging method as an example. (MHP can be applied to other inter-modes, such as inter-AMVP and/or affine, and when inter-AMVP or affine is used, "merge" in the following examples is replaced with the naming of that inter-mode.)

在一些實施例中,一個組合是指運動候選和權重。如果有m個運動候選以及每個運動候選有n個meights,則組合數為m*n。在一些子實施例中,組合的當前預測(用於計算邊界匹配成本)是組合預測(來自運動候選的預測和現有預測(p0)的加權平均)。 使用該方法,合併索引和表示預測額外假設的權重被聯合決定。例如,具有最高優先順序的組合是選擇的MHP組合。(無需發送/解析合併索引和權重以指示預測的額外假設)。又例如,聯合索引被發送/解析以決定MHP組合。本實施例可以固定額外假設的數量。In some embodiments, a combination refers to motion candidates and weights. If there are m motion candidates and each motion candidate has n measures, the number of combinations is m*n. In some sub-embodiments, the combined current prediction (used to calculate the boundary matching cost) is the combined prediction (the weighted average of the predictions from the motion candidate and the existing prediction (p0)). Using this approach, the merging index and the weights representing the additional hypotheses for the prediction are jointly determined. For example, the combination with the highest priority is the selected MHP combination. (No need to send/parse merge indexes and weights to indicate additional assumptions for predictions). As another example, the union index is sent/parsed to determine the MHP combination. This embodiment can fix the number of additional hypotheses.

在一些實施例中,每個MHP運動候選的邊界匹配成本被計算。以合併模式的MHP為例。合併索引(用於指示每個假設的運動候選)可以被推斷。例如,根據合併候選列表中合併候選的順序,假設0為合併候選0,假設1為合併候選1等。又例如,根據成本,成本較小的合併候選首先被使用。再例如,取決於合併候選的預定數量。如果假設的數量為4,則使用合併候選列表中的4個合併候選被用作每個假設的運動候選。前4個合併候選被使用,以及來自合併候選列表中的任意4個合併候選被使用。權重(用於組合預測假設)是隱式的,具體取決於成本。MHP結果預測按如下形成。 (weight0)*(hypothesis0) + (weight1)*(hypothesis1) + (weight2)*(hypothesis2)+… In some embodiments, a boundary matching cost is calculated for each MHP motion candidate. Take MHP in merge mode as an example. The merge index (indicating each hypothesized motion candidate) can be inferred. For example, depending on the order of the merge candidates in the merge candidate list, assume 0 is merge candidate 0, assume 1 is merge candidate 1, and so on. As another example, according to cost, the merge candidate with smaller cost is used first. For another example, it depends on a predetermined number of merge candidates. If the number of hypotheses is 4, then 4 merging candidates in the merging candidate list are used as motion candidates for each hypothesis. The first 4 merge candidates are used, and any 4 merge candidates from the merge candidate list are used. The weights (used to combine forecast hypotheses) are implicit and depend on the cost. MHP outcome predictions are formed as follows. (weight0)*(hypothesis0) + (weight1)*(hypothesis1) + (weight2)*(hypothesis2)+…

在一些實施例中,固定數量的預測假設被使用。也就是說,混合固定數量的假設以及隱式地使用匹配成本作為權重。在一些實施例中,具有較高優先順序的運動候選(或者可以說是假設)的權重大於具有較低優先順序的運動候選的權重。在一些實施例中,運動候選的當前預測(用於計算邊界匹配成本)是由該運動候選生成的運動補償結果。在一些實施例中,合併候選列表中的前n個運動候選用於生成預測假設。使用這種提議的方法,不會對MHP發送合併索引。在一些實施例中,合併候選列表中的所有運動候選都用於生成預測假設。(權重可以決定一個運動候選是否被完全使用。如果它的權重為零,則這個運動候選實際上沒有被使用。)使用這種提議的方法,不會對MHP發送合併索引。在一些實施例中,具有較高優先順序的運動候選的權重大於具有較低優先順序的運動候選的權重。例如,權重遵循不同運動候選的成本比率。如果有兩個運動候選以及 cost_cand0 = 2* cost_cand1,weight_cand0 = 2 * weight_cand1或weight_cand0 = 1/2* weight_cand1。In some embodiments, a fixed number of prediction hypotheses are used. That is, mixing a fixed number of hypotheses and implicitly using matching costs as weights. In some embodiments, a motion candidate (or hypothesis, so to speak) with a higher priority is weighted more than a motion candidate with a lower priority. In some embodiments, the current prediction of a motion candidate (used to calculate the boundary matching cost) is the motion compensated result generated by the motion candidate. In some embodiments, the top n motion candidates in the merged candidate list are used to generate prediction hypotheses. With this proposed approach, no merge index is sent to the MHP. In some embodiments, all motion candidates in the merged candidate list are used to generate prediction hypotheses. (The weight can determine whether a motion candidate is fully used. If its weight is zero, this motion candidate is not actually used.) With this proposed approach, no merge index is sent to the MHP. In some embodiments, motion candidates with higher priority are weighted more than motion candidates with lower priority. For example, the weights follow the cost ratio of different motion candidates. If there are two motion candidates and cost_cand0 = 2* cost_cand1, weight_cand0 = 2 * weight_cand1 or weight_cand0 = 1/2* weight_cand1.

又例如,每個運動候選的成本首先被歸一化到區間[MIN_VALUE,MAX_VALUE]。MAX_VALUE是預定的,例如預測假設的數量。MIN_VALUE是預定的,例如0。例如,(MAX_VALUE-歸一化成本)可以是運動候選的權重或者歸一化成本可以是運動候選的權重。As another example, the cost of each motion candidate is first normalized to the interval [MIN_VALUE, MAX_VALUE]. MAX_VALUE is a predetermined number, such as the number of forecast hypotheses. MIN_VALUE is predetermined, such as 0. For example, (MAX_VALUE - normalized cost) can be the weight of the motion candidate or the normalized cost can be the weight of the motion candidate.

又例如,權重是成本的縮放值或成本倒數的縮放值。(例如,如果成本= 2,則成本的倒數= ½。)縮放值表示縮放因數*原始值。如果比例因數=1,則縮放。As another example, a weight is a scaled value of a cost or a scaled value of the inverse of a cost. (For example, if cost = 2, then reciprocal of cost = ½.) The scale value represents the scaling factor * the original value. If scale factor = 1, scale.

在一些實施例中,權重和合併索引對於所提議的方法是隱式的。該方法的當然預測的產生可以參考本發明中提議的任一其他方法。在一些實施例中,所提議的方案應用於所有額外預測假設的子集。(即,對所有額外預測假設的子集重複上述步驟0和1。)例如,只有第一個額外預測假設(與現有預測假設相結合)的候選權重使用提議的方案進行重新排序。在一些實施例中,該子集在視訊編解碼標準中預定。在實施例中,子集取決於當前塊寬度、高度或面積。例如,對於塊面積大於(或小於)閾值的塊,該子集包括更多的預測假設。In some embodiments, weights and merge indexes are implicit for the proposed method. Of course the predictions of this method can be generated with reference to any of the other methods proposed in the present invention. In some embodiments, the proposed scheme is applied to a subset of all additional prediction hypotheses. (i.e., repeat steps 0 and 1 above for a subset of all additional prediction hypotheses.) For example, only the candidate weights of the first additional prediction hypothesis (combined with the existing prediction hypothesis) are reranked using the proposed scheme. In some embodiments, this subset is specified in the video codec standard. In an embodiment, the subset depends on the current block width, height or area. For example, for blocks whose block area is larger (or smaller) than the threshold, the subset includes more prediction hypotheses.

在一些實施例中,來自子集的重新排序結果可以被重新用於剩餘的額外預測假設。例如,基於第一個預測假設的重排序結果,權重索引0和1分別指代w1和w0。對於以下預測假設,權重索引0和1也分別指代w1和w0。In some embodiments, the reranked results from the subset can be reused for the remaining additional prediction hypotheses. For example, based on the reranking results of the first prediction hypothesis, weight indices 0 and 1 refer to w1 and w0 respectively. For the following forecast assumptions, weight indices 0 and 1 also refer to w1 and w0, respectively.

在一些實施例中,所提議的方案被應用於所有候選權重的子集以用於額外預測假設。也就是說,對所有候選權重的子集重複上述步驟0和1,以用於額外預測假設。以候選權重數(對於額外預測假設)等於4為例。對於額外預測假設,僅最前(或最後)兩個候選權重使用提議的方案進行重新排序。在一些實施例中,該子集在視訊編解碼標準中預定。在一些實施例中,子集取決於當前塊寬度、高度或面積。例如,對於塊面積大於(或小於)閾值的塊,該子集包括更多的候選權重。In some embodiments, the proposed scheme is applied to a subset of all candidate weights for additional prediction hypotheses. That is, repeat steps 0 and 1 above for a subset of all candidate weights for additional prediction hypotheses. As an example, take the number of candidate weights (for additional prediction hypotheses) equal to 4. For additional prediction hypotheses, only the top (or last) two candidate weights are reranked using the proposed scheme. In some embodiments, this subset is specified in the video codec standard. In some embodiments, the subset depends on the current block width, height, or area. For example, for blocks whose block area is larger (or smaller) than the threshold, the subset includes more candidate weights.

在一些實施例中,預測假設可以是來自單向預測或雙向預測運動補償結果的預測訊號。提議的不同工具(不限於以下示例中的那些工具)的重新排序方案可以統一。例如,用於MHP、LM、BCW、MMVD和/或合併候選的提議的重新排序方案被統一,具有相同的計算邊界匹配成本的規則。In some embodiments, the prediction hypothesis may be a prediction signal from a uni-prediction or bi-prediction motion compensation result. Proposed reordering schemes for different tools (not limited to those in the examples below) can be unified. For example, the proposed re-ranking schemes for MHP, LM, BCW, MMVD and/or merge candidates are unified with the same rules for calculating boundary matching costs.

根據隱式規則(例如塊寬度、高度或面積)或根據顯式規則(例如,基於塊、圖塊、片段、圖片、SPS或PPS級),本發明中提出的方法可以被啟用和/或禁用。例如,當塊區域小於閾值時,提議的重新排序被應用。本發明中提出的方法的任一組合可以被應用。The method proposed in this invention can be enabled and/or disabled according to implicit rules (e.g. block width, height or area) or according to explicit rules (e.g. based on blocks, tiles, fragments, pictures, SPS or PPS levels) . For example, when the block area is smaller than a threshold, the proposed reordering is applied. Any combination of the methods proposed in this invention can be applied.

任一前述提出的方法都可以在編碼器和/或解碼器中實現。例如,任一提出的方法都可以在編碼器的幀內/幀間編解碼模組、解碼器的運動補償模組、合併候選導出模組中實現。或者,所提出的方法中的任何一個都可以實現為耦合到編碼器的幀內/幀間編碼模組和/或解碼器的運動補償模組、合併候選導出模組的電路。Any of the previously proposed methods can be implemented in the encoder and/or decoder. For example, any of the proposed methods can be implemented in the intra/inter coding module of the encoder, the motion compensation module of the decoder, and the merge candidate derivation module. Alternatively, any of the proposed methods may be implemented as circuitry coupled to an intra/inter coding module of the encoder and/or a motion compensation module, merge candidate derivation module of the decoder.

、示例視訊編碼器, sample video encoder

第6圖示出可實施基於邊界匹配成本的候選編解碼模式選擇的實例視訊編碼器600。如圖所示,視訊編碼器600從視訊源605接收輸入視訊訊號以及將該訊號編碼成位元流695。視訊編碼器600具有用於對來自視訊源605的訊號進行編碼的若干組件或模組,至少包括選自以下的一些組件:變換模組610、量化模組611、逆量化模組614、逆變換模組615、幀內估計模組620、幀內預測模組625、運動補償模組630、運動估計模組635、環路濾波器645、重構圖片緩衝器650、MV緩衝器665、MV預測模組675和熵編碼器690。運動補償模組630和運動估計模組635是幀間預測模組640的一部分。Figure 6 illustrates an example video encoder 600 that may implement candidate codec mode selection based on boundary matching cost. As shown, video encoder 600 receives an input video signal from video source 605 and encodes the signal into a bit stream 695. Video encoder 600 has several components or modules for encoding signals from video source 605, including at least some components selected from the following: transform module 610, quantization module 611, inverse quantization module 614, inverse transform Module 615, intra estimation module 620, intra prediction module 625, motion compensation module 630, motion estimation module 635, loop filter 645, reconstructed picture buffer 650, MV buffer 665, MV prediction Module 675 and entropy encoder 690. Motion compensation module 630 and motion estimation module 635 are part of inter prediction module 640.

在一些實施例中,模組610-690是由計算設備或電子設備的一個或多個處理單元(例如,處理器)執行的軟體指令模組。在一些實施例中,模組610-690是由電子裝置的一個或多個積體電路(integrated circuit,簡稱IC)實現的硬體電路模組。儘管模組610-690被示為單獨的模組,但是一些模組可以組合成單個模組。In some embodiments, modules 610-690 are modules of software instructions executed by one or more processing units (eg, processors) of a computing device or electronic device. In some embodiments, the modules 610-690 are hardware circuit modules implemented by one or more integrated circuits (ICs) of the electronic device. Although modules 610-690 are shown as individual modules, some modules may be combined into a single module.

視訊源605提供未壓縮的原始視訊訊號,其呈現每個視訊幀的像素資料。減法器608計算視訊源605的原始視訊像素資料與來自運動補償模組630或幀內預測模組625的預測像素資料613之間的差值。變換模組610將差值(或殘差像素資料或殘差訊號608)轉換成變換係數(例如,藉由執行離散余弦變換,或Discrete Cosine Transform,簡稱DCT)。量化模組611將變換係數量化為量化資料(或量化係數)612,其由熵編碼器690編碼為位元流695。Video source 605 provides an uncompressed raw video signal that represents the pixel data of each video frame. The subtractor 608 calculates the difference between the original video pixel data of the video source 605 and the predicted pixel data 613 from the motion compensation module 630 or the intra prediction module 625. Transform module 610 converts the difference values (or residual pixel data or residual signal 608) into transform coefficients (eg, by performing a discrete cosine transform, or DCT). The quantization module 611 quantizes the transform coefficients into quantized data (or quantized coefficients) 612, which is encoded into a bit stream 695 by the entropy encoder 690.

逆量化模組614對量化資料(或量化係數)612進行逆量化得到變換係數,逆變換模組615對變換係數進行逆變換產生重構殘差619。重構殘差619與預測的像素資料613相加以產生重構像素資料617。在一些實施例中,重構像素資料617被臨時存儲在行緩衝器(未示出)中用於圖片內預測和空間MV預測。重構像素由環路濾波器645濾波以及存儲在重構圖片緩衝器650中。在一些實施例中,重構圖片緩衝器650是視訊編碼器600外部的記憶體。在一些實施例中,重構圖片緩衝器650是視訊編碼器600內部的記憶體。The inverse quantization module 614 performs inverse quantization on the quantized data (or quantized coefficients) 612 to obtain transform coefficients, and the inverse transform module 615 performs inverse transform on the transform coefficients to generate a reconstructed residual 619 . The reconstructed residual 619 is added to the predicted pixel data 613 to produce reconstructed pixel data 617 . In some embodiments, reconstructed pixel data 617 is temporarily stored in a line buffer (not shown) for intra-picture prediction and spatial MV prediction. The reconstructed pixels are filtered by loop filter 645 and stored in reconstructed picture buffer 650. In some embodiments, the reconstructed picture buffer 650 is a memory external to the video encoder 600 . In some embodiments, the reconstructed picture buffer 650 is an internal memory of the video encoder 600 .

幀内估計模組620基於重構像素資料617執行幀內預測以產生幀内預測資料。幀內預測資料被提供給熵編碼器690以被編碼成位元流695。幀內預測資料也被幀內預測模組625用來產生預測像素資料613。The intra estimation module 620 performs intra prediction based on the reconstructed pixel data 617 to generate intra prediction data. The intra prediction data is provided to an entropy encoder 690 to be encoded into a bit stream 695. The intra prediction data is also used by the intra prediction module 625 to generate predicted pixel data 613 .

運動估計模組635藉由產生MV以參考存儲在重構圖片緩衝器650中的先前解碼幀的像素資料來執行幀間預測。這些MV被提供給運動補償模組630以產生預測像素資料。The motion estimation module 635 performs inter prediction by generating MVs to reference pixel data of previously decoded frames stored in the reconstructed picture buffer 650 . These MVs are provided to the motion compensation module 630 to generate predicted pixel data.

視訊編碼器600不是在位元流中編碼完整的實際MV,而是使用MV預測來生成預測MV,以及用於運動補償的MV與預測MV之間的差值被編碼為殘差運動資料並存儲在位元流695中。Instead of encoding the complete actual MV in the bitstream, the video encoder 600 uses MV prediction to generate the predicted MV, and the difference between the MV used for motion compensation and the predicted MV is encoded as residual motion data and stored In bitstream 695.

基於為編碼先前視訊幀而生成的參考MV,即用於執行運動補償的運動補償MV,MV預測模組675生成預測MV。MV預測模組675從MV緩衝器665中獲取來自先前視訊幀的參考MV。視訊編碼器600將對當前視訊幀生成的MV存儲在MV緩衝器665中作為用於生成預測MV的參考MV。The MV prediction module 675 generates a predicted MV based on the reference MV generated for encoding the previous video frame, ie, the motion compensation MV used to perform motion compensation. The MV prediction module 675 obtains the reference MV from the previous video frame from the MV buffer 665 . The video encoder 600 stores the MV generated for the current video frame in the MV buffer 665 as a reference MV for generating a predicted MV.

MV預測模塊675使用參考MV來創建預測MV。預測的MV可以藉由空間MV預測或時間MV預測來計算。熵編碼器690將預測MV與當前幀的運動補償MV(MC MV)之間的差值(殘差運動數據)編碼到位元流695中。The MV prediction module 675 uses the reference MV to create predicted MVs. The predicted MV can be calculated by spatial MV prediction or temporal MV prediction. Entropy encoder 690 encodes the difference between the predicted MV and the motion compensated MV (MC MV) of the current frame (residual motion data) into bit stream 695.

熵編碼器690藉由使用諸如上下文自適應二進制算術編解碼(context-adaptive binary arithmetic coding,簡稱CABAC)或霍夫曼編碼的熵編解碼技術將各種參數和數據編碼到位元流695中。熵編碼器690將各種報頭元素、標誌連同量化變換係數612和殘差運動數據作為語法元素編碼到位元流695中。位元流695又存儲在存儲設備中或藉由通訊媒介(譬如網絡)傳輸到解碼器。The entropy encoder 690 encodes various parameters and data into the bit stream 695 by using an entropy coding technique such as context-adaptive binary arithmetic coding (CABAC) or Huffman coding. Entropy encoder 690 encodes various header elements, flags along with quantized transform coefficients 612 and residual motion data as syntax elements into bit stream 695. The bit stream 695 is stored in a storage device or transmitted to the decoder via a communication medium (such as a network).

環內濾波器645對重構的像素資料617執行濾波或平滑操作以減少編解碼的偽像,特別是在像素塊的邊界處。在一些實施例中,執行的濾波操作包括樣本適應性偏移(sample adaptive offset,簡稱SAO)。在一些實施例中,濾波操作包括適應性環路濾波器(adaptive loop filter,簡稱ALF)。The in-loop filter 645 performs a filtering or smoothing operation on the reconstructed pixel data 617 to reduce coding and decoding artifacts, especially at the boundaries of pixel blocks. In some embodiments, the filtering operation performed includes sample adaptive offset (SAO). In some embodiments, the filtering operation includes an adaptive loop filter (ALF).

第7圖示出基於邊界匹配成本實現候選編解碼模式選擇的視訊編碼器600的部分。具體地,該圖示出視訊編碼器600的幀間預測模塊640的組件,其計算不同候選編解碼模式的所有或任一子集的邊界匹配成本,以及基於組分配和計算的成本來選擇候選編解碼模式。Figure 7 shows a portion of a video encoder 600 that implements candidate codec mode selection based on boundary matching costs. Specifically, this figure illustrates the components of the inter prediction module 640 of the video encoder 600, which calculates the boundary matching cost for all or any subset of different candidate codec modes, and selects candidates based on the group assignment and calculated cost. Codec mode.

幀間預測模塊640包括各種邊界預測模塊710。這些邊界預測模塊710對各種候選編解碼模式沿著當前塊的邊界生成當前塊的預測樣本715。邊界匹配成本計算器730將每個候選編解碼模式的邊界預測子樣本715與當前塊的相鄰樣本725(從重構圖片緩衝器650中獲取)進行比較,以計算每個候選編解碼模式或候選編解碼模式的任一子集的邊界匹配成本。上面的Ⅰ部分描述了根據相鄰樣本和邊界預測樣本計算邊界匹配成本。Inter prediction module 640 includes various boundary prediction modules 710 . These boundary prediction modules 710 generate prediction samples 715 of the current block along the boundaries of the current block for various candidate codec modes. The boundary matching cost calculator 730 compares the boundary prediction subsamples 715 of each candidate codec mode with the neighboring samples 725 of the current block (obtained from the reconstructed picture buffer 650) to calculate each candidate codec mode or Boundary matching cost for any subset of candidate codec modes. Part I above describes the calculation of boundary matching costs based on adjacent samples and boundary prediction samples.

組分配和選擇模塊740將不同的候選編解碼模式分配到不同的組中並選擇其中一個組。候選選擇模塊750然後從所選擇的組中選擇一種候選編解碼模式。幀間預測模塊640然後使用所選擇的候選編解碼模式來執行運動補償。在一些實施例中,組分配模塊740分配一定數量的具有最低邊界匹配成本的候選編解碼模式以形成一個最低成本組,以及候選選擇模塊750從該最低成本組中選擇候選編解碼模式。在一些實施例中,組分配模塊740分配一定數量的候選編解碼模式以形成具有預定規則(可以取決於或不取決於成本)的組,以及候選選擇模塊750基於成本從組中選擇候選編解碼模式。例如,選擇的候選編解碼模式為組中優先級最高的候選模式。The group allocation and selection module 740 allocates different candidate codec modes into different groups and selects one of the groups. Candidate selection module 750 then selects a candidate codec mode from the selected group. Inter prediction module 640 then performs motion compensation using the selected candidate codec mode. In some embodiments, the group allocation module 740 allocates a number of candidate codec modes with the lowest boundary matching costs to form a lowest cost group, and the candidate selection module 750 selects candidate codec modes from the lowest cost group. In some embodiments, the group allocation module 740 allocates a number of candidate codec modes to form groups with predetermined rules (which may or may not depend on cost), and the candidate selection module 750 selects candidate codecs from the group based on cost. model. For example, the selected candidate encoding and decoding mode is the candidate mode with the highest priority in the group.

在一些實施例中,所選組的標識被發送到熵編碼器690以在位元流695中發送。在一些實施例中,所選組的標識被隱式地確定以及不在位元流中發送。在一些實施例中,組的選擇是基於計算的不同組的邊界匹配成本來確定,例如,組選擇模塊740可以選擇具有最低代表成本的組。In some embodiments, the identification of the selected group is sent to entropy encoder 690 for sending in bitstream 695. In some embodiments, the identification of the selected group is determined implicitly and is not sent in the bitstream. In some embodiments, group selection is determined based on calculated boundary matching costs for different groups, for example, group selection module 740 may select the group with the lowest representation cost.

在一些實施例中,所選組內的所選候選編解碼模式的標識被提供給熵編碼器690以在位元流695中發送。在一些實施例中,根據計算的邊界匹配成本,組內的候選編解碼模式被重新排序,使得最低成本(或最高成本)的候選將使用最短的碼字發送。在一些實施例中,所選擇的候選編解碼模式的標識將被隱式地確定以及不在位元流中發送,例如,藉由選擇組內具有最低邊界匹配成本的候選編解碼模式。在上面的部分II-VI中描述了一組候選編解碼模式的選擇以及從該組中選擇一個候選編解碼模式。In some embodiments, identifications of selected candidate codec modes within the selected group are provided to entropy encoder 690 for transmission in bitstream 695 . In some embodiments, the candidate codec modes within the group are reordered based on the calculated boundary matching costs such that the lowest cost (or highest cost) candidate will be sent using the shortest codeword. In some embodiments, the identity of the selected candidate codec mode will be determined implicitly and not sent in the bitstream, for example, by selecting the candidate codec mode with the lowest boundary matching cost within the group. The selection of a set of candidate codec modes and the selection of a candidate codec mode from the set are described in Sections II-VI above.

邊界預測模組710包括用於各種不同候選編解碼模式的模組。這些候選編解碼模式可以使用存儲在重構緩衝器650中的亮度和色度樣本、來自MV緩衝器665的運動資訊和/或來自視訊源605的傳入亮度和色度樣本來生成邊界預測樣本715(例如,藉由導出合併候選,導出MMVD候選,使用運動資訊獲取參考樣本,生成線性模型等)在一些實施例中,各種候選編解碼模式包括對應於當前塊的各種合併候選的那些候選編解碼模式。作為候選編解碼模式的各種類型的合併候選(例如,空間、時間、仿射、CIIP等)在上面的部分II中進行了描述。作為候選編解碼模式的不同的MMVD距離和方向在上面的部分III中描述。作為候選編解碼模式的不同的BCW權重在上面的部分Ⅳ中描述。作為候選編解碼模式的各種類型的線性模型(例如,LM-L、LM-T、LM-LT)在上面的部分Ⅴ中描述。Boundary prediction modules 710 include modules for various different candidate codec modes. These candidate codec modes may generate boundary prediction samples using luma and chroma samples stored in reconstruction buffer 650 , motion information from MV buffer 665 , and/or incoming luma and chroma samples from video source 605 715 (e.g., by deriving merge candidates, deriving MMVD candidates, using motion information to obtain reference samples, generating linear models, etc.) In some embodiments, the various candidate codec modes include those corresponding to various merge candidates of the current block. Decoding mode. Various types of merging candidates (e.g., spatial, temporal, affine, CIIP, etc.) that are candidate codec modes are described in Section II above. Different MMVD distances and directions as candidate codec modes are described in Section III above. Different BCW weights as candidate codec modes are described in Section IV above. Various types of linear models (e.g., LM-L, LM-T, LM-LT) that are candidate encoding and decoding modes are described in Section V above.

第8圖概念性地示出用於使用邊界匹配成本來選擇候選編解碼模式以對當前塊進行編碼的處理800。在一些實施例中,實現編碼器600的計算設備的一個或多個處理單元(例如,處理器)藉由執行存儲在電腦可讀介質中的指令來執行處理800。在一些實施例中,實現編碼器600的電子設備執行處理800。Figure 8 conceptually illustrates a process 800 for selecting candidate codec modes to encode a current block using boundary matching costs. In some embodiments, one or more processing units (eg, processors) of a computing device implementing encoder 600 perform process 800 by executing instructions stored in a computer-readable medium. In some embodiments, an electronic device implementing encoder 600 performs process 800.

編碼器接收(在塊810處)像素塊的資料,該像素塊的資料將被編碼為當前圖片中的當前塊。編碼器識別(在塊820處)適用於當前塊的多個候選編解碼模式。在一些實施例中,多個候選編解碼模式包括當前塊的合併候選。當前塊的合併候選可以包括(i)使用CIIP的合併候選和/或(ii)使用仿射變換運動補償預測的合併候選。在一些實施例中,多個候選編解碼模式包括對應於用於細化運動資訊的距離和偏移的不同MMVD組合的候選編解碼模式。在一些實施例中,多個候選編解碼模式包括對應於用於基於當前塊的亮度樣本導出當前塊的色度樣本的預測子的不同線性模型的候選編解碼模式。在一些實施例中,多個候選編解碼模式包括對應於用於組合不同方向的幀間預測的不同候選BCW權重的候選編解碼模式。The encoder receives (at block 810) the data for the block of pixels that will be encoded as the current block in the current picture. The encoder identifies (at block 820) multiple candidate codec modes suitable for the current block. In some embodiments, the plurality of candidate codec modes include merge candidates for the current block. Merging candidates for the current block may include (i) merging candidates using CIIP and/or (ii) merging candidates using affine transform motion compensated prediction. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different MMVD combinations of distance and offset used to refine the motion information. In some embodiments, the plurality of candidate codec modes includes candidate codec modes that correspond to different linear models for deriving predictors of chroma samples of the current block based on luma samples of the current block. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different candidate BCW weights for combining inter prediction in different directions.

編碼器識別(在塊830)作為多個候選編解碼模式的子集的第一候選編解碼模式組,使得第一候選編解碼模式組中編解碼模式的數量少於多個候選編解碼模式中的候選編解碼模式的數量。The encoder identifies (at block 830 ) a first set of candidate codec modes that is a subset of the plurality of candidate codec modes such that there are fewer codec modes in the first set of candidate codec modes than in the plurality of candidate codec modes. The number of candidate codec modes.

在一些實施例中,第一候選編解碼模式組基於多個候選編解碼模式的成本識別的最高優先順序候選編解碼模式。編碼器可以根據候選編解碼模式的優先順序對候選編解碼模式進行索引或者將碼字分配給所識別的候選編解碼模式組中的候選編解碼模式。在一些實施例中,候選編解碼模式的成本是藉由比較(i)與當前塊相鄰的重構樣本與(ii)根據候選編解碼模式生成的當前塊沿當前塊邊界的預測樣本來計算的邊界匹配成本。上面的部分Ⅰ描述根據相鄰樣本和邊界預測樣本計算邊界匹配成本。In some embodiments, the first set of candidate codec modes is based on the highest priority candidate codec mode identified by cost of the plurality of candidate codec modes. The encoder may index the candidate codec modes according to the priority order of the candidate codec modes or assign codewords to the candidate codec modes in the identified candidate codec mode group. In some embodiments, the cost of the candidate codec mode is calculated by comparing (i) reconstructed samples adjacent to the current block with (ii) predicted samples of the current block along the current block boundary generated according to the candidate codec mode. boundary matching cost. Section I above describes the calculation of boundary matching costs based on adjacent samples and boundary prediction samples.

在一些實施例中,多個候選編解碼模式中的每一個被分配給多個候選編解碼模式組中的一個。例如,在一些實施例中,多個候選編解碼模式中的每個候選編解碼模式與原始候選索引相關聯,其中每個候選編解碼模式基於原始索引模K的結果或原始索引除以K的結果被分配給K組候選編解碼模式中的一組。在一些實施例中,對應於空間合併候選的候選編解碼模式被分配給同一個候選編解碼模式組。在一些實施例中,對應於空間合併候選的候選編解碼模式被分配給不同的候選編解碼模式組。在一些實施例中,具有運動差小於閾值的合併候選的候選編解碼模式被分配給同一組。在一些實施例中,具有運動差大於閾值的合併候選的候選編解碼模式被分配給同一組。在一些實施例中,編碼器識別在多組候選編解碼模式中具有最低代表成本的一個候選編解碼模式組,並且發送索引,該索引用於從所識別的候選編解碼模式組中選擇一個候選編解碼模式。所識別組的代表成本可以是所識別組的候選編解碼模式的成本(例如,邊界匹配成本)的平均值、最大值或最小值。在一些實施例中,編碼器發送用於選擇一個候選編解碼模式組的索引,以及基於所選擇的候選編解碼模式組的成本(例如,邊界匹配成本)從所選擇的候選編解碼模式組中識別候選編解碼模式。在上面的部分II-VI中描述一組候選編解碼模式的選擇以及從該組中選擇一個候選編解碼模式。In some embodiments, each of the plurality of candidate codec modes is assigned to one of the plurality of candidate codec mode groups. For example, in some embodiments, each candidate codec mode in the plurality of candidate codec modes is associated with an original candidate index, wherein each candidate codec mode is based on the result of the original index modulo K or the original index divided by K The result is assigned to one of the K sets of candidate encoding and decoding modes. In some embodiments, candidate codec modes corresponding to spatial merging candidates are assigned to the same candidate codec mode group. In some embodiments, candidate codec modes corresponding to spatial merging candidates are assigned to different candidate codec mode groups. In some embodiments, candidate codec modes having merge candidates with motion differences less than a threshold are assigned to the same group. In some embodiments, candidate codec modes having merge candidates with motion differences greater than a threshold are assigned to the same group. In some embodiments, the encoder identifies a candidate codec mode group with the lowest representation cost among the plurality of candidate codec mode groups, and sends an index used to select a candidate from the identified candidate codec mode group Codec mode. The representative cost of the identified group may be the average, maximum, or minimum value of the costs (eg, boundary matching costs) of candidate codec modes for the identified group. In some embodiments, the encoder sends an index for selecting a candidate codec mode set and a cost based on the selected candidate codec mode set (eg, a boundary matching cost) from the selected candidate codec mode set. Identify candidate codec modes. The selection of a set of candidate codec modes and the selection of a candidate codec mode from the set are described in Sections II-VI above.

編碼器選擇(在塊840)第一候選編解碼模式組中的候選編解碼模式。第一候選編解碼模式組中選擇的候選編解碼模式可以基於成本來選擇。The encoder selects (at block 840) a candidate codec mode in the first set of candidate codec modes. The candidate codec mode selected in the first candidate codec mode group may be selected based on cost.

編碼器使用選擇的候選編解碼模式對當前塊進行編碼(在塊850)。具體地,編碼器根據選擇的候選編解碼模式構建當前塊的預測子,以及使用預測子對當前塊進行編碼。The encoder encodes the current block using the selected candidate codec mode (at block 850). Specifically, the encoder constructs a predictor of the current block according to the selected candidate encoding and decoding mode, and encodes the current block using the predictor.

.. 示例視訊解碼器Sample video decoder

在一些實施例中,編碼器可以在位元流中發送(或生成)一個或多個語法元素,使得解碼器可以從位元流中解析所述一個或多個語法元素。In some embodiments, the encoder may send (or generate) one or more syntax elements in the bitstream such that the decoder may parse the one or more syntax elements from the bitstream.

第9圖示出可實施基於邊界匹配成本的候選解碼模式選擇的實例視訊解碼器900。如圖所示,視訊解碼器900是圖像解碼或視訊解碼電路,其接收位元流995以及將位元流的內容解碼成視訊幀的像素資料以供顯示。視訊解碼器900具有用於解碼位元流995的若干組件或模組,包括選自以下的一些組件:逆量化模組911、逆變換模組910、幀內預測模組925、運動補償模組930、環內濾波器945、解碼圖片緩衝器950、MV緩衝器965、MV預測模組975和解析器990。運動補償模組930是幀間預測模組940的一部分。Figure 9 illustrates an example video decoder 900 that may implement boundary matching cost-based candidate decoding mode selection. As shown in the figure, the video decoder 900 is an image decoding or video decoding circuit that receives a bit stream 995 and decodes the contents of the bit stream into pixel data of a video frame for display. Video decoder 900 has several components or modules for decoding bit stream 995, including some components selected from the following: inverse quantization module 911, inverse transform module 910, intra prediction module 925, motion compensation module 930, in-loop filter 945, decoded picture buffer 950, MV buffer 965, MV prediction module 975 and parser 990. Motion compensation module 930 is part of inter prediction module 940 .

在一些實施例中,模組910-990是由計算設備的一個或多個處理單元(例如處理器)執行的軟體指令模組。在一些實施例中,模組910-990是由電子裝置的一個或多個IC實現的硬體電路模組。儘管模組910-990被示為單獨的模組,但是一些模組可以組合成單個模組。In some embodiments, modules 910-990 are modules of software instructions executed by one or more processing units (eg, processors) of a computing device. In some embodiments, modules 910-990 are hardware circuit modules implemented by one or more ICs of an electronic device. Although modules 910-990 are shown as individual modules, some modules may be combined into a single module.

解析器990(或熵解碼器)接收位元流995以及根據視訊編解碼或圖像編解碼標準定義的語法執行初始解析。解析的語法元素包括各種報頭元素、標誌以及量化資料(或量化係數)912。解析器990藉由使用諸如上下文適應性二進位算術編解碼(context-adaptive binary arithmetic coding,簡稱CABAC)或霍夫曼編碼。A parser 990 (or entropy decoder) receives the bitstream 995 and performs initial parsing according to the syntax defined by the video codec or image codec standard. Parsed syntax elements include various header elements, flags, and quantization data (or quantization coefficients) 912 . The parser 990 uses, for example, context-adaptive binary arithmetic coding (CABAC) or Huffman coding.

逆量化模組911對量化資料(或量化係數)912進行逆量化得到變換係數,逆變換模組910對變換係數916進行逆變換得到重構殘差訊號919。重構殘差訊號919被添加至來自幀內預測模組925或運動補償模組930的預測像素資料913以一起產生解碼像素資料917。解碼像素資料由環內濾波器945濾波以及存儲在解碼圖片緩衝器950中。在一些實施例中,解碼圖片緩衝器950是視訊解碼器900外部的存儲器。在一些實施例中,解碼圖片緩衝器950是視訊解碼器900內部的存儲器。The inverse quantization module 911 performs inverse quantization on the quantized data (or quantized coefficients) 912 to obtain the transform coefficients, and the inverse transform module 910 performs inverse transformation on the transform coefficients 916 to obtain the reconstructed residual signal 919 . The reconstructed residual signal 919 is added to the predicted pixel data 913 from the intra prediction module 925 or the motion compensation module 930 to together produce decoded pixel data 917. The decoded pixel data is filtered by the in-loop filter 945 and stored in the decoded picture buffer 950. In some embodiments, the decoded picture buffer 950 is a memory external to the video decoder 900 . In some embodiments, the decoded picture buffer 950 is a memory internal to the video decoder 900 .

幀內預測模組925從位元流995接收幀內預測資料,以及據此從存儲在解碼圖片緩衝器950中的解碼像素資料917產生預測像素資料913。在一些實施例中,解碼像素資料917也被存儲在行緩衝器(未示出)中用於畫面內預測和空間MV預測。The intra prediction module 925 receives intra prediction data from the bit stream 995 and generates predicted pixel data 913 from the decoded pixel data 917 stored in the decoded picture buffer 950 accordingly. In some embodiments, decoded pixel data 917 is also stored in a line buffer (not shown) for intra prediction and spatial MV prediction.

在一些實施例中,解碼圖片緩衝器950的內容用於顯示。顯示裝置955獲取解碼圖片緩衝器950的內容以直接顯示,或者獲取解碼圖片緩衝器的內容到顯示緩衝器。在一些實施例中,顯示裝置藉由像素傳輸從解碼圖片緩衝器950接收像素值。In some embodiments, the contents of picture buffer 950 are decoded for display. The display device 955 obtains the contents of the decoded picture buffer 950 for direct display, or obtains the contents of the decoded picture buffer to a display buffer. In some embodiments, the display device receives pixel values from decoded picture buffer 950 via pixel transfer.

運動補償模組930根據運動補償MV(MC MV)從存儲在解碼圖片緩衝器950中的解碼像素資料917產生預測像素資料913。藉由將從位元流995接收的殘差運動資料與從MV預測模組975接收的預測MV相加來解碼這些運動補償MV。The motion compensation module 930 generates predicted pixel data 913 from the decoded pixel data 917 stored in the decoded picture buffer 950 according to the motion compensated MV (MC MV). These motion compensated MVs are decoded by adding the residual motion data received from bit stream 995 to the predicted MV received from MV prediction module 975 .

MV預測模組975基於為解碼先前視訊幀而生成的參考MV生成預測MV,例如,用於執行運動補償的運動補償MV。MV預測模組975從MV緩衝器965中獲取先前視訊幀的參考MV。視訊解碼器900將為解碼當前視訊幀而生成的運動補償MV存儲在MV緩衝器965中作為用於產生預測MV的參考MV。The MV prediction module 975 generates prediction MVs based on reference MVs generated for decoding previous video frames, eg, motion compensation MVs for performing motion compensation. The MV prediction module 975 obtains the reference MV of the previous video frame from the MV buffer 965 . The video decoder 900 stores the motion compensated MV generated for decoding the current video frame in the MV buffer 965 as a reference MV for generating the predicted MV.

環內濾波器945對解碼像素資料917執行濾波或平滑操作以減少編解碼偽像,特別是在像素塊的邊界處。在一些實施例中,執行的濾波操作包括樣本適應性偏移(sample adaptive offset,簡稱SAO)。在一些實施例中,濾波操作包括適應性環路濾波器(adaptive loop filter,簡稱ALF)。In-loop filter 945 performs a filtering or smoothing operation on decoded pixel data 917 to reduce encoding and decoding artifacts, particularly at pixel block boundaries. In some embodiments, the filtering operation performed includes sample adaptive offset (SAO). In some embodiments, the filtering operation includes an adaptive loop filter (ALF).

第10圖示出基於邊界匹配成本實現候選編解碼模式選擇的視訊解碼器900的部分。具體地,該圖示出視訊解碼器900的幀間預測模組940的組件,其計算不同候選編解碼模式的所有或任一子集的邊界匹配成本,以及基於組分配和計算的成本來選擇候選編解碼模式。Figure 10 shows a portion of a video decoder 900 that implements candidate codec mode selection based on boundary matching costs. Specifically, this figure shows the components of the inter prediction module 940 of the video decoder 900, which calculates the boundary matching cost for all or any subset of different candidate codec modes, and selects based on the group allocation and calculated cost. Candidate codec mode.

幀間預測模組940包括各種邊界預測模組1010。這些邊界預測模組1010生成各種候選編解碼模式沿著當前塊的邊界的當前塊的預測樣本1015。邊界匹配成本計算器1030將每個候選編解碼模式的邊界預測器樣本1015與當前塊的相鄰樣本1025(從重構圖片緩衝器950中獲取)進行比較,以計算每個候選編解碼模式或候選編解碼模式任一子集的邊界匹配成本。上面的部分Ⅰ描述了根據相鄰樣本和邊界預測樣本計算邊界匹配成本。Inter prediction module 940 includes various boundary prediction modules 1010 . These boundary prediction modules 1010 generate prediction samples 1015 of the current block along the boundaries of the current block for various candidate codec modes. The boundary matching cost calculator 1030 compares the boundary predictor samples 1015 of each candidate codec mode with the neighboring samples 1025 of the current block (obtained from the reconstructed picture buffer 950) to calculate each candidate codec mode or Boundary matching cost for any subset of candidate codec modes. Section I above describes the calculation of boundary matching costs based on adjacent samples and boundary prediction samples.

組分配和選擇模組1040將不同的候選編解碼模式分配到不同的組中以及選擇組中的一個。然後,候選選擇模組1050從所選擇的組中選擇一個候選編解碼模式。然後,幀間預測模組940使用所選擇的候選編解碼模式來執行運動補償。在一些實施例中,組分配模組1040分配一定數量的具有最低邊界匹配成本的候選編解碼模式以形成一個最低成本組,以及候選選擇模組1050從該最低成本組中選擇候選編解碼模式。在一些實施例中,組分配模組1040分配一定數量的候選編解碼模式以形成具有預定規則的組(可以取決於或不取決於成本),以及候選選擇模組1050根據成本從組中選擇候選編解碼模式。例如,選擇的候選編解碼模式為組中優先順序最高的候選模式。The group allocation and selection module 1040 allocates different candidate codec modes into different groups and selects one of the groups. Then, the candidate selection module 1050 selects a candidate codec mode from the selected group. The inter prediction module 940 then performs motion compensation using the selected candidate codec mode. In some embodiments, the group allocation module 1040 allocates a number of candidate codec modes with the lowest boundary matching costs to form a lowest cost group, and the candidate selection module 1050 selects candidate codec modes from the lowest cost group. In some embodiments, the group allocation module 1040 allocates a number of candidate codec modes to form groups with predetermined rules (which may or may not depend on cost), and the candidate selection module 1050 selects candidates from the group based on cost. Codec mode. For example, the selected candidate encoding and decoding mode is the candidate mode with the highest priority in the group.

在一些實施例中,熵解碼器990解析位元流995以獲得所選擇組的標識,以及將所選擇組的標識提供給組分配和選擇模組1040。在一些實施例中,所選擇組的標識是隱式確定的,以及未在位元流中發送。在一些實施例中,組的選擇基於計算的不同組的邊界匹配成本來確定,例如,組選擇模組1040可以選擇具有最低代表成本的組。在一些實施例中,熵解碼器990解析位元流995以獲得所選擇組內的所選擇的候選編解碼模式的標識,以及將所選擇的候選編解碼模式的標識提供至候選選擇模組1050。In some embodiments, entropy decoder 990 parses bitstream 995 to obtain an identification of the selected group and provides the identification of the selected group to group allocation and selection module 1040 . In some embodiments, the identity of the selected group is determined implicitly and is not sent in the bitstream. In some embodiments, group selection is determined based on calculated boundary matching costs for different groups, for example, the group selection module 1040 may select the group with the lowest representation cost. In some embodiments, entropy decoder 990 parses bitstream 995 to obtain an identification of the selected candidate codec mode within the selected group and provides the identification of the selected candidate codec mode to candidate selection module 1050 .

在一些實施例中,組內的候選編解碼模式根據計算的邊界匹配成本被重新排序,使得最低成本(或最高成本)候選將使用最短碼字來發送。在一些實施例中,所選擇的候選編解碼模式的標識將被隱式地確定以及不在位元流中發送,例如,藉由選擇組內具有最低邊界匹配成本的候選編解碼模式。在上面的部分Ⅱ-Ⅵ中描述了一組候選編解碼模式的選擇以及從該組中選擇一個候選編解碼模式。In some embodiments, candidate codec modes within a group are reordered according to calculated boundary matching costs such that the lowest cost (or highest cost) candidate will be sent using the shortest codeword. In some embodiments, the identity of the selected candidate codec mode will be determined implicitly and not sent in the bitstream, for example, by selecting the candidate codec mode with the lowest boundary matching cost within the group. The selection of a set of candidate codec modes and the selection of a candidate codec mode from the set are described in Sections II-VI above.

邊界預測模組1010包括用於各種不同候選編解碼模式的模組。這些候選編解碼模式可以使用存儲在重構緩衝器950中的亮度和色度樣本以及來自MV緩衝器965的運動資訊來生成邊界預測樣本1015(例如,藉由導出合併候選、導出MMVD候選、使用運動資訊獲取參考樣本、生成線性模型等)在一些實施例中,候選編解碼模式包括對應於當前塊的各種合併候選的那些候選編解碼模式。作為候選編解碼模式的各種類型的合併候選(例如,空間、時間、仿射、CIIP 等)在上面的部分II中進行了描述。作為候選編解碼模式的不同的MMVD距離和方向在上面的部分III中描述。作為候選編解碼模式不同的BCW權重在上面的部分Ⅳ中描述。作為候選編解碼模式的各種類型的線性模型(例如,LM-L、LM-T、LM-LT)在上面的部分Ⅴ中描述。Boundary prediction modules 1010 include modules for various different candidate codec modes. These candidate codec modes may use the luma and chroma samples stored in the reconstruction buffer 950 and the motion information from the MV buffer 965 to generate boundary prediction samples 1015 (e.g., by deriving merge candidates, deriving MMVD candidates, using Motion information acquisition reference samples, generation of linear models, etc.) In some embodiments, the candidate codec modes include those candidate codec modes corresponding to various merging candidates of the current block. Various types of merging candidates (e.g., spatial, temporal, affine, CIIP, etc.) that are candidate codec modes are described in Section II above. Different MMVD distances and directions as candidate codec modes are described in Section III above. The different BCW weights used as candidate codec modes are described in Section IV above. Various types of linear models (e.g., LM-L, LM-T, LM-LT) that are candidate encoding and decoding modes are described in Section V above.

第11圖概念性地示出使用邊界匹配成本來選擇候選編解碼模式以解碼當前塊的處理1100。在一些實施例中,實現解碼器900的計算設備的一個或多個處理單元(例如,處理器)藉由執行存儲在電腦可讀介質中的指令來執行處理1100。在一些實施例中,實現解碼器900的電子設備執行處理1100。Figure 11 conceptually illustrates a process 1100 of selecting candidate codec modes to decode a current block using boundary matching costs. In some embodiments, one or more processing units (eg, processors) of a computing device implementing decoder 900 perform process 1100 by executing instructions stored in a computer-readable medium. In some embodiments, an electronic device implementing decoder 900 performs process 1100 .

解碼器接收(在塊1110)像素塊的資料,該像素塊的資料將被解碼為當前圖片中的當前塊。解碼器識別(在框1120)適用於當前塊的多個候選編解碼模式。在一些實施例中,多個候選編解碼模式包括當前塊的合併候選。當前塊的合併候選可以包括(i)使用組合的幀間和幀內預測(CIIP)的合併候選和/或(ii)使用仿射變換運動補償預測的合併候選。在一些實施例中,多個候選編解碼模式包括對應於用於細化運動資訊的距離和偏移的不同MMVD組合的候選編解碼模式。在一些實施例中,多個候選編解碼模式包括對應於用於基於當前塊的亮度樣本導出當前塊的色度樣本的預測子的不同線性模型(linear model,簡稱LM)的候選編解碼模式。在一些實施例中,多個候選編解碼模式包括對應於用於組合不同方向的幀間預測的不同候選BCW權重的候選編解碼模式。The decoder receives (at block 1110) the data for the block of pixels that will be decoded into the current block in the current picture. The decoder identifies (at block 1120) a plurality of candidate codec modes applicable to the current block. In some embodiments, the plurality of candidate codec modes include merge candidates for the current block. Merging candidates for the current block may include (i) merging candidates using combined inter and intra prediction (CIIP) and/or (ii) merging candidates using affine transform motion compensated prediction. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different MMVD combinations of distance and offset used to refine the motion information. In some embodiments, the plurality of candidate encoding and decoding modes include candidate encoding and decoding modes corresponding to different linear models (LMs) for deriving predictors of chroma samples of the current block based on luma samples of the current block. In some embodiments, the plurality of candidate codec modes include candidate codec modes corresponding to different candidate BCW weights for combining inter prediction in different directions.

解碼器識別(在塊1130)作為多個候選編解碼模式的子集的第一候選編解碼模式組。第一候選編解碼模式組中的候選編解碼模式的數量少於多個候選編解碼模式中的候選編解碼模式的數量。(即,第一候選編解碼模式組是多個候選編解碼模式的子集。)The decoder identifies (at block 1130) a first set of candidate codec modes that is a subset of the plurality of candidate codec modes. The number of candidate coding and decoding modes in the first candidate coding and decoding mode group is less than the number of candidate coding and decoding modes in the plurality of candidate coding and decoding modes. (That is, the first candidate codec mode group is a subset of the plurality of candidate codec modes.)

在一些實施例中,第一候選編解碼模式組基於多個候選編解碼模式的成本識別的最高優先順序候選編解碼模式。解碼器可以根據候選編解碼模式的優先順序對識別的候選編解碼模式組中的候選編解碼模式進行索引或分配碼字給候選編解碼模式。在一些實施例中,候選編解碼模式的成本是藉由比較(i)與當前塊相鄰的重構樣本與(ii)根據候選編解碼模式生成的當前塊沿當前塊邊界的預測樣本來計算的邊界匹配成本。上面的部分Ⅰ描述根據相鄰樣本和邊界預測樣本計算邊界匹配成本。In some embodiments, the first set of candidate codec modes is based on the highest priority candidate codec mode identified by cost of the plurality of candidate codec modes. The decoder may index the candidate codec modes in the identified candidate codec mode group or assign codewords to the candidate codec modes according to the priority order of the candidate codec modes. In some embodiments, the cost of the candidate codec mode is calculated by comparing (i) reconstructed samples adjacent to the current block with (ii) predicted samples of the current block along the current block boundary generated according to the candidate codec mode. boundary matching cost. Section I above describes the calculation of boundary matching costs based on adjacent samples and boundary prediction samples.

在一些實施例中,多個候選編解碼模式中的每一個被分配給多個候選編解碼模式組中的一個。例如,在一些實施例中,多個候選編解碼模式中的每個候選編解碼模式與原始候選索引相關聯,其中每個候選編解碼模式基於原始索引模K的結果或原始索引除以K的結果被分配給K組候選編解碼模式中的一組。在一些實施例中,對應於空間合併候選的候選編解碼模式被分配給同一個候選編解碼模式組。在一些實施例中,對應於空間合併候選的候選編解碼模式被分配給不同的候選編解碼模式組。在一些實施例中,具有運動差小於閾值的合併候選的候選編解碼模式被分配給同一組。在一些實施例中,具有運動差大於閾值的合併候選的候選編解碼模式被分配給同一組。在一些實施例中,解碼器識別在多組候選編解碼模式中具有最低代表成本的一個候選編解碼模式組,並且發送索引,該索引用於從所識別的候選編解碼模式組中選擇一個候選編解碼模式。所識別組的代表成本可以是所識別組的候選編解碼模式的成本(例如,邊界匹配成本)的平均值、最大值或最小值。在一些實施例中,解碼器發送用於選擇一個候選編解碼模式組的索引,以及基於所選擇的候選編解碼模式組的成本(例如,邊界匹配成本)從所選擇的候選編解碼模式組中識別候選編解碼模式。在上面的部分II-VI中描述一組候選編解碼模式的選擇以及從該組中選擇一個候選編解碼模式。In some embodiments, each of the plurality of candidate codec modes is assigned to one of the plurality of candidate codec mode groups. For example, in some embodiments, each candidate codec mode in the plurality of candidate codec modes is associated with an original candidate index, wherein each candidate codec mode is based on the result of the original index modulo K or the original index divided by K The result is assigned to one of the K sets of candidate encoding and decoding modes. In some embodiments, candidate codec modes corresponding to spatial merging candidates are assigned to the same candidate codec mode group. In some embodiments, candidate codec modes corresponding to spatial merging candidates are assigned to different candidate codec mode groups. In some embodiments, candidate codec modes having merge candidates with motion differences less than a threshold are assigned to the same group. In some embodiments, candidate codec modes having merge candidates with motion differences greater than a threshold are assigned to the same group. In some embodiments, the decoder identifies a candidate codec mode group with the lowest representation cost among the plurality of candidate codec mode groups, and sends an index used to select a candidate from the identified candidate codec mode group Codec mode. The representative cost of the identified group may be the average, maximum, or minimum value of the costs (eg, boundary matching costs) of candidate codec modes for the identified group. In some embodiments, the decoder sends an index for selecting a candidate codec mode group, and selects from the selected candidate codec mode group based on a cost (eg, a boundary matching cost) of the selected candidate codec mode group. Identify candidate codec modes. The selection of a set of candidate codec modes and the selection of a candidate codec mode from the set are described in Sections II-VI above.

解碼器選擇(在塊1140)第一候選編解碼模式組中的候選編解碼模式。第一候選編解碼模式組中選擇的候選編解碼模式可以基於成本來選擇。The decoder selects (at block 1140) a candidate codec mode in the first set of candidate codec modes. The candidate codec mode selected in the first candidate codec mode group may be selected based on cost.

解碼器使用選擇的候選編解碼模式來解碼(在塊1150)當前塊以重構當前塊。具體地,解碼器根據選擇的候選編解碼模式構建當前塊的預測子,以及使用預測子來重構當前塊。然後,解碼器可以提供重構的當前塊以作為重構的當前圖片的一部分進行顯示。The decoder decodes (at block 1150) the current block using the selected candidate codec mode to reconstruct the current block. Specifically, the decoder constructs a predictor of the current block according to the selected candidate encoding and decoding mode, and uses the predictor to reconstruct the current block. The decoder may then provide the reconstructed current block for display as part of the reconstructed current picture.

.. 示例電子系統Example electronic system

許多上述特徵和應用被實現為軟體處理,這些軟體處理被指定為記錄在電腦可讀存儲介質(也稱為電腦可讀介質)上的一組指令。當這些指令由一個或多個計算或處理單元(例如,一個或多個處理器,處理器內核或其他處理單元)執行時,它們使處理單元執行指令中指示的動作。電腦可讀介質的示例包括但不限於唯讀光碟驅動器(compact disc read-only memory,簡稱CD-ROM),快閃記憶體驅動器,隨機存取記憶體(random-access memroy,簡稱RAM)晶片,硬碟驅動器,可擦除可程式設計唯讀記憶體(erasable programmble read-only memory,簡稱EPROM),電可擦除可程式設計唯讀記憶體 (electrically erasable proagrammble read-only memory,簡稱EEPROM)等。電腦可讀介質不包括藉由無線或有線連接傳遞的載波和電子訊號。Many of the above features and applications are implemented as software processes specified as a set of instructions recorded on a computer-readable storage medium (also referred to as a computer-readable medium). When these instructions are executed by one or more computing or processing units (e.g., one or more processors, processor cores, or other processing units), they cause the processing unit to perform the actions indicated in the instructions. Examples of computer-readable media include, but are not limited to, compact disc read-only memory (CD-ROM), flash memory drives, random-access memory (RAM) chips, Hard drive, erasable programmble read-only memory (EPROM), electrically erasable proagrammble read-only memory (EEPROM), etc. . Computer-readable media does not include carrier waves and electronic signals transmitted over wireless or wired connections.

在本說明書中,術語“軟體”意在包括駐留在唯讀記憶體中的韌體或存儲在磁記憶體中的應用程式,其可以讀入記憶體以供處理器處理。此外,在一些實施例中,多個軟體發明可以實現為更大程式的子部分,同時保留不同的軟體發明。在一些實施例中,多個軟體發明也可以實現為單獨的程式。最後,共同實現此處描述的軟體發明的單獨程式的任一組合都在本公開的範圍內。在一些實施例中,軟體程式,在被安裝以在一個或多個電子系統上運行時,定義一個或多個特定機器實施方式,該實施方式處理和執行軟體程式的操作。In this specification, the term "software" is intended to include firmware that resides in read-only memory or applications stored in magnetic memory that can be read into memory for processing by a processor. Furthermore, in some embodiments, multiple software inventions may be implemented as sub-portions of a larger program while retaining distinct software inventions. In some embodiments, multiple software inventions may also be implemented as separate programs. Finally, any combination of individual programs that together implement the software inventions described herein is within the scope of this disclosure. In some embodiments, a software program, when installed to run on one or more electronic systems, defines one or more specific machine implementations that process and perform the operations of the software program.

第12圖概念性地示出了實現本公開的一些實施例的電子系統1200。電子系統1200可以是電腦(例如,臺式電腦,個人電腦,平板電腦等),電話,PDA或任一其他類型的電子設備。這種電子系統包括各種類型的電腦可讀介質和用於各種其他類型的電腦可讀介質的介面。電子系統1200包括匯流排1205,處理單元1210,圖形處理單元(graphics-processing unit,簡稱GPU)1215,系統記憶體1220,網路1225,唯讀記憶體1230,永久存放設備1235,輸入設備1240,和輸出設備1245。Figure 12 conceptually illustrates an electronic system 1200 implementing some embodiments of the present disclosure. Electronic system 1200 may be a computer (eg, desktop computer, personal computer, tablet computer, etc.), telephone, PDA, or any other type of electronic device. Such electronic systems include various types of computer-readable media and interfaces for various other types of computer-readable media. Electronic system 1200 includes bus 1205, processing unit 1210, graphics-processing unit (GPU) 1215, system memory 1220, network 1225, read-only memory 1230, permanent storage device 1235, input device 1240, and output device 1245.

匯流排1205共同表示與電子系統1200通訊連接的眾多內部設備的所有系統,週邊設備和晶片組匯流排。例如,匯流排1205將處理單元1210與GPU 1215,唯讀記憶體1230,系統記憶體1220和永久存放設備1235通訊地連接。Bus 1205 collectively represents all of the numerous internal devices, peripherals, and chipset buses that are communicatively connected to electronic system 1200 . For example, bus 1205 communicatively connects processing unit 1210 to GPU 1215, read-only memory 1230, system memory 1220, and persistent storage 1235.

處理單元1210從這些各種記憶體單元中獲取要執行的指令和要處理的資料,以便執行本公開的處理。在不同的實施例中,處理單元可以是單個處理器或多核處理器。一些指令被傳遞到GPU 1215並由其執行。GPU 1215可以卸載各種計算或補充由處理單元1210提供的影像處理。The processing unit 1210 obtains instructions to be executed and data to be processed from these various memory units in order to perform the processes of the present disclosure. In different embodiments, the processing unit may be a single processor or a multi-core processor. Some instructions are passed to and executed by the GPU 1215. GPU 1215 may offload various computations or supplement the image processing provided by processing unit 1210.

唯讀記憶體(read-only-memory,簡稱ROM)1230存儲由處理單元1210和電子系統的其他模組使用的靜態資料和指令。另一方面,永久存放設備1235是讀寫存放設備。該設備是即使在電子系統1200關閉時也存儲指令和資料的非易失性存儲單元。本公開的一些實施例使用大容量記憶裝置(例如磁片或光碟及其對應的磁碟機)作為永久存放設備1235。Read-only memory (ROM) 1230 stores static data and instructions used by the processing unit 1210 and other modules of the electronic system. On the other hand, the permanent storage device 1235 is a read-write storage device. This device is a non-volatile storage unit that stores instructions and data even when the electronic system 1200 is turned off. Some embodiments of the present disclosure use large-capacity memory devices (such as magnetic disks or optical disks and their corresponding disk drives) as the permanent storage device 1235 .

其他實施例使用卸載式存放裝置設備(例如軟碟,快閃記憶體設備等,及其對應的磁碟機)作為永久存放裝置。與永久存放設備1235一樣,系統記憶體1220是讀寫記憶體設備。然而,與永久存放設備1235不同,系統記憶體1220是易失性(volatile)讀寫記憶體,例如隨機存取記憶體。系統記憶體1220存儲處理器在運行時使用的一些指令和資料。在一些實施例中,根據本公開的處理被存儲在系統記憶體1220,永久存放設備1235和/或唯讀記憶體1230中。例如,根據本公開的一些實施例,各種記憶體單元包括用於根據處理多媒體剪輯的指令。從這些各種記憶體單元中,處理單元1210獲取要執行的指令和要處理的資料,以便執行一些實施例的處理。Other embodiments use off-mount storage devices (such as floppy disks, flash memory devices, etc., and their corresponding disk drives) as permanent storage devices. Like persistent storage device 1235, system memory 1220 is a read-write memory device. However, unlike the permanent storage device 1235, the system memory 1220 is a volatile read-write memory, such as a random access memory. System memory 1220 stores some instructions and data used by the processor during operation. In some embodiments, processes in accordance with the present disclosure are stored in system memory 1220, persistent storage device 1235, and/or read-only memory 1230. For example, according to some embodiments of the present disclosure, various memory units include instructions for processing multimedia clips. From these various memory units, the processing unit 1210 obtains instructions to be executed and data to be processed in order to perform the processing of some embodiments.

匯流排1205還連接到輸入設備1240和輸出設備1245。輸入設備1240使使用者能夠向電子系統傳達資訊和選擇命令。輸入設備1240包括字母數位元元鍵盤和定點設備(也被稱為“遊標控制設備”),照相機(例如,網路攝像頭),麥克風或用於接收語音命令的類似設備等。輸出設備1245顯示由電子系統生成的圖像或者輸出資料。輸出設備1245包括印表機和顯示裝置,例如陰極射線管(cathode ray tubes,簡稱CRT)或液晶顯示器(liquid crystal display,簡稱LCD),以及揚聲器或類似的音訊輸出設備。一些實施例包括用作輸入和輸出設備的設備,例如觸控式螢幕。Bus 1205 also connects to input device 1240 and output device 1245 . Input device 1240 enables the user to communicate information and select commands to the electronic system. Input devices 1240 include alphanumeric keyboards and pointing devices (also known as "cursor control devices"), cameras (eg, webcams), microphones or similar devices for receiving voice commands, and the like. Output device 1245 displays images or output material generated by the electronic system. Output devices 1245 include printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD), as well as speakers or similar audio output devices. Some embodiments include devices used as input and output devices, such as touch screens.

最後,如第12圖所示,匯流排1205還藉由網路介面卡(未示出)將電子系統1200耦合到網路1225。以這種方式,電腦可以是電腦網路(例如局域網(“LAN”),廣域網路(“WAN”)或內聯網的一部分,或者是多種網路的一個網路,例如互聯網。電子系統1200的任一或所有組件可以與本公開結合使用。Finally, as shown in Figure 12, bus 1205 also couples electronic system 1200 to network 1225 via a network interface card (not shown). In this manner, the computer may be part of a computer network, such as a local area network ("LAN"), a wide area network ("WAN"), or an intranet, or a network of multiple networks, such as the Internet. Electronic system 1200 Any or all components may be used in conjunction with the present disclosure.

一些實施例包括電子組件,例如微處理器,存儲裝置和記憶體,其將電腦程式指令存儲在機器可讀或電腦可讀介質(或者被稱為電腦可讀存儲介質,機器可讀介質或機器可讀存儲介質)中。這種電腦可讀介質的一些示例包括RAM,ROM,唯讀光碟(read-only compact discs,簡稱CD-ROM),可記錄光碟(recordable compact discs,簡稱CD-R),可重寫光碟(rewritable compact discs,簡稱CD-RW),唯讀數位多功能光碟(read-only digital versatile discs)(例如, DVD-ROM, 雙層DVD-ROM),各種可燒錄/可重寫DVD (例如, DVD-RAM, DVD-RW, DVD+RW等),快閃記憶體(例如, SD卡, 迷你SD卡,微型SD卡等),磁性和/或固態硬碟驅動器,唯讀和可記錄Blu-Ray®光碟,超密度光碟,任一其他光學或磁性介質以及軟碟。電腦可讀介質可以存儲可由至少一個處理單元執行以及包括用於執行各種操作的指令集合的電腦程式。電腦程式或電腦代碼的示例包括諸如由編譯器產生的機器代碼,以及包括由電腦,電子組件或使用注釋器(interpreter)的微處理器執行的高級代碼的文檔。Some embodiments include electronic components, such as microprocessors, storage devices, and memories that store computer program instructions on a machine-readable or computer-readable medium (alternatively referred to as a computer-readable storage medium, machine-readable medium, or machine-readable medium). readable storage media). Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM), recordable compact discs (CD-R), rewritable discs compact discs (CD-RW for short), read-only digital versatile discs (e.g., DVD-ROM, double-layer DVD-ROM), various recordable/rewritable DVDs (e.g., DVD -RAM, DVD-RW, DVD+RW, etc.), flash memory (e.g., SD card, mini SD card, micro SD card, etc.), magnetic and/or solid-state hard drive, read-only and recordable Blu-Ray ® optical disc, ultra-density optical disc, any other optical or magnetic media, and floppy disks. The computer-readable medium may store a computer program that is executable by at least one processing unit and includes a set of instructions for performing various operations. Examples of computer programs or computer code include machine code such as that produced by a compiler, as well as documents that include high-level code executed by a computer, electronic component, or microprocessor using an interpreter.

雖然上述討論主要涉及執行軟體的微處理器或多核處理器,但許多上述特徵和應用由一個或多個積體電路執行,例如專用積體電路(application specific integrated circuit,簡稱ASIC)或現場可程式設計閘陣列(field programmable gate array,簡稱FPGA)。在一些實施例中,這樣的積體電路執行存儲在電路本身上的指令。此外,一些實施例執行存儲在可程式設計邏輯器件(programmable logic device,簡稱PLD),ROM或RAM器件中的軟體。While the above discussion primarily relates to microprocessors or multi-core processors executing software, many of the above features and applications are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable Design a field programmable gate array (FPGA for short). In some embodiments, such integrated circuits execute instructions stored on the circuit itself. Additionally, some embodiments execute software stored in a programmable logic device (PLD), ROM, or RAM device.

如在本說明書和本申請的任一申請專利範圍中使用的,術語“電腦”,“伺服器”,“處理器”和“記憶體”均指電子或其他技術設備。這些術語不包括人或人群。出於本說明書的目的,術語顯示或顯示是指在電子設備上顯示。如在本說明書和本申請的任何申請專利範圍中所使用的,術語“電腦可讀介質”,“電腦可讀介質”和“機器可讀介質”完全限於以電腦可讀形式存儲資訊的有形物理物件。這些術語不包括任何無線訊號,有線下載訊號和任何其他短暫訊號。As used in this specification and any claim in this application, the terms "computer", "server", "processor" and "memory" refer to electronic or other technical equipment. These terms do not include persons or groups of people. For the purposes of this specification, the term display or display refers to display on an electronic device. As used in this specification and any claims claimed in this application, the terms "computer-readable medium," "computer-readable medium" and "machine-readable medium" are exclusively limited to tangible physical media that stores information in a computer-readable form. object. These terms do not include any wireless signals, wired download signals and any other short-lived signals.

儘管已經參考許多具體細節描述了本公開,但是本領域的普通技術人員將認識到,在不脫離本公開的精神的情況下,可以以其他具體形式來實施本公開。此外,多個附圖(包括第8圖和第11圖)概念性地示出處理。這些處理的特定操作可以不會按照所示和描述的確切循序執行。具體操作可以不在一個連續的系列操作中執行,以及可以在不同的實施例中執行不同的具體操作。此外,該處理可以使用多個子處理或作為更大的宏處理的一部分來實現。因此,本領域的普通技術人員將理解本公開不受前述說明性細節的限制,而是由所附申請專利範圍限定。 補充說明 Although the present disclosure has been described with reference to numerous specific details, those skilled in the art will recognize that the disclosure may be embodied in other specific forms without departing from the spirit of the disclosure. Additionally, several figures, including Figures 8 and 11, conceptually illustrate the process. The specific operations of these processes may not be performed in the exact sequence shown and described. Specific operations may not be performed in a continuous series of operations, and different specific operations may be performed in different embodiments. Furthermore, this process can be implemented using multiple sub-processes or as part of a larger macro process. Accordingly, one of ordinary skill in the art will understand that the present disclosure is not limited by the foregoing illustrative details, but rather by the scope of the appended claims. Additional information

本文所描述的主題有時表示不同的組件,其包含在或者連接到其他不同的組件。可以理解的是,所描述的結構僅是示例,實際上可以由許多其他結構來實施,以實現相同的功能,從概念上講,任何實現相同功能的組件的排列實際上是“相關聯的”,以便實現所需功能。因此,不論結構或中間部件,為實現特定的功能而組合的任何兩個組件被視爲“相互關聯”,以實現所需的功能。同樣,任何兩個相關聯的組件被看作是相互“可操作連接”或“可操作耦接”,以實現特定功能。能相互關聯的任何兩個組件也被視爲相互“可操作地耦接”,以實現特定功能。能相互關聯的任何兩個組件也被視為相互“可操作地耦合”以實現特定功能。可操作連接的具體例子包括但不限於物理可配對和/或物理上相互作用的組件,和/或無線可交互和/或無線上相互作用的組件,和/或邏輯上相互作用和/或邏輯上可交互的組件。The subject matter described herein sometimes represents different components that are contained within or connected to other different components. It will be understood that the structures described are examples only and may in fact be implemented by many other structures to achieve the same functionality, and conceptually any arrangement of components achieving the same functionality is in fact "related" , in order to achieve the required functions. Therefore, any two components, regardless of structure or intermediate components, that are combined to achieve a specific function are considered to be "interrelated" to achieve the required function. Likewise, any two associated components are considered to be "operably connected" or "operably coupled" to each other to achieve the specified functionality. Any two components that can be associated with each other are also said to be "operably coupled" with each other to achieve the specified functionality. Any two components that can be associated with each other are also said to be "operably coupled" with each other to achieve the specified functionality. Specific examples of operably connected components include, but are not limited to, physically pairable and/or physically interacting components, and/or wirelessly interactable and/or wirelessly interacting components, and/or logically interacting and/or logically interacting components. Interactive components.

此外,關於基本上任何複數和/或單數術語的使用,本領域之通常知識者可以根據上下文和/或應用從複數變換為單數和/或從單數到複數。為清楚起見,本發明明確闡述了不同的單數/複數排列。Furthermore, with regard to the use of substantially any plural and/or singular term, one of ordinary skill in the art may convert the plural to the singular and/or from the singular to the plural depending on the context and/or application. For the sake of clarity, this disclosure expressly sets out different singular/plural arrangements.

此外,本領域之通常知識者可以理解,通常,本發明所使用的術語特別是申請專利範圍中的,如申請專利範圍的主題,通常用作“開放”術語,例如,“包括”應解釋為“包括但不限於”,“有”應理解為“至少有”“包括”應解釋為“包括但不限於”等。本領域之通常知識者可以進一步理解,若計畫介紹特定數量的申請專利範圍內容,將在申請專利範圍內明確表示,並且,在沒有這類內容時將不顯示。例如,為幫助理解,下面申請專利範圍可能包含短語“至少一個”和“一個或複數個”,以介紹申請專利範圍的內容。然而,這些短語的使用不應理解為暗示使用不定冠詞“一個”或“一種”介紹申請專利範圍內容,而限制了任何特定神專利範圍。甚至當相同的申請專利範圍包括介紹性短語“一個或複數個”或“至少有一個”,不定冠詞,例如“一個”或“一種”,則應被解釋為表示至少一個或者更多,對於用於介紹申請專利範圍的明確描述的使用而言,同樣成立。此外,即使明確引用特定數量的介紹性內容,本領域之通常知識者可以認識到,這樣的內容應被解釋為表示所引用的數量,例如,沒有其他修改的“兩個引用”,意味著至少兩個引用,或兩個或兩個以上的引用。此外,在使用類似於“A,B和C中的至少一個”的表述的情況下,通常如此表述是為了本領域之通常知識者可以理解該表述,例如,“系統包括A,B和C中的至少一個”將包括但不限於單獨具有A的系統,單獨具有B的系統,單獨具有C的系統,具有A和B的系統,具有A和C的系統,具有B和C的系統,和/或具有A,B和C的系統等。本領域之通常知識者進一步可理解,無論在説明書中,申請專利範圍中或者附圖中,由兩個或兩個以上的替代術語所表現的任何分隔的單詞和/或短語應理解為,包括這些術語中的一個,其中一個,或者這兩個術語的可能性。例如,“A或B”應理解為,“A”,或者“B”,或者“A和B”的可能性。In addition, those of ordinary skill in the art will understand that generally, terms used in the present invention, especially within the scope of the application, such as the subject matter of the scope of the application, are generally used as "open" terms, for example, "including" should be interpreted as "Including but not limited to", "have" should be understood as "at least have", "include" should be interpreted as "including but not limited to", etc. One of ordinary skill in the art will further understand that if a specific amount of claimed content is intended to be introduced, this will be explicitly stated within the claimed scope and, in the absence of such content, it will not be shown. For example, to aid understanding, the following patent claims may contain the phrases "at least one" and "one or a plurality" to introduce the content of the patent claims. However, the use of these phrases should not be construed as implying that the indefinite article "a" or "an" is used to introduce the scope of the claim and thereby limit the scope of any particular claim. Even when the same claim includes the introductory phrase "one or plural" or "at least one", the indefinite article, such as "a" or "an", shall be construed to mean at least one or more, for The same holds true for the use of an explicit description to introduce the scope of a patent claim. Furthermore, even if an introductory reference to a particular number is expressly cited, one of ordinary skill in the art would recognize that such reference should be construed to mean the number cited, e.g., "two citations" without other modifications, means at least Two citations, or two or more citations. In addition, when an expression similar to "at least one of A, B and C" is used, it is usually expressed so that a person of ordinary skill in the art can understand the expression, for example, "the system includes A, B and C" "At least one of" will include, but is not limited to, a system with A alone, a system with B alone, a system with C alone, a system with A and B, a system with A and C, a system with B and C, and/ Or a system with A, B and C etc. It will be further understood by those of ordinary skill in the art that any separated words and/or phrases represented by two or more alternative terms, whether in the specification, patent claims or drawings, should be understood as , including the possibility of one, one, or both of these terms. For example, "A or B" should be understood as the possibility of "A", or "B", or "A and B".

從前述可知,出於説明目的,本發明已描述了各種實施方案,並且在不偏離本發明的範圍和精神的情況下,可以進行各種變形。因此,此處所公開的各種實施方式不用於限制,真實的範圍和申請由申請專利範圍表示。It will be understood from the foregoing that various embodiments of the present invention have been described for purposes of illustration, and that various modifications may be made without departing from the scope and spirit of the invention. Accordingly, the various embodiments disclosed herein are not to be considered limiting, and the true scope and applicability are indicated by the claims.

510:合併候選 522:MMVD候選 524:MMVD候選 600:視訊編碼器 605:視訊源 608:減法器 610:變換模組 611:量化模組 612:量化變換係數 613:像素資料 614:逆量化模組 615:逆變換模組 616:變換係數 617:重構的像素資料 619:重構殘差 620:幀內估計模組 625:幀內預測模組 630:運動補償模組 635:運動估計模組 640:幀間預測模組 645:環路濾波器 650:重構圖片緩衝器 665:MV緩衝器 675:MV預測模組 690:熵編碼器 695:位元流 710:邊界預測模組 715:邊界預測樣本 725:相鄰樣本 730:邊界匹配成本計算器 740:組選擇模塊 750:候選選擇模塊 800:處理 810:步驟 820:步驟 830:步驟 840:步驟 850:步驟 900:視訊解碼器 910:逆變換模組 911:逆量化模組 912:量化資料 913:預測像素資料 916:變換係數 917:解碼像素資料 919:重構殘差訊號 925:幀內預測模組 930:運動補償模組 940:幀間預測模組 945:環路濾波器 950:解碼圖片緩衝器 955:顯示裝置 965:MV緩衝器 975:MV預測模組 990:解析器 895:位元流 1010:邊界預測模組 1015:邊界預測樣本 1020:相鄰獲取 1025:相鄰樣本 1030:邊界匹配成本計算器 1040:組選擇模組 1050:候選選擇模組 1100:處理 1110:步驟 1120:步驟 1130:步驟 1140:步驟 1150:步驟 1200:電子系統 1205:匯流排 1210:處理單元 1215:GPU 1220:系統記憶體 1225:網路 1230:唯讀記憶體 1235:永久存放設備 1240:輸入設備 510: Merge candidate 522:MMVD candidate 524:MMVD candidate 600:Video encoder 605:Video source 608:Subtractor 610:Transformation module 611:Quantization module 612:Quantized transform coefficient 613:Pixel data 614:Inverse quantization module 615:Inverse transformation module 616: Transformation coefficient 617:Reconstructed pixel data 619:Reconstruction residuals 620: Intra-frame estimation module 625: Intra prediction module 630: Motion compensation module 635: Motion estimation module 640: Inter-frame prediction module 645: Loop filter 650: Reconstruct image buffer 665:MV buffer 675:MV prediction module 690:Entropy encoder 695:Bit stream 710: Boundary prediction module 715: Boundary prediction sample 725: Adjacent samples 730: Boundary matching cost calculator 740:Group selection module 750: Candidate selection module 800: Processing 810: Steps 820: Steps 830: Steps 840: Steps 850: Steps 900:Video decoder 910:Inverse transformation module 911:Inverse quantization module 912:Quantitative data 913: Predict pixel data 916: Transformation coefficient 917: Decode pixel data 919:Reconstruct the residual signal 925: Intra prediction module 930: Motion compensation module 940: Inter prediction module 945: Loop filter 950: Decode picture buffer 955:Display device 965:MV buffer 975:MV prediction module 990:Parser 895:Bit stream 1010: Boundary prediction module 1015: Boundary prediction sample 1020:Adjacent acquisition 1025: Adjacent samples 1030: Boundary matching cost calculator 1040:Group selection module 1050: Candidate selection module 1100: Processing 1110: Steps 1120: Steps 1130: Steps 1140: Steps 1150: Steps 1200: Electronic systems 1205:Bus 1210: Processing unit 1215:GPU 1220:System memory 1225:Internet 1230: Read-only memory 1235:Permanent storage of equipment 1240:Input device

所包含的附圖是為了提供對本公開的進一步理解,以及併入並構成本公開的一部分。附圖圖示了本公開的實施方式,並且與描述一起用於解釋本公開的原理。值得注意的是,附圖不一定是按比例繪製,因為為了清楚地說明本公開的概念,一些組件可能被示出為與實際實施中的尺寸不成比例。 第1圖示出用於邊界匹配的當前塊的重構相鄰樣本和預測樣本。 第2圖示出空間合併候選的位置。 第3圖示出時間合併候選的運動向量縮放。 第4圖示出當前塊的時間合併候選的候選位置。 第5圖從概念上說明具有運動向量差的合併模式(Merge Mode with Motion Vector Difference,簡稱MMVD)候選及其相應的偏移量。 第6圖示出示例視訊編碼器,該視訊編碼器可實施基於邊界匹配成本的候選編解碼模式選擇。 第7圖示出視訊編碼器的部分,該視訊編碼器基於邊界匹配成本實施候選編解碼模式選擇。 第8圖概念性地示出使用邊界匹配成本來選擇候選編解碼模式以對當前塊進行編碼的處理。 第9圖示出示例視訊解碼器,該視訊解碼器可實施基於邊界匹配成本的候選編解碼模式選擇。 第10圖示出視訊解碼器的部分,該視訊解碼器可實施基於邊界匹配成本的候選編解碼模式選擇。 第11圖概念性地示出使用邊界匹配成本來選擇候選編解碼模式以對當前塊進行解碼的處理。 第12圖概念性地示出實現本公開的一些實施例的電子系統。 The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this disclosure. The drawings illustrate embodiments of the disclosure and, together with the description, serve to explain the principles of the disclosure. Notably, the drawings are not necessarily to scale, as some components may be shown to be disproportionate to the size of an actual implementation in order to clearly illustrate the concepts of the present disclosure. Figure 1 shows reconstructed neighbor samples and predicted samples of the current block for boundary matching. Figure 2 shows the locations of spatial merging candidates. Figure 3 shows motion vector scaling of temporal merging candidates. Figure 4 shows the candidate positions of the temporal merging candidates of the current block. Figure 5 conceptually illustrates Merge Mode with Motion Vector Difference (MMVD) candidates and their corresponding offsets. Figure 6 illustrates an example video encoder that can implement candidate codec mode selection based on boundary matching cost. Figure 7 shows a portion of a video encoder that implements candidate codec mode selection based on boundary matching costs. Figure 8 conceptually illustrates the process of using boundary matching costs to select candidate codec modes to encode the current block. Figure 9 illustrates an example video decoder that can implement candidate codec mode selection based on boundary matching cost. Figure 10 shows a portion of a video decoder that implements boundary matching cost based candidate codec mode selection. Figure 11 conceptually illustrates the process of using boundary matching costs to select candidate codec modes to decode the current block. Figure 12 conceptually illustrates an electronic system implementing some embodiments of the present disclosure.

1100:處理 1100: Processing

1110:步驟 1110: Steps

1120:步驟 1120: Steps

1130:步驟 1130: Steps

1140:步驟 1140: Steps

1150:步驟 1150: Steps

Claims (21)

一種視訊編解碼方法,包括: 接收一像素塊的資料,該像素塊的資料將被編碼或解碼為一視訊的一當前圖片的一當前塊; 識別適用於該當前塊的多個候選編解碼模式; 識別一第一候選編解碼模式組,該第一候選編解碼模式組為該等候選編解碼模式的一子集,其中該第一候選編解碼模式組的一候選編解碼模式數量少於該等候選編解碼模式的一候選編解碼模式數量; 從該第一候選編解碼模式組中選擇一候選編解碼模式;以及 使用選擇的該候選編解碼模式對該當前塊進行編碼或解碼。 A video encoding and decoding method, including: Receive data for a block of pixels that will be encoded or decoded into a current block of a current picture of a video; Identify multiple candidate codec modes applicable to the current block; Identify a first candidate coding and decoding mode group, the first candidate coding and decoding mode group is a subset of the candidate coding and decoding modes, wherein the number of candidate coding and decoding modes in the first candidate coding and decoding mode group is less than the number of candidate coding and decoding modes The number of candidate coding and decoding modes of the candidate coding and decoding modes; Select a candidate codec mode from the first candidate codec mode group; and The current block is encoded or decoded using the selected candidate encoding and decoding mode. 如請求項1所述之視訊編解碼方法,其中,在該第一候選編解碼模式中選擇的該候選編解碼模式基於成本來選擇。The video coding and decoding method of claim 1, wherein the candidate coding and decoding mode selected in the first candidate coding and decoding mode is selected based on cost. 如請求項1所述之視訊編解碼方法,其中,該第一候選編解碼模式組是基於成本來識別的最高優先順序候選編解碼模式。The video encoding and decoding method of claim 1, wherein the first candidate encoding and decoding mode group is the highest priority candidate encoding and decoding mode identified based on cost. 如請求項3所述之視訊編解碼方法,還包括根據候選編解碼模式的優先順序對所識別的該候選編解碼模式組中的多個候選編解碼模式進行索引。The video encoding and decoding method as described in claim 3 further includes indexing a plurality of candidate encoding and decoding modes in the identified candidate encoding and decoding mode group according to the priority of the candidate encoding and decoding modes. 如請求項3所述之視訊編解碼方法,還包括根據候選編解碼模式的優先順序向所識別的該候選編解碼模式組中的多個候選編解碼模式分配多個碼字。The video encoding and decoding method as described in claim 3 further includes allocating a plurality of codewords to the plurality of candidate encoding and decoding modes in the identified candidate encoding and decoding mode group according to the priority order of the candidate encoding and decoding modes. 如請求項3所述之視訊編解碼方法,其中,一候選編解碼模式的成本是藉由比較(i)與該當前塊相鄰的多個重構樣本與(ii)該當前塊沿該當前塊邊界的多個預測樣本來計算,其中該等預測樣本根據該候選編解碼模式生成。The video coding and decoding method of claim 3, wherein the cost of a candidate coding mode is calculated by comparing (i) a plurality of reconstructed samples adjacent to the current block and (ii) the current block along the current block. A plurality of prediction samples at block boundaries are calculated, wherein the prediction samples are generated according to the candidate encoding and decoding mode. 如請求項1所述之視訊編解碼方法,其中,該等候選編解碼模式中的每個候選編解碼模式被分配給多個候選編解碼模式組中的一候選編解碼模式組。The video encoding and decoding method of claim 1, wherein each of the candidate encoding and decoding modes is assigned to a candidate encoding and decoding mode group among a plurality of candidate encoding and decoding mode groups. 如請求項7所述之視訊編解碼方法,其中,該等候選編解碼模式中的每個候選編解碼模式與一原始候選索引相關聯,其中每個候選編解碼模式基於一原始索引模K的結果或一原始索引除以K的結果被分配給K個候選編解碼模式組中的一候選編解碼模式組。The video encoding and decoding method of claim 7, wherein each of the candidate encoding and decoding modes is associated with an original candidate index, wherein each candidate encoding and decoding mode is based on an original index modulo K. The result or the result of dividing an original index by K is assigned to a candidate codec mode group among the K candidate codec mode groups. 如申請求項7所述之視訊編解碼方法,其中,對應於多個空間合併候選的該等候選編解碼模式被分配給同一候選編解碼模式組。The video encoding and decoding method as described in claim 7 of the application, wherein the candidate encoding and decoding modes corresponding to the plurality of spatial merging candidates are assigned to the same candidate encoding and decoding mode group. 如請求項7所述之視訊編解碼方法,其中,對應於多個空間合併候選的該等候選編解碼模式被分配給不同的候選編解碼模式組。The video encoding and decoding method of claim 7, wherein the candidate encoding and decoding modes corresponding to the plurality of spatial merging candidates are assigned to different candidate encoding and decoding mode groups. 如請求項7所述之視訊編解碼方法,其中,運動差小於閾值的多個合併候選的該等候選編解碼模式被分配到同一候選編解碼模式組。The video encoding and decoding method of claim 7, wherein the candidate encoding and decoding modes of multiple merging candidates whose motion differences are less than a threshold are assigned to the same candidate encoding and decoding mode group. 如請求項7所述之視訊編解碼方法,其中,運動差大於閾值的多個合併候選的該等候選編解碼模式被分配到同一候選編解碼模式組。The video encoding and decoding method of claim 7, wherein the candidate encoding and decoding modes of multiple merge candidates whose motion difference is greater than the threshold are assigned to the same candidate encoding and decoding mode group. 如請求項7所述之視訊編解碼方法,其中,還包括: 在該等候選編解碼模式組中識別具有最低代表成本的一候選編解碼模式組;以及 發送或接收一索引,該索引用於從識別的該候選編解碼模式組中選擇一候選編解碼模式。 The video encoding and decoding method as described in request item 7, which also includes: identifying a candidate codec mode group with the lowest representation cost among the candidate codec mode groups; and Send or receive an index, which is used to select a candidate codec mode from the identified candidate codec mode group. 如請求項13所述之視訊編解碼方法,其中,所識別的候選編解碼模式組的代表成本是所識別候選編解碼模式組的該等候選編解碼模式的成本的平均值、最大值或最小值。The video encoding and decoding method of claim 13, wherein the representative cost of the identified candidate encoding and decoding mode group is the average, maximum or minimum cost of the candidate encoding and decoding modes of the identified candidate encoding and decoding mode group. value. 如請求項7所述之視訊編解碼方法,其中,還包括: 發送或接收一索引,該索引用於選擇一候選編解碼模式組;以及 基於所選擇的該候選編解碼模式的成本從所選擇的候選編解碼模式組中識別一候選編解碼模式。 The video encoding and decoding method as described in request item 7, which also includes: Send or receive an index used to select a candidate codec mode group; and A candidate codec mode is identified from the selected candidate codec mode group based on the cost of the selected candidate codec mode. 如請求項1所述之視訊編解碼方法,其中,該等候選編解碼模式包括該當前塊的多個合併候選。The video encoding and decoding method of claim 1, wherein the candidate encoding and decoding modes include multiple merging candidates of the current block. 如請求項16所述之視訊編解碼方法,其中,該當前塊的該等合併候選包括: (i) 使用組合幀間和幀內預測的多個合併候選;或者 (ii) 使用仿射變換運動補償預測的多個合併候選。 The video encoding and decoding method as described in claim 16, wherein the merging candidates of the current block include: (i) Use multiple merge candidates combining inter- and intra-prediction; or (ii) Multiple merging candidates predicted using affine transform motion compensation. 如請求項1所述之視訊編解碼方法,該等候選編解碼模式包括對應於多個不同組合的多個候選編解碼模式,該等不同組合用於細化運動資訊的距離和偏移。In the video encoding and decoding method of claim 1, the candidate encoding and decoding modes include a plurality of candidate encoding and decoding modes corresponding to a plurality of different combinations, and the different combinations are used to refine the distance and offset of the motion information. 如請求項1所述之視訊編解碼方法,該等候選編解碼模式包括對應於不同候選權重的多個候選編解碼模式,該等不同候選權重用於組合不同方向的幀間預測。As for the video encoding and decoding method described in claim 1, the candidate encoding and decoding modes include a plurality of candidate encoding and decoding modes corresponding to different candidate weights, and the different candidate weights are used to combine inter predictions in different directions. 如請求項1所述之視訊編解碼方法,該等候選編解碼模式包括對應於多個不同模型的多個候選編解碼模式,該等不同模型用於基於該當前塊的多個亮度樣本導出該當前塊的多個色度樣本的多個預測子。For the video encoding and decoding method described in claim 1, the candidate encoding and decoding modes include a plurality of candidate encoding and decoding modes corresponding to a plurality of different models, and the different models are used to derive the current block based on a plurality of luminance samples of the current block. Multiple predictors for multiple chroma samples of the current block. 一種電子裝置,包括: 一種視訊編解碼電路,被配置為執行多個操作,包括: 接收一像素塊的資料,該像素塊的資料待編碼或解碼為一視訊的一當前圖片的一當前塊; 識別適用於該當前塊的多個候選編解碼模式; 識別一第一候選編解碼模式組,該第一候選編解碼模式組為該等候選編解碼模式的一子集,其中該第一候選編解碼模式組的一候選編解碼模式數量少於該等候選編解碼模式的一候選編解碼模式數量; 從該第一候選編解碼模式組中選擇一候選編解碼模式;以及 使用選擇的該候選編解碼模式對該當前塊進行編碼或解碼。 An electronic device including: A video codec circuit configured to perform multiple operations, including: receiving data for a block of pixels to be encoded or decoded into a current block of a current picture of a video; Identify multiple candidate codec modes applicable to the current block; Identify a first candidate coding and decoding mode group, the first candidate coding and decoding mode group is a subset of the candidate coding and decoding modes, wherein the number of candidate coding and decoding modes in the first candidate coding and decoding mode group is less than the number of candidate coding and decoding modes The number of candidate coding and decoding modes of the candidate coding and decoding modes; Select a candidate codec mode from the first candidate codec mode group; and The current block is encoded or decoded using the selected candidate encoding and decoding mode.
TW112100602A 2022-01-07 2023-01-06 Video coding method and apparatus thereof TW202337207A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US202263297252P 2022-01-07 2022-01-07
US63/297,252 2022-01-07
PCT/CN2023/071007 WO2023131298A1 (en) 2022-01-07 2023-01-06 Boundary matching for video coding
WOPCT/CN2023/071007 2023-01-06

Publications (1)

Publication Number Publication Date
TW202337207A true TW202337207A (en) 2023-09-16

Family

ID=87073303

Family Applications (1)

Application Number Title Priority Date Filing Date
TW112100602A TW202337207A (en) 2022-01-07 2023-01-06 Video coding method and apparatus thereof

Country Status (2)

Country Link
TW (1) TW202337207A (en)
WO (1) WO2023131298A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685474B (en) * 2011-03-10 2014-11-05 华为技术有限公司 Encoding and decoding method of prediction modes, encoding and decoding device and network system
WO2014005924A1 (en) * 2012-07-05 2014-01-09 Thomson Licensing Video coding and decoding method with adaptation of coding modes
CN103581682B (en) * 2013-08-14 2017-08-01 北京交通大学 A kind of fast mode decision algorithm of HEVC intraframe codings and its application
US10142626B2 (en) * 2014-10-31 2018-11-27 Ecole De Technologie Superieure Method and system for fast mode decision for high efficiency video coding
US10848765B2 (en) * 2018-12-11 2020-11-24 Google Llc Rate/distortion/RDcost modeling with machine learning
CN111885382B (en) * 2020-06-23 2023-04-18 北京工业职业技术学院 Intra-frame chroma prediction mode fast selection

Also Published As

Publication number Publication date
WO2023131298A1 (en) 2023-07-13

Similar Documents

Publication Publication Date Title
TWI735172B (en) Mutual excluding settings for multiple tools
US11310526B2 (en) Hardware friendly constrained motion vector refinement
CN112400319B (en) Video encoding/decoding method and device
US11297348B2 (en) Implicit transform settings for coding a block of pixels
US11589049B2 (en) Method and apparatus of syntax interleaving for separate coding tree in video coding
US11924413B2 (en) Intra prediction for multi-hypothesis
US20210051345A1 (en) Signaling for illumination compensation
US11245922B2 (en) Shared candidate list
US11240524B2 (en) Selective switch for parallel processing
TWI802271B (en) Triangle prediction with applied-block settings and motion storage settings
TWI737142B (en) Method and apparatus of combined inter and intra prediction for video coding
WO2019161798A1 (en) Intelligent mode assignment in video coding
TW202337207A (en) Video coding method and apparatus thereof
WO2024027700A1 (en) Joint indexing of geometric partitioning mode in video coding
WO2023198187A1 (en) Template-based intra mode derivation and prediction
WO2023174426A1 (en) Geometric partitioning mode and merge candidate reordering
WO2023236916A1 (en) Updating motion attributes of merge candidates
WO2023208063A1 (en) Linear model derivation for cross-component prediction by multiple reference lines
WO2024007789A1 (en) Prediction generation with out-of-boundary check in video coding
WO2024017004A1 (en) Reference list reordering in video coding
TW202415066A (en) Multiple hypothesis prediction coding
TW202402054A (en) Threshold of similarity for candidate list
TW202415075A (en) Region-based implicit intra mode derivation and prediction
TW202341736A (en) Method and apparatus for video coding
CN116684577A (en) Fast affine mode decision based on motion vector difference