+

CN108289223B - Image compression method and device for liquid crystal screen overdrive device - Google Patents

Image compression method and device for liquid crystal screen overdrive device Download PDF

Info

Publication number
CN108289223B
CN108289223B CN201810117115.7A CN201810117115A CN108289223B CN 108289223 B CN108289223 B CN 108289223B CN 201810117115 A CN201810117115 A CN 201810117115A CN 108289223 B CN108289223 B CN 108289223B
Authority
CN
China
Prior art keywords
coding
err
macro block
current
distortion error
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810117115.7A
Other languages
Chinese (zh)
Other versions
CN108289223A (en
Inventor
王洪剑
林江
陈本强
陈涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Tongtu Semiconductor Technology Co ltd
Original Assignee
Shanghai Tongtu Semiconductor Technology Co ltd
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 Shanghai Tongtu Semiconductor Technology Co ltd filed Critical Shanghai Tongtu Semiconductor Technology Co ltd
Priority to CN201810117115.7A priority Critical patent/CN108289223B/en
Publication of CN108289223A publication Critical patent/CN108289223A/en
Application granted granted Critical
Publication of CN108289223B publication Critical patent/CN108289223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/192Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an image compression method and device for a liquid crystal display overdrive device, wherein the method comprises the following steps: performing macro block segmentation on an input image; converting an RGB space of an input image into a YCoCg space; performing macro block complexity analysis on the current macro block to obtain complexity required by code rate control, and analyzing whether the current macro block meets the coding condition of a dynamic color library; according to the complexity and quantization level of the macro block, respectively carrying out bit number and distortion error estimation on three coding modes of conventional variable length coding, dynamic color library coding and RAW coding; carrying out self-adaptive judgment according to the estimated bit number and the distortion error to obtain the optimal coding mode of the current macro block; according to the optimal coding mode, self-adaptive coding is carried out on the current macro block, and a corresponding code stream is output; and calculating a reconstruction pixel point corresponding to the current pixel according to the coding mode, and performing inverse conversion on the reconstructed YCoCg space image into an RGB space.

Description

Image compression method and device for liquid crystal screen overdrive device
Technical Field
The invention relates to the field of video image processing, in particular to an image compression method and device for a liquid crystal display screen overdrive device.
Background
With the rapid development of video technology, Liquid Crystal Display (LCD) devices have been widely used in screen displays of various electronic products, such as televisions, computers, and the like. However, due to the inherent characteristics of liquid crystal molecules, the response time of the LCD panel (the speed of the pixel point reacting to the input signal, i.e. the time required for the pixel to turn from dark to light or from light to dark) is usually long, and the phenomenon of blurred outline or smear is often generated when displaying dynamic images.
In order to solve the above-mentioned problems, a technique called Over Drive (OD) is applied to the LCD panel. Fig. 1 is a block diagram illustrating a structure of an OD device according to the related art. The main principle of the OverDrive technology is to perform a lookup table process according to image data of two adjacent frames, so a frame buffer is required to store data of at least one frame of image, the current frame of image generally needs to be compressed in order to reduce the influence on bandwidth and the capacity of a memory, and the previous frame of image needs to be decompressed at the front end of the OverDrive.
In order to reduce hardware cost and reduce bandwidth storage capacity, large screen manufacturers often need a large number (substantially more than 3 times) of compression algorithms to fit the OD technology. Although the existing video image compression algorithm based on wavelet transform (JPEG2000 and the like) or DCT (JPEG and the like) can bring large compression multiple, the algorithm complexity is higher, the hardware realization is more complex, and the cost is higher; the conventional btc (block transmission coding) algorithm is a binary compression method in nature, and although the algorithm is simple, the distortion error caused by large-multiple compression is large.
Generally, when the violent action game is played and no smear is achieved, the display speed reaches at least 60 frames/second, namely the response time is less than 1/60 s-16.6 ms, and even more, some screen manufacturers require the response time to reach about 4 ms. Experiments show that the shorter the response time is, the smaller the maximum distortion error and the average distortion error brought by compression before and after compression are required to be.
Disclosure of Invention
In order to overcome the defects of the prior art, the present invention aims to provide an image compression method and device for an lcd overdrive device, which have simple hardware implementation, can support a maximum compression multiple of 4 times, can control a maximum distortion error within 32, and can control an average error about 16.
To achieve the above and other objects, the present invention provides an image compression method for an lcd overdrive apparatus, comprising the steps of:
step S1, performing macroblock segmentation on the input image;
a step S2 of converting the RGB space of the input image into the YCoCg space;
step S3, macroblock complexity analysis is carried out on the current macroblock to obtain complexity SAD required by code rate control, and whether the current macroblock meets the coding condition of a dynamic color library is analyzed;
step S4, according to the complexity of the macro block and the quantization level QP, respectively estimating the bit number and the distortion error of the conventional variable length coding, the dynamic color library coding and the RAW coding;
step S5, self-adapting discrimination is carried out according to the estimated bit number and distortion error, and the optimal coding mode of the current macro block is obtained;
step S6, according to the optimal coding mode, self-adaptive coding is carried out on the current macro block, and a corresponding code stream is output;
and step S7, calculating a reconstruction pixel point corresponding to the current pixel according to the coding mode, and performing inverse conversion on the reconstructed YCoCg space image into an RGB space.
Preferably, the step S2 further includes:
r, G, B of the known input pixel point is obtained, and the maximum value max _ val is calculated according to the input pixel bit depth bit _ dep.
And performing space conversion on the input R, G, B pixel point by using the maximum value max _ val of the input pixel bit depth to obtain output Y, Co and Cg pixel points.
Preferably, the step S3 further includes:
calculating a gradient grad (i) between every two adjacent pixels in the current macroblock;
summing all the obtained gradients to obtain complexity SAD;
and calculating errors err _ y, err _ u and err _ v of the YCoCg three-component of each pixel point in the current macro block and the color library, judging whether the dynamic color library coding condition is met or not, and carrying out corresponding processing.
Preferably, the step of judging whether the dynamic color library coding condition is satisfied for corresponding processing specifically comprises:
if the err _ y, the err _ u and the err _ v are respectively smaller than the predetermined errors err _ thr _ y, err _ thr _ u and err _ thr _ v, finding out the color with the minimum err _ sum from the color library as the color corresponding to the current pixel point, and recording the corresponding index value index, wherein the err _ sum is err _ y + err _ u + err _ v.
Preferably, step S4 further includes,
for the estimation analysis of the bit number and the distortion error of the conventional variable length coding, the following specific steps are carried out: according to the complexity SAD obtained by macro block analysis, a bit number pre _ bits _ norm generated by using conventional variable length coding is estimated by combining a quantization level QP, and the distortion error is obtained through a pre-established quantization level and distortion error corresponding table;
the estimation analysis of the coding bit number and the distortion error of the dynamic color library specifically comprises the following steps: obtaining a bit number pre _ bits _ color generated by using dynamic color library coding by coding an index value index corresponding to each pixel point of a current macroblock, wherein the distortion error is the maximum value of err _ thr _ y, err _ thr _ u and err _ thr _ v in macroblock analysis in step S3;
the estimation analysis of the RAW coding bit number and the distortion error specifically comprises the following steps: and obtaining a corresponding RAW coding bit number pre _ bits _ RAW according to the quantization level QP, wherein the distortion error is obtained through a pre-established quantization level and distortion error corresponding table.
Preferably, in step S5, the coding mode is determined by using the following coding mode determination formula:
Figure GDA0003207907950000031
wherein, cmp _ mode is 0 to represent the regular variable length coding, cmp _ mode is 1 to represent the RAW coding, cmp _ mode is 2 to represent the dynamic color library coding, and MIN (,) to represent the minimum value between the two.
Preferably, in step S5, the coding mode is further determined twice, and if the complexity SAD of the current macroblock is relatively high and the quantization level QP is also relatively high, the special coding branch in the RAW coding mode is forced to enter.
Preferably, in step S6, for the conventional variable length coding, the encoding step is as follows:
selecting pixel points above and to the left of the current pixel point to be coded, and selecting an optimal prediction point pred;
calculating the prediction residual between the pixel point to be coded and the optimal prediction point, and quantizing to obtain a residual coefficient;
the residual coefficient diff _ map is encoded.
Preferably, in step S6, for the dynamic color library encoding, the encoding step is as follows:
acquiring an index value index corresponding to a current pixel point to be coded in a color library;
directly coding the index by using a code length with a preset length;
and when one index value index is coded, correspondingly updating the colors in the color library.
Preferably, in step S6, for RAW encoding, the encoding step is as follows:
when the quantization level QP is less than 6, performing quantization processing on a current input pixel pix _ cur, and then encoding a quantized coefficient coeff, wherein the encoding length is marked as code _ len;
when the quantization level QP is at 6, special quantization processing is performed on the current input pixel pix _ cur, including the reconstruction of the next module.
To achieve the above object, the present invention further provides an image compression apparatus for use in a liquid crystal panel overdrive apparatus, comprising:
a macroblock dividing unit for performing macroblock division on an input image;
a spatial conversion unit for converting an RGB space of an input image into a YCoCg space;
the macro block analysis unit is used for carrying out macro block complexity analysis on the current macro block to obtain complexity SAD required by code rate control and analyzing whether the current macro block meets the coding condition of a dynamic color library;
the pre-estimation unit is used for respectively estimating the bit number and the distortion error of three coding modes of conventional variable length coding, dynamic color library coding and RAW coding according to the complexity and the quantization level QP of the macro block;
the coding mode judging unit is used for carrying out self-adaptive judgment according to the estimated bit number and the distortion error to obtain the optimal coding mode of the current macro block;
the adaptive coding unit is used for carrying out adaptive coding on the current macro block according to the optimal coding mode and outputting a corresponding code stream;
and the reconstruction and space reverse conversion unit is used for calculating a reconstruction pixel point corresponding to the current pixel according to the coding mode and reversely converting the reconstructed YCoCg space image into an RGB space.
Compared with the prior art, the image compression method and the device for the LCD overdrive device effectively reduce distortion errors caused by conversion by carrying out lossless space conversion on an input RGB image, carry out coding bit number and distortion error analysis on a current coding macro block, carry out self-adaptive coding mode selection according to the complexity of the macro block and carry out secondary judgment, enter the macro block with low image complexity into a dynamic color library coding mode and automatically update a color library, adopt different coding methods aiming at different quantization levels in an RAW coding mode, carry out space inverse conversion on the macro block of conventional variable length coding, realize the image compression method for the OD device, maximally support the compression multiple of 4 times, control the maximum distortion error within 32, control the average error within about 16 and have simple hardware realization, has higher innovation and practicability.
Drawings
FIG. 1 is a block diagram of a prior art OD device;
FIG. 2 is a flowchart illustrating steps of an image compression method for use in an LCD overdrive apparatus according to the present invention;
FIG. 3 is a diagram illustrating color library updating according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an image compression apparatus used in an LCD overdrive apparatus according to the present invention.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
FIG. 2 is a flowchart illustrating steps of an image compression method for use in an LCD overdrive apparatus according to the present invention. As shown in fig. 2, the image compression method for the liquid crystal display overdrive apparatus of the present invention includes the following steps:
in step S1, the input image is subjected to macroblock division. That is, the input single-line image is divided into Macroblocks (MB) according to actual requirements, and the size of the image may be 16, 32, 64, 128, etc., and the width is denoted as w.
In step S2, the input RGB space is converted into the YCoCg space.
The OD path generally uses RGB format image, in order to eliminate the redundant information of RGB space image, generally will make space conversion to it, but most compression will use the lossy conversion at present, experiments prove, the lossy conversion can eliminate the redundant information of the image greatly, but after carrying on the reverse conversion, the distortion error of the image is too big, unfavorable to the practical application of OD technology, therefore the invention uses the lossless conversion, while eliminating certain redundant information, can control the distortion error effectively.
Specifically, step S2 further includes:
step S201, a known input pixel point R, G, B is obtained, and a maximum value max _ val is calculated according to the input pixel bit depth. The calculation formula is as follows:
max_val=(1<<bit_dep)–1 (1)
where bit _ dep represents the input pixel bit depth, e.g., 8 or 10, etc., and < < represents the left shift operation.
Step S202, the inputted R, G, B pixel points are subjected to space conversion by using the inputted maximum value max _ val of the pixel bit depth, and outputted Y, Co and Cg pixel points are obtained. The conversion formula is as follows:
Figure GDA0003207907950000061
step S3, performing macroblock complexity analysis on the current macroblock to obtain complexity SAD required for code rate control, and analyzing whether the current macroblock meets the dynamic color library coding condition.
Specifically, step S3 further includes:
in step S300, a gradient grad (i) between every two adjacent pixels in the current macroblock is calculated. The formula is as follows:
grad(i)=MIN(|pix(i)-pix_left(i)|,|pix(i)-pix_top(i)|),i=0,...,w (3)
wherein, pix (i) represents the current pixel, pix _ left (i) represents the pixel on the left of the current pixel, pix _ top (i) represents the pixel on the line above the current pixel, | represents the absolute value, MIN (|) represents the minimum value.
Step S301, summing all the gradients obtained above to obtain the complexity SAD. The formula is as follows:
Figure GDA0003207907950000071
step S302, calculating errors err _ y, err _ u and err _ v of the YCoCg three-component of each pixel point in the current macro block and the color library, and judging whether the dynamic color library coding condition is met.
err_y=|pix_y-lib_y|
err_u=|pix_u-lib_u|
err_v=|pix_v-lib_v|
err_sum=err_y+err_u+err_v
Wherein, | represents an absolute value, pix _ y/u/v represents pixel values of three components after a current pixel point is converted into a YCoCg space, and lib _ y/u/v represents color three-component pixel values existing in a color library.
If err _ y, err _ u and err _ v are respectively smaller than the determined errors err _ thr _ y, err _ thr _ u and err _ thr _ v, finding out the color with the minimum err _ sum from the color library as the color corresponding to the current pixel point, and recording the index corresponding to the color. That is to say, there are generally a plurality of colors in the color library, and all the colors are used to calculate the corresponding err _ sum with the current pixel point, and finally, the color corresponding to the smallest err _ sum is selected.
Step S4, according to the complexity and Quantization level (QP) of the macroblock, respectively perform bit number and distortion error estimation on the three coding modes of the conventional variable length coding, the dynamic color library coding, and the RAW coding. Specifically, the method comprises the following steps:
(1) conventional variable length coding bit number and distortion error estimation analysis
a. The number of bits pre _ bits _ norm generated using conventional variable length coding is estimated based on the complexity SAD obtained from macroblock analysis, in combination with the quantization level QP. The formula is as follows:
pre_bits_norm=fun(SAD/QP) (5)
where fun (. eta.) is a direct proportional function, typically found by statistics.
b. The coding mode distortion error can refer to the quantization level and distortion error correspondence table of table 1:
TABLE 1
Figure GDA0003207907950000081
(2) Dynamic color library coding bit number and distortion error analysis
a. Because the invention adopts the dynamic color library automatic updating strategy, the color library does not need to be coded, and only index corresponding to each pixel point of the current macro block needs to be coded.
In the invention, the color library only stores 16 colors (namely 12 colors above the current pixel point, 4 colors on the left side and moving along with the movement of the coding pixel point), so the code length of the coding index is 4, and the bit number pre _ bits _ color generated by using the dynamic color library coding is obtained. The formula is as follows:
pre_bits_color=w*4 (6)
b. the coding mode distortion error is the maximum value of err _ thr _ y, err _ thr _ u, and err _ thr _ v in the macroblock analysis in step S3, and the set value is generally smaller than the maximum distortion error corresponding to table 1.
(3) RAW coding bit number and distortion error analysis
a. According to the quantization level QP, the corresponding RAW coding bit number pre _ bits _ RAW can be obtained. The formula is as follows:
pre_bits_raw=w*(bit_depth-QP) (7)
wherein bit _ depth is the corresponding pixel bit depth.
b. The coding mode distortion error may also be referred to in the quantization level to distortion error correspondence table of table 1.
And step S5, performing self-adaptive judgment according to the estimated bit number and the distortion error to obtain the optimal coding mode of the current macro block. In this step, the coding mode cmp _ mode finally selected by the current macroblock is mainly determined according to the estimated bit number and distortion error, and the determination principle is as follows: the macro block with general image content complexity selects conventional variable length coding, the macro block with lower complexity selects dynamic color library coding, and the macro block with higher complexity and without expansion after compression selects RAW coding. In step S5, the coding mode is first determined using a coding mode determination formula. The coding mode discrimination formula is as follows:
Figure GDA0003207907950000091
wherein, cmp _ mode is 0 to represent the regular variable length coding, cmp _ mode is 1 to represent the RAW coding, cmp _ mode is 2 to represent the dynamic color library coding, and MIN (,) to represent the minimum value between the two.
Preferably, in step S5, the coding mode is further determined twice. That is, if the complexity of the current macroblock is high and the quantization level is also high, the special coding branch in the RAW coding mode is forced. The formula is as follows:
cmp _ mode is 1 if QP is 6
I.e. when the level of quantization is below 6, the corresponding complexity is relatively high, and a special coding branch in the RAW coding mode needs to be forced.
And step S6, according to the optimal coding mode, self-adaptive coding is carried out on the current macro block, and a corresponding code stream is output.
The following will describe the encoding process of the same encoding mode in detail:
(1) conventional variable length coding
The input image of the coding mode is a gamut-converted YCoCg space.
a. And (6) predicting. And selecting pixel points above and to the left of the current pixel point to be coded, and selecting an optimal prediction point pred by using the following formula.
Figure GDA0003207907950000101
Wherein,
Figure GDA0003207907950000102
pix _ a represents the left pixel, pix _ b represents the upper pixel, and pix _ c represents the upper left pixel. MAX (,) means taking the maximum between them and MIN (,) means taking the minimum between them.
b. And calculating the prediction residual between the pixel point to be coded and the best prediction point, and quantizing to obtain a residual coefficient. The method comprises the following specific steps:
diff=pix_cur-pred
Figure GDA0003207907950000103
diff_map=2*|diff′|-sign
wherein pix _ cur represents a pixel point to be coded, when diff' is greater than or equal to 0, sign is 0, otherwise, 1, ronud ═ MAX ((1< (QP-1)) -1,0), and | means taking absolute value.
c. And (4) entropy coding. The residual coefficient diff _ map is encoded using Golomb.
(2) Dynamic color library coding
The input image encoded by the dynamic color library is in the RGB space.
a. And obtaining an index corresponding to the current pixel point to be coded (including R, G, B three components) in the color library, wherein the value range of the index is [0,15 ].
b. Index is directly coded with a length of 4.
c. Every time one index is coded, the color in the color library (color _ lib) is correspondingly updated. The update process is as in figure 3. The updating process is as follows:
step 1: and after the current pixel is coded, obtaining a reconstruction pixel point of the current pixel.
Step 2: taking out pixel points to be updated (such as the thirteenth pixel point from the left in the figure) from the reconstructed linebuffer, and replacing the pixel point at the leftmost end above the image;
and step 3: and replacing the pixel point at the leftmost end of the current line with the current reconstruction pixel point (namely the second line updating process in the graph).
(3) RAW coding
The RAW encoded input image is also in the RGB space,
a. when the quantization level QP is less than 6, quantization processing is performed on the current input pixel pix _ cur (including R, G, B three components), and then the quantized coefficient coeff is encoded, where the encoding length is recorded as code _ len. The formula is as follows:
coeff=(CLIP(max_val,0,pix_cur+round)>>QP) (11)
code_len=bit_depth-QP
where MAX _ val is (1< < bit _ depth) -1, round is MAX ((1< (QP-1)) -1,0), CLIP (, x) indicates that x is limited to a range, i.e., pix _ cur + round is limited to a range of [0, MAX _ val ].
b. When QP equals 6, special quantization processing is performed on the current input pixel pix _ cur (including R, G, B three components), and special quantization processing is also performed on the reconstruction including the next module. The formula is as follows:
coeff=pix_cur>>QP
code_len=bit_depth-QP
in step S7, the reconstructed YCoCg-space image is back-converted to RGB space.
Specifically, step S7 further includes:
and S700, calculating a reconstruction pixel point corresponding to the current pixel according to different coding modes, and outputting. The reconstruction formula is as follows:
Figure GDA0003207907950000111
wherein, color _ lib [ index ] represents the pixel value of the color library corresponding to the current index.
Finally, rec _ pix is limited to the [0, max _ val ] range.
Step S701, if cmp _ mode is equal to 0, the reconstructed pixel point needs to be subjected to inverse spatial conversion, where the conversion formula is as follows:
Co=Co-max_val-1
Cg=Cg-max_val-1
Figure GDA0003207907950000121
finally, R, G, B is limited to a range of [0, max _ val ].
Fig. 4 is a system architecture diagram of an image compression device used in an lcd overdrive apparatus according to the present invention. As shown in fig. 4, an image compression apparatus for use in a liquid crystal panel overdrive apparatus of the present invention includes:
a macroblock dividing unit 40 for performing macroblock division on the input image. That is, the input single-line image is divided into Macroblocks (MB) according to actual requirements, and the size of the image may be 16, 32, 64, 128, etc., and the width is denoted as w.
A spatial conversion unit 41 for converting the input RGB space into the YCoCg space.
The OD path generally uses RGB format image, in order to eliminate the redundant information of RGB space image, generally will make space conversion to it, but most compression will use the lossy conversion at present, experiments prove, the lossy conversion can eliminate the redundant information of the image greatly, but after carrying on the reverse conversion, the distortion error of the image is too big, unfavorable to the practical application of OD technology, therefore the invention uses the lossless conversion, while eliminating certain redundant information, can control the distortion error effectively.
In an embodiment of the present invention, the spatial conversion unit 41 is specifically configured to:
the known input pixel point R, G, B is obtained, and the maximum value max _ val is calculated according to the input pixel bit depth.
And performing space conversion on the input R, G, B pixel point by using the maximum value max _ val of the input pixel bit depth to obtain output Y, Co and Cg pixel points.
And a macroblock analysis unit 42, configured to perform macroblock complexity analysis on the current macroblock to obtain complexity SAD required by code rate control, and analyze whether the current macroblock meets the dynamic color library coding condition.
Specifically, the macroblock analysis unit 42 further includes:
and the gradient calculating unit is used for calculating the gradient grad (i) between every two adjacent pixels in the current macro block.
And the complexity calculating unit is used for summing all the obtained gradients to obtain the complexity SAD.
And the error analysis unit is used for calculating errors err _ y, err _ u and err _ v of the YCoCg three-component of each pixel point in the current macro block and the color library and judging whether the dynamic color library condition is met.
If err _ y, err _ u and err _ v are respectively smaller than the determined errors err _ thr _ y, err _ thr _ u and err _ thr _ v, finding out the color with the minimum err _ sum from the color library as the color corresponding to the current pixel point, and recording the index corresponding to the color.
The pre-estimation unit 43 is configured to perform bit number and distortion error estimation on three coding modes, namely, conventional variable length coding, dynamic color library coding, and RAW coding, according to the complexity and Quantization level (QP) of the macroblock. Specifically, the estimation analysis of the estimation unit 43 is as follows:
(1) conventional variable length coding bit number and distortion error estimation analysis
a. The number of bits pre _ bits _ norm generated using conventional variable length coding is estimated based on the complexity SAD obtained from macroblock analysis, in combination with the quantization level QP.
b. The coding mode distortion error can refer to the quantization level and distortion error correspondence table of table 1:
(2) dynamic color library coding bit number and distortion error analysis
a. Because the invention adopts the dynamic color library automatic updating strategy, the color library does not need to be coded, and only index corresponding to each pixel point of the current macro block needs to be coded.
In the invention, the color library only stores 16 colors (namely 12 colors above the current pixel point, 4 colors on the left side and moving along with the movement of the coding pixel point), so the code length of the coding index is 4, and the bit number pre _ bits _ color generated by using the dynamic color library coding is obtained.
b. The coding mode distortion error is the maximum value of err _ thr _ y, err _ thr _ u, and err _ thr _ v in the macroblock analyzing unit 42, and the set value is generally smaller than the maximum distortion error corresponding to the above-mentioned table 1.
(3) RAW coding bit number and distortion error analysis
a. According to the quantization level QP, the corresponding RAW coding bit number pre _ bits _ RAW can be obtained.
b. The coding mode distortion error may also be referred to in the quantization level to distortion error correspondence table of table 1.
And the coding mode judging unit 44 is configured to perform adaptive judgment according to the estimated bit number and the distortion error to obtain an optimal coding mode of the current macroblock. The coding mode determining unit 44 mainly determines the coding mode cmp _ mode finally selected by the current macroblock according to the estimated bit number and distortion error, and the determination principle is as follows: the macro block with general image content complexity selects conventional variable length coding, the macro block with lower complexity selects dynamic color library coding, and the macro block with higher complexity and without expansion after compression selects RAW coding. Specifically, the encoding mode discrimination unit 44 primarily discriminates the encoding mode using the encoding mode discrimination formula. The coding mode discrimination formula is as follows:
Figure GDA0003207907950000141
wherein, cmp _ mode is 0 to represent the regular variable length coding, cmp _ mode is 1 to represent the RAW coding, cmp _ mode is 2 to represent the dynamic color library coding, and MIN (,) to represent the minimum value between the two.
Preferably, the encoding mode discrimination unit 44 also secondarily discriminates the encoding mode. I.e. if the complexity of the current macroblock is high and the quantization level is also high, the special coding branch in the RAW coding mode is forced to be entered. The formula is as follows:
cmp _ mode is 1 if QP is 6
And the adaptive coding unit 45 is configured to perform adaptive coding on the current macroblock according to the optimal coding mode, and output a corresponding code stream.
The following will describe the encoding process for different encoding modes in detail:
(1) conventional variable length coding
The input image of the coding mode is a gamut-converted YCoCg space.
a. And (6) predicting. Selecting the pixel points above and to the left of the current pixel point to be coded,
b. and calculating the prediction residual between the pixel point to be coded and the best prediction point, and quantizing to obtain a residual coefficient.
c. And (4) entropy coding. The residual coefficient diff _ map is encoded using Golomb.
(2) Dynamic color library coding
The input image encoded by the dynamic color library is in the RGB space.
a. And obtaining an index corresponding to the current pixel point to be coded (including R, G, B three components) in the color library, wherein the value range of the index is [0,15 ].
b. Index is directly coded with a length of 4.
c. Every time one index is coded, the color in the color library (color _ lib) is correspondingly updated.
(3) RAW coding
The RAW encoded input image is also in the RGB space,
a. when the quantization level QP is less than 6, quantization processing is performed on the current input pixel pix _ cur (including R, G, B three components), and then the quantized coefficient coeff is encoded, where the encoding length is recorded as code _ len.
b. When QP equals 6, special quantization processing is performed on the current input pixel pix _ cur (including R, G, B three components), and special quantization processing is also performed on the reconstruction including the next module.
And the reconstruction and space inverse conversion unit 46 is configured to calculate a reconstruction pixel point corresponding to the current pixel according to different coding modes, and inversely convert the reconstructed YCoCg space image into an RGB space. The reconstruction and spatial inverse transform unit 46 is specifically configured to:
and calculating a reconstruction pixel point corresponding to the current pixel according to different coding modes, outputting the reconstruction pixel point, and limiting the reconstruction pixel point rec _ pix within the range of [0, max _ val ].
If cmp _ mode is equal to 0, the reconstructed pixel point needs to be spatially inverted, and finally R, G, B is limited to the range of [0, max _ val ].
To sum up, the image compression method and apparatus for the lcd overdrive apparatus of the present invention effectively reduces the distortion error caused by the conversion by performing lossless spatial conversion on the input RGB image, performs adaptive coding mode selection according to the macroblock complexity by analyzing the coding bit number and distortion error of the current coding macroblock, and can perform secondary discrimination, and enters the macroblock with low image complexity into the dynamic color library coding mode, and can automatically update the color library, the RAW coding mode adopts different coding methods for different quantization levels, and the conventional variable length coding macroblock needs to be subjected to spatial inverse conversion, so as to implement an image compression method for the OD apparatus, which maximally supports a compression multiple of 4 times, the maximum distortion error can be controlled within 32, the average error is controlled at about 16, and the hardware implementation is simple, has higher innovation and practicability.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Therefore, the scope of the invention should be determined from the following claims.

Claims (11)

1. An image compression method for an LCD overdrive device comprises the following steps:
step S1, performing macroblock segmentation on the input image;
a step S2 of converting the RGB space of the input image into the YCoCg space;
step S3, macroblock complexity analysis is carried out on the current macroblock to obtain complexity SAD required by code rate control, and whether the current macroblock meets the coding condition of a dynamic color library is analyzed;
step S4, according to the complexity of the macro block and the quantization level QP, respectively estimating the bit number and the distortion error of the conventional variable length coding, the dynamic color library coding and the RAW coding;
step S5, self-adapting discrimination is carried out according to the estimated bit number and distortion error, and the optimal coding mode of the current macro block is obtained;
step S6, according to the optimal coding mode, self-adaptive coding is carried out on the current macro block, and a corresponding code stream is output;
and step S7, calculating a reconstruction pixel point corresponding to the current pixel according to the coding mode, and performing inverse conversion on the reconstructed YCoCg space image into an RGB space.
2. The image compression method for the lcd panel overdrive apparatus as claimed in claim 1, wherein the step S2 further comprises:
r, G, B of a known input pixel point is obtained, and the maximum value max _ val is calculated according to the input pixel bit depth bit _ dep;
and performing space conversion on the input R, G, B pixel point by using the maximum value max _ val of the input pixel bit depth to obtain output Y, Co and Cg pixel points.
3. The image compression method for the lcd panel overdrive apparatus as claimed in claim 1, wherein the step S3 further comprises:
calculating a gradient grad (i) between every two adjacent pixels in the current macroblock;
summing all the obtained gradients to obtain complexity SAD;
and calculating errors err _ y, err _ u and err _ v of the YCoCg three-component of each pixel point in the current macro block and the dynamic color library, judging whether the dynamic color library meets the coding condition or not, and carrying out corresponding processing.
4. The image compression method for the lcd overdrive device according to claim 3, wherein the step of determining whether the dynamic color library coding condition is satisfied for the corresponding processing is specifically:
if the err _ y, the err _ u and the err _ v are respectively smaller than the predetermined errors err _ thr _ y, err _ thr _ u and err _ thr _ v, finding out the color with the minimum err _ sum from the color library as the color corresponding to the current pixel point, and recording the corresponding index value index, wherein the err _ sum is err _ y + err _ u + err _ v.
5. The image compression method for the LCD overdrive apparatus as claimed in claim 1, wherein the step S4 further comprises,
for the estimation analysis of the bit number and the distortion error of the conventional variable length coding, the following specific steps are carried out: according to the complexity SAD obtained by macro block analysis, a bit number pre _ bits _ norm generated by using conventional variable length coding is estimated by combining a quantization level QP, and the distortion error is obtained through a pre-established quantization level and distortion error corresponding table;
the estimation analysis of the coding bit number and the distortion error of the dynamic color library specifically comprises the following steps: obtaining a bit number pre _ bits _ color generated by using dynamic color library coding by coding an index value index corresponding to each pixel point of a current macroblock, wherein the distortion error is the maximum value of err _ thr _ y, err _ thr _ u and err _ thr _ v in macroblock analysis in step S3;
the estimation analysis of the RAW coding bit number and the distortion error specifically comprises the following steps: and obtaining a corresponding RAW coding bit number pre _ bits _ RAW according to the quantization level QP, wherein the distortion error is obtained through a pre-established quantization level and distortion error corresponding table.
6. The image compression method for the lcd panel overdrive apparatus as claimed in claim 5, wherein in step S5, the coding mode is discriminated by using the following coding mode discrimination formula:
Figure FDA0003207907940000021
wherein, cmp _ mode is 0 to represent the regular variable length coding, cmp _ mode is 1 to represent the RAW coding, cmp _ mode is 2 to represent the dynamic color library coding, and MIN (,) to represent the minimum value between the two.
7. The image compression method as claimed in claim 6, wherein in step S5, the coding mode is further determined twice, and if the current macroblock complexity SAD is higher and the quantization level QP is higher, the special coding branch in the RAW coding mode is forced to enter.
8. The image compression method for the lcd panel overdrive apparatus as claimed in claim 6, wherein in step S6, for the conventional variable length coding, the encoding steps are as follows:
selecting pixel points above and to the left of the current pixel point to be coded, and selecting an optimal prediction point pred;
calculating the prediction residual between the pixel point to be coded and the optimal prediction point, and quantizing to obtain a residual coefficient;
the residual coefficient diff _ map is encoded.
9. The image compression method for the LCD overdrive apparatus as claimed in claim 6, wherein in step S6, for the dynamic color library coding, the coding steps are as follows:
acquiring an index value index corresponding to a current pixel point to be coded in a color library;
directly coding the index by using a code length with a preset length;
and when one index value index is coded, correspondingly updating the colors in the color library.
10. The image compression method for the lcd panel overdrive apparatus as claimed in claim 6, wherein in step S6, for RAW encoding, the encoding steps are as follows:
when the quantization level QP is less than 6, performing quantization processing on a current input pixel pix _ cur, and then encoding a quantized coefficient coeff, wherein the encoding length is marked as code _ len;
when the quantization level QP is equal to 6, special quantization processing is performed on the current input pixel pix _ cur, including the reconstruction of the next module.
11. An image compression apparatus for use in a liquid crystal panel overdrive apparatus, comprising:
a macroblock dividing unit for performing macroblock division on an input image;
a spatial conversion unit for converting an RGB space of an input image into a YCoCg space;
the macro block analysis unit is used for carrying out macro block complexity analysis on the current macro block to obtain complexity SAD required by code rate control and analyzing whether the current macro block meets the coding condition of a dynamic color library;
the pre-estimation unit is used for respectively estimating the bit number and the distortion error of three coding modes of conventional variable length coding, dynamic color library coding and RAW coding according to the complexity and the quantization level QP of the macro block;
the coding mode judging unit is used for carrying out self-adaptive judgment according to the estimated bit number and the distortion error to obtain the optimal coding mode of the current macro block;
the adaptive coding unit is used for carrying out adaptive coding on the current macro block according to the optimal coding mode and outputting a corresponding code stream;
and the reconstruction and space reverse conversion unit is used for calculating a reconstruction pixel point corresponding to the current pixel according to the coding mode and reversely converting the reconstructed YCoCg space image into an RGB space.
CN201810117115.7A 2018-02-06 2018-02-06 Image compression method and device for liquid crystal screen overdrive device Active CN108289223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810117115.7A CN108289223B (en) 2018-02-06 2018-02-06 Image compression method and device for liquid crystal screen overdrive device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810117115.7A CN108289223B (en) 2018-02-06 2018-02-06 Image compression method and device for liquid crystal screen overdrive device

Publications (2)

Publication Number Publication Date
CN108289223A CN108289223A (en) 2018-07-17
CN108289223B true CN108289223B (en) 2021-09-21

Family

ID=62832689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810117115.7A Active CN108289223B (en) 2018-02-06 2018-02-06 Image compression method and device for liquid crystal screen overdrive device

Country Status (1)

Country Link
CN (1) CN108289223B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109510985B (en) * 2018-10-26 2021-01-15 杭州联海网络科技有限公司 Video coding method and device thereof
US10769039B2 (en) * 2018-12-03 2020-09-08 Himax Technologies Limited Method and apparatus for performing display control of a display panel to display images with aid of dynamic overdrive strength adjustment
CN110267042A (en) * 2019-06-05 2019-09-20 深圳市华星光电技术有限公司 It overdrives to compress quantization method and overdrive and compresses quantization device
CN114374847B (en) 2022-01-17 2024-06-25 海宁奕斯伟集成电路设计有限公司 Image compression method, device, equipment and computer readable storage medium
CN114900693B (en) * 2022-03-31 2024-07-26 昇显微电子(苏州)股份有限公司 Image compression method, decompression method and device based on block truncated coding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1039759A2 (en) * 1999-03-23 2000-09-27 SANYO ELECTRIC Co., Ltd. Image compression device which recursively reduces the code amount of image data
CN101014128A (en) * 2007-02-02 2007-08-08 清华大学 Method for quick estimating rate and distortion in H.264/AVC video coding
CN101060629A (en) * 2007-04-27 2007-10-24 华为技术有限公司 Image compression/decompression method and image coder/decoder and decoding circuit
CN101926178A (en) * 2008-01-24 2010-12-22 Sk电信有限公司 Method and device for determining encoding mode based on time complexity and space complexity
CN102025994A (en) * 2010-12-16 2011-04-20 深圳市融创天下科技发展有限公司 Coding method, coding device and coding and decoding system based on adaptive decoding complexity as well as equipment comprising coding and decoding system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10225561B2 (en) * 2015-10-08 2019-03-05 Mediatek Inc. Method and apparatus for syntax signaling in image and video compression

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1039759A2 (en) * 1999-03-23 2000-09-27 SANYO ELECTRIC Co., Ltd. Image compression device which recursively reduces the code amount of image data
CN101014128A (en) * 2007-02-02 2007-08-08 清华大学 Method for quick estimating rate and distortion in H.264/AVC video coding
CN101060629A (en) * 2007-04-27 2007-10-24 华为技术有限公司 Image compression/decompression method and image coder/decoder and decoding circuit
CN101926178A (en) * 2008-01-24 2010-12-22 Sk电信有限公司 Method and device for determining encoding mode based on time complexity and space complexity
CN102025994A (en) * 2010-12-16 2011-04-20 深圳市融创天下科技发展有限公司 Coding method, coding device and coding and decoding system based on adaptive decoding complexity as well as equipment comprising coding and decoding system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Enable Efficient Compound Image Compression in H.264/AVC Intra Coding;Wenpeng Ding等;《 2007 IEEE International Conference on Image Processing》;20071112;全文 *
基于模式参考集的快速编码模式判决算法;廖怡等;《光电子.激光》;20070131;全文 *

Also Published As

Publication number Publication date
CN108289223A (en) 2018-07-17

Similar Documents

Publication Publication Date Title
CN108289223B (en) Image compression method and device for liquid crystal screen overdrive device
US6275527B1 (en) Pre-quantization in motion compensated video coding
US8285037B2 (en) Compression format and apparatus using the new compression format for temporarily storing image data in a frame memory
US8340445B2 (en) Image encoding device, image encoding method, image encoding/decoding system
JP4491349B2 (en) Intra-coding method and apparatus for video data
US20050200631A1 (en) Methods and systems for processing image data for display on LC displays
US20080069211A1 (en) Apparatus and method for encoding moving picture
US6208689B1 (en) Method and apparatus for digital image decoding
EP3610648B1 (en) Midpoint prediction error diffusion for display stream compression
JP3097665B2 (en) Time-lapse recorder with anomaly detection function
JP2000284755A (en) Liquid crystal display
KR20080026112A (en) An image encoding apparatus, an image processing apparatus, an image display apparatus, an image encoding method, and an image processing method
KR20200136477A (en) System and method for deblocking HDR content
JP2022058366A (en) Encoding device, decoding device, and program
US20140010445A1 (en) System And Method For Image Compression
US8520742B2 (en) Moving image compression-coding device, method of compression-coding moving image, and H.264 moving image compression-coding device
KR20020026189A (en) Efficient video data access using fixed ratio compression
US11190810B2 (en) Device and method for compressing image data using quantization parameter and entropy tables
JP5180887B2 (en) Encoding apparatus and method thereof
KR20220015556A (en) Frame buffer compressor and image processing apparatus
KR102763185B1 (en) Method of encoding data and encoder
WO2008079330A1 (en) Video compression with complexity throttling
KR102543449B1 (en) Image processing device and method for operating image processing device
KR100256646B1 (en) Compression Ratio Auto-Conversion Device of Image Coding System
KR102099111B1 (en) Image Stream Recompression System based on Block Prediction and Method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载