200939198 .九、發明說明: 【發明所屬之技術領域】 本發明係關於一種加馬查找表存儲方法。 【先前技術】 爲了提局液晶顯示裝置的顯示效果,加馬校正是一種 廣泛使用的方法。要實現加馬校正,加馬查找表是不可缺 少的。 》 請參閲圖1’其係一種傳統的加馬查找表存儲方案的 示意圖。在該加馬查找表中,無論每個加馬值實際有多少 位元(Bit),都是以10位元的形式存儲。例如:第i個加馬 值的低八位bitO(l)〜bit7(l)分別存儲在地址為〇的位元組 (Byte)的 bitO 至 bit7 中,其高二位 bit8(l)、bit9(l)分別存 儲在地址為4的位元組的bitO及bitl中;第2個加馬值的 低八位bit0(2)~bit7(2)分別存儲在地址為1的位元組的bit〇 •至bit7中,其高二位bit8(2)、bit9(2)分別存儲在地址為4 的位元組的bit2及bit3中;第3個加馬值的低八位 bit0(3)〜bit7(3)分別存儲在地址為2的位元組的bit〇至bit7 中,其咼二位bit8(3)、bit9(3)分別存儲在地址為4的位元 組的bit4及bit5中;第4個加馬值的低八位bit〇(4)〜bit7(4) 分別存儲在地址為3的位元組的bu〇至Mt7中,其高二位 bU8(4)、Mt9(4)分別存儲在地址為4的位元組的bh6及 中。即第1個至第4個加馬值存儲在地址為0至4的位元 組中,4個加馬值佔用5個位元組的存儲空間。第5個至 200939198 第256個加馬值的存儲方法可依此類推,因此256個加馬 ‘值佔用32〇個位元組的存儲空間。 • 爲了成本的考量’業界希望將加馬查找表和OSD參數 起保存在一個容量為1〇24位元組的記憶體中。〇SD參 數需要佔用約180位元組的存儲空間,因此該記憶體的剩 餘存儲空間為844位元纪。在液晶顯示裝置中,加馬查找 表有三個,分別對應紅色、綠色和藍色,每個查找表&兩 要佔用320位元組的存儲空間,因此3個加馬查找表^ 佔用960位元組的存儲空間。因此該記憶體無法同時 該3個加馬查找表及〇SD參數。 【發明内容】 查找表存 健方=需提供一種能減少存健空間的加馬 ❹ 3或4 &/、、—找表存儲方法,其中,位元個數為1、2 ^ 4的加馬值以4位元的形式存儲; 的加馬值以6位元的报彳am 叫数馮5或 值以存儲;位元個數為7或8的加. 值式存儲;位元個數為9 : 10位兀的形式存儲。 』加馬值j200939198. Nine, invention description: [Technical field to which the invention pertains] The present invention relates to a method for storing a gamma lookup table. [Prior Art] In order to improve the display effect of the liquid crystal display device, the gamma correction is a widely used method. To achieve the correction of the horse, the Jamaican lookup table is indispensable. Please refer to Figure 1' for a schematic diagram of a conventional gamma lookup table storage scheme. In the gamma lookup table, no matter how many bits (bits) each gamma value actually has, it is stored in the form of 10 bits. For example, the lower eight bits of the i-th gamma value bitO(l)~bit7(l) are stored in bitO to bit7 of the byte of the address 〇, respectively, and the upper two bits bit8(l), bit9( l) Stored in bitO and bitl of the byte with address 4 respectively; the lower eight bits of bit 2 (bit 2) to bit 7 (2) of the second gamma value are stored in the bit of address byte 1. • In bit7, the upper two bits of bit8(2) and bit9(2) are stored in bits 2 and 3 of the address of address 4; the lower eight bits of the third added value are bit0(3) to bit7 ( 3) Stored in bit 〇 to bit 7 of the byte of address 2, respectively, and bit 2 (8) and bit 9 (3) of bit 2 are stored in bit 4 and bit 5 of the byte of address 4; The lower eight bits of the gamma value 〇(4)~bit7(4) are stored in the 〇 to Mt7 of the byte of the address 3, respectively, and the upper two bits bU8(4) and Mt9(4) are respectively stored in Bh6 and middle of the byte of address 4. That is, the first to fourth gamma values are stored in the byte of address 0 to 4, and the four gamma values occupy the storage space of 5 bytes. The 5th to 200939198 256th gamma storage method can be deduced by analogy, so 256 gamma ‘values occupy 32 位 bytes of storage space. • For cost considerations, the industry wants to store the Gamma lookup table and OSD parameters in a memory of 1〇24 bytes. The 〇SD parameter needs to occupy about 180 bytes of storage space, so the remaining storage space of the memory is 844 bits. In the liquid crystal display device, there are three gamma lookup tables, respectively corresponding to red, green and blue, and each lookup table & two takes up 320 bytes of storage space, so three gamma lookup tables ^ occupy 960 bits The storage space of the tuple. Therefore, the memory cannot simultaneously have the three gamma lookup tables and the 〇SD parameters. [Summary of the Invention] The lookup table saves the health side = need to provide a Jiamao 3 or 4 & /, - lookup table storage method that can reduce the storage space, wherein the number of bits is 1, 2 ^ 4 plus The horse value is stored in the form of 4 bits; the gamma value is stored as a 6-bit report 彳am called von 5 or a value; the number of bits is 7 or 8 plus. Value storage; number of bits Stored in the form of 9:10 digits. 』加马值j
值相叙種加馬查找表存儲方法’其根據加馬值的-推心 ,位數進行分類細,且存儲格式是 進制I 最多的加馬值為標準。 類中位元個凄 馬值比,本發明加馬查找表存儲方法根攄办 痛了記憶體的存儲空間。 仃存儲,從而有效節 200939198 【實施方式】 ^ 請參閲圖2,其係本發明加馬查找表存儲方案的示意 ' 圖。採用本發明加馬查找表存儲方法的原始加馬查找表需 要滿足以下關係:位元個數為1、2、3或4的加馬值為 Kl(Kl=2k,k為自然數)個,位元個數為5或6的加馬值為 K2(K2=4m,m為自然數)個,位元個數為7或8的加馬值 為Κ3(Κ3=η,η為自然數)個,位元個數為9或10的加馬 值為 K4(K4=4t , t 為自然數)個,並且 〇 K4/4+K3+K2/4+K1/2+4S280。ΚΙ、K2、K3 及 K4 的二進制 數值分別存儲在地址為0至3的位元組中(即M0區塊), 具體存儲格式為:K1的二進制數值bitO(Kl)〜bit7(Kl)存儲 在地址為0的位元組的bitO至bit7中,K2的二進制數值 bitO(K2)〜bit7(K2)存儲在地址為1的位元組的bitO至bit7 中,K3的二進制數值bitO(K3)~bit7(K3)存儲在地址為2的 位元組的bitO至bit7中,K4的二進制數值bitO(K4)〜bit7(K4) Ο 存儲在地址為3的位元組的bitO至bit7中。 位元個數為1、2、3或4的加馬值均是以4位元的形 式存儲在地址為4至K1/2 + 3的位元組中(即Ml區塊),具 體存儲格式為:第1個數bitO(l)〜bit3(l)存儲在地址為4 的位元組的bitO至bit3中,第2個數bit〇(2)〜bit3(2)存儲 在地址為4的位元組的bit4至bit7中,第3個數 bit0(3)〜bit3(3)存儲在地址為5的位元組的bit〇至bit3中, 第4個數bit0(4)〜bit3(4)存儲在地址為5的位元組的bit4 至bit7中,第5至第K1個數的存儲格式可依此類推。 200939198 位元個數為5或6的加馬值均是以6位元的形式存儲 *在地址為K1/2+4至K2/4+K1/2+3的位元組中(即M2區 塊),具體存儲格式為:第1個數bitO(l)〜bit5(l)存儲在地 址為K1/2+4的位元組的bitO至bit5中;第2個數 bit0(2)〜bit5(2)存儲在地址為K1/2+5的位元組的bitO至 bit5中;第3個數bit0(3)〜bit5(3)存儲在地址為K1/2+6的 位元組的bitO至bit5中;第4個數的低二位bit0(4)、bitl(4) 存儲在地址為K1/2+4的位元組的bit6、bit7中,其中間二 〇位bit2(4)、bit3(4)存儲在地址為K1/2+5的位元組的bit6、 bit7中’其高二位bit4(4)、bit5(4)存儲在地址為K1/2+6 的位元組的bit6、bit7中;第5至第K2個數的存儲格式可 依此類推。 位元個數為7或8的加馬值均是以8位元的形式存儲 在地址為K2/4+K1/2+4至K3 + K2/4+K1/2+3的位元組中(即 M3區塊),具體存儲格式為:第丄個數bit〇(1)〜bit7(1)存儲 ❹在地址為K2/4 + K1/2+4的位元組的bitO至bit7中,第2 個數bit0(2)〜bit7(2)存儲在地址為Κ2/4 + Κ1/2+5的位元組 的bitO至bit7中,第3個數bit0(3)〜bit7(3)存儲在地址為The value phase narration of the gamma lookup table storage method 'is categorized according to the gamma-to-push, the number of bits, and the storage format is the maximum value of the gamma I value. In the class, the 凄 horse value ratio, the storage method of the gamma lookup table of the present invention has a painful memory storage space.仃Storage, thus effective section 200939198 [Embodiment] ^ Please refer to FIG. 2, which is a schematic diagram of the storage scheme of the gamma lookup table of the present invention. The original gamma lookup table using the gamma lookup table storage method of the present invention needs to satisfy the following relationship: the gamma value of the number of bits of 1, 2, 3 or 4 is Kl (Kl=2k, k is a natural number), The gamma value of the number of bits 5 or 6 is K2 (K2=4m, m is a natural number), and the gamma value of the number of bits 7 or 8 is Κ3 (Κ3=η, η is a natural number) The gamma value of the number of bits 9 or 10 is K4 (K4=4t, t is a natural number), and 〇K4/4+K3+K2/4+K1/2+4S280. The binary values of ΚΙ, K2, K3, and K4 are stored in the byte of address 0 to 3 (ie, M0 block). The specific storage format is: K1 binary value bitO(Kl)~bit7(Kl) is stored in In bit 0 to bit 7 of the byte of address 0, the binary value bitO(K2) to bit7(K2) of K2 is stored in bitO to bit7 of the byte of address 1, and the binary value bitO(K3) of K3~ Bit 7 (K3) is stored in bit 0 to bit 7 of the byte of address 2, and the binary value bitO (K4) to bit 7 (K4) of K4 are stored in bit 0 to bit 7 of the byte of address 3. The gamma value with the number of bits 1, 2, 3 or 4 is stored in the form of 4 bits in the byte of address 4 to K1/2 + 3 (ie, M1 block), the specific storage format For example, the first digits bitO(l) to bit3(l) are stored in bitO to bit3 of the byte of address 4, and the second digits 〇(2) to bit3(2) are stored at address 4. In bit 4 to bit 7 of the byte, the third bit 0 (3) to bit 3 (3) are stored in bit 〇 to bit 3 of the byte of address 5, and the fourth number bit 0 (4) to bit 3 (4) Stored in bits 4 to 7 of the byte of address 5, the storage format of the 5th to K1th numbers can be deduced by analogy. 200939198 The gamma value with 5 or 6 bits is stored in 6-bit form * in the byte with address K1/2+4 to K2/4+K1/2+3 (ie M2 area) Block), the specific storage format is: the first number bitO(l)~bit5(l) is stored in bitO to bit5 of the byte of address K1/2+4; the second number bit0(2)~bit5 (2) Stored in bitO to bit5 of the byte of address K1/2+5; the third number bit0(3)~bit5(3) is stored in bitO of the byte of address K1/2+6 To bit5; the lower two bits of bit 4 (4) and bitl (4) of the fourth number are stored in bits 6 and 7 of the byte of address K1/2+4, and the middle two bits bit 2 (4), Bit3 (4) is stored in bit 6 and bit 7 of the byte of address K1/2+5. 'The upper two bits of bit 4 (4) and bit 5 (4) are stored in bit 6 of the bit of address K1/2+6. , bit7; the storage format of the 5th to K2th numbers can be deduced by analogy. The gamma values of the number of bits 7 or 8 are stored in the form of octets in the byte of address K2/4+K1/2+4 to K3 + K2/4+K1/2+3. (ie, M3 block), the specific storage format is: the first number of bits 〇(1)~bit7(1) are stored in bitO to bit7 of the byte of address K2/4 + K1/2+4, The second number bit0(2) to bit7(2) are stored in bitO to bit7 of the byte of address Κ2/4 + Κ1/2+5, and the third number bit0(3) to bit7(3) are stored. At address is
K2/4+K1/2+6的位元組的bitO至bit7中,第4個數 bit0(4)〜bit7(4)存儲在地址為K2/4+K1/2+7的位元組的bitO 至bit7中,第5至第K3個數的存儲格式可依此類推。 位元個數為9或1〇的加馬值均是以位元的形式存 儲在地址為 K3+K2/4+K1/2+4 至 K4/4+K3+K2/4+K1/2+3 的 位元組中(即M4區塊),具體存儲格式為:第【個數的低 200939198 八位bitO(l)〜bit7(l)存儲在地址為K3+K2/4+K1/2+4的位元 -組的bitO至bit7中,其高二位bit8(l)、bit9(l)存儲在地址 為K3+K2/4+K1/2+8的位元組的bitO及bitl中;第2個數 的低八位bit0(2)〜bit7(2)存儲在地址為K3+K2/4+K1/2+5的 位元組的bitO至bit7中,其高二位bit8(2)、bit9(2)存儲在 地址為K3+K2/4+K1/2 + 8的位元組的bit2及bit3中;第3 個數的低八位 bit0(3)〜bit7(3)存儲在地址為 K3+K2/4+K1/2+6的位元組的bitO至bit7中,其高二位 〇 bit8(3)、bit9(3)存儲在地址為K3+K2/4 + K1/2+8的位元組 的bit4及bit5中;第4個數的低八位bit0(4)〜bit7(4)存健 在地址為K3+K2/4+K1/2+7的位元組的bitO至bit7中,其 高二位 bit8(4)、bit9(4)存儲在地址為 K3+K2/4+K1/2+8 的 位元組的bit6及bit7中;第5至第K3個數的存儲格式可 依此類推。 請參閱圖3,其係本發明加馬查找表存儲方案的編% Ο 流程圖。該編碼流程包括以下步驟: 步驟S0 :開始。 步驟S1 :計算κι、K2、K3及K4。 計算ΚΙ、K2、K3及K4的具體流程如圖4所示。 步驟S2 :將ΚΙ、K2、K3及K4的二進制數值存入 M0區塊中。 先將ΚΙ、K2、K3及K4轉換為二進制數,然後按如 下規則存儲:K1的二進制數值bitO(Kl)〜bit7(Kl)存儲在地 址為0的位元組的bitO至bit7中,K2的二進制數值 200939198 bitO(K2)〜bit7(K2)存儲在地址為1的位元組的bitO至bit7 中,K3的二進制數值bitO(K3)〜bit7(K3)存儲在地址為2的 * 位元組的bitO至bit7中,K4的二進制數值bitO(K4)~bit7(K4) 存儲在地址為3的位元組的bitO至bit7中。 步驟S3 :根據Ml區塊存儲數據的規則對位元個數為 1、2、3或4的加馬值進行編碼。 步驟S4 :將位元個數為1、2、3或4的加馬值存入 Μ1區塊中。 〇 步驟S5 :根據M2區塊存儲數據的規則對位元個數為 5或6的加馬值進行編碼。 步驟S6 :將位元個數為5或6的加馬值存入M2區塊 中〇 步驟S7 :根據M3區塊存儲數據的規則對位元個數為 7或8的加馬值進行編碼。 步驟S8 :將位元個數為7或8的加馬值存入M3區塊 中〇 ❹ 步驟S9 :根據Μ4區塊存儲數據的規則對位元個數為 9或10的加馬值進行編碼。 步驟S10 :將位元個數為9或10的加馬值存入Μ4區 塊中。 步驟S11 :結束。 請參閲圖4,其係圖3中計算ΚΙ、Κ2、Κ3及Κ4的流 程圖。該計算流程包括以下步驟: 步驟S101 :初始化變量i,使i=0。 11 200939198 步驟S102 :判斷Gamma(i)$16 ?如果是,執行步驟 5103 ;如果否,執行步驟S107。 * 步驟S103:判斷MOD((i+l)/2)=0?如果是,執行步驟 5104 ;如果否,執行步驟S105。 步驟 S104 : Kl=i+1。 步驟S105 :使i加1。 步驟S106 :判斷匕255 ?如果是,執行步驟S102 ;如 果否,執行步驟S107。 〇 步驟 S107 : i=Kl + l。 步驟S108 :判斷Gamma(i)S64 ?如果是,執行步驟 S109 ;如果否,執行步驟S113。 步驟S109 :判斷MOD((i + l-Kl)/4)=0?如果是,執行 步驟S110 ;如果否,執行步驟S111。 步驟 S110 : K2= i + 1-Kl。 步驟S111 :使i加1。 步驟S112 :判斷匕255 ?如果是,執行步驟S108 ;如 果否,執行步驟S113。 步驟 S113 : i=255。 步驟S114 :判斷Gamma(i)S256 ?如果是,執行步驟 S115 ;如果否,執行步驟S116。 步驟S115 :判斷MOD((i+l)/4)=0?如果是,執行步驟 S118a ;如果否,執行步驟S116。 步驟S116 :使i減1。 步驟S117 :判斷K0 ?如果是,執行步驟S118 ;如果 12 200939198 否,執行步驟S114。 步驟S118 : K4=0,然後執行步驟S119。 • 步驟S118a : K4=255-i+l,然後執行步驟S119。 * 步驟 S119 : K3 = 256-K1-K2-K4 ° 步驟S120 :結束。 請參閲圖5,其係本發明加馬查找表存儲方案的解碼 流程圖。該解碼流程包括以下步驟: 步驟SO :開始。 〇 步驟S1:初始化變量i,使i=0。 步驟S2 :讀取K1,即讀取記憶體中地址為0的位元 組中的數據。 步驟S3 :計算Ml區塊的地址範圍。 步驟S4 :根據Ml區塊的編碼規則轉換數據。 步驟S5 :使i加1。 步驟S6 :判斷i<Kl/2+4 ?如果是,執行步驟S4 ;如 _ 果否,執行步驟S7。 步驟S7 :計算M2區塊的地址範圍。 步驟S8 :根據M2區塊的編碼規則轉換數據。 步驟S9 :使i加1。 步驟S10 :判斷i<K2/4 + Kl/2+4 ?如果是,執行步驟 S8 ;如果否,執行步驟S11。 步驟S11 :計算M3區塊的地址範圍。 步驟S12 :根據M3區塊的編碼規則轉換數據。 步驟S13 :使i加1。 13 200939198 步驟S14 :判斷i<K3+K2/4 + Kl/2+4 ?如果是,執行步 驟S12;如果否,執行步驟S15。 步驟S15 :計算M4區塊的地址範圍。 步驟S16 :根據M4區塊的編碼規則轉換數據。 步驟S17 :使i加1。 步驟 S18 :判斷 i<K4/4+K3+K2/4+Kl/2+4?如果是, 執行步驟S16 ;如果否,執行步驟S19。 步驟S19 :判斷是否為指定的加馬標準?如果是,執 Ο 行步驟S20 ;如果否,執行步驟S21。 步驟S20:執行加馬標準轉換計算,然後執行步驟S21。 步驟S21 :在對應的加馬查找表中查找。 步驟S22 :校正輸出。 步驟S23 :結束。 與先前技術相比,本發明加馬查找表存儲方法根據加 馬值的二進制數值位數的不同分類進行存儲,從而有效節 省了記憶體的存儲空間。且每個加馬查找表的總存儲容量 ◎ 不大於280位元組,因此本發明可將該3個加馬查找表及 OSD參數一起保存在一個容量為1024位元組的記憶體 中,從而達到節省成本的目的。 本發明加馬查找表存儲方法對加馬值的分類存儲並不 限於上述實施方式所述,可以有多種實施方式,下面再擧 二例進行説明。 位元個數為1、2、3、4、5、6、7或8的加馬值以8 位元的形式存儲;位元個數為9或10的加馬值以10位元 14 200939198 的形式存儲。 位元個數為i或2 元個數為3或4的加馬值以^值以2位元的形式存儲;位 為5或6的加馬值以6位_位元的形式存儲;位元個數 8的加馬值以8位元^°的形式存储,·位元個數為7或 馬值以10位元的形式存^存館;位元個數為9或10的加 總之In bit 0 to bit 7 of the K2/4+K1/2+6 byte, the 4th bit 0(4) to bit7(4) are stored in the byte of the address K2/4+K1/2+7. In bitO to bit 7, the storage format of the 5th to K3th numbers can be deduced by analogy. The gamma value of the number of bits 9 or 1 存储 is stored in the form of a bit at the address K3+K2/4+K1/2+4 to K4/4+K3+K2/4+K1/2+ 3 bytes (ie M4 block), the specific storage format is: the [number of low 200939198 octet bitO (l) ~ bit7 (l) stored at the address is K3 + K2 / 4 + K1/2 + In the bit-to-bit 7 of the bit-group of 4, the upper two bits bit8(l) and bit9(l) are stored in bitO and bitl of the byte of the address K3+K2/4+K1/2+8; The lower eight bits of the two digits bit0(2)~bit7(2) are stored in bitO to bit7 of the byte at address K3+K2/4+K1/2+5, and the upper two bits are bit8(2), bit9 (2) Stored in bit 2 and bit 3 of the byte of address K3+K2/4+K1/2 + 8; the lower eight bits of bit 3 (3) to bit 7 (3) of the third number are stored at address K3 In bitO to bit7 of the +K2/4+K1/2+6 byte, the upper two bits 〇bit8(3) and bit9(3) are stored in the address of K3+K2/4 + K1/2+8. In the bit 4 and bit 5 of the tuple; the lower eight bits of the fourth number bit 0 (4) to bit 7 (4) are stored in bits 0 to 7 of the byte of the address K3+K2/4+K1/2+7, The upper two bits of bit8(4) and bit9(4) are stored in bits 6 and 7 of the byte of address K3+K2/4+K1/2+8; The storage format of the 5th to K3th numbers can be deduced by analogy. Please refer to FIG. 3, which is a flowchart of the gamma lookup table storage scheme of the present invention. The encoding process includes the following steps: Step S0: Start. Step S1: Calculate κι, K2, K3, and K4. The specific process of calculating ΚΙ, K2, K3 and K4 is shown in Fig. 4. Step S2: The binary values of ΚΙ, K2, K3, and K4 are stored in the M0 block. First convert ΚΙ, K2, K3, and K4 into binary numbers, and then store them according to the following rules: The binary value of K1 bitO(Kl)~bit7(Kl) is stored in bitO to bit7 of the byte with address 0, K2 The binary value 200939198 bitO(K2)~bit7(K2) is stored in bitO to bit7 of the byte of address 1, and the binary value bitO(K3)~bit7(K3) of K3 is stored in the *bit of address 2. In bitO to bit 7, the binary value bitO(K4)~bit7(K4) of K4 is stored in bitO to bit7 of the byte of address 3. Step S3: Encoding the gamma value of the number of bits of 1, 2, 3 or 4 according to the rule of storing data of the M1 block. Step S4: The gamma value of the number of bits 1, 2, 3 or 4 is stored in the Μ1 block. 〇 Step S5: Encoding the gamma value of the number of bits of 5 or 6 according to the rule of storing data of the M2 block. Step S6: The gamma value of the number of bits 5 or 6 is stored in the M2 block. Step S7: The gamma value of the number of bits of 7 or 8 is encoded according to the rule of storing data of the M3 block. Step S8: storing the gamma value of the number of bits 7 or 8 in the M3 block 〇❹ Step S9: encoding the gamma value of the number of bits 9 or 10 according to the rule of storing data of the Μ4 block . Step S10: The gamma value of the number of bits 9 or 10 is stored in the Μ4 block. Step S11: End. Please refer to FIG. 4, which is a flow chart for calculating ΚΙ, Κ2, Κ3, and Κ4 in FIG. The calculation process includes the following steps: Step S101: Initialize the variable i such that i=0. 11 200939198 Step S102: Judging Gamma(i)$16? If yes, go to step 5103; if no, go to step S107. * Step S103: Judge MOD((i+l)/2) = 0? If yes, go to step 5104; if no, go to step S105. Step S104: Kl=i+1. Step S105: Add i to 1. Step S106: Judgment 匕255? If yes, go to step S102; if no, go to step S107. 〇 Step S107: i=Kl + l. Step S108: Judging Gamma(i)S64? If yes, executing step S109; if not, executing step S113. Step S109: judge MOD((i + l-Kl) / 4) = 0? If yes, execute step S110; if no, execute step S111. Step S110: K2=i + 1-Kl. Step S111: Add i to 1. Step S112: Judgment 匕 255 ? If yes, go to step S108; if no, go to step S113. Step S113: i=255. Step S114: Judging Gamma(i)S256? If yes, executing step S115; if not, executing step S116. Step S115: judge MOD ((i + l) / 4) = 0? If yes, go to step S118a; if no, go to step S116. Step S116: Decrease i by 1. Step S117: J0 is judged. If yes, step S118 is performed; if 12200939198 is no, step S114 is performed. Step S118: K4=0, and then step S119 is performed. • Step S118a: K4=255-i+1, and then step S119 is performed. * Step S119: K3 = 256-K1-K2-K4 ° Step S120: End. Please refer to FIG. 5, which is a decoding flowchart of the gamma lookup table storage scheme of the present invention. The decoding process includes the following steps: Step SO: Start. 〇 Step S1: Initialize the variable i so that i=0. Step S2: Reading K1, that is, reading data in a byte of address 0 in the memory. Step S3: Calculate the address range of the M1 block. Step S4: Convert data according to the encoding rule of the M1 block. Step S5: Add i to 1. Step S6: Judging i < Kl / 2 + 4 ? If yes, executing step S4; if _ no, executing step S7. Step S7: Calculate the address range of the M2 block. Step S8: Convert data according to the encoding rule of the M2 block. Step S9: Add i to 1. Step S10: Judging i < K2 / 4 + Kl / 2 + 4 ? If yes, executing step S8; if not, executing step S11. Step S11: Calculate the address range of the M3 block. Step S12: Convert data according to an encoding rule of the M3 block. Step S13: Add i to 1. 13 200939198 Step S14: Judgment i < K3 + K2 / 4 + Kl / 2 + 4 ? If yes, go to step S12; if no, go to step S15. Step S15: Calculate the address range of the M4 block. Step S16: Convert data according to the encoding rule of the M4 block. Step S17: Add i to 1. Step S18: Judging i<K4/4+K3+K2/4+Kl/2+4? If yes, executing step S16; if not, executing step S19. Step S19: Is it determined that the specified standard is added? If yes, go to step S20; if no, go to step S21. Step S20: Perform a gamma standard conversion calculation, and then perform step S21. Step S21: Find in the corresponding gamma lookup table. Step S22: Correct the output. Step S23: End. Compared with the prior art, the gamma lookup table storage method of the present invention stores data according to different classifications of binary value digits of the gamma value, thereby effectively saving the storage space of the memory. And the total storage capacity of each of the gamma lookup tables is ◎ no more than 280 bytes, so the present invention can store the three gamma lookup tables and the OSD parameters together in a memory of 1024 bytes, thereby Achieve cost savings. The classification storage of the gamma value in the gamma lookup table storage method of the present invention is not limited to the above embodiment, and various embodiments are possible, and two more examples will be described below. The gamma value of the number of bits 1, 2, 3, 4, 5, 6, 7, or 8 is stored in the form of 8 bits; the gamma value of the number of bits is 9 or 10 is 10 bits 14 200939198 The form of storage. The number of bits with i or 2 yuan is 3 or 4, and the value is stored as 2 bits; the value of 5 or 6 is stored as 6 bits_bit; The gamma value of the number 8 is stored in the form of octet ^°, the number of bits is 7 or the value of the horse is stored in the form of 10 bits; the total number of bits is 9 or 10.
馬值進行分類存料,存儲格m 類中位广個數最多的加馬值為標準。雜式疋以母- =上所述,本發明確已符合發明 專利申請。惟,以上所述去㈣該法&出 ,… 所这者僅為本發明之較佳實施方式, 本發月之範圍並不以上述眘始古斗达 蓺之人+ 4實式為限,舉凡熟習本案技 ^人嫂依本發明之精神所作之等效修飾或變化 涵蓋於以下申請專利範圍内。 【圖式簡單說明】 圖1係一種傳統的加馬查找表存儲方案的示意圖。 Q 圖2係本發明加馬查找表存儲方案的示意圖。 圖3係本發明加馬查找表存儲方案的編碼流程圖。 圖4係圖3中計算ΚΙ、K2、K3及K4的流程圖。 圖5係本發明加馬查找表存儲方案的解碼流程圖。 【主要元件符號說明】 無 15The horse value is classified and stored, and the gamma value of the largest number of bits in the storage m class is the standard. The invention is in accordance with the invention patent application. However, as described above, (4) the method & output, ... is only a preferred embodiment of the present invention, and the scope of the present month is not limited to the above-mentioned Shen Shi Gu Dao's person + 4 real type Equivalent modifications or variations made by the skilled person in the spirit of the invention are intended to be included within the scope of the following claims. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a schematic diagram of a conventional gamma lookup table storage scheme. Q Figure 2 is a schematic diagram of a storage arrangement of the gamma lookup table of the present invention. 3 is a coding flow diagram of a gamma lookup table storage scheme of the present invention. 4 is a flow chart for calculating ΚΙ, K2, K3, and K4 in FIG. FIG. 5 is a decoding flowchart of the gamma lookup table storage scheme of the present invention. [Main component symbol description] None 15