TW202005370A - Video coding and decoding - Google Patents

Video coding and decoding Download PDF

Info

Publication number
TW202005370A
TW202005370A TW108118389A TW108118389A TW202005370A TW 202005370 A TW202005370 A TW 202005370A TW 108118389 A TW108118389 A TW 108118389A TW 108118389 A TW108118389 A TW 108118389A TW 202005370 A TW202005370 A TW 202005370A
Authority
TW
Taiwan
Prior art keywords
image
sao
group
patent application
image part
Prior art date
Application number
TW108118389A
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 TW202005370A publication Critical patent/TW202005370A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/161Encoding, multiplexing or demultiplexing different image signal components
    • 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/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • 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/174Methods 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 slice, e.g. a line of blocks or a group of blocks
    • 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/182Methods 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 a pixel
    • 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/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • H04N19/198Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters including smoothing of a sequence of encoding parameters, e.g. by averaging, by choice of the maximum, minimum or median value
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Abstract

It is proposed a method of signalling in a bitstream, a Sample Adaptive Offset (SAO) filtering on an image, the image comprising a plurality of image parts, the image parts being grouped into a plurality of groups. The method comprises: determining whether an image part is of a predetermined group, and if the image part is of the predetermined group, then including in the bitstream a first syntax element, for signalling that SAO parameters for performing SAO filtering on the image part are inferred from SAO parameters used for filtering another image part, else not including the first syntax element.

Description

視訊編碼及解碼Video encoding and decoding

本發明關於視訊編碼及解碼。The invention relates to video encoding and decoding.

近來,聯合視訊專家小組(JVET),由MPEG及ITU-T第16研究群組的VCEG所組成的協作團隊,開始研究一種稱為通用視訊編碼(Versatile Video Coding, VVC)的新視訊編碼標準。VVC的目標是提供較現有的HEVC標準更顯著提高的壓縮效能(即,通常是之前的兩倍),並且將在2020年完成。主要的目標應用和服務包括,但不限於,360度和高動態範圍(high-dynamic-range, HDR)視訊。整體來說,JVET使用由獨立測試實驗室進行的正式的主觀測試來評估來自32個組織的回應。某些提案展示了相較於使用HEVC通常為40%或更高的壓縮效率增益。對超高畫質(ultra-high definition, UHD)視訊測試材料顯示出特別有效。因此,我們可預期最終標準的壓縮效率增益將遠遠超出目標50%。 JVET探索模型(JEM)使用所有的HEVC工具。這些工具之一是取樣自適應偏移(sample adaptive offset, SAO)濾波。然而,比起在HEVC參考軟體中,在JEM參考軟體中SAO效率較低。這起因於相較於其他迴圈濾波器較少的評估以及信號發送低效率。 US 9769450揭示了一種SAO濾波器,用於諸如由HEVC標準所實現的三維或3D視訊編碼(3D Video Coding)或3DVC。該濾波器直接重複使用獨立視圖或經編碼的相依視圖的SAO濾波器參數來編碼另一相依視圖,或者僅重複使用獨立視圖或經編碼的相依視圖的SAO濾波器參數的一部分來編碼另一相依視圖。透過從獨立視圖或經編碼的相依視圖複製SAO參數來重複使用SAO參數。 US 2014/0192860 Al是關於HEVC的可適性擴展。HEVC可適性擴展旨在允許編碼/解碼由多個可適性層組成的視訊,每一層是由一系列的幀所組成。透過從實際在下(例如,基礎)層使用的SAO參數推測、或推導出將在上層(例如,增強層)使用的SAO參數來提高編碼效率。這是因為推測某些SAO參數能夠避免傳輸該些參數。 US 2013/0051455 A1描述了一些SAO參數的合併過程。將編碼樹單元的SAO參數分組,以減少編碼器延遲。提出了提供SAO參數給區域(例如一行),該區域能夠使過濾區域的SAO參數的確定被平行執行。 HEVC標準提出了發訊是否從上面的編碼樹單元推導得到SAO參數集(sao_merge_up_flag、sao_merge_left_flag)。 期望提高受到SAO濾波的影像的編碼效率。Recently, the Joint Video Experts Group (JVET), a collaborative team of MPEG and VCEG from the ITU-T Study Group 16 began to study a new video coding standard called Versatile Video Coding (VVC). The goal of VVC is to provide significantly higher compression performance than the existing HEVC standard (ie, generally double the previous), and it will be completed in 2020. The main target applications and services include, but are not limited to, 360-degree and high-dynamic-range (HDR) video. Overall, JVET uses formal subjective tests conducted by independent test laboratories to evaluate responses from 32 organizations. Some proposals show a compression efficiency gain of typically 40% or higher compared to using HEVC. It is particularly effective for ultra-high definition (UHD) video test materials. Therefore, we can expect that the compression efficiency gain of the final standard will far exceed the target by 50%. The JVET exploration model (JEM) uses all HEVC tools. One of these tools is sample adaptive offset (SAO) filtering. However, compared to the HEVC reference software, the SAO is less efficient in the JEM reference software. This is due to less evaluation and lower signal transmission efficiency than other loop filters. US 9769450 discloses an SAO filter for three-dimensional or 3D video coding (3D Video Coding) or 3DVC, such as implemented by the HEVC standard. The filter directly reuses the SAO filter parameters of the independent view or the encoded dependent view to encode another dependent view, or only reuses a portion of the SAO filter parameters of the independent view or the encoded dependent view to encode another dependent view. Reuse SAO parameters by copying them from independent views or coded dependent views. US 2014/0192860 Al is about adaptability expansion of HEVC. The HEVC adaptability extension aims to allow encoding/decoding of video composed of multiple adaptability layers, each of which is composed of a series of frames. The coding efficiency is improved by inferring from the SAO parameters actually used in the lower (eg, base) layer, or deriving the SAO parameters that will be used in the upper layer (eg, enhancement layer). This is because it is speculated that certain SAO parameters can avoid transmitting these parameters. US 2013/0051455 A1 describes the merge process of some SAO parameters. Group SAO parameters of coding tree units to reduce encoder delay. It is proposed to provide SAO parameters to an area (for example, one line), which enables the determination of SAO parameters of the filtering area to be performed in parallel. The HEVC standard proposes whether the SAO parameter set (sao_merge_up_flag, sao_merge_left_flag) is derived from the above coding tree unit for transmission. It is expected to improve the coding efficiency of the video subjected to SAO filtering.

下面描述本發明的不同態樣。 在第一態樣中,還提出了一種用於發訊取樣自適應偏移(Sample Adaptive Offset , SAO)濾波的方法和相應的裝置。第一態樣還關於一種用於執行取樣自適應偏移(SAO)濾波的方法和相應的裝置。 第一態樣還描述了相應的編碼和解碼方法以及相關聯的裝置。 在第二態樣中,提出了一種用於編碼包括複數個影像部分之影像的方法和相應的裝置,一個或多個影像部分是根據第一或第二預測模式從一或多個其他影像部分預測的。 依據本發明的第三態樣,提供了一種在位元流中發訊用來對影像執行取樣自適應偏移(SAO)濾波的SAO濾波參數的方法,該影像包括複數個影像部分,可以使用兩個或更多個不同的可用分組將該些影像部分分組成多組影像部分,該方法包括:確定哪一個所述可用分組要被施用到要過濾的影像部分;若確定的分組是不同的可用分組中的預定可用分組,則在該位元流中包括推斷允許(inferring-permitted)語法元素,其指示允許從用於過濾另一影像部分的SAO參數推斷用於對要過濾的影像部分執行SAO濾波的SAO參數;並且若確定的分組是不同的可用分組中的另一分組,則不在該位元流中包括該語法元素。The different aspects of the invention are described below. In the first aspect, a method and corresponding device for Sampling Adaptive Offset (SAO) filtering is also proposed. The first aspect also relates to a method and corresponding apparatus for performing sample adaptive offset (SAO) filtering. The first aspect also describes the corresponding encoding and decoding methods and associated devices. In the second aspect, a method and corresponding device for encoding an image including a plurality of image parts are proposed. One or more image parts are derived from one or more other image parts according to the first or second prediction mode predicted. According to a third aspect of the present invention, there is provided a method for signaling SAO filtering parameters used to perform sample adaptive offset (SAO) filtering on an image in a bitstream. The image includes a plurality of image parts, which can be used Two or more different available groups group the image parts into multiple image parts. The method includes: determining which of the available groups is to be applied to the image part to be filtered; if the determined group is different The predetermined available group in the available group includes an inferring-permitted syntax element in the bitstream, which indicates that it is allowed to infer from the SAO parameter used to filter another image part for execution on the image part to be filtered SAO filtered SAO parameters; and if the determined packet is another packet among different available packets, the syntax element is not included in the bit stream.

圖1是關於高效率視訊編碼(High Efficiency Video Coding, HEVC)視訊標準中使用的編碼結構。視訊序列1是由一連串的數位影像i組成。每個這樣的數位影像由一或多個矩陣表示。矩陣係數表示像素。 序列的影像2可被分成多個切片3。切片可在某些情況下構成整個影像。這些切片被分成不重疊的多個編碼樹單元(Coding Tree Unit, CTU) 4。編碼樹單元(CTU)是高效率視訊編碼(HEVC)視訊標準的基本處理單元,並且概念上,在結構上對應於在數個先前的視訊標準中使用的大區塊(macroblock)單元。CTU有時也被稱為最大編碼單元(Largest Coding Unit, LCU)。 CTU的尺寸通常為64×64個像素。可使用四元樹分解將每個CTU迭代地分成更小的可變尺寸編碼單元(Coding Unit, CU) 5。 編碼單元是基本的編碼元素,並且由稱為預測單元(Prediction Unit, PU)和轉換單元(Transform Unit, TU)的兩種子單元構成。PU或TU的最大尺寸等於CU的尺寸。預測單元對應於用於預測像素值的CU的分割。如6所示,CU分成PU的各種不同的分割是可能的,包括分成4個方形PU的分割以及分成2個矩形PU的兩種不同的分割。轉換單元是使用DCT進行空間轉換的基本單元。可基於四元樹表示7將CU分割成多個TU。 每個切片被嵌入一個網路抽象層(Network Abstraction Layer, NAL)單元中。此外,將視訊序列的編碼參數儲存在稱為參數集的專用NAL單元中。在HEVC和H.264/AVC中,採用兩種參數集NAL單元:第一、序列參數集(Sequence Parameter Set, SPS) NAL單元,其收集在整個視訊序列期間未改變的所有參數。通常,其處理編碼組態(coding profile)、視訊幀的尺寸和其他的參數。第二、圖像參數集(Picture Parameter Set, PPS) NAL單元包括可能在序列中各影像(或幀)中不同的參數。HEVC還包括視訊參數集(Video Parameter Set, VPS) NAL單元,其包含描述位元流之整體結構的參數。VPS是HEVC中定義的一種新型參數集,適用於位元流的所有層。一層可包含多個時間子層,並且所有的版本1位元流都限於單層。HEVC具有某些針對可調性和多視圖的分層擴充,並且這些擴充將支持多層,具有向後兼容版本1基礎層。 圖2示出了可於其中實現本發明之一或多個實施例的資料通訊系統。資料通訊系統包含發送裝置,在此情況中該發送裝置是伺服器201,其可被操作以經由資料通訊網路200將資料流的資料封包傳輸到接收裝置,在此情況中該接收裝置是客戶終端202。資料通訊網路200可以是廣域網路(WAN)或區域網路(LAN)。此種網路可以是例如無線網路(Wifi/802.11a或b或g)、乙太網路、網際網路或由數種不同網路組成的混合型網路。在本發明的特定實施例中,資料通訊系統可以是數位電視廣播系統,其中伺服器201將相同的資料內容傳送到多個客戶端。 由伺服器201提供的資料流204可以由表示視訊和音訊資料的多媒體資料組成。在本發明的一些實施例中,伺服器201可分別使用麥克風和相機來提取音訊和視訊資料流。在一些實施例中,資料流可被儲存在伺服器201上,或者由伺服器201從另一資料提供者處接收,或者在伺服器201處產生。伺服器201被設置有編碼器,用於編碼視訊和音訊流,特別是提供用於傳輸的經壓縮的位元流,該經壓縮的位元流是作為提供給編碼器之輸入的資料的更緊密的表示。 為了獲得傳輸資料品質與傳輸資料數量的更好的比例,視訊資料的壓縮可以例如依據HEVC格式或H.264/AVC格式。 客戶端202接收傳輸的位元流,並且解碼重建的位元流以在顯示裝置上重現視訊影像以及透過揚聲器重現音訊資料。 僅管在圖2的範例中考量了串流場景,但應當理解的是,在本發明的一些實施例中,編碼器和解碼器之間的資料通訊可以使用舉例來說諸如光碟的媒體儲存裝置來執行。 在本發明的一或多個實施例中,以表示補償位移的資料傳送視訊影像,以便應用於影像的重建像素,在最終影像中提供濾波後的像素。 圖3示意性地示出處理裝置300,其被配置成實現本發明的至少一個實施例。處理裝置300可以是諸如微電腦、工作站或輕便可攜式裝置的裝置。裝置300包含通訊匯流排313,其被連接至: -中央處理單元311,諸如微處理器,表示為CPU; -唯讀記憶體307,表示為ROM,用於儲存用於實現本發明的電腦程式; -隨機存取記憶體312,表示為RAM,用於儲存本發明之實施例之方法的可執行碼以及暫存器,其適於記錄實現根據本發明之實施例的編碼數位影像之序列的方法及/或解碼位元流的方法所需的變數及參數;以及 -通訊介面302,連接到通訊網路303,在通訊網路上傳輸或接收待處理的數位資料。 可選地,裝置300還可包括下面的元件: -資料儲存機構304,例如硬碟,用於儲存用於實現本發明之一或多個實施例的方法的電腦程式以及在實現本發明之一或多個實施例期間使用或產生的資料; -用於磁碟306的磁碟驅動器305,磁碟驅動器適於從磁碟306讀取資料或將資料寫入該磁碟; -螢幕309,用於透過鍵盤310或任何其他的指示機構顯示資料及/或用作使用者圖形介面。 裝置300可以連接到各種周邊設備,諸如舉例來說數位相機320或麥克風308,各周邊設備連接到輸入/輸出卡(未示出),以便將多媒體資料提供給裝置300。 通訊匯流排提供裝置300中包括的或者連接至其的各種元件之間的通訊和互動能力。匯流排的表示不是限制性的,特別是中央處理單元可操作以直接或透過裝置300的另一元件將指令傳送給裝置300的任何元件。 磁碟306可以由任何資訊媒體代替,諸如舉例來說可重寫或者不可重寫的光碟(CD-ROM),ZIP磁碟或記憶卡,一般來說,可以由資訊儲存機構代替,該資訊儲存機構可以由微電腦或微處理器讀取、集成或者不集成至裝置,可能是可移除的並且適於儲存一或多個程式,該些程式的執行使得依據本發明的編碼數位影像之序列的方法及/或解碼位元流的方法能夠實現。 可執行碼可被儲存在唯讀記憶體307中、硬碟304上或者在可移除的數位媒體上,諸如舉例來說如前所述的磁碟306。依據一種變型,可以透過通訊網路303、經由介面302接收程式的可執行碼,以便在被執行之前儲存在裝置300的一個儲存機構中,諸如硬碟304。 中央處理單元311適於控制及引導依據本發明的程式或程式之軟體碼的指令或部分的執行、儲存在前述儲存機構之一的指令。在電力開啟時,儲存在非揮發性記憶體中,例如儲存在硬碟304上或者在唯讀記憶體307中的一或多個程式被傳送到隨機存取記憶體312以及暫存器,該隨機存取記憶體隨後包含該一或多個程式的可執行碼,該暫存器用於儲存用於實現本發明所需的變數及參數。 在此實施例中,裝置是可編程裝置,其使用軟體來實現本發明。然而,可選地,本發明可以硬體實現(例如,以特定應用積體電路或ASIC的形式)。 圖4示出依據本發明之至少一個實施例的編碼器的方塊圖。編碼器由連接的模組表示,每個模組適於例如以待由裝置300之CPU 311執行的程式指令的形式,實現依據本發明之一或多個實施例的實現編碼影像序列之一影像的至少一個實施例的方法的至少一個相應步驟。 由編碼器400接收數位影像i 0至i n的原始序列401作為輸入。每個數位影像由一組稱為像素的樣本表示。 在執行編碼過程之後,由編碼器400輸出位元流410。位元流410包含複數個編碼單元或切片(slice),每個切片包含切片標頭以及切片主體,切片標頭用於發送用以編碼切片的編碼參數的編碼值,切片主體包含經編碼的視訊資料。 透過模組402將輸入數位影像i 0至i n 401分成多個像素塊。該些塊對應於影像部分,並且可具有可變尺寸(例如,4×4、8×8、16×16、32×32、64×64個像素)。為每個輸入塊選擇一編碼模式。提供兩種系列的編碼模式:基於空間預測編碼的編碼模式(幀內(Intra)預測),及基於時間預測的編碼模式(幀間(Inter)編碼、合併(Merge)、SKIP)。可能的編碼模式是經過測試的。 模組403實現幀內預測處理,其中待編碼的給定區塊是由從待編碼的該區塊的鄰近區塊的像素計算來的預測子預測的。若選擇幀內編碼,則將所選的幀內預測子的指示以及給定區塊和其預測子之間的差異編碼以提供殘差。 時間預測是由運動估計模組404及運動補償模組405實現。首先,由運動估計模組404從一組參考影像/圖像416之中選擇一參考影像,並且選擇該參考影像的一部分,也稱為參考區域或影像部分,其是最靠近待編碼之給定區塊的區域。運動補償模組405接著使用所選擇的區域來預測待編碼的區塊。由運動補償模組405計算所選擇的參考區域和給定的區塊之間的差異,亦稱為殘差區塊。由運動向量指示所選擇的參考區域。 因此,在兩種情況下(空間和時間預測),透過從原始區塊減去預測來計算殘差。 在由模組403實現的INTRA預測中,編碼預測方向。在時間預測中,編碼至少一個運動向量。 若選擇幀間預測,則編碼關於運動向量及殘差區塊的資訊。為了進一步降低位元率,假設運動是均勻的,由關於運動向量預測子的差來編碼運動向量。由運動向量預測及編碼模組417從運動向量場418獲得一組運動資訊預測子的運動向量預測子。 編碼器400還包括選擇模組406,用於透過應用編碼成本標準,諸如碼率-失真(rate-distortion)標準來選擇編碼模式。為了進一步減少冗餘,轉換模組407將轉換(諸如DCT)施加至殘差區塊,然後將獲得的經轉換的資料透過量化模組408進行量化,並且透過熵編碼模組409進行熵編碼。最後,將正被編碼的當前區塊的經編碼的殘差區塊插入位元流410中。 編碼器400還執行經編碼的影像的解碼,以便產生用於後續影像之運動估計的參考影像。這使得接收位元流的編碼器和解碼器能夠具有相同的參考幀。反向量化模組411執行經量化之資料的反向量化,接著透過逆轉換模組412進行反向轉換。幀內預測模組413使用預測資訊來決定將哪個預測子用於給定區塊,並且運動補償模組414實際上將透過模組412獲得的殘差加到從該組參考影像416獲得的參考區域。 然後由模組415施加後濾波,以過濾重建的像素的幀。在本發明的實施例中,使用SAO迴圈濾波器,其中補償偏移被添加到重建影像之重建像素的像素值。 圖5是說明依據本發明之至少一個實施例的迴圈濾波處理的步驟的流程圖。在初始的步驟51中,編碼器產生全幀的重建。接著,在步驟52中,對此第一重建施加去區塊濾波器,以便產生去區塊的重建53。去區塊濾波器的目的是為了去除殘差量化及區塊運動補償或區塊幀內預測所產生的區塊偽像。在低位元率時這些偽像視覺上是重要的。去區塊濾波器操作以依據兩個相鄰區塊的特性來平滑區塊界線。考慮每個區塊的編碼模式、用於殘差編碼的量化參數、及界線的相鄰像素差。對所有的幀施用相同的標準/分類,並且不傳送額外的資料。去區塊濾波器透過移除區塊偽像來改善當前幀的視覺品質,並且還改善了用於後續幀的運動估計和運動補償。事實上,區塊偽像的高頻被去除了,因此這些高頻不需要以後續幀的紋理殘差來補償。 在去區塊濾波器之後,在步驟54中使用依據本發明之實施例所確定的SAO參數58,透過取樣自適應偏移(SAO)迴圈濾波器過濾經去區塊的重建。接著在步驟56中,可以自適應迴圈濾波器(ALF)對得到的幀55進行濾波,以產生重建的幀57,其將被顯示並用作後續幀間(Inter)幀的參考幀。 在步驟54中,將幀區域的每個像素分類成一類(class)或一組(group)。相同的偏移值被添加到屬於某類或某組的每一個像素值。 下面將參考圖10至11之任一圖更詳細地解釋取樣自適應偏移濾波之SAO參數的確定。 圖6示出依據本發明之實施例的解碼器60的方塊圖,該解碼器可被用來從編碼器接收資料。解碼器由連接的模組表示,每個模組適於例如以待由裝置300的CPU 311執行的程式指令的形式實現由解碼器60執行的方法的相應步驟。 解碼器60接收包含編碼單元的位元流61,每個編碼單元由包含編碼參數之資訊的標頭以及包含經編碼的視訊資料的主體組成。如關於圖4所解釋的,經編碼的視訊資料是經過熵編碼的,並且針對給定區塊,將運動向量預測子的索引在預定數量的位元上編碼。接收到的經編碼的視訊資料是由模組62進行熵解碼。殘差資料接著由模組63進行去量化,然後由模組64施加逆轉換以獲得像素值。 亦將指示編碼模式的模式資料熵解碼,並且基於該模式,對經編碼的影像資料之區塊執行INTRA類型解碼或INTER類型解碼。 在INTRA模式的情況下,由幀內預測模組65依據位元流中指定的幀內預測模式來確定INTRA預測子。 若模式是INTER,從位元流提取運動預測資訊,以便找到編碼器所使用的參考區域。運動預測資訊由參考幀索引及運動向量殘差組成。由運動向量解碼模組70將運動向量預測子加到運動向量殘差,以獲得運動向量。 運動向量解碼模組70對由運動預測編碼的每個當前區塊應用運動向量解碼。一旦獲得了針對當前區塊的運動向量預測子的索引,則與當前區塊相關聯的運動向量的實際值可以被解碼,並且被用來由模組66施加運動補償。從參考影像/圖像68提取由經解碼的運動向量指示的參考影像部分,以施加運動補償66。以經解碼的運動向量來更新運動向量場資料71,以便用於後續經解碼的運動向量的逆預測。 最後,獲得經解碼的區塊。由後濾波模組67施加後濾波,其類似於如參考圖4所述之應用在編碼器的後濾波模組415。最後,由解碼器60提供經解碼的視訊信號69。 SAO濾波的目的是,與不傳送資訊的去區塊濾波器相反,透過在位元流中發送額外的資料來提高重建幀的品質。如上所述,將每個像素分類到預定的類或組,並且將相同的偏移值加到相同類/組的每一個像素樣本。針對每一類,在位元流中編碼一個偏移。SAO迴圈濾波有兩種SAO類型:邊緣偏移(Edge Offset, EO)類型及帶偏移(Band Offset, BO)類型。圖7A及7B中示意性地示出邊緣偏移類型的範例,以及圖8中示意性地示出帶偏移類型的範例。 在HEVC中,逐CTU應用SAO濾波。在此情況下,在編碼器側,針對每個CTU選擇需要執行SAO濾波的參數(SAO參數集),並且在解碼器側,針對每個CTU解碼及/或推導出必要的參數。此透過同時處理每個CTU而不會在處理整個幀時引入延遲,提供了容易編碼及解碼視訊序列的可能性。此外,當啟用SAO濾波時,僅使用一種SAO類型:依據針對每個分類在位元流中傳送的相關參數,使用邊緣偏移類型濾波器或者帶偏移類型濾波器。在HEVC中,SAO參數之其中一個是SAO類型參數sao_type_idx ,其指示對CTU而言,是否為有關的CTU選擇EO類型、BO類型或無SAO濾波。 例如,針對給定的CTU,可以從上面或左邊的CTU複製SAO參數,而不是傳送所有的SAO資料。HEVC中的SAO參數的其中一個是sao_merge_up 旗標,當設定該旗標時,指示目標CTU的SAO參數應複製自上面的CTU。HEVC中的SAO參數的其中另一個是sao_merge_left 旗標,當設置該旗標時,指示目標CTU的SAO參數應複製自左邊的CTU。 針對幀的不同顏色分量(例如,YUV)可獨立地施用SAO濾波。舉例來說,可以為亮度分量Y提供一組SAO參數,並且可為兩個色度分量U及V共同提供另一組SAO參數。並且,在該組SAO參數內,一或多個SAO參數可被用作針對兩個或多個顏色分量的共同濾波參數,而其他的SAO參數是針對顏色分量的專用(每個分量)濾波參數。舉例來說,在HEVC中,SAO類型參數sao_type_idx 對於U和V是共同的,並且指示用於EO濾波的一類(class)的EO類參數也是(見下面),而指示用於BO濾波的一組類的BO類參數具有針對U和V的專用(每個分量)SAO參數。 現在參考圖7A及7B提供HEVC中邊緣偏移類型的描述。 邊緣偏移類型涉及透過將像素的像素值與兩個相鄰像素的值進行比較來確定每個像素的邊緣索引。此外,這兩個相鄰像素取決於指示這兩個相鄰像素相對於當前像素的方向的參數。這些方向是0度(水平方向)、45度(對角線方向)、90度(垂直方向)及135度(第二對角線方向)。圖7A中示意性地示出這四個方向。 圖7B的表格給出了在解碼器側,根據兩個相鄰像素Cn1和Cn2的值要施用於特定像素“C”的像素值的偏移值。 當C的值小於相鄰像素Cn1和Cn2的兩個值時,要被加到像素C之像素值的偏移值是“+O1”。當C的像素值小於其相鄰像素的其中一個像素值(Cn1或Cn2)並且C等於其相鄰者的一個值時,要被加到此像素樣本值的偏移是“+O2”。 當C的像素值大於其相鄰者之其中一個像素值(Cn1或Cn2)並且C的像素值等於其相鄰者的一個值時,要被加到此像素樣本的偏移是“-O3”。當C的值大於Cn1或Cn2的兩個值時,要被加到此像素樣本的偏移是“-O4”。 當當前樣本及其相鄰者沒有滿足上述任何條件時,沒有偏移值被加到當前像素C,如表格中邊緣索引值“2”所述。 值得注意的是,對於邊緣偏移類型的特定情況,每個偏移(O1、O2、O3、O4)的絕對值被編碼在位元流中。待被施用於每個偏移的符號(sign)取決於當前像素所屬的邊緣索引(或HEVC規範中的邊緣索引(Edge Index))。依據圖7B中表示的表格,針對邊緣索引0和針對邊緣索引1(O1、O2),施用正偏移。針對邊緣索引3和邊緣索引4(O3、O4),將負偏移施用於當前像素。 在HEVC規範中,圖7A的四個方向中,邊緣偏移的方向在位元流中由亮度分量的“sao_eo_class_luma ”欄位及兩個色度分量U和V的“sao_eo_class_chroma ”欄位指定。 對應於索引值的SAO邊緣索引透過下列公式獲得: EdgeIndex(邊緣索引)=sign (C-Cn2)-sign (Cn1-C)+2 其中,函數sign (.)的定義係由下列關係給出 sign(x)=1,當x>0 sign(x)=-1,當x<0 sign(x)=0,當x=0。 為了簡化針對每個像素的邊緣偏移確定,C的像素值及其兩個相鄰像素Cn1和Cn2之像素值的差值可以為當前像素C及其相鄰者共用。實際上,當使用當前CTU或幀的像素的循序掃描(raster scan)順序來施用SAO邊緣偏移濾波時,術語sign(Cn1-C) 已經針對先前像素被計算了(確切的說,當在某一時間的當前像素C’是現在的相鄰像素Cn1並且相鄰像素Cn2’是現在的當前像素C時,其在該時間被計算為C’-Cn2’)。因此,不需要再次計算sign(cn 1-c) 。 現在參考圖8提供帶偏移類型的描述。 SAO中的帶偏移類型亦取決於待處理的樣本的像素值。SAO帶偏移中的類(class)被定義為像素值的範圍。傳統上,對於範圍內的所有像素,將相同的偏移加到像素值。在HEVC規範中,針對像素的每個重建區塊或幀區域(CTU),帶偏移濾波器的偏移數量是四個,如圖8中示意性示出的。 SAO帶偏移的一個實現方式將整個像素值的範圍分成32個相同大小的範圍。這32個範圍是SAO帶偏移的類(class)。像素值範圍的最小值系統地為0,並且最大值取決於依據以下關係之像素值的位元深度Max=

Figure 02_image001
。將像素分類成全間隔的32個範圍包括分類像素值以快速實現所需的5位元檢驗,即,僅檢驗前5個位元(5個最高有效位元)以將像素分類到全範圍之32個類/範圍的其中一個。 舉例來說,當位元深度是每像素8位元時,像素的最大值可以是255。因此,像素值的範圍是介於0到255。對於此8位元的位元深度而言,每個類包含8個像素值。 在傳統的帶偏移類型濾波中,在位元流中發訊包含四個範圍或類(由灰色區域(40)表示)的帶的起始,以識別第一類像素的位置或像素值的第一範圍。表示此位置的語法元素是HEVC規範中的“sao_band_position ”欄位。這對應於圖8中的類41的起始。依據HEVC規範,使用4個連續類(41、42、43及44)的像素值,並且在位元流中發訊4個相應的偏移。 圖9是說明依據HEVC規範解碼SAO參數之過程的步驟的流程圖。將圖9的過程應用於每個CTU,以產生一組SAO參數用於所有元件。為了避免每個CTU編碼一組SAO參數(這是非常昂貴的),針對CTU模式使用預測方案。此預測模式涉及檢驗在當前CTU左邊的CTU是否使用相同的SAO參數(這透過名為“sao_merge_left_flag ”的旗標在位元流中指定)。若否,則針對在當前CTU上面的CTU執行第二檢驗(這透過名為“sao_merge_up_flag ”旗標在位元流中指定)。此預測技術使得表示用於CTU模式的SAO參數的資料量能夠減少。下面說明過程的步驟。 在步驟503中,從位元流502讀取“sao_merge_left_ flag ”並解碼。若其值為真,則過程前進到步驟504,該步驟中將左邊CTU的SAO參數複製用於當前CTU。這使得在步驟508中能夠確定用於當前CTU的SAO濾波器之針對YUV的類型。 若在步驟503中結果為負,則從位元流讀取“sao_ merge_up_flag ”並解碼。若其值為真,則過程前進到步驟505,該步驟中將上面CTU的SAO參數複製用於當前CTU。這使得在步驟508中能夠確定用於當前CTU的SAO濾波器的類型。 若在步驟505中結果為負,則在步驟507中從位元流讀取並解碼用於當前CTU的SAO參數,用於該類型的亮度Y分量和兩個U及V分量(501)(551)。色度的偏移是獨立的。 稍後將參考圖10描述此步驟的細節。在此步驟之後,在步驟508獲取參數並確定SAO濾波器的類型。 在隨後的步驟511中,執行檢驗以確定針對當前CTU的三個顏色分量(Y及U&V)是否已被處理。若結果為是,則用於三個分量的SAO參數的確定已經完成,並且可以在步驟510中處理下一個CTU。否則,(僅Y被處理)U和V被一起處理,並且過程從先前說明的初始步驟512重新開始。 圖10是說明在解碼器側剖析位元流601中之SAO參數之過程的步驟的流程圖。在初始步驟602中,讀取並解碼”sao_type_idx_X ”語法元素。表示此語法元素的碼字可以使用固定長度碼,或者可使用任何算術編碼的方法。語法元素sao_type_idx_X 能夠確定應用於要針對顏色分量Y或針對兩個色度分量U和V處理的幀區域的SAO的類型。舉例來說,針對YUV 4:2:0序列,考量兩個分量:一個用於Y,及一個用於U和V。“sao_type_idx_X ”可以依據位元流中編碼的SAO類型採用如下的3個值。‘0’對應於無SAO、‘1’對應於圖8中所示的帶偏移情況以及‘2’對應於圖3A及3B中所示的邊緣偏移濾波器。 在相同步驟602中,執行測試以確定“sao_type_idx_X ”是否嚴格地為正。若“sao_type_idx_X ”等於“0”,表示無SAO用於此幀區域(CTU)的Y,若X被設定等於Y;並且無SAO用於此幀區域的U和V,若X被設定等於U和V。SAO參數的確定完成,並且過程前進到步驟608。除此之外,若“sao_type_idx ”嚴格地為正,則表示在位元流中存在針對此CTU的SAO參數。 然後過程前進到步驟606,該步驟中將迴圈執行四次迭代。在步驟607中進行該四次迭代,其中從位元流讀取並解碼偏移j的絕對值。這四個偏移對應於SAO邊緣偏移(見圖7B )的四個邊緣索引的四個偏移(O1、O2、O3、O4)的絕對值,或者對應於與SAO帶偏移(見圖8 )的四個範圍相關的四個偏移的絕對值。 應注意的是,對於編碼SAO偏移,在位元流中傳送第一部分,其對應於偏移的絕對值。以一元碼來編碼此絕對值。絕對值的最大值由下面的公式給出:
Figure 02_image003
其中<<是左(位元)移位運算子。 此公式意味著對於8位元像素值位元深度,偏移的最大絕對值是7,並且對於10位元以上的像素值位元深度,偏移的最大絕對值是31。 當前解決擴增的位元深度視訊序列的HEVC標準修正案為具有12位元以上的位元深度的像素值提供了類似的公式。解碼的絕對值可以是量化值,其在解碼器處被應用於像素值以進行SAO濾波之前被去量化。在切片標頭中傳送使用或不使用此量化的指示。 對於邊緣偏移類型,僅傳送絕對值,因為可以如前所解釋般地推論出符號。 對於帶偏移類型,若偏移的絕對值不等於0,則在位元流中發訊符號作為偏移的第二部分。當使用CABAC時,略過符號的位元。 在步驟607之後,過程前進到步驟603,該步驟中執行測試以確定SAO的類型是否對應於帶偏移類型(sao_type_ idx_X ==1)。 若結果為正,在步驟609及610中解碼用於帶偏移模式的偏移的符號,除了具有零值的每個偏移之外,之後執行下面的步驟604以便讀取位元流並且解碼SAO帶的位置“sao_band_position_X ”,如圖8中所示。 若在步驟603中結果為負(“sao_type_idx_X ”被設定等於2),此表示使用邊緣偏移類型。因此,在步驟605中從位元流601提取邊緣偏移類(對應於0、45、90及135度的方向)。若X等於Y,讀取語法元素為“sao_eo_class_luma”,並且若X被設定等於U和V,讀取語法元素為“sao_eo_ class_chroma”。 當四個偏移已經被解碼時,讀取SAO參數完成,並且過程前進到步驟608。 圖11是說明依據HEVC規範如何對影像部分執行SAO濾波的流程圖,例如在圖6中步驟67的期間。在HEVC中,此影像部分是CTU。此相同的過程也應用在編碼器處的解碼迴圈中(圖4中的步驟415),以便產生用於後續幀的運動估計和補償的參考幀。此過程與針對一個顏色分量的SAO濾波相關(因此下面已省略語法元素中的後綴“_X”)。 初始步驟701包含依據圖9及10中描繪的過程,確定SAO濾波參數。由編碼器確定SAO濾波參數,並將已編碼的SAO參數包括在位元流中。因此,在步驟701中、在解碼器側,解碼器從位元流讀取並解碼參數。步驟701給出sao_type_idx ,並且若其等於1,則為sao_band_position 702,及若其等於2,則為sao_eo_class_lumasao_eo_ class_chroma (依據被處理的顏色分量)。應注意的是,若元素sao_type_idx 等於0,則不施用SAO濾波。步驟701還給出具有4個偏移的偏移表703。 在步驟704中,用於連續地考慮當前區塊或幀區域(CTU)的每個像素Pi的變數i 被設定為0。在步驟706中,從包含N個像素的幀區域705(在HEVC標準中是當前CTU)提取像素Pi 。在步驟707中依據參考圖7A及7B所描述的邊緣偏移分類,或如參考圖8所描述的帶偏移分類來分類像素Pi 。決策模組708測試Pi 是否在要使用傳統的SAO濾波來過濾的類中。 若Pi 是在已過濾的類中,識別相關的類編號j ,並且在步驟710中從偏移表703提取相關的偏移值
Figure 02_image005
。在傳統的SAO濾波的情況中,在步驟711中,此
Figure 02_image005
接著被添加到像素值Pi ,以便產生經過濾的像素值
Figure 02_image007
712。此經過濾的像素
Figure 02_image007
在步驟713中被插入經過濾的幀區域716。在本發明的實施例中,步驟710和711以不同方式執行,稍後將在那些實施例的描述中進行解釋。 若Pi 不在要進行SAO濾波的類中,則在步驟713中將Pi (709)插入經過濾的幀區域716而不進行過濾。 在步驟713之後,在步驟714中遞增變數i ,以便過濾當前幀區域705的後續像素(若有的話-測試715)。當步驟715中已處理了所有的像素(i>=N)時,經過濾的幀區域716被重建,並且可被添加到SAO重建的幀(見圖6的幀68或圖4的416)。 如上所述,用於未來VVC標準的JVET探索模型(JEM)使用所有的HEVC工具。這些工具之一是取樣自適應偏移(SAO)濾波。然而,SAO在JEM參考軟體中較在HEVC參考軟體中效率低。這是源於相較於其他的迴圈濾波器有較少的評估和低效率的發訊。 圖12是說明執行編碼器以在CTU級確定一組(幀或切片)之CTU的SAO參數的步驟的流程圖。過程從當前的CTU 1101開始。首先,將針對所有可能的SAO類型和類的統計資料累積在變數CTUStats 1102中。下面參考圖13描述步驟1102的過程。依據變數CTUStats中的數值集合,若左邊的CTU在當前的切片中,則評估SAO合併左邊的RD成本 1103,同樣的評估SAO合併上面的RD成本 1104。由於CTUStats 1102中的統計資料,針對亮度1105和針對兩個色度分量1109評估的新的SAO參數。(兩個色度量度是因為在HEVC標準中,色度分量共享相同的SAO類型)。針對每個SAO類型1006,獲取帶偏移分類的最佳RD偏移及其他參數1107。下面分別參考圖14及圖15針對邊緣及帶分類解釋步驟1107及1110。由於它們各自的SAO參數,計算所有的RD成本(1108)。對於兩個色度分量以相同的方式,選擇最佳RD偏移和參數1111。比較所有這些RD成本以選擇最佳的SAO參數集1115。亦將這些RD成本進行比較,以針對亮度和色度分量獨立地禁用SAO 1113、1114。將新的SAO參數集的使用1115與從左邊和上面的CTU“合併”或共享的SAO參數集1116進行比較。 圖13是說明在傳統SAO濾波的情況下,可被應用於邊緣偏移類型濾波器的在編碼器側計算的統計資料之範例的步驟的流程圖。類似的方案也可被用於帶偏移類型濾波器。 圖13說明變數CTUStats的設定,該變數CTUStats包含導出每個類的每個最佳碼率失真偏移所需的所有資訊。此外,其說明了針對當前CTU之最佳SAO參數集的選擇。對於每個顏色分量Y、U、V(或RGB) 811,評估每個SAO類型。針對每個SAO類型812,在初始步驟801中將變數
Figure 02_image009
Figure 02_image011
設為零。當前幀區域803包含N個像素。j 是當前範圍編號,用以確定四個偏移(與針對邊緣偏移類型之圖7B中所示的四個邊緣索引相關,或者與針對帶偏移類型之圖8中所示的32個像素值範圍相關)。
Figure 02_image013
是範圍
Figure 02_image014
中的像素與其原始像素之間的差值的和。
Figure 02_image011
是幀區域中的像素數量,其之像素值屬於範圍
Figure 02_image014
。 在步驟802中,將用於連續考慮當前幀區域的每個像素Pi的變數i 設為零。然後,在步驟804中提取幀區域803的第一像素。在步驟805中,透過檢查圖7B中定義的條件來確定當前像素的類。然後在步驟806中執行檢驗。在步驟806期間,執行檢驗以確定像素值的類是否對應於圖7B的值“以上皆非”。 若結果為是,則在步驟808中遞增值“i”,以便考慮幀區域803的下一個像素。 否則,若在步驟806中結果為否,則下一步驟為807,在該步驟中遞增相關的
Figure 02_image017
(即,在步驟805中確定的類的像素數量的總和),並且將
Figure 02_image018
及其原始值
Figure 02_image020
之間的差值加到
Figure 02_image009
。在下一步驟808中,遞增變數i ,以便考慮幀區域803的下一個像素。 然後執行測試以確定是否已考慮並分類了所有像素。若結果為否,過程循環回到上述步驟804。另一方面,若結果為是,過程前進到步驟810,在該步驟中將針對當前顏色分量X及SAO類型SAO_type及當前類
Figure 02_image014
的變數CTUStats設定成等於
Figure 02_image009
用於第一值以及
Figure 02_image017
用於第二值。可以使用這些變數來計算例如每個類j 的最佳偏移參數
Figure 02_image005
。此偏移
Figure 02_image005
可以是類j 的像素與其原始值之間的差值的平均。因此,
Figure 02_image005
由下面公式給出:
Figure 02_image026
應注意的是,偏移
Figure 02_image005
是整數值。因此,可以將本公式中定義的比例捨入至最接近的值或者使用頂函數或地板函數來進行捨入。 就失真而言,每個偏移
Figure 02_image005
是最佳偏移Ooptj。 為了評估合併SAO參數的RD成本,編碼器將使用表CTUStats中設置的統計資料。依據下面SAO Merge Left的範例以及考量Luma Left_Type_Y的類型和四個相關的偏移O_Left_0、O_Left_1、O_Left_2、O_Left_3,可以透過下面公式獲得失真:
Figure 02_image028
變數Shift專為失真調整而設計。由於SAO是後濾波,該失真應為負。 針對色度分量施用相同的計算。對三個分量而言,碼率失真成本的Lambda(λ)是固定的。針對與左CTU合併的SAO參數,碼率(rate)僅是1個旗標,其為CABAC編碼的。 為了在碼率失真標準方面找到最佳偏移,稱為ORDj的偏移,應用圖14中示出的編碼過程。此過程應用於步驟1109至1112中。 在圖14之編碼過程的初始步驟901中,將碼率失真值Jj初始化為最大可能值。然後在步驟902中,施用從Ooptj至0的Oj迴圈。注意,在迴圈的每次新迭代,以1改動Oj。若Ooptj為負,則值Oj遞增,並且若Ooptj為正,則值Oj遞減。在步驟903中依據下面公式計算與Oj相關的碼率失真成本:
Figure 02_image030
其中λ 是拉格朗日(Lagrange)參數,及R(Oj)是提供與Oj相關聯的碼字所需的位元數的函數。 公式‘SumNbPix j × Oj × Oj-Sumj × Oj × 2’給出了在透過使用偏移Oj所提供的失真方面的改進。在步驟904中,若J(Oj)低於Jj,則Jj=J(Oj)及ORDj等於Oj。在步驟905中,若Oj等於0,則迴圈結束,並且選擇類j的最佳ORDj。 圖13及14的這個演算法為每個類j提供了最佳ORDj。對圖7A的四個方向中的每個方向重複此演算法。然後,選擇提供最佳碼率失真成本的方向(每個方向的Jj之和)作為用於當前CTU的方向。 用於在邊緣偏移工具的編碼器側選擇偏移值的此演算法(圖13及14)可被輕易地應用於帶偏移濾波器以選擇最佳位置(SAO_band_position),其中j在區間[0,32]中,而非在圖13的區間[1,4]中。其涉及將模組801、810、811中的值4更改為32。更具體的,針對圖8的32個類,計算參數Sumj (j=[0,32])。這對應於針對每個範圍j的計算、當前像素值(Pi )及其原始值(Porgi )之間的差、影像中屬於單一範圍j的每個像素。然後,使用如圖14中所述的相同過程,針對32個類計算就碼率失真ORDj而言的最佳偏移。 下個步驟涉及找到圖8的SAO帶位置的最佳位置。這是透過圖15中所示的編碼過程確定的。已使用圖14的編碼過程,其具有就碼率失真而言的最佳偏移ORDj,來計算每個範圍的RD成本Jj。在圖15中,在初始步驟1001中,將碼率失真值J初始化為最大可能值。然後,在步驟1002中運行對4個連續類的28個位置j的迴圈。接著,在步驟1003中將對應於(4個連續類的)帶的RD成本的變數Jj初始化為0。然後,在步驟1004中運行對四個連續偏移j的迴圈。在步驟1005中,Ji增加四個類Jj的RD成本(j=i至i+4)。 若此成本Ji低於最佳RD成本J,則在步驟1007中將J設為Ji,及sao_band_position =i,並且下一個步驟為步驟1008。 否則,下一個步驟是步驟1008。 測試1008檢查對28個位置的迴圈是否已結束。若是否,則過程繼續步驟1002,否則編碼過程返回最佳帶位置作為sao_band_position 1009的當前值。 因此,透過圖12的過程創建在CTU級確定SAO參數的情況下的CTUStats表。這對應於依據碼率-失真折衷來評估CTU級。可以針對整個影像或僅針對當前切片執行該評估。 圖16示出在切片中,CTU之各種不同的分組1201-1206。 第一分組1201具有個別的CTU。此第一分組需要每個CTU一組SAO參數。其對應於先前所述的CTU級。 第二分組1202使整個影像的所有CTU成為一組。因此,與CTU級相反,幀的所有CTU(以及因此係整個幀或其一部分的切片)共享相同的SAO參數。 為了使影像的所有CTU共享相同的SAO參數,可以使用兩種方法中的一種。在兩種方法中,編碼器首先計算要被影像之所有CTU共享的一組SAO參數。然後,在第一種方法中,針對切片的第一個CTU設置這些SAO參數。針對切片之第二個CTU到最後一個CTU之每個剩餘的CTU,若存在旗標(亦即,若當前CTU具有左邊的CTU),則將sao_merge_left 旗標設為等於1。否則,將sao_merge_up 旗標設為等於1。圖17示出根據第一種方法之具有SAO參數組的CTU的範例。此方法具有不需要向解碼器發送分組之信令的優點。此外,不需要改變解碼器來引入分組,並且僅改變編碼器。因此,可在基於HEVC的編碼器中引入分組而無須修改HEVC解碼器。令人驚訝的是,分組不會增加太多的碼率。這是因為合併旗標通常在相同的情境中進行CABAC編碼。由於對於第二分組(整個影像),這些旗標均具有相同的值(1),因此這些旗標消耗的碼率非常低。這是因為它們總是具有相同的值且機率為1。 在使影像的所有CTU共享相同的SAO參數的第二種方法中,在位元流中將分組發訊給解碼器。例如,亦在切片標頭中,將SAO參數發訊作為針對分組(整個影像)的SAO參數。在此情況下,分組的發訊會消耗頻寬。然而,可以省去合併旗標,節省與合併旗標相關的碼率,以便整體降低碼率。 第一及第二分組1201及1202提供非常不同的碼率-失真折衷。第一分組1201位在一個極端,對SAO參數(逐CTU)進行非常精細的控制,其應會降低失真,但是以大量的信令為代價。第二分組則是位在另一個極端,對SAO參數(整個影像一組)進行非常粗略的控制,其會引起失真但具有非常輕的信令。 接著,將說明如何在編碼器中確定第二分組1202的SAO參數。在第二分組1202中,針對整個影像進行確定,並且切片/幀的所有CTU共享相同的SAO參數。 圖18是使用共享SAO參數的第一種方法(即,在編碼器側沒有新的SAO分類),針對幀/切片級設定SAO參數的範例。此圖式是基於圖17。在過程的一開始,針對每個CTU設定CTUStats表(與CTU級編碼選擇的方式相同)。此CTUStats可被用於傳統的CTU級1302。然後透過為表CTUStats的所有CTU添加每個值來設定表FrameStats 1303。接著,施用與CTU級相同的處理來尋找最佳SAO參數1305至1315。為了設定用於幀之所有CTU的SAO參數,在步驟1315所選擇的SAO參數集被設定用於切片/幀的第一個CTU。然後,針對切片/幀的第二個CTU至最後一個CTU的每個CTU,若sao_merge_left_flag存在的話將其設為等於1,否則將sao_merge_up_flag設為等於1(實際上針對第二個CTU至最後一個CTU,存在合併左或合併上或兩者都存在) 1317。SAO參數集的語法與圖9中所示的語法相同。在處理結束時,針對整體切片/幀設定SAO參數。 因此,在針對整個影像(幀級)確定SAO參數的情況下的CTUStats表是透過圖18的過程創建的。這對應於根據碼率-失真折衷評估幀級。 然後比較這些評估並且選擇具有最佳效能的一者。 圖18中確定SAO參數的範例對應於共享SAO參數的第一種方法,因為其使用合併旗標來共享影像的所有CTU之中的SAO參數(見步驟1316和1317)。若使用分享SAO參數的第二種方法,則可以省略這些步驟,如下面進一步實施例中描述的。 圖19是在編碼器側為第三分組1203設定SAO參數集的範例。此圖式是基於圖12。為了減少圖中的步驟量,已將模組1105至1115合併成圖19中的一個步驟1405。在過程的一開始,針對每個CTU設定CTUStats表。此CTUStats可以被用於傳統的CTU級1302編碼選擇。對於當前切片/幀的每一列1403,針對當前列的每個CTU 1404,透過添加來自CTUStats 1402的每個值1405來設定表ColumnStats。然後,針對CTU級1406編碼選擇(參照圖12),確定新的SAO參數。若非第一列,則亦評估與先前左邊列共享SAO參數的RD成本1407,與評估左邊和上面CTU 1103、1104之間共享SAO參數集的方式相同。若共享SAO參數給出了比新的SAO參數集之RD成本更佳的RD成本1408,則針對該列第一個CTU,設定sao_merge_left_flag等於1。此CTU的地址號等於值“Column”。否則,將該列第一個CTU的SAO參數集設為等於(1409)在步驟1406中獲得的新的SAO參數。 對於該列的所有其他CTU 1411,將它們的SAO合併左邊sao_merge_left_flag設為等於0(若其存在的話),以及將SAO合併上面sao_merge_up_flag設為等於1。然後,可以處理下一列的SAO參數集1403。請注意,除了第一行的CTU之外,幀的所有其他CTU具有sao_merge_left_flag等於0(若其存在的話),以及sao_merge_up_flag等於1。因此,步驟1412可以每幀執行一次。 此種CTU分組的優點是CTU級編碼選擇和幀級之間的另一種RD折衷,其對於某些條件可能是有用的。此外,在此範例中,在組內使用合併旗標,這意味著可以引入第三分組而不需要修改解碼器(即,該分組可以是HEVC相容的)。當然,也可以替代的使用在第三實施例中所述的共享SAO參數的第二種方法。在這種情況下,在組(CTU列)中不使用合併旗標,並且省略步驟1411及1412。 在一個變型中,不需要檢查列之間的合併。這表示從圖19的過程中移除了步驟1407、1408、1410。移除這種可能性的優點是簡化實現以及能夠平行化過程。這對編碼效率影響很小。 CTU級和幀級之間的另一種可能的中間折衷可以由圖16中的第四種分組1204提供,其使一行CTU成為一組。為了確定此第四分組的SAO參數,可以施用與圖18類似的過程。在這種情況下,變數ColumnStats由LineStats取代。步驟1403由“針對Line=0至Num_CTU_in_Height”取代。步驟1404由“針對CTU_in_line=0至Num_CTU_in_Width”取代。步驟1405由ColumnStats[][][][]+=CTUStats[Line* Num_CTU_ in_Width+CTU_in_line][][][][]取代。基於此LineStats表來評估新的SAO參數和與上面CTU的合併(步驟1406、1407)。步驟1410由針對該行第一個CTU將sao_merge_up_flag設為1來取代。並且,對於切片/幀的所有CTU(除了每行的每個第一CTU之外),將sao_merge_left_flag設為等於1。 該行的優點是CTU級和幀級之間的另一種RD折衷。請注意,幀或切片在大多數情況下是矩形,它們的寬度大於它們的高度。因此,預期行CTU分組1204是比列CTU分組1203更靠近幀CTU分組1202的RD折衷。 至於其他的CTU分組1202和1203,若在組內使用合併旗標的話,行CTU分組可以是HEVC相容的。 至於列CTU分組1203,可以移除合併2行的評估。 透過將兩列或更多列的CTU或者將兩行或更多行的CTU放在一起成為一組,可以提供其他的RD折衷。圖18的過程可以適用於確定這些組的SAO參數。 在一個實施例中,一組中的列或行的數量N可取決於目標的分組數量。 當切片或幀很大(針對HD、4K或更高)時,CTU分組使用數列或數行可能是特別有利的。 如前所述,在一個變型中,不需要評估包含兩列或更多列或者包含兩行或更多行的這些分組之間的合併。 另一種可能的分組包括拆分(split)列或拆分行,其中該拆分是適合當前切片/幀的。 CTU級和幀級之間的另一種可能的折衷可以由圖18中所示之方形CTU分組1205和1206提供。分組1205使2×2個CTU成為一組。分組1206使3×3個CTU成為一組。 圖20示出如何確定用於這種分組的SAO參數的範例。針對每個N×N組1503,基於CTUstats來設定1504、1505、1506表N×NStats 1507。除了左邊1510共享或者上面1509共享SAO參數之RD成本之外,使用此表來確定新的SAO參數1508及其RD成本。若最佳RD成本是新的SAO參數1511,則將N×N組的第一個CTU(左上CTU)的SAO參數設為等於這個新的SAO參數1514。若最佳RD成本是與上面N×N組1512共享SAO參數,則將N×N組的第一個CTU(左上CTU)的sao_merge_up_flag設為等於1以及將sao_merge_left_flag設為0 (1515)。若最佳RD成本是與左邊N×N組1513共享SAO參數,則將N×N組的第一個CTU(左上CTU)的sao_merge_left_flag設為等於1 (1516)。然後,為N×N組的其他CTU正確地設定sao_merge_left_flag及sao_merge_up_ flag,以便形成用於當前N×N組的SAO參數1517。圖21示出3×3 SAO組的設定。將左上CTU設為等於在步驟1508至1516中確定的SAO參數。對於其他2個上面的CTU,將sao_merge_left_flag設為等於1。由於sao_merge_left_flag是第一個經編碼或解碼的旗標,並且其被設為1,因此不需要將sao_merge_up_flag設為0。對於第一行中的其他2個CTU,將sao_merge_left_flag設為等於0並且將sao_merge_ up_flag設為等於1。對於其他的CTU,將sao_merge_left_ flag設為等於1。 N×N CTU分組的優點是為SAO創建數個RD折衷。至於其他的分組,若使用在該些組內的合併旗標,則這些分組可以是HEVC相容的。至於其他的分組,在圖19中可以省略組之間的合併左邊(Merge left)及合併上面(Merge up)的測試。因此,可以移除步驟1509、1510、1512、1513、1515和1516,尤其當N為高時。 在一個變型中,值N取決於幀/切片的大小。此實施例的優點是獲得有效的RD折衷。 在一較佳的變型中,僅評估N等於2和3。這提供了有效的折衷。 可能的分組彼此競爭作為要被選擇用於當前切片的SAO參數推導。下面依據本發明的第六實施例,參考圖22描述如何使用碼率-失真折衷比較來選擇SAO參數推導的範例。 圖23是說明依據在一組CTU之中共享SAO參數的第二種方法,在切片標頭中發訊CTU分組時的解碼過程的流程圖。首先,從位元流提取旗標SaoEnabledFlag 1801。若未啟用SAO,則解碼下一個切片標頭語法元素1807,並且SAO將不會被應用於當前切片。反之,解碼器從切片標頭提取N個位元1803。N取決於可用的CTU分組數量。理想地,CTU分組數量應為等於N的2次冪。使用對應的CTU分組索引1804來選擇CTU分組方法1805。將此分組方法應用於提取SAO語法以及用於為每個CTU確定SAO參數集1806。然後,解碼下一個切片標頭語法元素。 在CTU分組的切片標頭處發訊的優點是其對位元率影響很低。 但是當切片數量對於幀而言數量很大時,可能期望降低此發訊。因此,在一個變型中,CTU分組索引在切片標頭中使用一元最大碼。在此情況下,將CTU分組根據它們的發生機率排序(最高到最低)。 例如,至少一個SAO參數推導是中間級(intermediate level)推導(SAO參數不是在CTU級或在組級)。當應用於一組,其導致該組(例如,幀或切片)被細分為細分部分(subdivided parts)(CTU分組1203-1206,例如,多列的CTU、多行的CTU、N×N個CTU等),並且導出每個細分部分的SAO參數。每個細分部分由兩個或更多個所述影像部分(CTU)組成。中間級推導的優點是,引入一或多個有效的碼率-失真折衷。可以在沒有CTU級推導或沒有幀級推導或沒有這兩種推導中的任一種的情況下,使用中間級推導。 較佳的,最小的分組是第一分組1201,其中每個CTU是一組,並且每個CTU有一組SAO參數。然而,可以將一組SAO參數施用於比CTU更小的區塊。在此情況下,推導不是在CTU級、幀級或CTU和幀級之間的中間級,而是在子CTU(sub-CTU)級(比影像部分更小的級別)。 在此情況下,代替發訊分組,發訊表示SAO參數之深度的索引是有效的。 下表示出可能的索引方案的一個範例:
Figure 108118389-A0304-0001
索引0表示將每個CTU分為16個區塊並且每個區塊可具有其自己的SAO參數。索引1表示將每個CTU分為4個區塊,同樣的每個區塊具有其自己的SAO參數。 然後將選擇的推導在位元流中發訊給解碼器。該發訊可包含深度語法元素(例如,使用上面的索引方案)。 在一變型中,至少一種推導當被施用於組時,導致該組被細分成細分部分,並且推導出每個細分部分的SAO參數,以及每個影像部分是由兩個或更多個所述細分部分組成的。 在一變型中,第一種推導當被施用於組時,導致該組具有在第一級的SAO參數,以及該第二種推導被施用於組時,導致該組具有在不同於該第一級之第二級的SAO參數。該些級別可以是從幀級到子CTU級的任何兩個級別。該些級別可對應於圖12中的分組1201-1206。 較佳地,針對切片發訊SAO參數,其表示推導被用於該切片的所有CTU。 此外,當針對切片所選擇的SAO參數的級別是切片級和CTU級之間的中間級時,可以為切片或幀的每個CTU組(例如,各列CTU)選擇推導。 在圖24中,可以在CTU分組的組之間使用SAO合併旗標。如圖24中所描繪的,對於2×2 CTU分組,為每組2×2個CTU保留SAO merge LeftSAO merge up 。但對於在該組內的CTU,則將它們移除。請注意,僅將sao_merge_left_ flag 用於一列CTU的分組1203,並且僅將sao_merge_up_ flag 用於一行CTU的分組1204。 在一變型中,旗標發訊當前CTU組是否共享其SAO參數。若其為真,則發訊表示先前組之一的語法元素。因此,切片的每一組可以透過先前組來預測,除了第一組之外。此透過增加數個新的可能的預測子來提高編碼效率。 回頭參照先前的範例,已提到,當同位的CTU不使用SAO或者沒有同位的CTU使用SAO時,可以使用預設的SAO參數集。 在一變型中,預設集取決於所選的分組。例如,第一預設集可以與一個分組(或一個級別的SAO參數)相關聯,並且第二預設集可以與另一分組(或另一級別的SAO參數)相關聯。發現組的大小(或SAO參數的級別)對 SAO參數有效地作為預設集有影響。不同的預設集可由編碼器決定,並且在序列參數集中被傳輸到解碼器。然後,解碼器依據為當前切片所選的分組,使用適當的預設集。 在一變型中,針對切片選擇SAO參數的深度,包括小於CTU的深度,使得CTU中的每個區塊有一組SAO參數是可能的。 下面描述的本發明之實施例旨在透過使用各種技術來確定當前影像中的影像部分的一個或多個SAO參數來提高SAO的編碼效率。 第一組實施例 在第一組實施例中,提出了透過參考圖9所述的旗標:“sao_merge_up_flag ”和“sao_merge_left_flag ”來改進語法元素的使用,使一個影像部分(例如一CTU)能夠從另一影像部分(另一CTU)推斷出SAO參數。 第一實施例 在第一實施例中,提出了一種在位元流中發訊對影像進行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組。該方法包括: 確定影像部分是否屬於預定組,以及 若該影像部分屬於該預定組,則在該位元流中包括第一語法元素,用於發訊用於對該影像部分執行SAO濾波的SAO 參數是從用於過濾另一影像部分的SAO參數推斷而來的, 否則,不包括該第一語法元素。 第一實施例的範例示於圖25中,圖25是一流程圖,說明可在編碼器中實施以依據第一實施例編碼SAO參數的過程的步驟。更確切地說,此圖示出作為範例,基於CTU分組,在位元流4114內發訊推斷或不推斷提供給CTU或一組CTU的SAO參數。 較佳地,當沒有用於推斷SAO參數的發訊時,例如若影像部分不屬於預定組,則用於過濾影像部分的SAO參數被包括在位元流中。 更確切地說,編碼器首先在測試4102中檢查資訊,例如分組索引4101,是否被設定為等於預定級別,例如CTU級4102。作為一變型,位元流中不包括SAO合併旗標(第一語法元素),若所述影像部分是屬於包含至少兩個影像部分的組。作為另一變型,若CTU是屬於由以下所組成的組 - 2*2 CTU,或 - 3*3 CTU,或 - 一行CTU(或部分行),或 - 一列CTU(或部分列),或 - 影像的所有CTU, 則用於過濾影像部分的SAO參數被包括在位元流中。 此外,若影像部分是屬於包含分割影像部分的組,則第一語法元素可以被包括在位元流中。 更確切地說,若該影像部分屬於包含下列的組 - 分割成16個部分的影像部分,或 - 分割成8個部分的影像部分,或 - 分割成4個部分的影像部分, 則第一語法元素被包括在位元流中。 若測試結果為否,則針對三個分量Y、U、V 4111,將新的SAO參數集插入4112位元流4114中。重複步驟4111和4112直到最後的CTU被處理。 若分組索引被設定等於CTU級值(對於測試4102為“是”),並且若左邊CTU(表示CTU位在被處理的CTU的左側)存在(測試4103),則在步驟4104中將sao_merge_left_ flag 插入位元流4114中。 若在測試4105中sao_merge_left_flag 不等於否(或值‘0’),並且若在測試4109中存在上面的CTU(表示CTU位在被處理的CTU的上面),則在步驟4107中將sao_merge_ up_flag 插入位元流4114中。 若測試4108,旗標sao_merge_up_flag 被設定等於否(或值‘0’),則在步驟4111、4112和4113中將新的SAO參數集插入位元流中。 在一變型中,步驟4112還可包含插入旗標sao_merge_ flags_enabled 。該旗標是第二語法元素,與影像部分的組相關聯,用於發訊是否啟用或禁用第一語法元素的使用。 第二實施例 在第二實施例中,基於準則(例如CTU所屬的組,或所使用的預測或編碼模式),可以將sao_merge_flags_ enabled 包括在位元流中,用於發訊是否啟用或禁用SAO合併旗標的使用,該SAO合併旗標用於發訊是否從用於過濾另一影像部分的SAO參數推斷用於對該影像部分執行SAO濾波的SAO參數。 可以在編碼器中實現過程的新步驟。 例如,當位元流中包括索引或第一或第二語法元素時,該索引或該第一或第二語法元素在下列級別被插入: 影像級,或 序列級,當影像是屬於視訊序列時。 第三實施例 圖25是示出解析SAO參數之過程的步驟的流程圖,作為圖9中所示之過程的替代,並且與圖22中所述的在編碼器中實現的編碼步驟相關。這些步驟較佳地在解碼器中實現。 此第二實施例提出一種在對影像執行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組。該方法包括: 獲得指示該組影像部分是否屬於預定組的資訊,以及 若該組影像部分屬於該預定組,則獲取第一語法元素,其發訊從用於過濾另一影像部分的SAO參數推斷用於對該影像部分執行SAO濾波的SAO參數, 否則,不獲取該第一語法元素。 較佳地,圖25的過程被施用於每個CTU,以產生用於所有分量的SAO參數集。在解碼CTU或一組CTU(當存在有CTU的分組時)的SAO參數之前,在測試4014中檢測該資訊。例如,該資訊可以是先前所述的分組索引4013。檢測其是否被設定等於指示一預定組或一組預定組的值,例如對應於CTU級索引4014。例如,可能先從標頭中解碼了所述CTU級索引。在該情況下,在步驟4003中從位元流4002提取sao_merge_left_flag (第一語法元素),並且若需要的話,亦在步驟4005中從位元流4002提取sao_merge_up_flag (第一語法元素)。 若在測試4014中,分組索引不是被設定等於CTU級索引,則不考慮旗標sao_merge_left_flagsao_merge_ up_flag ,並且在步驟4007中從位元流4002提取新的SAO參數。 其他的步驟4004、4006和4008-4012分別類似於先前所述之圖9中的步驟504、506、508-512。 在一個變型中,針對CTU級保留合併旗標,但針對所有其他的CTU分組移除合併旗標,如圖25中所示。優點是CTU級的彈性。 在一個變型中,若該影像部分是屬於包含至少兩個影像部分的組,則不獲取第一語法元素。 在另一變型中,當SAO發訊低於或等於CTU級(1/16 CTU或¼ CTU或1/8 CTU)時針對CTU使用合併旗標,並且針對具有較大的組的其他CTU分組移除合併旗標。 下表說明了此實施例:
Figure 108118389-A0304-0002
換句話說,若所述影像部分是由下列所組成的組 - 2*2個影像部分,或 - 3*3個影像部分,或 - 一行影像部分(或部分行),或 - 一列影像部分(或部分列),或 - 影像的所有影像部分, 則位元流中不包括該(些)第一語法元素。 第四實施例 圖26是示出第三實施例的流程圖,其為圖25中的第二實施例的變型。然而,新的測試4214評估語法元素的值,旗標sao_merge_flags_enabled (第二語法元素)是否為真,以啟用測試4203和4205中解碼旗標sao_merge_left_flagsao_merge_up_flag 的測試,取代檢測分組索引的值,如圖25中所示。 換句話說,該資訊是與該影像部分的組相關聯的第二語法元素,發訊是否啟用或禁用第一語法元素(sao_ merge_left_flagsao_merge_up_flag) 的使用。 第五實施例 在第五實施例中,提出了一種在對影像執行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組。 該方法包括: 基於預定準則獲取該位元流中的語法元素,用於發訊是否啟用或禁用一或多個其他語法元素的使用,該一或多個其他語法元素用於發訊是否從用於過濾另一影像部分的SAO參數推斷用於對該影像部分執行SAO濾波的SAO參數。 例如,該預定準則是,該影像部分是否屬於預定組之事實。 在第三、第四及第五實施例中,當在解碼器中實現步驟以從位元流(分別為4002或4202)中解碼影像時,從該位元流解析該資訊或SAO參數、或第一或第二語法元素。 至於編碼器側(圖25),當從該位元流解析該資訊或SAO參數、或第一或第二語法元素時,該資訊或SAO參數、或第一或第二語法元素與下列相關: 影像級,或 序列級,當影像是屬於視訊序列時。 在前面的實施例中,當同位的CTU不使用SAO或者當沒有同位的CTU使用SAO時,可以使用預設的SAO參數集。在一變型中,預設集取決於SAO參數的所選深度。例如,第一預設集可以與一個深度(例如1/16)相關聯,以及第二預設集可以與另一深度(例如¼)相關聯。發現深度對對 SAO參數有效地作為預設集有影響。不同的預設集可以由編碼器決定並且在序列參數集中被傳輸給解碼器。然後,解碼器依據為當前切片所選的深度使用適當的預設集。 在一變型中,一個可能性是針對所有的級別移除SAO合併旗標。這表示移除了圖9的步驟503、504、505、506。優點是其顯著地降低了SAO的發訊,因此降低了位元率。此外,透過在CTU級移除兩個語法元素而簡化了設計。 合併旗標對於小區塊尺寸而言是重要的,因為SAO參數集相較於其可以改進的樣本數量是昂貴的。在此情況下,這些語法元素降低了SAO參數發訊的成本。對於大組而言,SAO參數集成本較低,因而使用合併旗標沒有效率。因此,這些實施例的優點是編碼效率提高。 第六實施例 在第六實施例中,在編碼器處評估數個SAO推導,並且在位元流中插入在CTU級相對的SAO語法。因此,不對解碼器進行修改。其中一個優點是此實施例可以與HEVC相容的解碼器一起使用。 可以在編碼器側比較在先前實施例中定義的所有這些不同的分組,以選擇針對當前幀可以給出最佳RD折衷的一個分組。圖22示出此實施例。更確切地說,圖22示出如何使用碼率-失真折衷比較來選擇SAO參數推導的範例。 在編碼器側提高編碼效率的一種可能性是,測試所有可能的SAO分組,但相較於評估分組之小子集的圖22的範例,這應該會增加編碼時間。 當前切片/幀1701被用來為每個CTU 1702設定CTUStats表1703。此表1703被用來評估CTU級1704、幀/切片分組1705、列分組1706、行分組1707、2×2 CTU分組1708或3×3 CTU分組1709或者如先前(以非限制性方式)所述的所有其他說明過的CTU分組。依據針對每個分組所計算的碼率失真準則來選擇最佳的CTU分組1710。依據在步驟1710中選擇的分組來設定(1711)每個CTU的SAO參數集。然後使用這些SAO參數1712來施用SAO濾波1713,以獲得經過濾的幀/切片。然後將每個CTU的SAO參數1711插入位元流內,如圖9中所述。 此實施例的優點是不需要在解碼器側對HEVC SAO 進行任何修改,因此這方法是HEVC相容的。 主要優點是提高編碼效率。次要優點是此競爭方法不需要任何額外的SAO濾波或分類。實際上,對編碼器複雜性的主要影響是步驟1702,其需要所有可能的SAO類型的SAO分類,以及步驟1713,其過濾樣本。所有其他的CTU分組評估僅是在CTU級編碼選擇(在表CTUStats中設定)期間已獲得的一些值的增加。 在編碼器側提高編碼效率的另一種可能性是,測試所有可能的SAO分組,但相較於評估分組之小子集的圖12的範例,這應該會增加編碼時間。 第二組實施例 第七實施例 因此,在第七實施例中,修改不同的允許的SAO參數推導之間的競爭,使得僅有一種推導在編碼器中被允許用於任何給定的切片或幀。該允許的推導可依據切片或幀的一或多個特徵來確定。例如,可依據切片類型(Intra、Inter_P、Inter_B)、切片的量化級別(QP)、或圖片組(Group of Pictures, GOP)之層級中的位置來選擇該允許的推導。 此實施例的優點是降低了複雜性。僅選擇一種推導而非評估兩種或更多種競爭的推導,這對於硬體編碼器來說是有用的。 因此,在一變型中,第一種推導與第一組影像(例如,Intra切片)相關聯,而第二種推導與第二組影像(例如,Inter_P切片)相關聯。確定要被過濾的組是第一組還是第二組。若確定要被過濾的組是第一組,則使用第一種推導來過濾該組的影像部分,並且若確定要被過濾的組是第二組,則使用第二種推導來過濾該組的影像部分。不需要評估兩種推導。 確定要被過濾的組是第一組或是第二組可依據下面之一或多者: - 切片類型; - 要被過濾的組所屬之影像的幀類型; - 要被過濾的組所屬之影像的圖片組之品質層級中的位置; - 要被過濾的組所屬之影像的品質;以及 - 可應用於要被過濾的組的量化參數。 例如,當第一組比第二組具有更高品質或在品質層級中的更高位置時,第一種推導在每組中可具有比第二種推導更少的影像部分。 在一變型中,針對給定的切片或幀選擇了特定的SAO參數的推導。然而,若編碼器有能力評估有限數量的競爭推導,則不必完全消除競爭。仍然允許針對給定切片或幀的競爭,但將競爭推導的集合適應於切片或幀。 競爭推導的集合可取決於切片類型。 對於Intra切片,集合較佳地包含其中組具有包含小數量CTU(例如,CTU級、2×2 CTU、3×3 CTU以及列)的分組。並且,若低於CTU的深度是可用的(如在第十實施例中),則較佳地還包括這些深度。 對於Inter切片,推導的集合較佳地包含其中組具有包含諸如行、幀級之大數量CTU的分組。然而,還可以考慮小至CTU級的更小的分組。 此實施例的優點是編碼效率提高,因為使用適應於切片或幀的推導。 在一個變型中,用於Inter B切片的推導的集合可以不同於用於Inter P切片的推導的集合。 在另一變型中,競爭推導的集合取決於GOP中的幀的特徵。這對於基於品質層級而品質(QP)不一的幀是特別有益的。對於具有最高品質或層級中最高位置的幀,競爭推導的集合應包括包含較少CTU或甚至子CTU深度的組(與上述針對Intra切片相同)。對於具有較低品質或層級中較低位置的幀,競爭推導的集合應包括具有更多CTU的組。 競爭推導的集合可被定義在序列參數集中。 因此,在第七實施例中,第一組推導與第一組影像(例如,Intra切片)相關聯,並且第二組推導與第二組影像(例如,Inter_P切片)相關聯。確定要被過濾的組是第一組還是第二組。若確定要被過濾的組是第一組,則從第一組推導選擇一推導並用於過濾該組的影像部分,並且若確定要被過濾的組是第二組,則從第二組推導選擇一推導並用於過濾該組的影像部分。不需要評估不在相關聯的推導組中的推導。 在先前的實施例中可以確定要被過濾的組是第一組還是第二組。例如,當第一組比第二組具有較高品質或品質層級中的較高位置時,第一組推導可以具有至少一種推導,其每組具有比第二組推導更少的影像部分。 CTU分組的集合可以被定義在序列參數集中。 換句話說,第七實施例提出了一種編碼包含複數個影像部分之影像的方法。該方法包括 依據第一或第二預測模式,從一或多個其他影像部分預測一或多個影像部分, 依據所使用的預測模式,將所述預測的影像部分分組成複數個組中的一或多個組,以及 依據該分組對預測的影像部分執行取樣自適應偏移(SAO)濾波。 例如,該影像部分是使用幀內預測模式從所述影像內的另一影像部分預測來的,或是使用幀間預測模式從另一參考影像而不是所述影像內的另一影像部分預測來的。 圖28示出依據本發明之實施例的系統191、195,其包含編碼器150或解碼器100及通訊網路199中的至少一者。依據實施例,系統195用於處理及提供內容(例如,用於顯示/輸出的視訊及音訊內容或串流視訊/音訊內容)給使用者,其例如透過包含解碼器100的使用者終端或可以與解碼器100通訊的使用者終端的使用者介面存取解碼器100。這種使用者終端可以是電腦、行動電話、平板或能夠提供/顯示(供應的/串流的)內容給使用者的任何其他類型的裝置。系統195透過通訊網路199獲取/接收位元流101(以連續串流或信號的形式–例如,當顯示/輸出早期視訊/音訊時)。依據實施例,系統191係用於處理內容及儲存處理後的內容,例如,為了在稍後顯示/輸出/串流而處理的視訊及音訊內容。系統191獲得/接收包含原始影像序列151的內容,其由編碼器150接收及處理(包括依據本發明之使用去區塊濾波器的濾波),並且編碼器150產生位元流101,其經過通訊網路199被傳輸到解碼器100。然後將位元流101以多種方式傳輸到解碼器100,例如,其可以由編碼器150預先產生,並且作為資料被儲存在通訊網路199中的儲存裝置中(例如,在伺服器或雲端儲存器上),直到使用者從該儲存裝置請求內容(即,位元流資料),此時從該儲存裝置將該資料傳輸/串流到解碼器100。系統191還可以包含內容提供裝置,用於向使用者提供/串流傳輸(例如,透過傳送要顯示在使用者終端上之用於使用者介面的資料)儲存在儲存裝置中的內容的內容資訊(例如,內容的標題以及其他的元/儲存位置資料,用於識別、選擇和請求內容),以及用於接收和處理使用者對內容的請求,使得可以將所請求的內容從儲存裝置發送/串流到使用者終端。替代的,編碼器150產生位元流101並且當使用者請求內容時將該位元流直接傳送/串流到解碼器100。然後,解碼器100接收位元流101(或信號)並且依據本發明使用去區塊濾波器執行濾波,以獲得/產生視訊信號109及/或音訊信號,其接著被使用者終端使用以將請求的內容提供給使用者。 在前面的實施例中,可以用硬體、軟體、韌體或其任何組合來實現所描述的功能。若以軟體實現,則功能可作為一或多個指令、碼而被儲存在電腦可讀取媒體上或是經由電腦可讀取媒體傳輸,並且由基於硬體的處理單元執行。 電腦可讀取媒體可包括電腦可讀取儲存媒體,其對應於諸如資料儲存媒體之有形的媒體,或通訊媒體,其包括有助於例如依據通訊協定,將電腦程式從一地傳送到另一地的任何媒體。以此方式,電腦可讀取媒體通常可對應於(1)非暫時性的有形電腦可讀取儲存媒體或(2)通訊媒體,諸如信號或載波。資料儲存媒體可以是任何可用的媒體,其可以由一或多個電腦或一或多個處理器存取,以提取用於實現本公開中所述之技術的指令、碼及/或資料結構。電腦程式產品可包括電腦可讀取媒體。 作為示例而非限制,這種電腦可讀取儲存媒體可以包括RAM、ROM、EEPROM、CD-ROM或其他光碟儲存、磁碟儲存或其他磁性儲存裝置、快閃記憶體、或可被用於以指令或資料結構的形式儲存所需之程式碼並且可以被電腦存取的任何其他媒體。並且,把任何連接都適當地稱為電腦可讀取媒體。例如,若使用同軸電纜、光纖電纜、雙絞線、數位用戶線(DSL)或諸如紅外線、無線電和微波的無線技術從網站、伺服器或其他遠端來源傳輸指令,則同軸電纜、光纖電纜、雙絞線、DSL或諸如紅外線、無線電和微波的無線技術都包含在媒體的定義中。然而,應理解的是,電腦可讀取儲存媒體及資料儲存媒體不包括連接、載波、信號、或其他暫態媒體,而是針對非暫態、有形的儲存媒體。本文使用的磁碟和光碟包括光碟(CD)、雷射光碟、光碟(optical disc)、數位多功能光碟(DVD)、軟碟和藍光光碟,其中磁碟通常磁性地再現資料,而光碟使用雷射光學地再現資料。上述的組合也應包括在電腦可讀媒體的範圍內。 指令可由一或多個處理器執行,例如一或多個數位信號處理器(DSP)、通用微處理器、特定應用積體電路(ASIC)、現場可編程邏輯陣列(FPGA)、或其他等效的整合或離散邏輯電路。因此,如本文所使用的術語「處理器」可以指的是任何前述的結構或者適合於實現本文所述之技術的任何其他結構。此外,在一些態樣中,本文所述的功能可在被配置用於編碼及解碼的專用硬體及/或軟體模組內提供,或者被併入組合的編解碼器中。並且,這些技術可在一或多個電路或邏輯元件中被完全實現。 本公開的技術可在各種裝置或設備中實現,包括無線手機、積體電路(IC)或一組IC(例如,晶片組)。在本公開中描述了各種元件、模組、或單元,用以強調被配置成執行所公開之技術的裝置的功能態樣,但不一定需要由不同的硬體單元實現。而是,如上所述,可在編解碼器硬體單元中組合各種單元,或由一組互操作硬體單元提供,其包括如上所述的一或多個處理器,連同合適的軟體及/或韌體。Figure 1 is about the coding structure used in the High Efficiency Video Coding (HEVC) video standard. The video sequence 1 is composed of a series of digital images i. Each such digital image is represented by one or more matrices. The matrix coefficients represent pixels. The sequence of images 2 can be divided into multiple slices 3. Slices can constitute the entire image in some cases. These slices are divided into non-overlapping Coding Tree Units (CTU) 4. Coding Tree Unit (CTU) is the basic processing unit of the High Efficiency Video Coding (HEVC) video standard, and conceptually corresponds structurally to the macroblock units used in several previous video standards. The CTU is sometimes called the largest coding unit (Largest Coding Unit, LCU). The size of the CTU is usually 64×64 pixels. Quaternary tree decomposition can be used to iteratively divide each CTU into smaller variable size coding units (CU) 5. The coding unit is a basic coding element, and is composed of two subunits called a prediction unit (Prediction Unit, PU) and a transformation unit (Transform Unit, TU). The maximum size of PU or TU is equal to the size of CU. The prediction unit corresponds to the division of the CU used to predict the pixel value. As shown in 6, various divisions of the CU into PUs are possible, including a division into 4 square PUs and two different divisions into 2 rectangular PUs. The conversion unit is the basic unit for spatial conversion using DCT. The CU can be divided into multiple TUs based on the quadtree representation 7. Each slice is embedded in a Network Abstraction Layer (NAL) unit. In addition, the encoding parameters of the video sequence are stored in dedicated NAL units called parameter sets. In HEVC and H.264/AVC, two parameter set NAL units are used: first, Sequence Parameter Set (SPS) NAL unit, which collects all parameters that have not changed during the entire video sequence. Usually, it deals with coding profile, video frame size and other parameters. Second, the picture parameter set (Picture Parameter Set, PPS) NAL unit includes parameters that may be different in each image (or frame) in the sequence. HEVC also includes a Video Parameter Set (VPS) NAL unit, which contains parameters that describe the overall structure of the bitstream. VPS is a new type of parameter set defined in HEVC and is applicable to all layers of the bitstream. One layer can contain multiple temporal sublayers, and all version 1 bit streams are limited to a single layer. HEVC has certain layered extensions for tunability and multi-view, and these extensions will support multiple layers, with a backward compatible version 1 base layer. Figure 2 shows a data communication system in which one or more embodiments of the invention can be implemented. The data communication system includes a sending device, in which case the sending device is a server 201, which can be operated to transmit data packets of the data stream to the receiving device via the data communication network 200, in which case the receiving device is a client terminal 202. The data communication network 200 may be a wide area network (WAN) or a local area network (LAN). Such a network may be, for example, a wireless network (Wifi/802.11a or b or g), an Ethernet network, the Internet, or a hybrid network composed of several different networks. In a specific embodiment of the present invention, the data communication system may be a digital television broadcasting system, in which the server 201 transmits the same data content to multiple clients. The data stream 204 provided by the server 201 may be composed of multimedia data representing video and audio data. In some embodiments of the present invention, the server 201 may use a microphone and a camera to extract audio and video data streams, respectively. In some embodiments, the data stream may be stored on the server 201, or received by the server 201 from another data provider, or generated at the server 201. The server 201 is provided with an encoder for encoding video and audio streams, in particular to provide a compressed bit stream for transmission, the compressed bit stream is used as input data provided to the encoder. Closely expressed. In order to obtain a better ratio between the quality of the transmitted data and the number of transmitted data, the compression of the video data may be based on the HEVC format or the H.264/AVC format, for example. The client 202 receives the transmitted bit stream, and decodes the reconstructed bit stream to reproduce the video image on the display device and reproduce the audio data through the speaker. Although the streaming scenario is considered in the example of FIG. 2, it should be understood that in some embodiments of the present invention, the data communication between the encoder and the decoder may use, for example, a media storage device such as an optical disc To execute. In one or more embodiments of the present invention, the video image is transmitted with data representing displacement compensation for application to the reconstructed pixels of the image, and filtered pixels are provided in the final image. FIG. 3 schematically shows a processing device 300 configured to implement at least one embodiment of the present invention. The processing device 300 may be a device such as a microcomputer, a workstation, or a portable device. The device 300 includes a communication bus 313, which is connected to:-a central processing unit 311, such as a microprocessor, represented as a CPU;-a read-only memory 307, represented as a ROM, for storing computer programs for implementing the present invention -Random access memory 312, represented as RAM, is used to store the executable code and the temporary memory of the method of the embodiment of the present invention, which is suitable for recording the sequence of the encoded digital image according to the embodiment of the present invention Variables and parameters required by the method and/or method of decoding the bit stream; and-the communication interface 302, connected to the communication network 303, to transmit or receive digital data to be processed on the communication network. Optionally, the device 300 may further include the following elements: a data storage mechanism 304, such as a hard disk, for storing computer programs for implementing the method of one or more embodiments of the present invention and one of the methods for implementing the present invention Or data used or generated during multiple embodiments;-a disk drive 305 for the disk 306, the disk drive is adapted to read data from or write data to the disk 306;-screen 309, use The keyboard 310 or any other pointing mechanism is used to display data and/or serve as a graphical user interface. The device 300 may be connected to various peripheral devices, such as, for example, a digital camera 320 or a microphone 308, and each peripheral device is connected to an input/output card (not shown) in order to provide multimedia materials to the device 300. The communication bus provides communication and interaction capabilities between various components included in the device 300 or connected thereto. The representation of the bus is not limiting, in particular the central processing unit is operable to transmit instructions to any element of the device 300 directly or through another element of the device 300. The magnetic disk 306 can be replaced by any information medium, such as, for example, a rewritable or non-rewritable optical disk (CD-ROM), a ZIP disk, or a memory card. Generally speaking, it can be replaced by an information storage mechanism. The mechanism can be read by a microcomputer or microprocessor, integrated or not integrated into the device, may be removable and suitable for storing one or more programs, the execution of these programs makes the sequence of encoded digital images according to the invention The method and/or the method of decoding the bit stream can be implemented. The executable code may be stored in read-only memory 307, on hard disk 304, or on removable digital media, such as, for example, disk 306 as previously described. According to a variant, the executable code of the program can be received via the communication network 303 and the interface 302 to be stored in a storage mechanism of the device 300, such as the hard disk 304, before being executed. The central processing unit 311 is adapted to control and guide the execution of instructions or parts of the program or software code of the program according to the present invention, and instructions stored in one of the aforementioned storage mechanisms. When the power is turned on, one or more programs stored in non-volatile memory, such as the hard disk 304 or the read-only memory 307, are transferred to the random access memory 312 and the temporary memory. The random access memory then contains the executable code of the one or more programs, and the register is used to store variables and parameters needed to implement the present invention. In this embodiment, the device is a programmable device that uses software to implement the present invention. However, optionally, the present invention may be implemented in hardware (for example, in the form of an application specific integrated circuit or ASIC). Fig. 4 shows a block diagram of an encoder according to at least one embodiment of the invention. The encoder is represented by connected modules, and each module is suitable for, for example, in the form of program instructions to be executed by the CPU 311 of the device 300 to implement an image encoding sequence of images according to one or more embodiments of the present invention At least one corresponding step of the method of at least one embodiment. Receiving a digital image of the original sequence i 0 to i n-by 401 in encoder 400 input. Each digital image is represented by a set of samples called pixels. After performing the encoding process, the encoder 400 outputs the bit stream 410. The bit stream 410 includes a plurality of coding units or slices. Each slice includes a slice header and a slice body. The slice header is used to send coded values used to encode the coding parameters of the slice. The slice body includes the encoded video. data. Module 402 via the input digital image i 0 to i n 401 into a plurality of pixel blocks. These blocks correspond to the video part, and may have variable sizes (for example, 4×4, 8×8, 16×16, 32×32, 64×64 pixels). Select an encoding mode for each input block. Two series of coding modes are provided: coding mode based on spatial prediction coding (Intra prediction), and coding mode based on temporal prediction (Inter coding, Merge, SKIP). The possible coding modes are tested. The module 403 implements intra prediction processing in which a given block to be encoded is predicted by a predictor calculated from pixels of neighboring blocks of the block to be encoded. If intra coding is selected, the indication of the selected intra predictor and the difference between the given block and its predictor are coded to provide a residual. Time prediction is realized by the motion estimation module 404 and the motion compensation module 405. First, the motion estimation module 404 selects a reference image from a set of reference images/images 416, and selects a part of the reference image, also referred to as a reference area or image portion, which is the closest to the given The area of the block. The motion compensation module 405 then uses the selected region to predict the block to be encoded. The motion compensation module 405 calculates the difference between the selected reference area and a given block, also called a residual block. The selected reference area is indicated by the motion vector. Therefore, in both cases (spatial and temporal prediction), the residual is calculated by subtracting the prediction from the original block. In the INTRA prediction realized by the module 403, the prediction direction is coded. In temporal prediction, at least one motion vector is encoded. If inter prediction is selected, information about motion vectors and residual blocks is encoded. To further reduce the bit rate, assuming that the motion is uniform, the motion vector is encoded by the difference with respect to the motion vector predictor. The motion vector predictor and encoding module 417 obtains a set of motion vector predictors from the motion vector field 418. The encoder 400 further includes a selection module 406 for selecting an encoding mode by applying encoding cost standards, such as rate-distortion standards. To further reduce redundancy, the conversion module 407 applies conversion (such as DCT) to the residual block, and then quantizes the obtained converted data through the quantization module 408, and entropy encodes through the entropy encoding module 409. Finally, the encoded residual block of the current block being encoded is inserted into the bitstream 410. The encoder 400 also performs decoding of the encoded image in order to generate a reference image for motion estimation of subsequent images. This enables the encoder and decoder receiving the bitstream to have the same reference frame. The inverse quantization module 411 performs inverse quantization of the quantized data, and then performs inverse conversion through the inverse conversion module 412. The intra prediction module 413 uses prediction information to decide which predictor to use for a given block, and the motion compensation module 414 actually adds the residual obtained through the module 412 to the reference obtained from the set of reference images 416 area. Then post-filtering is applied by module 415 to filter the frame of reconstructed pixels. In an embodiment of the present invention, an SAO loop filter is used, in which a compensation offset is added to the pixel values of reconstructed pixels of the reconstructed image. 5 is a flowchart illustrating the steps of the loop filter process according to at least one embodiment of the present invention. In the initial step 51, the encoder generates a full frame reconstruction. Next, in step 52, a deblocking filter is applied to this first reconstruction, so as to generate a deblocked reconstruction 53. The purpose of the deblocking filter is to remove block artifacts generated by residual quantization and block motion compensation or block intra prediction. These artifacts are visually important at low bit rates. The deblocking filter operates to smooth the block boundary according to the characteristics of two adjacent blocks. Consider the encoding mode of each block, the quantization parameter used for residual encoding, and the neighboring pixel difference of the boundary. The same criteria/classification is applied to all frames, and no additional data is transmitted. The deblocking filter improves the visual quality of the current frame by removing block artifacts, and also improves motion estimation and motion compensation for subsequent frames. In fact, the high frequencies of block artifacts are removed, so these high frequencies do not need to be compensated by the texture residuals of subsequent frames. After the deblocking filter, the SAO parameter 58 determined according to an embodiment of the present invention is used in step 54 to filter the deblocked reconstruction through a sample adaptive offset (SAO) loop filter. Then in step 56, the obtained frame 55 can be filtered by an adaptive loop filter (ALF) to generate a reconstructed frame 57 which will be displayed and used as a reference frame for subsequent Inter frames. In step 54, each pixel of the frame area is classified into a class or group. The same offset value is added to each pixel value belonging to a certain class or group. The determination of the SAO parameters of the sample adaptive offset filter will be explained in more detail with reference to any one of FIGS. 10 to 11. 6 shows a block diagram of a decoder 60 according to an embodiment of the present invention, which can be used to receive data from an encoder. The decoder is represented by connected modules, each module being adapted to implement the corresponding steps of the method executed by the decoder 60 in the form of program instructions to be executed by the CPU 311 of the device 300, for example. The decoder 60 receives a bit stream 61 containing coding units, each coding unit consisting of a header containing information of coding parameters and a body containing coded video data. As explained with respect to FIG. 4, the encoded video data is entropy encoded, and for a given block, the index of the motion vector predictor is encoded on a predetermined number of bits. The encoded video data received is entropy decoded by the module 62. The residual data is then dequantized by module 63, and then inverse conversion is applied by module 64 to obtain pixel values. Entropy decoding of mode data indicating the coding mode will also be performed, and based on the mode, INTRA type decoding or INTER type decoding is performed on the blocks of the encoded image data. In the case of INTRA mode, the intra prediction module 65 determines the INTRA predictor according to the intra prediction mode specified in the bit stream. If the mode is INTER, the motion prediction information is extracted from the bit stream in order to find the reference area used by the encoder. The motion prediction information consists of the reference frame index and the motion vector residual. The motion vector predictor is added to the motion vector residual by the motion vector decoding module 70 to obtain a motion vector. The motion vector decoding module 70 applies motion vector decoding to each current block encoded by motion prediction. Once the index of the motion vector predictor for the current block is obtained, the actual value of the motion vector associated with the current block can be decoded and used to apply motion compensation by the module 66. The reference video portion indicated by the decoded motion vector is extracted from the reference video/image 68 to apply motion compensation 66. The motion vector field data 71 is updated with the decoded motion vector for use in the inverse prediction of the subsequent decoded motion vector. Finally, the decoded block is obtained. The post filtering is applied by the post filtering module 67, which is similar to the post filtering module 415 applied to the encoder as described with reference to FIG. Finally, the decoder 60 provides the decoded video signal 69. The purpose of SAO filtering is to increase the quality of reconstructed frames by sending additional data in the bit stream, as opposed to deblocking filters that do not transmit information. As described above, each pixel is classified into a predetermined class or group, and the same offset value is added to each pixel sample of the same class/group. For each category, an offset is encoded in the bitstream. There are two SAO types for SAO loop filtering: Edge Offset (EO) type and Band Offset (BO) type. Examples of edge offset types are shown schematically in FIGS. 7A and 7B, and examples of band offset types are shown schematically in FIG. 8. In HEVC, SAO filtering is applied per CTU. In this case, on the encoder side, parameters for which SAO filtering needs to be performed (SAO parameter set) are selected for each CTU, and on the decoder side, necessary parameters are decoded and/or derived for each CTU. This provides the possibility to easily encode and decode video sequences by processing each CTU simultaneously without introducing delays when processing the entire frame. In addition, when SAO filtering is enabled, only one SAO type is used: an edge offset type filter or a band offset type filter is used depending on the relevant parameters transmitted in the bitstream for each classification. In HEVC, one of the SAO parameters is the SAO type parameter sao_type_idx , which indicates to the CTU whether the EO type, BO type, or no SAO filtering is selected for the relevant CTU. For example, for a given CTU, you can copy the SAO parameters from the top or left CTU instead of transmitting all SAO data. One of the SAO parameters in HEVC is the sao_merge_up flag. When this flag is set, the SAO parameter indicating the target CTU should be copied from the above CTU. The other one of the SAO parameters in HEVC is the sao_merge_left flag. When this flag is set, the SAO parameter indicating the target CTU should be copied from the left CTU. SAO filtering can be applied independently for different color components of the frame (eg, YUV). For example, a set of SAO parameters may be provided for the luma component Y, and another set of SAO parameters may be provided for the two chroma components U and V together. Also, within the set of SAO parameters, one or more SAO parameters can be used as common filtering parameters for two or more color components, while the other SAO parameters are dedicated (per component) filtering parameters for color components . For example, in HEVC, the SAO type parameter sao_type_idx is common to U and V, and the EO class parameter indicating a class used for EO filtering is also (see below), while indicating a group used for BO filtering The BO class parameters of the class have dedicated (per component) SAO parameters for U and V. A description of the type of edge offset in HEVC is now provided with reference to FIGS. 7A and 7B. The edge offset type involves determining the edge index of each pixel by comparing the pixel value of the pixel with the values of two adjacent pixels. In addition, the two adjacent pixels depend on a parameter indicating the direction of the two adjacent pixels with respect to the current pixel. These directions are 0 degrees (horizontal direction), 45 degrees (diagonal direction), 90 degrees (vertical direction), and 135 degrees (second diagonal direction). These four directions are shown schematically in FIG. 7A. The table of FIG. 7B shows the offset value to be applied to the pixel value of a specific pixel "C" according to the values of two adjacent pixels Cn1 and Cn2 on the decoder side. When the value of C is smaller than the two values of the adjacent pixels Cn1 and Cn2, the offset value to be added to the pixel value of the pixel C is "+O1". When the pixel value of C is less than one of its neighbors (Cn1 or Cn2) and C is equal to a value of its neighbor, the offset to be added to the sample value of this pixel is "+O2". When the pixel value of C is greater than one of its neighbors (Cn1 or Cn2) and the pixel value of C is equal to one of its neighbors, the offset to be added to this pixel sample is "-O3" . When the value of C is greater than the two values of Cn1 or Cn2, the offset to be added to this pixel sample is "-O4". When the current sample and its neighbors do not satisfy any of the above conditions, no offset value is added to the current pixel C, as described by the edge index value "2" in the table. It is worth noting that for the specific case of the edge offset type, the absolute value of each offset (O1, O2, O3, O4) is encoded in the bitstream. The sign to be applied to each offset depends on the edge index (or Edge Index in the HEVC specification) to which the current pixel belongs. According to the table represented in FIG. 7B, for edge index 0 and for edge index 1 (O1, O2), a positive offset is applied. For edge index 3 and edge index 4 (O3, O4), a negative offset is applied to the current pixel. In HEVC specification, four directions of FIG. 7A, the direction specified by the edge offset of the luminance component "sao_eo_class_luma" field and two chrominance components U and V "sao_eo_class_chroma" column in the bit stream. The SAO edge index corresponding to the index value is obtained by the following formula: EdgeIndex (edge index)=sign (C-Cn2)-sign (Cn1-C)+2 where the definition of the function sign (.) is given by the following relationship sign (x)=1, when x>0 sign(x)=-1, when x<0 sign(x)=0, when x=0. To simplify the determination of the edge offset for each pixel, the difference between the pixel value of C and the pixel values of its two neighboring pixels Cn1 and Cn2 can be shared by the current pixel C and its neighbors. In fact, when applying the SAO edge offset filter using the raster scan sequence of pixels of the current CTU or frame, the term sign (Cn1-C) has been calculated for the previous pixels (to be precise, when When the current pixel C'at a time is the current neighboring pixel Cn1 and the neighboring pixel Cn2' is the current current pixel C, it is calculated as C'-Cn2' at that time). Therefore, it is not necessary to calculate sign (c n 1-c) again . A description of the type of offset is now provided with reference to FIG. 8. The type of band offset in SAO also depends on the pixel value of the sample to be processed. The class in the SAO band offset is defined as the range of pixel values. Traditionally, for all pixels in the range, the same offset is added to the pixel value. In the HEVC specification, for each reconstructed block or frame region (CTU) of a pixel, the number of offsets with an offset filter is four, as shown schematically in FIG. 8. An implementation of SAO with offset divides the entire range of pixel values into 32 equal-sized ranges. These 32 ranges are SAO classes with offsets. The minimum value of the pixel value range is systematically 0, and the maximum value depends on the bit depth of the pixel value according to the following relationship Max=
Figure 02_image001
. Classify pixels into 32 ranges of full intervals including classifying pixel values to quickly achieve the required 5-bit inspection, ie, only the first 5 bits (5 most significant bits) are checked to classify pixels to 32 of the full range One of the categories/ranges. For example, when the bit depth is 8 bits per pixel, the maximum value of the pixel may be 255. Therefore, the range of pixel values is between 0 and 255. For this 8-bit bit depth, each class contains 8 pixel values. In traditional band-offset type filtering, the start of a band containing four ranges or classes (represented by the gray area (40)) is signaled in the bitstream to identify the position or pixel value of the first type of pixel The first range. The syntax element indicating this position is the " sao_band_position " field in the HEVC specification. This corresponds to the start of class 41 in FIG. 8. According to the HEVC specification, pixel values of 4 consecutive classes (41, 42, 43, and 44) are used, and 4 corresponding offsets are signaled in the bit stream. 9 is a flowchart illustrating the steps of the process of decoding SAO parameters according to the HEVC specification. The process of FIG. 9 is applied to each CTU to generate a set of SAO parameters for all elements. To avoid coding a set of SAO parameters per CTU (which is very expensive), a prediction scheme is used for CTU mode. This prediction mode involves checking whether the CTU to the left of the current CTU uses the same SAO parameters (this is specified in the bitstream through a flag named " sao_merge_left_flag "). If not, a second check is performed on the CTU above the current CTU (this is specified in the bitstream through the flag named " sao_merge_up_flag "). This prediction technique enables the amount of data representing SAO parameters used in the CTU mode to be reduced. The steps of the process are explained below. In step 503, " sao_merge_left_flag " is read from the bit stream 502 and decoded. If its value is true, the process proceeds to step 504, where the SAO parameters of the left CTU are copied for the current CTU. This enables in step 508 to determine the type of SAO filter used for the current CTU for YUV. If the result is negative in step 503, read " sao_ merge_up_flag " from the bit stream and decode it. If its value is true, the process proceeds to step 505, where the SAO parameters of the above CTU are copied for the current CTU. This enables the type of SAO filter used for the current CTU to be determined in step 508. If the result is negative in step 505, read and decode the SAO parameters for the current CTU from the bit stream in step 507 for the luminance Y component of this type and the two U and V components (501) (551) ). The chromaticity shift is independent. The details of this step will be described later with reference to FIG. 10. After this step, in step 508 parameters are acquired and the type of SAO filter is determined. In the subsequent step 511, a check is performed to determine whether the three color components (Y and U&V) for the current CTU have been processed. If the result is yes, the determination of the SAO parameters for the three components has been completed and the next CTU can be processed in step 510. Otherwise, (only Y is processed) U and V are processed together, and the process restarts from the initial step 512 previously described. FIG. 10 is a flowchart illustrating the steps of the process of parsing the SAO parameters in the bit stream 601 on the decoder side. In the initial step 602, the " sao_type_idx_X " syntax element is read and decoded. The codeword representing this syntax element can use a fixed-length code, or any arithmetic coding method can be used. The syntax element sao_type_idx_X can determine the type of SAO applied to the frame area to be processed for the color component Y or for the two chroma components U and V. For example, for the YUV 4:2:0 sequence, two components are considered: one for Y, and one for U and V. " Sao_type_idx_X " can adopt the following three values according to the type of SAO encoded in the bit stream. '0' corresponds to no SAO, '1' corresponds to the band offset case shown in Fig. 8 and '2' corresponds to the edge offset filter shown in Figs. 3A and 3B. In the same step 602, a test is performed to determine whether " sao_type_idx_X " is strictly positive. If " sao_type_idx_X " is equal to "0", it means that no SAO is used for Y of this frame area (CTU), if X is set equal to Y; and no SAO is used for U and V of this frame area, if X is set equal to U and V. The determination of the SAO parameters is completed, and the process proceeds to step 608. In addition, if " sao_type_idx " is strictly positive, it means that there is a SAO parameter for this CTU in the bit stream. The process then proceeds to step 606, where four iterations of the loop will be performed. The four iterations are performed in step 607, where the absolute value of offset j is read and decoded from the bit stream. These four offsets correspond to the absolute values of the four offsets (O1, O2, O3, O4) of the four edge indexes of the SAO edge offset (see Figure 7B ), or to the offset from the SAO band (see Figure 8 ) The absolute values of the four offsets related to the four ranges. It should be noted that for the encoded SAO offset, the first part is transmitted in the bit stream, which corresponds to the absolute value of the offset. The absolute value is encoded with a unary code. The maximum value of the absolute value is given by the following formula:
Figure 02_image003
Where << is the left (bit) shift operator. This formula means that for an 8-bit pixel value bit depth, the maximum absolute value of the offset is 7, and for a pixel value bit depth of 10 bits or more, the maximum absolute value of the offset is 31. The current amendments to the HEVC standard that address augmented bit depth video sequences provide similar formulas for pixel values with bit depths above 12 bits. The decoded absolute value may be a quantized value, which is dequantized before being applied to the pixel value at the decoder for SAO filtering. An indication to use or not to use this quantization is transmitted in the slice header. For the edge offset type, only the absolute value is transmitted because the sign can be inferred as explained before. For the offset type, if the absolute value of the offset is not equal to 0, the symbol is sent in the bit stream as the second part of the offset. When using CABAC, the sign bit is skipped. After step 607, the process proceeds to step 603, where a test is performed to determine whether the type of SAO corresponds to the band offset type ( sao_type_ idx_X ==1). If the result is positive, the symbols used for the offset with offset mode are decoded in steps 609 and 610, except for each offset with a value of zero, and then the following step 604 is performed to read the bit stream and decode The position of the SAO band " sao_band_position_X " is shown in Figure 8. If the result is negative in step 603 (" sao_type_idx_X " is set equal to 2), this indicates that the edge offset type is used. Therefore, an edge offset class (corresponding to directions of 0, 45, 90, and 135 degrees) is extracted from the bit stream 601 in step 605. If X is equal to Y, the syntax element is read as "sao_eo_class_luma", and if X is set equal to U and V, the syntax element is read as "sao_eo_class_chroma". When the four offsets have been decoded, reading the SAO parameters is complete, and the process proceeds to step 608. FIG. 11 is a flowchart illustrating how to perform SAO filtering on a video part according to the HEVC specification, for example, during step 67 in FIG. In HEVC, this video part is CTU. This same process is also applied in the decoding loop at the encoder (step 415 in FIG. 4) in order to generate reference frames for motion estimation and compensation of subsequent frames. This process is related to SAO filtering for one color component (so the suffix "_X" in the syntax element has been omitted below). The initial step 701 includes determining the SAO filtering parameters according to the processes depicted in FIGS. 9 and 10. The encoder determines the SAO filtering parameters and includes the encoded SAO parameters in the bitstream. Therefore, in step 701, on the decoder side, the decoder reads and decodes the parameters from the bit stream. Step 701 gives sao_type_idx , and if it is equal to 1, it is sao_band_position 702, and if it is equal to 2, it is sao_eo_class_luma or sao_eo_class_chroma (depending on the color component being processed). It should be noted that if the element sao_type_idx is equal to 0, no SAO filtering is applied. Step 701 also gives an offset table 703 with 4 offsets. In step 704, the variable i for each pixel Pi that continuously considers the current block or frame region (CTU) is set to 0. In step 706, the frame 705 comprises a region of N pixels (in the current HEVC standard CTU) extracts the pixel P i. In step 707, pixels P i are classified according to the edge offset classification described with reference to FIGS. 7A and 7B or the band offset classification as described with reference to FIG. 8. The decision module 708 tests whether P i is in a class to be filtered using traditional SAO filtering. If P i is in the filtered class, the relevant class number j is identified, and in step 710 the relevant offset value is extracted from the offset table 703
Figure 02_image005
. In the case of conventional SAO filtering, in step 711, this
Figure 02_image005
It is then added to the pixel value P i in order to produce the filtered pixel value
Figure 02_image007
712. This filtered pixel
Figure 02_image007
In step 713, the filtered frame area 716 is inserted. In the embodiments of the present invention, steps 710 and 711 are performed in different ways, which will be explained later in the description of those embodiments. If P i is not in the class to be SAO filtered, then in step 713, P i (709) is inserted into the filtered frame area 716 without filtering. After step 713, the variable i is incremented in step 714 in order to filter the subsequent pixels of the current frame area 705 (if any-test 715). When all pixels have been processed in step 715 (i>=N), the filtered frame area 716 is reconstructed and can be added to the SAO reconstructed frame (see frame 68 of FIG. 6 or 416 of FIG. 4). As mentioned above, the JVET exploration model (JEM) for the future VVC standard uses all HEVC tools. One of these tools is sample adaptive offset (SAO) filtering. However, SAO is less efficient in JEM reference software than in HEVC reference software. This is due to the fact that it has less evaluation and lower efficiency than other loop filters. FIG. 12 is a flowchart illustrating the steps of executing an encoder to determine the SAO parameters of a group (frame or slice) of CTUs at the CTU level. The process starts from the current CTU 1101. First, the statistics for all possible SAO types and classes are accumulated in the variable CTUStats 1102. The process of step 1102 is described below with reference to FIG. According to the set of values in the variable CTUStats, if the CTU on the left is in the current slice, the SAO merges the RD cost 1103 on the left, and the SAO merges the RD cost 1104 on the same evaluation. Due to the statistics in CTUStats 1102, new SAO parameters evaluated for luminance 1105 and for two chroma components 1109. (The two chromaticity metrics are because in the HEVC standard, the chrominance components share the same SAO type). For each SAO type 1006, the best RD offset with offset classification and other parameters 1107 are obtained. The steps 1107 and 1110 are explained below with reference to FIGS. 14 and 15 for edge and band classification, respectively. Due to their respective SAO parameters, all RD costs are calculated (1108). For the two chroma components in the same way, the best RD offset and parameter 1111 are selected. Compare all these RD costs to select the best SAO parameter set 1115. These RD costs are also compared to independently disable SAO 1113, 1114 for luma and chroma components. The use 1115 of the new SAO parameter set is compared with the SAO parameter set 1116 "merged" or shared from the CTU from the left and above. FIG. 13 is a flowchart illustrating an example of statistical data calculated on the encoder side that can be applied to an edge offset type filter in the case of conventional SAO filtering. A similar scheme can also be used for filters with offset type. Figure 13 illustrates the setting of the variable CTUStats, which contains all the information needed to derive each optimal rate distortion offset for each class. In addition, it illustrates the selection of the best SAO parameter set for the current CTU. For each color component Y, U, V (or RGB) 811, each SAO type is evaluated. For each SAO type 812, the variables are changed in the initial step 801
Figure 02_image009
and
Figure 02_image011
Set to zero. The current frame area 803 contains N pixels. j is the current range number to determine four offsets (related to the four edge indexes shown in FIG. 7B for the edge offset type, or 32 pixels shown in FIG. 8 for the offset type Value range related).
Figure 02_image013
Is the scope
Figure 02_image014
The sum of the difference between the pixel in and its original pixel.
Figure 02_image011
Is the number of pixels in the frame area, and its pixel value belongs to the range
Figure 02_image014
. In step 802, the variable i for continuously considering each pixel Pi of the current frame area is set to zero. Then, in step 804, the first pixel of the frame area 803 is extracted. In step 805, the class of the current pixel is determined by checking the conditions defined in FIG. 7B. Then in step 806 a check is performed. During step 806, a check is performed to determine whether the class of pixel values corresponds to the value "none of the above" in FIG. 7B. If the result is yes, the value "i" is incremented in step 808 in order to consider the next pixel of the frame area 803. Otherwise, if the result is no in step 806, the next step is 807, in which the relevant
Figure 02_image017
(Ie, the sum of the number of pixels of the class determined in step 805), and will
Figure 02_image018
Original value
Figure 02_image020
The difference between
Figure 02_image009
. In the next step 808, the variable i is incremented so as to consider the next pixel of the frame area 803. Then perform a test to determine whether all pixels have been considered and classified. If the result is no, the process loops back to step 804 above. On the other hand, if the result is yes, the process proceeds to step 810, in which the current color component X and the SAO type SAO_type and the current class
Figure 02_image014
The variable CTUStats is set equal to
Figure 02_image009
For the first value and
Figure 02_image017
Used for the second value. You can use these variables to calculate, for example, the best offset parameter for each class j
Figure 02_image005
. This offset
Figure 02_image005
It may be the average of the difference between pixels of class j and their original values. therefore,
Figure 02_image005
It is given by the following formula:
Figure 02_image026
It should be noted that the offset
Figure 02_image005
Is an integer value. Therefore, the ratio defined in this formula can be rounded to the nearest value or using the top function or the floor function for rounding. In terms of distortion, each offset
Figure 02_image005
Ooptj is the best offset. To evaluate the RD cost of combining SAO parameters, the encoder will use the statistics set in the table CTUStats. According to the following SAO Merge Left example and considering the type of Luma Left_Type_Y and the four related offsets O_Left_0, O_Left_1, O_Left_2, O_Left_3, the distortion can be obtained by the following formula:
Figure 02_image028
Variable Shift is designed for distortion adjustment. Since SAO is post-filtering, the distortion should be negative. The same calculation is applied for the chroma component. For the three components, the Lambda (λ) of the rate distortion cost is fixed. For the SAO parameter combined with the left CTU, the rate is only one flag, which is CABAC encoded. In order to find the best offset in terms of rate distortion criteria, the offset called ORDj, the encoding process shown in FIG. 14 is applied. This process is applied in steps 1109 to 1112. In the initial step 901 of the encoding process of FIG. 14, the rate distortion value Jj is initialized to the maximum possible value. Then in step 902, an Oj loop from Ooptj to 0 is applied. Note that at each new iteration of the loop, Oj is changed by 1. If Ooptj is negative, the value Oj increases, and if Ooptj is positive, the value Oj decreases. In step 903, the rate distortion cost related to Oj is calculated according to the following formula:
Figure 02_image030
Where λ is the Lagrange parameter, and R(Oj) is a function of the number of bits required to provide the codeword associated with Oj. The formula'SumNbPix j × Oj × Oj-Sum j × Oj × 2'gives the improvement in distortion provided by using offset Oj. In step 904, if J(Oj) is lower than Jj, then Jj=J(Oj) and ORDj is equal to Oj. In step 905, if Oj is equal to 0, the loop ends and the best ORDj of class j is selected. The algorithm in Figures 13 and 14 provides the best ORDj for each class j. This algorithm is repeated for each of the four directions of FIG. 7A. Then, the direction (sum of Jj in each direction) that provides the best rate distortion cost is selected as the direction for the current CTU. This algorithm for selecting the offset value on the encoder side of the edge offset tool (Figures 13 and 14) can be easily applied to the band offset filter to select the best position (SAO_band_position), where j is in the interval [ 0,32], not in the interval [1,4] of FIG. It involves changing the value 4 in modules 801, 810, 811 to 32. More specifically, for the 32 classes in FIG. 8, the parameter Sum j (j=[0,32]) is calculated. This corresponds to the calculation for each range j, the difference between the current pixel value (P i ) and its original value (Porg i ), and each pixel in the image that belongs to a single range j. Then, using the same process as described in FIG. 14, the optimal offset in terms of rate distortion ORDj is calculated for 32 classes. The next step involves finding the optimal position of the SAO band position of Figure 8. This is determined through the encoding process shown in FIG. 15. The encoding process of FIG. 14 has been used with the best offset ORDj in terms of rate distortion to calculate the RD cost Jj for each range. In FIG. 15, in the initial step 1001, the rate distortion value J is initialized to the maximum possible value. Then, in step 1002, a loop to 28 positions j of 4 consecutive classes is run. Next, in step 1003, the variable Jj corresponding to the RD cost of the (4 consecutive classes) band is initialized to 0. Then, in step 1004, a loop for four consecutive offsets j is run. In step 1005, Ji increases the RD cost of four classes Jj (j=i to i+4). If this cost Ji is lower than the optimal RD cost J, then in step 1007, J is set to Ji, and sao_band_position = i, and the next step is step 1008. Otherwise, the next step is step 1008. Test 1008 checks whether the loop to 28 positions has ended. If not, the process continues to step 1002, otherwise the encoding process returns the optimal band position as the current value of sao_band_position 1009. Therefore, the CTUStats table in the case where SAO parameters are determined at the CTU level is created through the process of FIG. 12. This corresponds to evaluating the CTU level in terms of the rate-distortion trade-off. This evaluation can be performed for the entire image or only for the current slice. FIG. 16 shows various packets 1201-1206 of CTU in a slice. The first packet 1201 has individual CTUs. This first packet requires a set of SAO parameters per CTU. It corresponds to the CTU level described earlier. The second group 1202 makes all the CTUs of the entire video into a group. Therefore, in contrast to the CTU level, all CTUs of a frame (and therefore slices of the entire frame or a portion thereof) share the same SAO parameters. In order for all CTUs of an image to share the same SAO parameters, one of two methods can be used. In both methods, the encoder first calculates a set of SAO parameters to be shared by all CTUs of the image. Then, in the first method, these SAO parameters are set for the first CTU of the slice. For each remaining CTU from the second CTU to the last CTU of the slice, if there is a flag (that is, if the current CTU has a left CTU), the sao_merge_left flag is set equal to 1. Otherwise, set the sao_merge_up flag equal to 1. FIG. 17 shows an example of a CTU with SAO parameter set according to the first method. This method has the advantage of not requiring signaling of packets to the decoder. Furthermore, there is no need to change the decoder to introduce packets, and only the encoder. Therefore, packets can be introduced in HEVC-based encoders without modifying the HEVC decoder. Surprisingly, the packet does not increase the code rate too much. This is because merge flags are usually CABAC encoded in the same context. Since these flags have the same value (1) for the second group (the entire image), the code rate consumed by these flags is very low. This is because they always have the same value and the probability is 1. In the second method of making all CTUs of the image share the same SAO parameters, the packet is sent to the decoder in the bit stream. For example, also in the slice header, the SAO parameter is sent as the SAO parameter for the packet (whole image). In this case, the packet transmission consumes bandwidth. However, the merge flag can be omitted, and the code rate associated with the merge flag can be saved in order to reduce the code rate overall. The first and second packets 1201 and 1202 provide very different rate-distortion trade-offs. The first packet 1201 is at an extreme. It controls the SAO parameters (CTU-by-CTU) very finely, which should reduce distortion, but at the cost of a lot of signaling. The second group is at the other extreme. It controls the SAO parameters (a group of the entire image) very roughly, which causes distortion but has very light signaling. Next, how to determine the SAO parameters of the second packet 1202 in the encoder will be explained. In the second grouping 1202, the determination is made for the entire image, and all CTUs of the slice/frame share the same SAO parameters. FIG. 18 is an example of setting the SAO parameters for the frame/slice level using the first method of sharing SAO parameters (ie, there is no new SAO classification on the encoder side). This diagram is based on Figure 17. At the beginning of the process, a CTUStats table is set for each CTU (in the same way as CTU-level coding selection). This CTUStats can be used for traditional CTU level 1302. Then the table FrameStats 1303 is set by adding each value to all CTUs of the table CTUStats. Next, the same treatment as the CTU level is applied to find the optimal SAO parameters 1305 to 1315. In order to set the SAO parameters for all CTUs of the frame, the SAO parameter set selected in step 1315 is set for the first CTU of the slice/frame. Then, for each CTU from the second CTU to the last CTU of the slice/frame, if sao_merge_left_flag exists, set it equal to 1, otherwise set sao_merge_up_flag equal to 1 (actually for the second CTU to the last CTU , There is merge left or merge on or both) 1317. The syntax of the SAO parameter set is the same as the syntax shown in FIG. 9. At the end of the process, SAO parameters are set for the entire slice/frame. Therefore, the CTUStats table in the case where SAO parameters are determined for the entire image (frame level) is created through the process of FIG. 18. This corresponds to evaluating the frame level based on the rate-distortion trade-off. Then compare these assessments and choose the one with the best performance. The example of determining SAO parameters in FIG. 18 corresponds to the first method of sharing SAO parameters because it uses a merge flag to share the SAO parameters among all CTUs of the image (see steps 1316 and 1317). If the second method of sharing SAO parameters is used, these steps can be omitted, as described in further embodiments below. FIG. 19 is an example of setting the SAO parameter set for the third packet 1203 on the encoder side. This diagram is based on Figure 12. In order to reduce the number of steps in the figure, the modules 1105 to 1115 have been merged into one step 1405 in FIG. 19. At the beginning of the process, the CTUStats table is set for each CTU. This CTUStats can be used for traditional CTU level 1302 encoding selection. For each column 1403 of the current slice/frame, for each CTU 1404 of the current column, the table ColumnStats is set by adding each value 1405 from CTUStats 1402. Then, for the CTU level 1406 encoding selection (refer to FIG. 12), new SAO parameters are determined. If it is not the first column, the RD cost 1407 of sharing the SAO parameters with the previous left column is also evaluated, in the same way as the SAO parameter set is shared between the left and upper CTUs 1103, 1104. If the shared SAO parameter gives a better RD cost 1408 than the RD cost of the new SAO parameter set, then set sao_merge_left_flag equal to 1 for the first CTU in the column. The address number of this CTU is equal to the value "Column". Otherwise, the SAO parameter set of the first CTU in this column is set equal to (1409) the new SAO parameter obtained in step 1406. For all other CTUs 1411 in this column, set their SAO merge left sao_merge_left_flag equal to 0 (if it exists) and the SAO merge above sao_merge_up_flag equal to 1. Then, the SAO parameter set 1403 of the next column can be processed. Please note that all the CTUs of the frame have sao_merge_left_flag equal to 0 (if it exists) and sao_merge_up_flag equal to 1 except for the CTU in the first row. Therefore, step 1412 may be performed once per frame. The advantage of such CTU grouping is another RD trade-off between CTU-level coding choice and frame level, which may be useful for certain conditions. Furthermore, in this example, a merge flag is used within the group, which means that a third packet can be introduced without modifying the decoder (ie, the packet can be HEVC compatible). Of course, the second method of sharing SAO parameters described in the third embodiment may be used instead. In this case, the merge flag is not used in the group (CTU column), and steps 1411 and 1412 are omitted. In a variant, there is no need to check the merge between columns. This means that steps 1407, 1408, 1410 have been removed from the process of FIG. The advantages of removing this possibility are simplified implementation and the ability to parallelize the process. This has little effect on coding efficiency. Another possible intermediate compromise between the CTU level and the frame level can be provided by the fourth packet 1204 in FIG. 16, which makes a row of CTUs into a group. In order to determine the SAO parameters of this fourth group, a process similar to FIG. 18 can be applied. In this case, the variable ColumnStats is replaced by LineStats. Step 1403 is replaced by "For Line=0 to Num_CTU_in_Height". Step 1404 is replaced by "for CTU_in_line=0 to Num_CTU_in_Width". Step 1405 is replaced by ColumnStats[][][][]+=CTUStats[Line* Num_CTU_in_Width+CTU_in_line][][][][]. Based on this LineStats table, the new SAO parameters and the merge with the above CTU are evaluated (steps 1406, 1407). Step 1410 is replaced by setting sao_merge_up_flag to 1 for the first CTU of the row. And, for all CTUs of the slice/frame (except for each first CTU of each line), sao_merge_left_flag is set equal to 1. The advantage of this line is another RD trade-off between CTU level and frame level. Note that frames or slices are rectangular in most cases, and their width is greater than their height. Therefore, it is expected that the row CTU packet 1204 is an RD compromise closer to the frame CTU packet 1202 than the column CTU packet 1203. As for the other CTU groups 1202 and 1203, if the merge flag is used in the group, the row CTU group may be HEVC compatible. As for the column CTU group 1203, the evaluation of combining 2 rows can be removed. By putting two or more columns of CTUs or two or more rows of CTUs together into a group, other RD trade-offs can be provided. The process of FIG. 18 can be applied to determine the SAO parameters of these groups. In one embodiment, the number N of columns or rows in a group may depend on the target grouping number. When a slice or frame is large (for HD, 4K, or higher), it may be particularly advantageous to use a number of rows or rows for CTU grouping. As mentioned earlier, in a variant, there is no need to evaluate the merge between these groups containing two or more columns or two or more rows. Another possible grouping includes split columns or split rows, where the split is suitable for the current slice/frame. Another possible compromise between the CTU level and the frame level can be provided by the square CTU packets 1205 and 1206 shown in FIG. Group 1205 makes 2×2 CTUs into a group. Group 1206 groups 3×3 CTUs. FIG. 20 shows an example of how to determine SAO parameters for such grouping. For each N×N group 1503, 1504, 1505, and 1506 table N×NStats 1507 are set based on CTUstats. In addition to the RD cost of the SAO parameter shared on the left 1510 or the 1509 shared above, use this table to determine the new SAO parameter 1508 and its RD cost. If the best RD cost is the new SAO parameter 1511, the SAO parameter of the first CTU (upper left CTU) of the N×N group is set equal to this new SAO parameter 1514. If the best RD cost is to share SAO parameters with the above N×N group 1512, then set the sao_merge_up_flag of the first CTU (upper left CTU) of the N×N group equal to 1 and set sao_merge_left_flag to 0 (1515). If the best RD cost is to share SAO parameters with the left N×N group 1513, then set the sao_merge_left_flag of the first CTU (upper left CTU) of the N×N group equal to 1 (1516). Then, the sao_merge_left_flag and sao_merge_up_flag are correctly set for the other CTUs of the N×N group to form SAO parameters 1517 for the current N×N group. FIG. 21 shows the setting of the 3×3 SAO group. The upper left CTU is set equal to the SAO parameters determined in steps 1508 to 1516. For the other 2 above CTUs, set sao_merge_left_flag equal to 1. Since sao_merge_left_flag is the first encoded or decoded flag and it is set to 1, there is no need to set sao_merge_up_flag to 0. For the other 2 CTUs in the first row, set sao_merge_left_flag equal to 0 and set sao_merge_up_flag equal to 1. For other CTUs, set sao_merge_left_flag equal to 1. The advantage of N×N CTU grouping is to create several RD tradeoffs for SAO. As for other groupings, if the merge flags within these groups are used, these groupings may be HEVC compatible. As for other groupings, in FIG. 19, the tests of the merge left (Merge left) and merge above (Merge up) between the groups can be omitted. Therefore, steps 1509, 1510, 1512, 1513, 1515, and 1516 can be removed, especially when N is high. In a variant, the value N depends on the size of the frame/slice. The advantage of this embodiment is to obtain an effective RD trade-off. In a preferred variant, only N is evaluated to be 2 and 3. This provides an effective compromise. The possible packets compete with each other as the SAO parameter derivation to be selected for the current slice. In the following, according to the sixth embodiment of the present invention, an example of how to use a rate-distortion tradeoff comparison to select SAO parameter derivation is described with reference to FIG. 22. 23 is a flowchart illustrating a decoding process when a CTU packet is transmitted in a slice header according to the second method of sharing SAO parameters among a group of CTUs. First, the flag SaoEnabledFlag 1801 is extracted from the bit stream. If SAO is not enabled, the next slice header syntax element 1807 is decoded, and SAO will not be applied to the current slice. On the contrary, the decoder extracts N bits 1803 from the slice header. N depends on the number of available CTU packets. Ideally, the number of CTU packets should be equal to N to the power of two. The corresponding CTU group index 1804 is used to select the CTU group method 1805. This grouping method is applied to extract SAO syntax and to determine the SAO parameter set 1806 for each CTU. Then, the next slice header syntax element is decoded. The advantage of sending at the slice header of a CTU packet is that it has a very low impact on the bit rate. But when the number of slices is large for frames, it may be desirable to reduce this signaling. Therefore, in a variant, the CTU packet index uses the unary maximum code in the slice header. In this case, CTU packets are ordered according to their probability of occurrence (highest to lowest). For example, at least one SAO parameter derivation is an intermediate level derivation (SAO parameters are not at the CTU level or at the group level). When applied to a group, it causes the group (eg, frame or slice) to be subdivided into subdivided parts (CTU grouping 1203-1206, eg, multi-column CTUs, multi-row CTUs, N×N CTUs) Etc.) and derive the SAO parameters for each subdivision. Each subdivision part is composed of two or more of the image parts (CTU). The advantage of the intermediate stage derivation is that one or more effective rate-distortion tradeoffs are introduced. Intermediate-level derivation can be used without CTU-level derivation, frame-level derivation, or neither of these two types of derivation. Preferably, the smallest packet is the first packet 1201, where each CTU is a group, and each CTU has a set of SAO parameters. However, a set of SAO parameters can be applied to smaller blocks than CTU. In this case, the derivation is not at the CTU level, frame level or intermediate level between the CTU and frame level, but at the sub-CTU (sub-CTU) level (a smaller level than the video part). In this case, instead of sending the packet, the index indicating the depth of the SAO parameter is valid. The following table shows an example of possible indexing schemes:
Figure 108118389-A0304-0001
Index 0 means that each CTU is divided into 16 blocks and each block may have its own SAO parameters. Index 1 indicates that each CTU is divided into 4 blocks, and each block has its own SAO parameters. The selected derivation is then sent to the decoder in the bit stream. The signaling may include deep syntax elements (eg, using the indexing scheme above). In a variant, at least one derivation, when applied to a group, causes the group to be subdivided into subdivision parts, and the SAO parameters of each subdivision part are derived, and each image part is composed of two or more Subdivided parts. In a variant, the first derivation, when applied to a group, causes the group to have SAO parameters at the first level, and the second derivation, when applied to the group, causes the group to have a difference from the first SAO parameters of the second level. These levels may be any two levels from the frame level to the sub-CTU level. These levels may correspond to the groups 1201-1206 in FIG. Preferably, the SAO parameter is signaled for the slice, which indicates that all CTUs used for the slice are derived. In addition, when the level of the SAO parameter selected for the slice is an intermediate level between the slice level and the CTU level, the derivation can be selected for each CTU group (eg, columns of CTUs) of the slice or frame. In FIG. 24, the SAO merge flag can be used between groups of CTU groups. As depicted in FIG. 24, for 2×2 CTU grouping, SAO merge Left and SAO merge up are reserved for each group of 2×2 CTUs. But for the CTUs in this group, they are removed. Please note that only sao_merge_left_flag is used for grouping 1203 of one column of CTU, and only sao_merge_up_flag is used for grouping 1204 of one row of CTU. In a variant, the flag signals whether the current CTU group shares its SAO parameters. If it is true, a grammatical element representing one of the previous groups is sent. Therefore, each group of slices can be predicted through the previous group, except for the first group. This increases coding efficiency by adding several new possible predictors. Referring back to the previous example, it has been mentioned that when the CTU of the same position does not use SAO or the CTU without the same position uses SAO, the preset SAO parameter set can be used. In a variant, the preset set depends on the selected group. For example, the first preset set may be associated with one group (or one level of SAO parameters), and the second preset set may be associated with another group (or another level of SAO parameters). It is found that the size of the group (or the level of the SAO parameter) has an effect on the SAO parameter effectively as a preset. Different preset sets can be determined by the encoder and transmitted to the decoder in the sequence parameter set. Then, the decoder uses the appropriate preset set according to the group selected for the current slice. In a variant, the depth of SAO parameters is selected for the slice, including a depth smaller than the CTU, so that it is possible for each block in the CTU to have a set of SAO parameters. The embodiments of the present invention described below aim to improve the coding efficiency of SAO by using various techniques to determine one or more SAO parameters of the image portion in the current image. First group of embodiments In the first group of embodiments, it is proposed to improve the use of syntax elements by making use of the flags described in reference to FIG. 9: " sao_merge_up_flag " and " sao_merge_left_flag " so that an image part (for example, a CTU) Another image part (another CTU) infers the SAO parameters. First Embodiment In the first embodiment, a method for sampling adaptive offset (SAO) filtering of an image by signaling in a bit stream is proposed. The image includes a plurality of image parts, and the image parts are divided Form multiple groups. The method includes: determining whether an image part belongs to a predetermined group, and if the image part belongs to the predetermined group, including a first syntax element in the bit stream for signaling SAO for performing SAO filtering on the image part The parameter is inferred from the SAO parameter used to filter another image part, otherwise, the first syntax element is not included. An example of the first embodiment is shown in FIG. 25. FIG. 25 is a flowchart illustrating steps of a process that can be implemented in an encoder to encode SAO parameters according to the first embodiment. More precisely, this figure shows as an example, based on the CTU packet, signaling within the bitstream 4114 to infer or not to infer the SAO parameters provided to the CTU or a group of CTUs. Preferably, when there is no signaling for inferring SAO parameters, for example, if the image part does not belong to a predetermined group, the SAO parameter for filtering the image part is included in the bit stream. More specifically, the encoder first checks in test 4102 whether information, such as packet index 4101, is set equal to a predetermined level, such as CTU level 4102. As a variant, the SAO merge flag (first syntax element) is not included in the bit stream if the image part belongs to a group containing at least two image parts. As another variation, if the CTU belongs to the group consisting of-2*2 CTU, or-3*3 CTU, or-a row of CTU (or partial row), or-a column of CTU (or partial column), or- For all CTUs of the image, the SAO parameters used to filter the image part are included in the bitstream. In addition, if the video part belongs to a group containing divided video parts, the first syntax element may be included in the bit stream. More precisely, if the image part belongs to the group consisting of-divided into 16 parts of the image part, or-divided into 8 parts of the image part, or-divided into 4 parts of the image part, the first syntax The element is included in the bitstream. If the test result is no, then for the three components Y, U, V 4111, a new SAO parameter set is inserted into the 4112 bit stream 4114. Repeat steps 4111 and 4112 until the last CTU is processed. If the packet index is set equal to the CTU level value (YES for test 4102), and if the left CTU (indicating that the CTU bit is to the left of the processed CTU) exists (test 4103), insert sao_merge_left_flag in step 4104 Bitstream 4114. If sao_merge_left_flag is not equal to no (or value '0') in test 4105, and if the above CTU is present in test 4109 (indicating that the CTU bit is above the processed CTU), then sao_merge_up_flag is inserted into the bit in step 4107 Yuanliu 4114. If test 4108, the flag sao_merge_up_flag is set equal to no (or value '0'), then in steps 4111, 4112, and 4113 a new SAO parameter set is inserted into the bitstream. In a variant, step 4112 may also include inserting the flag sao_merge_flags_enabled . The flag is a second syntax element, associated with the group of image parts, and used to signal whether to enable or disable the use of the first syntax element. Second Embodiment In the second embodiment, based on criteria (such as the group to which the CTU belongs, or the prediction or coding mode used), sao_merge_flags_enabled can be included in the bitstream to signal whether SAO is enabled or disabled The use of a merge flag, which is used to signal whether the SAO parameter used to perform SAO filtering on the image part is inferred from the SAO parameter used to filter another image part. New steps of the process can be implemented in the encoder. For example, when an index or first or second syntax element is included in the bitstream, the index or first or second syntax element is inserted at the following levels: image level, or sequence level, when the image belongs to a video sequence . Third Embodiment FIG. 25 is a flowchart showing the steps of the process of parsing SAO parameters, as an alternative to the process shown in FIG. 9, and is related to the coding steps implemented in the encoder described in FIG. 22. These steps are preferably implemented in the decoder. This second embodiment proposes a method of performing sample adaptive offset (SAO) filtering on an image. The image includes a plurality of image parts, and the image parts are grouped into a plurality of groups. The method includes: obtaining information indicating whether the group of image parts belongs to a predetermined group, and if the group of image parts belongs to the predetermined group, obtaining a first syntax element whose signaling is inferred from SAO parameters used to filter another image part SAO parameters used to perform SAO filtering on the image part, otherwise, the first syntax element is not acquired. Preferably, the process of FIG. 25 is applied to each CTU to generate SAO parameter sets for all components. This information is detected in test 4014 before the SAO parameters of the CTU or a group of CTUs (when there are packets of CTUs). For example, the information may be the group index 4013 described previously. It is detected whether it is set equal to a value indicating a predetermined group or a predetermined group, for example, corresponding to the CTU level index 4014. For example, the CTU level index may be decoded from the header first. In this case, in step 4003 extracts sao_merge_left_flag (first syntax element) from the bitstream 4002, and, if desired, also extracted from the bitstream 4002 sao merge up flag (first syntax element) in Step 4005. If in test 4014, the packet index is not set equal to the CTU level index, the flags sao_merge_left_flag and sao_merge_up_flag are not considered, and in step 4007 new SAO parameters are extracted from the bitstream 4002. The other steps 4004, 4006, and 4008-4012 are similar to the previously described steps 504, 506, 508-512 in FIG. 9, respectively. In a variant, the merge flag is reserved for the CTU level, but the merge flag is removed for all other CTU packets, as shown in FIG. 25. The advantage is the flexibility of CTU level. In a variant, if the image part belongs to a group containing at least two image parts, the first syntax element is not acquired. In another variation, when the SAO signal is lower than or equal to the CTU level (1/16 CTU or ¼ CTU or 1/8 CTU), a merge flag is used for the CTU, and for other CTU group shifts with larger groups Except merge flag. The following table illustrates this embodiment:
Figure 108118389-A0304-0002
In other words, if the image part is a group consisting of-2*2 image parts, or-3*3 image parts, or-a row of image parts (or partial rows), or-a column of image parts ( Or part of the column), or-all image parts of the image, then the first syntax element(s) is not included in the bit stream. Fourth Embodiment FIG. 26 is a flowchart showing a third embodiment, which is a modification of the second embodiment in FIG. 25. However, the new test 4214 evaluates the value of the syntax element and whether the flag sao_merge_flags_enabled (second syntax element) is true to enable the tests to decode the flags sao_merge_left_flag and sao_merge_up_flag in tests 4203 and 4205, instead of detecting the value of the group index, as shown in the figure Shown in 25. In other words, the information is the second syntax element associated with the group of video parts, and whether to enable or disable the use of the first syntax element ( sao_merge_left_flag and sao_merge_up_flag) . Fifth Embodiment In the fifth embodiment, a method for performing sample adaptive offset (SAO) filtering on an image is proposed. The image includes a plurality of image parts, and the image parts are grouped into a plurality of groups. The method includes: acquiring syntax elements in the bit stream based on predetermined criteria, for signaling whether to enable or disable the use of one or more other syntax elements, and the one or more other syntax elements for signaling whether to use The SAO parameters used to filter another image part infer the SAO parameters used to perform SAO filtering on the image part. For example, the predetermined criterion is whether the image part belongs to a predetermined group. In the third, fourth and fifth embodiments, when the step is implemented in the decoder to decode the image from the bitstream (respectively 4002 or 4202), the information or SAO parameters are parsed from the bitstream, or The first or second syntax element. As for the encoder side (Figure 25), when parsing the information or SAO parameter, or the first or second syntax element from the bit stream, the information or SAO parameter, or the first or second syntax element is related to the following: Image level, or sequence level, when the image belongs to a video sequence. In the foregoing embodiment, when the co-located CTU does not use SAO or when the co-located CTU does not use SAO, a preset SAO parameter set may be used. In a variant, the preset set depends on the selected depth of the SAO parameters. For example, the first preset set may be associated with one depth (eg 1/16), and the second preset set may be associated with another depth (eg ¼). It is found that the depth has an effect on the SAO parameters effectively as a preset. Different preset sets can be determined by the encoder and transmitted to the decoder in the sequence parameter set. The decoder then uses the appropriate preset set according to the depth selected for the current slice. In a variant, one possibility is to remove the SAO merge flag for all levels. This means that steps 503, 504, 505, 506 of FIG. 9 have been removed. The advantage is that it significantly reduces the SAO's signaling and therefore the bit rate. In addition, the design is simplified by removing two syntax elements at the CTU level. The merge flag is important for small block sizes because the SAO parameter set is expensive compared to the number of samples it can improve. In this case, these syntax elements reduce the cost of SAO parameter signaling. For large groups, the SAO parameter integration cost is low, so using merge flags is inefficient. Therefore, the advantage of these embodiments is improved coding efficiency. Sixth Embodiment In the sixth embodiment, several SAO derivations are evaluated at the encoder, and the SAO syntax opposed at the CTU level is inserted in the bit stream. Therefore, the decoder is not modified. One of the advantages is that this embodiment can be used with HEVC compatible decoders. All these different packets defined in the previous embodiment can be compared on the encoder side to select one packet that can give the best RD compromise for the current frame. Fig. 22 shows this embodiment. More specifically, FIG. 22 shows an example of how to use rate-distortion trade-off comparison to select SAO parameter derivation. One possibility to increase coding efficiency on the encoder side is to test all possible SAO packets, but this should increase the coding time compared to the example of FIG. 22 which evaluates a small subset of packets. The current slice/frame 1701 is used to set the CTUStats table 1703 for each CTU 1702. This table 1703 is used to evaluate CTU level 1704, frame/slice grouping 1705, column grouping 1706, row grouping 1707, 2×2 CTU grouping 1708 or 3×3 CTU grouping 1709 or as previously described (in a non-limiting manner) All other CTU packets that have been described. The best CTU packet 1710 is selected according to the rate distortion criterion calculated for each packet. The SAO parameter set for each CTU is set (1711) according to the packet selected in step 1710. These SAO parameters 1712 are then used to apply SAO filtering 1713 to obtain filtered frames/slices. Then the SAO parameter 1711 of each CTU is inserted into the bit stream, as described in FIG. 9. The advantage of this embodiment is that it does not require any modification of HEVC SAO on the decoder side, so this method is HEVC compatible. The main advantage is to improve coding efficiency. The secondary advantage is that this competitive method does not require any additional SAO filtering or classification. In fact, the main impact on the complexity of the encoder is step 1702, which requires SAO classification of all possible SAO types, and step 1713, which filters samples. All other CTU packet evaluations are only an increase in some values that have been obtained during CTU-level coding selection (set in the table CTUStats). Another possibility to increase the coding efficiency on the encoder side is to test all possible SAO packets, but this should increase the coding time compared to the example of FIG. 12 which evaluates a small subset of packets. Second group of embodiments Seventh embodiment Therefore, in the seventh embodiment, the competition between different allowed SAO parameter derivations is modified so that only one derivation is allowed in the encoder for any given slice or frame. The allowed derivation may be determined based on one or more features of the slice or frame. For example, the allowed derivation can be selected according to the slice type (Intra, Inter_P, Inter_B), the slice quantization level (QP), or the position in the hierarchy of the group of pictures (GOP). The advantage of this embodiment is that it reduces complexity. It is useful for hardware encoders to select only one derivation instead of evaluating two or more competing derivations. Therefore, in a variant, the first derivation is associated with the first set of images (eg, Intra slices), and the second derivation is associated with the second set of images (eg, Inter_P slices). Determine whether the group to be filtered is the first group or the second group. If it is determined that the group to be filtered is the first group, the first derivation is used to filter the image part of the group, and if the group to be filtered is the second group, the second derivation is used to filter the group Image part. There is no need to evaluate both derivations. Determining whether the group to be filtered is the first group or the second group can be based on one or more of the following:-slice type;-the frame type of the image to which the group to be filtered belongs;-the image to which the group to be filtered belongs The position in the quality level of the group of pictures;-the quality of the image to which the group to be filtered belongs; and-the quantization parameter that can be applied to the group to be filtered. For example, when the first group has a higher quality or a higher position in the quality hierarchy than the second group, the first derivation may have fewer image parts in each group than the second derivation. In a variant, the derivation of specific SAO parameters is selected for a given slice or frame. However, if the encoder is capable of evaluating a limited number of competition derivations, it is not necessary to eliminate competition completely. Competition for a given slice or frame is still allowed, but the set derived from competition is adapted to the slice or frame. The set of contention derivations may depend on the slice type. For Intra slicing, the set preferably contains packets in which the group has a small number of CTUs (eg, CTU level, 2×2 CTU, 3×3 CTU, and columns). And, if depths below CTU are available (as in the tenth embodiment), these depths are preferably also included. For Inter slices, the derived set preferably contains packets in which the group has a large number of CTUs including lines, frame levels. However, smaller packets down to the CTU level can also be considered. The advantage of this embodiment is that the coding efficiency is improved because the derivation adapted to slices or frames is used. In a variant, the set of derivations used for Inter B slices may be different from the set of derivations used for Inter P slices. In another variant, the set of contention derivations depends on the characteristics of the frames in the GOP. This is particularly beneficial for frames with different quality (QP) based on the quality level. For the frame with the highest quality or the highest position in the hierarchy, the set of contention derivations should include groups containing less CTU or even sub-CTU depth (same as above for Intra slices). For frames with lower quality or lower positions in the hierarchy, the set of contention derivations should include groups with more CTUs. The set of contention derivation can be defined in the sequence parameter set. Therefore, in the seventh embodiment, the first set of derivations is associated with the first set of images (eg, Intra slices), and the second set of derivations is associated with the second set of images (eg, Inter_P slices). Determine whether the group to be filtered is the first group or the second group. If it is determined that the group to be filtered is the first group, a derivation is selected from the first group derivation and used to filter the image part of the group, and if it is determined that the group to be filtered is the second group, the selection is derived from the second group One is derived and used to filter the image portion of the group. There is no need to evaluate derivations that are not in the associated derivation group. In the previous embodiment, it can be determined whether the group to be filtered is the first group or the second group. For example, when the first group has a higher quality or a higher position in the quality hierarchy than the second group, the first group of derivations may have at least one derivation, each of which has fewer image parts than the second group of derivations. The set of CTU packets can be defined in the sequence parameter set. In other words, the seventh embodiment proposes a method of encoding an image including a plurality of image parts. The method includes predicting one or more image parts from one or more other image parts according to the first or second prediction mode, and grouping the predicted image parts into one of a plurality of groups according to the prediction mode used Or multiple groups, and perform sample adaptive offset (SAO) filtering on the predicted image portion according to the group. For example, the image part is predicted from another image part in the image using intra prediction mode, or is predicted from another reference image instead of another image part in the image using inter prediction mode of. FIG. 28 shows a system 191, 195 according to an embodiment of the present invention, which includes at least one of an encoder 150 or a decoder 100 and a communication network 199. According to an embodiment, the system 195 is used to process and provide content (for example, video and audio content for display/output or streaming video/audio content) to the user, for example, through a user terminal including the decoder 100 or The user interface of the user terminal communicating with the decoder 100 accesses the decoder 100. Such a user terminal may be a computer, mobile phone, tablet, or any other type of device capable of providing/displaying (supplied/streamed) content to the user. The system 195 acquires/receives the bit stream 101 (in the form of a continuous stream or signal-for example, when displaying/outputting early video/audio) through the communication network 199. According to an embodiment, the system 191 is used to process content and store processed content, for example, video and audio content processed for later display/output/streaming. The system 191 obtains/receives content containing the original image sequence 151, which is received and processed by the encoder 150 (including filtering using the deblocking filter according to the present invention), and the encoder 150 generates a bit stream 101, which passes through the communication network Way 199 is transmitted to the decoder 100. The bit stream 101 is then transmitted to the decoder 100 in various ways. For example, it can be pre-generated by the encoder 150 and stored as data in a storage device in the communication network 199 (for example, in a server or cloud storage Above) until the user requests content (ie, bit stream data) from the storage device, at which time the data is transmitted/streamed from the storage device to the decoder 100. The system 191 may also include a content providing device for providing/streaming to the user (e.g., by transmitting data to be displayed on the user terminal for the user interface) content information of the content stored in the storage device (For example, the title of the content and other meta/storage location data for identifying, selecting, and requesting content), and for receiving and processing user requests for content, so that the requested content can be sent from the storage device/ Stream to the user terminal. Alternatively, the encoder 150 generates a bit stream 101 and transmits/streams the bit stream directly to the decoder 100 when the user requests content. Then, the decoder 100 receives the bit stream 101 (or signal) and performs filtering according to the present invention using a deblocking filter to obtain/generate a video signal 109 and/or an audio signal, which is then used by the user terminal to request Content is provided to users. In the foregoing embodiments, the described functions can be implemented by hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted via the computer-readable medium, and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, which include aids in transferring computer programs from one place to another, for example, in accordance with communication protocols Local media. In this way, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media or (2) communication media, such as signals or carrier waves. The data storage media may be any available media that can be accessed by one or more computers or one or more processors to extract instructions, codes, and/or data structures used to implement the techniques described in this disclosure. The computer program product may include computer readable media. By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or may be used to Any other media that stores the required code in the form of commands or data structures and can be accessed by a computer. Also, any connection is appropriately called a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave are used to transmit commands from a website, server, or other remote source, then the coaxial cable, fiber optic cable, Twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are directed to non-transitory, tangible storage media. The discs and discs used in this article include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy discs, and Blu-ray discs, where discs usually reproduce data magnetically, while discs use lasers The data is reproduced optically. The above combination should also be included in the scope of computer-readable media. Instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalents Integrated or discrete logic circuits. Therefore, the term "processor" as used herein may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated into a combined codec. Moreover, these techniques can be fully implemented in one or more circuits or logic elements. The technology of the present disclosure may be implemented in various devices or equipment, including wireless handsets, integrated circuits (ICs), or a group of ICs (eg, chipsets). Various elements, modules, or units are described in this disclosure to emphasize the functional aspects of devices configured to perform the disclosed technology, but do not necessarily need to be implemented by different hardware units. Rather, as described above, various units can be combined in a codec hardware unit, or provided by a set of interoperable hardware units, which include one or more processors as described above, together with suitable software and/or Or firmware.

1‧‧‧視訊序列 2‧‧‧影像 3‧‧‧切片 4‧‧‧編碼樹單元(CTU) 5‧‧‧編碼單元 6‧‧‧預測單元(PU) 7‧‧‧轉換單元(TU) 200‧‧‧資料通訊網路 201‧‧‧伺服器 202‧‧‧客戶終端 204‧‧‧資料流 300‧‧‧處理裝置 302‧‧‧通訊介面 303‧‧‧通訊網路 304‧‧‧資料儲存機構 305‧‧‧磁碟驅動器 306‧‧‧磁碟 307‧‧‧唯讀記憶體 308‧‧‧麥克風 309‧‧‧螢幕 310‧‧‧鍵盤 311‧‧‧中央處理單元 312‧‧‧隨機存取記憶體 313‧‧‧通訊匯流排 320‧‧‧數位相機 400‧‧‧編碼器 401‧‧‧原始序列影像 402‧‧‧模組 403‧‧‧模組 404‧‧‧運動估計模組 405‧‧‧運動補償模組 406‧‧‧選擇模組 407‧‧‧轉換模組 408‧‧‧量化模組 409‧‧‧熵編碼模組 410‧‧‧位元流 411‧‧‧反向量化模組 412‧‧‧逆轉換模組 413‧‧‧幀內預測模組 414‧‧‧運動補償模組 415‧‧‧模組 416‧‧‧參考影像 417‧‧‧運動向量預測及編碼模組 418‧‧‧運動向量場 51~58‧‧‧步驟 60‧‧‧解碼器 61‧‧‧位元流 62‧‧‧模組 63‧‧‧模組 64‧‧‧模組 65‧‧‧幀內預測模組 66‧‧‧模組 67‧‧‧後濾波模組 68‧‧‧參考影像 69‧‧‧視訊信號 70‧‧‧運動向量解碼模組 71‧‧‧運動向量場資料 40‧‧‧一組帶 41~44‧‧‧連續的帶 501~512‧‧‧步驟 601~610‧‧‧步驟 701~716‧‧‧步驟 1101~1116‧‧‧步驟 801~814‧‧‧步驟 901~906‧‧‧步驟 1001~1009‧‧‧步驟 1301~1318‧‧‧步驟 1401~1413‧‧‧步驟 1501~1519‧‧‧步驟 1701~1714‧‧‧步驟 1801~1807‧‧‧步驟 4001~4014‧‧‧步驟 4201~4214‧‧‧步驟 4101~4114‧‧‧步驟 100‧‧‧解碼器 101‧‧‧位元流 109‧‧‧視訊信號 150‧‧‧編碼器 151‧‧‧原始影像序列 191‧‧‧系統 199‧‧‧通訊網路 195‧‧‧系統1‧‧‧Video sequence 2‧‧‧Image 3‧‧‧Slice 4‧‧‧ Coding Tree Unit (CTU) 5‧‧‧Coding unit 6‧‧‧Prediction Unit (PU) 7‧‧‧ Conversion Unit (TU) 200‧‧‧Data communication network 201‧‧‧Server 202‧‧‧Client terminal 204‧‧‧Data flow 300‧‧‧Processing device 302‧‧‧Communication interface 303‧‧‧Communication network 304‧‧‧ data storage organization 305‧‧‧disk drive 306‧‧‧disk 307‧‧‧Read-only memory 308‧‧‧Microphone 309‧‧‧ screen 310‧‧‧ keyboard 311‧‧‧Central Processing Unit 312‧‧‧random access memory 313‧‧‧Communication bus 320‧‧‧ digital camera 400‧‧‧Encoder 401‧‧‧ Original sequence image 402‧‧‧Module 403‧‧‧ module 404‧‧‧Motion estimation module 405‧‧‧Motion compensation module 406‧‧‧Select module 407‧‧‧ Conversion module 408‧‧‧Quantization module 409‧‧‧Entropy coding module 410‧‧‧ bit stream 411‧‧‧Inverse quantization module 412‧‧‧Inverse Conversion Module 413‧‧‧Intra prediction module 414‧‧‧Motion compensation module 415‧‧‧Module 416‧‧‧Reference image 417‧‧‧Motion vector prediction and coding module 418‧‧‧Motion vector field 51~58‧‧‧Step 60‧‧‧decoder 61‧‧‧ bit stream 62‧‧‧Module 63‧‧‧Module 64‧‧‧Module 65‧‧‧Intra prediction module 66‧‧‧Module 67‧‧‧Post filter module 68‧‧‧Reference image 69‧‧‧Video signal 70‧‧‧Motion vector decoding module 71‧‧‧ Motion vector field data 40‧‧‧ a set of belts 41~44‧‧‧Continuous belt 501~512‧‧‧Step 601~610‧‧‧Step 701~716‧‧‧Step 1101~1116‧‧‧Step 801~814‧‧‧Step 901~906‧‧‧Step 1001~1009‧‧‧Step 1301~1318‧‧‧Step 1401~1413‧‧‧Step 1501~1519‧‧‧Step 1701~1714‧‧‧Step 1801~1807‧‧‧Step 4001~4014‧‧‧Step 4201~4214‧‧‧Step 4101~4114‧‧‧Step 100‧‧‧decoder 101‧‧‧ bit stream 109‧‧‧Video signal 150‧‧‧Encoder 151‧‧‧ Original image sequence 191‧‧‧ system 199‧‧‧Communication network 195‧‧‧ system

現在將透過示例方式參考附圖,其中: 圖1是用於說明HEVC中使用的編碼結構的圖; 圖2是示意性地示出可於其中實現本發明之一或多個實施例的資料通訊系統的方塊圖; 圖3是示出可於其中實現本發明之一或多個實施例的處理裝置的元件的方塊圖; 圖4是說明依據本發明之實施例的編碼方法之步驟的流程圖; 圖5是說明依據本發明之一或多個實施例的迴圈濾波處理之步驟的流程圖; 圖6是說明依據本發明之實施例的解碼方法之步驟的流程圖; 圖7A及7B是用於說明HEVC中邊緣類型SAO濾波的圖; 圖8是用於說明HEVC中帶類型SAO濾波的圖; 圖9是說明依據HEVC規範解碼SAO參數之過程的步驟的流程圖; 圖10是更詳細地說明圖9過程中的步驟之一的流程圖; 圖11是說明依據HEVC規範如何對影像部分執行SAO濾波的流程圖; 圖12是說明執行編碼器,以在SAO參數的CTU級推導中確定一組(幀或切片)的CTU的SAO參數的步驟的流程圖; 圖13更詳細地顯示圖12之步驟中的一個步驟; 圖14更詳細地顯示圖12之步驟中的另一步驟; 圖15更詳細地顯示圖12之步驟中的又另一步驟; 圖16示出切片中CTU的各種不同的分組1201-1206; 圖17是示出在SAO參數之推導中的幀的影像部分的圖,其中使用共享SAO參數的第一種方法; 圖18是在圖17之推導中設定SAO參數之過程的範例的流程圖; 圖19是使用第一種共享方法在推導中設定SAO參數以在一列CTU之間共享SAO參數之過程的範例的流程圖; 圖20是使用第一種共享方法在推導中設定SAO參數以在一組N×N個CTU之間共享SAO參數之過程的範例的流程圖; 圖21是示出在圖20之推導中一個N×N組的影像部分的圖; 圖22示出如何依據本發明的第六實施例選擇SAO參數推導的範例; 圖23是說明適合於在一組影像部分之間共享SAO參數的第二種方法的解碼過程的流程圖; 圖24是示出多個2×2組的影像部分的圖; 圖25是說明依據本發明的第一實施例的編碼過程的流程圖; 圖26是說明依據本發明的第三實施例的解碼過程的流程圖; 圖27是說明依據本發明的第四實施例的解碼過程的流程圖;以及 圖28是示出依據本發明之實施例的包含編碼器或解碼器的系統以及通訊網路的圖。Reference will now be made to the drawings by way of example, where: FIG. 1 is a diagram for explaining the coding structure used in HEVC; 2 is a block diagram schematically showing a data communication system in which one or more embodiments of the present invention can be implemented; 3 is a block diagram illustrating elements of a processing device in which one or more embodiments of the present invention can be implemented; 4 is a flowchart illustrating the steps of the encoding method according to an embodiment of the present invention; 5 is a flowchart illustrating the steps of the loop filter process according to one or more embodiments of the present invention; 6 is a flowchart illustrating steps of a decoding method according to an embodiment of the present invention; 7A and 7B are diagrams for explaining edge type SAO filtering in HEVC; FIG. 8 is a diagram for explaining band-type SAO filtering in HEVC; 9 is a flowchart illustrating the steps of the process of decoding SAO parameters according to the HEVC specification; FIG. 10 is a flowchart illustrating one of the steps in the process of FIG. 9 in more detail; 11 is a flowchart illustrating how to perform SAO filtering on an image part according to the HEVC specification; FIG. 12 is a flowchart illustrating the steps of executing an encoder to determine the SAO parameters of a group (frame or slice) of CTUs in the CTU level derivation of SAO parameters; Figure 13 shows one of the steps of Figure 12 in more detail; FIG. 14 shows another step of the steps of FIG. 12 in more detail; Figure 15 shows yet another step of the steps of Figure 12 in more detail; FIG. 16 shows various groups 1201-1206 of CTUs in a slice; 17 is a diagram showing the image portion of the frame in the derivation of SAO parameters, in which the first method of sharing SAO parameters is used; 18 is a flowchart of an example of a process of setting SAO parameters in the derivation of FIG. 17; 19 is a flowchart of an example of a process of setting SAO parameters during derivation to share SAO parameters among a list of CTUs using the first sharing method; 20 is a flowchart of an example of a process of setting SAO parameters in a derivation using the first sharing method to share SAO parameters among a group of N×N CTUs; FIG. 21 is a diagram showing a video portion of an N×N group in the derivation of FIG. 20; 22 shows an example of how to select SAO parameter derivation according to the sixth embodiment of the present invention; 23 is a flowchart illustrating a decoding process suitable for a second method of sharing SAO parameters among a group of video parts; 24 is a diagram showing a plurality of 2×2 groups of video parts; 25 is a flowchart illustrating the encoding process according to the first embodiment of the present invention; 26 is a flowchart illustrating the decoding process according to the third embodiment of the present invention; 27 is a flowchart illustrating a decoding process according to the fourth embodiment of the present invention; and FIG. 28 is a diagram showing a system including an encoder or decoder and a communication network according to an embodiment of the present invention.

Claims (39)

一種在位元流中發訊對影像進行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組, 該方法包括: 確定影像部分是否屬於預定組,以及 若該影像部分屬於該預定組,則在該位元流中包括第一語法元素,用於發訊用於對該影像部分執行SAO濾波的SAO參數是從用於過濾另一影像部分的SAO參數推斷而來的, 否則,不包括該第一語法元素。A method for sending a sample adaptive offset (SAO) filter to an image in a bit stream, the image includes a plurality of image parts, and the image parts are grouped into a plurality of groups, The method includes: Determine whether the image part belongs to a predetermined group, and If the image part belongs to the predetermined group, the first syntax element is included in the bit stream, and the SAO parameter used to send the SAO filter to the image part is selected from the SAO parameter used to filter another image part Extrapolated, Otherwise, the first syntax element is not included. 如申請專利範圍第1項所述之方法,其中若該影像部分不屬於該預定組,則在該位元流中包括用於過濾該影像部分的SAO參數。The method as described in item 1 of the patent application scope, wherein if the image part does not belong to the predetermined group, SAO parameters for filtering the image part are included in the bit stream. 如申請專利範圍第1或2項所述之方法,其中若該影像部分是屬於僅包含一個影像部分的組,則在該位元流中包括該第一語法元素。The method as described in item 1 or 2 of the patent application scope, wherein if the image part belongs to a group containing only one image part, the first syntax element is included in the bit stream. 如申請專利範圍第1或2項所述之方法,其中若該影像部分是屬於包含至少兩個影像部分的組,則在該位元流中不包括該第一語法元素。The method as described in item 1 or 2 of the patent application scope, wherein if the image part belongs to a group containing at least two image parts, the first syntax element is not included in the bit stream. 如申請專利範圍第1或2項所述之方法,其中該影像是由該影像部分的行和列組成,並且若該影像部分是屬於由下列組成的組: 2*2個影像部分,或 3*3個影像部分,或 一行影像部分,或 一列影像部分,或 該影像的所有影像部分, 則在該位元流中不包括該第一語法元素。The method as described in item 1 or 2 of the patent application, wherein the image is composed of rows and columns of the image part, and if the image part belongs to the group consisting of: 2*2 image parts, or 3*3 image parts, or A line of video, or A list of image parts, or All image parts of the image, Then, the first syntax element is not included in the bit stream. 如申請專利範圍第1、2或4項所述之方法,其中若該影像部分是屬於包含已分割的影像部分的組,則在該位元流中包括該第一語法元素。The method as described in item 1, 2 or 4 of the patent application scope, wherein if the image part belongs to the group containing the divided image part, the first syntax element is included in the bit stream. 如申請專利範圍第6項所述之方法,其中若該影像部分是屬於包含下列的組: 分割成16個部分的影像部分,或 分割成8個部分的影像部分,或 分割成4個部分的影像部分, 則在該位元流中包括該第一語法元素。The method as described in item 6 of the patent application scope, wherein if the image part belongs to the following group: Part of the image divided into 16 parts, or Part of the image divided into 8 parts, or The image part divided into 4 parts, Then the first syntax element is included in the bit stream. 如申請專利範圍第1項所述之方法,還包括在該位元流中包括索引,用於指示該影像部分的該組。The method as described in item 1 of the patent application scope further includes including an index in the bit stream to indicate the group of the image part. 如申請專利範圍第1項所述之方法,還包括在該位元流中包括與該影像部分之該組相關聯的第二語法元素,用於發訊是否啟用或禁用該第一語法元素的使用。The method as described in item 1 of the scope of the patent application, further includes including a second syntax element associated with the group of the image part in the bitstream for signaling whether to enable or disable the first syntax element use. 如申請專利範圍第1或8或9項所述之方法,其中當該位元流中包括該索引或該第一或第二語法元素時,在下列級別插入該索引或該第一或第二語法元素: 該影像級,或 該序列級,當該影像屬於視訊序列時。The method as described in item 1 or 8 or 9 of the patent application scope, wherein when the index or the first or second syntax element is included in the bit stream, the index or the first or second is inserted at the following level Syntax elements: The image level, or The sequence level, when the image belongs to the video sequence. 一種編碼影像的方法,包含使用申請專利範圍第1至10項任一項所述之方法在位元流中發訊取樣自適應偏移(SAO)濾波。A method for encoding an image, which includes using the method described in any one of claims 1 to 10 to transmit sample adaptive offset (SAO) filtering in a bit stream. 一種在位元流中發訊對影像進行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組, 該方法包括: 確定影像部分是否滿足預定準則,以及 基於該準則在該位元流中包括語法元素,用於發訊是否啟用或禁用一或多個其他語法元素的使用,該一或多個其他語法元素用於發訊是否從用於過濾另一影像部分的SAO參數推斷用於對該影像部分執行SAO濾波的SAO參數。A method for sending a sample adaptive offset (SAO) filter to an image in a bit stream, the image includes a plurality of image parts, and the image parts are grouped into a plurality of groups, The method includes: Determine whether the image part meets the predetermined criteria, and Include syntax elements in the bitstream based on the criteria for signaling whether to enable or disable the use of one or more other syntax elements, and whether the one or more other syntax elements are used for signaling whether to filter another The SAO parameters of the image part infer the SAO parameters used to perform SAO filtering on the image part. 如申請專利範圍第12項所述之方法,其中若該影像部分是屬於預定組,則該影像部分滿足預定準則。The method as described in item 12 of the patent application scope, wherein if the image part belongs to a predetermined group, the image part satisfies a predetermined criterion. 一種編碼影像的方法,包含使用申請專利範圍第12或13項所述之方法在位元流中發訊取樣自適應偏移(SAO)濾波。A method of encoding an image, which includes using the method described in item 12 or 13 of the patent application to transmit sample adaptive offset (SAO) filtering in a bitstream. 一種在對影像執行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組, 該方法包括: 獲得指示該組影像部分是否屬於預定組的資訊,以及 若該組影像部分屬於該預定組,則獲取第一語法元素,其發訊從用於過濾另一影像部分的SAO參數推斷用於對該影像部分執行SAO濾波的SAO參數, 否則,不獲取該第一語法元素。A method of performing sample adaptive offset (SAO) filtering on an image, the image includes a plurality of image parts, the image parts are grouped into a plurality of groups, The method includes: Obtain information indicating whether the image part of the group belongs to the predetermined group, and If the group of image parts belongs to the predetermined group, the first syntax element is obtained, which sends out the SAO parameter used to perform SAO filtering on the image part from the SAO parameter used to filter another image part, Otherwise, the first syntax element is not acquired. 如申請專利範圍第15項所述之方法,其中若該影像部分之該組不屬於該預定組,則獲取用於過濾該影像部分的SAO參數。The method as described in item 15 of the patent application scope, wherein if the group of the image part does not belong to the predetermined group, the SAO parameters for filtering the image part are obtained. 如申請專利範圍第15或16項所述之方法,其中若該影像部分是屬於僅包含一個影像部分的組,則獲取該第一語法元素。The method as described in item 15 or 16 of the patent application scope, wherein if the image part belongs to a group containing only one image part, the first syntax element is obtained. 如申請專利範圍第15或16項所述之方法,其中若該影像部分是屬於包含至少兩個影像部分的組,則不獲取該第一語法元素。The method as described in item 15 or 16 of the patent application scope, wherein if the image part belongs to a group containing at least two image parts, the first syntax element is not acquired. 如申請專利範圍第15或16項所述之方法,其中該影像是由該影像部分的行和列組成,並且若該影像部分是屬於由下列組成的組: 2*2個影像部分,或 3*3個影像部分,或 一行影像部分,或 一列影像部分,或 該影像的所有影像部分, 則在該位元流中不包括該第一語法元素。A method as described in item 15 or 16 of the patent application, wherein the image is composed of rows and columns of the image part, and if the image part belongs to the group consisting of: 2*2 image parts, or 3*3 image parts, or A line of video, or A list of image parts, or All image parts of the image, Then, the first syntax element is not included in the bit stream. 如申請專利範圍第15或16項所述之方法,其中若該影像部分是屬於包含已分割的影像部分的組,則獲取該第一語法元素。The method as described in item 15 or 16 of the patent application scope, wherein if the image part belongs to a group containing the divided image part, the first syntax element is obtained. 如申請專利範圍第20項所述之方法,其中若該影像部分是屬於包含下列的組: 分割成16個部分的影像部分,或 分割成8個部分的影像部分,或 分割成4個部分的影像部分, 則獲取該第一語法元素。The method as described in item 20 of the patent application scope, wherein if the image part belongs to the following group: Part of the image divided into 16 parts, or Part of the image divided into 8 parts, or The image part divided into 4 parts, Then the first syntax element is obtained. 如申請專利範圍第15或16項所述之方法,其中該資訊是用於指示該影像部分之該組的索引。The method as described in item 15 or 16 of the patent application scope, wherein the information is used to indicate the index of the group of the image part. 如申請專利範圍第15或16項所述之方法,其中該資訊是與該影像部分之該組相關聯的第二語法元素,其發訊是否啟用或禁用該第一語法元素的使用。The method according to item 15 or 16 of the patent application scope, wherein the information is a second syntax element associated with the group of the image part, and it transmits whether to enable or disable the use of the first syntax element. 一種從位元流解碼影像的方法,包括使用申請專利範圍第15至23項之任一項所述之方法來執行取樣自適應偏移(SAO)濾波,其中從該位元流解析該資訊或SAO參數、或第一或第二語法元素。A method of decoding an image from a bit stream, including using a method described in any of claims 15 to 23 to perform sample adaptive offset (SAO) filtering, wherein the information is parsed from the bit stream or SAO parameters, or first or second syntax elements. 如申請專利範圍第24項所述之方法,其中當從該位元流解析時,所述資訊或SAO參數、或第一或第二語法元素與下列相關: 該影像級,或 該序列級,當該影像屬於視訊序列時。The method as described in item 24 of the patent application scope, wherein, when parsing from the bit stream, the information or SAO parameters, or the first or second syntax elements are related to the following: The image level, or The sequence level, when the image belongs to the video sequence. 一種在對影像執行取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組, 該方法包括: 基於預定準則獲取該位元流中的語法元素,用於發訊是否啟用或禁用一或多個其他語法元素的使用,該一或多個其他語法元素用於發訊是否從用於過濾另一影像部分的SAO參數推斷用於對該影像部分執行SAO濾波的SAO參數。A method of performing sample adaptive offset (SAO) filtering on an image, the image includes a plurality of image parts, the image parts are grouped into a plurality of groups, The method includes: Acquire the syntax elements in the bitstream based on predetermined criteria for signaling whether to enable or disable the use of one or more other syntax elements, and whether the one or more other syntax elements are used for signaling whether to filter another The SAO parameters of the image part infer the SAO parameters used to perform SAO filtering on the image part. 如申請專利範圍第26項所述之方法,其中該預定準則是,該影像部分是否屬於預定組之事實。The method as described in item 26 of the patent application scope, wherein the predetermined criterion is whether the image part belongs to a predetermined group. 一種從位元流解碼影像的方法,包括使用申請專利範圍第26或27項所述之方法來執行取樣自適應偏移(SAO)濾波,其中從該位元流解析所述語法元素或其他的語法元素。A method for decoding an image from a bit stream, including using the method described in item 26 or 27 of the patent application scope to perform sample adaptive offset (SAO) filtering, wherein the syntax element or other Grammatical elements. 一種對影像施用取樣自適應偏移(SAO)濾波的方法,該影像包括複數個影像部分,該些影像部分被分組成複數個組, 該方法包括針對一影像部分: 確定關於該影像部分的統計資料, 當依據至少兩個不同的組對該影像部分進行分組時,基於所確定的該影像部分的統計資料評估預定準則的值, 基於所述值為該影像部分選擇最佳組, 透過基於所選擇的組將SAO參數施用於該影像部分來過濾該影像部分,以及 提供經過濾的影像部分。A method of applying sample adaptive offset (SAO) filtering to an image, the image includes a plurality of image parts, the image parts are grouped into a plurality of groups, The method includes targeting an image portion: Determine the statistical data about the image part, When the image part is grouped according to at least two different groups, the value of the predetermined criterion is evaluated based on the determined statistical data of the image part, Select the best group for the image part based on the value, Filtering the image part by applying SAO parameters to the image part based on the selected group, and Provide filtered image parts. 一種編碼由影像部分組成之影像的方法,包括依據申請專利範圍第29項所述之施用取樣自適應偏移(SAO)濾波的步驟。A method for encoding an image composed of image parts includes the step of applying sample adaptive offset (SAO) filtering according to item 29 of the patent scope. 一種編碼包括複數個影像部分之影像的方法,該方法包括: 依據第一或第二預測模式,從一或多個其他影像部分預測一或多個影像部分, 依據所使用的預測模式,將所述預測的影像部分分組成複數個組中的一或多個組,以及 依據該分組對預測的影像部分執行取樣自適應偏移(SAO)濾波。A method for encoding an image including a plurality of image parts, the method includes: Predict one or more image parts from one or more other image parts according to the first or second prediction mode, According to the prediction mode used, grouping the predicted image parts into one or more of a plurality of groups, and According to the grouping, the sample adaptive offset (SAO) filtering is performed on the predicted image part. 如申請專利範圍第31項所述之方法,其中該影像部分是使用幀內預測模式從所述影像內的另一影像部分預測來的,或是使用幀間預測模式從另一參考影像而不是所述影像內的另一影像部分預測來的。The method as described in item 31 of the patent application, wherein the image part is predicted from another image part in the image using the intra prediction mode, or from another reference image instead of using the inter prediction mode The part of another image within the image is predicted. 一種用於可編程裝置的電腦程式產品,該電腦程式產品包含一系列指令,用於當載入並由該可編程裝置執行時,實現依據申請專利範圍第1至32項之任一項所述之方法的各步驟。A computer program product for a programmable device. The computer program product includes a series of instructions for implementing, according to any of items 1 to 32 of the patent application scope, when loaded and executed by the programmable device Steps of the method. 一種非暫時性電腦可讀取儲存媒體,儲存電腦程式的指令,用於實現依據申請專利範圍第1至32項之任一項所述之方法的各步驟。A non-transitory computer-readable storage medium, instructions for storing computer programs, are used to implement the steps of the method according to any of items 1 to 32 of the patent application. 一種依據申請專利範圍第1至32項中任一項所述之方法在位元流中發訊對影像進行取樣自適應偏移(SAO)濾波的裝置。An apparatus for sampling adaptive offset (SAO) filtering of images in a bit stream according to the method described in any one of claims 1 to 32 in the patent application. 一種依據申請專利範圍第14項或申請專利範圍第30至32項中任一項所述之方法編碼影像或一系列影像的裝置。An apparatus that encodes an image or a series of images according to the method described in item 14 of the patent application or any one of the items 30 to 32 of the patent application. 一種依據申請專利範圍第26或27項所述之方法對影像執行取樣自適應偏移(SAO)濾波的裝置。An apparatus for performing sample adaptive offset (SAO) filtering on an image according to the method described in item 26 or 27 of the patent application. 一種依據申請專利範圍第29項所述之方法對影像施用取樣自適應偏移(SAO)濾波的裝置。A device for applying sample adaptive offset (SAO) filtering to an image according to the method described in item 29 of the patent application scope. 一種依據申請專利範圍第28項所述之方法解碼影像或一系列影像的裝置。A device for decoding an image or a series of images according to the method described in item 28 of the patent application.
TW108118389A 2018-06-05 2019-05-28 Video coding and decoding TW202005370A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
GB1809236.1 2018-06-05
GB1809236.1A GB2574425A (en) 2018-06-05 2018-06-05 Video coding and decoding

Publications (1)

Publication Number Publication Date
TW202005370A true TW202005370A (en) 2020-01-16

Family

ID=62975664

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108118389A TW202005370A (en) 2018-06-05 2019-05-28 Video coding and decoding

Country Status (3)

Country Link
GB (1) GB2574425A (en)
TW (1) TW202005370A (en)
WO (1) WO2019234001A1 (en)

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9344743B2 (en) 2011-08-24 2016-05-17 Texas Instruments Incorporated Flexible region based sample adaptive offset (SAO) and adaptive loop filter (ALF)
CN103636221B (en) * 2012-05-25 2017-11-17 太阳专利托管公司 Method for encoding images, picture decoding method, picture coding device, picture decoding apparatus and image encoding/decoding device
CA2937449C (en) * 2012-05-29 2018-12-04 Mediatek Inc. Method and apparatus for coding of sample adaptive offset information
TWI595776B (en) * 2012-06-27 2017-08-11 Sony Corp Image processing device and method
EP2870750A4 (en) 2012-07-04 2016-03-23 Intel Corp Inter-view filter parameters re-use for three dimensional video coding
CN108235030B (en) * 2012-07-16 2020-10-09 三星电子株式会社 SAO encoding method and apparatus and SAO decoding method and apparatus
GB2509563A (en) 2013-01-04 2014-07-09 Canon Kk Encoding or decoding a scalable video sequence using inferred SAO parameters
GB2509707B (en) * 2013-01-04 2016-03-16 Canon Kk A method, device, computer program, and information storage means for encoding or decoding a video sequence
WO2015184309A1 (en) * 2014-05-29 2015-12-03 Apple Inc. Efficient sao signaling
KR102276854B1 (en) * 2014-07-31 2021-07-13 삼성전자주식회사 Method and apparatus for video encoding for using in-loof filter parameter prediction, method and apparatus for video decoding for using in-loof filter parameter prediction
CA3037411A1 (en) * 2016-09-20 2018-03-29 Mediatek Inc. Methods and apparatuses of sample adaptive offset processing for video coding
US10623737B2 (en) * 2016-10-04 2020-04-14 Qualcomm Incorporated Peak sample adaptive offset
WO2018068263A1 (en) * 2016-10-13 2018-04-19 富士通株式会社 Image coding method and device, and image processing apparatus

Also Published As

Publication number Publication date
GB201809236D0 (en) 2018-07-25
WO2019234001A1 (en) 2019-12-12
GB2574425A (en) 2019-12-11

Similar Documents

Publication Publication Date Title
JP6797993B2 (en) A coding method that encodes information to perform sample adaptive offset processing
US10652575B2 (en) Linear model chroma intra prediction for video coding
RU2767982C2 (en) Systems and methods for dividing video blocks with external prediction of video data slice
US10298939B2 (en) Quantization in video coding
TWI479869B (en) Chroma slice-level qp offset and deblocking
DK2622858T3 (en) VIDEO Coding GLASS FILTER
JP5985623B2 (en) Quantization in video coding
US20110317757A1 (en) Intra prediction mode signaling for finer spatial prediction directions
US20130163664A1 (en) Unified partition mode table for intra-mode coding
JP7337952B2 (en) Image encoding/decoding method, apparatus and method for transmitting bitstream using BDPCM
TW202002656A (en) Methods and devices for performing sample adaptive offset (SAO) filtering
TW202005398A (en) Video coding and decoding
TW202013963A (en) Video coding and decoding
TW202005369A (en) Video coding and decoding
TW202005370A (en) Video coding and decoding
TW202005371A (en) Video coding and decoding
TW202013964A (en) Video coding and decoding
CN116668705A (en) Image decoding method, encoding method and device