TWI581617B - Method and system for encoding and decoding, encoder and decoder - Google Patents

Method and system for encoding and decoding, encoder and decoder Download PDF

Info

Publication number
TWI581617B
TWI581617B TW104115225A TW104115225A TWI581617B TW I581617 B TWI581617 B TW I581617B TW 104115225 A TW104115225 A TW 104115225A TW 104115225 A TW104115225 A TW 104115225A TW I581617 B TWI581617 B TW I581617B
Authority
TW
Taiwan
Prior art keywords
index
pixel
pixels
value
map
Prior art date
Application number
TW104115225A
Other languages
Chinese (zh)
Other versions
TW201547259A (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 CN201510315424.1A priority Critical patent/CN105282550A/en
Priority to US14/736,275 priority patent/US20150365685A1/en
Priority to EP15171546.3A priority patent/EP2955920A1/en
Publication of TW201547259A publication Critical patent/TW201547259A/en
Application granted granted Critical
Publication of TWI581617B publication Critical patent/TWI581617B/en
Priority to US15/866,493 priority patent/US20180131949A1/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

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

本揭露是有關於一種對編碼單元進行編碼與解碼的編碼方法與解碼方法,以及使用此方法的編解碼系統、編碼器與解碼器。 The present disclosure relates to an encoding method and a decoding method for encoding and decoding a coding unit, 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 (about 50% bit rate under the same subjective quality), especially high definition (HD), ultra high resolution (Ultra High) Definition, Ultra HD) and other high resolution video is heavy.

此大尺寸與高解析度之視訊應用的環境多以自然視訊影像為主,並已於2013年完成制訂,目前正在制定的是H.265/HEVC應用範圍擴展(Range Extensions),其中包含制定針對螢幕分享應用服務所需要的螢幕視訊內容編碼(Screen Content Coding,SCC)標準。螢幕分享的視訊內容通常會有混合的視訊內容素材,例如畫面可能同時包含自然影像、大量文字圖片、滑鼠指標及各種線條等,由於此螢幕應用環境已不符H.265/HEVC當初所設計的目標,故JCT-VC近來已將重心轉至發展新的高效能螢幕編碼標準技術。SCC標準乃基於H.265/HEVC現有的工具下進行開發,例如,單顏色模式(Single color mode)與調色盤模式(Palette mode)等,便是屬於SCC標準的編碼技術。 This large-size and high-resolution video application environment is dominated by natural video images and was developed in 2013. Currently, H.265/HEVC Range Extensions are being developed, including The Screen Content Coding (SCC) standard required for the screen sharing application service. 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 SCC standard is developed based on the existing tools of H.265/HEVC, for example, single color mode and palette mode, etc., which is an encoding technology belonging to the SCC standard.

單顏色模式是藉由搜尋編碼單元(Coding Unit,CU)區塊之鄰近畫素,並從此些鄰近畫素中找到一個顏色來表示編碼單元區塊內的所有畫素。之後,編碼端便將對應於此一個畫素之鄰近畫素的索引傳輸到解碼端。而調色盤模式的技術概念則是搜尋一個或多個顏色來代表現在正在編碼中的編碼單元區塊內之畫面,並利用這些顏色所對應到的索引來對編碼單元內的每一個畫素進行索引編號。編碼端會使用此些顏色所對應到的索引來建立出一個索引地圖,並將一個或多個代表顏色以及索引地圖內對應每個畫素的顏色的索引傳送到解碼端。由此可知,在上述調色盤模式中,若以多個顏色來代表現在正在編碼中的編碼單元區塊的畫面 時,則需傳送多個代表顏色以及對應每個畫素之顏色的索引,因此,造成編碼效能的降低。據此,如何能提升編碼的效能,以減少編碼運算中不必要的傳輸與計算,已成為當務之急。 The single color mode is to search for all the pixels in the coding unit block by searching for neighboring pixels of the Coding Unit (CU) block and finding a color from the neighboring pixels. Then, the encoding end transmits the index corresponding to the neighboring pixels of the one pixel to the decoding end. The technical concept of the palette mode is to search for one or more colors to represent the pictures in the coding unit block currently being encoded, and to use the index corresponding to the colors to each pixel in the coding unit. Index number. The encoding end uses the index corresponding to the colors to create an index map, and transmits one or more representative colors and an index of the color corresponding to each pixel in the index map to the decoding end. From this, it can be seen that in the above-described palette mode, if a plurality of colors are used to represent the screen of the coding unit block currently being encoded, At that time, it is necessary to transmit a plurality of representative colors and an index corresponding to the color of each pixel, thereby causing a decrease in coding efficiency. Accordingly, how to improve the performance of the coding to reduce unnecessary transmission and calculation in the coding operation 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.

本揭露的一範例實施例提出一種編碼方法,本編碼方法包括:接收一畫面的第一編碼單元,此第一編碼單元具有以L×L矩陣形式的多個畫素,且L為正整數。本編碼方法還包括:在所述畫面中的多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素,其中第一索引畫素的顏色不同於第二索引畫素的顏色。本編碼方法也包括:對第一編碼單元中的每一畫素進行索引編號以產生一索引地圖,其中在索引地圖中第一編碼單元的每一畫素的顏色是以對應第一索引畫素的索引值或對應第二索引畫素的索引值來呈現。本編碼方法更包括:依據索引地圖產生對應第一編碼單元的一編碼值,以及將編碼值傳送至解碼端,其中在索引地圖中僅對應第一編碼單元的第1個畫素的索引值被記錄在編碼值中。 An exemplary embodiment of the present disclosure provides an encoding method. The encoding method includes: receiving a first coding unit of a picture, the first coding unit having a plurality of pixels in an L×L matrix, and L being a positive integer. The encoding method further includes: selecting two pixels in the plurality of pixels in the picture as the first index pixel and the second index pixel, wherein the color of the first index pixel is different from the second index pixel s color. The encoding method also includes: indexing each pixel in the first coding unit to generate an index map, wherein the color of each pixel of the first coding unit in the index map is corresponding to the first index pixel The index value or the index value corresponding to the second index pixel is presented. The encoding method further includes: generating an encoded value corresponding to the first coding unit according to the index map, and transmitting the encoded value to the decoding end, wherein only the index value of the first pixel corresponding to the first coding unit is in the index map is Recorded in the encoded value.

本揭露的一範例實施例提出一種解碼方法,本解碼方法包括:接收對應第一編碼單元的編碼值,其中第一編碼單元具有 以一L×L矩陣形式排列的多個畫素,並且L為正整數。本解碼方法還包括:根據此編碼值中的一索引值、至少一複製模式以及至少一跑字符的值重建對應第一編碼單元的索引地圖,其中所接收的編碼值僅針對在索引地圖中的第一編碼單元的第1個畫素的索引值進行解碼。本解碼方法更包括:獲得第一索引畫素的顏色與第二索引畫素的顏色,以及根據第一索引畫素的顏色、第二索引畫素的顏色與索引地圖的多個索引值重建第一編碼單元的多個畫素,其中第一索引畫素的顏色不同於第二索引畫素的顏色。 An exemplary embodiment of the present disclosure provides a decoding method, where the decoding method includes: receiving an encoding value corresponding to a first coding unit, where the first coding unit has A plurality of pixels arranged in an L×L matrix, and L is a positive integer. The decoding method further includes: reconstructing an index map corresponding to the first coding unit according to an index value, at least one copy mode, and at least one running character value of the code value, where the received code value is only for the index map. The index value of the first pixel of the first coding unit is decoded. The decoding method further includes: obtaining a color of the first index pixel and a color of the second index pixel, and reconstructing according to the color of the first index pixel, the color of the second index pixel, and the plurality of index values of the index map. A plurality of pixels of a coding unit, wherein a color of the first index pixel is different from a color of the second index pixel.

本揭露的一範例實施例提出一種編碼器,此編碼器包括:編碼模組、顏色選擇模組、索引設定模組以及索引地圖建立模組。編碼模組會接收一畫面的第一編碼單元,此第一編碼單元具有以L×L矩陣形式的多個畫素,且L為正整數。顏色選擇模組會在第一編碼單元的多個畫素中選出兩個畫素作為一第一索引畫素與一第二索引畫素,並且第一索引畫素的顏色不同於第二索引畫素的顏色。索引地圖建立模組對第一編碼單元中的每一畫素進行索引編號以產生一索引地圖,並且在索引地圖中第一編碼單元的每一畫素的顏色是以對應第一索引畫素的索引值或對應第二索引畫素的索引值來呈現。此外,在索引地圖中僅對應第一編碼單元的第1個畫素的索引值被記錄在編碼值中。之後,編碼模組會將編碼值傳送至解碼器。 An exemplary embodiment of the present disclosure provides an encoder, where the encoder includes an encoding module, a color selection module, an index setting module, and an index map establishing module. The encoding module receives a first coding unit of a picture, the first coding unit having a plurality of pixels in the form of an L×L matrix, and L being a positive integer. The color selection module selects two pixels in the plurality of pixels of the first coding unit as a first index pixel and a second index pixel, and the color of the first index pixel is different from the second index picture. The color of the prime. The index map establishing module indexes each pixel in the first coding unit to generate an index map, and the color of each pixel of the first coding unit in the index map is corresponding to the first index pixel. The index value or the index value corresponding to the second index pixel is presented. Further, only the index value of the first pixel corresponding to the first coding unit in the index map is recorded in the code value. The encoding module then passes the encoded value to the decoder.

本揭露的一範例實施例提出一種解碼器,此解碼器包括:編碼值接收模組與解碼模組。編碼值接收模組接收對應第一 編碼單元的編碼值,並且第一編碼單元具有以L×L矩陣形式的多個畫素,其中L為正整數。解碼模組會根據編碼值中的一索引值、至少一複製模式以及至少一跑字符的值重建對應第一編碼單元的索引地圖,並且所接收的編碼值僅針對索引地圖中的第一編碼單元的第1個畫素的索引值進行解碼。此外,解碼模組會獲得第一索引畫素的顏色與第二索引畫素的顏色,並且根據此第一索引畫素的顏色、第二索引畫素的顏色與索引地圖的多個索引值重建第一編碼單元的畫素,其中第一索引畫素的顏色不同於第二索引畫素的顏色。 An exemplary embodiment of the present disclosure provides a decoder, where the decoder includes: an encoded value receiving module and a decoding module. The coded value receiving module receives the corresponding first An encoding value of the coding unit, and the first coding unit has a plurality of pixels in the form of an L×L matrix, where L is a positive integer. The decoding module reconstructs an index map corresponding to the first coding unit according to an index value, at least one copy mode, and at least one running character value in the encoded value, and the received encoded value is only for the first coding unit in the index map. The index value of the first pixel is decoded. In addition, the decoding module obtains the color of the first index pixel and the color of the second index pixel, and reconstructs according to the color of the first index pixel, the color of the second index pixel, and multiple index values of the index map. A pixel of the first coding unit, wherein a color of the first index pixel is different from a color of the second index pixel.

本揭露的一範例實施例提出一種編解碼系統,本編解碼系統包括:編碼器與解碼器。編碼器會接收一畫面的第一編碼單元,此第一編碼單元具有以L×L矩陣形式的多個畫素,且L為正整數。接著,編碼器會在所述畫面中的多個畫素中選出兩個畫素作為一第一索引畫素與一第二索引畫素,並且第一索引畫素的顏色不同於第二索引畫素的顏色。此外,編碼器會對第一編碼單元中的每一畫素進行索引編號以產生一索引地圖,其中在索引地圖中第一編碼單元的每一畫素的顏色是以對應第一索引畫素的索引值或對應第二索引畫素的索引值來呈現。在索引地圖中僅對應第一編碼單元的第1個畫素的索引值被記錄在編碼值中。並且,編碼器會將編碼值傳送至解碼器。 An exemplary embodiment of the present disclosure provides a codec system, where the codec system includes an encoder and a decoder. The encoder receives a first coding unit of a picture, the first coding unit having a plurality of pixels in the form of an L x L matrix, and L being a positive integer. Then, the encoder selects two pixels in the plurality of pixels in the picture as a first index pixel and a second index pixel, and the color of the first index pixel is different from the second index picture. The color of the prime. In addition, the encoder indexes each pixel in the first coding unit to generate an index map, wherein the color of each pixel of the first coding unit in the index map is corresponding to the first index pixel. The index value or the index value corresponding to the second index pixel is presented. The index value of only the first pixel corresponding to the first coding unit in the index map is recorded in the encoded value. Also, the encoder will pass the encoded value to the decoder.

基於上述,本揭露之範例實施例所提出的編碼方法與解碼方法及使用此方法的編解碼系統、編碼器與解碼器能夠藉由僅 傳送對應編碼單元的畫素之中的第1個畫素的索引值而有效地減少編碼運算時的傳輸量,進而大幅減少編碼運算所需要的時間以提升編碼效能。 Based on the above, the coding method and decoding method and the codec system, the encoder and the decoder using the same according to the exemplary embodiments of the present disclosure can be The index value of the first pixel in the pixel corresponding to the coding unit is transmitted to effectively reduce the amount of transmission during the coding operation, thereby greatly reducing the time required for the coding operation to improve the coding performance.

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

100‧‧‧編解碼晶片 100‧‧‧ Codec Chip

102、130、150‧‧‧儲存電路 102, 130, 150‧‧‧ storage circuits

104、140、160‧‧‧處理器電路 104, 140, 160‧‧‧ processor circuits

106‧‧‧緩衝記憶體 106‧‧‧Buffered memory

110‧‧‧編碼器 110‧‧‧Encoder

120‧‧‧解碼器 120‧‧‧Decoder

112‧‧‧編碼模組 112‧‧‧Code Module

114‧‧‧顏色選擇模組 114‧‧‧Color selection module

116‧‧‧索引設定模組 116‧‧‧ index setting module

118‧‧‧索引地圖建立模組 118‧‧‧Index map creation module

122‧‧‧編碼值接收模組 122‧‧‧Code value receiving module

124‧‧‧解碼模組 124‧‧‧Decoding module

200‧‧‧第一編碼單元 200‧‧‧ first coding unit

202、204、206、208、210、230、250‧‧‧畫素 202, 204, 206, 208, 210, 230, 250‧ ‧ pixels

220、1220‧‧‧至少一第二編碼單元 220, 1220‧‧‧ at least one second coding unit

1202、1204‧‧‧第二編碼單元 1202, 1204‧‧‧second coding unit

300‧‧‧畫素對表 300‧‧‧ pixel pair

302‧‧‧識別值欄位 302‧‧‧Value field

304‧‧‧畫素對欄位 304‧‧‧ pixels for the field

500、900‧‧‧索引地圖 500, 900‧‧‧ index map

600‧‧‧編碼值 600‧‧‧ code value

610、620、640、660、670‧‧‧向左複製跑模式 610, 620, 640, 660, 670‧‧‧ copy mode to the left

630、650‧‧‧向上複製跑模式 630, 650‧‧‧up copy mode

612‧‧‧索引地圖的第1行第1列個索引 612‧‧ ‧ index map of the first row and the first column index

616、626、636、646、656、666、676‧‧‧位移數 616, 626, 636, 646, 656, 666, 676‧‧‧ displacements

618‧‧‧跑字符的值 618‧‧‧ running characters

60、61、62、63、64、65、66、67、68、69、70、71、72、73、74、75‧‧‧畫素 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75‧‧ ‧ pixels

1000、1200-1、1200-2‧‧‧鄰近範圍 1000, 1200-1, 1200-2‧‧‧ adjacent range

S701、S703、S705、S707‧‧‧編碼方法的步驟 Steps of the S701, S703, S705, S707‧‧ ‧ encoding methods

S1001、S1003、S1005‧‧‧解碼方法的步驟 S1001, S1003, S1005‧‧‧ steps of the decoding method

1102、1104、1106、1108、1112、1114、1116、1302、1304、1306、1308、1310、1312、1314、1316‧‧‧叢集 1102, 1104, 1106, 1108, 1112, 1114, 1116, 1302, 1304, 1306, 1308, 1310, 1312, 1314, 1316‧‧ ‧ cluster

C0、C1、C2、C3、C4、C5、C6‧‧‧顏色 C0, C1, C2, C3, C4, C5, C6‧‧‧ colors

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

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

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

圖2A與圖2B是根據本揭露之第一範例實施例所繪示的影像編碼運作示意圖。 FIG. 2A and FIG. 2B are schematic diagrams showing an image encoding operation according to a first exemplary embodiment of the present disclosure.

圖3是根據本揭露之第一範例實施例所繪示的畫素對表的一個範例。 FIG. 3 is an example of a pixel pair table according to a first exemplary embodiment of the present disclosure.

圖4是根據本揭露之第一範例實施例所繪示的設定索引值的一個範例。 FIG. 4 is an example of setting index values according to the first exemplary embodiment of the disclosure.

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

圖6A與圖6B是根據本揭露之第一範例實施例所繪示的產生編碼值的一個範例。 FIG. 6A and FIG. 6B are diagrams showing an example of generating encoded values according to the first exemplary embodiment of the present disclosure.

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

圖8A與圖8B為根據本揭露第一範例實施例所繪示的編解碼的程式碼。 8A and 8B are code diagrams of codecs according to the first exemplary embodiment of the disclosure.

圖9A為根據本揭露第一範例實施例所繪示的以向左複製跑模式為例之對編碼單元進行掃描的程式碼。 FIG. 9A is a code diagram of scanning a coding unit by using a leftward copy mode as an example according to the first exemplary embodiment of the disclosure.

圖9B為根據本揭露第一範例實施例所繪示的以向上複製跑模式為例之對編碼單元進行掃描的程式碼。 FIG. 9B is a code diagram of scanning a coding unit by taking an upward copy run mode as an example according to the first exemplary embodiment of the present disclosure.

圖10A~圖10G是根據本揭露之第一範例實施例所繪示的根據編碼值重建索引地圖的一個範例。 FIG. 10A to FIG. 10G are diagrams showing an example of reconstructing an index map according to an encoded value according to a first exemplary embodiment of the present disclosure.

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

圖12是根據本揭露之第二範例實施例所繪示的影像編碼運作示意圖。 FIG. 12 is a schematic diagram of an image encoding operation according to a second exemplary embodiment of the present disclosure.

圖13A與圖13B是根據本揭露之第二範例實施例所繪示的畫素分群運作示意圖。 13A and FIG. 13B are schematic diagrams of pixel group operation according to a second exemplary embodiment of the present disclosure.

圖14是根據本揭露之第三範例實施例所繪示的影像編碼運作示意圖。 FIG. 14 is a schematic diagram of an image encoding operation according to a third exemplary embodiment of the present disclosure.

圖15A與圖15B是根據本揭露之第三範例實施例所繪示的畫素分群運作示意圖。 15A and FIG. 15B are schematic diagrams of pixel group operation according to a third exemplary embodiment of the present disclosure.

[第一範例實施例] [First Exemplary Embodiment]

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

請參照圖1A,編碼器110包括編碼模組112、顏色選擇模組114、索引設定模組116、索引地圖建立模組118、儲存電路130與處理器電路140。 Referring to FIG. 1A , the encoder 110 includes an encoding module 112 , a color selection module 114 , an index setting module 116 , an index map establishing module 118 , a storage circuit 130 , and a processor circuit 140 .

在本範例實施例中,儲存電路130用以儲存各種資料、程式碼或待處理及處理後的影像。例如,儲存電路130可以是記憶體(memory)或硬碟(Hard Disk Drive,HDD)等儲存媒體,且不限於此。處理器電路140用以控制編碼器110的整體運作。例如,處理器電路140可以是中央處理器(CPU)、微處理器(micro-processor)或嵌入式控制器(embedded controller),本揭露並不加以限制。處理器電路140是耦接至儲存電路130,並且用以控制編碼模組112、顏色選擇模組114、索引設定模組116與索引地圖建立模組118來進行編碼操作。 In the present exemplary embodiment, the storage circuit 130 is configured to store various data, code, or images to be processed and processed. For example, the storage circuit 130 may be a storage medium such as a memory or a Hard Disk Drive (HDD), and is not limited thereto. The processor circuit 140 is used to control the overall operation of the encoder 110. For example, the processor circuit 140 may be a central processing unit (CPU), a micro-processor, or an embedded controller, and the disclosure is not limited. The processor circuit 140 is coupled to the storage circuit 130 and configured to control the encoding module 112, the color selection module 114, the index setting module 116, and the index map creation module 118 to perform an encoding operation.

編碼模組112用以接收一畫面中的一編碼單元(以下稱為第一編碼單元),並且第一編碼單元具有以一L×L矩陣形式排列的多個畫素,其中L為正整數。具體而言,在H.265/HEVC的標準下,是以一個編碼樹單元(Coding Tree Unit,CTU)作為編碼單元編碼時的最大處理區塊,此編碼樹單元的大小通常是設定為64×64的區塊。編碼單元則可以是小於或等於編碼樹單元的區塊大小。舉例而言,編碼單元為一正方矩形並且其大小可以是64×64、32×32、16×16與8×8的區塊。值得注意的是,在本揭露範例實施例中所述的編碼單元及鄰近範圍之大小的單位皆為畫素。在本範例實 施例中,為了方便說明,以下將假設第一編碼單元的大小為4×4的區塊。 The encoding module 112 is configured to receive a coding unit (hereinafter referred to as a first coding unit) in a picture, and the first coding unit has a plurality of pixels arranged in an L×L matrix, where L is a positive integer. Specifically, under the standard of H.265/HEVC, a coding tree unit (CTU) is used as the maximum processing block when coding unit, and the size of the coding tree unit is usually set to 64×. Block of 64. The coding unit may then be smaller or equal to the block size of the coding tree unit. For example, the coding unit is a square rectangle and its size may be 64x64, 32x32, 16x16 and 8x8 blocks. It should be noted that the coding unit and the unit of the size of the adjacent range in the exemplary embodiment of the disclosure are all pixels. In this example In the embodiment, for convenience of explanation, a block having a size of 4 × 4 of the first coding unit will be assumed below.

顏色選擇模組114用以在編碼模組112所接收的第一編碼單元的多個畫素中選出兩個不同顏色的畫素作為第一索引畫素與第二索引畫素。在一實施例中,編碼模組112會在第一編碼單元200的鄰近範圍內的多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素,編碼器110更包括畫素對表建立模組(未繪示),畫素對表建立模組會建立一畫素對表以記錄對應上述多個畫素的識別值與畫素對,其中,畫素對表建立模組記錄識別值與畫素對之實施例將之後詳細說明。然而,本揭露並不限於此,例如,在另一範例實施例中,編碼模組112可從畫面中所有畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。目前視訊影像應用皆是使用彩色顯示,並且畫面中每個畫素皆會由三個編碼構成要素組成,舉例來說,每一個畫素是藉由YUV顏色編碼方法而被編碼或以RGB顏色模型而被呈現。其中,YUV顏色編碼方法用以編譯顏色空間(color space),其中「Y」表示明亮度(Luminance、Luma),「U」和「V」則是表示色度與濃度(Chrominance、Chroma)。RGB顏色模型是一種加色模型,用以將紅(Red)、綠(Green)、藍(Blue)三原色的色光以不同的比例相加,以產生多種多樣的色光。例如,YUV顏色編碼方法著重於視覺對於亮度的敏感程度,而RGB顏色模型則著重於人眼對色彩的感應。值得注意的是,在本揭露範例實施例中,所選出的兩個不同顏色的畫素實際上亦分 別是由所述三個編碼構成要素所組成。 The color selection module 114 is configured to select two pixels of different colors as the first index pixel and the second index pixel from the plurality of pixels of the first coding unit received by the encoding module 112. In an embodiment, the encoding module 112 selects two pixels from the plurality of pixels in the vicinity of the first encoding unit 200 as the first index pixel and the second index pixel, and the encoder 110 further includes The pixel creation module (not shown), the pixel pair table creation module will establish a pixel pair table to record the recognition value and the pixel pair corresponding to the plurality of pixels, wherein the pixel pair table is established. The module record identification value and pixel pair embodiment will be described in detail later. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the encoding module 112 may select two pixels from all the pixels in the picture as the first index pixel and the second index pixel. At present, video image applications use color display, and each pixel in the picture is composed of three coding components. For example, each pixel is encoded by YUV color coding method or RGB color model. And being presented. Among them, the YUV color coding method is used to compile a color space, where "Y" indicates brightness (Luminance, Luma), and "U" and "V" indicate chromaticity and concentration (Chrominance, Chroma). The RGB color model is an additive color model for adding the colors of the red, green, and blue primary colors in different proportions to produce a variety of color lights. For example, the YUV color coding method focuses on the sensitivity of vision to brightness, while the RGB color model focuses on the perception of color by the human eye. It should be noted that in the exemplary embodiment of the disclosure, the selected two different color pixels are actually divided. It is not composed of the three coding components.

索引設定模組116用以設定對應第一索引畫素的索引值與對應第二索引畫素的索引值。 The index setting module 116 is configured to set an index value corresponding to the first index pixel and an index value corresponding to the second index pixel.

索引地圖建立模組118用以使用一雙顏色模式(two-color mode/bi-color mode)對第一編碼單元中的每一畫素進行索引編號以產生對應第一編碼單元的索引地圖。然而,本揭露不限於此,例如,在另一範例實施例中,索引地圖建立模組118是使用調色盤模式(palette mode)對第一編碼單元中的每一畫素進行索引編號來產生對應第一編碼單元的索引地圖。特別是,在所建立的索引地圖中第一編碼單元的每一畫素的顏色是以對應第一索引畫素的索引值或對應第二索引畫素的索引值來呈現。 The index map creation module 118 is configured to index each pixel in the first coding unit using a two-color mode/bi-color mode to generate an index map corresponding to the first coding unit. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the index map establishing module 118 generates an index number for each pixel in the first coding unit by using a palette mode. An index map corresponding to the first coding unit. In particular, the color of each pixel of the first coding unit in the established index map is presented with an index value corresponding to the first index pixel or an index value corresponding to the second index pixel.

在本範例實施例中,編碼模組112會依據索引地圖建立模組118所建立的索引地圖產生對應第一編碼單元的編碼值。 In the present exemplary embodiment, the encoding module 112 generates an encoded value corresponding to the first coding unit according to the index map established by the index map establishing module 118.

在完成上述編碼後,編碼器110可將編碼後的資料傳送至解碼器來進行解碼。例如,編碼器110是實作在影像發送終端中,而解碼器是實作在影像接收終端中,其中編碼器與解碼器可透過有線或無線方式來通訊。 After completing the above encoding, the encoder 110 may transmit the encoded data to the decoder for decoding. 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 a first exemplary embodiment of the disclosure.

請參照圖1B,解碼器120包括編碼值接收模組122、解碼模組124、儲存電路150與處理器電路160。儲存電路150用以儲存各種資料、程式碼或待處理及處理後的影像。例如,儲存電路150可以是記憶體或硬碟等儲存媒體,且不限於此。處理器電 路160是耦接至儲存電路150且用以控制解碼器120的整體運作。特別是,處理器電路160會控制編碼值接收模組122與解碼模組124以完成解碼操作。例如,處理器電路160可以是中央處理器(CPU)、微處理器(micro-processor)或嵌入式控制器(embedded controller),本揭露並不加以限制。 Referring to FIG. 1B, the decoder 120 includes an encoded value receiving module 122, a decoding module 124, a storage circuit 150, and a processor circuit 160. The storage circuit 150 is used to store various data, code or images to be processed and processed. For example, the storage circuit 150 may be a storage medium such as a memory or a hard disk, and is not limited thereto. Processor power The path 160 is coupled to the storage circuit 150 and is used to control the overall operation of the decoder 120. In particular, processor circuit 160 controls encoded value receiving module 122 and decoding module 124 to perform the decoding operation. For example, the processor circuit 160 may be a central processing unit (CPU), a micro-processor, or an embedded controller, and the disclosure is not limited.

相對於編碼器110,解碼器120的編碼值接收模組122會從編碼器110的編碼模組112接收編碼值並且解碼模組124會根據所接收的編碼值來還原對應的編碼單元。例如,編碼值接收模組122接收對應每一組畫素對之顏色的識別值或第一索引畫素的顏色與第二索引畫素的顏色,以及對應上述第一編碼單元的編碼值,並且解碼模組124根據此編碼值重建對應第一編碼單元的索引地圖,並且根據第一索引畫素的顏色、第二索引畫素的顏色與索引地圖的多個索引重建第一編碼單元的多個畫素。 With respect to the encoder 110, the encoded value receiving module 122 of the decoder 120 receives the encoded value from the encoding module 112 of the encoder 110 and the decoding module 124 restores the corresponding encoding unit according to the received encoded value. For example, the code value receiving module 122 receives the identification value corresponding to the color of each set of pixel pairs or the color of the first index pixel and the color of the second index pixel, and the code value corresponding to the first coding unit, and The decoding module 124 reconstructs an index map corresponding to the first coding unit according to the coded value, and reconstructs multiple first coding units according to the color of the first index pixel, the color of the second index pixel, and the plurality of indexes of the index map. Picture.

值得一提的是,上述編碼器與解碼器是分別實作於不同的終端中,並且透過網路傳遞彼此所需要的資料,然而,本揭露不限於此。在另一範例實施例中,編碼器與解碼器可實作於同一個晶片或系統中。例如,在編碼器與解碼器分別實作於不同的終端中的範例中,編碼器與解碼器是兩個個別的裝置,編碼器會將壓縮的資料傳送到解碼器,而解碼器會接收編碼器傳來的壓縮的資料。而在編碼器與解碼器實作於同一個晶片或系統中的範例中,編碼器與解碼器會配置於同一個裝置,因此,編碼器會將其所壓縮的資料傳送到本身裝置的硬碟(例如,儲存電路102)內,而 解碼器會在此同一個裝置中接收所述硬碟傳來的壓縮的資料。 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. For example, in an example where the encoder and the decoder are respectively implemented in different terminals, the encoder and the decoder are two separate devices, and the encoder transmits the compressed data to the decoder, and the decoder receives the code. Compressed data from the device. In the example where the encoder and the decoder are implemented in the same chip or system, the encoder and the decoder are arranged in the same device, so the encoder transmits the compressed data to the hard disk of the device itself. (eg, storage circuit 102), and The decoder will receive the compressed data from the hard disk in the same device.

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

請參照圖1C,編解碼晶片100(亦稱為編解碼系統)包括儲存電路102、處理器電路104、緩衝記憶體106、編碼器110以及解碼器120。 Referring to FIG. 1C, the codec wafer 100 (also referred to as a codec system) includes a storage circuit 102, a processor circuit 104, a buffer memory 106, an encoder 110, and a decoder 120.

儲存電路102用以儲存各種資料、程式碼或待處理及處理後的影像。例如,儲存電路102可以是記憶體或硬碟等儲存媒體,且不限於此。 The storage circuit 102 is configured to store various data, code or images to be processed and processed. For example, the storage circuit 102 may be a storage medium such as a memory or a hard disk, and is not limited thereto.

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

緩衝記憶體106耦接至處理器電路104,並且用以暫存資料。在本範例實施例中,緩衝記憶體106為靜態隨機存取記憶體(Static Random-Access Memory,SRAM)。必須瞭解的是,本揭露不限於此,在另一範例實施例中,緩衝記憶體106可以是動態隨機存取記憶體(Dynamic Random Access Memory)或其他記憶體。 The buffer memory 106 is coupled to the processor circuit 104 and is used to temporarily store data. In the exemplary embodiment, the buffer memory 106 is a static random access memory (SRAM). It should be understood that the disclosure is not limited thereto. In another exemplary embodiment, the buffer memory 106 may be a dynamic random access memory or other memory.

儲存電路102耦接至處理器電路104與緩衝記憶體106。編碼器110與解碼器120的運作是分別相同於上述圖1A與圖1B中所示的編碼器與解碼器。例如,編碼器110包括編碼模組112、 顏色選擇模組114、索引設定模組116與索引地圖建立模組118。解碼器120包括編碼值接收模組122與解碼模組124。 The storage circuit 102 is coupled to the processor circuit 104 and the buffer memory 106. The operation of the encoder 110 and the decoder 120 are the same as those of the encoder and decoder shown in Figs. 1A and 1B, respectively. For example, the encoder 110 includes an encoding module 112, The color selection module 114, the index setting module 116, and the index map building module 118. The decoder 120 includes an encoded value receiving module 122 and a decoding module 124.

值得注意的是,本揭露中的編碼器與解碼器是由軟體模組或程式碼來實作,例如,儲存電路102會儲存上述編碼模組、顏色選擇模組、索引設定模組、索引地圖建立模組、畫素對表建立模組、編碼值接收模組以及解碼模組,並且當編解碼晶片100致能時,此些軟體程式碼會從儲存電路102被載入至緩衝記憶體106且由處理器電路102執行以運作編碼模組、顏色選擇模組、索引設定模組、索引地圖建立模組、畫素對表建立模組、編碼值接收模組以及解碼模組的功能。然而,本揭露不限於此,例如,在本揭露另一範例實施例中,編解碼晶片、編碼器與解碼器可以是由硬體電路來實作。例如,上述編碼模組、顏色選擇模組、索引設定模組、索引地圖建立模組、畫素對表建立模組、編碼值接收模組以及解碼模組可以硬體電路實作為編碼電路、顏色選擇電路、索引設定電路、索引地圖建立電路、編碼值接收電路以及解碼電路。 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 102 stores the encoding module, the color selection module, the index setting module, and the index map. A module, a pixel pair module creation module, a code value receiving module, and a decoding module are created, and when the codec chip 100 is enabled, the software code is loaded from the storage circuit 102 to the buffer memory 106. And the processor circuit 102 performs the functions of the operation coding module, the color selection module, the index setting module, the index map creation module, the pixel pair table creation module, the code value receiving module, and the decoding module. 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 above coding module, color selection module, index setting module, index map creation module, pixel pair table creation module, code value receiving module, and decoding module can be used as a coding circuit and color. A selection circuit, an index setting circuit, an index map establishing circuit, an encoding value receiving circuit, and a decoding circuit.

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

圖2A與圖2B是根據本揭露之第一範例實施例所繪示的影像編碼運作示意圖。 FIG. 2A and FIG. 2B are schematic diagrams showing an image encoding operation according to a first exemplary embodiment of the present disclosure.

請參照圖2A,在此,以雙顏色模式為例,並假設編碼模 組112所接收的一畫面中第一編碼單元200的大小為L×L,其中L為正整數。舉例來說,編碼模組112會在第一編碼單元200的鄰近範圍內的多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。然而,本揭露並不限於此,例如,在另一範例實施例中,編碼模組112可從畫面中所有畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。本範例實施例中,此鄰近範圍包括鄰近於第一編碼單元200的至少一個編碼單元220(以下稱為至少一第二編碼單元220)中鄰近於第一編碼單元200的多個畫素(以下稱為第三畫素)。值得注意的是,第一編碼單元200與至少一第二編碼單元220所在的畫面的解碼順序中,在第一編碼單元200被解碼之前至少一第二編碼單元220為已經被解碼的編碼單元。換言之,鄰近範圍不包括目前正在編碼的編碼單元以及/或在解碼過程中在目前正在編碼的編碼單元之後才會被解碼的區域。然而,本揭露並不加以限制鄰近範圍的區域,例如,在另一範例實施例中,鄰近範圍亦可包括目前欲編碼的編碼單元以及/或畫面中未解碼的區域。 Please refer to FIG. 2A. Here, the dual color mode is taken as an example, and the coding mode is assumed. The size of the first coding unit 200 in a picture received by the group 112 is L x L, where L is a positive integer. For example, the encoding module 112 selects two pixels as the first index pixel and the second index pixel from the plurality of pixels in the vicinity of the first encoding unit 200. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the encoding module 112 may select two pixels from all the pixels in the picture as the first index pixel and the second index pixel. In this exemplary embodiment, the neighboring range includes a plurality of pixels adjacent to the first encoding unit 200 in the at least one encoding unit 220 (hereinafter referred to as at least one second encoding unit 220) adjacent to the first encoding unit 200 (hereinafter Called the third pixel). It should be noted that, in the decoding order of the picture where the first coding unit 200 and the at least one second coding unit 220 are located, at least one second coding unit 220 is the coding unit that has been decoded before the first coding unit 200 is decoded. In other words, the proximity range does not include the coding unit currently being coded and/or the area that will be decoded after the coding unit 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 coding units that are currently to be encoded and/or undecoded areas in the picture.

具體而言,此些第三畫素分別為鄰近於第一編碼單元200的第1行(column)第1列(row)個畫素的上邊緣與左邊緣的畫素202與畫素204,鄰近於第一編碼單元200的第L行第1列個畫素的上邊緣的畫素206,鄰近於第一編碼單元200的第1行第L列個畫素的左邊緣的畫素208以及對應於第一編碼單元200的第1行第1列個畫素的左上角的畫素210。 Specifically, the third pixels are respectively a pixel 202 and a pixel 204 adjacent to an upper edge and a left edge of the first row of pixels of the first row of the first coding unit 200. The pixel 206 adjacent to the upper edge of the first column of pixels of the Lth row of the first coding unit 200 is adjacent to the pixel 208 of the left edge of the first row and the Lth column of pixels of the first coding unit 200 and Corresponding to the pixel 210 in the upper left corner of the first row and the first column of the first coding unit 200.

在以雙顏色模式為例的範例實施例中,編碼器110更包括畫素對表建立模組(未繪示),畫素對表建立模組會建立一畫素對表以記錄對應上述多個第三畫素的識別值與畫素對。例如,畫素對表建立模組會依據此些第三畫素(即,畫素202、畫素204、畫素206、畫素208與畫素210)產生多個畫素對,且將對應每一畫素對的識別值與對應此識別值的每一組畫素的顏色記錄於畫素對表中。值得一提的是,在本範例實施例中,畫素對表建立模組是以畫素202、畫素204、畫素206、畫素208與畫素210的集合來產生多個畫素對,然而,本揭露並不限於此。例如,在另一範例實施例中,鄰近範圍可包括鄰近於第一編碼單元200的至少一第二編碼單元220中鄰近於第一編碼單元200的鄰近範圍1000(如圖2B所示)。因此,鄰近範圍1000中的多個第三畫素可以是對應於第一編碼單元200的第1行第1列個畫素的左上角的畫素210,以及在鄰近範圍1000內鄰近於第一編碼單元200的左邊緣的任一個畫素230與在鄰近範圍1000內鄰近於第一編碼單元200的上邊緣的任一個畫素250。因此,畫素對表建立模組可以畫素210、畫素230與畫素250的集合來產生多個畫素對。此外,在另一個以調色盤模式為例範例實施例中,編碼器110是由第一編碼單元200中的多個畫素中直接選出兩個畫素作為第一索引畫素與第二索引畫素。 In an exemplary embodiment in which the dual color mode is taken as an example, the encoder 110 further includes a pixel pair table creation module (not shown), and the pixel pair table creation module establishes a pixel pair table to record corresponding to the above. The recognition value of the third pixel and the pixel pair. For example, the pixel pair module creation module generates a plurality of pixel pairs according to the third pixels (ie, the pixels 202, the pixels 204, the pixels 206, the pixels 208, and the pixels 210), and correspondingly The recognition value of each pixel pair and the color of each group of pixels corresponding to the recognition value are recorded in the pixel pair table. It should be noted that in the exemplary embodiment, the pixel pair table creation module generates a plurality of pixel pairs by using a set of pixels 202, pixels 204, pixels 206, pixels 208, and pixels 210. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the proximity range may include a proximity range 1000 (shown in FIG. 2B) adjacent to the first coding unit 200 in the at least one second coding unit 220 adjacent to the first coding unit 200. Therefore, the plurality of third pixels in the adjacent range 1000 may be the pixels 210 corresponding to the upper left corner of the first row and the first column of pixels of the first encoding unit 200, and adjacent to the first in the adjacent range 1000. Any one of the pixels 230 of the left edge of the encoding unit 200 and any one of the pixels 250 adjacent to the upper edge of the first encoding unit 200 within the adjacent range 1000. Therefore, the pixel-pairing module can generate a plurality of pixel pairs by using a set of pixels 210, pixels 230, and pixels 250. In addition, in another exemplary embodiment in which the palette mode is taken as an example, the encoder 110 directly selects two pixels from the plurality of pixels in the first encoding unit 200 as the first index pixel and the second index. Picture.

圖3是根據本揭露之第一範例實施例所繪示的畫素對表的一個範例。 FIG. 3 is an example of a pixel pair table according to a first exemplary embodiment of the present disclosure.

請參照圖2A與圖3,畫素對表建立模組依據畫素202、畫素204、畫素206、畫素208與畫素210產生多個畫素對並將此些畫素對與其顏色記錄於畫素對表300的畫素對欄位304中。此外,畫素對表建立模組亦會將對應每一畫素對的識別值(0~9)記錄於識別值欄位302中。例如,畫素對表300中的識別值為0的識別值對應於其畫素為畫素208與畫素206的畫素對,且此畫素對中的畫素208與畫素206的顏色分別為C1與C2。並且以此類推,每一識別值皆會對應到其畫素對及其所代表的顏色。據此,顏色選擇模組114即可根據畫素對表300選擇其中一個畫素對,而顏色選擇模組114所選擇的畫素對中的兩個畫素會被設定為第一索引畫素與第二索引畫素。 Referring to FIG. 2A and FIG. 3, the pixel pair table creation module generates a plurality of pixel pairs according to the pixel 202, the pixel 204, the pixel 206, the pixel 208, and the pixel 210, and pairs the pixel pairs with the color thereof. Recorded in the pixel pair field 304 of the pixel pair table 300. In addition, the pixel pair table creation module also records the identification value (0~9) corresponding to each pixel pair in the identification value field 302. For example, the recognition value of the pixel pair identification value 0 in the table 300 corresponds to the pixel pair whose pixel is the pixel 208 and the pixel 206, and the color of the pixel 208 and the pixel 206 in the pixel pair. They are C1 and C2 respectively. And so on, each recognition value will correspond to its pixel pair and the color it represents. Accordingly, the color selection module 114 can select one of the pixel pairs according to the pixel pair table 300, and the two pixels in the pixel pair selected by the color selection module 114 are set as the first index pixel. With the second index pixel.

圖4是根據本揭露之第一範例實施例所繪示的設定索引值的一個範例。 FIG. 4 is an example of setting index values according to the first exemplary embodiment of the disclosure.

請參照圖4,在本範例實施例中,顏色選擇模組114選擇識別值為3的識別值所對應的畫素對(即,畫素208與畫素204)作為第一索引畫素208與第二索引畫素204。因此,索引設定模組116會依序地將對應此第一索引畫素208的索引值設定為0與對應此第二索引畫素204的索引值設定為1。之後,在編碼模組112將編碼值傳送至解碼器120的操作中,編碼模組112亦會傳送此識別值(即,3)至解碼器120。 Referring to FIG. 4, in the exemplary embodiment, the color selection module 114 selects a pixel pair (ie, pixel 208 and pixel 204) corresponding to the identification value with a recognition value of 3 as the first index pixel 208 and The second index pixel 204. Therefore, the index setting module 116 sequentially sets the index value corresponding to the first index pixel 208 to 0 and the index value corresponding to the second index pixel 204 to 1. Thereafter, in the operation of the encoding module 112 to transmit the encoded value to the decoder 120, the encoding module 112 also transmits the identification value (ie, 3) to the decoder 120.

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

請參照圖5,之後,索引地圖建立模組118即可根據對應第一索引畫素208的索引值(即,0)與對應第二索引畫素204的索引值(即,1),使用雙顏色模式對第一編碼單元200中的每一畫素進行索引編號以產生索引地圖500。換言之,在索引地圖500中第一編碼單元200的每一畫素的顏色是以對應第一索引畫素208的索引值(即,0)或對應第二索引畫素204的索引值(即,1)來呈現。特別是,在本範例實施例中,假設第一編碼單元200的大小為4×4,因此,索引地圖500中對應第一編碼單元200的每一畫素的索引值是以4×4矩陣形式排列。 Referring to FIG. 5, afterwards, the index map establishing module 118 can use the double according to the index value corresponding to the first index pixel 208 (ie, 0) and the index value corresponding to the second index pixel 204 (ie, 1). The color mode indexes each pixel in the first encoding unit 200 to generate an index map 500. In other words, the color of each pixel of the first coding unit 200 in the index map 500 is an index value corresponding to the first index pixel 208 (ie, 0) or an index value corresponding to the second index pixel 204 (ie, 1) to present. In particular, in the present exemplary embodiment, it is assumed that the size of the first coding unit 200 is 4×4, and therefore, the index value of each pixel corresponding to the first coding unit 200 in the index map 500 is in the form of a 4×4 matrix. arrangement.

此外,在本範例實施例中,在依據索引地圖500產生對應第一編碼單元200的編碼值的操作中,編碼模組112在編碼值中僅會記錄對應第一編碼單元200的畫素之中的第1個畫素的索引值,在此,對應第一編碼單元200的畫素之中的第1個畫素的索引值相同於索引地圖500的第1行第1列個索引的索引值。 In addition, in the exemplary embodiment, in the operation of generating the code value corresponding to the first coding unit 200 according to the index map 500, the coding module 112 only records the pixels corresponding to the first coding unit 200 in the coded value. The index value of the first pixel of the first pixel unit is the same as the index value of the index of the first row and the first column of the index map 500. .

圖6A與圖6B是根據本揭露之第一範例實施例所繪示的產生編碼值的一個範例。 FIG. 6A and FIG. 6B are diagrams showing an example of generating encoded values according to the first exemplary embodiment of the present disclosure.

請參照圖6A與6B,在索引地圖建立模組118對第一編碼單元中的每一畫素進行索引編號以產生索引地圖500後,編碼模組112會依據索引地圖500產生對應第一編碼單元200的編碼值600。在本範例實施例中,編碼值600包括對應第一編碼單元200的畫素之中的第1個畫素的索引值(即,索引地圖500的第1行第1列個索引的索引值)、複製模式(CodeMode)以及跑字符的 值。舉例而言,由於索引地圖500中接續於第1個畫素(即,畫素60)之後的1個畫素(即,畫素61)的索引值相同於第1個畫素的索引值,接續於第3個畫素(即,畫素62)之後的1個畫素(即,畫素63)的索引值相同於第3個畫素的索引值,且第1個畫素的索引值不同於第3個畫素的索引值。因此,編碼模組112會在編碼值600中,使用向左複製跑模式(CopyLeftMode)610、索引地圖500的第1行第1列個索引(Index)612(即,0)與跑字符的值618來描述第一編碼單元200的第1個畫素(即,畫素60)以及接續的1個畫素(即,畫素61),例如,跑字符的值618會包括位移數(1)616。此外,編碼模組112會在編碼值600中使用向左複製跑模式620和位移數(1)626來描述第一編碼單元200中接續於上述1個畫素之後的第3個畫素(即,畫素62)以及接續的1個畫素(即,畫素63)。 Referring to FIG. 6A and FIG. 6B, after the index map creation module 118 indexes each pixel in the first coding unit to generate an index map 500, the encoding module 112 generates a corresponding first coding unit according to the index map 500. The encoded value of 200 is 600. In the present exemplary embodiment, the encoded value 600 includes an index value corresponding to the first pixel of the pixels of the first encoding unit 200 (ie, an index value of the index of the first row and the first column of the index map 500). , copy mode (CodeMode) and running characters value. For example, since the index value of one pixel (ie, pixel 61) following the first pixel (ie, pixel 60) in the index map 500 is the same as the index value of the first pixel, The index value of one pixel (ie, pixel 63) following the third pixel (ie, pixel 62) is the same as the index value of the third pixel, and the index value of the first pixel Different from the index value of the third pixel. Therefore, the encoding module 112 uses the left copy run mode (CopyLeftMode) 610, the first row and the first column index (Index) 612 (ie, 0) of the index map 500 and the value of the run character in the code value 600. 618 is used to describe the first pixel (ie, pixel 60) of the first coding unit 200 and the succeeding 1 pixel (ie, pixel 61). For example, the value 618 of the running character may include the number of displacements (1). 616. In addition, the encoding module 112 uses the left copy running mode 620 and the displacement number (1) 626 in the encoded value 600 to describe the third pixel in the first encoding unit 200 following the one pixel (ie, , pixel 62) and a subsequent pixel (ie, pixel 63).

值得一提的是,由於在本範例實施例中,索引地圖建立模組118所建立的索引地圖500是以雙顏色模式對第一編碼單元200的每一畫素進行索引編號所產生的。因此,用以描述對應第一編碼單元200的畫素62與畫素63的編碼值僅需包括向左複製跑模式620和位移數(1)626。換言之,由於索引地圖500中第1個畫素的索引值(即,畫素60)不同於第3個畫素(即,畫素62)的索引值,因此,當解碼器120接收到向左複製跑模式620和位移數(1)626時,僅需根據索引地圖500中第1個畫素的索引值(即,0),而可得知第3個畫素的索引值為1。 It is worth mentioning that, in the present exemplary embodiment, the index map 500 established by the index map creation module 118 is generated by indexing each pixel of the first coding unit 200 in a dual color mode. Therefore, the code values for describing the pixels 62 and the pixels 63 corresponding to the first coding unit 200 need only include the leftward copy mode 620 and the number of displacements (1) 626. In other words, since the index value of the first pixel in the index map 500 (ie, the pixel 60) is different from the index value of the third pixel (ie, the pixel 62), when the decoder 120 receives the leftward When the run mode 620 and the number of shifts (1) 626 are copied, it is only necessary to know that the index value of the third pixel is 1 according to the index value (ie, 0) of the first pixel in the index map 500.

在本範例實施例中,由於對應索引地圖500的第1行第2 列索引的畫素(即,畫素64)與接續的2個畫素(即,畫素65與畫素66)的索引值分別地相同於對應索引地圖500的第1行第1列索引的畫素(即,畫素60)與接續的2個畫素(即,畫素61與畫素62)的索引值。因此,編碼模組112會在編碼值600中使用向上複製跑模式(CopyAboveMode)630以及位移數(2)636來描述第一編碼單元200中對應索引地圖500的第1行第2列索引的畫素(即,畫素64)以及之後的2個畫素(即,畫素65與畫素66)。特別是,當解碼器120接收到向上複製跑模式630時,解碼器120會根據此向上複製跑模式630以及位移數(2)636得知對應索引地圖500的第1行第2列索引的畫素(即,畫素64)與接續之後的2個畫素(即,畫素65與畫素66)的索引值分別地相同於對應索引地圖的第1行第1列索引的畫素(即,畫素60)與接續的2個畫素(即,畫素61與畫素62)的索引值。 In the present exemplary embodiment, since the first row of the corresponding index map 500 is the second The index of the column index (ie, pixel 64) and the successive two pixels (ie, pixel 65 and pixel 66) are respectively the same as the index of the first row and the first column of the corresponding index map 500. The index of the pixel (ie, pixel 60) and the following two pixels (ie, pixel 61 and pixel 62). Therefore, the encoding module 112 will use the upward copy running mode (CopyAboveMode) 630 and the displacement number (2) 636 in the encoded value 600 to describe the drawing of the first row and the second column index of the corresponding index map 500 in the first encoding unit 200. Prime (ie, pixel 64) and the following two pixels (ie, pixel 65 and pixel 66). In particular, when the decoder 120 receives the upward copy run mode 630, the decoder 120 learns the picture of the first row and the second column index of the corresponding index map 500 according to the upward copy run mode 630 and the displacement number (2) 636. The prime (ie, pixel 64) and the two pixels after the continuation (ie, pixel 65 and pixel 66) have the same index value as the pixel of the first row and the first column of the corresponding index map (ie, , pixel 60) and the index value of two consecutive pixels (ie, pixel 61 and pixel 62).

由於對應索引地圖500的第4行第2列索引的畫素(即,畫素67)的索引值不同於對應索引地圖500的第4行第1列索引的畫素(即,畫素63)的索引值,並且接續於對應索引地圖500的第4行第2列索引的畫素(即,畫素67)之後的2個畫素(即,畫素68與畫素69)的索引值相同於對應索引地圖的第4行第2列索引的畫素(即,畫素67)的索引值。因此,編碼模組112會在編碼值600中使用向左複製跑模式640和位移數(2)646來描述第一編碼單元200中對應索引地圖500的第4行第2列索引的畫素(即,畫素67)以及之後的2個畫素(即,畫素68與畫素69)。換言之,當解碼器 120接收到向左複製跑模式640和位移數(2)646時,僅需根據對應索引地圖500的第4行第1列索引的索引值(即,1),即可得知對應索引地圖500的第4行第2列索引的索引值為0以及接續在畫素67之後的2個畫素(即,畫素68與畫素69)亦為0。 The index value of the pixel (ie, pixel 67) of the index of the fourth row and the second column of the corresponding index map 500 is different from the pixel of the index of the fourth row and the first column of the corresponding index map 500 (ie, pixel 63). Index value, and the two pixels following the pixel of the fourth row and second column index of the corresponding index map 500 (ie, pixel 67) (ie, pixel 68 and pixel 69) have the same index value. The index value of the pixel (ie, pixel 67) indexed in the fourth row and the second column of the corresponding index map. Therefore, the encoding module 112 will use the leftward copy running mode 640 and the displacement number (2) 646 in the encoded value 600 to describe the pixels of the fourth row and the second column index of the corresponding index map 500 in the first encoding unit 200 ( That is, the pixel 67) and the following two pixels (that is, the pixel 68 and the pixel 69). In other words, when the decoder 120 When the leftward copy mode 640 and the number of displacements (2) 646 are received, the corresponding index map 500 can be known only according to the index value (ie, 1) of the index of the fourth row and the first column of the corresponding index map 500. The index of the 4th row and 2nd column index is 0, and the 2 pixels (i.e., pixel 68 and pixel 69) following the pixel 67 are also 0.

此外,由於對應索引地圖500的第3行第3列索引的畫素(即,畫素70)與接續在對應索引地圖500的第3行第3列索引的畫素之後的3個畫素(即,畫素71、畫素72與畫素73)的索引值分別地相同於畫素66與接續的畫素之後的3個畫素(即,畫素67、畫素68與畫素69)的索引值。因此,編碼模組112會使用向上複製跑模式650以及位移數(3)656來描述第一編碼單元200中對應索引地圖500的第3行第3列索引的畫素(即,畫素70)以及接續的3個畫素(即,畫素71、畫素72與畫素73)。換言之,當解碼器120接收到向上複製跑模式650時,解碼器120會根據此向上複製跑模式650以及位移數(3)656得知對應索引地圖500的第3行第3列索引的畫素(即,畫素70)與接續的3個畫素(即,畫素71、畫素72與畫素73)的索引值分別地相同於對應索引地圖的第3行第2列索引的畫素(即,畫素66)與接續在的3個畫素(即,畫素67、畫素68與畫素69)的索引值。 In addition, since the pixels of the index of the third row and the third column of the corresponding index map 500 (ie, the pixels 70) and the pixels that follow the pixels of the index of the third row and the third column of the corresponding index map 500 ( That is, the index values of the pixel 71, the pixel 72, and the pixel 73) are respectively the same as the three pixels after the pixel 66 and the succeeding pixel (that is, the pixel 67, the pixel 68, and the pixel 69). Index value. Therefore, the encoding module 112 uses the upward copy running mode 650 and the displacement number (3) 656 to describe the pixels of the third row and third column index of the corresponding index map 500 in the first encoding unit 200 (ie, the pixel 70). And the following three pixels (ie, pixel 71, pixel 72 and pixel 73). In other words, when the decoder 120 receives the upward copy run mode 650, the decoder 120 learns the pixels of the third row and the third column index of the corresponding index map 500 according to the upward copy run mode 650 and the displacement number (3) 656. (ie, the pixel 70) and the successive three pixels (ie, the pixel 71, the pixel 72 and the pixel 73) have the same index value as the pixel of the third row and the second column index of the corresponding index map. (ie, pixel 66) and the index values of the three pixels that are connected (ie, pixel 67, pixel 68, and pixel 69).

在本範例實施例中,由於對應索引地圖500的第3行第4列索引的畫素(即,畫素74)的索引值不同於對應索引地圖500的第3行第3列索引的畫素(即,畫素70)的索引值,且接續於對應索引地圖500的第3行第4列索引的畫素(即,畫素74)之後的畫 素(即,畫素75)的索引值並不相同於畫素74的索引值。因此,編碼模組112會在編碼值600中使用向左複製跑模式660和位移數(0)666來描述第一編碼單元200中對應索引地圖500的第3行第4列索引的畫素(即,畫素74)。而當解碼器120接收到向左複製跑模式660和位移數(0)666時,僅需根據對應索引地圖500的第3行第3列索引的索引值(即,1),即可得知對應索引地圖500的第3行第4列索引的索引值為0。 In the present exemplary embodiment, the index value of the pixel (ie, pixel 74) of the index of the third row and the fourth column of the corresponding index map 500 is different from the pixel of the index of the third row and the third column of the corresponding index map 500. (ie, pixel 70) index value, and subsequent to the pixel corresponding to the index of the third row and fourth column of the corresponding index map 500 (ie, pixel 74) The index value of the prime (ie, pixel 75) is not the same as the index value of the pixel 74. Therefore, the encoding module 112 will use the leftward copy running mode 660 and the displacement number (0) 666 in the encoded value 600 to describe the pixels of the third row and the fourth column index of the corresponding index map 500 in the first encoding unit 200 ( That is, the pixel 74). When the decoder 120 receives the leftward copy mode 660 and the number of displacements (0) 666, it only needs to be based on the index value (ie, 1) of the index of the third row and the third column of the corresponding index map 500. The index of the third row and the fourth column index of the corresponding index map 500 is 0.

之後,由於對應索引地圖500的第4行第4列索引的畫素(即,畫素75)的索引值不同於畫素74的索引值。因此,編碼模組112會在編碼值600中使用向左複製跑模式670和位移數(0)676來描述第一編碼單元200中對應索引地圖500的第4行第4列索引的畫素。也就是說,當解碼器120接收到向左複製跑模式670和位移數(0)676時,僅需根據對應索引地圖500的第4行第3列索引的索引值(即,0),即可得知對應索引地圖500的第4行第4列索引的畫素的索引值為1。基於上述,由圖6A與圖6B所示之產生編碼值的範例中可得知編碼值包括第一編碼單元200的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 Thereafter, the index value of the pixel (i.e., pixel 75) of the index of the fourth row and the fourth column of the corresponding index map 500 is different from the index value of the pixel 74. Therefore, the encoding module 112 will use the left copy run mode 670 and the shift number (0) 676 in the encoded value 600 to describe the pixels of the fourth row and fourth column index of the corresponding index map 500 in the first encoding unit 200. That is, when the decoder 120 receives the leftward copy mode 670 and the number of shifts (0) 676, only the index value (ie, 0) of the index of the fourth row and the third column of the corresponding index map 500 is required, that is, It can be known that the index of the pixel of the fourth row and the fourth column index of the corresponding index map 500 is 1. Based on the above, it can be seen from the example of generating the encoded value shown in FIG. 6A and FIG. 6B that the encoded value includes the index value of the first pixel among the pixels of the first encoding unit 200, at least one copy mode, and at least The value of a run character.

值得一提的是,在上述編碼模組112依據索引地圖500產生對應第一編碼單元200的編碼值600並將編碼值600傳送至解碼器120的操作中,編碼模組112僅需記錄並傳送對應第一編碼單元200的多個畫素之中的第1個畫素的索引值,解碼器120 即可根據編碼值600中的其他資訊與第一編碼單元200中已解碼的畫素的索引值,判斷目前正在解碼的畫素的索引值,由此有效地減少編碼運算時的傳輸量並提升編碼與解碼的效能。 It is worth mentioning that, in the operation that the encoding module 112 generates the encoded value 600 corresponding to the first encoding unit 200 according to the index map 500 and transmits the encoded value 600 to the decoder 120, the encoding module 112 only needs to record and transmit. The index value corresponding to the first pixel among the plurality of pixels of the first coding unit 200, the decoder 120 The index value of the pixel currently being decoded can be determined according to the other information in the encoded value 600 and the index value of the pixel in the first encoding unit 200, thereby effectively reducing the transmission amount and improving the encoding operation. Encoding and decoding performance.

綜上,在以雙顏色模式為例的實施例中,編碼模組112會將編碼值與識別值傳送至解碼器,並且根據上述,編碼值會包括第一編碼單元200的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 In summary, in the embodiment in which the dual color mode is taken as an example, the encoding module 112 transmits the encoded value and the identification value to the decoder, and according to the above, the encoded value may include the pixels of the first encoding unit 200. The index value of the first pixel, at least one copy mode, and a value of at least one run character.

值得一提的是,本揭露並不限於使用上述雙顏色模式對第一編碼單元中的每一畫素進行索引編號。例如,在另一範例實施例中,是使用調色盤模式對第一編碼單元中的每一畫素進行索引編號來產生對應第一編碼單元的索引地圖。具體而言,在以調色盤模式為例的範例實施例中,編碼器110並不會建立上述圖3的畫素對表,例如,編碼器110是直接將編碼值、第一索引畫素的顏色與第二索引畫的顏色直接傳送給解碼器120,而非傳送對應第一索引畫素的顏色與第二索引畫的顏色的一個識別值。並且,編碼值包括第一編碼單元200的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 It is worth mentioning that the disclosure is not limited to indexing each pixel in the first coding unit using the above two-color mode. For example, in another exemplary embodiment, each pixel in the first coding unit is indexed using a palette mode to generate an index map corresponding to the first coding unit. Specifically, in the exemplary embodiment in which the palette mode is taken as an example, the encoder 110 does not establish the pixel pair table of FIG. 3 above. For example, the encoder 110 directly encodes the value, the first index pixel. The color of the second index is directly transmitted to the decoder 120 instead of transmitting an identification value corresponding to the color of the first index pixel and the color of the second index picture. And, the encoded value includes an index value of the first pixel among the pixels of the first encoding unit 200, at least one copy mode, and a value of at least one run character.

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

請參照圖7,在步驟S701中,編碼器110接收一畫面的第一編碼單元,其中第一編碼單元具有以L×L矩陣形式的多個畫素,且L為正整數。 Referring to FIG. 7, in step S701, the encoder 110 receives a first coding unit of a picture, wherein the first coding unit has a plurality of pixels in the form of an L×L matrix, and L is a positive integer.

在步驟S703中,編碼器110在多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素,並且第一索引畫素的顏色不同於第二索引畫素的顏色。舉例來說,在雙顏色模式中,編碼器110會建立畫素對表,並根據此畫素對表將對應所選出的兩個畫素的一個識別值傳送至解碼器120。而在調色盤模式中,編碼器110會直接將此兩個畫素的顏色傳送至解碼器120。 In step S703, the encoder 110 selects two pixels as the first index pixel and the second index pixel among the plurality of pixels, and the color of the first index pixel is different from the color of the second index pixel. For example, in the dual color mode, the encoder 110 creates a pixel pair table and transmits an identification value corresponding to the selected two pixels to the decoder 120 according to the pixel pair table. In the palette mode, the encoder 110 directly transmits the color of the two pixels to the decoder 120.

在步驟S705中,編碼器110對第一編碼單元中的每一畫素進行索引編號以產生索引地圖,其中在索引地圖中第一編碼單元的每一畫素的顏色是以對應第一索引畫素的索引值或對應第二索引畫素的索引值來呈現。 In step S705, the encoder 110 performs index numbering on each pixel in the first coding unit to generate an index map, wherein the color of each pixel of the first coding unit in the index map is drawn by the corresponding first index. The index value of the prime or the index value corresponding to the second index pixel is presented.

在步驟S707中,編碼器110依據索引地圖產生對應第一編碼單元的編碼值,其中在編碼值中僅記錄對應第一編碼單元的畫素之中的第1個畫素的索引值,即在索引地圖中僅對應第一編碼單元的畫素之中的第1個畫素的索引值被記錄在編碼值中。 In step S707, the encoder 110 generates an encoded value corresponding to the first coding unit according to the index map, wherein only the index value of the first pixel in the pixel corresponding to the first coding unit is recorded in the encoded value, that is, Only the index value of the first pixel among the pixels corresponding to the first coding unit in the index map is recorded in the code value.

圖8A與圖8B為根據本揭露第一範例實施例所繪示的解碼的程式碼。 8A and FIG. 8B are decoded code diagrams according to the first exemplary embodiment of the disclosure.

請參照圖8A與圖8B,在解碼操作中,解碼器120可以根據圖8A所示的程式碼中的方程式來決定是否使用雙顏色模式來進行解碼。其中參數“slice_bi_sample_mode_enable_flag”用以指示是否使用雙顏色模式,例如,當“slice_bi_sample_mode_enable_flag”的值被設為1時,解碼器120會使用雙顏色模式對目前欲進行解碼之畫面進行解碼的操 作。接著,解碼器120會根據圖8B所示的程式碼中的方程式來決定是否使用雙顏色模式來對目前欲進行解碼之編碼單元進行解碼的操作。例如,當“bi_sample_flag”的值被設為1時,解碼器120會使用雙顏色模式對目前欲進行解碼之編碼單元進行解碼的操作。值得一提的是,本揭露不限於此,例如,在另一範例實施例中,解碼器120是使用調色盤模式對目前欲進行解碼之畫面進行解碼的操作。特別是,上述“slice_bi_sample_mode_enable_flag”的值也可以被預設為1,當預設為1時,解碼器120會於解碼操作中省略判斷“slice_bi_sample_mode_enable_flag”的值的步驟。 Referring to FIG. 8A and FIG. 8B, in the decoding operation, the decoder 120 may decide whether to use the dual color mode for decoding according to the equation in the code shown in FIG. 8A. The parameter "slice_bi_sample_mode_enable_flag" is used to indicate whether to use the dual color mode. For example, when the value of "slice_bi_sample_mode_enable_flag" is set to 1, the decoder 120 uses the dual color mode to decode the picture currently being decoded. Work. Next, the decoder 120 determines whether to use the dual color mode to decode the coding unit currently to be decoded according to the equation in the code shown in FIG. 8B. For example, when the value of "bi_sample_flag" is set to 1, the decoder 120 uses the dual color mode to decode the coding unit currently to be decoded. It is to be noted that the disclosure is not limited thereto. For example, in another exemplary embodiment, the decoder 120 is an operation of decoding a picture currently to be decoded using a palette mode. In particular, the value of the above "slice_bi_sample_mode_enable_flag" may also be preset to 1, and when the preset is 1, the decoder 120 may omit the step of determining the value of "slice_bi_sample_mode_enable_flag" in the decoding operation.

請再參照圖8B,在解碼器120依據編碼值重建索引地圖的操作中,解碼器120是根據第1行第1列個索引畫素的索引值、複製模式(向上複製跑模式或向左複製跑模式)、跑字符的值來重建索引地圖,且解碼器120是根據圖8B所示的程式碼中的方程式來決定使用向上複製跑模式或向左複製跑模式來重建索引地圖。具體而言,當參數“palette_run_type_flag”被設為1時,解碼器120會使用向上複製跑模式來重建索引地圖中的畫素,並且根據參數“palette_run”來決定位移數,其中使用向上複製跑模式所重建的畫素會與索引地圖之上一列中對應位移數的至少兩個畫素相同。反之,當參數“palette_run_type_flag”被設為0時,解碼器120會使用向左複製跑模式來描述正在編碼的編碼單元中的畫素,並且根據參數“palette_run”來決定位移數,其中使用向左複製跑模式所重建的畫素會與索引地圖中接續於此畫素之後的對應位移數 的至少一個畫素相同。此外,如上所述,在本揭露中,所建立的索引地圖中的編碼單元中的畫素的顏色是以兩個索引畫素的索引值來呈現。例如,方程式中的參數“bi_sample_idx”是用來表示多個候選索引畫素的索引值,而參數“palette_index”是用來表示從多個候選索引畫素中所選擇之上述兩個索引畫素的索引值。特別是,在本揭露中,編碼器110是透過參數“palette_index”將索引地圖中對應第一行第一列之索引畫素的索引值傳送至解碼器120,據此,解碼器120即可根據編碼值中的其他資訊與編碼單元中已解碼的畫素的索引值,判斷目前正在解碼的畫素的索引值。 Referring to FIG. 8B again, in the operation of the decoder 120 reconstructing the index map according to the encoded value, the decoder 120 is based on the index value of the index elements in the first row and the first column, the copy mode (upward copy run mode or copy to the left) Run mode), run the value of the character to reconstruct the index map, and the decoder 120 decides to reconstruct the index map using the up copy run mode or the left copy run mode according to the equation in the code shown in FIG. 8B. Specifically, when the parameter "palette_run_type_flag" is set to 1, the decoder 120 uses the up copy run mode to reconstruct the pixels in the index map, and determines the number of shifts according to the parameter "palette_run", in which the up copy run mode is used. The reconstructed pixels will be the same as at least two pixels of the corresponding number of displacements in a column above the index map. Conversely, when the parameter "palette_run_type_flag" is set to 0, the decoder 120 uses the leftward copy mode to describe the pixels in the coding unit being encoded, and determines the number of displacements according to the parameter "palette_run", wherein the left is used. The number of displacements after the pixel reconstructed in the copy mode and the index map are continued after this pixel At least one of the pixels is the same. Further, as described above, in the present disclosure, the color of the pixels in the coding unit in the established index map is presented with the index values of the two index pixels. For example, the parameter "bi_sample_idx" in the equation is an index value for indicating a plurality of candidate index pixels, and the parameter "palette_index" is used to represent the above two index pixels selected from a plurality of candidate index pixels. Index value. In particular, in the disclosure, the encoder 110 transmits the index value of the index pixel of the first row and the first column in the index map to the decoder 120 through the parameter “palette_index”, according to which the decoder 120 can be The other information in the encoded value and the index value of the decoded pixel in the coding unit determine the index value of the pixel currently being decoded.

圖9A為根據本揭露第一範例實施例所繪示的以向左複製跑模式為例之對編碼單元進行掃描的程式碼,在此範例實施例中,將假設目前正在解碼的畫素所使用的複製模式為向左複製跑模式,其中複製模式以圖9A中的參數“CodeMode”表示,複製模式中的向左複製跑模式則以圖9A中的參數“CopyLeftMode”表示。 FIG. 9A is a code diagram of scanning a coding unit by using a leftward copy mode as an example according to the first exemplary embodiment of the present disclosure. In this exemplary embodiment, it is assumed that a pixel currently being decoded is used. The copy mode is a copy mode to the left, wherein the copy mode is represented by the parameter "CodeMode" in Fig. 9A, and the left copy run mode in the copy mode is represented by the parameter "CopyLeftMode" in Fig. 9A.

請參照圖9A,在本範例實施例中,解碼器120的解碼模組124並不侷限於使用特定的掃描方式來對畫面中之編碼單元進行掃描與解碼。例如,在一範例實施例中,解碼模組124可使用Z軸掃描(Z-scan)對畫面中之編碼單元進行掃描與解碼,而在另一範例實施例中,解碼模組124是使用水平交叉掃描(Horizontal traverse scan)或垂直交叉掃描(Vertical traverse scan)對畫面中之編碼單元進行掃描與解碼。具體而言,圖9A中所示之程式碼是將對 應水平交叉掃描之坐標與對應垂直交叉掃描之坐標轉換成對應Z軸掃描之坐標來對畫面中之編碼單元進行掃描與解碼的操作,以下將參照圖9A,以目前正在解碼的畫素所使用的複製模式為向左複製跑模式(即,“CopyLeftMode”)的範例來進行說明。 Referring to FIG. 9A, in the exemplary embodiment, the decoding module 124 of the decoder 120 is not limited to scanning and decoding the coding units in the picture by using a specific scanning manner. For example, in an exemplary embodiment, the decoding module 124 can scan and decode the coding units in the picture using Z-scan (Z-scan), and in another exemplary embodiment, the decoding module 124 is used horizontally. A horizontal traverse scan or a vertical traverse scan scans and decodes coding units in a picture. Specifically, the code shown in Figure 9A is correct. The operation of scanning and decoding the coding unit in the picture should be performed by converting the coordinates of the horizontal cross scan and the coordinates of the corresponding vertical cross scan into the coordinates of the corresponding Z-axis scan. Referring to FIG. 9A, the pixel currently being decoded is used. The copy mode is an example of copying the run mode to the left (ie, "CopyLeftMode").

在本範例實施例中,索引地圖中對應一個編碼單元的每一畫素的索引值是以L×L矩陣形式排列,在此,如圖9所示,假設索引地圖中已被掃描的索引的個數為c。例如,當解碼模組124解碼對應索引地圖中所掃描的第1個索引的畫素時(即,c=1時),解碼模組124是根據索引地圖的第1個索引、跑字符的值重建索引地圖。此外,當解碼模組124解碼對應索引地圖中所掃描的第c個索引的畫素時(例如,1<c<=L時),解碼模組124會將所掃描的第c個索引的索引值(即,正在解碼的索引值)轉換為座標(x,y),以及將已掃描的第c-1個索引的索引值轉換為座標(m,n)。接著,解碼模組124根據索引地圖中已掃描的第c-1個索引和跑字符的值重建索引地圖,特別是,索引地圖中所掃描的第c個索引的值(即,Index(x,y))為對應座標(m,n)的索引值(即,Index(m,n))加1後除以2所獲得的餘數。 In this exemplary embodiment, the index value of each pixel corresponding to one coding unit in the index map is arranged in an L×L matrix form. Here, as shown in FIG. 9 , it is assumed that the index of the index map has been scanned. The number is c. For example, when the decoding module 124 decodes the pixels of the first index scanned in the corresponding index map (that is, when c=1), the decoding module 124 is based on the first index of the index map and the value of the running character. Rebuild the index map. In addition, when the decoding module 124 decodes the pixels of the c-th index scanned in the corresponding index map (for example, when 1<c<=L), the decoding module 124 indexes the scanned c-th index. The value (ie, the index value being decoded) is converted to a coordinate (x, y), and the index value of the scanned c-1 index is converted into a coordinate (m, n). Next, the decoding module 124 reconstructs the index map according to the scanned value of the c-1 index and the running character in the index map, in particular, the value of the c-th index scanned in the index map (ie, Index(x, y)) The remainder obtained by dividing 1 by the index value of the corresponding coordinate (m, n) (ie, Index(m, n)) by dividing by 2.

在另一範例實施例中,當解碼模組124解碼對應索引地圖中所掃描的第c個索引的畫素時(例如,c>L時),解碼模組124會將索引地圖中所掃描的第c個索引轉換為座標(x,y),將已掃描的第c-1個索引轉換為座標(m,n),以及將已掃描的第c-L個索引轉換為座標(p,q)。此外,解碼模組124還會判斷對應第c-1個索 引的複製模式是使用向上複製跑模式或向左複製跑模式來解碼對應索引地圖中所掃描的第c-1個索引的畫素。倘若當第c-1個索引的複製模式為使用向左複製跑模式解碼對應索引地圖中所掃描的第c-1個索引的畫素時,解碼模組124會根據已掃描的第c-1個索引和跑字符的值重建索引地圖,其中索引地圖中所掃描的第c個索引的值(即,Index(x,y))為對應座標(m,n)的索引值(即,Index(m,n))加1後除以2所獲得的餘數。反之,在另一範例實施例中,倘若上述對應第c-1個索引的複製模式為使用向上複製跑模式(即,”CopyAboveMode”)解碼對應索引地圖中所掃描的第c-1個索引的畫素時,解碼模組124會根據索引地圖中已掃描的第c-L個索引和跑字符的值重建索引地圖,其中索引地圖中所掃描的第c個索引的值(即,Index(x,y))為對應座標(p,q)的索引值(即,Index(p,q))加1後除以2所獲得的餘數。然而,值得注意的是,本揭露並不限於此。 In another exemplary embodiment, when the decoding module 124 decodes the pixels of the c-th index scanned in the corresponding index map (for example, when c>L), the decoding module 124 scans the index map. The c-th index is converted into coordinates (x, y), the scanned c-1th index is converted into coordinates (m, n), and the scanned c-th index is converted into coordinates (p, q). In addition, the decoding module 124 also determines that the corresponding c-1 cable The copied mode is to use the up copy run mode or the left copy run mode to decode the pixels of the c-1th index scanned in the corresponding index map. If the copy mode of the c-1th index is to use the left copy mode to decode the pixel of the c-1th index scanned in the corresponding index map, the decoding module 124 will be based on the scanned c-1. The index and the value of the running character reconstruct the index map, wherein the value of the c-th index scanned in the index map (ie, Index(x, y)) is an index value of the corresponding coordinate (m, n) (ie, Index ( m, n)) The remainder obtained by dividing by 2 and dividing by 2. On the other hand, in another exemplary embodiment, if the copy mode corresponding to the c-1th index is used to decode the c-1 index scanned in the corresponding index map by using the upward copy run mode (ie, "CopyAboveMode") When the pixel is used, the decoding module 124 reconstructs the index map according to the scanned cL index and the running character value in the index map, wherein the index of the c-th index scanned in the index map (ie, Index(x, y) )) is the remainder obtained by adding 1 to the index value of the corresponding coordinate (p, q) (ie, Index(p, q)) and dividing by 2. However, it is worth noting that the disclosure is not limited thereto.

圖9B為根據本揭露第一範例實施例所繪示的以向上複製跑模式為例之對編碼單元進行掃描的程式碼,在此範例實施例中,將假設目前正在解碼的畫素所使用的複製模式為向上複製跑模式,其中複製模式以圖9B中的參數“CodeMode”表示,複製模式中的位移數則以圖9B中的參數“run”表示。請參照圖9B,在此範例實施例中,由於目前正在解碼的畫素所使用的複製模式為向上複製跑模式,因此,當解碼模組124接收到的複製模式為向上複製跑模式(即,”CopyAboveMode”)時,解碼模組124僅需 根據代表向上複製跑模式以及位移數在欲重建之索引地圖中複製對應的畫素的索引值來重建索引地圖即可。例如,解碼模組124會將索引地圖中所掃描的第c個索引轉換為座標(x,y),將已掃描的第c-L個索引轉換為座標(p,q),並且根據位移數“run”的值將索引地圖中目前所掃描的第c個索引的值(即,Index(x,y))設為對應座標(p,q)的索引值(即,Index(p,q))。以下將參照圖6A與圖10A~圖10G,以根據編碼值重建索引地圖的範例來進行說明。 FIG. 9B is a code diagram of scanning a coding unit in an example of an upward copy run mode according to the first exemplary embodiment of the present disclosure. In this exemplary embodiment, a pixel that is currently being decoded is assumed to be used. The copy mode is an upward copy run mode in which the copy mode is represented by the parameter "CodeMode" in Fig. 9B, and the number of shifts in the copy mode is represented by the parameter "run" in Fig. 9B. Referring to FIG. 9B, in this exemplary embodiment, since the copy mode used by the pixel currently being decoded is the upward copy run mode, when the decoding mode received by the decoding module 124 is the upward copy run mode (ie, "CopyAboveMode"), the decoding module 124 only needs The index map can be reconstructed by copying the index value of the corresponding pixel in the index map to be reconstructed according to the representative copy-up run mode and the number of displacements. For example, the decoding module 124 converts the c-th index scanned in the index map into coordinates (x, y), converts the scanned c-th index into coordinates (p, q), and according to the displacement number "run" The value of "the index of the c-th index currently scanned in the index map (ie, Index(x, y)) is set to the index value of the corresponding coordinate (p, q) (ie, Index(p, q)). Hereinafter, an example in which an index map is reconstructed based on coded values will be described with reference to FIGS. 6A and 10A to 10G.

圖10A~圖10G是根據本揭露之第一範例實施例所繪示的根據編碼值重建索引地圖的一個範例。 FIG. 10A to FIG. 10G are diagrams showing an example of reconstructing an index map according to an encoded value according to a first exemplary embodiment of the present disclosure.

請參照圖10A與圖6A,在本範例實施例中,解碼器120的解碼模組124會根據編碼值接收模組122所接收的編碼值600重建對應第一編碼單元的索引地圖。由於索引地圖500中對應第一編碼單元200的每一畫素的索引值是以4×4矩陣形式排列,且編碼值600中所記錄的第1個畫素的索引值為索引地圖500的第1行第1列個索引(即,0)。因此,解碼模組124會根據編碼值600的向左複製跑模式610、索引地圖500的第1行第1列個索引612和位移數(1)616在欲重建的索引地圖900中將對應第一編碼單元200的第1個畫素的索引值記錄為0以及將對應接續於此第1個畫素之後的1個畫素的索引值亦記錄為0。 Referring to FIG. 10A and FIG. 6A, in the exemplary embodiment, the decoding module 124 of the decoder 120 reconstructs the index map corresponding to the first coding unit according to the code value 600 received by the code value receiving module 122. Since the index value of each pixel corresponding to the first coding unit 200 in the index map 500 is arranged in a 4×4 matrix form, and the index value of the first pixel recorded in the encoded value 600 is the index map 500. 1 row of the first column index (ie, 0). Therefore, the decoding module 124 will copy the running mode 610 according to the encoding value 600, the first row, the first column index 612 and the displacement number (1) 616 of the index map 500 in the index map 900 to be reconstructed. The index value of the first pixel of one coding unit 200 is recorded as 0, and the index value of one pixel subsequent to the first pixel is also recorded as 0.

請參照圖10B與圖6A,解碼模組124會根據向左複製跑模式620和位移數(1)626得知索引地圖900中接續於第1個畫素之後的1個畫素的索引值相同於第1個畫素的索引值,而接續於 第3個畫素之後的1個畫素的索引值相同於第3個畫素的索引值,且第1個畫素的索引值不同於第3個畫素的索引值。例如,解碼模組124是將索引地圖500中第2行第1列個畫素的索引值(即,0)加1後除以2獲得的餘數視為第3行第1列個畫素的索引值(即,1)。因此,解碼模組124會根據此第2行第1列個畫素的索引值,而在索引地圖900中將對應第一編碼單元200中第3行第1列個畫素的索引值以及對應接續於此第3個畫素之後的1個畫素的索引值皆記錄為1。 Referring to FIG. 10B and FIG. 6A, the decoding module 124 learns that the index values of one pixel after the first pixel in the index map 900 are the same according to the left copy running mode 620 and the number of displacements (1) 626. The index value of the first pixel, followed by The index value of one pixel after the third pixel is the same as the index value of the third pixel, and the index value of the first pixel is different from the index value of the third pixel. For example, the decoding module 124 is to add the remainder of the index value (ie, 0) of the second row and the first column of the index map 500 to the first row of pixels in the third row and the first column. The index value (ie, 1). Therefore, the decoding module 124 will correspond to the index value of the third row and the first column of the first coding unit 200 in the index map 900 according to the index value of the second row and the first column of pixels. The index value of one pixel following the third pixel is recorded as 1.

請參照圖10C與圖6A,接著,解碼模組124會根據向上複製跑模式630以及位移數(2)636得知對應索引地圖900的第1行第2列索引的畫素的索引值與接續在對應索引地圖900的第1行第2列索引的畫素之後的2個畫素的索引值分別地相同於對應索引地圖900的第1行第1列索引的畫素與接續在對應索引地圖900的第1行第1列索引的畫素之後的2個畫素的索引值。例如,解碼模組124僅需要複製對應索引地圖900的第1行第1列索引的畫素與接續在對應索引地圖900的第1行第1列索引的畫素之後的2個畫素的索引值來作為對應索引地圖900的第1行第2列索引的畫素的索引值與接續在對應索引地圖900的第1行第2列索引的畫素之後的2個畫素的索引值。因此,解碼模組124會在索引地圖900中將對應第一編碼單元200中對應索引地圖的第1行第2列索引的畫素的索引值以及對應索引地圖900的第1行第2列索引的畫素之後的2個畫素的索引值分別記錄為0、0與1。 Referring to FIG. 10C and FIG. 6A , the decoding module 124 then learns the index value and the connection of the pixels of the first row and the second column index of the corresponding index map 900 according to the upward copy running mode 630 and the displacement number ( 2 ) 636 . The index values of the two pixels after the pixel corresponding to the index of the first row and the second column of the index map 900 are respectively the same as the pixels of the index of the first row and the first column of the corresponding index map 900 and the contiguous index map. The index value of the two pixels after the pixel of the index in the first row and the first column of 900. For example, the decoding module 124 only needs to copy the pixels of the first row and the first column index of the corresponding index map 900 and the two pixels of the pixel after the pixel of the index of the first row and the first column of the corresponding index map 900. The value is the index value of the pixel corresponding to the first row and the second column index of the index map 900 and the index values of the two pixels following the pixel of the index of the first row and the second column of the corresponding index map 900. Therefore, the decoding module 124 maps the index value of the pixel corresponding to the first row and the second column index of the corresponding index map in the first coding unit 200 and the index of the first row and the second column of the corresponding index map 900 in the index map 900. The index values of the two pixels after the pixels are recorded as 0, 0, and 1, respectively.

請參照圖10D與圖6A,解碼模組124會根據向左複製跑模式640和位移數(2)646得知對應索引地圖900的第4行第2列索引的畫素的索引值不同於對應索引地圖900的第4行第1列索引的畫素的索引值,並且接續於對應索引地圖900的第4行第2列索引的畫素之後的2個畫素的索引值是相同於對應索引地圖900的第4行第2列索引的畫素的索引值。例如,解碼模組124是將索引地圖500中第4行第1列個畫素的索引值(即,1)加1後除以2獲得的餘數視為第4行第2列索引的索引值(即,0)。因此,解碼模組124會接著在索引地圖900中將對應第一編碼單元200中對應索引地圖900的第4行第2列索引的畫素的索引值記錄為0以及在對應索引地圖900的第4行第2列索引的畫素之後的2個畫素的索引值也記錄為0。 Referring to FIG. 10D and FIG. 6A, the decoding module 124 learns that the index value of the pixel of the fourth row and the second column index of the corresponding index map 900 is different from the corresponding one according to the left copy running mode 640 and the displacement number (2) 646. The index value of the pixel of the index of the fourth row and the first column of the index map 900, and the index values of the two pixels following the pixel of the index of the fourth row and the second column of the corresponding index map 900 are the same as the corresponding index. The index value of the pixel of the index in the fourth row and the second column of the map 900. For example, the decoding module 124 is to use the remainder obtained by dividing the index value (ie, 1) of the fourth row and the first column of the index map 500 in the index map 500 by 2 to be the index value of the index of the fourth row and the second column. (ie, 0). Therefore, the decoding module 124 then records, in the index map 900, the index value of the pixel corresponding to the fourth row and the second column index of the corresponding index map 900 in the first encoding unit 200 as 0 and the corresponding index map 900. The index values of the two pixels after the pixels of the 4th column and the 2nd column index are also recorded as 0.

請參照圖10E與圖6A,解碼模組124會根據所接收的編碼值中的向上複製跑模式650以及位移數(3)656得知對應索引地圖900的第3行第3列索引的畫素的索引值與接續在對應索引地圖900的第3行第3列索引的畫素之後的3個畫素的索引值分別地相同於對應索引地圖900的第3行第2列索引的畫素與接續在對應索引地圖900的第3行第2列索引的畫素之後的3個畫素的索引值。例如,解碼模組124僅需要複製對應索引地圖900的第3行第2列索引的畫素與接續在對應索引地圖900的第3行第2列索引的畫素之後的3個畫素的索引值來作為對應索引地圖900的第3行第3列索引的畫素的索引值與接續在對應索引地圖900的 第3行第3列索引的畫素之後的3個畫素的索引值。因此,解碼模組124會在索引地圖900中將對應第一編碼單元200中對應索引地圖900的第3行第3列索引的畫素的索引值以及在對應索引地圖900的第3行第3列索引的畫素之後的3個畫素的索引值分別記錄為1、0、0與0。 Referring to FIG. 10E and FIG. 6A, the decoding module 124 learns the pixel of the third row and the third column index of the corresponding index map 900 according to the upward copy running mode 650 and the displacement number (3) 656 in the received encoded value. The index value of the three pixels subsequent to the pixel following the index of the third row and the third column of the corresponding index map 900 is the same as the pixel of the index of the third row and the second column of the corresponding index map 900. The index values of the three pixels following the pixel of the index in the third row and the second column of the index map 900 are successively connected. For example, the decoding module 124 only needs to copy the pixels of the third row and the second column index of the corresponding index map 900 and the indices of the three pixels that follow the pixels of the third row and the second column index of the corresponding index map 900. The value is used as the index value of the pixel of the index of the third row and the third column of the corresponding index map 900 and the continuation of the corresponding index map 900. The index value of the three pixels after the pixel of the index in the third row and the third column. Therefore, the decoding module 124 sets the index value of the pixel corresponding to the index of the third row and the third column of the corresponding index map 900 in the first coding unit 200 and the third row of the corresponding index map 900 in the index map 900. The index values of the three pixels after the pixels of the column index are recorded as 1, 0, 0, and 0, respectively.

請參照圖10F與圖6A,解碼模組124根據所接收的向左複製跑模式660和位移數(0)666得知對應索引地圖900的第3行第4列索引的畫素的索引值不同於對應索引地圖900的第3行第3列索引的畫素的索引值。例如,解碼器120是將索引地圖500中第3行第3列個畫素的索引值(即,1)加1後除以2獲得的餘數視為第3行第4列索引的索引值(即,0)。因此,解碼模組112會在索引地圖900中將對應第一編碼單元200中對應索引地圖900的第3行第4列索引的畫素的索引值記錄為0。 Referring to FIG. 10F and FIG. 6A , the decoding module 124 learns that the index values of the pixels of the third row and the fourth column index of the corresponding index map 900 are different according to the received left copy run mode 660 and the number of shifts (0) 666. The index value of the pixel indexed in the third row and the third column of the corresponding index map 900. For example, the decoder 120 is the index obtained by adding 1 to the index value (ie, 1) of the third row and the third column of the index map 500, and dividing by 2 to be the index value of the index of the third row and the fourth column ( That is, 0). Therefore, the decoding module 112 records the index value of the pixel corresponding to the index of the third row and the fourth column of the corresponding index map 900 in the first coding unit 200 to 0 in the index map 900.

請參照圖10G與圖6A,解碼模組124會根據所接收的向左複製跑模式670和位移數(0)676得知對應索引地圖900的第4行第4列索引的畫素的索引值不同於對應索引地圖900的第4行第3列索引的畫素的索引值。例如,解碼器120是將索引地圖500中第4行第3列個畫素的索引值(即,0)加1後除以2獲得的餘數視為第4行第4列索引的索引值(即,1)。因此,解碼模組124會在索引地圖900中將對應第一編碼單元200中對應索引地圖900的第4行第4列索引的畫素的索引值記錄為1。 Referring to FIG. 10G and FIG. 6A , the decoding module 124 learns the index value of the pixel of the fourth row and the fourth column index of the corresponding index map 900 according to the received left copy run mode 670 and the number of displacements (0) 676. It is different from the index value of the pixel of the index of the fourth row and the third column of the corresponding index map 900. For example, the decoder 120 is the index obtained by dividing the index value (ie, 0) of the fourth row and the third column of the index map 500 by 1 and dividing by 2 as the index value of the index of the fourth row and the fourth column ( That is, 1). Therefore, the decoding module 124 records the index value of the pixel corresponding to the fourth row and the fourth column index of the corresponding index map 900 in the first coding unit 200 to 1 in the index map 900.

在本範例實施例中,解碼器120中亦記錄了對應於編碼 器110之畫素對表300(如圖3所示),因此,解碼模組124會根據編碼值接收模組122所接收的對應第一索引畫素與第二索引畫素的識別值從畫素對表300中識別第一索引畫素的顏色與第二索引畫素的顏色。例如,編碼值接收模組122所接收的識別值為3,因此,解碼模組124根據此識別值從畫素對表300中可得知第一索引畫素與第二索引畫素分別為畫素208與畫素204,並且畫素208與畫素204的顏色分別為C1與C2。此後,解碼模組124可根據索引地圖900與對應第一索引畫素與第二索引畫素的顏色重建第一編碼單元200的多個畫素。 In the present exemplary embodiment, the decoder 120 also records the corresponding code. The pixel of the device 110 is paired with the table 300 (as shown in FIG. 3). Therefore, the decoding module 124 receives the identification value corresponding to the first index pixel and the second index pixel received by the module 122 according to the code value. The color of the first index pixel and the color of the second index pixel are identified in the table 300. For example, the identifier value received by the code value receiving module 122 is 3. Therefore, the decoding module 124 can learn from the pixel pair table 300 that the first index pixel and the second index pixel are respectively drawn according to the identification value. The pixels 208 and the pixels 204, and the colors of the pixels 208 and 204 are C1 and C2, respectively. Thereafter, the decoding module 124 may reconstruct the plurality of pixels of the first encoding unit 200 according to the index map 900 and the color of the corresponding first index pixel and the second index pixel.

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

請參照圖11,在步驟S1001中,解碼器120接收對應每一組畫素對之顏色的識別值或第一索引畫素的顏色與第二索引畫素的顏色,以及對應第一編碼單元的編碼值,並且第一編碼單元具有以L×L矩陣形式的多個畫素,其中L為正整數。 Referring to FIG. 11, in step S1001, the decoder 120 receives the identification value corresponding to the color of each set of pixel pairs or the color of the first index pixel and the color of the second index pixel, and the corresponding first coding unit. The value is encoded, and the first coding unit has a plurality of pixels in the form of an L×L matrix, where L is a positive integer.

在步驟S1003中,解碼器120根據編碼值中的索引值、至少一複製模式以及至少一跑字符的值重建對應第一編碼單元的索引地圖,其中所接收的編碼值內的索引值僅包括索引地圖中的第一編碼單元的第1個畫素的索引值。 In step S1003, the decoder 120 reconstructs an index map corresponding to the first coding unit according to the index value in the encoded value, the at least one copy mode, and the value of the at least one running character, wherein the index value in the received encoded value includes only the index. The index value of the first pixel of the first coding unit in the map.

在步驟S1005中,解碼器120根據第一索引畫素的顏色、第二索引畫素的顏色與索引地圖的多個索引值重建第一編碼單元的多個畫素,並且第一索引畫素的顏色不同於第二索引畫素的顏 色。 In step S1005, the decoder 120 reconstructs a plurality of pixels of the first coding unit according to the color of the first index pixel, the color of the second index pixel, and the plurality of index values of the index map, and the first index pixel The color is different from the second index pixel color.

[第二範例實施例] [Second exemplary embodiment]

第二範例實施例的編碼方法與解碼方法及其系統本質上是相同於第一範例實施例的編碼方法與解碼方法及其系統,其差異之處為在第二範例實施例中是以統計與量化的方法選出兩個畫素作為第一索引畫素與第二索引畫素。以下將使用第一範例實施例的系統及元件標號來說明第二範例實施例與第一範例實施例的差異之處。 The encoding method and decoding method of the second exemplary embodiment and the system thereof are essentially the same as the encoding method and decoding method of the first exemplary embodiment and the system thereof, and the difference is that in the second exemplary embodiment, the statistical method is The quantized method selects two pixels as the first index pixel and the second index pixel. The system and component numbers of the first exemplary embodiment will be used below to explain the differences between the second exemplary embodiment and the first exemplary embodiment.

圖12是根據本揭露之第二範例實施例所繪示的影像編碼運作示意圖。 FIG. 12 is a schematic diagram of an image encoding operation according to a second exemplary embodiment of the present disclosure.

請參照圖12,相同於第一範例實施例,編碼模組112會在第一編碼單元200的鄰近範圍內的多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。然而,本揭露並不限於此,例如,在另一範例實施例中,編碼模組112亦可從畫面中所有畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。在此假設編碼模組112所接收的一畫面中第一編碼單元200的大小為L×L,且L為正整數。特別是,在本範例實施例中,鄰近範圍包括的鄰近於第一編碼單元200的至少一第二編碼單元220中鄰近於第一編碼單元200的多個畫素(以下稱為第三畫素)。在此,多個第三畫素所屬的範圍為鄰近範圍1000。也就是說,編碼模組112是從鄰近範圍1000內的多個第三畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。值得注意的是,第一編碼單元200與至少一第 二編碼單元220所在的畫面的解碼順序中,在第一編碼單元200被解碼之前至少一第二編碼單元220為已經被解碼的編碼單元。換言之,鄰近範圍不包括目前正在編碼的編碼單元以及/或在解碼過程中在目前正在編碼的編碼單元之後才會被解碼的區域。然而,本揭露並不加以限制鄰近範圍的區域,例如,在另一範例實施例中,鄰近範圍亦可包括目前欲編碼的編碼單元以及/或畫面中未解碼的區域。 Referring to FIG. 12, in the same manner as the first exemplary embodiment, the encoding module 112 selects two pixels from the plurality of pixels in the vicinity of the first encoding unit 200 as the first index pixel and the second index. Prime. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the encoding module 112 may also select two pixels from all the pixels in the picture as the first index pixel and the second index pixel. It is assumed here that the size of the first coding unit 200 in a picture received by the coding module 112 is L×L, and L is a positive integer. In particular, in the present exemplary embodiment, the neighboring range includes a plurality of pixels adjacent to the first encoding unit 200 in the at least one second encoding unit 220 adjacent to the first encoding unit 200 (hereinafter referred to as a third pixel) ). Here, the range in which the plurality of third pixels belong is the proximity range 1000. That is to say, the encoding module 112 selects two pixels from the plurality of third pixels in the adjacent range 1000 as the first index pixel and the second index pixel. It is worth noting that the first coding unit 200 and at least one In the decoding order of the picture in which the two coding unit 220 is located, at least one second coding unit 220 is a coding unit that has been decoded before the first coding unit 200 is decoded. In other words, the proximity range does not include the coding unit currently being coded and/or the area that will be decoded after the coding unit 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 coding units that are currently to be encoded and/or undecoded areas in the picture.

圖13A與圖13B是根據本揭露之第二範例實施例所繪示的畫素分群運作示意圖。 13A and FIG. 13B are schematic diagrams of pixel group operation according to a second exemplary embodiment of the present disclosure.

請參照圖13A,在本範例實施例中,在第一編碼單元200的鄰近範圍1000內的多個第三畫素中選出兩個畫素作為第一索引畫素與第二索引畫素的操作中,顏色選擇模組114會根據此鄰近範圍1000內的多個第三畫素的畫素值將此些畫素分群為多個叢集。舉例而言,假設第一編碼單元200的大小為4×4,則鄰近範圍1000內會具有9個第三畫素。顏色選擇模組114是根據此些畫素的畫素值將顏色相同的畫素分群至同一個叢集內。例如,屬於叢集1102的2個畫素具有相同的畫素值且此2個畫素的顏色為C1,屬於叢集1104的5個畫素具有相同的畫素值且此5個畫素的顏色為C2,而屬於叢集1106與叢集1108的畫素並沒有與其畫素值相同的其他畫素且屬於叢集1106的1個畫素與叢集1108的1個畫素的顏色分別為C4與C5。接著,顏色選擇模組114會依據對應每一叢集的畫素的數量選擇一第一叢集與一第二叢集。在此,由 於叢集1104的畫素的數量與叢集1102的畫素的數量皆大於叢集之中的其他叢集的畫素的數量,因此,顏色選擇模組114會選擇叢集1104作為第一叢集,以及選擇叢集1102作為第二叢集並且以第一叢集中的一個畫素作為第一索引畫素,以第二叢集中的一個畫素作為第二索引畫素。值得一提的是,本揭露並不加以限制畫素分群的方法,例如,在另一範例實施例中,顏色選擇模組114是將畫素值相近的畫素分群至同一個叢集內。 Referring to FIG. 13A, in the exemplary embodiment, two pixels are selected as the first index pixel and the second index pixel in the plurality of third pixels in the proximity range 1000 of the first encoding unit 200. The color selection module 114 groups the pixels into a plurality of clusters according to the pixel values of the plurality of third pixels in the proximity range 1000. For example, assuming that the size of the first coding unit 200 is 4×4, there will be 9 third pixels in the adjacent range 1000. The color selection module 114 groups the pixels of the same color into the same cluster according to the pixel values of the pixels. For example, the two pixels belonging to the cluster 1102 have the same pixel value and the colors of the two pixels are C1, and the five pixels belonging to the cluster 1104 have the same pixel value and the colors of the five pixels are C2, and the pixels belonging to the cluster 1106 and the cluster 1108 do not have other pixels having the same pixel value, and the pixels belonging to the cluster 1106 and the pixels of the cluster 1108 are respectively C4 and C5. Then, the color selection module 114 selects a first cluster and a second cluster according to the number of pixels corresponding to each cluster. Here, by The number of pixels in the cluster 1104 and the number of pixels in the cluster 1102 are both greater than the number of pixels in the other clusters in the cluster. Therefore, the color selection module 114 selects the cluster 1104 as the first cluster, and selects the cluster 1102. As the second cluster and one pixel in the first cluster as the first index pixel, one pixel in the second cluster is used as the second index pixel. It is to be noted that the disclosure does not limit the method of pixel grouping. For example, in another exemplary embodiment, the color selection module 114 groups pixels having similar pixel values into the same cluster.

請參照圖13B,在本範例實施例中,在第一編碼單元200的鄰近範圍1000內的多個第三畫素中選出兩個畫素作為第一索引畫素與第二索引畫素的操作中,顏色選擇模組114是根據鄰近範圍1000內的多個第三畫素的畫素值,將任兩個畫素的畫素值的差值小於一預先定義差值的兩個畫素分群至同一個叢集內,由此可將顏色相近的畫素分群至同一個叢集內。例如,屬於叢集1114的6個畫素中任兩個畫素的畫素值相減的差值會小於上述預先定義差值且此任兩個畫素具有相近的顏色C2,屬於叢集1116的2個畫素的畫素值相減的差值亦會小於上述預先定義差值且此2個畫素具有相近的顏色C4,而屬於叢集1112的畫素並沒有與其畫素值相近的其他畫素並且屬於叢集1112的1個畫素的顏色為C1。接著,顏色選擇模組114會依據對應每一叢集的畫素的數量選擇第一叢集與第二叢集。在此,由於叢集1114的畫素的數量與叢集1116的畫素的數量皆大於叢集之中的其他叢集的畫素的數量,因此,顏色選擇模組114會選擇叢集1114作為第一叢集,以及選擇叢集 1116作為第二叢集。並且以第一叢集中的一個畫素作為第一索引畫素,以第二叢集中的一個畫素作為第二索引畫素。 Referring to FIG. 13B, in the exemplary embodiment, two pixels are selected as the first index pixel and the second index pixel in the plurality of third pixels in the neighborhood 1000 of the first encoding unit 200. The color selection module 114 is based on the pixel values of the plurality of third pixels in the adjacent range 1000, and the difference between the pixel values of any two pixels is less than a preset pixel difference. Within the same cluster, groups of similar colors can be grouped into the same cluster. For example, the difference between the pixel values of any two of the six pixels belonging to the cluster 1114 may be smaller than the above-mentioned predefined difference and the two pixels have similar colors C2, belonging to the cluster 1116. The difference between the pixel values of the pixels is also smaller than the above-mentioned predefined difference and the two pixels have similar colors C4, while the pixels belonging to the cluster 1112 do not have other pixels similar to their pixel values. And the color of one pixel belonging to the cluster 1112 is C1. Next, the color selection module 114 selects the first cluster and the second cluster according to the number of pixels corresponding to each cluster. Here, since the number of pixels of the cluster 1114 and the number of pixels of the cluster 1116 are both larger than the number of pixels of the other clusters in the cluster, the color selection module 114 selects the cluster 1114 as the first cluster, and Selection cluster 1116 is used as the second cluster. And one pixel in the first cluster is used as the first index pixel, and one pixel in the second cluster is used as the second index pixel.

接著,索引設定模組116會依序地將對應第一索引畫素的索引值設定為0與對應此第二索引畫素的索引值設定為1。並且在編碼模組112將編碼值傳送至解碼器120的操作中,編碼模組112亦會傳送對應每一畫素對的識別值或第一索引畫素的顏色與第二索引畫素的顏色至解碼端至解碼器120。例如,在圖13A的範例中,第一索引畫素屬於叢集1104,第二索引畫素屬於叢集1102,因此,第一索引畫素的顏色與第二索引畫素的顏色分別為C2與C1。而在圖11B的範例中,第一索引畫素屬於叢集1114且第二索引畫素屬於叢集1116,因此,第一索引畫素的顏色與第二索引畫素的顏色分別為C2與C5。 Next, the index setting module 116 sequentially sets the index value corresponding to the first index pixel to 0 and the index value corresponding to the second index pixel to 1. And in the operation of the encoding module 112 to transmit the encoded value to the decoder 120, the encoding module 112 also transmits the identification value corresponding to each pixel pair or the color of the first index pixel and the color of the second index pixel. To the decoder to the decoder 120. For example, in the example of FIG. 13A, the first index pixel belongs to the cluster 1104, and the second index pixel belongs to the cluster 1102. Therefore, the color of the first index pixel and the color of the second index pixel are C2 and C1, respectively. In the example of FIG. 11B, the first index pixel belongs to the cluster 1114 and the second index pixel belongs to the cluster 1116. Therefore, the colors of the first index pixel and the second index pixel are C2 and C5, respectively.

之後,在索引地圖建立模組118使用雙顏色模式對第一編碼單元200中的每一畫素進行索引編號以產生索引地圖的操作,編碼模組112依據索引地圖產生對應第一編碼單元200的編碼值的操作,以及編碼模組112將編碼值600傳送至解碼器120的操作皆相同於第一範例實施例所述的方法,在此不再重述。 After that, the index map creation module 118 uses the two-color mode to index each pixel in the first coding unit 200 to generate an index map. The encoding module 112 generates the corresponding first coding unit 200 according to the index map. The operation of encoding the value, and the operation of the encoding module 112 to transmit the encoded value 600 to the decoder 120 are the same as those described in the first exemplary embodiment, and will not be repeated here.

此外,當解碼器120的編碼值接收模組122接收到對應第一編碼單元200的編碼值後,解碼模組124根據編碼值重建對應第一編碼單元200的索引地圖的操作,亦是相同於第一範例實施例中圖10A~圖10G的操作,在此不在重述。據此,解碼模組124可根據所獲得的第一索引畫素的顏色、第二索引畫素的顏色與 索引地圖的多個索引值來重建第一編碼單元200的多個畫素。 In addition, after the coded value receiving module 122 of the decoder 120 receives the coded value corresponding to the first coding unit 200, the decoding module 124 reconstructs the operation of the index map corresponding to the first coding unit 200 according to the coded value, which is also the same. The operations of FIGS. 10A to 10G in the first exemplary embodiment are not repeated here. Accordingly, the decoding module 124 can be based on the obtained color of the first index pixel, the color of the second index pixel, and A plurality of index values of the map are indexed to reconstruct a plurality of pixels of the first coding unit 200.

[第三範例實施例] [Third exemplary embodiment]

第三範例實施例的編碼方法與解碼方法及其系統本質上是相同於第一與第二範例實施例的編碼方法與解碼方法及其系統,其差異之處為在第三範例實施例中用以從中選出兩個畫素的範圍可延伸至其他鄰近的編碼單元且第三範例實施例亦是以統計與量化的方法選出兩個畫素作為第一索引畫素與第二索引畫素。以下將使用第一範例實施例的系統及元件標號來說明第三範例實施例與第一、二範例實施例的差異之處。 The encoding method and decoding method of the third exemplary embodiment and the system thereof are essentially the same as the encoding method and decoding method of the first and second exemplary embodiments and the system thereof, and the difference is that it is used in the third exemplary embodiment. The range from which two pixels are selected may be extended to other adjacent coding units and the third exemplary embodiment also selects two pixels as the first index pixel and the second index pixel in a statistical and quantitative manner. The differences between the third exemplary embodiment and the first and second exemplary embodiments will be described below using the system and component numbers of the first exemplary embodiment.

圖14是根據本揭露之第三範例實施例所繪示的影像編碼運作示意圖。 FIG. 14 is a schematic diagram of an image encoding operation according to a third exemplary embodiment of the present disclosure.

請參照圖14,相同於第一範例實施例,編碼模組112會在第一編碼單元200的鄰近範圍內的多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。然而,本揭露並不限於此,例如,在另一範例實施例中,編碼模組112可從畫面中所有畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。在此假設編碼模組112所接收的一畫面中第一編碼單元200的大小為L×L,且L為正整數。特別是,在本範例實施例中,鄰近範圍包括的鄰近於第一編碼單元200的至少一第二編碼單元1220中鄰近於第一編碼單元200的多個畫素(以下稱為第三畫素)。在此,此些第三畫素所屬的範圍為鄰近範圍1000。此外,鄰近範圍還包括鄰近範圍1000延伸至至少一第二編碼單元1220中的第二編碼單元1202的鄰近 範圍1200-1與鄰近範圍1000延伸至至少一第二編碼單元1220中的第二編碼單元1204的鄰近範圍1200-2。也就是說,編碼模組112是從鄰近範圍1000、鄰近範圍1200-1與鄰近範圍1200-2內的多個畫素中選出兩個畫素作為第一索引畫素與第二索引畫素。 Referring to FIG. 14 , similar to the first exemplary embodiment, the encoding module 112 selects two pixels from the plurality of pixels in the vicinity of the first encoding unit 200 as the first index pixel and the second index drawing. Prime. However, the disclosure is not limited thereto. For example, in another exemplary embodiment, the encoding module 112 may select two pixels from all the pixels in the picture as the first index pixel and the second index pixel. It is assumed here that the size of the first coding unit 200 in a picture received by the coding module 112 is L×L, and L is a positive integer. In particular, in the present exemplary embodiment, the neighboring range includes a plurality of pixels adjacent to the first encoding unit 200 in the at least one second encoding unit 1220 adjacent to the first encoding unit 200 (hereinafter referred to as a third pixel) ). Here, the range of the third pixels belongs to the proximity range 1000. In addition, the proximity range further includes the proximity of the adjacent range 1000 to the proximity of the second coding unit 1202 in the at least one second coding unit 1220. The range 1200-1 and the adjacent range 1000 extend to the proximity range 1200-2 of the second coding unit 1204 in the at least one second coding unit 1220. That is, the encoding module 112 selects two pixels from the plurality of pixels in the adjacent range 1000, the adjacent range 1200-1, and the adjacent range 1200-2 as the first index pixel and the second index pixel.

圖15A與圖15B是根據本揭露之第三範例實施例所繪示的畫素分群運作示意圖。 15A and FIG. 15B are schematic diagrams of pixel group operation according to a third exemplary embodiment of the present disclosure.

請參照圖15A,在本範例實施例中,在第一編碼單元200的鄰近範圍1000、鄰近範圍1200-1與鄰近範圍1200-2內的畫素中選出兩個畫素作為第一索引畫素與第二索引畫素的操作中,顏色選擇模組114會根據此鄰近範圍1000、鄰近範圍1200-1與鄰近範圍1200-2內的畫素的畫素值將此些畫素分群為多個叢集。舉例而言,假設第一編碼單元200的大小為4×4,則鄰近範圍1000內會具有17個畫素。顏色選擇模組114是根據此些畫素的畫素值,將顏色相同的畫素分群至同一個叢集內。例如,屬於叢集1302的4個畫素具有相同的畫素值且此4個畫素的顏色為C1,屬於叢集1304的7個畫素具有相同的畫素值且此7個畫素的顏色為C2,屬於叢集1306的畫素並沒有與其畫素值相同的其他畫素且此1個畫素的顏色為C4,屬於叢集1308的3個畫素具有相同的畫素值且此3個畫素的顏色為C5,以及屬於叢集1310的2個畫素具有相同的畫素值且此2個畫素的顏色為C6。接著,顏色選擇模組114會依據對應每一叢集的畫素的數量選擇第一叢集與第二叢集。在此,由於叢集1302的畫素的數量與叢集1304的畫素的數量皆大 於叢集之中的其他叢集的畫素的數量,因此,顏色選擇模組114會選擇叢集1302作為第一叢集,以及選擇叢集1304作為第二叢集。並且以第一叢集中的一個畫素作為第一索引畫素,以第二叢集中的一個畫素作為第二索引畫素。值得一提的是,本揭露並不加以限制畫素分群的方法,例如,在另一範例實施例中,顏色選擇模組114是將畫素值相近的畫素分群至同一個叢集內。 Referring to FIG. 15A, in the present exemplary embodiment, two pixels are selected as the first index pixel in the pixels in the adjacent range 1000, the adjacent range 1200-1, and the adjacent range 1200-2 of the first encoding unit 200. In the operation of the second index pixel, the color selection module 114 groups the pixels into a plurality of pixels according to the pixel values of the pixels in the proximity range 1000, the proximity range 1200-1, and the proximity range 1200-2. Cluster. For example, assuming that the size of the first coding unit 200 is 4×4, there will be 17 pixels in the proximity range 1000. The color selection module 114 groups the pixels of the same color into the same cluster according to the pixel values of the pixels. For example, the four pixels belonging to the cluster 1302 have the same pixel value and the colors of the four pixels are C1, and the seven pixels belonging to the cluster 1304 have the same pixel value and the colors of the seven pixels are C2, the pixels belonging to the cluster 1306 do not have other pixels whose pixel values are the same and the color of the one pixel is C4, and the three pixels belonging to the cluster 1308 have the same pixel value and the three pixels The color is C5, and the two pixels belonging to cluster 1310 have the same pixel value and the color of the two pixels is C6. Next, the color selection module 114 selects the first cluster and the second cluster according to the number of pixels corresponding to each cluster. Here, the number of pixels of the cluster 1302 is larger than the number of pixels of the cluster 1304. The number of pixels of other clusters in the cluster, therefore, color selection module 114 will select cluster 1302 as the first cluster and select cluster 1304 as the second cluster. And one pixel in the first cluster is used as the first index pixel, and one pixel in the second cluster is used as the second index pixel. It should be noted that the disclosure does not limit the method of pixel grouping. For example, in another exemplary embodiment, the color selection module 114 groups pixels having similar pixel values into the same cluster.

請參照圖15B,在本範例實施例中,在第一編碼單元200的鄰近範圍1000、鄰近範圍1200-1與鄰近範圍1200-2內的畫素中選出兩個畫素作為第一索引畫素與第二索引畫素的操作中,顏色選擇模組114是根據鄰近範圍1000內的畫素的畫素值,將任兩個畫素的畫素值的差值小於一預先定義差值的兩個畫素分群至同一個叢集內,由此可將顏色相近的畫素分群至同一個叢集內。例如,屬於叢集1312的4個畫素中任兩個畫素的畫素值相減的差值會小於上述預先定義差值且此任兩個畫素具有相近的顏色C1,屬於叢集1314的7個畫素中任兩個畫素的畫素值相減的差值會小於上述預先定義差值且此任兩個畫素具有相近的顏色C2,而屬於叢集1316的5個畫素中任兩個畫素的畫素值相減的差值亦會小於上述預先定義差值且此任兩個畫素具有相近的顏色C5。接著,顏色選擇模組114會依據對應每一叢集的畫素的數量選擇第一叢集與第二叢集。在此,由於叢集1314的畫素的數量與叢集1316的畫素的數量皆大於叢集之中的其他叢集的畫素的數量,因此,顏色選擇模組114會選擇叢集1314作為第一叢集,以及選擇叢集1316 作為第二叢集並且以第一叢集中的一個畫素作為第一索引畫素,以第二叢集中的一個畫素作為第二索引畫素。 Referring to FIG. 15B, in the exemplary embodiment, two pixels are selected as the first index pixel in the pixels in the adjacent range 1000, the adjacent range 1200-1, and the adjacent range 1200-2 of the first encoding unit 200. In the operation of the second index pixel, the color selection module 114 is based on the pixel values of the pixels in the adjacent range 1000, and the difference between the pixel values of any two pixels is less than a predefined difference. The pixels are grouped into the same cluster, so that pixels of similar colors can be grouped into the same cluster. For example, the difference between the pixel values of any two of the four pixels belonging to the cluster 1312 may be smaller than the above-mentioned predefined difference and the two pixels have similar colors C1, belonging to the cluster 1314. The difference between the pixel values of any two pixels in the pixels is smaller than the above-mentioned predefined difference and the two pixels have similar colors C2, and any two of the five pixels belonging to the cluster 1316 The difference between the pixel values of the pixels is also smaller than the above-mentioned predefined difference and the two pixels have similar colors C5. Next, the color selection module 114 selects the first cluster and the second cluster according to the number of pixels corresponding to each cluster. Here, since the number of pixels of the cluster 1314 and the number of pixels of the cluster 1316 are greater than the number of pixels of the other clusters in the cluster, the color selection module 114 selects the cluster 1314 as the first cluster, and Selection cluster 1316 As the second cluster and one pixel in the first cluster as the first index pixel, one pixel in the second cluster is used as the second index pixel.

接著,索引設定模組116會依序地將對應第一索引畫素的索引值設定為0與對應此第二索引畫素的索引值設定為1。並且在編碼模組112將編碼值傳送至解碼器120的操作中,編碼模組112亦會傳送對應每一畫素對的識別值或第一索引畫素的顏色與第二索引畫素的顏色至解碼端至解碼器120。例如,在圖15A的範例中,第一索引畫素屬於叢集1304,第二索引畫素屬於叢集1302,因此,第一索引畫素的顏色與第二索引畫素的顏色分別為C2與C1。而在圖13B中,第一索引畫素屬於叢集1314,第二索引畫素屬於叢集1316,因此,第一索引畫素的顏色與第二索引畫素的顏色分別為C2與C5。 Next, the index setting module 116 sequentially sets the index value corresponding to the first index pixel to 0 and the index value corresponding to the second index pixel to 1. And in the operation of the encoding module 112 to transmit the encoded value to the decoder 120, the encoding module 112 also transmits the identification value corresponding to each pixel pair or the color of the first index pixel and the color of the second index pixel. To the decoder to the decoder 120. For example, in the example of FIG. 15A, the first index pixel belongs to the cluster 1304, and the second index pixel belongs to the cluster 1302. Therefore, the colors of the first index pixel and the second index pixel are C2 and C1, respectively. In FIG. 13B, the first index pixel belongs to the cluster 1314, and the second index pixel belongs to the cluster 1316. Therefore, the colors of the first index pixel and the second index pixel are C2 and C5, respectively.

之後,在索引地圖建立模組118使用雙顏色模式對第一編碼單元200中的每一畫素進行索引編號以產生索引地圖的操作,編碼模組112依據索引地圖產生對應第一編碼單元200的編碼值的操作,以及編碼模組112將編碼值600傳送至解碼器120的操作皆相同於第一範例實施例所數的方法,在此不再重述。 After that, the index map creation module 118 uses the two-color mode to index each pixel in the first coding unit 200 to generate an index map. The encoding module 112 generates the corresponding first coding unit 200 according to the index map. The operation of encoding the value, and the operation of the encoding module 112 to transmit the encoded value 600 to the decoder 120 are the same as those of the first exemplary embodiment, and will not be repeated here.

此外,當解碼器120的編碼值接收模組122接收到對應第一編碼單元200的編碼值後,解碼模組124根據編碼值重建對應第一編碼單元200的索引地圖的操作,亦是相同於第一範例實施例中圖10A~圖10G的操作,在此不在重述。據此,解碼模組124可根據所獲得的第一索引畫素的顏色、第二索引畫素的顏色與 索引地圖的多個索引值來重建第一編碼單元200的多個畫素。 In addition, after the coded value receiving module 122 of the decoder 120 receives the coded value corresponding to the first coding unit 200, the decoding module 124 reconstructs the operation of the index map corresponding to the first coding unit 200 according to the coded value, which is also the same. The operations of FIGS. 10A to 10G in the first exemplary embodiment are not repeated here. Accordingly, the decoding module 124 can be based on the obtained color of the first index pixel, the color of the second index pixel, and A plurality of index values of the map are indexed to reconstruct a plurality of pixels of the first coding unit 200.

綜上所述,本揭露之範例實施例所提出的編碼方法與解碼方法以及使用此方法的編解碼系統、編碼器與解碼器藉由僅記錄對應編碼單元的畫素之中的第1個畫素的索引值於編碼值中,由此能夠有效地減少編碼運算時的傳輸量,進而可有效地提升編解碼的效能。 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 record only the first picture among the pixels of the corresponding coding unit by using the coding and decoding system, the encoder and the decoder using the method. The index value of the prime is in the encoded value, thereby effectively reducing the amount of transmission during the encoding operation, thereby effectively improving the performance of the encoding and decoding.

S701、S703、S705、S707‧‧‧編碼方法的步驟 Steps of the S701, S703, S705, S707‧‧ ‧ encoding methods

Claims (42)

一種編碼方法,包括:接收一畫面的一第一編碼單元,其中該第一編碼單元具有以一L×L矩陣形式的多個畫素,其中L為正整數;在該畫面中的多個畫素中選出兩個畫素作為一第一索引畫素與一第二索引畫素,其中該第一索引畫素的顏色不同於該第二索引畫素的顏色;以及對該第一編碼單元中的每一畫素進行索引編號以產生一索引地圖,其中在該索引地圖中該第一編碼單元的每一畫素的顏色是以對應該第一索引畫素的索引值或對應該第二索引畫素的索引值來呈現,其中在該索引地圖中僅對應該第一編碼單元的該些畫素的第1個畫素的索引值被記錄在一編碼值中。 An encoding method comprising: receiving a first coding unit of a picture, wherein the first coding unit has a plurality of pixels in the form of an L×L matrix, wherein L is a positive integer; and a plurality of pictures in the picture Selecting two pixels as a first index pixel and a second index pixel, wherein the color of the first index pixel is different from the color of the second index pixel; and the first coding unit Each pixel is indexed to generate an index map, wherein the color of each pixel of the first coding unit in the index map is an index value corresponding to the first index pixel or corresponds to the second index The index value of the pixel is presented, wherein only the index value of the first pixel of the pixels corresponding to the first coding unit in the index map is recorded in an encoded value. 如申請專利範圍第1項所述之編碼方法,其中該畫面中的該些畫素包括鄰近於該第一編碼單元的至少一第二編碼單元中鄰近於該第一編碼單元的多個第三畫素。 The encoding method of claim 1, wherein the pixels in the picture comprise a plurality of third cells adjacent to the first coding unit in the at least one second coding unit adjacent to the first coding unit. Picture. 如申請專利範圍第2項所述之編碼方法,其中該些第三畫素分別為鄰近於該第一編碼單元的第1行第1列個畫素的上邊緣與左邊緣的兩個畫素,鄰近於該第一編碼單元的第L行第1列個畫素的上邊緣的一個畫素,鄰近於該第一編碼單元的第1行第L列個畫素的左邊緣的一個畫素以及對應於該第一編碼單元的第1行第1列個畫素的左上角的一個畫素。 The encoding method of claim 2, wherein the third pixels are respectively two pixels adjacent to an upper edge and a left edge of the first row and the first column of the first coding unit. a pixel adjacent to an upper edge of the first column of the Lth row of the first coding unit, adjacent to a pixel of a left edge of the first row and the Lth column of the first coding unit And a pixel corresponding to an upper left corner of the first row and the first column of pixels of the first coding unit. 如申請專利範圍第3項所述之編碼方法,其中在該畫面的 該些畫素中選出該兩個畫素作為該第一索引畫素與該第二索引畫素的步驟包括:建立一畫素對表;依據該些第三畫素產生多個畫素對,且將對應每一該些畫素對的一識別值與對應該識別值的每一組畫素對的顏色記錄於該畫素對表中;以及根據該畫素對表選擇其中一個畫素對,其中該其中一個畫素對的兩個畫素被設定為該第一索引畫素與該第二索引畫素。 An encoding method as described in claim 3, wherein in the picture The steps of selecting the two pixels as the first index pixel and the second index pixel include: creating a pixel pair table; generating a plurality of pixel pairs according to the third pixels, And recording, in the pixel pair table, a recognition value corresponding to each of the pair of pixels and a color of each set of pixel pairs corresponding to the identification value; and selecting one of the pixel pairs according to the pixel pair table The two pixels of the one of the pixel pairs are set to the first index pixel and the second index pixel. 如申請專利範圍第2項所述之編碼方法,其中在該畫面的該些畫素中選出該兩個畫素作為該第一索引畫素與該第二索引畫素的步驟包括:根據該些畫素的畫素值將該些畫素分群為多個叢集,其中該些叢集之中同一個叢集內的畫素的畫素值相同;以及依據對應每一該些叢集的畫素的數量選擇一第一叢集與一第二叢集,其中該第一索引畫素屬於該第一叢集,該第二索引畫素屬於該第二叢集,並且該第一叢集的畫素的數量與該第二叢集的畫素的數量皆大於該些叢集之中的其他叢集的畫素的數量。 The encoding method of claim 2, wherein the step of selecting the two pixels as the first index pixel and the second index pixel in the pixels of the picture comprises: according to the The pixel values of the pixels group the pixels into a plurality of clusters, wherein the pixels in the same cluster have the same pixel values; and the number of pixels corresponding to each of the clusters is selected according to the number of pixels corresponding to each of the clusters a first cluster and a second cluster, wherein the first index pixel belongs to the first cluster, the second index pixel belongs to the second cluster, and the number of pixels of the first cluster and the second cluster The number of pixels is greater than the number of pixels in other clusters in the cluster. 如申請專利範圍第2項所述之編碼方法,其中在該畫面的該些畫素中選出該兩個畫素作為該第一索引畫素與該第二索引畫素的步驟包括:根據該些畫素的畫素值將該些畫素分群為多個叢集,其中該 些叢集之中同一個叢集內的任兩個畫素的畫素值的差值小於一預先定義差值;以及依據對應每一該些叢集的畫素的數量選擇一第一叢集與一第二叢集,其中該第一索引畫素屬於該第一叢集,該第二索引畫素屬於該第二叢集,並且該第一叢集的畫素的數量與該第二叢集的畫素的數量皆大於該些叢集之中的其他叢集的畫素的數量。 The encoding method of claim 2, wherein the step of selecting the two pixels as the first index pixel and the second index pixel in the pixels of the picture comprises: according to the The pixel values of the pixels group the pixels into a plurality of clusters, where The difference between the pixel values of any two pixels in the same cluster in the cluster is less than a predefined difference; and selecting a first cluster and a second according to the number of pixels corresponding to each of the clusters a cluster, wherein the first index pixel belongs to the first cluster, the second index pixel belongs to the second cluster, and the number of pixels of the first cluster and the number of pixels of the second cluster are greater than the cluster The number of pixels in other clusters in these clusters. 如申請專利範圍第4項所述之編碼方法,更包括:將該編碼值與該識別值傳送至一解碼端,其中該編碼值包括該第一編碼單元的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 The encoding method of claim 4, further comprising: transmitting the encoded value and the identification value to a decoding end, wherein the encoded value comprises a first one of pixels of the first coding unit The index value of the prime, at least one copy mode, and a value of at least one run character. 如申請專利範圍第1項所述之編碼方法,更包括:直接傳送該編碼值、該第一索引畫素的顏色與該第二索引畫素的顏色至一解碼端,其中該編碼值包括該第一編碼單元的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 The encoding method of claim 1, further comprising: directly transmitting the code value, the color of the first index pixel and the color of the second index pixel to a decoding end, wherein the code value includes the An index value of the first pixel among the pixels of the first coding unit, at least one copy mode, and a value of at least one run character. 一種解碼方法,包括:接收對應一第一編碼單元的一編碼值,其中該第一編碼單元具有以一L×L矩陣形式的多個畫素,其中L為正整數;根據該編碼值中的一索引值、至少一複製模式以及至少一跑字符的值重建對應該第一編碼單元的一索引地圖,其中所接收的該編碼值內的索引值僅包括該索引地圖中的該第一編碼單元的該 些畫素的第1個畫素的索引值;獲得一第一索引畫素的顏色與一第二索引畫素的顏色;以及根據該第一索引畫素的顏色、該第二索引畫素的顏色與該索引地圖的多個索引值重建該第一編碼單元的該些畫素,其中該第一索引畫素的顏色不同於該第二索引畫素的顏色。 A decoding method includes: receiving an encoded value corresponding to a first coding unit, wherein the first coding unit has a plurality of pixels in an L×L matrix, where L is a positive integer; according to the encoded value An index value corresponding to the first coding unit is reconstructed by an index value, at least one copy mode, and a value of at least one run character, wherein the received index value in the encoded value includes only the first coding unit in the index map The An index value of the first pixel of the pixel; a color of a first index pixel and a color of a second index pixel; and a color according to the first index pixel, the second index pixel The color and the plurality of index values of the index map reconstruct the pixels of the first coding unit, wherein a color of the first index pixel is different from a color of the second index pixel. 如申請專利範圍第9項所述之解碼方法,其中該索引地圖中對應該第一編碼單元的每一畫素的索引值是以該L×L矩陣形式排列,並且在該索引地圖中已被掃描的索引的個數為c,其中c為大於0且小於或等於(L×L)的正整數,且該第1個畫素的索引值為該索引地圖中所掃描的第1個索引,其中根據該編碼值中的該索引值以及該跑字符的值重建對應該第一編碼單元的該索引地圖的步驟包括:若該第c個索引的該複製模式是一向左複製跑模式,則當解碼對應該索引地圖中所掃描的第1個索引的畫素時,根據該索引地圖中所掃描的第1個索引和該跑字符的值重建該索引地圖,在該索引地圖中已被掃描的索引的個數小於或等於L時,將該所掃描的第c個索引轉換為座標(x,y),以及將已掃描的第c-1個索引轉換為座標(m,n),其中對應該座標(m,n)的索引的值為P;以及當解碼對應該索引地圖中所掃描的第c個索引的畫素時,根據該索引地圖中該所掃描的第c-1個索引和該跑字符的值重建該索引地圖,其中該索引地圖中該所掃描的第c個索引的值為(P+1) 除以2所獲得的餘數。 The decoding method of claim 9, wherein an index value of each pixel corresponding to the first coding unit in the index map is arranged in the L×L matrix form, and has been The number of scanned indexes is c, where c is a positive integer greater than 0 and less than or equal to (L×L), and the index of the first pixel is the first index scanned in the index map. The step of reconstructing the index map corresponding to the first coding unit according to the index value in the code value and the value of the running character includes: if the copy mode of the c-th index is a left-left copy run mode, then When the pixel corresponding to the first index scanned in the index map is decoded, the index map is reconstructed according to the first index scanned in the index map and the value of the running character, and the index map has been scanned in the index map. When the number of indexes is less than or equal to L, the scanned c-th index is converted into a coordinate (x, y), and the scanned c-1 index is converted into a coordinate (m, n), wherein The value of the index of the coordinates (m, n) should be P; and when the decoding corresponds to the index When the pixel of the c-th index is scanned in the map, the index map is reconstructed according to the scanned c-1 index and the value of the running character in the index map, where the scanned map is in the index map The value of c indexes is (P+1) Divide by the remainder obtained by 2. 如申請專利範圍第10項所述之解碼方法,其中根據該編碼值中的該索引值、該複製模式以及該跑字符的值重建對應該第一編碼單元的該索引地圖的步驟更包括:當解碼對應該索引地圖中所掃描的第c個索引的畫素時,判斷對應該第c-1個索引的該複製模式是使用一向上複製跑模式或該向左複製跑模式來解碼對應該索引地圖中所掃描的第c-1個索引的畫素,其中在該索引地圖中已被掃描的索引的個數大於L;將對應該索引地圖中所掃描的第c個索引轉換為座標(x,y),將該已掃描的第c-1個索引轉換為座標(m,n),以及將對應該索引地圖中已掃描的第c-L個索引轉換為座標(p,q),其中對應該座標(p,q)的索引的值為Q以及對應該座標(m,n)的索引的值為R;當判斷使用該向上複製跑模式解碼對應該索引地圖中所掃描的第c-1個索引的畫素時,根據對應該索引地圖中已掃描的第c-L個索引和該跑字符的值重建該索引地圖,其中該索引地圖中所掃描的第c個索引的值為(Q+1)除以2所獲得的餘數,以及當判斷使用該向左複製跑模式解碼對應該索引地圖中所掃描的第c-1個索引的畫素時,根據對應該索引地圖中已掃描的第c-1個索引和該跑字符的值重建該索引地圖,其中該索引地圖中所掃描的第c個索引的值為(R+1)除以2所獲得的餘數。 The decoding method of claim 10, wherein the step of reconstructing the index map corresponding to the first coding unit according to the index value, the copy mode, and the value of the running character in the encoded value further comprises: Decoding the pixel corresponding to the c-th index scanned in the index map, determining whether the copy mode corresponding to the c-1 index is using an upward copy run mode or the left copy run mode to decode the corresponding index The pixel of the c-1th index scanned in the map, wherein the number of indexes that have been scanned in the index map is greater than L; the c-th index scanned in the index map is converted into coordinates (x , y), convert the scanned c-1 index into coordinates (m, n), and convert the scanned cL index corresponding to the index map into coordinates (p, q), which corresponds to The value of the index of the coordinates (p, q) is Q and the value of the index corresponding to the coordinate (m, n) is R; when it is judged to use the upward copy run mode to decode the c-1th scan corresponding to the index map When the pixel of the index is indexed, according to the corresponding cL that has been scanned in the index map And indexing the index map with the value of the running character, wherein the value of the c-th index scanned in the index map is (Q+1) divided by 2, and when it is determined to use the left-copy mode Decoding the pixel corresponding to the c-1th index scanned in the index map, reconstructing the index map according to the value of the c-1 index scanned in the index map and the running character, wherein the index map The value of the c-th index scanned in (R+1) divided by 2 is the remainder. 如申請專利範圍第9項所述之解碼方法,其中該索引地圖中對應該第一編碼單元的每一畫素的索引值是以該L×L矩陣形 式排列,並且在該索引地圖中已被掃描的索引的個數為c,其中c為大於0且小於或等於(L×L)的正整數,其中根據該編碼值中的該索引值、該複製模式以及該跑字符的值重建對應該第一編碼單元的該索引地圖的步驟更包括:當解碼對應該索引地圖中所掃描的第c個索引的畫素時,判斷對應該第c個索引的該複製模式是使用一向上複製跑模式或一向左複製跑模式來解碼對應該索引地圖中所掃描的第c個索引的畫素,其中在該索引地圖中已被掃描的索引的個數大於L;當判斷使用該向上複製跑模式解碼對應該索引地圖中所掃描的第c個索引的畫素時,將對應該索引地圖中所掃描的第c個索引轉換為座標(x,y),將對應該索引地圖中已掃描的第c-L個索引轉換為座標(p,q),以及根據該索引地圖中已掃描的第c-L個索引和該跑字符的值重建該索引地圖。 The decoding method of claim 9, wherein an index value of each pixel corresponding to the first coding unit in the index map is in the L×L matrix shape. Arranged, and the number of indexes that have been scanned in the index map is c, where c is a positive integer greater than 0 and less than or equal to (L x L), wherein the index value according to the encoded value The copying mode and the value of the running character reconstructing the index map corresponding to the first coding unit further comprises: when decoding the pixel corresponding to the c-th index scanned in the index map, determining that the corresponding c index The copy mode is to use an up copy run mode or a left copy run mode to decode a pixel corresponding to the cth index scanned in the index map, wherein the number of indexes that have been scanned in the index map is greater than L; when it is judged that the pixel corresponding to the c-th index scanned in the index map is decoded by using the upward copy running mode, the c-th index scanned in the index map is converted into a coordinate (x, y), The cL index that has been scanned in the index map is converted into a coordinate (p, q), and the index map is reconstructed based on the scanned cL index and the value of the running character in the index map. 如申請專利範圍第9項所述之解碼方法,其中獲得該第一索引畫素的顏色與該第二索引畫素的顏色的步驟包括:接收對應該第一索引畫素與該第二索引畫素的一識別值;以及根據該識別值從一畫素對表中識別該第一索引畫素的顏色與該第二索引畫素的顏色。 The decoding method of claim 9, wherein the step of obtaining the color of the first index pixel and the color of the second index pixel comprises: receiving a corresponding first index pixel and the second index An identification value of the prime; and identifying, according to the identification value, a color of the first index pixel from a pixel pair table and a color of the second index pixel. 如申請專利範圍第9項所述之解碼方法,其中獲得該第一索引畫素的顏色與該第二索引畫素的顏色的步驟包括:接收該第一索引畫素的顏色與該第二索引畫素的顏色。 The decoding method of claim 9, wherein the step of obtaining the color of the first index pixel and the color of the second index pixel comprises: receiving a color of the first index pixel and the second index The color of the pixels. 一種編碼器,該編碼器包括:一編碼模組,接收一畫面的一第一編碼單元,其中該第一編碼單元具有以一L×L矩陣形式的多個畫素,其中L為正整數;一顏色選擇模組,在該畫面中的多個畫素中選出兩個畫素作為一第一索引畫素與一第二索引畫素,其中該第一索引畫素的顏色不同於該第二索引畫素的顏色;以及一索引地圖建立模組,對該第一編碼單元中的每一畫素進行索引編號以產生一索引地圖,其中在該索引地圖中該第一編碼單元的每一畫素的顏色是以對應該第一索引畫素的索引值或對應該第二索引畫素的索引值來呈現,其中在該索引地圖中僅對應該第一編碼單元的該些畫素的第1個畫素的索引值被記錄在一編碼值中。 An encoder, comprising: an encoding module, receiving a first coding unit of a picture, wherein the first coding unit has a plurality of pixels in an L×L matrix, wherein L is a positive integer; a color selection module, wherein two pixels are selected as a first index pixel and a second index pixel in the plurality of pixels in the picture, wherein the color of the first index pixel is different from the second a color of the index pixel; and an index map building module, indexing each pixel in the first coding unit to generate an index map, wherein each picture of the first coding unit in the index map The color of the prime is represented by an index value corresponding to the first index pixel or an index value corresponding to the second index pixel, wherein only the first of the pixels of the first coding unit is corresponding to the index map The index values of the pixels are recorded in an encoded value. 如申請專利範圍第15項所述之編碼器,其中該畫面中的該些畫素包括鄰近於該第一編碼單元的至少一第二編碼單元中鄰近於該第一編碼單元的多個第三畫素。 The encoder of claim 15, wherein the pixels in the picture comprise a plurality of thirds adjacent to the first coding unit in the at least one second coding unit adjacent to the first coding unit Picture. 如申請專利範圍第16項所述之編碼器,其中該些第三畫素分別為鄰近於該第一編碼單元的第1行第1列個畫素的上邊緣與左邊緣的兩個畫素,鄰近於該第一編碼單元的第1行第L列個畫素的上邊緣的一個畫素,鄰近於該第一編碼單元的第L行第1列個畫素的左邊緣的一個畫素以及對應於該第一編碼單元的第1行第1列個畫素的左上角的一個畫素。 The encoder of claim 16, wherein the third pixels are respectively two pixels adjacent to an upper edge and a left edge of the first row and the first column of the first coding unit. a pixel adjacent to an upper edge of the first row and the Lth column of pixels of the first coding unit, adjacent to a pixel of a left edge of the first column of pixels of the Lth row of the first coding unit And a pixel corresponding to an upper left corner of the first row and the first column of pixels of the first coding unit. 如申請專利範圍第17項所述之編碼器,更包括一畫素對 表建立模組,用以建立一畫素對表,其中該畫素對表建立模組依據該些第三畫素產生多個畫素對,且將對應每一該些畫素對的一識別值與對應該識別值的每一組畫素的顏色記錄於該畫素對表中,其中該顏色選擇模組根據該畫素對表選擇其中一個畫素對,其中該其中一個畫素對的兩個畫素被設定為該第一索引畫素與該第二索引畫素。 For example, the encoder described in claim 17 includes a pixel pair. a table establishing module, configured to establish a pixel pair table, wherein the pixel pair table creating module generates a plurality of pixel pairs according to the third pixels, and corresponding to each of the pixel pairs The color of each set of pixels corresponding to the value and the corresponding value is recorded in the pixel pair table, wherein the color selection module selects one of the pixel pairs according to the pixel pair table, wherein the one of the pixel pairs Two pixels are set as the first index pixel and the second index pixel. 如申請專利範圍第16項所述之編碼器,其中該顏色選擇模組更根據該些畫素的畫素值將該些畫素分群為多個叢集,其中該些畫素之中同一個叢集內的畫素的畫素值相同,其中該顏色選擇模組更依據對應每一該些叢集的畫素的數量選擇一第一叢集與一第二叢集,其中該第一索引畫素屬於該第一叢集,該第二索引畫素屬於該第二叢集,並且該第一叢集的畫素的數量與該第二叢集的畫素的數量皆大於該些叢集之中的其他叢集的畫素的數量。 The encoder of claim 16, wherein the color selection module further groups the pixels into a plurality of clusters according to pixel values of the pixels, wherein the same clusters are among the pixels. The pixel values of the pixels in the same are the same, wherein the color selection module further selects a first cluster and a second cluster according to the number of pixels corresponding to each of the clusters, wherein the first index pixel belongs to the first a cluster, the second index pixel belongs to the second cluster, and the number of pixels of the first cluster and the number of pixels of the second cluster are greater than the number of pixels of other clusters in the cluster . 如申請專利範圍第16項所述之編碼器,其中該顏色選擇模組更根據該些畫素的畫素值將該些畫素分群為多個叢集,其中該些叢集之中同一個叢集內的任兩個畫素的畫素值的差值小於一預先定義差值,其中該顏色選擇模組更依據對應每一該些叢集的畫素的數量選擇一第一叢集與一第二叢集,其中該第一索引畫素屬於該第一叢集,該第二索引畫素屬於 該第二叢集,並且該第一叢集的畫素的數量與該第二叢集的畫素的數量皆大於該些叢集之中的其他叢集的畫素的數量。 The encoder of claim 16, wherein the color selection module further groups the pixels into a plurality of clusters according to pixel values of the pixels, wherein the clusters are in the same cluster. The difference between the pixel values of any two pixels is less than a predefined difference, wherein the color selection module selects a first cluster and a second cluster according to the number of pixels corresponding to each of the clusters. The first index pixel belongs to the first cluster, and the second index pixel belongs to The second cluster, and the number of pixels of the first cluster and the number of pixels of the second cluster are both greater than the number of pixels of other clusters among the clusters. 如申請專利範圍第18項所述之編碼器,其中該編碼模組更用以將該編碼值與該識別值傳送至一解碼器,其中該編碼值包括該第一編碼單元的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 The encoder of claim 18, wherein the encoding module is further configured to transmit the encoded value and the identification value to a decoder, wherein the encoded value comprises a pixel of the first coding unit. The index value of the first pixel, at least one copy mode, and a value of at least one run character. 如申請專利範圍第15項所述之編碼器,其中該編碼模組直接傳送該編碼值、該第一索引畫素的顏色與該第二索引畫素的顏色至一解碼器,其中該編碼值包括該第一編碼單元的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 The encoder of claim 15, wherein the encoding module directly transmits the encoded value, the color of the first index pixel and the color of the second index pixel to a decoder, wherein the encoding value The index value of the first pixel among the pixels of the first coding unit, at least one copy mode, and a value of at least one run character. 一種解碼器,包括:一編碼值接收模組,接收對應一第一編碼單元的一編碼值,其中該第一編碼單元具有以一L×L矩陣形式的多個畫素,其中L為正整數;以及一解碼模組,根據該編碼值中的一索引值、至少一複製模式以及至少一跑字符的值重建對應該第一編碼單元的一索引地圖,其中所接收的該編碼值內的索引值僅包括該索引地圖中的該第一編碼單元的該些畫素的第1個畫素的索引值,其中該解碼模組獲得一第一索引畫素的顏色與一第二索引畫素的顏色,其中該解碼模組根據該第一索引畫素的顏色、該第二索引畫 素的顏色與該索引地圖的多個索引值重建該第一編碼單元的該些畫素,其中該第一索引畫素的顏色不同於該第二索引畫素的顏色。 A decoder comprising: an encoded value receiving module, receiving an encoded value corresponding to a first coding unit, wherein the first coding unit has a plurality of pixels in the form of an L×L matrix, wherein L is a positive integer And a decoding module, reconstructing an index map corresponding to the first coding unit according to an index value, at least one copy mode, and at least one running character value in the encoded value, wherein the received index in the encoded value The value includes only the index value of the first pixel of the pixels of the first coding unit in the index map, wherein the decoding module obtains a color of a first index pixel and a second index pixel Color, wherein the decoding module draws the second index according to the color of the first index pixel The color of the prime and the plurality of index values of the index map reconstruct the pixels of the first coding unit, wherein the color of the first index pixel is different from the color of the second index pixel. 如申請專利範圍第23項所述之解碼器,其中該索引地圖中對應該第一編碼單元的每一畫素的索引值是以該L×L矩陣形式排列,並且在該索引地圖中已被掃描的索引的個數為c,其中c為大於0且小於或等於(L×L)的正整數,且該第1個畫素的索引值為該索引地圖中所掃描的第1個索引,其中,若該第c個索引的該複製模式是一向左複製跑模式,則當該解碼模組解碼對應該索引地圖中所掃描的第1個索引的畫素時,根據該索引地圖中所掃描的第1個索引和該跑字符的值重建該索引地圖,其中在該索引地圖中已被掃描的索引的個數小於或等於L時,該解碼模組將該索引地圖中所掃描的第c個索引轉換為座標(x,y),以及將已掃描的第c-1個索引轉換為座標(m,n),其中對應該座標(m,n)的索引的值為P,其中當該解碼模組解碼對應該索引地圖中所掃描的第c個索引的畫素時,根據該索引地圖中該所掃描的第c-1個索引和該跑字符的值重建該索引地圖,其中該索引地圖中該所掃描的第c個索引的值為(P+1)除以2所獲得的餘數。 The decoder of claim 23, wherein an index value of each pixel corresponding to the first coding unit in the index map is arranged in the L×L matrix form, and has been The number of scanned indexes is c, where c is a positive integer greater than 0 and less than or equal to (L×L), and the index of the first pixel is the first index scanned in the index map. Wherein, if the copy mode of the c-th index is a left-to-left copy mode, when the decoding module decodes the pixel corresponding to the first index scanned in the index map, according to the scan in the index map Resetting the index map by the first index and the value of the running character, wherein the decoding module scans the index c in the index map when the number of indexes that have been scanned in the index map is less than or equal to L Indexes are converted to coordinates (x, y), and the scanned c-1th index is converted into coordinates (m, n), wherein the value of the index corresponding to the coordinates (m, n) is P, where When the decoding module decodes the pixel corresponding to the c-th index scanned in the index map, according to the cable Retrieving the index map by the scanned c-1 index and the value of the running character in the map, wherein the value of the scanned c index in the index map is obtained by dividing (P+1) by 2 remainder. 如申請專利範圍第24項所述之解碼器,其中當該解碼模組解碼對應該索引地圖中所掃描的第c個索引的畫素時,更判斷對應該第c-1個索引的該複製模式是使用一向上複製跑模式或該向左複製跑模式來解碼對應該索引地圖中所掃描的第c-1個索引 的畫素,其中在該索引地圖中已被掃描的索引的個數大於L,其中該解碼模組將該索引地圖中所掃描的第c個索引轉換為座標(x,y),將該已掃描的第c-1個索引轉換為座標(m,n),以及將該索引地圖中已掃描的第c-L個索引轉換為座標(p,q),其中對應該座標(p,q)的索引的值為Q以及對應該座標(m,n)的索引的值為R,其中當該解碼模組判斷使用該向上複製跑模式解碼對應該索引地圖中所掃描的第c-1個索引的畫素時,根據對應該索引地圖中已掃描的第c-L個索引和該跑字符的值重建該索引地圖,其中該索引地圖中所掃描的第c個索引的值為(Q+1)除以2所獲得的餘數,其中當該解碼模組斷使用該向左複製跑模式解碼對應該索引地圖中所掃描的第c-1個索引的畫素時,根據對應該索引地圖中已掃描的第c-1個索引和該跑字符的值重建該索引地圖,其中該索引地圖中所掃描的第c個索引的值為(R+1)除以2所獲得的餘數。 The decoder of claim 24, wherein when the decoding module decodes a pixel corresponding to the c-th index scanned in the index map, the copy corresponding to the c-1 index is further determined. The mode is to use an upward copy run mode or the left copy run mode to decode the c-1 index scanned in the corresponding index map. a pixel, wherein the number of indexes that have been scanned in the index map is greater than L, wherein the decoding module converts the c-th index scanned in the index map into coordinates (x, y), The scanned c-1 index is converted into a coordinate (m, n), and the scanned cL index in the index map is converted into a coordinate (p, q), wherein the index corresponding to the coordinate (p, q) The value of Q and the index of the corresponding coordinate (m, n) are R, wherein when the decoding module determines to use the upward copy run mode to decode the picture corresponding to the c-1 index scanned in the index map When the prime, the index map is reconstructed according to the cL index and the running character value in the index map, wherein the value of the c index scanned in the index map is (Q+1) divided by 2 a remainder obtained, wherein when the decoding module uses the left copy mode to decode the pixel corresponding to the c-1th index scanned in the index map, according to the corresponding scanned c in the index map - indexing the index map with the value of the index and the run character, wherein the index c is scanned in the index map The value obtained by dividing (R+1) by 2 is the remainder. 如申請專利範圍第23項所述之解碼器,其中該索引地圖中對應該第一編碼單元的每一畫素的索引值是以該L×L矩陣形式排列,並且在該索引地圖中已被掃描的索引的個數為c,其中c為大於0且小於或等於(L×L)的正整數,其中當該解碼模組解碼對應該索引地圖中所掃描的第c個索引的畫素時,判斷對應該第c個索引的該複製模式是使用一向上複製跑模式或一向左複製跑模式來解碼對應該索引地圖中所掃描 的第c個索引的畫素,其中在該索引地圖中已被掃描的索引的個數大於L,其中當該解碼模組判斷使用該向上複製跑模式解碼對應該索引地圖中所掃描的第c個索引的畫素時,將對應該索引地圖中所掃描的第c個索引轉換為座標(x,y),將對應該索引地圖中已掃描的第c-L個索引轉換為座標(p,q),以及根據該索引地圖中已掃描的第c-L個索引和該跑字符的值重建該索引地圖。 The decoder of claim 23, wherein an index value of each pixel corresponding to the first coding unit in the index map is arranged in the L×L matrix form, and has been The number of scanned indexes is c, where c is a positive integer greater than 0 and less than or equal to (L×L), wherein when the decoding module decodes the pixels corresponding to the c-th index scanned in the index map , determining that the copy mode corresponding to the c-th index is to use an upward copy run mode or a left copy run mode to decode the scan corresponding to the index map a pixel of the c-th index, wherein the number of indexes that have been scanned in the index map is greater than L, wherein when the decoding module determines to use the upward copy run mode to decode the corresponding c-scan in the index map When the elements of the index are converted, the c-th index scanned in the index map is converted into a coordinate (x, y), and the c-th index scanned in the index map is converted into a coordinate (p, q). And reconstructing the index map based on the scanned cL index and the value of the running character in the index map. 如申請專利範圍第23項所述之解碼器,其中該編碼值接收模組更接收對應該第一索引畫素與該第二索引畫素的一識別值,其中該解碼模組根據該識別值從一畫素對表中識別該第一索引畫素的顏色與該第二索引畫素的顏色。 The decoder of claim 23, wherein the code value receiving module further receives an identification value corresponding to the first index pixel and the second index pixel, wherein the decoding module is based on the identification value. The color of the first index pixel and the color of the second index pixel are identified from a pixel pair table. 如申請專利範圍第23項所述之解碼器,其中該編碼值接收模組更接收該第一索引畫素的顏色與該第二索引畫素的顏色。 The decoder of claim 23, wherein the code value receiving module further receives the color of the first index pixel and the color of the second index pixel. 一種編解碼系統,包括:一編碼器,接收一畫面的一第一編碼單元,其中該第一編碼單元具有以一L×L矩陣形式的多個畫素,其中L為正整數;以及一解碼器,其中該編碼器在該畫面中的多個畫素中選出兩個畫素作為一第一索引畫素與一第二索引畫素,其中該第一索引畫素的顏色不同於該第二索引畫素的顏色,其中該編碼器對該第一編碼單元中的每一畫素進行索引編號 以產生一索引地圖,其中在該索引地圖中該第一編碼單元的每一畫素的顏色是以對應該第一索引畫素的索引值或對應該第二索引畫素的索引值來呈現,其中在該索引地圖中僅對應該第一編碼單元的該些畫素的第1個畫素的索引值被記錄在該編碼值中。 A codec system comprising: an encoder receiving a first coding unit of a picture, wherein the first coding unit has a plurality of pixels in the form of an L×L matrix, wherein L is a positive integer; and a decoding The encoder selects two pixels in the plurality of pixels in the picture as a first index pixel and a second index pixel, wherein the color of the first index pixel is different from the second The color of the index pixel, wherein the encoder indexes the number of each pixel in the first coding unit An index map is generated, wherein a color of each pixel of the first coding unit in the index map is presented by an index value corresponding to the first index pixel or an index value corresponding to the second index pixel. The index value of the first pixel of the pixels corresponding to the first coding unit in the index map is recorded in the code value. 如申請專利範圍第29項所述之編解碼系統,其中該解碼器接收對應該第一編碼單元的該編碼值,其中該解碼器根據該編碼值中的一索引值、至少一複製模式以及至少一跑字符的值重建對應該第一編碼單元的該索引地圖,且所接收的該編碼值內的索引值僅包括該索引地圖中的該第一編碼單元的該些畫素的第1個畫素的索引值,其中該解碼器獲得該第一索引畫素的顏色與該第二索引畫素的顏色,其中該解碼器根據該第一索引畫素的顏色、該第二索引畫素的顏色與該索引地圖的多個索引值重建該第一編碼單元的該些畫素。 The codec system of claim 29, wherein the decoder receives the encoded value corresponding to the first coding unit, wherein the decoder is based on an index value, at least one copy mode, and at least The value of a running character reconstructs the index map corresponding to the first coding unit, and the received index value in the encoded value includes only the first picture of the pixels of the first coding unit in the index map. An index value of the element, wherein the decoder obtains a color of the first index pixel and a color of the second index pixel, wherein the decoder is configured according to a color of the first index pixel and a color of the second index pixel Reconstructing the pixels of the first coding unit with a plurality of index values of the index map. 如申請專利範圍第29項所述之編解碼系統,其中該畫面中的該些畫素包括鄰近於該第一編碼單元的至少一第二編碼單元中鄰近於該第一編碼單元的多個第三畫素。 The codec system of claim 29, wherein the pixels in the picture comprise a plurality of pixels adjacent to the first coding unit in the at least one second coding unit adjacent to the first coding unit Three pixels. 如申請專利範圍第31項所述之編解碼系統,其中該些第三畫素分別為鄰近於該第一編碼單元的第1行第1列個畫素的上邊緣與左邊緣的兩個畫素,鄰近於該第一編碼單元的第1行第L 列個畫素的上邊緣的一個畫素,鄰近於該第一編碼單元的第L行第1列個畫素的左邊緣的一個畫素以及對應於該第一編碼單元的第1行第1列個畫素的左上角的一個畫素。 The codec system of claim 31, wherein the third pixels are respectively two paintings of an upper edge and a left edge of the first row and the first column of the first row of the first coding unit. Prime, adjacent to the first row of the first coding unit L a pixel of the upper edge of the column of pixels, a pixel adjacent to the left edge of the first column of pixels of the Lth row of the first coding unit, and the first row corresponding to the first coding unit A pixel in the upper left corner of a pixel. 如申請專利範圍第32項所述之編解碼系統,其中該編碼器更建立一畫素對表,其中該編碼器依據該些第三畫素產生多個畫素對,且將對應每一該些畫素對的一識別值與對應該識別值的每一組畫素的顏色記錄於該畫素對表中,其中該編碼器根據該畫素對表選擇其中一個畫素對,其中該其中一個畫素對的兩個畫素被設定為該第一索引畫素與該第二索引畫素。 The codec system of claim 32, wherein the encoder further establishes a pixel pair table, wherein the encoder generates a plurality of pixel pairs according to the third pixels, and corresponds to each of the pixels. An identification value of the pair of pixels and a color of each set of pixels corresponding to the recognized value are recorded in the pixel pair table, wherein the encoder selects one of the pixel pairs according to the pixel pair table, wherein the pixel pair Two pixels of a pixel pair are set as the first index pixel and the second index pixel. 如申請專利範圍第31項所述之編解碼系統,其中該編碼器根據該些畫素的畫素值將該些畫素分群為多個叢集,其中該些畫素之中同一個叢集內的畫素的畫素值相同,其中該編碼器依據對應每一該些叢集的畫素的數量選擇一第一叢集與一第二叢集,其中該第一索引畫素屬於該第一叢集,該第二索引畫素屬於該第二叢集,並且該第一叢集的畫素的數量與該第二叢集的畫素的數量皆大於該些叢集之中的其他叢集的畫素的數量。 The codec system of claim 31, wherein the encoder groups the pixels into a plurality of clusters according to pixel values of the pixels, wherein the pixels are in the same cluster The pixel values of the pixels are the same, wherein the encoder selects a first cluster and a second cluster according to the number of pixels corresponding to each of the clusters, wherein the first index pixel belongs to the first cluster, the first The two index pixels belong to the second cluster, and the number of pixels of the first cluster and the number of pixels of the second cluster are greater than the number of pixels of other clusters in the cluster. 如申請專利範圍第31項所述之編解碼系統,其中該編碼器根據該鄰近範圍內的該些畫素的畫素值將該些畫素分群為多個叢集,其中該些叢集之中同一個叢集內的任兩個畫素的畫素值的 差值小於一預先定義差值,其中該編碼器依據對應每一該些叢集的畫素的數量選擇一第一叢集與一第二叢集,其中該第一索引畫素屬於該第一叢集,該第二索引畫素屬於該第二叢集,並且該第一叢集的畫素的數量與該第二叢集的畫素的數量皆大於該些叢集之中的其他叢集的畫素的數量。 The codec system of claim 31, wherein the encoder groups the pixels into a plurality of clusters according to pixel values of the pixels in the proximity range, wherein the clusters are the same The pixel values of any two pixels in a cluster The difference is less than a predefined difference, wherein the encoder selects a first cluster and a second cluster according to the number of pixels corresponding to each of the clusters, wherein the first index pixel belongs to the first cluster, and the first index pixel belongs to the first cluster, The second index pixel belongs to the second cluster, and the number of pixels of the first cluster and the number of pixels of the second cluster are greater than the number of pixels of other clusters among the clusters. 如申請專利範圍第33項所述之編解碼系統,其中該編碼器更用以將該編碼值與該識別值傳送至該解碼器,且該編碼值包括該第一編碼單元的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 The codec system of claim 33, wherein the encoder is further configured to transmit the encoded value and the identification value to the decoder, and the encoded value includes a pixel of the first coding unit. The index value of the first pixel, at least one copy mode, and a value of at least one run character. 如申請專利範圍第29項所述之編解碼系統,其中該編碼器直接傳送該編碼值、該第一索引畫素的顏色與該第二索引畫素的顏色至該解碼器,其中該編碼值包括該第一編碼單元的畫素之中的第1個畫素的索引值、至少一複製模式以及至少一跑字符的值。 The codec system of claim 29, wherein the encoder directly transmits the coded value, the color of the first index pixel and the color of the second index pixel to the decoder, wherein the code value The index value of the first pixel among the pixels of the first coding unit, at least one copy mode, and a value of at least one run character. 如申請專利範圍第30項所述之編解碼系統,其中該索引地圖中對應該第一編碼單元的每一畫素的索引值是以該L×L矩陣形式排列,並且在該索引地圖中已被掃描的索引的個數為c,其中c為大於0且小於或等於(L×L)的正整數,且該第1個畫素的索引值為該索引地圖中所掃描的第1個索引,其中,若該第c個索引的該複製模式是一向左複製跑模式,則當該解碼器解碼對應該索引地圖中所掃描的第1個索引的畫素 時,根據該索引地圖中所掃描的第1個索引和該跑字符的值重建該索引地圖,其中在該索引地圖中已被掃描的索引的個數小於或等於L時,該解碼器將該所掃描的第c個索引轉換為座標(x,y),以及將已掃描的第c-1個索引轉換為座標(m,n),其中對應該座標(m,n)的索引的值為P,其中當該解碼器解碼對應該索引地圖中所掃描的第c個索引的畫素時,根據該索引地圖中該所掃描的第c-1個索引和該跑字符的值重建該索引地圖,其中該索引地圖中該所掃描的第c個索引的值為(P+1)除以2所獲得的餘數。 The codec system of claim 30, wherein an index value of each pixel corresponding to the first coding unit in the index map is arranged in the L×L matrix, and in the index map The number of indexes to be scanned is c, where c is a positive integer greater than 0 and less than or equal to (L×L), and the index value of the first pixel is the first index scanned in the index map. Wherein, if the copy mode of the c-th index is a left-left copy run mode, when the decoder decodes the pixel corresponding to the first index scanned in the index map And reconstructing the index map according to the first index scanned in the index map and the value of the running character, wherein when the number of indexes that have been scanned in the index map is less than or equal to L, the decoder will The scanned c-th index is converted to a coordinate (x, y), and the scanned c-1 index is converted into a coordinate (m, n), wherein the value of the index corresponding to the coordinate (m, n) is P, wherein when the decoder decodes a pixel corresponding to the c-th index scanned in the index map, the index map is reconstructed according to the scanned c-1 index and the value of the running character in the index map. , wherein the value of the c-th index scanned in the index map is (P+1) divided by 2 to obtain a remainder. 如申請專利範圍第38項所述之編解碼系統,其中當該解碼器解碼對應該索引地圖中所掃描的第c個索引的畫素時,更判斷對應該第c-1個索引的複製模式是使用一向上複製跑模式或該向左複製跑模式來解碼對應該索引地圖中所掃描的第c-1個索引的畫素,其中在該索引地圖中已被掃描的索引的個數大於L,其中該解碼器將應該索引地圖中所掃描的第c個索引轉換為座標(x,y),將該已掃描的第c-1個索引轉換為座標(m,n),以及將對應該索引地圖中已掃描的第c-L個索引轉換為座標(p,q),其中對應該座標(p,q)的索引的值為Q以及對應該座標(m,n)的索引的值為R,當該解碼器判斷使用該向上複製跑模式解碼對應該索引地圖中所掃描的第c-1個索引的畫素時,根據該索引地圖中已掃描的第 c-L個索引和該跑字符的值重建該索引地圖,其中該索引地圖中所掃描的第c個索引的值為(Q+1)除以2所獲得的餘數,其中當該解碼器斷使用該向左複製跑模式解碼對應該索引地圖中所掃描的第c-1個索引的畫素時,根據對應該索引地圖中已掃描的第c-1個索引和該跑字符的值重建該索引地圖,其中該索引地圖中所掃描的第c個索引的值為(R+1)除以2所獲得的餘數。 The codec system of claim 38, wherein when the decoder decodes a pixel corresponding to the c-th index scanned in the index map, it further determines a copy mode corresponding to the c-1th index. Is to use an upward copy run mode or the left copy run mode to decode a pixel corresponding to the c-1th index scanned in the index map, wherein the number of indexes that have been scanned in the index map is greater than L , wherein the decoder converts the c-th index scanned in the index map into coordinates (x, y), converts the scanned c-1 index into coordinates (m, n), and corresponds to The cL index scanned in the index map is converted into a coordinate (p, q), wherein the value of the index corresponding to the coordinate (p, q) is Q and the value of the index corresponding to the coordinate (m, n) is R, When the decoder determines to use the up copy run mode to decode the pixel corresponding to the c-1th index scanned in the index map, according to the scanned map in the index Refining the index map by cL indexes and values of the running characters, wherein the value of the c-th index scanned in the index map is (Q+1) divided by 2, wherein the decoder uses the Copying the running mode to the left to decode the pixel of the c-1th index scanned in the index map, reconstructing the index map according to the value of the c-1 index scanned in the index map and the value of the running character , wherein the value of the c-th index scanned in the index map is (R+1) divided by 2 to obtain the remainder. 如申請專利範圍第30項所述之編解碼系統,其中該索引地圖中對應該第一編碼單元的每一畫素的索引值是以該L×L矩陣形式排列,並且在該索引地圖中已被掃描的索引的個數為c,其中c為大於0且小於或等於(L×L)的正整數,其中當該解碼器解碼對應該索引地圖中所掃描的第c個索引的畫素時,判斷對應該第c個索引的該複製模式是使用一向上複製跑模式或一向左複製跑模式來解碼對應該索引地圖中所掃描的第c個索引的畫素,其中在該索引地圖中已被掃描的索引的個數大於L,其中當該解碼器判斷使用該向上複製跑模式解碼對應該索引地圖中所掃描的第c個索引的畫素時,將對應該索引地圖中所掃描的第c個索引轉換為座標(x,y),將對應該索引地圖中已掃描的第c-L個索引轉換為座標(p,q),以及根據該索引地圖中已掃描的第c-L個索引和該跑字符的值重建該索引地圖。 The codec system of claim 30, wherein an index value of each pixel corresponding to the first coding unit in the index map is arranged in the L×L matrix, and in the index map The number of indexes to be scanned is c, where c is a positive integer greater than 0 and less than or equal to (L x L), wherein when the decoder decodes the pixels corresponding to the c-th index scanned in the index map Determining that the copy mode corresponding to the c-th index is to use an up copy run mode or a left copy run mode to decode a pixel corresponding to the c-th index scanned in the index map, wherein the index map has The number of indexes to be scanned is greater than L, wherein when the decoder determines to use the upward copy run mode to decode the pixels corresponding to the c-th index scanned in the index map, the corresponding scan in the index map will be The c indexes are converted into coordinates (x, y), and the cL index that has been scanned in the index map is converted into coordinates (p, q), and the cL index and the run are scanned according to the index map. The value of the character reconstructs the index map . 如申請專利範圍第30項所述之編解碼系統,其中該解碼器更接收對應該第一索引畫素與該第二索引畫素的一識別值, 其中該解碼器根據該識別值從一畫素對表中識別該第一索引畫素的顏色與該第二索引畫素的顏色。 The codec system of claim 30, wherein the decoder further receives an identification value corresponding to the first index pixel and the second index pixel, The decoder identifies the color of the first index pixel and the color of the second index pixel from a pixel pair table according to the identification value. 如申請專利範圍第30項所述之編解碼系統,其中該解碼器更接收該第一索引畫素的顏色與該第二索引畫素的顏色。 The codec system of claim 30, wherein the decoder further receives the color of the first index pixel and the color of the second index pixel.
TW104115225A 2014-06-13 2015-05-13 Method and system for encoding and decoding, encoder and decoder TWI581617B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201510315424.1A CN105282550A (en) 2014-06-13 2015-06-10 Encoding method and decoding method, encoding and decoding system, encoder and decoder
US14/736,275 US20150365685A1 (en) 2014-06-13 2015-06-11 Method and system for encoding and decoding, encoder and decoder
EP15171546.3A EP2955920A1 (en) 2014-06-13 2015-06-11 Method and system for encoding and decoding, encoder and decoder
US15/866,493 US20180131949A1 (en) 2014-06-13 2018-01-10 Method and system for encoding and decoding, encoder and decoder

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201462011584P 2014-06-13 2014-06-13
US201462045513P 2014-09-03 2014-09-03

Publications (2)

Publication Number Publication Date
TW201547259A TW201547259A (en) 2015-12-16
TWI581617B true TWI581617B (en) 2017-05-01

Family

ID=55407636

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104115225A TWI581617B (en) 2014-06-13 2015-05-13 Method and system for encoding and decoding, encoder and decoder

Country Status (1)

Country Link
TW (1) TWI581617B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014036848A1 (en) * 2012-09-05 2014-03-13 Lg Electronics (China) R & D Center Co., Ltd. Depth picture intra coding /decoding method and video coder/decoder

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014036848A1 (en) * 2012-09-05 2014-03-13 Lg Electronics (China) R & D Center Co., Ltd. Depth picture intra coding /decoding method and video coder/decoder

Also Published As

Publication number Publication date
TW201547259A (en) 2015-12-16

Similar Documents

Publication Publication Date Title
US11785215B2 (en) Encoding method, decoding method, encoding/decoding system, encoder, and decoder
US20180131949A1 (en) Method and system for encoding and decoding, encoder and decoder
TW201526617A (en) Method and system for image processing, decoding method, encoder and decoder
US20160100161A1 (en) Decoder, encoder, decoding method, encoding method, and codec system
US20170155899A1 (en) Image compression method and apparatus using matching
US20220116628A1 (en) Efficient lossless compression of captured raw image information systems and methods
CN105959724B (en) Video data processing method and device
KR101946598B1 (en) Image coding and decoding method and device
US20100322597A1 (en) Method of compression of graphics images and videos
JP2013135463A (en) Moving image compressing apparatus, image processing apparatus, moving image compressing method, image processing method, and data structure of moving image compressed file
KR20240042127A (en) Method and apparatus for intra prediction
US20150030066A1 (en) Screen content coding systems and methods
WO2019011917A1 (en) Method and device for encoding a point cloud
EP3896976A1 (en) Image coding and decoding methods, image processing device, and computer storage medium
WO2021147463A1 (en) Video processing method and device, and electronic apparatus
WO2021237569A1 (en) Encoding method, decoding method, apparatus and system
CN111406404B (en) Compression method, decompression method, system and storage medium for obtaining video file
TWI581617B (en) Method and system for encoding and decoding, encoder and decoder
TWI565302B (en) Decoder, encoder, method for decoding, method for encoding, and system for encoding and decoding
US10390019B2 (en) Method and device for encoding a multidimensional digital signal, in particular an image signal, and corresponding method and device for decoding
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
JP3711104B2 (en) Image compression apparatus and image compression method
US20140253759A1 (en) Pixel-based directional prediction patterns for digital coding of images
JPH09120458A (en) Image encoding method