TWI565302B - Decoder, encoder, method for decoding, method for encoding, and system for encoding and decoding - Google Patents

Decoder, encoder, method for decoding, method for encoding, and system for encoding and decoding Download PDF

Info

Publication number
TWI565302B
TWI565302B TW104130995A TW104130995A TWI565302B TW I565302 B TWI565302 B TW I565302B TW 104130995 A TW104130995 A TW 104130995A TW 104130995 A TW104130995 A TW 104130995A TW I565302 B TWI565302 B TW I565302B
Authority
TW
Taiwan
Prior art keywords
clusters
pixels
coding unit
colors
unit block
Prior art date
Application number
TW104130995A
Other languages
Chinese (zh)
Other versions
TW201615017A (en
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 財團法人工業技術研究院
Priority to CN201510639350.7A priority Critical patent/CN105491379A/en
Priority to US14/872,155 priority patent/US20160100161A1/en
Priority to EP15187826.1A priority patent/EP3002948A1/en
Publication of TW201615017A publication Critical patent/TW201615017A/en
Application granted granted Critical
Publication of TWI565302B publication Critical patent/TWI565302B/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Color Television Systems (AREA)

Description

解碼器、編碼器、解碼方法、編碼方法與編解碼系統Decoder, encoder, decoding method, encoding method and codec system

本揭露是有關於一種對編碼單元區塊進行編碼與解碼的編碼方法與解碼方法,以及使用此方法的編解碼系統、編碼器與解碼器。The present disclosure relates to an encoding method and a decoding method for encoding and decoding a coding unit block, and a codec system, an encoder and a decoder using the same.

隨著科技的演進,視訊顯示器的解析、規格、尺寸越來越高,人們對視訊畫面品質與尺寸的要求也隨之不斷上升。為滿足此需求,國際電信聯盟(ITU-T)下的視訊編碼專家小組VCEG(Video Coding Experts Group)與國際標準化組織ISO/IEC下的動態畫像專家小組MPEG(Moving Picture Experts Group)共同成立視訊編碼聯合工作小組JCT-VC(Joint Collaborative Team on Video Coding),並開始H.265/HEVC(High Efficiency Video Coding)專案,目標為提供比H.264/AVC(Advanced Video Coding)視訊壓縮標準更高的編碼效率(在相同主觀品質下約可節省50%的位元率),尤其以高解析度(High Definition,HD)、超高解析度(Ultra High Definition,Ultra HD)等解析度高之視訊為重。With the evolution of technology, the resolution, specifications and size of video displays are getting higher and higher, and people's requirements for video picture quality and size are also rising. In order to meet this demand, the Video Coding Experts Group under the International Telecommunication Union (ITU-T) and the MPEG (Moving Picture Experts Group) under the International Organization for Standardization ISO/IEC have established video coding. Joint Working Group JCT-VC (Joint Collaborative Team on Video Coding) and started the H.265/HEVC (High Efficiency Video Coding) project with the goal of providing higher video compression standards than H.264/AVC (Advanced Video Coding). Coding efficiency (approximately 50% of the bit rate can be saved under the same subjective quality), especially for high resolution (HD), Ultra High Definition (Ultra HD) and other high resolution video. .

此大尺寸與高解析度之視訊應用的環境多以自然視訊影像為主,並已於2013年完成制訂,目前正在制定的是高效能螢幕編碼標準 (HEVC Screen Content Coding,簡稱HEVC SCC)。螢幕分享的視訊內容通常會有混合的視訊內容素材,例如畫面可能同時包含自然影像、大量文字圖片、滑鼠指標及各種線條等,由於此螢幕應用環境已不符H.265/HEVC當初所設計的目標,故JCT-VC近來已將重心轉至發展新的高效能螢幕編碼標準技術。HEVC SCC標準基於H.265/HEVC現有的架構下進行新編碼工具的開發,例如JCT-VC所探討的新工具包括調色盤模式(Palette mode)及畫面內區塊複製模式(Intra Block Copy,IBC)等等。This large-size and high-resolution video application environment is dominated by natural video images and was developed in 2013. Currently, HEVC Screen Content Coding (HEVC SCC) is being developed. The video content shared by the screen usually has mixed video content material. For example, the screen may contain natural images, a large number of text images, mouse pointers and various lines, etc., because the screen application environment has not been designed by H.265/HEVC. The goal, so JCT-VC has recently shifted its focus to the development of new high-performance screen coding standard technology. The HEVC SCC standard is based on the existing architecture of H.265/HEVC. For example, JCT-VC explores new tools including Palette mode and Intra Block Copy. IBC) and so on.

然而,影像及視訊壓縮的過程通常需要大量的計算,據此,如何提升影像及視訊壓縮的編碼效能,以減少編碼運算中不必要的傳輸與計算,已成為當務之急。However, the process of image and video compression usually requires a large amount of calculation. According to this, how to improve the coding performance of video and video compression to reduce unnecessary transmission and calculation in coding operations has become a top priority.

本揭露提供一種編碼方法與解碼方法以及使用此方法的編解碼系統、編碼器與解碼器,其能夠有效地提升螢幕視訊編碼技術的編碼效能。The present disclosure provides an encoding method and a decoding method, and a codec system, an encoder and a decoder using the same, which can effectively improve the encoding performance of the screen video encoding technology.

本揭露的一範例實施例提出一種解碼器,此解碼器包括儲存電路與處理器電路,儲存電路記錄多個模組,處理器電路連接儲存電路,並且用以存取儲存電路並透過所述模組執行鄰近區塊多顏色預測模式。所述模組包括接收模組、旗標狀態判定模組以及顏色設定模組。接收模組接收對應編碼單元區塊的第一旗標,且旗標狀態判定模組判斷對應所述編碼單元區塊的第一旗標的狀態值,其中當所述第一旗標的狀態值符合預定狀態值時,接收模組更用以接收對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值。顏色設定模組用以在第一旗標的狀態值符合預定狀態值時,讀取接收模組所接收的對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值,且根據第二旗標在編碼單元區塊的鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,其中第二旗標指示對應N個畫素的N個顏色的數目,所述N個顏色皆不相同且N為正整數。解碼模組根據對應所述N個畫素的N個顏色重建編碼單元區塊的畫素。An exemplary embodiment of the present disclosure provides a decoder. The decoder includes a storage circuit and a processor circuit. The storage circuit records a plurality of modules. The processor circuit is connected to the storage circuit and is used to access the storage circuit and pass through the module. The group performs a neighboring block multi-color prediction mode. The module includes a receiving module, a flag state determining module, and a color setting module. The receiving module receives the first flag of the corresponding coding unit block, and the flag state determination module determines a state value corresponding to the first flag of the coding unit block, where the state value of the first flag meets the predetermined When the state value is used, the receiving module is further configured to receive an index value corresponding to each pixel of the coding unit block and the second flag of the coding unit block. The color setting module is configured to: when the state value of the first flag meets the predetermined state value, read the second flag of the corresponding coding unit block received by the receiving module and each pixel corresponding to the coding unit block An index value, and selecting N colors corresponding to N pixels according to the second flag in a plurality of pixels in the vicinity of the coding unit block, wherein the second flag indicates N colors corresponding to the N pixels The number of N, the N colors are all different and N is a positive integer. The decoding module reconstructs the pixels of the coding unit block according to the N colors corresponding to the N pixels.

本揭露的一範例實施例提出一種編碼器,此編碼器包括儲存電路與處理器電路,儲存電路記錄多個模組,處理器電路連接儲存電路,並且用以存取儲存電路並透過所述模組執行鄰近區塊多顏色預測模式。所述模組包括旗標設定模組、顏色設定模組以及編碼模組。旗標設定模組設定對應編碼單元區塊的第一旗標的狀態值,且顏色設定模組用以在第一旗標的狀態值符合預定狀態值時,在編碼單元區塊的鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色。並且,旗標設定模組更用以將對應編碼單元區塊的第二旗標設定為對應所述N個畫素的N個顏色的數目,其中所述N個顏色皆不相同且N為正整數。編碼模組用以對編碼單元區塊中的每一畫素進行索引編號以使得編碼單元區塊中的每一畫素的顏色是以N個畫素的索引值來表示。此外,編碼模組更用以傳送對應編碼單元區塊的第一旗標至解碼器,且在第一旗標的狀態值符合預定狀態值時,編碼模組傳送對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值至解碼器。An exemplary embodiment of the present disclosure provides an encoder, the encoder includes a storage circuit and a processor circuit, the storage circuit records a plurality of modules, the processor circuit is connected to the storage circuit, and is configured to access the storage circuit and transmit the module The group performs a neighboring block multi-color prediction mode. The module includes a flag setting module, a color setting module, and an encoding module. The flag setting module sets a state value of the first flag corresponding to the coding unit block, and the color setting module is configured to: when the state value of the first flag meets the predetermined state value, the plurality of adjacent areas of the coding unit block N colors corresponding to N pixels are selected from the pixels. And the flag setting module is further configured to set a second flag of the corresponding coding unit block to a number of N colors corresponding to the N pixels, wherein the N colors are different and N is positive Integer. The encoding module is configured to index each pixel in the coding unit block such that the color of each pixel in the coding unit block is represented by an index value of N pixels. In addition, the encoding module is further configured to transmit the first flag of the corresponding coding unit block to the decoder, and when the state value of the first flag meets the predetermined state value, the encoding module transmits the second flag of the corresponding coding unit block. The index value corresponding to each pixel of the coding unit block is mapped to the decoder.

本揭露的一範例實施例提出一種用於具有多個畫素的編碼單元區塊的解碼方法,本解碼方法包括:接收對應所述編碼單元區塊的第一旗標;判斷此第一旗標的狀態值符合預定狀態值時,接收並讀取對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值,並且根據所述第二旗標在編碼單元區塊的鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,其中第二旗標指示對應N個畫素的N個顏色的數目,其中N個顏色皆不相同且N為正整數;以及根據對應N個畫素的N個顏色重建編碼單元區塊的畫素。An exemplary embodiment of the present disclosure provides a decoding method for a coding unit block having multiple pixels. The decoding method includes: receiving a first flag corresponding to the coding unit block; determining the first flag When the state value meets the predetermined state value, receiving and reading the index value corresponding to each pixel of the corresponding coding unit block and each pixel of the coding unit block, and according to the second flag in the coding unit area Selecting N colors corresponding to N pixels from the plurality of pixels in the vicinity of the block, wherein the second flag indicates the number of N colors corresponding to the N pixels, wherein the N colors are different and N is a positive integer; and reconstructing a pixel of the coding unit block according to N colors of the corresponding N pixels.

本揭露的一範例實施例提出一種用於具有多個畫素的編碼單元區塊的編碼方法,本編碼方法包括:設定對應編碼單元區塊的第一旗標的狀態值;判斷第一旗標的狀態值符合預定狀態值時,在所述編碼單元區塊的鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,並且將對應編碼單元區塊的第二旗標設定為對應所述N個畫素的N個顏色的數目,其中該個顏色皆不相同且N為正整數;對編碼單元區塊中的每一畫素進行索引編號以使得編碼單元區塊中的每一畫素的顏色是以所述N個畫素的索引值來表示;以及傳送對應編碼單元區塊的第一旗標至解碼端,且在第一旗標的狀態值符合預定狀態值時,傳送對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值至解碼端。An exemplary embodiment of the present disclosure provides an encoding method for a coding unit block having a plurality of pixels. The encoding method includes: setting a state value of a first flag corresponding to a coding unit block; determining a state of the first flag When the value meets the predetermined state value, the N colors corresponding to the N pixels are selected from the plurality of pixels in the adjacent range of the coding unit block, and the second flag corresponding to the coding unit block is set to correspond a number of N colors of the N pixels, wherein the colors are different and N is a positive integer; each pixel in the coding unit block is indexed to cause each of the coding unit blocks The color of the pixel is represented by an index value of the N pixels; and the first flag of the corresponding coding unit block is transmitted to the decoding end, and when the state value of the first flag meets a predetermined state value, the corresponding correspondence is transmitted. The second flag of the coding unit block and the index value corresponding to each pixel of the coding unit block are sent to the decoding end.

本揭露的一範例實施例提出一種編解碼系統,本編解碼系統包括:編碼器與解碼器。編碼器用以設定對應編碼單元區塊的第一旗標的狀態值,並且在第一旗標的狀態值符合預定狀態值時,在編碼單元區塊的鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色。此外,編碼器更用以將對應編碼單元區塊的第二旗標設定為對應N個畫素的N個顏色的數目,其中N個顏色皆不相同且N為正整數。編碼器更用以對編碼單元區塊中的每一畫素進行索引編號以使得編碼單元區塊中的每一畫素的顏色是以N個畫素的索引值來表示,以及傳送對應編碼單元區塊的第一旗標至解碼器,且在第一旗標的狀態值符合預定狀態值時,編碼器傳送對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值至所述解碼器。An exemplary embodiment of the present disclosure provides a codec system, where the codec system includes an encoder and a decoder. The encoder is configured to set a state value of the first flag of the corresponding coding unit block, and when the state value of the first flag meets the predetermined state value, select corresponding N of the plurality of pixels in the adjacent range of the coding unit block N colors of pixels. In addition, the encoder is further configured to set a second flag of the corresponding coding unit block to a number of N colors corresponding to N pixels, where N colors are different and N is a positive integer. The encoder is further configured to index each pixel in the coding unit block such that the color of each pixel in the coding unit block is represented by an index value of N pixels, and the corresponding coding unit is transmitted. The first flag of the block is sent to the decoder, and when the state value of the first flag meets the predetermined state value, the encoder transmits the second flag corresponding to the coding unit block and corresponds to each pixel of the coding unit block. The index value is to the decoder.

基於上述,本揭露之範例實施例所提出的解碼方法與編碼方法及使用此方法的編解碼系統、解碼器與編碼器能夠藉由所設定的旗標指示鄰近範圍中用以預測並重建目前編碼單元區塊之畫素的個數及其顏色,進而有效地節省編碼運算時的傳輸位元,進而提升編碼效能。Based on the above, the decoding method and encoding method and the codec system, the decoder and the encoder using the method of the present disclosure can indicate the neighboring range to predict and reconstruct the current encoding by using the set flag. The number of pixels of the unit block and its color, thereby effectively saving the transmission bit in the coding operation, thereby improving the coding efficiency.

為讓本揭露的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the present invention will be more apparent from the following description.

圖1A是根據本揭露一範例實施例所繪示的編碼器。FIG. 1A is an illustration of an encoder according to an exemplary embodiment of the disclosure.

請參照圖1A,編碼器110包括儲存電路110a與處理器電路110b。儲存電路110a用以儲存各種資料、程式碼,或是待處理及處理後的影像。例如,儲存電路110a可以是記憶體(memory)或硬碟(Hard Disk Drive,HDD)等儲存媒體,但不限於此。處理器電路110b用以控制編碼器110的整體運作。例如,處理器電路110b可以是中央處理器(CPU)、微處理器(micro-processor)或嵌入式控制器(embedded controller),本揭露並不加以限制。在本範例實施例中,儲存電路110a更用以記錄多個模組,處理器電路110b連接儲存電路110a,並且用以存取儲存電路110a。處理器電路110b會透過此些模組執行本揭露的鄰近區塊多顏色預測模式,此些模組包括:旗標設定模組112、顏色設定模組114以及編碼模組116。Referring to FIG. 1A, the encoder 110 includes a storage circuit 110a and a processor circuit 110b. The storage circuit 110a is configured to store various data, code, or images to be processed and processed. For example, the storage circuit 110a may be a storage medium such as a memory or a Hard Disk Drive (HDD), but is not limited thereto. The processor circuit 110b is used to control the overall operation of the encoder 110. For example, the processor circuit 110b may be a central processing unit (CPU), a micro-processor, or an embedded controller, and the disclosure is not limited. In the present exemplary embodiment, the storage circuit 110a is further configured to record a plurality of modules, and the processor circuit 110b is connected to the storage circuit 110a and used to access the storage circuit 110a. The processor circuit 110b performs the adjacent block multi-color prediction mode of the present disclosure through the modules. The modules include a flag setting module 112, a color setting module 114, and an encoding module 116.

旗標設定模組112用以設定對應目前正在編碼的編碼單元區塊的旗標的狀態值。具體而言,在H.265/HEVC的標準下,是以一個編碼樹單元(Coding Tree Unit,CTU)作為編碼單元(Coding Unit,CU)編碼時的最大處理區塊,此編碼樹單元的大小可以設定為64×64的區塊。編碼單元區塊則可以是小於或等於編碼樹單元的區塊大小。舉例而言,編碼單元區塊為一正方矩形並且其大小可以是64×64、32×32、16×16、8×8或4×4的區塊。另外,在本揭露範例實施例中所述的編碼單元區塊具有多個畫素,並且編碼單元區塊大小的單位為畫素。The flag setting module 112 is configured to set a state value corresponding to a flag of the coding unit block currently being encoded. Specifically, under the standard of H.265/HEVC, the maximum processing block when encoding a Coding Tree Unit (CTU) as a coding unit (CU), the size of the coding tree unit. It can be set to a 64×64 block. The coding unit block may then be smaller or equal to the block size of the coding tree unit. For example, the coding unit block is a square rectangle and its size may be a 64×64, 32×32, 16×16, 8×8 or 4×4 block. In addition, the coding unit block described in the exemplary embodiment of the disclosure has a plurality of pixels, and the unit of the coding unit block size is a pixel.

旗標設定模組112會設定對應編碼單元區塊的一個旗標(亦稱為第一旗標)來指示是否致能鄰近區塊多顏色預測模式,本揭露所述的鄰近區塊多顏色預測模式是利用目前正在編碼的編碼單元區塊的鄰近範圍內之畫素的一個或多個顏色來預測目前正在編碼的編碼單元區塊的畫素。例如,當欲致能上述鄰近區塊多顏色預測模式時,旗標設定模組112會將對應編碼單元區塊的第一旗標的狀態值設定為一預定狀態值。反之,當不欲致能上述鄰近區塊多顏色預測模式時,旗標設定模組112可將對應編碼單元區塊的第一旗標的狀態值設定為其他的狀態值。The flag setting module 112 sets a flag (also referred to as a first flag) of the corresponding coding unit block to indicate whether the adjacent block multi-color prediction mode is enabled, and the adjacent block multi-color prediction according to the disclosure. The pattern is to predict the pixels of the coding unit block currently being encoded using one or more colors of the pixels within the vicinity of the coding unit block currently being encoded. For example, when the neighboring block multi-color prediction mode is to be enabled, the flag setting module 112 sets the state value of the first flag of the corresponding coding unit block to a predetermined state value. On the other hand, when it is not desired to enable the adjacent block multi-color prediction mode, the flag setting module 112 may set the state value of the first flag of the corresponding coding unit block to other state values.

顏色設定模組114用以判斷第一旗標是否符合預定狀態值,並且在第一旗標符合所述預定狀態值時,於編碼單元區塊的鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色。在此,顏色設定模組114所選出的N個顏色皆不相同。換言之,當顏色設定模組114判斷第一旗標的狀態值符合預定狀態值時,編碼器110即會進入鄰近區塊多顏色預測模式以使用目前正在編碼的編碼單元區塊的鄰近範圍內之畫素的一個或多個顏色來預測目前正在編碼的編碼單元區塊的畫素。之後,顏色設定模組114更用以將對應編碼單元區塊的另一個旗標(亦稱為第二旗標)設定為對應所選出之對應N個畫素的N個顏色的數目。顏色設定模組114從鄰近範圍210選出對應N個畫素的N個顏色的方法將於稍後配合圖2、圖3A~圖3B、圖4與圖5詳細說明。The color setting module 114 is configured to determine whether the first flag meets a predetermined state value, and when the first flag meets the predetermined state value, select a corresponding N among a plurality of pixels in a proximity range of the coding unit block. N colors of pixels. Here, the N colors selected by the color setting module 114 are all different. In other words, when the color setting module 114 determines that the state value of the first flag meets the predetermined state value, the encoder 110 enters the adjacent block multi-color prediction mode to use the painting in the vicinity of the coding unit block currently being encoded. One or more colors of the prime to predict the pixels of the coding unit block currently being encoded. Then, the color setting module 114 is further configured to set another flag (also referred to as a second flag) of the corresponding coding unit block to the number of N colors corresponding to the selected N pixels. The method in which the color setting module 114 selects N colors corresponding to N pixels from the adjacent range 210 will be described in detail later with reference to FIGS. 2, 3A to 3B, 4, and 5.

值得注意的是,本揭露所指的一個顏色並不侷限於由單一組成元素所組成的顏色,也可以是指由數個組成元素所組成之對應顏色,例如,由三個組成元素所組成之對應YUV格式或RGB格式的顏色。YUV格式用以編譯顏色空間(color space),其中「Y」表示明亮度(Luminance、Luma),「U」和「V」則是表示色度與濃度(Chrominance、Chroma),並且Y、Cb、Cr用來描述其組成元素。RGB格式是一種加色模型,用以將紅(Red)、綠(Green)、藍(Blue)三原色的色光以不同的比例相加,以產生多種多樣的色光,其中R、G、B用來描述其組成元素。It should be noted that the color referred to in the present disclosure is not limited to a color composed of a single constituent element, and may also be a corresponding color composed of a plurality of constituent elements, for example, composed of three constituent elements. Corresponds to the YUV format or the RGB format. The YUV format is used to compile color space, where "Y" indicates brightness (Luminance, Luma), "U" and "V" indicate chromaticity and concentration (Chrominance, Chroma), and Y, Cb, Cr is used to describe its constituent elements. The RGB format is an additive color model for adding the red, red, and blue primary colors in different proportions to produce a variety of color lights, of which R, G, and B are used. Describe its constituent elements.

之後,編碼模組116用以對編碼單元區塊中的每一畫素進行索引編號以使得編碼單元區塊中的每一畫素的顏色是以上述N個畫素的索引值來表示。之後,編碼模組116會傳送對應此編碼單元區塊的第一旗標至解碼端,且在上述第一旗標的狀態值符合預定狀態值時,才傳送對應此編碼單元區塊的第二旗標與此編碼單元區塊的每一畫素所對應的索引值至解碼端。Then, the encoding module 116 is configured to index each pixel in the coding unit block so that the color of each pixel in the coding unit block is represented by the index values of the N pixels. Afterwards, the encoding module 116 transmits the first flag corresponding to the coding unit block to the decoding end, and transmits the second flag corresponding to the coding unit block when the state value of the first flag meets the predetermined state value. The index value corresponding to each pixel of the coding unit block is marked to the decoding end.

在本範例實施例中,編碼器110完成上述編碼操作後,是將編碼後的資料傳送至解碼器以進行解碼操作。例如,編碼器110是實作在影像發送終端中,而解碼器是實作在影像接收終端中,其中編碼器與解碼器可透過有線或無線方式來通訊。In the present exemplary embodiment, after the encoder 110 completes the above encoding operation, the encoded data is transmitted to the decoder for decoding operation. For example, the encoder 110 is implemented in the image transmitting terminal, and the decoder is implemented in the image receiving terminal, wherein the encoder and the decoder can communicate by wire or wirelessly.

圖1B是根據本揭露一範例實施例所繪示的解碼器。FIG. 1B is a diagram illustrating a decoder according to an exemplary embodiment of the disclosure.

請參照圖1B,解碼器120包括儲存電路120a與處理器電路120b。類似地,儲存電路120a用以儲存各種資料、程式碼,或是待處理及處理後的影像。例如,儲存電路120a可以是記憶體或硬碟等儲存媒體,但不限於此。處理器電路120b用以控制解碼器120的整體運作。在此,處理器電路120b例如是中央處理器、微處理器或嵌入式控制器,本揭露並不加以限制。在本範例實施例中,儲存電路120a更用以記錄多個模組,而處理器電路120b連接儲存電路120a,並且用以存取儲存電路120a。處理器電路120b會透過此些模組執行鄰近區塊多顏色預測模式,此些模組包括:接收模組122、旗標狀態判定模組124、顏色設定模組126以及解碼模組128。Referring to FIG. 1B, the decoder 120 includes a storage circuit 120a and a processor circuit 120b. Similarly, the storage circuit 120a is used to store various data, code, or images to be processed and processed. For example, the storage circuit 120a may be a storage medium such as a memory or a hard disk, but is not limited thereto. The processor circuit 120b is used to control the overall operation of the decoder 120. Here, the processor circuit 120b is, for example, a central processing unit, a microprocessor or an embedded controller, and the disclosure is not limited. In the present exemplary embodiment, the storage circuit 120a is further configured to record a plurality of modules, and the processor circuit 120b is connected to the storage circuit 120a and used to access the storage circuit 120a. The processor circuit 120b performs a neighboring block multi-color prediction mode through the modules. The modules include a receiving module 122, a flag state determining module 124, a color setting module 126, and a decoding module 128.

解碼器120的接收模組122會從編碼器110接收對應編碼單元區塊的第一旗標、對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值,並且解碼器120會根據所接收的此些資料來還原對應的編碼單元區塊。例如,旗標狀態判定模組124會判斷對應編碼單元區塊的第一旗標的狀態值是否符合預定狀態值,並且當第一旗標的狀態值符合預定狀態值時,接收模組122才會繼續地接收從編碼模組116傳來的第二旗標與編碼單元區塊的每一畫素所對應的索引值。之後,顏色設定模組126會讀取編碼模組116所接收的對應編碼單元區塊的第二旗標與編碼單元區塊的每一畫素所對應的索引值。由於第二旗標會指示對應上述N個畫素的N個顏色的數目,因此,顏色設定模組126可根據此第二旗標在編碼單元區塊的鄰近範圍內的多個畫素中快速地選出N個顏色。據此,解碼模組128即可根據此N個顏色重建編碼單元區塊的畫素。The receiving module 122 of the decoder 120 receives the first flag of the corresponding coding unit block, the second flag of the corresponding coding unit block, and the index value corresponding to each pixel of the coding unit block from the encoder 110. And the decoder 120 restores the corresponding coding unit block according to the received data. For example, the flag state determination module 124 determines whether the state value of the first flag of the corresponding coding unit block meets a predetermined state value, and the receiving module 122 continues when the state value of the first flag meets the predetermined state value. The second flag received from the encoding module 116 is received with an index value corresponding to each pixel of the coding unit block. Then, the color setting module 126 reads the second flag of the corresponding coding unit block received by the coding module 116 and the index value corresponding to each pixel of the coding unit block. Since the second flag indicates the number of N colors corresponding to the N pixels, the color setting module 126 can quickly be in the plurality of pixels in the vicinity of the coding unit block according to the second flag. N colors are selected. Accordingly, the decoding module 128 can reconstruct the pixels of the coding unit block according to the N colors.

值得一提的是,上述編碼器與解碼器是分別實作於不同的終端中,並且透過網路傳遞彼此所需要的資料,然而,本揭露不限於此。在另一範例實施例中,編碼器與解碼器可實作於同一個晶片或系統中。It is worth mentioning that the above encoder and decoder are respectively implemented in different terminals, and the materials required for each other are transmitted through the network. However, the disclosure is not limited thereto. In another exemplary embodiment, the encoder and decoder may be implemented in the same wafer or system.

圖1C是根據本揭露一範例實施例所繪示的編解碼晶片。FIG. 1C illustrates a codec wafer according to an exemplary embodiment of the present disclosure.

請參照圖1C,編解碼晶片100(亦稱為編解碼系統100)包括儲存電路100a、處理器電路100b、編碼器110以及解碼器120。編碼器110與解碼器120的運作是分別相似於上述圖1A與圖1B中所示的編碼器與解碼器。例如,編碼器110包括旗標設定模組112、顏色設定模組114以及編碼模組116。解碼器120包括接收模組122、旗標狀態判定模組124、顏色設定模組126以及解碼模組128。Referring to FIG. 1C, the codec wafer 100 (also referred to as the codec system 100) includes a storage circuit 100a, a processor circuit 100b, an encoder 110, and a decoder 120. The operation of encoder 110 and decoder 120 are similar to the encoder and decoder shown in Figures 1A and 1B, respectively. For example, the encoder 110 includes a flag setting module 112, a color setting module 114, and an encoding module 116. The decoder 120 includes a receiving module 122, a flag state determining module 124, a color setting module 126, and a decoding module 128.

類似地,儲存電路100a用以儲存各種資料、程式碼,或是待處理及處理後的影像。例如,儲存電路100a可以是記憶體或硬碟等儲存媒體,但不限於此。在本範例實施例中,儲存電路100a更用以記錄多個模組,此些模組包括上述編碼器110的旗標設定模組112、顏色設定模組114以及編碼模組116,以及解碼器120的接收模組122、旗標狀態判定模組124、顏色設定模組126以及解碼模組128。Similarly, the storage circuit 100a is configured to store various data, code, or images to be processed and processed. For example, the storage circuit 100a may be a storage medium such as a memory or a hard disk, but is not limited thereto. In the exemplary embodiment, the storage circuit 100a is further configured to record a plurality of modules, and the modules include the flag setting module 112, the color setting module 114, and the encoding module 116 of the encoder 110, and the decoder. The receiving module 122 of 120, the flag state determining module 124, the color setting module 126, and the decoding module 128.

處理器電路100b耦接至儲存電路100a,並且用以控制編解碼晶片100的整體運作。例如,處理器電路100b會下達指令給儲存電路100a,以透過編碼器110與解碼器120來對影像執行編碼與解碼的操作。例如,處理器電路100b可以是中央處理器、微處理器或嵌入式控制器,本揭露並不加以限制。The processor circuit 100b is coupled to the storage circuit 100a and is used to control the overall operation of the codec chip 100. For example, the processor circuit 100b will issue an instruction to the storage circuit 100a to perform an encoding and decoding operation on the image through the encoder 110 and the decoder 120. For example, processor circuit 100b can be a central processing unit, a microprocessor, or an embedded controller, and the disclosure is not limited.

值得注意的是,本揭露中的編碼器與解碼器是由軟體模組或程式碼來實作,例如,儲存電路100a會儲存上述旗標設定模組112、顏色設定模組114、編碼模組116、接收模組122、旗標狀態判定模組124、顏色設定模組126以及解碼模組128,並且當編解碼晶片100致能時,此些軟體程式碼會從儲存電路100a被載入至一緩衝記憶體(未繪示)且由處理器電路100b執行以運作此些模組的功能。然而,本揭露不限於此,例如,在本揭露另一範例實施例中,編解碼晶片、編碼器與解碼器可以是由硬體電路來實作。例如,上述旗標設定模組112、顏色設定模組114、編碼模組116、接收模組122、旗標狀態判定模組124、顏色設定模組126以及解碼模組128可以硬體電路實作為旗標設定電路、顏色設定電路、編碼電路、接收電路、旗標狀態判定電路以及解碼電路。It should be noted that the encoder and the decoder in the disclosure are implemented by a software module or a code. For example, the storage circuit 100a stores the flag setting module 112, the color setting module 114, and the encoding module. 116. The receiving module 122, the flag state determining module 124, the color setting module 126, and the decoding module 128, and when the codec chip 100 is enabled, the software code is loaded from the storage circuit 100a to A buffer memory (not shown) is executed by the processor circuit 100b to operate the functions of the modules. However, the disclosure is not limited thereto. For example, in another exemplary embodiment of the disclosure, the codec chip, the encoder, and the decoder may be implemented by a hardware circuit. For example, the flag setting module 112, the color setting module 114, the encoding module 116, the receiving module 122, the flag state determining module 124, the color setting module 126, and the decoding module 128 can be implemented as hardware circuits. Flag setting circuit, color setting circuit, encoding circuit, receiving circuit, flag state determining circuit, and decoding circuit.

為了更清楚地描述編碼器110、解碼器120與編解碼晶片100的運作,以下將參照圖1C的編解碼晶片100以一範例實施例來進行說明。To more clearly describe the operation of the encoder 110, the decoder 120, and the codec wafer 100, an exemplary embodiment will be described below with reference to the codec wafer 100 of FIG. 1C.

圖2是根據本揭露之範例實施例所繪示的編碼單元區塊之鄰近範圍示意圖。FIG. 2 is a schematic diagram of a proximity range of a coding unit block according to an exemplary embodiment of the disclosure.

請參照圖2,假設目前正在編碼的區塊為編碼單元區塊200,且編碼單元區塊200的大小為L×L,其中L為正整數。在本範例實施例中,顏色設定模組114是在編碼單元區塊200的鄰近範圍內的多個畫素中選出N個具有不同顏色的畫素,並將對應此N個畫素的N個顏色設定為作為用以預測編碼單元區塊200的畫素。然而,本揭露並不限於此,例如,在另一範例實施例中,顏色設定模組114亦可從畫面的所有畫素中選出對應N個畫素的N個顏色。在本範例實施例中,此鄰近範圍包括鄰近於編碼單元區塊200的至少一另一編碼單元區塊,所述至少一另一編碼單元區塊包括鄰近於編碼單元區塊200上邊緣的編碼單元區塊202、鄰近於編碼單元區塊200左邊緣的編碼單元區塊204與鄰近於編碼單元區塊200左上的角編碼單元區塊206。值得注意的是,編碼單元區塊200與至少一另一編碼單元區塊所在的畫面的解碼順序中,在編碼單元區塊200被解碼之前至少一另一編碼單元區塊為已經被解碼的編碼單元區塊。換言之,鄰近範圍不包括目前正在編碼的編碼單元區塊以及/或在解碼過程中在目前正在編碼的編碼單元區塊之後才會被解碼的區域。然而,本揭露並不加以限制鄰近範圍的區域,例如,在另一範例實施例中,鄰近範圍亦可包括目前欲編碼的編碼單元區塊以及/或畫面中未解碼的區域。Referring to FIG. 2, it is assumed that the block currently being coded is the coding unit block 200, and the size of the coding unit block 200 is L×L, where L is a positive integer. In the present exemplary embodiment, the color setting module 114 selects N pixels having different colors from a plurality of pixels in the vicinity of the encoding unit block 200, and N corresponding to the N pixels. The color is set as a pixel for predicting the coding unit block 200. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the color setting module 114 may also select N colors corresponding to N pixels from all pixels of the picture. In the present exemplary embodiment, the proximity range includes at least one other coding unit block adjacent to the coding unit block 200, and the at least one other coding unit block includes an encoding adjacent to an upper edge of the coding unit block 200. The unit block 202, the coding unit block 204 adjacent to the left edge of the coding unit block 200, and the corner coding unit block 206 adjacent to the upper left of the coding unit block 200. It is to be noted that, in the decoding order of the picture in which the coding unit block 200 and the at least one other coding unit block are located, at least one other coding unit block is the code that has been decoded before the coding unit block 200 is decoded. Unit block. In other words, the proximity range does not include the coding unit block currently being encoded and/or the area that will be decoded after the coding unit block currently being encoded in the decoding process. However, the disclosure does not limit the area of the proximity range. For example, in another exemplary embodiment, the proximity range may also include a coding unit block that is currently to be encoded and/or an undecoded area in the picture.

舉例而言,在本範例實施例中,鄰近範圍可包括鄰近於編碼單元區塊200的至少一另一編碼單元區塊中鄰近於編碼單元區塊200的鄰近範圍210。換言之,鄰近範圍210中的多個畫素可以是對應於編碼單元區塊200的第1行(column)第1列(row)個畫素的左上角的畫素,以及在鄰近範圍210內鄰近於編碼單元區塊200的左邊緣的任一個畫素與在鄰近範圍210內鄰近於編碼單元區塊200的上邊緣的任一個畫素。也就是說,在編碼單元區塊200的大小為4×4的區塊的例子中,其鄰近範圍210是由大小為1×4的區塊222、大小為4×1的區塊224與大小為1×1的區塊226所組成,亦即,鄰近範圍210的區塊222的長度H為1,區塊224的寬度W為1。然而,本揭露並不加以限制鄰近範圍210的大小,例如,在另一範例實施例中,大小為4×4之編碼單元區塊200的鄰近範圍210的區塊222的長度H與區塊224的寬度W可以分別為2。For example, in the present exemplary embodiment, the proximity range may include a proximity range 210 adjacent to the coding unit block 200 in at least one other coding unit block adjacent to the coding unit block 200. In other words, the plurality of pixels in the adjacent range 210 may be pixels corresponding to the upper left corner of the first row of pixels of the first row of the coding unit block 200, and adjacent in the adjacent range 210. Any one of the pixels on the left edge of the coding unit block 200 and any one of the pixels adjacent to the upper edge of the coding unit block 200 in the adjacent range 210. That is, in the example of the block of the coding unit block 200 having a size of 4 × 4, the adjacent range 210 is a block 222 having a size of 1 × 4, a block 224 having a size of 4 × 1, and a size It is composed of a 1×1 block 226, that is, the length H of the block 222 adjacent to the range 210 is 1, and the width W of the block 224 is 1. However, the disclosure does not limit the size of the proximity range 210. For example, in another exemplary embodiment, the length H of the block 222 of the adjacent range 210 of the coding unit block 200 of size 4×4 and the block 224 The width W can be 2, respectively.

圖3A~圖3B是根據本揭露一範例實施例所繪示的從鄰近範圍選出對應N個畫素的N個顏色的範例示意圖。3A-3B are schematic diagrams showing examples of selecting N colors corresponding to N pixels from adjacent ranges according to an exemplary embodiment of the disclosure.

請先參照圖3A,具體而言,當旗標設定模組112將對應編碼單元區塊200的第一旗標設定為預定狀態值時,編碼器110即會進入鄰近區塊多顏色預測模式以利用目前正在編碼的編碼單元區塊的鄰近範圍內之畫素的一個或多個顏色來預測目前正在編碼的編碼單元區塊的畫素。舉例而言,在編碼單元區塊200的鄰近範圍210內的多個畫素中選出對應N個畫素的N個顏色的操作中,假設顏色設定模組114欲從10組候選顏色中來選擇用以預測編碼單元區塊200之畫素一個或多個顏色時,其會將一預定候選顏色數目設為10,並且根據此預定候選顏色數目將鄰近範圍210內的畫素分群為10個叢集。例如,顏色設定模組114會先根據此些畫素的畫素值將顏色相同的畫素分群至同一個叢集內,舉例而言,屬於叢集301的1個畫素的顏色為C1,屬於叢集302的2個畫素具有相同的畫素值且此2個畫素的顏色為C2,屬於叢集303的10個畫素具有相同的畫素值且此10個畫素的顏色為C3,屬於叢集304的5個畫素具有相同的畫素值且此5個畫素的顏色為C4,屬於叢集305的4個畫素具有相同的畫素值且此4個畫素的顏色為C5,屬於叢集306的7個畫素具有相同的畫素值且此7個畫素的顏色為C6,屬於叢集307的6個畫素具有相同的畫素值且此6個畫素的顏色為C7,屬於叢集308的11個畫素具有相同的畫素值且此11個畫素的顏色為C8,屬於叢集309的3個畫素具有相同的畫素值且此3個畫素的顏色為C9,而屬於叢集310的8個畫素具有相同的畫素值且此8個畫素的顏色為C10。然而,本揭露並不加以限制畫素分群的方法,例如,在另一範例實施例中,顏色設定模組114是將畫素值相近的畫素分群至同一個叢集內。接著,顏色設定模組114會依據10個叢集之中每一叢集的畫素的數量由多到少依序地排列此10個叢集以獲得對應此10個叢集的10個顏色的排序300。Referring to FIG. 3A firstly, in particular, when the flag setting module 112 sets the first flag of the corresponding coding unit block 200 to a predetermined state value, the encoder 110 enters the adjacent block multi-color prediction mode. The pixels of the coding unit block currently being encoded are predicted using one or more colors of the pixels within the vicinity of the coding unit block currently being encoded. For example, in an operation of selecting N colors corresponding to N pixels among a plurality of pixels in the proximity range 210 of the coding unit block 200, it is assumed that the color setting module 114 is to select from 10 sets of candidate colors. When predicting one or more colors of the pixels of the coding unit block 200, it sets a predetermined number of candidate colors to 10, and groups the pixels in the adjacent range 210 into 10 clusters according to the predetermined number of candidate colors. . For example, the color setting module 114 first groups the pixels of the same color into the same cluster according to the pixel values of the pixels. For example, the color of one pixel belonging to the cluster 301 is C1, which belongs to the cluster. The two pixels of 302 have the same pixel value and the color of the two pixels is C2, and the 10 pixels belonging to the cluster 303 have the same pixel value and the color of the 10 pixels is C3, belonging to the cluster. The five pixels of 304 have the same pixel value and the color of the five pixels is C4, and the four pixels belonging to cluster 305 have the same pixel value and the color of the four pixels is C5, belonging to the cluster. The seven pixels of 306 have the same pixel value and the color of the seven pixels is C6, and the six pixels belonging to cluster 307 have the same pixel value and the color of the six pixels is C7, belonging to the cluster. The 11 pixels of 308 have the same pixel value and the color of the 11 pixels is C8, and the 3 pixels belonging to cluster 309 have the same pixel value and the color of the 3 pixels is C9, and belongs to The eight pixels of cluster 310 have the same pixel value and the color of the eight pixels is C10. However, the disclosure does not limit the method of pixel grouping. For example, in another exemplary embodiment, the color setting module 114 groups pixels having similar pixel values into the same cluster. Next, the color setting module 114 sequentially arranges the 10 clusters in order according to the number of pixels of each of the 10 clusters to obtain a ranking 300 of 10 colors corresponding to the 10 clusters.

之後,顏色設定模組114會先根據排序300獲得一候選顏色對照表320,此候選顏色對照表320分別記錄選擇不同數目之顏色的情況,例如,欲使用對應鄰近範圍210內之畫素的3個顏色來預測編碼單元區塊200的畫素時,由於數目“3”實際所對應到的顏色有顏色C8、顏色C3與顏色C10,因此,顏色C8、顏色C3與顏色C10會被用來預測編碼單元區塊200的畫素。特別是,在編碼操作中,顏色設定模組114會一一的計算選擇不同數目之顏色的情況下,此些顏色所對應之畫素分別與編碼單元區塊200之間的失真值與編碼此些顏色所對應之畫素與編碼單元區塊200所需之位元數。例如,顏色設定模組114是根據此上述失真值與位元數計算出選擇不同數目之顏色的情況下,此些顏色所對應之畫素分別與編碼單元區塊200之間的代價值。並且,顏色設定模組114會根據此些代價值選擇具有最小代價值的畫素及其對應的顏色來預測編碼單元區塊200的畫素,如此一來,顏色設定模組114可挑選出一組最佳的顏色來作為預測編碼單元區塊200之畫素的顏色。換言之,在本範例實施例中,顏色設定模組114會對候選顏色對照表320中的10組顏色分別進行代價值運算以獲得一組最佳的顏色。然而,本揭露並不限於此,例如,在另一範例實施例中,顏色設定模組114可不進行代價值的運算,而直接從候選顏色對照表320中選擇1組顏色。Thereafter, the color setting module 114 first obtains a candidate color comparison table 320 according to the sorting 300. The candidate color comparison table 320 respectively records the case of selecting a different number of colors, for example, to use the pixels in the corresponding adjacent range 210. When the color is used to predict the pixels of the coding unit block 200, since the number corresponding to the number "3" actually has the color C8, the color C3, and the color C10, the color C8, the color C3, and the color C10 are used for prediction. The pixel of the coding unit block 200. In particular, in the encoding operation, the color setting module 114 calculates the distortion values between the pixels corresponding to the color and the coding unit block 200 respectively when the color setting module 114 selects a different number of colors. The pixels corresponding to the colors and the number of bits required for the coding unit block 200. For example, the color setting module 114 calculates a generation value between the pixels corresponding to the colors and the coding unit block 200 in the case where a different number of colors are selected according to the distortion value and the number of bits. Moreover, the color setting module 114 selects the pixels with the lowest cost value and their corresponding colors according to the generation values to predict the pixels of the coding unit block 200, so that the color setting module 114 can select one. The best color of the group is used as the color of the pixels of the prediction coding unit block 200. In other words, in the present exemplary embodiment, the color setting module 114 performs a cost-performing operation on the 10 sets of colors in the candidate color comparison table 320 to obtain a set of optimal colors. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the color setting module 114 may select one set of colors directly from the candidate color comparison table 320 without performing a cost-effective operation.

在此,假設具有最小代價值的1組顏色中顏色的數目為“3”,因此,顏色設定模組114會根據候選顏色對照表320選擇顏色C8、顏色C3與顏色C10作為預測編碼單元區塊200之畫素的顏色。也就是說,在從鄰近範圍選出對應N個畫素的N個顏色的編碼操作中,顏色設定模組114可根據排序300從10個叢集中依序選出3個叢集(即,叢集308、叢集303與叢集310),且將對應此3個叢集的3個顏色(即,顏色C8、顏色C3與顏色C10)設為預測編碼單元區塊200的3個顏色,在此,所選出的3個顏色所對應的畫素是分別屬於叢集308、叢集303與叢集310。Here, it is assumed that the number of colors in one set of colors having the smallest generation value is "3", and therefore, the color setting module 114 selects the color C8, the color C3, and the color C10 as the prediction coding unit block according to the candidate color comparison table 320. The color of the 200 pixels. That is, in the encoding operation of selecting N colors corresponding to N pixels from the adjacent range, the color setting module 114 may sequentially select 3 clusters from the 10 clusters according to the sorting 300 (ie, the cluster 308, the cluster). 303 and cluster 310), and the three colors corresponding to the three clusters (ie, color C8, color C3, and color C10) are set to three colors of the prediction coding unit block 200, and three selected ones are selected here. The pixels corresponding to the colors belong to the cluster 308, the cluster 303, and the cluster 310, respectively.

請參照圖3B,倘若顏色設定模組114根據鄰近範圍210內之畫素的畫素值將顏色相同的畫素分群至同一個叢集內後獲得5個叢集(即,叢集321、叢集322、叢集323、叢集324與叢集325),由於5個叢集僅會對應至5個顏色,因此,所獲得之顏色的數目小於上述預定候選顏色數目(即,“10”)。特別是,在此範例實施例中,顏色設定模組114僅會依據此5個叢集之中每一叢集的畫素的數量由多到少依序地排列此5個叢集以獲得排序330。類似地,顏色設定模組114會根據排序330獲得候選顏色對照表340以記錄選擇不同數目之顏色的情況。之後,顏色設定模組114亦會一一的計算選擇不同數目之顏色的情況下,此些顏色所對應之畫素分別與編碼單元區塊200之間的代價值以獲得具有最小代價值的數目及其對應的顏色來預測編碼單元區塊200的畫素。值得一提的是,在本揭露中,預定候選顏色數目即代表在鄰近區塊多顏色預測模式中具有幾組顏色模式可用來作為預測編碼單元區塊200之畫素的顏色。然而,本揭露並不加以限制預定候選顏色數目的大小,例如,在另一範例實施例中,預定候選顏色數目的大小可以是小於10或大於10的其他數目。Referring to FIG. 3B, if the color setting module 114 groups the pixels of the same color into the same cluster according to the pixel values of the pixels in the adjacent range 210, 5 clusters are obtained (ie, the cluster 321, the cluster 322, the cluster). 323, cluster 324 and cluster 325), since 5 clusters only correspond to 5 colors, the number of colors obtained is less than the predetermined number of candidate colors (ie, "10"). In particular, in this exemplary embodiment, the color setting module 114 only sequentially arranges the five clusters in order to obtain the ordering 330 according to the number of pixels of each of the five clusters. Similarly, color setting module 114 may obtain candidate color look-up table 340 based on ranking 330 to record the selection of a different number of colors. Then, the color setting module 114 also calculates the number of colors corresponding to the color, and the value between the pixels corresponding to the color and the coding unit block 200 respectively to obtain the number with the smallest generation value. And its corresponding color to predict the pixels of the coding unit block 200. It is worth mentioning that, in the present disclosure, the predetermined number of candidate colors represents that there are several sets of color modes in the adjacent block multi-color prediction mode that can be used as the color of the pixels of the prediction coding unit block 200. However, the present disclosure does not limit the size of the predetermined candidate color number. For example, in another exemplary embodiment, the size of the predetermined candidate color number may be other numbers less than 10 or greater than 10.

圖4是根據本揭露另一範例實施例所繪示的從鄰近範圍選出對應N個畫素的N個顏色的範例示意圖。FIG. 4 is a schematic diagram showing an example of selecting N colors corresponding to N pixels from adjacent ranges according to another exemplary embodiment of the disclosure.

請參照圖4,在此範例實施例中,從鄰近範圍選出對應N個畫素的N個顏色的編碼操作是類似於圖3A與圖3B所示的方法,不同之處在於,倘若顏色設定模組114根據鄰近範圍210內之畫素的畫素值將顏色相同的畫素分群至同一個叢集內後所獲得之M個叢集的叢集數目小於上述預定候選顏色數目時,顏色設定模組114會從對應編碼單元區塊200的調色盤顏色預測表40中選擇P個顏色作為P個叢集,以使得(M+P)等於所述預定候選顏色數目。具體而言,在顏色設定模組114根據鄰近範圍210內之畫素的畫素值將顏色相同的畫素分群為叢集321、叢集322、叢集323叢集324與叢集325的例子中,由於對應至5個叢集的5個顏色的數目小於預定候選顏色數目(例如,“10”),因此,顏色設定模組114會從對應編碼單元區塊200的調色盤顏色預測表40中依序選擇顏色P1、顏色P2、顏色P3、顏色P4與顏色P5。在此,調色盤顏色預測表40中的顏色是來自於已經編碼的編碼單元區塊使用調色盤模式編碼所產生的顏色。Referring to FIG. 4, in this exemplary embodiment, the encoding operation of selecting N colors corresponding to N pixels from adjacent ranges is similar to the method shown in FIG. 3A and FIG. 3B, except that if the color setting mode is used. When the group 114 groups the pixels of the same color into the same cluster according to the pixel values of the pixels in the adjacent range 210, the number of clusters of the M clusters obtained after the pixels are smaller than the predetermined candidate color number, the color setting module 114 P colors are selected as P clusters from the palette color prediction table 40 corresponding to the coding unit block 200 such that (M+P) is equal to the predetermined candidate number of colors. Specifically, in the example in which the color setting module 114 groups the pixels of the same color into the cluster 321 , the cluster 322 , the cluster 323 cluster 324 , and the cluster 325 according to the pixel values of the pixels in the adjacent range 210, The number of 5 colors of the 5 clusters is less than the predetermined number of candidate colors (for example, "10"), and therefore, the color setting module 114 sequentially selects colors from the palette color prediction table 40 of the corresponding encoding unit block 200. P1, color P2, color P3, color P4, and color P5. Here, the color in the palette color prediction table 40 is the color generated from the coding unit block that has been encoded using the palette mode encoding.

之後,顏色設定模組114會依據5個叢集之中每一叢集的畫素的數量由多到少依序地排列此5個叢集所分別對應的顏色C1~C5,且將顏色P1、顏色P2、顏色P3、顏色P4與顏色P5排列於顏色C1~C5之後以獲得排序400。類似地,顏色設定模組114會根據排序400獲得候選顏色對照表410以記錄選擇不同數目之顏色的情況。之後,顏色設定模組114亦會一一的計算選擇不同數目之顏色的情況下,此些顏色所對應之畫素分別與編碼單元區塊200之間的代價值以獲得具有最小代價值的數目及其對應的顏色來預測編碼單元區塊200的畫素。值得注意的是,本揭露亦不加以限制用以填塞排序400以使得其中顏色個數等於所述預定候選顏色數目的顏色,例如,在另一範例實施例中,是使用預設值來填塞排序400,所述預設值例如是其畫素值為128或256的顏色。After that, the color setting module 114 sequentially arranges the colors C1 to C5 corresponding to the five clusters according to the number of pixels in each of the five clusters, and sets the colors P1 and P2 respectively. The color P3, the color P4, and the color P5 are arranged after the colors C1 to C5 to obtain the sort 400. Similarly, color setting module 114 may obtain candidate color look-up table 410 based on ranking 400 to record the case of selecting a different number of colors. Then, the color setting module 114 also calculates the number of colors corresponding to the color, and the value between the pixels corresponding to the color and the coding unit block 200 respectively to obtain the number with the smallest generation value. And its corresponding color to predict the pixels of the coding unit block 200. It should be noted that the disclosure also does not limit the color used to fill the order 400 so that the number of colors is equal to the predetermined number of candidate colors. For example, in another exemplary embodiment, the preset value is used to fill the sort. 400. The preset value is, for example, a color whose pixel value is 128 or 256.

圖5是根據本揭露又另一範例實施例所繪示的從鄰近範圍選出對應N個畫素的N個顏色的範例示意圖。FIG. 5 is a schematic diagram showing an example of selecting N colors corresponding to N pixels from a neighboring range according to another exemplary embodiment of the present disclosure.

請參照圖5,在此範例實施例中,從鄰近範圍210選出對應N個畫素的N個顏色的編碼操作是類似於圖3A與圖3B所示的方法,不同之處在於,在顏色設定模組114根據鄰近範圍210內之畫素的畫素值將顏色相同的畫素分群至同一個叢集以獲得M個叢集後,顏色設定模組114會依據此M個叢集之中每一叢集的畫素的數量從M個叢集之中僅選出1個叢集,特別是,此1個叢集的畫素的數量大於M個叢集之中的其他叢集的畫素的數量。具體而言,當顏色設定模組114根據鄰近範圍210內之畫素的畫素值將顏色相同的畫素分群至同一個叢集內且獲得10個叢集後,顏色設定模組114僅會選出其畫素的數量最多的1個叢集308。在此,對應叢集308之顏色以外的其他顏色亦是從鄰近範圍210中選出,且對應叢集308之顏色以外的其他顏色的排列順序是依據從鄰近範圍210取樣此些顏色之方向而獲得的。例如,請再參照圖2,在一範例實施例中,顏色設定模組114沿著第一方向502對鄰近範圍210內的畫素進行取樣所獲得之畫素所對應的顏色依序分別為顏色C1、顏色C2、顏色C3與顏色C4,而沿著第二方向504對鄰近範圍210內的畫素進行取樣所獲得之畫素所對應的顏色依序分別為顏色C5、顏色C6、顏色C7、顏色C9與顏色C10。據此,顏色設定模組114會根據此些顏色所獲得的順序將顏色C1、顏色C2、顏色C3、顏色C4、顏色C5、顏色C6、顏色C7、顏色C9與顏色C10填塞至排序500。然而,本揭露並不加以限制顏色設定模組114取樣的方向與沿著此些方向取樣的先後順序,例如,在另一範例實施例中,顏色設定模組114可先沿著第二方向504取樣,再沿著第一方向502取樣。Referring to FIG. 5, in this exemplary embodiment, the encoding operation of selecting N colors corresponding to N pixels from the adjacent range 210 is similar to the method shown in FIG. 3A and FIG. 3B, except that the color setting is performed. The module 114 groups the pixels of the same color into the same cluster according to the pixel values of the pixels in the adjacent range 210 to obtain the M clusters, and the color setting module 114 according to each of the M clusters. The number of pixels is selected from only one cluster among the M clusters. In particular, the number of pixels of the one cluster is larger than the number of pixels of other clusters among the M clusters. Specifically, when the color setting module 114 groups the pixels of the same color into the same cluster according to the pixel values of the pixels in the adjacent range 210 and obtains 10 clusters, the color setting module 114 only selects the pixels. The cluster with the largest number of pixels is 308. Here, the colors other than the colors of the corresponding clusters 308 are also selected from the adjacent ranges 210, and the order of the colors other than the colors of the corresponding clusters 308 is obtained according to the direction in which the colors are sampled from the adjacent range 210. For example, referring to FIG. 2, in an exemplary embodiment, the color setting module 114 samples the pixels in the adjacent range 210 along the first direction 502, and the colors corresponding to the pixels are sequentially color. C1, color C2, color C3 and color C4, and the pixels corresponding to the pixels in the adjacent range 210 are sampled along the second direction 504, and the colors corresponding to the pixels are respectively color C5, color C6, color C7, Color C9 and color C10. Accordingly, the color setting module 114 packs the color C1, the color C2, the color C3, the color C4, the color C5, the color C6, the color C7, the color C9, and the color C10 to the sort 500 in accordance with the order obtained by the colors. However, the disclosure does not limit the direction in which the color setting module 114 samples and the sequence in which the samples are taken. For example, in another exemplary embodiment, the color setting module 114 may first follow the second direction 504. Samples are taken and sampled along the first direction 502.

之後,顏色設定模組114會根據排序500獲得候選顏色對照表510以記錄選擇不同數目之顏色的情況,並且一一的計算選擇不同數目之顏色的情況下,此些顏色所對應之畫素分別與編碼單元區塊200之間的代價值以獲得具有最小代價值的畫素及其對應的顏色來預測編碼單元區塊200的畫素。Thereafter, the color setting module 114 obtains the candidate color comparison table 510 according to the ranking 500 to record the case of selecting a different number of colors, and if the calculation of one by one selects a different number of colors, the pixels corresponding to the colors are respectively The pixel value with the coding unit block 200 is obtained to obtain a pixel having the smallest generation value and its corresponding color to predict the pixel of the coding unit block 200.

在透過上述圖2、圖3A~圖3B、圖4與圖5所示顏色設定模組114從鄰近範圍210選出對應N個畫素的N個顏色的多個方法的其中之一以獲得預測編碼單元區塊200之畫素的一個或多個顏色後,顏色設定模組114會將對應編碼單元區塊200的第二旗標設定為此一個或多個顏色的數目。例如,以圖3A為例,顏色設定模組114對候選顏色對照表320中的10組顏色分別進行代價值運算所獲得的一組最佳的顏色為顏色C8、顏色C3與顏色C10,因此,顏色設定模組114會將對應編碼單元區塊200的第二旗標設定為“3”。由於所選出的3個顏色皆為不同的顏色,且分別對應至3個畫素,因此,對編碼單元區塊200中的每一畫素進行索引編號時,編碼模組116是將編碼單元區塊200中的每一畫素的顏色以此3個畫素的索引值來表示。In the color setting module 114 shown in FIG. 2, FIG. 3A to FIG. 3B, FIG. 4 and FIG. 5, one of a plurality of methods corresponding to N colors of N pixels is selected from the adjacent range 210 to obtain predictive coding. After one or more colors of the pixels of the unit block 200, the color setting module 114 sets the second flag of the corresponding coding unit block 200 to the number of one or more colors. For example, taking FIG. 3A as an example, the set of optimal colors obtained by the color setting module 114 performing the cost-performing operation on the 10 sets of colors in the candidate color comparison table 320 are the color C8, the color C3, and the color C10. The color setting module 114 sets the second flag of the corresponding coding unit block 200 to "3". Since the selected three colors are different colors and correspond to 3 pixels respectively, when each pixel in the coding unit block 200 is indexed, the coding module 116 is a coding unit area. The color of each pixel in block 200 is represented by the index value of the three pixels.

圖6是根據本揭露一範例實施例所繪示的建立索引地圖的一個範例。FIG. 6 is an example of establishing an index map according to an exemplary embodiment of the disclosure.

請參照圖6,在編碼模組116欲將編碼單元區塊200中的每一畫素的顏色以3個畫素的索引值來表示時,亦即,編碼單元區塊200的第二旗標設為“3”時,編碼模組116即可根據對應此3個畫素的索引值(即,0、1、2)對編碼單元區塊200中的每一畫素進行索引編號以產生索引地圖600。換言之,在索引地圖600中編碼單元區塊200的每一畫素的顏色是以對應此3個畫素的索引值(即,0、1、2)來呈現。特別是,在本範例實施例中,假設編碼單元區塊200的大小為4×4,因此,索引地圖600中對應編碼單元區塊200的每一畫素的索引值是以4×4矩陣形式排列。由於所設定的第二旗標的值大於1,因此,編碼模組116會傳送編碼單元區塊200的每一畫素所對應的索引值至解碼器120,並且在解碼器120接收編碼模組116所傳送對應編碼單元區塊200的第一旗標、對應編碼單元區塊200的第二旗標與編碼單元區塊200的每一畫素所對應的索引值的同時,解碼模組128會根據編碼單元區塊200的每一畫素所對應的索引值(即,0、1、2)重建對應編碼單元區塊200的索引地圖600。Referring to FIG. 6, when the encoding module 116 wants to display the color of each pixel in the coding unit block 200 as an index value of three pixels, that is, the second flag of the coding unit block 200. When set to "3", the encoding module 116 can index each pixel in the coding unit block 200 according to the index values corresponding to the three pixels (ie, 0, 1, 2) to generate an index. Map 600. In other words, the color of each pixel of the coding unit block 200 in the index map 600 is presented with an index value (ie, 0, 1, 2) corresponding to the three pixels. In particular, in the present exemplary embodiment, it is assumed that the size of the coding unit block 200 is 4×4, and therefore, the index value of each pixel of the corresponding coding unit block 200 in the index map 600 is in the form of a 4×4 matrix. arrangement. Since the value of the set second flag is greater than 1, the encoding module 116 transmits the index value corresponding to each pixel of the coding unit block 200 to the decoder 120, and receives the encoding module 116 at the decoder 120. The first module of the corresponding coding unit block 200, the second flag of the corresponding coding unit block 200 and the index value corresponding to each pixel of the coding unit block 200 are simultaneously decoded by the decoding module 128. The index value (ie, 0, 1, 2) corresponding to each pixel of the coding unit block 200 reconstructs the index map 600 of the corresponding coding unit block 200.

在另一範例實施例中,以圖3A為例,假設顏色設定模組114對候選顏色對照表320中的10組顏色分別進行代價值運算所獲得的一組最佳的顏色為顏色C8,則顏色設定模組114會將對應編碼單元區塊200的第二旗標設定為“1”。由於所選出的1個顏色對應至1個畫素,因此,對編碼單元區塊200中的每一畫素進行索引編號時,編碼模組116是將編碼單元區塊200中的每一畫素的顏色皆以此1個畫素的索引值(例如,0)來表示。因此,當顏色設定模組114所選出的一組顏色中僅有1個顏色時,編碼模組116不必傳送此編碼單元區塊200的每一畫素的顏色所對應的索引值至解碼器120,以減少編碼運算中不必要的傳輸。In another exemplary embodiment, taking FIG. 3A as an example, it is assumed that the color setting module 114 performs a value-based operation on the 10 sets of colors in the candidate color comparison table 320 to obtain a color C8. The color setting module 114 sets the second flag of the corresponding coding unit block 200 to "1". Since the selected one color corresponds to one pixel, when each pixel in the coding unit block 200 is indexed, the coding module 116 is to each pixel in the coding unit block 200. The color is represented by the index value of one pixel (for example, 0). Therefore, when only one color is selected in the color set by the color setting module 114, the encoding module 116 does not have to transmit the index value corresponding to the color of each pixel of the encoding unit block 200 to the decoder 120. To reduce unnecessary transmissions in encoding operations.

圖7是根據本揭露一範例實施例所繪示的編碼方法的流程圖。FIG. 7 is a flowchart of an encoding method according to an exemplary embodiment of the disclosure.

請參照圖7,在步驟S701中,編碼器110設定對應編碼單元區塊200的第一旗標的狀態值。Referring to FIG. 7, in step S701, the encoder 110 sets a state value corresponding to the first flag of the coding unit block 200.

在步驟S703中,編碼器110判斷第一旗標的狀態值符合預定狀態值時,在編碼單元區塊200的鄰近範圍210內的多個畫素中選出對應N個畫素的N個顏色,且將對應編碼單元區塊200的第二旗標設定為對應N個畫素的N個顏色的數目,其中N個顏色皆不相同且N為正整數。In step S703, when the encoder 110 determines that the state value of the first flag meets the predetermined state value, the N colors corresponding to the N pixels are selected from the plurality of pixels in the proximity range 210 of the coding unit block 200, and The second flag of the corresponding coding unit block 200 is set to the number of N colors corresponding to N pixels, wherein N colors are different and N is a positive integer.

在步驟S705中,編碼器110對編碼單元區塊200中的每一畫素進行索引編號以使得編碼單元區塊200中的每一畫素的顏色是以所述N個畫素的索引值來表示。In step S705, the encoder 110 performs index numbering on each pixel in the coding unit block 200 such that the color of each pixel in the coding unit block 200 is the index value of the N pixels. Said.

在步驟S707中,編碼器110傳送對應編碼單元區塊200的第一旗標至解碼器120,且在第一旗標的狀態值符合預定狀態值時,傳送對應編碼單元區塊210的第二旗標與編碼單元區塊200的每一畫素所對應的索引值至解碼器120。In step S707, the encoder 110 transmits the first flag of the corresponding coding unit block 200 to the decoder 120, and transmits the second flag of the corresponding coding unit block 210 when the state value of the first flag meets the predetermined state value. The index value corresponding to each pixel of the coding unit block 200 is mapped to the decoder 120.

然而,圖7中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖7中各步驟可以實作為多個程式碼或是電路,本揭露不加以限制。此外,圖7的方法可以搭配以上範例實施例使用,也可以單獨使用,本揭露不加以限制。值得注意的是,圖7的編碼方法亦可稱為鄰近區塊多顏色預測模式,其是利用目前正在編碼的編碼單元區塊的鄰近範圍內之畫素的一個或多個顏色來預測目前正在編碼的編碼單元區塊的畫素,特別是,在上述的範例實施例中,鄰近區塊多顏色預測模式是獨立於螢幕視訊內容編碼的其他編碼模式,舉例而言,螢幕視訊內容編碼的編碼模式包括調色盤模式與畫面內區塊複製模式等編碼模式,編碼器110會根據對應不同模式的旗標而進入所述旗標對應的編碼模式。換言之,當編碼器110收到致能調色盤模式的旗標時,編碼器110會在調色盤模式下執行編碼操作,而當編碼器110收到致能鄰近區塊多顏色預測模式的第一旗標時(即,第一旗標符合預定狀態值時),編碼器110會在鄰近區塊多顏色預測模式下執行編碼操作。然而,本揭露並不限於此,例如,在另一範例實施例中,編碼器110會在螢幕視訊內容編碼的特定編碼模式下,執行上述鄰近區塊多顏色預測模式。也就是說,編碼器110可以在調色盤模式下根據第一旗標的狀態值,而決定是否使用鄰近區塊多顏色預測模式執行編碼操作。However, the steps in FIG. 7 have been described in detail above, and will not be described again here. It should be noted that the steps in FIG. 7 can be implemented as multiple codes or circuits, and the disclosure is not limited. In addition, the method of FIG. 7 may be used in combination with the above exemplary embodiments, or may be used alone, and the disclosure is not limited. It should be noted that the encoding method of FIG. 7 may also be referred to as a neighboring block multi-color prediction mode, which is to predict the current using one or more colors of pixels in the vicinity of the coding unit block currently being encoded. The pixel of the coded coding unit block, in particular, in the above exemplary embodiment, the adjacent block multi-color prediction mode is another coding mode independent of the video content encoding, for example, the encoding of the video content encoding. The mode includes an encoding mode such as a palette mode and an intra-block copy mode, and the encoder 110 enters an encoding mode corresponding to the flag according to a flag corresponding to the different mode. In other words, when the encoder 110 receives the flag of the enabled palette mode, the encoder 110 performs an encoding operation in the palette mode, and when the encoder 110 receives the enabling adjacent block multi-color prediction mode. At the first flag time (ie, when the first flag meets a predetermined state value), the encoder 110 performs an encoding operation in the adjacent block multi-color prediction mode. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the encoder 110 performs the above-described neighboring block multi-color prediction mode in a specific encoding mode of the screen video content encoding. That is, the encoder 110 may decide whether to perform the encoding operation using the neighboring block multi-color prediction mode according to the state value of the first flag in the palette mode.

在本範例實施例中,由於第一旗標用以指示是否致能鄰近區塊多顏色預測模式,因此,當解碼器120的接收模組122從編碼模組116接收到對應編碼單元區塊200的第一旗標,旗標狀態判定模組124會判斷對應編碼單元區塊200的第一旗標的狀態值,並且在旗標狀態判定模組124判斷第一旗標的狀態值符合預定狀態值時,接收模組122才會繼續接收從編碼模組116傳來的第二旗標與編碼單元區塊200的每一畫素所對應的索引值。之後,由於第一旗標的狀態值符合預定狀態值,因此,顏色設定模組126會讀取接收模組122所接收的對應編碼單元區塊200的第二旗標與編碼單元區塊的每一畫素所對應的索引值,以執行利用目前正在編碼的編碼單元區塊的鄰近範圍內之畫素的一個或多個顏色來預測並重建目前正在編碼的編碼單元區塊的畫素的解碼操作。In the present exemplary embodiment, the first flag is used to indicate whether the neighboring block multi-color prediction mode is enabled. Therefore, when the receiving module 122 of the decoder 120 receives the corresponding coding unit block 200 from the encoding module 116. The first flag, the flag state determination module 124 determines the state value of the first flag of the corresponding coding unit block 200, and when the flag state determination module 124 determines that the state value of the first flag meets the predetermined state value The receiving module 122 continues to receive the index value corresponding to each pixel of the encoding unit block 200 transmitted from the encoding module 116. Thereafter, since the state value of the first flag meets the predetermined state value, the color setting module 126 reads each of the second flag and the coding unit block of the corresponding coding unit block 200 received by the receiving module 122. An index value corresponding to a pixel to perform decoding operation of predicting and reconstructing a pixel of a coding unit block currently being encoded using one or more colors of pixels in a neighborhood of a coding unit block currently being encoded. .

在解碼操作中,解碼器120會根據從編碼器110所接收資訊來重建編碼單元區塊200的畫素。例如,當旗標狀態判定模組124判定第一旗標符合預定狀態值時,顏色設定模組126會根據所接收的第二旗標在編碼單元區塊200的鄰近範圍210內的多個畫素中選出對應N個畫素的N個顏色以做為重建編碼單元區塊200之畫素的N個顏色。在本範例實施例中,顏色設定模組126從鄰近範圍210選出對應N個畫素的N個顏色以獲得重建編碼單元區塊200之畫素的一個或多個顏色的方法是類似於上述圖2、圖3A~圖3B、圖4與圖5所示的多個方法的其中之一,在此不再重述。不同之處在於,解碼器120的顏色設定模組126是根據第二旗標所指示的對應N個畫素的N個顏色的數目以快速地選出用以重建編碼單元區塊200之畫素的N個顏色,而不需一一的計算選擇不同數目之顏色的情況下,此些顏色所對應之畫素分別與編碼單元區塊200之間的代價值。In the decoding operation, the decoder 120 reconstructs the pixels of the coding unit block 200 based on the information received from the encoder 110. For example, when the flag state determination module 124 determines that the first flag meets the predetermined state value, the color setting module 126 may draw multiple images in the proximity range 210 of the coding unit block 200 according to the received second flag. N colors corresponding to N pixels are selected as the N colors of the pixels of the reconstructed coding unit block 200. In the present exemplary embodiment, the color setting module 126 selects N colors corresponding to N pixels from the adjacent range 210 to obtain one or more colors of the pixels of the reconstructed coding unit block 200, which is similar to the above figure. 2. One of the plurality of methods shown in FIG. 3A to FIG. 3B, FIG. 4 and FIG. 5 is not repeated here. The difference is that the color setting module 126 of the decoder 120 is configured to quickly select the pixels used to reconstruct the coding unit block 200 according to the number of N colors corresponding to the N pixels indicated by the second flag. N colors, without the need to calculate a different number of colors, the pixel corresponding to these colors and the coding unit block 200 respectively.

以圖3A與圖6為例,顏色設定模組126根據鄰近範圍210內之畫素的畫素值將顏色相同的畫素分群至同一個叢集內後獲得10個叢集(即,叢集301、叢集302、叢集303、叢集304、叢集305、叢集306、叢集307、叢集308、叢集309與叢集310),並且依據此10個叢集之中每一叢集的畫素的數量由多到少依序地排列此10個叢集以獲得排序300。特別是,在編碼器110的顏色設定模組114將對應編碼單元區塊200的第二旗標設定為“3”的例子中,解碼器120的顏色設定模組126會根據由編碼器110所接收的第二旗標,而直接從排序300中依序地選出對應3個畫素的3個顏色,即,顏色C8、顏色C3與顏色C10,並將此3個顏色作為用以重建編碼單元區塊200之畫素的顏色。舉例而言,在解碼模組128重建編碼單元區塊200之畫素的操作中,由於第二旗標指示用以重建編碼單元區塊200之畫素的顏色的數目為3且此數目大於1,因此,接收模組122會接收編碼單元區塊200的每一畫素所對應的索引值(即,0、1、2),且解碼模組128會根據從接收模組122中所讀取的編碼單元區塊200的每一畫素所對應的索引值重建對應編碼單元區塊的索引地圖600。此後,解碼模組128可再根據索引地圖600與對應上述3個畫素的3個顏色(即,顏色C8、顏色C3與顏色C10)重建編碼單元區塊200的多個畫素。Taking FIG. 3A and FIG. 6 as an example, the color setting module 126 groups 10 pixels of the same color into the same cluster according to the pixel values of the pixels in the adjacent range 210 (ie, cluster 301, cluster). 302, cluster 303, cluster 304, cluster 305, cluster 306, cluster 307, cluster 308, cluster 309, and cluster 310), and the number of pixels according to each of the 10 clusters is sequentially and sequentially These 10 clusters are arranged to obtain a ranking 300. In particular, in the example where the color setting module 114 of the encoder 110 sets the second flag of the corresponding coding unit block 200 to "3", the color setting module 126 of the decoder 120 is based on the encoder 110. Receiving the second flag, and directly selecting three colors corresponding to three pixels, that is, color C8, color C3, and color C10, from the sorting 300, and using the three colors as reconstruction unit The color of the pixel of block 200. For example, in the operation of the decoding module 128 reconstructing the pixels of the coding unit block 200, since the second flag indicates that the number of colors used to reconstruct the pixels of the coding unit block 200 is 3 and the number is greater than 1 Therefore, the receiving module 122 receives the index value (ie, 0, 1, 2) corresponding to each pixel of the coding unit block 200, and the decoding module 128 reads according to the slave receiving module 122. The index value corresponding to each pixel of the coding unit block 200 reconstructs the index map 600 of the corresponding coding unit block. Thereafter, the decoding module 128 can reconstruct the plurality of pixels of the coding unit block 200 according to the index map 600 and the three colors corresponding to the three pixels (ie, the color C8, the color C3, and the color C10).

在另一範例實施例中,在編碼器110的顏色設定模組114將對應編碼單元區塊200的第二旗標設定為“1”的例子中,編碼單元區塊200中的每一畫素的顏色皆會以相同的索引值(例如,0)來表示,因此,編碼模組116不需要一一傳送編碼單元區塊200的每一畫素的顏色所對應的索引值至解碼器120,而解碼器120的顏色設定模組126僅需根據由編碼器110所接收的第二旗標,而直接從排序300中依序地選出對應1個畫素的1個顏色,即,顏色C8,並將此1個顏色作為用以重建編碼單元區塊200之畫素的顏色。此後,解碼模組128即會使用此1個顏色(即,顏色C8)重建編碼單元區塊200的多個畫素。In another exemplary embodiment, in the example where the color setting module 114 of the encoder 110 sets the second flag of the corresponding coding unit block 200 to "1", each pixel in the coding unit block 200 The color is represented by the same index value (for example, 0). Therefore, the encoding module 116 does not need to transmit the index value corresponding to the color of each pixel of the encoding unit block 200 to the decoder 120 one by one. The color setting module 126 of the decoder 120 only needs to select one color corresponding to one pixel, that is, the color C8, directly from the sorting 300 according to the second flag received by the encoder 110. This 1 color is used as the color of the pixel used to reconstruct the coding unit block 200. Thereafter, the decoding module 128 reconstructs the plurality of pixels of the coding unit block 200 using the one color (ie, the color C8).

圖8是根據本揭露一範例實施例所繪示的解碼方法的流程圖。FIG. 8 is a flowchart of a decoding method according to an exemplary embodiment of the disclosure.

請參照圖8,在步驟S801中,解碼器120接收對應編碼單元區塊200的第一旗標。Referring to FIG. 8, in step S801, the decoder 120 receives the first flag of the corresponding coding unit block 200.

在步驟S803中,解碼器120判斷第一旗標的狀態值符合預定狀態值時,接收並讀取對應編碼單元區塊200的第二旗標與編碼單元區塊200的每一畫素所對應的索引值,且根據第二旗標在編碼單元區塊200的鄰近範圍210內的多個畫素中選出對應N個畫素的N個顏色,其中第二旗標指示對應N個畫素的N個顏色的數目且N個顏色皆不相同,其中N為正整數。In step S803, when the decoder 120 determines that the state value of the first flag meets the predetermined state value, the second flag corresponding to the coding unit block 200 is received and read corresponding to each pixel of the coding unit block 200. An index value, and selecting N colors corresponding to N pixels in a plurality of pixels in the proximity range 210 of the coding unit block 200 according to the second flag, wherein the second flag indicates N corresponding to the N pixels The number of colors and N colors are different, where N is a positive integer.

在步驟S805中,解碼器120根據對應N個畫素的N個顏色重建編碼單元區塊200的畫素。In step S805, the decoder 120 reconstructs the pixels of the coding unit block 200 from the N colors corresponding to the N pixels.

然而,圖8中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖8中各步驟可以實作為多個程式碼或是電路,本揭露不加以限制。此外,圖8的方法可以搭配以上範例實施例使用,也可以單獨使用,本揭露不加以限制。值得注意的是,圖8的解碼方法亦可稱為鄰近區塊多顏色預測模式,其是利用目前正在編碼的編碼單元區塊的鄰近範圍內之畫素的一個或多個顏色來重建目前正在解碼的編碼單元區塊的畫素,特別是,在上述的範例實施例中,鄰近區塊多顏色預測模式是獨立於螢幕視訊內容編碼的其他編碼模式,舉例而言,螢幕視訊內容編碼的編碼模式包括調色盤模式、畫面內區塊複製模式等編碼模式,解碼器120會根據對應不同模式的旗標而進入所述旗標對應的編碼模式。換言之,當解碼器120收到致能調色盤模式的旗標時,解碼器120會在調色盤模式下執行解碼操作,而當解碼器120收到致能鄰近區塊多顏色預測模式的第一旗標時(即,第一旗標符合預定狀態值時),解碼器120會在鄰近區塊多顏色預測模式下執行解碼操作。然而,本揭露並不限於此,例如,在另一範例實施例中,解碼器120會在螢幕視訊內容編碼的特定編碼模式下,執行上述鄰近區塊多顏色預測模式。也就是說,解碼器120可以在調色盤模式下根據第一旗標的狀態值,而決定是否使用鄰近區塊多顏色預測模式執行解碼操作。However, the steps in FIG. 8 have been described in detail above, and will not be described again here. It should be noted that the steps in FIG. 8 can be implemented as multiple code codes or circuits, and the disclosure is not limited. In addition, the method of FIG. 8 may be used in combination with the above exemplary embodiments, or may be used alone, and the disclosure is not limited. It should be noted that the decoding method of FIG. 8 may also be referred to as a neighboring block multi-color prediction mode, which is to reconstruct the current one or more colors of the pixels in the vicinity of the coding unit block currently being encoded. The pixels of the decoded coding unit block, in particular, in the above exemplary embodiment, the adjacent block multi-color prediction mode is independent of other coding modes of the video content encoding, for example, the encoding of the video content encoding. The mode includes an encoding mode such as a palette mode, an intra-block copy mode, and the decoder 120 enters an encoding mode corresponding to the flag according to a flag corresponding to the different mode. In other words, when the decoder 120 receives the flag of the enabled palette mode, the decoder 120 performs a decoding operation in the palette mode, and when the decoder 120 receives the enable neighboring block multi-color prediction mode. At the first flag time (ie, when the first flag meets a predetermined state value), the decoder 120 performs a decoding operation in the adjacent block multi-color prediction mode. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the decoder 120 performs the above-described neighboring block multi-color prediction mode in a specific encoding mode of the screen video content encoding. That is, the decoder 120 may decide whether to perform the decoding operation using the neighboring block multi-color prediction mode according to the state value of the first flag in the palette mode.

圖9A~圖9C是根據本揭露一範例實施例所繪示的解碼的程式碼。9A-9C are decoded code diagrams according to an exemplary embodiment of the present disclosure.

請參照圖9A,在解碼操作中,解碼器120可以根據圖9A所示的程式碼中的方程式來決定是否使用鄰近區塊多顏色預測模式來進行解碼。其中參數“CU-level flag”對應至本揭露上述的第一旗標,並且用以指示是否致能鄰近區塊多顏色預測模式,而參數“intra_bc_flag”、“pred_mode_flag”與“palette_mode_flag”分別對應至用以致能畫面內區塊複製模式、預測模式與調色盤模式的旗標。例如,當“CU-level flag”的值被設為1時,解碼器120會使用鄰近區塊多顏色預測模式對目前欲進行解碼之畫面進行解碼的操作,反之,當“CU-level flag”的值不為1時,解碼器120會根據參數“intra_bc_flag”、“pred_mode_flag”或“palette_mode_flag”而執行畫面內區塊複製模式、預測模式或調色盤模式的操作。特別是,在圖9A的例子中,鄰近區塊多顏色預測模式是獨立於螢幕視訊內容編碼的其他編碼模式。Referring to FIG. 9A, in the decoding operation, the decoder 120 may decide whether to use the neighboring block multi-color prediction mode for decoding according to the equation in the code shown in FIG. 9A. The parameter “CU-level flag” corresponds to the first flag of the foregoing disclosure, and is used to indicate whether the neighboring block multi-color prediction mode is enabled, and the parameters “intra_bc_flag”, “pred_mode_flag” and “palette_mode_flag” respectively correspond to A flag used to enable intra-tile block copy mode, prediction mode, and palette mode. For example, when the value of "CU-level flag" is set to 1, the decoder 120 uses the neighboring block multi-color prediction mode to decode the picture to be decoded, and vice versa, when "CU-level flag" When the value of the value is not 1, the decoder 120 performs an operation of the intra-block copy mode, the prediction mode, or the palette mode according to the parameters "intra_bc_flag", "pred_mode_flag", or "palette_mode_flag". In particular, in the example of FIG. 9A, the neighboring block multi-color prediction mode is another encoding mode that is independent of the screen video content encoding.

請參照圖9B,類似地,在圖9B的例子中,鄰近區塊多顏色預測模式亦是獨立於螢幕視訊內容編碼的其他編碼模式,例如,解碼器120會根據參數“intra_bc_flag”、“pred_mode_flag”、“palette_mode_flag”與“CU-level flag”而執行畫面內區塊複製模式、預測模式、調色盤模式或鄰近區塊多顏色預測模式的其中之一。Referring to FIG. 9B, similarly, in the example of FIG. 9B, the adjacent block multi-color prediction mode is also another encoding mode independent of the video content encoding, for example, the decoder 120 may according to the parameters "intra_bc_flag", "pred_mode_flag". And "palette_mode_flag" and "CU-level flag" perform one of the intra-tile block copy mode, the prediction mode, the palette mode, or the adjacent block multi-color prediction mode.

請參照圖9C,在此例子中,解碼器120會根據參數“intra_bc_flag”、“pred_mode_flag”或“palette_mode_flag”而執行畫面內區塊複製模式、預測模式或調色盤模式的操作。特別是,當解碼器120使用調色盤模式進行解碼操作時,解碼器120會更進一步的判斷參數“CU-level flag”的值來決定是否致能鄰近區塊多顏色預測模式。換言之,在圖9C的例子中,解碼器120是在螢幕視訊內容編碼的調色盤模式下,執行鄰近區塊多顏色預測模式,亦即,本揭露的鄰近區塊多顏色預測模式可以是螢幕視訊內容編碼的任一個模式下的編解碼模式。根據上述可知,本揭露並不加以限制鄰近區塊多顏色預測模式執行的時間點,其可以獨立於螢幕視訊內容編碼的其他編碼模式,或是螢幕視訊內容編碼的任一個模式下的特例,此外,圖9A~圖9C僅為本揭露一範例程式碼,而非用以限制本揭露。Referring to FIG. 9C, in this example, the decoder 120 performs an operation of the intra-tile block copy mode, the prediction mode, or the palette mode according to the parameters "intra_bc_flag", "pred_mode_flag", or "palette_mode_flag". In particular, when the decoder 120 performs a decoding operation using the palette mode, the decoder 120 further determines the value of the parameter "CU-level flag" to determine whether the neighboring block multi-color prediction mode is enabled. In other words, in the example of FIG. 9C, the decoder 120 performs the neighboring block multi-color prediction mode in the palette mode encoded by the screen video content, that is, the adjacent block multi-color prediction mode of the present disclosure may be a screen. The codec mode in either mode of video content encoding. According to the above, the disclosure does not limit the time point of execution of the adjacent block multi-color prediction mode, which may be independent of other coding modes of the video content encoding, or a special case of any mode of the video content encoding. 9A to 9C are only exemplary code of the present disclosure, and are not intended to limit the disclosure.

圖10是根據本揭露一範例實施例所繪示的編解碼的測試結果示意圖。FIG. 10 is a schematic diagram of test results of a codec according to an exemplary embodiment of the present disclosure.

請參照圖10,為了評估本揭露所提出的編碼方法與解碼方法,根據JCT-VC標準組織核心實驗所規範的實驗環境下,將本揭露實作於所述組織所提供的參考軟體中,並比較AllIntra-lossy(全靜態編碼-失真)壓縮模式的結果。而被測試的視訊格式有YUV格式和RGB格式兩種,總共26個測試視訊檔案。此26個測試的視訊檔案根據視訊內容的不同及格式的不同可以分成12種類別,此12種類別即為圖10中的左邊第一欄中的說明。這12種類別中,“text & graphics with motion”是SCC較常遇到的視訊應用,其內容大多為簡報、軟體呈現等SCC常見應用,而“mixed content”則是包含SCC常用的視訊應用與HEVC常見的自然影像之應用,而“animation”則是動畫視訊,其中“animation”的應用較少用於SCC環境。這些視訊類別根據大小又區分成720p,1080p和1440p三種。在此,所呈現的數據都是BDrate,BDrate是JCT-VC標準組織通用習知的視訊品質的客觀評比量測方法,當數據小於零且越小表示相同位元率(bitrate)的視覺品質越好。Referring to FIG. 10, in order to evaluate the coding method and the decoding method proposed by the present disclosure, the disclosure is implemented in the reference software provided by the organization according to the experimental environment specified by the JCT-VC standard organization core experiment, and Compare the results of the AllIntra-lossy compression mode. The video format tested was YUV format and RGB format, and a total of 26 test video files. The video files of the 26 tests can be divided into 12 categories according to the difference of the video content and the format, and the 12 categories are the descriptions in the first column on the left side in FIG. Among the 12 categories, “text & graphics with motion” is a video application that SCC encounters more frequently. Its content is mostly SCC common applications such as newsletter and software presentation, while “mixed content” is a video application commonly used by SCC. HEVC is commonly used for natural imagery, while "animation" is animated video, where "animation" is less used in SCC environments. These video categories are further divided into three types according to size: 720p, 1080p and 1440p. Here, the data presented is BDrate, which is an objective evaluation method for video quality commonly known by the JCT-VC standard organization. When the data is smaller than zero and the smaller the visual quality of the same bit rate, the more the visual quality is. it is good.

具體來說,圖10所示的測試結果為顏色設定模組114執行從鄰近範圍210選出對應N個畫素的N個顏色之多個方法所對應的效能,其中“Text 1”是對應本揭露圖3A~圖3B之實施例的BDrate效能、“Text 2”是對應本揭露圖4之實施例的BDrate效能,而“Text 3”是對應本揭露圖5之實施例的BDrate效能。由數據結果可發現,本揭露所提的做法相較目前標準之作法,在複雜度幾乎不改變的情況下,即可有很大的效能提升,此三個實施例的效能分別最大可達到0.7~1.0%、0.8~1.0%與0.7~1.0%的提升。Specifically, the test result shown in FIG. 10 is a performance corresponding to a plurality of methods in which the color setting module 114 performs N colors corresponding to N pixels from the adjacent range 210, where “Text 1” corresponds to the disclosure. The BDrate performance of the embodiment of FIG. 3A to FIG. 3B, "Text 2" is the BDrate performance corresponding to the embodiment of FIG. 4, and "Text 3" is the BDrate performance corresponding to the embodiment of FIG. From the data results, it can be found that the practice of the present disclosure can achieve a great performance improvement compared with the current standard practice, and the performance of the three embodiments can reach a maximum of 0.7. ~1.0%, 0.8~1.0% and 0.7~1.0% improvement.

綜上所述,本揭露之範例實施例所提出的編碼方法與解碼方法以及使用此方法的編解碼系統、編碼器與解碼器藉由所設定的旗標指示鄰近範圍中用以預測並重建目前編碼單元區塊之畫素的個數及其對應的顏色,由此能夠節省傳輸位元並有效地減少編碼運算時的傳輸量,進而提升螢幕視訊編碼的效能。In summary, the encoding method and the decoding method and the codec system, the encoder and the decoder using the method of the present disclosure indicate the neighboring range by using the set flag to predict and reconstruct the current The number of pixels of the coding unit block and the corresponding color thereof can save the transmission bit and effectively reduce the transmission amount during the coding operation, thereby improving the performance of the video video coding.

雖然本揭露已以實施例揭露如上,然其並非用以限定本揭露,任何所屬技術領域中具有通常知識者,在不脫離本揭露的精神和範圍內,當可作些許的更動與潤飾,故本揭露的保護範圍當視後附的申請專利範圍所界定者為準。The present disclosure has been disclosed in the above embodiments, but it is not intended to limit the disclosure, and any person skilled in the art can make some changes and refinements without departing from the spirit and scope of the disclosure. The scope of protection of this disclosure is subject to the definition of the scope of the appended claims.

100‧‧‧編解碼晶片
110‧‧‧編碼器
120‧‧‧解碼器
100a、110a、120a‧‧‧儲存電路
100b、110b、120b‧‧‧處理器電路
112‧‧‧旗標設定模組
114、126‧‧‧顏色設定模組
116‧‧‧編碼模組
122‧‧‧接收模組
124‧‧‧旗標狀態判定模組
128‧‧‧解碼模組
200、202、204、206‧‧‧編碼單元區塊
210‧‧‧鄰近範圍
222、224、226‧‧‧區塊
301、302、303、304、305、306、307、308、309、310、321、322、323、324、325‧‧‧叢集
300、330、400、500‧‧‧排序
320、340、410、510‧‧‧候選顏色對照表
40‧‧‧調色盤顏色預測表
600‧‧‧索引地圖
502、504‧‧‧方向
S701、S703、S705、S707‧‧‧編碼方法的步驟
S801、S803、S805‧‧‧解碼方法的步驟
C0、C1、C2、C3、C4、C5、C6、C7、C8、C9、C10‧‧‧顏色
100‧‧‧ Codec Chip
110‧‧‧Encoder
120‧‧‧Decoder
100a, 110a, 120a‧‧‧ storage circuits
100b, 110b, 120b‧‧‧ processor circuits
112‧‧‧flag setting module
114, 126‧‧‧ color setting module
116‧‧‧Code Module
122‧‧‧ receiving module
124‧‧‧flag status determination module
128‧‧‧Decoding module
200, 202, 204, 206‧‧‧ coding unit blocks
210‧‧‧near the range
Blocks 222, 224, 226‧‧
301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 321, 322, 323, 324, 325 ‧ ‧ cluster
Sort by 300, 330, 400, 500‧‧
320, 340, 410, 510‧‧‧ candidate color comparison table
40‧‧‧Color palette prediction table
600‧‧‧ index map
502, 504‧‧‧ directions
Steps of the S701, S703, S705, S707‧‧ ‧ encoding methods
Steps for decoding methods S801, S803, S805‧‧
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10‧‧‧ colors

圖1A是根據本揭露一範例實施例所繪示的編碼器。 圖1B是根據本揭露一範例實施例所繪示的解碼器。 圖1C是根據本揭露一範例實施例所繪示的編解碼晶片。 圖2是根據本揭露一範例實施例所繪示的編碼單元區塊之鄰近範圍示意圖。 圖3A~圖3B是根據本揭露一範例實施例所繪示的從鄰近範圍選出對應N個畫素的N個顏色的範例示意圖。 圖4是根據本揭露另一範例實施例所繪示的從鄰近範圍選出對應N個畫素的N個顏色的範例示意圖。 圖5是根據本揭露又另一範例實施例所繪示的從鄰近範圍選出對應N個畫素的N個顏色的範例示意圖。 圖6是根據本揭露一範例實施例所繪示的建立索引地圖的一個範例。 圖7是根據本揭露一範例實施例所繪示的編碼方法的流程圖。 圖8是根據本揭露一範例實施例所繪示的解碼方法的流程圖。 圖9A~圖9C是根據本揭露一範例實施例所繪示的解碼的程式碼。 圖10是根據本揭露一範例實施例所繪示的編解碼的測試結果示意圖。FIG. 1A is an illustration of an encoder according to an exemplary embodiment of the disclosure. FIG. 1B is a diagram illustrating a decoder according to an exemplary embodiment of the disclosure. FIG. 1C illustrates a codec wafer according to an exemplary embodiment of the present disclosure. FIG. 2 is a schematic diagram of a proximity range of a coding unit block according to an exemplary embodiment of the disclosure. 3A-3B are schematic diagrams showing examples of selecting N colors corresponding to N pixels from adjacent ranges according to an exemplary embodiment of the disclosure. FIG. 4 is a schematic diagram showing an example of selecting N colors corresponding to N pixels from adjacent ranges according to another exemplary embodiment of the disclosure. FIG. 5 is a schematic diagram showing an example of selecting N colors corresponding to N pixels from a neighboring range according to another exemplary embodiment of the present disclosure. FIG. 6 is an example of establishing an index map according to an exemplary embodiment of the disclosure. FIG. 7 is a flowchart of an encoding method according to an exemplary embodiment of the disclosure. FIG. 8 is a flowchart of a decoding method according to an exemplary embodiment of the disclosure. 9A-9C are decoded code diagrams according to an exemplary embodiment of the present disclosure. FIG. 10 is a schematic diagram of test results of a codec according to an exemplary embodiment of the present disclosure.

S801、S803、S805‧‧‧解碼方法的步驟 Steps for decoding methods S801, S803, S805‧‧

Claims (45)

一種解碼器,包括: 一儲存電路,記錄多個模組;以及 一處理器電路,連接該儲存電路,用以存取該儲存電路並透過該些模組執行一鄰近區塊多顏色預測模式,該些模組包括: 一接收模組,接收對應一編碼單元區塊的一第一旗標; 一旗標狀態判定模組,判斷對應該編碼單元區塊的該第一旗標的狀態值,其中當該第一旗標的狀態值符合一預定狀態值時,該接收模組更用以接收對應該編碼單元區塊的一第二旗標與該編碼單元區塊的每一畫素所對應的索引值; 一顏色設定模組,用以當該第一旗標的狀態值符合該預定狀態值時,讀取該接收模組所接收的對應該編碼單元區塊的該第二旗標與該編碼單元區塊的每一畫素所對應的索引值,且根據該第二旗標在該編碼單元區塊的一鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,其中該第二旗標指示對應該N個畫素的N個顏色的數目且該N個顏色皆不相同,其中N為正整數;以及 一解碼模組,根據對應該N個畫素的該N個顏色重建該編碼單元區塊的該些畫素。A decoder includes: a storage circuit for recording a plurality of modules; and a processor circuit coupled to the storage circuit for accessing the storage circuit and performing a neighboring block multi-color prediction mode through the modules The module includes: a receiving module, receiving a first flag corresponding to a coding unit block; a flag state determination module, determining a state value of the first flag corresponding to the coding unit block, wherein When the state value of the first flag meets a predetermined state value, the receiving module is further configured to receive a second flag corresponding to the coding unit block and an index corresponding to each pixel of the coding unit block. a color setting module, configured to read the second flag corresponding to the coding unit block and the coding unit received by the receiving module when the state value of the first flag meets the predetermined state value An index value corresponding to each pixel of the block, and selecting, according to the second flag, N colors corresponding to N pixels in a plurality of pixels in a neighboring range of the coding unit block, where The second flag indicates the corresponding The number of N colors of the N pixels and the N colors are different, wherein N is a positive integer; and a decoding module reconstructs the coding unit block according to the N colors corresponding to the N pixels These pixels. 如申請專利範圍第1項所述的解碼器,其中該處理器電路更用以在該第一旗標的狀態值不符合該預定狀態值時,根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,而執行該些特定編碼模式的其中之一, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The decoder of claim 1, wherein the processor circuit is further configured to: when the state value of the first flag does not meet the predetermined state value, according to a plurality of specific coding modes encoded by a screen video content A plurality of encoding flags are executed to perform one of the specific encoding modes, wherein the specific encoding mode includes an intra-block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第1項所述的解碼器,其中該處理器電路更用以根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,而執行該些特定編碼模式的其中之一, 其中該處理器電路更用以在該螢幕視訊內容編碼的該些特定編碼模式的其中之一的模式下,透過該些模組執行上述鄰近區塊多顏色預測模式, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The decoder of claim 1, wherein the processor circuit is further configured to perform the specific coding modes according to the plurality of coding flags of the plurality of specific coding modes encoded by the screen video content. The processor circuit is further configured to perform the neighboring block multi-color prediction mode by using the module in a mode of one of the specific encoding modes of the video content encoding, wherein the specific encoding mode It includes an intra-block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第1項所述的解碼器,其中當該旗標狀態判定模組判斷該第二旗標指示對應該N個畫素的該N個顏色的數目大於1時,該接收模組接收該編碼單元區塊的每一畫素所對應的索引值,且該解碼模組根據該編碼單元區塊的每一畫素所對應的索引值重建對應該編碼單元區塊的一索引地圖,且根據對應該N個畫素的該N個顏色與該索引地圖重建該編碼單元區塊的該些畫素, 其中當該旗標狀態判定模組判斷該第二旗標指示該N個畫素的該N個顏色的數目等於1時,該接收模組略過接收該編碼單元區塊的每一畫素所對應的索引值,且該解碼模組僅根據對應該第二旗標所指示的1個畫素的1個顏色重建該編碼單元區塊的該些畫素。The decoder of claim 1, wherein the flag state determining module determines that the second flag indicates that the number of the N colors corresponding to the N pixels is greater than 1, the receiving module Receiving an index value corresponding to each pixel of the coding unit block, and the decoding module reconstructs an index map corresponding to the coding unit block according to an index value corresponding to each pixel of the coding unit block, And reconstructing the pixels of the coding unit block according to the N colors corresponding to the N pixels, wherein the flag state determination module determines that the second flag indicates the N pixels When the number of the N colors is equal to 1, the receiving module skips the index value corresponding to each pixel of the coding unit block, and the decoding module is only indicated according to the corresponding second flag. One pixel of one pixel reconstructs the pixels of the coding unit block. 如申請專利範圍第1項所述的解碼器,其中該鄰近範圍包括鄰近於該編碼單元區塊的至少一另一編碼單元區塊中鄰近於該編碼單元區塊的畫素,其中該至少一另一編碼單元區塊包括鄰近於該編碼單元區塊上邊緣的編碼單元區塊、鄰近於該編碼單元區塊左邊緣的編碼單元區塊與鄰近於該編碼單元區塊左上角的編碼單元區塊。The decoder of claim 1, wherein the proximity range comprises pixels adjacent to the coding unit block in at least one other coding unit block adjacent to the coding unit block, wherein the at least one Another coding unit block includes a coding unit block adjacent to an upper edge of the coding unit block, a coding unit block adjacent to a left edge of the coding unit block, and a coding unit area adjacent to an upper left corner of the coding unit block. Piece. 如申請專利範圍第1項所述的解碼器,其中該顏色設定模組更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該顏色設定模組更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集以獲得一排序, 其中該顏色設定模組更用以根據該排序從該M個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The decoder of claim 1, wherein the color setting module is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M is Among the clusters, the pixels in the same cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, and the color setting module is used. Arranging the M clusters in order according to the number of pixels in each of the M clusters to obtain a sort, wherein the color setting module is further configured to sort from the M clusters according to the sorting N clusters are sequentially selected, and N colors corresponding to N clusters are set to the N colors corresponding to N pixels, wherein each of the N pixels belongs to each of the N clusters. 如申請專利範圍第1項所述的解碼器,其中顏色設定模組更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中倘若M小於一預定候選顏色數目時,該顏色設定模組更用以從對應該編碼單元區塊的一調色盤顏色預測表中選擇P個顏色作為P個叢集,以使得(M+P)等於該預定候選顏色數目,其中該P個顏色之中的每一顏色皆不相同, 其中該顏色設定模組更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集,且將該P個叢集排列於該M個叢集之後以獲得一排序, 其中該顏色設定模組更用以根據該排序從該M個叢集與該P個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The decoder of claim 1, wherein the color setting module is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M pixels The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, where M is less than a predetermined number of candidate colors. The color setting module is further configured to select P colors as P clusters from a palette color prediction table corresponding to the coding unit block, such that (M+P) is equal to the predetermined candidate color number, wherein Each of the P colors is different, and the color setting module is further configured to sequentially arrange the M clusters according to the number of pixels of each of the M clusters. And arranging the P clusters in the M clusters to obtain a sorting, wherein the color setting module is further configured to sequentially select N clusters from the M clusters and the P clusters according to the sorting, and N colors corresponding to N clusters are set to correspond to N pixels N colors, where each of the N pixels belonging to each of the N clusters. 如申請專利範圍第1項所述的解碼器,其中該顏色設定模組更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該顏色設定模組更用以依據該M個叢集之中每一叢集的畫素的數量從該M個叢集之中選出1個叢集,其中該1個叢集的畫素的數量大於該M個叢集之中的其他叢集的畫素的數量, 其中該顏色設定模組更用以根據至少一方向從該鄰近範圍內選擇Q個顏色作為Q個叢集,將該Q叢集排列於該1個叢集之後以獲得一排序, 其中該顏色設定模組更用以根據該排序從該1個叢集與該Q個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The decoder of claim 1, wherein the color setting module is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M is Among the clusters, the pixels in the same cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, and the color setting module is used. Selecting one cluster from the M clusters according to the number of pixels of each of the M clusters, wherein the number of pixels of the one cluster is greater than the pixels of other clusters among the M clusters The number setting module is further configured to select Q colors from the neighboring range as Q clusters according to at least one direction, and arrange the Q clusters after the 1 cluster to obtain a sort, wherein the color setting The module is further configured to sequentially select N clusters from the 1 cluster and the Q clusters according to the sorting, and set N colors corresponding to the N clusters to the N colors corresponding to the N pixels. Each of the N pixels belongs to each of the N clusters. 一種編碼器,包括: 一儲存電路,記錄多個模組;以及 一處理器電路,連接該儲存電路,用以存取該儲存電路並透過該些模組執行一鄰近區塊多顏色預測模式,該些模組包括: 一旗標設定模組,設定對應一編碼單元區塊的一第一旗標的狀態值; 一顏色設定模組,用以在該第一旗標的狀態值符合一預定狀態值時,在該編碼單元區塊的一鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,其中該旗標設定模組更用以將對應該編碼單元區塊的一第二旗標設定為對應該N個畫素的該N個顏色的數目,其中該N個顏色皆不相同,且N為正整數;以及 一編碼模組,用以對該編碼單元區塊中的每一畫素進行索引編號以使得該編碼單元區塊中的每一畫素的顏色是以該N個畫素的索引值來表示, 其中該編碼模組更用以傳送對應該編碼單元區塊的該第一旗標至一解碼器,且在該第一旗標的狀態值符合該預定狀態值時,該編碼模組傳送對應該編碼單元區塊的該第二旗標與該編碼單元區塊的每一畫素所對應的索引值至該解碼器。An encoder includes: a storage circuit for recording a plurality of modules; and a processor circuit coupled to the storage circuit for accessing the storage circuit and performing a neighboring block multi-color prediction mode through the modules The modules include: a flag setting module that sets a state value corresponding to a first flag of a coding unit block; and a color setting module configured to match a state value of the first flag to a predetermined state value And selecting N colors corresponding to N pixels in a plurality of pixels in a neighboring range of the coding unit block, wherein the flag setting module is further configured to use a corresponding block of the coding unit block The two flags are set to the number of the N colors corresponding to the N pixels, wherein the N colors are different, and N is a positive integer; and an encoding module is used in the coding unit block Each pixel is indexed such that the color of each pixel in the coding unit block is represented by an index value of the N pixels, wherein the coding module is further configured to transmit a corresponding coding unit block. The first flag to a decoder, And when the state value of the first flag meets the predetermined state value, the encoding module transmits an index value corresponding to each pixel of the coding unit block and each pixel of the coding unit block to The decoder. 如申請專利範圍第9項所述的編碼器,其中該處理器電路更用以在該第一旗標的狀態值不符合該預定狀態值時,根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The encoder of claim 9, wherein the processor circuit is further configured to: when the state value of the first flag does not meet the predetermined state value, according to a plurality of specific coding modes encoded by a screen video content A plurality of coding flags are executed to perform one of the specific coding modes, wherein the specific coding mode includes an intra-picture block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第9項所述的編碼器,其中該處理器電路更用以根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一, 其中該處理器電路更用以在該螢幕視訊內容編碼的該些特定編碼模式的其中之一的模式下,透過該些模組執行上述鄰近區塊多顏色預測模式, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The encoder of claim 9, wherein the processor circuit is further configured to perform one of the specific encoding modes according to a plurality of encoding flags of a plurality of specific encoding modes encoded by a screen video content. The processor circuit is further configured to perform the neighboring block multi-color prediction mode by using the modules in a mode of one of the specific coding modes encoded by the video content, where the specific coding mode includes An intra-block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第9項所述的編碼器,其中當該N個畫素的該N個顏色的數目大於1時,該編碼模組根據該編碼單元區塊的每一畫素的顏色所對應的索引值產生一索引地圖且傳送該編碼單元區塊的每一畫素所對應的索引值至該解碼器,其中在該索引地圖中該編碼單元區塊的每一畫素的顏色是以對應該N個畫素的索引值來呈現, 其中當該N個畫素的該N個顏色的數目等於1時,該編碼模組不傳送該編碼單元區塊的每一畫素的顏色所對應的索引值至該解碼器。The encoder of claim 9, wherein when the number of the N colors of the N pixels is greater than 1, the encoding module corresponds to the color of each pixel of the coding unit block. The index value generates an index map and transmits an index value corresponding to each pixel of the coding unit block to the decoder, wherein the color of each pixel of the coding unit block in the index map is The index values of the N pixels should be presented, wherein when the number of the N colors of the N pixels is equal to 1, the encoding module does not transmit the color of each pixel of the coding unit block. Index value to the decoder. 如申請專利範圍第9項所述的編碼器,其中該鄰近範圍包括鄰近於該編碼單元區塊的至少一另一編碼單元區塊中鄰近於該編碼單元區塊的畫素,其中該至少一另一編碼單元區塊包括鄰近於該編碼單元區塊上邊緣的編碼單元區塊、鄰近於該編碼單元區塊左邊緣的編碼單元區塊與鄰近於該編碼單元區塊左上的角編碼單元區塊。The encoder of claim 9, wherein the proximity range comprises pixels adjacent to the coding unit block in at least one other coding unit block adjacent to the coding unit block, wherein the at least one Another coding unit block includes a coding unit block adjacent to an upper edge of the coding unit block, a coding unit block adjacent to a left edge of the coding unit block, and an angular coding unit area adjacent to an upper left of the coding unit block. Piece. 如申請專利範圍第9項所述的編碼器,其中該顏色設定模組更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該顏色設定模組更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集以獲得一排序, 其中該顏色設定模組更用以根據該排序從該M個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The encoder of claim 9, wherein the color setting module is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M is Among the clusters, the pixels in the same cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, and the color setting module is used. Arranging the M clusters in order according to the number of pixels in each of the M clusters to obtain a sort, wherein the color setting module is further configured to sort from the M clusters according to the sorting N clusters are sequentially selected, and N colors corresponding to N clusters are set to the N colors corresponding to N pixels, wherein the value of the N colors corresponding to the N clusters is smaller than the corresponding other numbers The generation value of several colors of the cluster, and each of the N pixels belongs to each of the N clusters. 如申請專利範圍第9項所述的編碼器,其中該顏色設定模組更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中倘若M小於一預定候選顏色數目時,該顏色設定模組更用以從對應該編碼單元區塊的一調色盤顏色預測表中選擇P個顏色作為P個叢集,以使得(M+P)等於該預定候選顏色數目,其中該P個顏色之中的每一顏色皆不相同, 其中該顏色設定模組更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集,且將該P個叢集排列於該M個叢集之後以獲得一排序, 其中該顏色設定模組更用以根據該排序從該M個叢集與該P個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The encoder of claim 9, wherein the color setting module is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M is Among the clusters, the pixels in the same cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, where M is less than a predetermined number of candidate colors. The color setting module is further configured to select P colors as P clusters from a palette color prediction table corresponding to the coding unit block, such that (M+P) is equal to the predetermined candidate color number, wherein Each of the P colors is different, and the color setting module is further configured to sequentially arrange the M clusters according to the number of pixels in each of the M clusters. And arranging the P clusters in the M clusters to obtain a sort, wherein the color setting module is further configured to sequentially select N clusters from the M clusters and the P clusters according to the sorting, and Set N colors corresponding to N clusters to correspond to N pixels The N colors, wherein less than the corresponding value on behalf of a number of color clusters of several other cost value to be the cluster of N of the N-th color, and each of the N pixels belonging to each of the N clusters. 如申請專利範圍第9項所述的編碼器,其中該顏色設定模組更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該顏色設定模組更用以依據該M個叢集之中每一叢集的畫素的數量從該M個叢集之中選出1個叢集,其中該1個叢集的畫素的數量大於該M個叢集之中的其他叢集的畫素的數量, 其中該顏色設定模組更用以根據至少一方向從該鄰近範圍內選擇Q個顏色作為Q個叢集,將該Q叢集排列於該1個叢集之後以獲得一排序, 其中該顏色設定模組更用以根據該排序從該1個叢集與該Q個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The encoder of claim 9, wherein the color setting module is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M is Among the clusters, the pixels in the same cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, and the color setting module is used. Selecting one cluster from the M clusters according to the number of pixels of each of the M clusters, wherein the number of pixels of the one cluster is greater than the pixels of other clusters among the M clusters The number setting module is further configured to select Q colors from the neighboring range as Q clusters according to at least one direction, and arrange the Q clusters after the 1 cluster to obtain a sort, wherein the color setting The module is further configured to sequentially select N clusters from the 1 cluster and the Q clusters according to the sorting, and set N colors corresponding to the N clusters to the N colors corresponding to the N pixels. , wherein the value of the N colors corresponding to the N clusters is less than Several cost values of the other colors of the plurality of clusters, and each of the N pixels belonging to each of the N clusters. 一種解碼方法,適用於具有多個畫素的一編碼單元區塊,該解碼方法包括: (a)接收對應該編碼單元區塊的一第一旗標; (b)判斷該第一旗標的狀態值符合一預定狀態值時,接收並讀取對應該編碼單元區塊的一第二旗標與該編碼單元區塊的每一畫素所對應的索引值,且根據該第二旗標在該編碼單元區塊的一鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,其中該第二旗標指示對應該N個畫素的N個顏色的數目且該N個顏色皆不相同,其中N為正整數;以及 (c)根據對應該N個畫素的該N個顏色重建該編碼單元區塊的該些畫素。A decoding method is applicable to a coding unit block having a plurality of pixels, the decoding method comprising: (a) receiving a first flag corresponding to the coding unit block; (b) determining a state of the first flag And when the value meets a predetermined state value, receiving and reading a second flag corresponding to the coding unit block and an index value corresponding to each pixel of the coding unit block, and according to the second flag, N colors corresponding to N pixels are selected from a plurality of pixels in a neighborhood of the coding unit block, wherein the second flag indicates the number of N colors corresponding to the N pixels and the N colors Neither is a positive integer; and (c) reconstructing the pixels of the coding unit block according to the N colors corresponding to the N pixels. 如申請專利範圍第17項所述的解碼方法,更包括: 在該第一旗標的狀態值不符合該預定狀態值時,根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The decoding method of claim 17, further comprising: a plurality of coding flags of the plurality of specific coding modes encoded according to a screen video content when the state value of the first flag does not meet the predetermined state value And performing one of the specific encoding modes, wherein the specific encoding mode includes an intra-tile block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第17項所述的解碼方法,更包括: 根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一;以及 在該螢幕視訊內容編碼的該些特定解碼模式的其中之一的模式下,執行上述步驟(a)~(c), 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The decoding method of claim 17, further comprising: performing one of the specific encoding modes according to a plurality of encoding flags of the plurality of specific encoding modes encoded by the screen video content; and on the screen Performing the above steps (a) to (c) in a mode of one of the specific decoding modes of the video content encoding, wherein the specific encoding mode includes an intra-block copy mode, a prediction mode, and a color palette mode. 如申請專利範圍第17項所述的解碼方法,其中根據該N個畫素的該N個顏色重建該編碼單元區塊的該些畫素的步驟包括: 當該第二旗標指示對應該N個畫素的該N個顏色的數目大於1時,接收該編碼單元區塊的每一畫素所對應的索引值,且根據該編碼單元區塊的每一畫素所對應的索引值重建對應該編碼單元區塊的一索引地圖,且根據對應該N個畫素的該N個顏色與該索引地圖重建該編碼單元區塊的該些畫素;以及 當該第二旗標指示該N個畫素的該N個顏色的數目等於1時,略過接收該編碼單元區塊的每一畫素所對應的索引值的步驟,且僅根據對應該第二旗標所指示的1個畫素的1個顏色重建該編碼單元區塊的該些畫素。The decoding method of claim 17, wherein the reconstructing the pixels of the coding unit block according to the N colors of the N pixels comprises: when the second flag indicates that the corresponding N When the number of the N colors of the pixels is greater than 1, the index value corresponding to each pixel of the coding unit block is received, and the pair is reconstructed according to the index value corresponding to each pixel of the coding unit block. An index map of the unit block should be encoded, and the pixels of the coding unit block are reconstructed from the N maps corresponding to the N pixels and the index map; and when the second flag indicates the N When the number of the N colors of the pixels is equal to 1, the step of receiving the index value corresponding to each pixel of the coding unit block is skipped, and only according to the 1 pixel indicated by the corresponding second flag The 1 color reconstructs the pixels of the coding unit block. 如申請專利範圍第17項所述的解碼方法,其中該鄰近範圍包括鄰近於該編碼單元區塊的至少一另一編碼單元區塊中鄰近於該編碼單元區塊的畫素,其中該至少一另一編碼單元區塊包括鄰近於該編碼單元區塊上邊緣的編碼單元區塊、鄰近於該編碼單元區塊左邊緣的編碼單元區塊與鄰近於該編碼單元區塊左上的角編碼單元區塊。The decoding method of claim 17, wherein the neighboring range comprises a pixel adjacent to the coding unit block in at least one other coding unit block adjacent to the coding unit block, wherein the at least one Another coding unit block includes a coding unit block adjacent to an upper edge of the coding unit block, a coding unit block adjacent to a left edge of the coding unit block, and an angular coding unit area adjacent to an upper left of the coding unit block. Piece. 如申請專利範圍第17項所述的解碼方法,其中根據該第二旗標在該編碼單元區塊的該鄰近範圍內的該些畫素中選出對應該N個畫素的該N個顏色的步驟包括: 根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數; 依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集以獲得一排序;以及 根據該排序從該M個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The decoding method of claim 17, wherein the N colors corresponding to the N pixels are selected from the pixels in the adjacent range of the coding unit block according to the second flag. The step includes: grouping the pixels into M clusters according to the pixel values of the pixels in the proximity range, wherein the pixel values in the same cluster in the M clusters are the same and the M The colors of the pixels in different clusters are different, where M is a positive integer; the M clusters are arranged in order according to the number of pixels in each of the M clusters. Obtaining a sort; and sequentially selecting N clusters from the M clusters according to the sorting, and setting N colors corresponding to the N clusters to the N colors corresponding to N pixels, wherein each of the N pixels belong to each of the N clusters. 如申請專利範圍第17項所述的解碼方法,其中根據該第二旗標在該編碼單元區塊的該鄰近範圍內的該些畫素中選出對應該N個畫素的該N個顏色的步驟包括: 根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數; 倘若M小於一預定候選顏色數目時,從對應該編碼單元區塊的一調色盤顏色預測表中選擇P個顏色作為P個叢集,以使得(M+P)等於該預定候選顏色數目,其中該P個顏色之中的每一顏色皆不相同; 依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集,且將該P個叢集排列於該M個叢集之後以獲得一排序;以及 根據該排序從該M個叢集與該P個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The decoding method of claim 17, wherein the N colors corresponding to the N pixels are selected from the pixels in the adjacent range of the coding unit block according to the second flag. The step includes: grouping the pixels into M clusters according to the pixel values of the pixels in the proximity range, wherein the pixel values in the same cluster in the M clusters are the same and the M The colors of the pixels in different clusters are different, where M is a positive integer; if M is less than a predetermined number of candidate colors, P is selected from a palette color prediction table corresponding to the coding unit block. Colors as P clusters such that (M+P) is equal to the predetermined number of candidate colors, wherein each of the P colors is different; according to the pixels of each of the M clusters Arranging the M clusters in order from the most, and arranging the P clusters after the M clusters to obtain a sort; and sequentially selecting the M clusters and the P clusters according to the sorting N clusters, and set the N colors corresponding to N clusters to The N of the N color pixels, wherein each of the N pixels belonging to each of the N clusters. 如申請專利範圍第17項所述的解碼方法,其中根據該第二旗標在該編碼單元區塊的該鄰近範圍內的該些畫素中選出對應該N個畫素的該N個顏色的步驟包括: 根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數; 依據該M個叢集之中每一叢集的畫素的數量從該M個叢集之中選出1個叢集,其中該1個叢集的畫素的數量大於該M個叢集之中的其他叢集的畫素的數量; 根據至少一方向從該鄰近範圍內選擇Q個顏色作為Q個叢集,將該Q叢集排列於該1個叢集之後以獲得一排序;以及 根據該排序從該1個叢集與該Q個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The decoding method of claim 17, wherein the N colors corresponding to the N pixels are selected from the pixels in the adjacent range of the coding unit block according to the second flag. The step includes: grouping the pixels into M clusters according to the pixel values of the pixels in the proximity range, wherein the pixel values in the same cluster in the M clusters are the same and the M The colors of the pixels in different clusters are different, and M is a positive integer; one cluster is selected from the M clusters according to the number of pixels in each of the M clusters, wherein The number of pixels of the one cluster is greater than the number of pixels of the other clusters among the M clusters; Q colors are selected from the proximity range as Q clusters according to at least one direction, and the Q clusters are arranged in the After 1 cluster, a sort is obtained; and N clusters are sequentially selected from the 1 cluster and the Q clusters according to the sort, and N colors corresponding to N clusters are set to correspond to N pixels The N colors, wherein each of the N pixels belongs to each of the N Cluster. 一種編碼方法,適用於具有多個畫素的一編碼單元區塊,該編碼方法包括: (a)設定對應該編碼單元區塊的一第一旗標的狀態值; (b)判斷該第一旗標的狀態值符合一預定狀態值時,在該編碼單元區塊的一鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,且將對應該編碼單元區塊的一第二旗標設定為對應該N個畫素的該N個顏色的數目,其中該N個顏色皆不相同且N為正整數; (c)對該編碼單元區塊中的每一畫素進行索引編號以使得該編碼單元區塊中的每一畫素的顏色是以該N個畫素的索引值來表示;以及 (d)傳送對應該編碼單元區塊的該第一旗標至一解碼端,且在該第一旗標的狀態值符合該預定狀態值時,傳送對應該編碼單元區塊的該第二旗標與該編碼單元區塊的每一畫素所對應的索引值至該解碼端。An encoding method is applicable to a coding unit block having a plurality of pixels, the coding method comprising: (a) setting a state value corresponding to a first flag of the coding unit block; (b) determining the first flag When the target state value conforms to a predetermined state value, N colors corresponding to N pixels are selected from a plurality of pixels in a neighboring range of the coding unit block, and a second corresponding to the coding unit block is to be selected. The flag is set to the number of the N colors corresponding to the N pixels, wherein the N colors are different and N is a positive integer; (c) indexing each pixel in the coding unit block So that the color of each pixel in the coding unit block is represented by an index value of the N pixels; and (d) transmitting the first flag to a decoding end corresponding to the coding unit block, And when the state value of the first flag meets the predetermined state value, transmitting an index value corresponding to each pixel of the coding unit block and each pixel of the coding unit block to the decoding end. 如申請專利範圍第25項所述的編碼方法,更包括: 在該第一旗標的狀態值不符合該預定狀態值時,根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The encoding method of claim 25, further comprising: when the status value of the first flag does not meet the predetermined status value, the plurality of encoding flags of the plurality of specific encoding modes encoded according to a screen video content And performing one of the specific encoding modes, wherein the specific encoding mode includes an intra-tile block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第25項所述的編碼方法,更包括: 根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,而執行該些特定編碼模式的其中之一;以及 在一螢幕視訊內容編碼的該些特定編碼模式的其中之一的模式下,執行上述步驟(a)~(d), 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The encoding method of claim 25, further comprising: performing one of the specific encoding modes according to a plurality of encoding flags of the plurality of specific encoding modes encoded by the screen video content; Performing the above steps (a) to (d) in a mode of one of the specific encoding modes of the screen video content encoding, wherein the specific encoding mode includes an intra-block copy mode, a prediction mode, and a color grading Disk mode. 如申請專利範圍第25項所述的編碼方法,更包括: 當該N個畫素的該N個顏色的數目大於1時,根據該編碼單元區塊的每一畫素的顏色所對應的索引值產生一索引地圖且傳送該編碼單元區塊的每一畫素所對應的索引值至該解碼端,其中在該索引地圖中該編碼單元區塊的每一畫素的顏色是以對應該N個畫素的索引值來呈現;以及 當該N個畫素的該N個顏色的數目等於1時,不傳送該編碼單元區塊的每一畫素的顏色所對應的索引值至該解碼端。The encoding method according to claim 25, further comprising: when the number of the N colors of the N pixels is greater than 1, an index corresponding to a color of each pixel of the coding unit block The value generates an index map and transmits an index value corresponding to each pixel of the coding unit block to the decoding end, wherein a color of each pixel of the coding unit block in the index map is corresponding to N An index value of the pixels is presented; and when the number of the N colors of the N pixels is equal to 1, the index value corresponding to the color of each pixel of the coding unit block is not transmitted to the decoding end . 如申請專利範圍第25項所述的編碼方法,其中該鄰近範圍包括鄰近於該編碼單元區塊的至少一另一編碼單元區塊中鄰近於該編碼單元區塊的畫素,其中該至少一另一編碼單元區塊包括鄰近於該編碼單元區塊上邊緣的編碼單元區塊、鄰近於該編碼單元區塊左邊緣的編碼單元區塊與鄰近於該編碼單元區塊左上的角編碼單元區塊。The encoding method of claim 25, wherein the neighboring range comprises a pixel adjacent to the coding unit block in at least one other coding unit block adjacent to the coding unit block, wherein the at least one Another coding unit block includes a coding unit block adjacent to an upper edge of the coding unit block, a coding unit block adjacent to a left edge of the coding unit block, and an angular coding unit area adjacent to an upper left of the coding unit block. Piece. 如申請專利範圍第25項所述的編碼方法,其中在該編碼單元區塊的該鄰近範圍內的該些畫素中選出對應該N個畫素的N個顏色的步驟包括: 根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數; 依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集以獲得一排序;以及 根據該排序從該M個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The encoding method of claim 25, wherein the step of selecting N colors corresponding to N pixels in the pixels in the neighboring range of the coding unit block comprises: according to the proximity range The pixel values of the pixels in the pixel group the pixels into M clusters, wherein the pixel values in the same cluster in the same cluster are the same and the clusters in the different clusters are in different clusters The colors of the pixels are different, wherein M is a positive integer; the M clusters are arranged in order according to the number of pixels of each of the M clusters to obtain a sort; and according to the Sorting N clusters are sequentially selected from the M clusters, and N colors corresponding to N clusters are set to the N colors corresponding to N pixels, wherein the N colors corresponding to N clusters The generation value is less than the generation value of the plurality of colors corresponding to the other plurality of clusters, and each of the N pixels belongs to each of the N clusters. 如申請專利範圍第25項所述的編碼方法,其中在該編碼單元區塊的該鄰近範圍內的該些畫素中選出對應該N個畫素的N個顏色的步驟包括: 根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數; 倘若M小於一預定候選顏色數目時,從對應該編碼單元區塊的一調色盤顏色預測表中選擇P個顏色作為P個叢集,以使得(M+P)等於該預定候選顏色數目,其中該P個顏色之中的每一顏色皆不相同; 依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集,且將該P個叢集排列於該M個叢集之後以獲得一排序;以及 根據該排序從該M個叢集與該P個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The encoding method of claim 25, wherein the step of selecting N colors corresponding to N pixels in the pixels in the neighboring range of the coding unit block comprises: according to the proximity range The pixel values of the pixels in the pixel group the pixels into M clusters, wherein the pixel values in the same cluster in the same cluster are the same and the clusters in the different clusters are in different clusters The colors of the pixels are different, wherein M is a positive integer; if M is less than a predetermined number of candidate colors, P colors are selected as P clusters from a palette color prediction table corresponding to the coding unit block, So that (M+P) is equal to the predetermined number of candidate colors, wherein each of the P colors is different; according to how many pixels of each of the M clusters are ordered sequentially Arranging the M clusters, and arranging the P clusters after the M clusters to obtain a sort; and sequentially selecting N clusters from the M clusters and the P clusters according to the sorting, and N colors of N clusters should be set to the N corresponding to N pixels Color, wherein less than the cost values corresponding to a plurality of colors of a plurality of clusters of the other of the N cost values should be the cluster of N colors, and each of the N pixels belonging to each of the N clusters. 如申請專利範圍第25項所述的編碼方法,其中在該編碼單元區塊的該鄰近範圍內的該些畫素中選出對應該N個畫素的N個顏色的步驟包括: 根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數; 依據該M個叢集之中每一叢集的畫素的數量從該M個叢集之中選出1個叢集,其中該1個叢集的畫素的數量大於該M個叢集之中的其他叢集的畫素的數量; 根據至少一方向從該鄰近範圍內選擇Q個顏色作為Q個叢集,將該Q叢集排列於該1個叢集之後以獲得一排序;以及 根據該排序從該1個叢集與該Q個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The encoding method of claim 25, wherein the step of selecting N colors corresponding to N pixels in the pixels in the neighboring range of the coding unit block comprises: according to the proximity range The pixel values of the pixels in the pixel group the pixels into M clusters, wherein the pixel values in the same cluster in the same cluster are the same and the clusters in the different clusters are in different clusters The colors of the pixels are different, wherein M is a positive integer; a cluster is selected from the M clusters according to the number of pixels of each of the M clusters, wherein the cluster of the clusters The number of pixels is greater than the number of pixels of the other clusters among the M clusters; Q colors are selected from the neighboring range as Q clusters according to at least one direction, and the Q clusters are arranged after the 1 cluster to obtain a Sorting; and sequentially selecting N clusters from the 1 cluster and the Q clusters according to the sorting, and setting N colors corresponding to N clusters to the N colors corresponding to N pixels, wherein The value of the N colors corresponding to N clusters is less than the corresponding other The cost value of a cluster number of colors, and each of the N pixels belonging to each of the N clusters. 一種編解碼系統,用以執行適用於影像及視訊壓縮的一鄰近區塊多顏色預測模式,該編解碼系統包括: 一編碼器,用以設定對應該編碼單元區塊的一第一旗標的狀態值;以及 一解碼器, 其中該編碼器更用以在該第一旗標的狀態值符合一預定狀態值時,在該編碼單元區塊的一鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,且將對應該編碼單元區塊的一第二旗標設定為對應該N個畫素的該N個顏色的數目,其中該N個顏色皆不相同,且N為正整數, 其中該編碼器更用以對該編碼單元區塊中的每一畫素進行索引編號以使得該編碼單元區塊中的每一畫素的顏色是以該N個畫素的索引值來表示, 其中該編碼器更用以傳送對應該編碼單元區塊的該第一旗標至該解碼器,且在該第一旗標的狀態值符合該預定狀態值時,該編碼器傳送對應該編碼單元區塊的該第二旗標與該編碼單元區塊的每一畫素所對應的索引值至該解碼器。A codec system for performing a neighboring block multi-color prediction mode suitable for image and video compression, the codec system comprising: an encoder for setting a state of a first flag corresponding to a coding unit block And a decoder, wherein the encoder is further configured to: when the state value of the first flag meets a predetermined state value, select N corresponding pixels in a neighboring range of the coding unit block N colors of the pixels, and a second flag corresponding to the coding unit block is set to the number of the N colors corresponding to the N pixels, wherein the N colors are different, and N is positive An integer, where the encoder is further configured to index each pixel in the coding unit block such that a color of each pixel in the coding unit block is an index value of the N pixels. Representing, wherein the encoder is further configured to transmit the first flag corresponding to the coding unit block to the decoder, and when the state value of the first flag meets the predetermined state value, the encoder transmits the corresponding code The second of the unit block Each pixel marked with the coding unit block corresponding to the index value to the decoder. 如申請專利範圍第33項所述的編解碼系統,其中該解碼器接收對應該編碼單元區塊的該第一旗標,且判斷對應該編碼單元區塊的該第一旗標的狀態值, 其中該解碼器更用以當該第一旗標符合一預定狀態值時,接收並讀取從該編碼器所接收的對應該編碼單元區塊的該第二旗標與該編碼單元區塊的每一畫素所對應的索引值,且根據該第二旗標在該編碼單元區塊的該鄰近範圍內的多個畫素中選出對應N個畫素的N個顏色,其中該第二旗標指示對應該N個畫素的N個顏色的數目且該N個顏色皆不相同,其中N為正整數, 其中該解碼器更用以根據對應該N個畫素的該N個顏色重建該編碼單元區塊的該些畫素。The codec system of claim 33, wherein the decoder receives the first flag corresponding to the coding unit block, and determines a state value of the first flag corresponding to the coding unit block, where The decoder is further configured to receive and read the second flag corresponding to the coding unit block received by the encoder and each of the coding unit blocks when the first flag meets a predetermined state value An index value corresponding to a pixel, and selecting, according to the second flag, N colors corresponding to N pixels in the plurality of pixels in the adjacent range of the coding unit block, wherein the second flag Indicates the number of N colors corresponding to N pixels and the N colors are different, where N is a positive integer, wherein the decoder is further configured to reconstruct the code according to the N colors corresponding to N pixels The pixels of the unit block. 如申請專利範圍第34項所述的編解碼系統,其中該編解碼系統在該第一旗標的狀態值不符合該預定狀態值時,根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The codec system of claim 34, wherein the codec system, when the state value of the first flag does not meet the predetermined state value, is based on a plurality of specific coding modes encoded by a screen video content. A coding flag is executed to perform one of the specific coding modes, wherein the specific coding mode includes an intra-picture block copy mode, a prediction mode, and a palette mode. 如申請專利範圍第34項所述的編解碼系統,其中該編解碼系統根據一螢幕視訊內容編碼的多個特定編碼模式的多個編碼旗標,執行該些特定編碼模式的其中之一, 其中該編解碼系統更用以在該螢幕視訊內容編碼的該些特定編碼模式的其中之一的模式下,執行上述鄰近區塊多顏色預測模式, 其中該特定編碼模式包括一畫面內區塊複製模式、一預測模式以及一調色盤模式。The codec system of claim 34, wherein the codec system performs one of the specific encoding modes according to a plurality of encoding flags of a plurality of specific encoding modes encoded by a screen video content, wherein The codec system is further configured to perform the foregoing neighboring block multi-color prediction mode in a mode of one of the specific coding modes of the video content encoding, wherein the specific coding mode includes an intra-block copy mode , a prediction mode and a palette mode. 如申請專利範圍第33項所述的編解碼系統,其中當該N個畫素的該N個顏色的數目大於1時,該編碼器根據該編碼單元區塊的每一畫素的顏色所對應的索引值產生一索引地圖且傳送該編碼單元區塊的每一畫素所對應的索引值至該解碼器,其中在該索引地圖中該編碼單元區塊的每一畫素的顏色是以對應該N個畫素的索引值來呈現, 其中當該N個畫素的該N個顏色的數目等於1時,該編碼器不傳送該編碼單元區塊的每一畫素的顏色所對應的索引值至該解碼器。The codec system of claim 33, wherein when the number of the N colors of the N pixels is greater than 1, the encoder corresponds to the color of each pixel of the coding unit block. The index value generates an index map and transmits an index value corresponding to each pixel of the coding unit block to the decoder, wherein the color of each pixel of the coding unit block in the index map is The index values of N pixels should be presented, wherein when the number of the N colors of the N pixels is equal to 1, the encoder does not transmit an index corresponding to the color of each pixel of the coding unit block. Value to the decoder. 如申請專利範圍第34項所述的編解碼系統,其中當該解碼器判斷該第二旗標指示對應該N個畫素的該N個顏色的數目大於1時,該解碼器更用以接收該編碼單元區塊的每一畫素所對應的索引值,且根據該編碼單元區塊的每一畫素所對應的索引值重建對應該編碼單元區塊的一索引地圖,且根據對應該N個畫素的該N個顏色與該索引地圖重建該編碼單元區塊的該些畫素, 其中當該解碼器判斷該第二旗標指示該N個畫素的該N個顏色的數目等於1時,該解碼器略過接收該編碼單元區塊的每一畫素所對應的索引值,且僅根據對應該第二旗標所指示的1個畫素的1個顏色重建該編碼單元區塊的該些畫素。The codec system of claim 34, wherein the decoder is further configured to receive when the decoder determines that the second flag indicates that the number of the N colors corresponding to the N pixels is greater than one. An index value corresponding to each pixel of the coding unit block, and an index map corresponding to the coding unit block is reconstructed according to an index value corresponding to each pixel of the coding unit block, and according to the corresponding N The N colors of the pixels and the index map reconstruct the pixels of the coding unit block, wherein when the decoder determines that the second flag indicates that the number of the N colors of the N pixels is equal to 1 And the decoder skips the index value corresponding to each pixel of the coding unit block, and reconstructs the coding unit block according to only one color corresponding to one pixel indicated by the second flag. The pixels. 如申請專利範圍第33項所述的編解碼系統,其中該鄰近範圍包括鄰近於該編碼單元區塊的至少一另一編碼單元區塊中鄰近於該編碼單元區塊的畫素,其中該至少一另一編碼單元區塊包括鄰近於該編碼單元區塊上邊緣的編碼單元區塊、鄰近於該編碼單元區塊左邊緣的編碼單元區塊與鄰近於該編碼單元區塊左上的角編碼單元區塊。The codec system of claim 33, wherein the proximity range comprises a pixel adjacent to the coding unit block in at least one other coding unit block adjacent to the coding unit block, wherein the at least A further coding unit block includes a coding unit block adjacent to an upper edge of the coding unit block, a coding unit block adjacent to a left edge of the coding unit block, and an angular coding unit adjacent to an upper left of the coding unit block Block. 如申請專利範圍第33項所述的編解碼系統,其中該編碼器更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該編碼器更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集以獲得一排序, 其中該編碼器更用以根據該排序從該M個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The codec system of claim 33, wherein the encoder is further configured to group the pixels into M clusters according to pixel values of the pixels in the proximity range, wherein the M The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the cluster are different, where M is a positive integer, and the encoder is used to refer to the M. The number of pixels in each cluster among the clusters is arranged in order from the M clusters to obtain a sort, wherein the encoder is further used to sequentially select N from the M clusters according to the sorting. a cluster, and the N colors corresponding to the N clusters are set to the N colors corresponding to the N pixels, wherein the value of the N colors corresponding to the N clusters is less than the number of the other plurality of clusters The generation value of the color, and each of the N pixels belongs to each of the N clusters. 如申請專利範圍第33項所述的編解碼系統,其中該編碼器更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中倘若M小於一預定候選顏色數目時,該編碼器更用以從對應該編碼單元區塊的一調色盤顏色預測表中選擇P個顏色作為P個叢集,以使得(M+P)等於該預定候選顏色數目,其中該P個顏色之中的每一顏色皆不相同, 其中該編碼器更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集,且將該P個叢集排列於該M個叢集之後以獲得一排序, 其中該編碼器更用以根據該排序從該M個叢集與該P個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The codec system of claim 33, wherein the encoder is further configured to group the pixels into M clusters according to pixel values of the pixels in the proximity range, wherein the M The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, where M is less than a predetermined number of candidate colors. The encoder is further configured to select P colors as P clusters from a palette color prediction table corresponding to the coding unit block, such that (M+P) is equal to the predetermined candidate color number, wherein the P Each of the colors is different, wherein the encoder is further configured to sequentially arrange the M clusters according to the number of pixels of each of the M clusters, and the P is arranged in a sequence. The clusters are arranged after the M clusters to obtain a sort, wherein the encoder is further configured to sequentially select N clusters from the M clusters and the P clusters according to the sorting, and corresponding to the N clusters. N colors are set to the N colors corresponding to N pixels, of which The cost value of the N clusters of the N color value is less than the number of colors corresponding to the generation of a number of clusters of the other, and each of the N pixels belonging to each of the N clusters. 如申請專利範圍第33項所述的編解碼系統,其中該編碼器更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該編碼器更用以依據該M個叢集之中每一叢集的畫素的數量從該M個叢集之中選出1個叢集,其中該1個叢集的畫素的數量大於該M個叢集之中的其他叢集的畫素的數量, 其中該編碼器更用以根據根據至少一方向從該鄰近範圍內選擇Q個顏色作為Q個叢集,將該Q叢集排列於該1個叢集之後以獲得一排序, 其中該編碼器更用以根據該排序從該1個叢集與該Q個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中對應該N個叢集的該N個顏色的代價值小於對應其他數個叢集之數個顏色的代價值,且每一該N個畫素分別屬於每一該N個叢集。The codec system of claim 33, wherein the encoder is further configured to group the pixels into M clusters according to pixel values of the pixels in the proximity range, wherein the M The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the cluster are different, where M is a positive integer, and the encoder is used to refer to the M. The number of pixels in each cluster among the clusters selects one cluster from the M clusters, wherein the number of pixels of the one cluster is greater than the number of pixels of other clusters among the M clusters, The encoder is further configured to select Q colors from the neighboring range as Q clusters according to at least one direction, and arrange the Q clusters after the 1 cluster to obtain an order, wherein the encoder is further configured to The sorting sequentially selects N clusters from the 1 cluster and the Q clusters, and sets N colors corresponding to N clusters to the N colors corresponding to N pixels, where corresponding to N The generation value of the N colors of the cluster is smaller than the corresponding other clusters Generation of color values, and each of the N pixels belonging to each of the N clusters. 如申請專利範圍第33項所述的編解碼系統,其中該解碼器更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該解碼器更用以依據該M個叢集之中每一叢集的畫素的數量由多到少依序地排列該M個叢集以獲得一排序, 其中該解碼器更用以根據該排序從該M個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The codec system of claim 33, wherein the decoder is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, and the decoder is further used according to the M The number of pixels in each cluster among the clusters is arranged in order from the M clusters to obtain a sort, wherein the decoder is further configured to sequentially select N from the M clusters according to the sorting. A cluster, and the N colors corresponding to the N clusters are set to the N colors corresponding to N pixels, wherein each of the N pixels belongs to each of the N clusters. 如申請專利範圍第33項所述的編解碼系統,其中該解碼器更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中倘若M小於一預定候選顏色數目時,該解碼器更用以從對應該編碼單元區塊的一調色盤顏色預測表中選擇P個顏色作為P個叢集,以使得(M+P)等於該預定候選顏色數目,其中該P個顏色之中的每一顏色皆不相同, 其中該解碼器更用以根據該排序從該M個叢集與該P個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The codec system of claim 33, wherein the decoder is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, where M is less than a predetermined number of candidate colors. The decoder is further configured to select P colors as P clusters from a palette color prediction table corresponding to the block of the coding unit, such that (M+P) is equal to the predetermined number of candidate colors, wherein the P Each of the colors is different, wherein the decoder is further configured to sequentially select N clusters from the M clusters and the P clusters according to the sorting, and N colors corresponding to the N clusters The N colors corresponding to N pixels are set, wherein each of the N pixels belongs to each of the N clusters. 如申請專利範圍第33項所述的編解碼系統,其中該解碼器更用以根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為M個叢集,其中該M個叢集之中同一個叢集內的畫素的畫素值相同且該M個叢集之中不同叢集內的畫素的顏色皆不相同,其中M為正整數, 其中該解碼器更用以依據該M個叢集之中每一叢集的畫素的數量從該M個叢集之中選出1個叢集,其中該1個叢集的畫素的數量大於該M個叢集之中的其他叢集的畫素的數量, 其中該解碼器更用以根據至少一方向從該鄰近範圍內選擇Q個顏色作為Q個叢集,將該Q叢集排列於該1個叢集之後以獲得一排序, 其中該解碼器更用以根據該排序從該1個叢集中依序選出N個叢集,且將對應該N個叢集的N個顏色設為對應該N個畫素的該N個顏色,其中每一該N個畫素分別屬於每一該N個叢集。The codec system of claim 33, wherein the decoder is further configured to group the pixels into M clusters according to pixel values of the pixels in the adjacent range, wherein the M The pixels in the same cluster in the cluster have the same pixel values and the colors in the different clusters in the M clusters are different, where M is a positive integer, and the decoder is further used according to the M The number of pixels in each cluster among the clusters selects one cluster from the M clusters, wherein the number of pixels of the one cluster is greater than the number of pixels of other clusters among the M clusters, The decoder is further configured to select Q colors from the neighboring range as Q clusters according to at least one direction, and arrange the Q clusters after the 1 cluster to obtain an order, wherein the decoder is further configured to Sorting sequentially selects N clusters from the 1 cluster, and sets N colors corresponding to N clusters to the N colors corresponding to N pixels, wherein each of the N pixels belongs to each One of the N clusters.
TW104130995A 2014-10-01 2015-09-18 Decoder, encoder, method for decoding, method for encoding, and system for encoding and decoding TWI565302B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201510639350.7A CN105491379A (en) 2014-10-01 2015-09-30 Decoder, encoder, decoding method, encoding method and encoding/decoding system
US14/872,155 US20160100161A1 (en) 2014-10-01 2015-10-01 Decoder, encoder, decoding method, encoding method, and codec system
EP15187826.1A EP3002948A1 (en) 2014-10-01 2015-10-01 Decoder, decoding method, and codec system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US201462058111P 2014-10-01 2014-10-01

Publications (2)

Publication Number Publication Date
TW201615017A TW201615017A (en) 2016-04-16
TWI565302B true TWI565302B (en) 2017-01-01

Family

ID=56361327

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104130995A TWI565302B (en) 2014-10-01 2015-09-18 Decoder, encoder, method for decoding, method for encoding, and system for encoding and decoding

Country Status (1)

Country Link
TW (1) TWI565302B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130156106A1 (en) * 2011-11-02 2013-06-20 Panasonic Corporation Moving picture coding method, moving picture coding apparatus, moving picture decoding method, and moving picture decoding apparatus
TW201349104A (en) * 2011-12-22 2013-12-01 Intel Corp Packed data rearrangement control indexes generation processors, methods, systems, and instructions
TW201408077A (en) * 2012-07-02 2014-02-16 Panasonic Corp Image decoding method, image encoding method, image decoding device, image encoding device, and image encoding and decoding device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130156106A1 (en) * 2011-11-02 2013-06-20 Panasonic Corporation Moving picture coding method, moving picture coding apparatus, moving picture decoding method, and moving picture decoding apparatus
TW201349104A (en) * 2011-12-22 2013-12-01 Intel Corp Packed data rearrangement control indexes generation processors, methods, systems, and instructions
TW201408077A (en) * 2012-07-02 2014-02-16 Panasonic Corp Image decoding method, image encoding method, image decoding device, image encoding device, and image encoding and decoding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
< PoLin Lai, Tzu-Der Chuang, Yu-Chen Sun, Xiaozhong Xu, Jing Ye, Shih-Ta Hsiang, Yi-Wen Chen, Kai Zhang, Xianguo Zhang, Shan Liu, Yu-Wen Huang, Shawmin Lei >,< Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11>,<17th Meeting >,<2014/03/27~2014/04/04>,<page 1~31> *

Also Published As

Publication number Publication date
TW201615017A (en) 2016-04-16

Similar Documents

Publication Publication Date Title
US20160100161A1 (en) Decoder, encoder, decoding method, encoding method, and codec system
US11785215B2 (en) Encoding method, decoding method, encoding/decoding system, encoder, and decoder
TWI536811B (en) Method and system for image processing, decoding method, encoder and decoder
KR102431538B1 (en) Coding method and device
US20200273258A1 (en) Method and device for modifying attributes of points of a 3d scene
US20170155899A1 (en) Image compression method and apparatus using matching
WO2015120818A1 (en) Picture coding and decoding methods and devices
US20200252647A1 (en) Method and device for encoding a point cloud
US20180131949A1 (en) Method and system for encoding and decoding, encoder and decoder
CN105959724A (en) Video data processing method and device
EP3429206A1 (en) Method and device for encoding a point cloud
CN113347416B (en) Chroma intra prediction method and device, and computer storage medium
TWI565302B (en) Decoder, encoder, method for decoding, method for encoding, and system for encoding and decoding
CN106303534A (en) Multiple index string and pixel string merge method for compressing image and the device of copy mode
TWI581617B (en) Method and system for encoding and decoding, encoder and decoder
CN104581186B (en) Method for coding and decoding intra-frame motion vector in image compression
TWI581616B (en) Method for encoding, method for decoding, system for encoding and decoding, encoder and decoder
WO2020200052A1 (en) Video coding method, video decoding method and relevant device
WO2016119666A1 (en) Image coding/decoding method and apparatus
Stotts Methodology and optimizing of multiple frame format buffering within FPGA H. 264/AVC decoder with FRExt.