Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention aims to provide a kind of coding based on the LVDS interface, coding/decoding method, device and system, can effectively avoid the EMI problem.
The coding method based on LVDS of Fig. 3, that the embodiment of the invention provides comprises:
Step 101 is obtained the GTG of rgb image data in the data to be encoded, confirms that said GTG is predefined specific grey-scale.
Corresponding to different GTGs, the binary number that rgb image data is corresponding is different.Therefore; When encoding; The LVDS coding staff need at first obtain the GTG of rgb image data in the data to be encoded; To confirm the data layout of the binary number that rgb image data is corresponding, can also confirm that the corresponding GTG of this coded data is predefined specific grey-scale according to the GTG that obtains.When said GTG was the GTG beyond the predefined specific grey-scale, the LVDS coding staff can be encoded according to prior art.
In the embodiment of the invention; Predefined specific grey-scale is the higher GTG of data transmission frequency of the corresponding binary number of rgb image data; Be that 0 value numerical digit and 1 value numerical digit frequently replace in the corresponding binary number of rgb image data, for example 85 GTGs and 170 GTGs.Certainly, can also be the higher specific grey-scale of other data transmission frequency.
Step 102 is provided with sign, so that decoding can know that data to be decoded are the corresponding data of said predefined specific grey-scale enough according to said sign;
Because when said GTG was predefined specific grey-scale, the LVDS coding staff had adopted and other GTG different coding modes, need inform decoding side, to guarantee the accuracy of data.Therefore, in this step, when the LVDS coding staff is encoded; Be provided with sign, during the decoding of decoding side, can read the content of this sign; If it is the corresponding data of said predefined specific grey-scale that sign has been indicated data to be decoded; To decode according to the decoding rule corresponding with coding staff in decoding side, otherwise decoding can directly be decoded according to prior art.
Concrete; With 8 liquid crystal panels is example; Each clock period, the LVDS coding staff packet that forms of encoding can transmit the 28bit data altogether, and each packet comprises each 8bit of rgb image data and DE, VS, the HS data of 27bit altogether; Therefore, will have a space bit in the packet.In this step; When said GTG is predefined specific grey-scale; When the LVDS coding staff is encoded; Can be with this space bit as the sign position, the space bit in said data to be encoded are encoded the packet that forms inserts 1, is the corresponding data of said predefined specific grey-scale with the data of indicating this packet.
Step 103, the specific digits of the binary number that said rgb image data is corresponding is carried out the position transposing;
In this step, the purpose of carrying out position transposing is to reduce the transmission frequency of data, that is: make carry out the position transposing after, the transmission frequency of said rgb image data reduces.Concrete; The rule of carrying out the position transposing comprises: the numerical value that carries out the said specific digits of position transposing mutually is 0 and 1; After carrying out the position transposing; In the corresponding binary number of said rgb image data, numerical value is that 0 said specific digits and numerical value are that 0 numerical digit is adjacent, and numerical value is that 1 said specific digits and numerical value are that 1 numerical digit is adjacent.
Certainly; It is understandable that; In the embodiment of the invention; The specific digits of the binary number that the LVDS coding staff is corresponding with said rgb image data is carried out the position transposing and is not limited to above-mentioned rule, and those skilled in the art can adopt different position transposing rules according to actual needs, and the present invention does not do qualification to this.
Like this, when encoding, the specific digits of the binary number that the LVDS coding staff is corresponding with rgb image data is carried out the position transposing; With numerical value is that 1 specific digits and numerical value are that 0 specific digits is carried out the position transposing, and after making the position transposing, in the corresponding binary number of rgb image data; Numerical value is that 0 specific digits and numerical value are that 0 numerical digit is adjacent; Numerical value is that 1 specific digits and numerical value are that 1 numerical digit is adjacent, so just can prevent effectively that 0 and 1 value is frequent in the corresponding binary number of rgb image data to replace, and has promptly reduced the rgb image data transmission frequency; And then reduced the energy emission in the data transmission procedure, effectively avoid occurring the EMI problem.
It is pointed out that order can not fixed between step 102 and the step 103, both can carry out simultaneously, also can carry out successively, and those skilled in the art can suitably adjust this as required, and present embodiment is not done qualification to this.
Coding/decoding method based on LVDS as shown in Figure 4, that the embodiment of the invention provides comprises:
Step 201 reads the sign in the data to be decoded, knows that according to said sign data to be decoded are the corresponding data of predefined specific grey-scale;
Comprise the sign that the LVDS coding staff is provided with in the data to be decoded that LVDS decoding side obtains, LVDS can confirm that data to be decoded are the corresponding data of predefined specific grey-scale according to this sign.
Step 202, the specific digits of the binary number that rgb image data in the said data to be decoded is corresponding is carried out the position transposing; Position transposing when wherein, said position transposing is encoded with the corresponding rgb image data of said specific grey-scale is corresponding.
Because the data to be decoded that LVDS decoding side obtains are when encoding; Specific digits to the corresponding binary number of rgb image data has been carried out the position transposing, therefore, and in this step; LVDS decoding side will be according to the position transposing in when coding; Carry out the adjustment of corresponding position,, guarantee the correctness of data with the reduction rgb image data.
Like this; The coding/decoding method that the embodiment of the invention provides makes when data encodes, can carry out the position to the corresponding binary number of the rgb image data under the specific grey-scale and change; Can prevent effectively that 0 and 1 value frequently alternately in the corresponding binary number of rgb image data; Promptly reduce the rgb image data transmission frequency, and then reduced the energy emission in the data transmission procedure, avoided occurring the EMI problem.
As shown in Figure 5, be example with 8 liquid crystal panels below, specify the Methods for Coding that the embodiment of the invention provides based on the LVDS interface, comprising:
Step 301, it is 85 GTGs and 170 GTGs that the LVDS coding staff is set specific grey-scale.
In 8 liquid crystal panels, when the LVDS coding side was encoded, rgb image data was represented 0 to 255 GTG with R0 to R7, G0 to G7, each 8 bit of B0 to B7 respectively, and under every kind of GTG, rgb image data is formed by 0/1.
When 85 GTGs, the form of rgb image data is 01010101, and when 170 GTGs, the form of rgb image data is 10101010; These two kinds of GTGs are in 0 to 255 GTG, and the frequency of data transmission is the highest, therefore; In the time of will causing data transmission, energy emission is serious, is prone to the EMI problem.Therefore, in this step, preestablishing 85 GTGs and 170 GTGs is specific grey-scale.
Step 302, the LVDS coding staff obtains the GTG of rgb image data in the data to be encoded, and confirms whether this GTG is 85 GTGs or 170 GTGs.
Step 303, when the GTG of rgb image data in the data to be encoded was other GTGs beyond 85 or 170 GTGs, the LVDS coding staff was encoded according to original coded system.
Behind the coding, the packet that the LVDS coding staff obtains comprises each 8bit of rgb image data and DE, VS, the HS data of 27bit altogether, because a packet can transmit the 28bit data altogether, also comprises a space bit in the packet.
Step 304, when the GTG of rgb image data in the data to be encoded was 85 or 170 GTGs, the space bit of LVDS coding staff in the packet that forms that data to be encoded are encoded inserted 1, as the sign of decoding side.
The LVDS coding staff carries out the coded data bag can transmit the 28bit data altogether, and each packet comprises and each 8bit of rgb image data and DE, VS, the HS data of 27bit altogether therefore, will have a space bit in the packet.
In this step; When the LVDS coding staff is encoded; This space bit as the sign position, is inserted 1 at the encode space bit of the packet that forms of data to be encoded, is said predefined specific grey-scale 85 or the corresponding data of 170 GTGs with the data of indicating this packet; Decoding can know that data to be decoded are the corresponding data of said predefined specific grey-scale enough according to the value of packet Central Plains space bit.
The the 1st and the 2nd of the binary number that step 305, LVDS coding staff are corresponding with rgb image data is respectively carried out the position transposing mutually, and the 5th and the 6th is carried out the position transposing mutually.
That is: concrete, when the LVDS coding staff is encoded, on the basis of original coded system; With the location swap of R1 and R2, with the location swap of R5 and R6, with the location swap of G1 and G2; With the location swap of G5 and G6, with the location swap of B1 and B2, with the location swap of B5 and B6.
For 85 GTGs, under original coded system, referring to Fig. 2, the form of the rgb image data that coding forms is 01010101, and wherein, the R1/G1/B1 value is 1, and the R2/G2/B2 value is 0, and the R5/G5/B5 value is 1, and the R6/G6/B6 value is 0.In the present embodiment, as shown in Figure 6, carry out location swap after, the form of the rgb image data that coding forms is 00110011, with respect to former data layout 01010101, the frequency halving of data transmission can effectively reduce energy emission, effectively avoids the EMI problem.
In like manner, for 170 GTGs, the form of rgb image data is 10101010 under original coded system, and wherein, the R1/G1/B1 value is 0, and the R2/G2/B2 value is 1, and the R5/G5/B5 value is 0, and the R6/G6/B6 value is 1.After carrying out location swap, the form of rgb image data is 11001100, and with respect to former data layout 10101010, the frequency halving of data transmission can effectively reduce energy emission, effectively avoids the EMI problem.
It is to be noted; In embodiments of the present invention; The purpose that the specific digits of the binary number that rgb image data is corresponding carries out changing the position is to reduce the frequency of data transmission, and therefore, the principle of position transposing need satisfy: the numerical value that carries out the said specific digits of position transposing mutually is 0 and 1; After carrying out the position transposing; In the corresponding binary number of rgb image data, numerical value is that 0 said specific digits and numerical value are that 0 numerical digit is adjacent, and numerical value is that 1 said specific digits and numerical value are that 1 numerical digit is adjacent.Like this, just can prevent effectively that 0 and 1 value has frequently alternately promptly reduced the rgb image data transmission frequency, and then reduced the energy emission in the data transmission procedure in the corresponding binary number of rgb image data, avoid occurring the EMI problem.
In this step; The specific digits of the binary number that the LVDS coding staff is corresponding with rgb image data is carried out the mode that the position transposing is not limited to limit in this step; Can also adopt other modes to carry out the position transposing, for example, the 1st and the 2nd of respectively that rgb image data is corresponding binary number is carried out the position transposing mutually; Promptly only change the corresponding binary number of rgb image data the 1st and the 2nd; The R1 and the R2 location swap of the binary number that rgb image data under 85 GTGs or 170 GTGs is corresponding, G1 and G2 location swap, B1 and B2 location swap; The the 5th and the 6th of perhaps respectively that rgb image data is corresponding binary number is carried out the position transposing mutually; Promptly only change the corresponding binary number of rgb image data the 5th and the 6th; The R5 and the R6 location swap of the binary number that rgb image data under 85 GTGs or 170 GTGs is corresponding, G5 and G6 location swap, B5 and B6 location swap can reduce the frequency of data transmission equally; Effectively reduce energy emission, avoid the EMI problem.
As shown in Figure 7, specify below corresponding to coding method shown in Figure 5, the coding/decoding method based on the LVDS interface that the embodiment of the invention provides comprises:
Step 401, LVDS reads decoding side the value of the former space bit in the data to be decoded.
Promptly; Read the value of packet to be decoded Central Plains space bit; Promptly read sign, when this position is blank, LVDS decoding side will know that data to be decoded are not the corresponding data of 85 or 170 GTGs; And when this position is 1, LVDS decoding side will know that data to be decoded are the corresponding data of 85 or 170 GTGs.
Step 402 according to the value of the former space bit in the data to be decoded, knows whether data to be decoded are the corresponding data of 85 or 170 GTGs.
Step 403, when data to be decoded are the data of 85 or 170 GTGs other GTGs correspondences in addition, decode according to original decoding process in LVDS decoding side.
Step 404, when data to be decoded were the data of 85 or 170 GTGs correspondence, the 1st and the 2nd of the binary number that LVDS decoding side is corresponding with rgb image data was respectively carried out the position transposing mutually, and the 5th and the 6th is carried out the position transposing mutually.
That is: when LVDS decodes decoding side, with the location swap of R1 and R2, with the location swap of R5 and R6; With the location swap of G1 and G2, with the location swap of G5 and G6, with the location swap of B1 and B2; With the location swap of B5 and B6,, guarantee the correctness of data transmission with the reduction rgb image data.
It is pointed out that in this step that the position transposing when the position transposing in this when decoding will be with digital coding to be decoded is corresponding.According to the position transposing of coding staff, the R1 and the R2 location swap of the binary number that LVDS decoding side also can be corresponding with rgb image data, G1 and G2 location swap, B1 and B2 location swap; The R5 and the R6 location swap of perhaps that rgb image data is corresponding binary number, G5 and G6 location swap, B5 and B6 location swap.
In addition, be that example describes though the embodiment of the invention is a LVDS interface with 8 liquid crystal panels, the invention is not restricted to this, the present invention also can be used in the LVDS interface of other liquid crystal panel.
Accordingly, the embodiment of the invention also provides a kind of code device based on the LVDS interface, and is as shown in Figure 8, comprising:
Acquiring unit 11 is used for obtaining the GTG of data to be encoded rgb image data, confirms that said GTG is predefined specific grey-scale;
Coding unit 12; Be used to be provided with sign; So that decoding can know that data to be decoded are the corresponding data of said predefined specific grey-scale, and the specific digits of the binary number that said rgb image data is corresponding be carried out the position transposing enough according to said sign;
Wherein, Coding unit 12 can specifically be used for the specific digits of the binary number that said rgb image data is corresponding and carry out the position transposing, and wherein, the numerical value that carries out the said specific digits of position transposing mutually is 0 and 1; After carrying out the position transposing; In the corresponding binary number of said rgb image data, numerical value is that 0 said specific digits and numerical value are that 0 numerical digit is adjacent, and numerical value is that 1 said specific digits and numerical value are that 1 numerical digit is adjacent.
The code device that the embodiment of the invention provides based on the LVDS interface; Can carry out the position transposing to the corresponding binary number of the rgb image data under the specific grey-scale during coding; So just can prevent effectively that 0 and 1 value is frequent in the corresponding binary number of rgb image data under the specific grey-scale replaces; Promptly reduce the rgb image data transmission frequency, and then reduced the energy emission in the data transmission procedure, avoided occurring the EMI problem.
Concrete, as shown in Figure 9, coding unit 12 can comprise:
Module 121 is set, is used to be provided with sign so that decoding can be enough be 1 according to the value of said space bit, know that data to be decoded are the corresponding data of said predefined specific grey-scale;
Transposing module 122, the specific digits that is used for the binary number that said rgb image data is corresponding is carried out the position transposing.
Wherein, predefined specific grey-scale is the higher GTG of data transmission frequency of the corresponding binary number of rgb image data, and 0 value numerical digit and 1 value numerical digit frequently replace in the binary number that promptly rgb image data is corresponding.In one embodiment of the invention, predefined specific grey-scale is 85 GTGs and 170 GTGs.Certainly, can also be the higher specific grey-scale of other data transmission frequency.
With 8 liquid crystal panels is example; Each clock period, the LVDS code device packet that forms of encoding can transmit the 28bit data altogether, and each packet comprises each 8bit of rgb image data and DE, VS, the HS data of 27bit altogether; Therefore, will have a space bit in the packet.The code device that the embodiment of the invention provides; Can be with this space bit as the sign position; At this moment; Module 121 is set can specifically be used for when said GTG is predefined specific grey-scale, the space bit in said data to be encoded are encoded the packet that forms inserts 1, is the corresponding data of said predefined specific grey-scale with the data of indicating this packet.
When the LVDS code device was encoded, rgb image data was represented 0 to 255 GTG with R0 to R7, G0 to G7, each 8 bit of B0 to B7 respectively, and under every kind of GTG, rgb image data is formed by 0/1.For 85 GTGs, the form of the binary number that rgb image data is corresponding is 01010101, and wherein, the R1/G1/B1 value is 1, and the R2/G2/B2 value is 0, and the R5/G5/B5 value is 1, and the R6/G6/B6 value is 0.For 170 GTGs, the binary number formats that rgb image data is corresponding is 10101010.Wherein, the R1/G1/B1 value is 0, and the R2/G2/B2 value is 1, and the R5/G5/B5 value is 0, and the R6/G6/B6 value is 1.
At this moment; When transposing module 122 specifically was used for the corresponding data of 85 GTGs or 170 GTGs are encoded, the 1st and the 2nd of the binary number that rgb image data under 85 GTGs or 170 GTGs is corresponding was carried out the position transposing, and the 5th and the 6th is carried out the position and change; Be about to the R1 of the binary number that rgb image data is corresponding under 85 GTGs or 170 GTGs and the location swap of R2; With the location swap of R5 and R6, with the location swap of G1 and G2, with the location swap of G5 and G6; With the location swap of B1 and B2, with the location swap of B5 and B6.
After carrying out location swap, during 85 GTGs, the form of the rgb image data that coding unit 12 codings form is 00110011, and with respect to 01010101, the frequency halving of data transmission can effectively reduce energy emission, avoids the EMI problem.In like manner, during 170 GTGs, the form of the rgb image data that coding unit 12 codings form is 11001100, and with respect to former data layout 10101010, the frequency halving of data transmission can effectively reduce energy emission, effectively avoids the EMI problem.
Certainly, the specific digits of the binary number that coding unit 12 is corresponding with rgb image data is carried out the position transposing and is not limited to aforesaid way, can also adopt other modes.In another embodiment of the present invention; When coding unit 12 also can specifically be used for the corresponding data of 85 GTGs or 170 GTGs are encoded; The 1st and the 2nd of the binary number that rgb image data under 85 GTGs or 170 GTGs is corresponding is carried out the position transposing, is about to the R1 and the R2 location swap of the binary number that rgb image data is corresponding under 85 GTGs or 170 GTGs, G1 and G2 location swap; B 1 and B2 location swap; Can reduce the frequency of data transmission equally, effectively reduce energy emission, effectively avoid the EMI problem.
In another embodiment of the present invention; When coding unit 12 also can specifically be used for the corresponding data of 85 GTGs or 170 GTGs are encoded; The 5th and the 6th of the binary number that rgb image data under 85 GTGs or 170 GTGs is corresponding is carried out the position transposing; Be about to the R5 and the R6 location swap of the binary number that rgb image data is corresponding under 85 GTGs or 170 GTGs, G5 and G6 location swap, the location swap of B5 and B6.Can reduce the frequency of data transmission equally, effectively reduce energy emission, effectively avoid the EMI problem.
In addition, coding unit 12 can adopt the coded system of prior art to encode for the corresponding data of the GTG outside 85 GTGs or 170 GTGs.
Accordingly, the embodiment of the invention also provides a kind of decoding device based on the LVDS interface, and is shown in figure 10, comprising:
Acquiring unit 21 is used for reading the sign of data to be decoded, knows that according to said sign data to be decoded are the corresponding data of predefined specific grey-scale;
Decoding unit 22, the specific digits that is used for the binary number that said data rgb image data to be decoded is corresponding is carried out the position transposing;
Wherein, the position transposing of carrying out when the position transposing that decoding unit 22 carries out is encoded with the corresponding rgb image data of said specific grey-scale is corresponding, with the reduction rgb image data, guarantees the accuracy of data.
The decoding device that the embodiment of the invention provides based on the LVDS interface; When making digital coding; Can carry out the position transposing to the corresponding binary number of the rgb image data under the specific grey-scale, so just can prevent effectively that 0 and 1 value is frequent in the corresponding binary number of rgb image data under the specific grey-scale to replace, promptly reduce the rgb image data transmission frequency; And then reduced the energy emission in the data transmission procedure, effectively avoid occurring the EMI problem.
With 8 liquid crystal panels is example; Each clock period, the LVDS code device packet that forms of encoding can transmit the 28bit data altogether, and each packet comprises each 8bit of rgb image data and DE, VS, the HS data of 27bit altogether; Therefore; To have a space bit in the packet of data to be decoded, the LVDS coding staff can be with this space bit as the sign position, when the corresponding data of data bit specific grey-scale to be encoded; In this space bit, insert 1, this space bit of other GTG is constant.At this moment, acquiring unit 21 can specifically be used for reading the former space bit of the packet of data to be decoded, when said former blank place value is 1, knows that data to be decoded are the corresponding data of predefined specific grey-scale.
Wherein, predefined specific grey-scale is the higher GTG of data transmission frequency of the corresponding binary number of rgb image data, and 0 value numerical digit and 1 value numerical digit frequently replace in the binary number that promptly rgb image data is corresponding.In one embodiment of the invention, predefined specific grey-scale is 85 GTGs and 170 GTGs.Certainly, can also be the higher specific grey-scale of other data transmission frequency.
When coding staff with 85 GTGs or 170 GTGs under the 1st and the 2nd of the corresponding binary number of rgb image data carry out position transposing and/or the 5th and the 6th and carry out the position when changing; Decoding unit 22 specifically be used for the binary number that said data rgb image data to be decoded is corresponding the 1st and the 2nd carry out the position and change; The 5th and the 6th is carried out the position transposing, is about to the R1 of the corresponding binary number of rgb image data and the location swap of R2, with the location swap of R5 and R6; Location swap with G1 and G2; With the location swap of G5 and G6, with the location swap of B1 and B2, with the location swap of B5 and B6; With the reduction rgb image data, guarantee the accuracy of data.
Wherein, it is corresponding that how decoding unit 22 carries out the position transposing that the position transposing carries out need be with the corresponding rgb image data of said specific grey-scale coding the time.
In one embodiment of the invention; Decoding unit 22 also can specifically be used for the 1st and the 2nd of the binary number that said data rgb image data to be decoded is corresponding to carry out the position and changes; Be about to the R1 and the R2 location swap of the corresponding binary number of rgb image data; G1 and G2 location swap, B1 and B2 location swap;
In another embodiment of the present invention; Decoding unit 22 also can specifically be used for said data rgb image data to be decoded corresponding the 5th and the 6th of binary number carry out the position and change; Be about to the R5 and the R6 location swap of the binary number that rgb image data is corresponding under 85 GTGs or 170 GTGs; G5 and G6 location swap, the location swap of B5 and B6.
In addition, decoding unit 12 can adopt the decoding process of prior art to decode for the corresponding data of the GTG outside the specific grey-scale.
Accordingly, the embodiment of the invention also provides a kind of data transmission system based on the LVDS interface, and is shown in figure 11, comprising:
Code device 3 is used for obtaining the GTG of data to be encoded rgb image data; When said GTG is predefined specific grey-scale, sign is set, so that decoding can know that data to be decoded are the corresponding data of said predefined specific grey-scale enough according to said sign; The specific digits of the binary number that said rgb image data is corresponding carries out the position transposing so that through after the transposing of said position, the transmission frequency of said rgb image data reduces;
Decoding device 4 is used for reading the sign of data to be decoded, knows that according to said sign data to be decoded are the corresponding data of predefined specific grey-scale; The specific digits of the binary number that rgb image data in the said data to be decoded is corresponding is carried out the position transposing; Position transposing when wherein, said position transposing is encoded with the corresponding rgb image data of said specific grey-scale is corresponding.
The data transmission system that the embodiment of the invention provides based on the LVDS interface; When carrying out the LVDS digital coding; Can carry out the position transposing to the corresponding binary number of the rgb image data under the specific grey-scale, so just can prevent effectively that 0 and 1 value is frequent in the corresponding binary number of rgb image data under the specific grey-scale to replace, promptly reduce the rgb image data transmission frequency; And then reduced the energy emission in the data transmission procedure, avoid occurring the EMI problem.
Wherein, the code device that code device 3 can adopt the embodiment of the invention to provide, the decoding device that decoding device 4 can adopt the embodiment of the invention to provide, preamble will specify, repeat no more here.
One of ordinary skill in the art will appreciate that: all or part of flow process that realizes said method embodiment can be accomplished through the relevant hardware of computer program instructions; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by said protection domain with claim.