An LCD-TFT controller

By adding YUV color format support and automatic color range recognition to the traditional LCD-TFT controller, the problem of insufficient MCU video memory is solved, achieving more efficient image display and lower hardware resource consumption.

CN118538182BActive Publication Date: 2025-12-16CHENGDU SINO MICROELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410729728.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2025-12-16
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

MCU chips have limited video memory size. Traditional LCD-TFT controllers face high video memory pressure when displaying large amounts of data images and are incompatible with mainstream pixel formats, resulting in poor display quality. Furthermore, new frame images need to be written when some pixels change dynamically, increasing hardware resource consumption.

Method used

Based on the traditional dedicated LCD-TFT controller, YUV color format support is added. Through the Direct Memory Access (DMA) module, image processing unit, Blend module, and Dither module, the system can automatically identify color ranges and perform image cutout or color replacement, reducing the demand for video memory.

Benefits of technology

It effectively reduces the MCU memory requirements, improves display quality, simplifies control methods, and expands the application range of dedicated LCD-TFT controllers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118538182B_ABST
    Figure CN118538182B_ABST
Patent Text Reader

Abstract

The application discloses an LCD-TFT controller, and relates to the technical field of display control, which mainly comprises a direct memory access module (DMA), two-layer image processing units, a blending module (Blend) and a dithering module (Dither). The image processing unit of each layer comprises a 2x1 selector, a color look-up table (CLUT), a pixel format converter (PFC) and a matte color changing module. The PFC further comprises a YUV2RGB module, which is used for converting YUV format image source data into RGB format. The matte color changing module is used for selectively realizing the functions of matte and color changing under the control of an enabling signal and outputting. Compared with the traditional LCD-TFT controller, the application supports YUV color format, realizes the functions of automatically identifying color ranges and changing colors, and reduces the demand of an MCU on the size of a display memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of display control technology, and more particularly to an LCD-TFT controller. Background Technology

[0002] In MCU chips, traditional LCD-TFT controller modules can connect software-encoded RGB data to an LCD display via a parallel interface to display images or videos requested by the user.

[0003] On the one hand, MCU chips typically have limited video memory size, and a large amount of data will restrict the window size of the displayed image and the maximum refresh rate. Furthermore, the limitation to only supporting RGB data format significantly increases the pressure on video memory and is incompatible with mainstream pixel formats. On the other hand, when displaying dynamic images, if there are minor changes to the background or some pixels, the software needs to write a new frame of image to video memory, indirectly increasing the storage pressure on the video memory. Achieving dynamic changes in some pixels is quite complex and requires sufficient cache space.

[0004] Currently, there are roughly two ways to connect MCU chips to LCD-TFT displays: one is through an external memory controller, such as an FSMC module, to connect to the LCD screen. However, this method requires the LCD screen to have a corresponding MCU chip to convert and organize the pixel data sent by the FSMC before sending it to the LCD screen for display. This display method has the advantages of low control cost and high versatility, but its control method is relatively complex, and the display occupies the interface for connecting to the external static memory controller, making it difficult for the chip to expand external storage space.

[0005] Another approach is to use a dedicated LCD-TFT control interface. Dedicated LCD-TFT interfaces are typically based on the RGB color format, directly outputting the processed RGB data along with corresponding clock, vertical / horizontal synchronization, and other signals to the LCD display. Furthermore, the LCD display does not require a dedicated MCU chip to display the image. This type of display offers advantages in terms of lower price and higher reliability compared to MCU-based displays. Therefore, using a dedicated LCD-TFT control interface not only eliminates the need for a dedicated memory expansion interface, relieving pressure on the MCU's memory, but also provides a cost-effective solution. However, dedicated LCD-TFT controllers require a certain amount of video memory from the MCU. When the video memory is insufficient, it limits the size of the image data stream, thus affecting the display quality of images and videos.

[0006] Currently, commonly used color formats are RGB and YUV. In RGB pixel format, the target color is mainly created by mixing the three primary colors: red, green, and blue. When the resolution is RGB888, it can represent 16.7 million colors, offering rich color reproduction and good display quality. However, since the human eye can only recognize about 10 million colors, nearly one-third of the pixels displayed in RGB format are invalid. Reducing pixel resolution makes it impossible to fully reproduce the original image's pixel colors. Therefore, RGB format has high requirements for video memory, making it difficult to strike a balance between display quality and the size of the original image data.

[0007] The YUV pixel format separates the luminance and chrominance information of the original image. "Y" represents luminance information (also known as grayscale value); "U" and "V" represent the blue and red components, respectively. Combining these three components yields the original pixel pattern. The human eye is more sensitive to luminance than chrominance. Therefore, when sampling the original image, the sampling depth for luminance can be increased while the sampling depth for chrominance can be decreased, thus achieving a similar display effect with a smaller data volume. This can, to some extent, reduce the memory pressure on the MCU.

[0008] Furthermore, when the MCU system needs to display an image that requires partial pixel color replacement without altering the original pixel data, or when the background color needs to be dynamically switched, it typically requires writing a new frame of the image to the video memory to complete the image change. This method incurs significant costs for completing small image changes and consumes substantial hardware resources. On the other hand, it also indirectly increases the system's video memory requirements. Summary of the Invention

[0009] Based on the above problems, the purpose of this invention is to add support for the YUV color format to the traditional dedicated LCD-TFT controller, add the function of automatically identifying the color range and cutting out or changing the color, and reduce the MCU's requirement for video memory size.

[0010] The technical solution adopted by this invention to achieve its objective is an LCD-TFT controller, comprising a direct memory access module (DMA), a two-layer image processing unit, a blending module (Blend), and a dithering module (Dither), wherein:

[0011] The Direct Memory Access (DMA) module is used to read image source data, and its output of two layers of image source data is respectively input to two layers of image processing units.

[0012] The specific structure of each layer image processing unit is as follows: the image source data output by the Direct Memory Access (DMA) module is connected to one input of a 2x1 selector MUX, and the other input is connected to the other input of the 2x1 selector MUX after passing through a color lookup table CLUT; the output of the 2x1 selector MUX is connected to a pixel format converter PFC, and the output of the pixel format converter PFC is connected to the input of the image matting and color replacement module; the image matting and color replacement module is used to selectively implement image matting or color replacement functions and output them under the control of an enable signal.

[0013] As a basic function of the pixel format converter (PFC), it can perform RGB format conversion, such as converting RGB565 or RGB888 formats to ARGB8888 formats. In specific implementations, existing technologies can be used.

[0014] The pixel format converter (PFC) also includes a YUV2RGB module, which is used to convert YUV format image source data into RGB format.

[0015] The background layer preset source data is connected to one input of the first layer blending module Blend, and the output of the cutout and color replacement module in the first layer image processing unit is connected to the other input of the first layer blending module Blend.

[0016] The first layer blending module Blend mixes two input data streams and its output is connected to one input of the second layer blending module Blend. The output of the image cutout and color replacement module in the second layer image processing unit is connected to the other input of the second layer blending module Blend.

[0017] The second layer blending module Blend mixes the two input data channels and its output is connected to the dithering module Dither.

[0018] The dither module is used to insert dithering, and its output image data is connected to the display panel.

[0019] The background layer is used to display a solid color background, while the first and second layers are used to display specific image information.

[0020] Furthermore, the image source data format includes at least RGB565 and RGB888, the image data format output by the pixel format converter PFC and the image cutout and color replacement module is ARGB8888, and the image data format output by the dithering module is RGB888.

[0021] Furthermore, the YUV2RGB module includes a YUV2RGB conversion algorithm implementation unit, an α preset value unit, and a bit splicing logic unit, wherein:

[0022] The YUV2RGB conversion algorithm implementation unit is used to convert 24-bit YUV format image source data into 24-bit RGB format data under the control of the input YUV enable configuration signal.

[0023] The α preset value unit is used to preset the α value, which is used to control the transparency of the layer;

[0024] The bit-splitting logic unit is used to logically concatenate the preset α value and 24-bit RGB format data to output 32-bit ARGB8888 format image data.

[0025] Furthermore, the image cutout and color replacement module includes a color key cutout unit, a color replacement shadow register, a preset color replacement value unit, and a 2x1 selector, wherein:

[0026] The chroma key matting unit includes a preset low chroma key value subunit and a preset high chroma key value subunit. The preset low chroma key value subunit and the preset high chroma key value subunit are used to preset the required low chroma key value and high chroma key value, respectively. The chroma key matting unit is used to matte the input image data, that is, to process the colors within the preset low chroma key value and preset high chroma key value range into transparent colors, and output the matted image data.

[0027] One output signal of the chroma key matting unit is connected to one input of the 2x1 selector, and the other output signal is connected to the other input of the 2x1 selector after passing through the color-changing shadow register.

[0028] The preset color change value unit is used to preset the required color change value and output it to the color change shadow register;

[0029] The color-changing shadow register is used to convert and output the image data after image matting into color-changing image data according to the preset color-changing value under the refresh of the vertical synchronization signal; this can avoid the problem of screen distortion caused by modifying the preset color-changing value in the middle of displaying a certain frame of image.

[0030] The 2x1 selector is used to output one of the two input signals in a two-way selection under the control of the color-changing enable configuration signal, that is, to output the image data after image matting or color changing in a two-way selection.

[0031] The beneficial effects of this invention are as follows:

[0032] This invention adds support for the YUV color format to the traditional dedicated LCD-TFT controller, and also adds the function of automatically recognizing the color range and changing the color. This greatly reduces the MCU's requirement for video memory size, and is simple to implement and easy to use, thus expanding the application range of dedicated LCD-TFT controllers. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of an LCD-TFT controller system according to an embodiment of the present invention;

[0034] Figure 2 This is a schematic diagram of the YUV2RGB module structure according to an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of the image cutout and color-changing module structure according to an embodiment of the present invention;

[0036] Figure 4 This is a schematic diagram of the configuration process using the YUV source data format in an embodiment of the present invention;

[0037] Figure 5 This is a schematic diagram of the configuration process using color-changing logic in an embodiment of the present invention. Detailed Implementation

[0038] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] Figures 1-3 This invention illustrates a specific embodiment of the LCD-TFT controller, which includes a direct memory access module (DMA), a two-layer image processing unit, a blending module (Blend), and a dithering module (Dither), wherein:

[0040] The Direct Memory Access (DMA) module is used to read image source data, and its output of two layers of image source data is respectively input to two layers of image processing units.

[0041] The specific structure of each layer image processing unit is as follows: the image source data output by the Direct Memory Access (DMA) module is connected to one input of a 2x1 selector MUX, and the other input is connected to the other input of the 2x1 selector MUX after passing through a color lookup table CLUT; the output of the 2x1 selector MUX is connected to a pixel format converter PFC, and the output of the pixel format converter PFC is connected to the input of the image matting and color replacement module; the image matting and color replacement module is used to selectively implement image matting or color replacement functions and output them under the control of an enable signal.

[0042] The pixel format converter (PFC) also includes a YUV2RGB module, which is used to convert YUV format image source data into RGB format.

[0043] The background layer preset source data is connected to one input of the first layer blending module Blend, and the output of the cutout and color replacement module in the first layer image processing unit is connected to the other input of the first layer blending module Blend.

[0044] The first layer blending module Blend mixes two input data streams and its output is connected to one input of the second layer blending module Blend. The output of the image cutout and color replacement module in the second layer image processing unit is connected to the other input of the second layer blending module Blend.

[0045] The second layer blending module Blend mixes the two input data channels and its output is connected to the dithering module Dither.

[0046] The dither module is used to insert dithering, and its output image data is connected to the display panel.

[0047] In this embodiment, the image source data format includes at least RGB565 and RGB888, the image data format output by the pixel format converter PFC and the image cutout and color replacement module is ARGB8888, and the image data format output by the dithering module is RGB888.

[0048] In this embodiment, the YUV2RGB module includes a YUV2RGB conversion algorithm implementation unit, an α preset value unit, and a bit splicing logic unit, wherein:

[0049] The YUV2RGB conversion algorithm implementation unit is used to convert 24-bit YUV format image source data into 24-bit RGB format data under the control of the input YUV enable configuration signal.

[0050] The α preset value unit is used to preset the α value, which is used to control the transparency of the layer;

[0051] The bit-splitting logic unit is used to logically concatenate the preset α value and 24-bit RGB format data to output 32-bit ARGB8888 format image data.

[0052] In this embodiment, the image cutout and color replacement module includes a color key cutout unit, a color replacement shadow register, a preset color replacement value unit, and a 2x1 selector, wherein:

[0053] The chroma key matting unit includes a preset low chroma key value subunit and a preset high chroma key value subunit. The preset low chroma key value subunit and the preset high chroma key value subunit are used to preset the required low chroma key value and high chroma key value, respectively. The chroma key matting unit is used to matte the input image data, that is, to process the colors within the preset low chroma key value and preset high chroma key value range into transparent colors, and output the matted image data.

[0054] One output signal of the chroma key matting unit is connected to the 0 input terminal of the 2x1 selector, and the other output signal is connected to the 1 input terminal of the 2x1 selector after passing through the color-changing shadow register.

[0055] The preset color change value unit is used to preset the required color change value and output it to the color change shadow register;

[0056] The color-changing shadow register is used to convert and output the image data after image matting into color-changing image data according to the preset color-changing value under the refresh of the vertical synchronization signal.

[0057] The 2x1 selector is used to output either the cut-out or the color-swapped image data under the control of the color-swapping enable configuration signal.

[0058] The working principle and process of this embodiment are as follows:

[0059] (i) After the original image source data is actively acquired by the Direct Memory Access (DMA) module, it can be used as the address of the color lookup table to obtain the pre-configured color format from the color lookup table CLUT, or it can be directly input as the source pixel data to the 2x1 selector. After the 2x1 selector is selected by configuring the register, it is input to the pixel format converter PFC.

[0060] (ii) If the image source data is in RGB format, the pixel format converter PFC converts the RGB source data of different precision (such as RGB565, RGB888) to ARGB8888 format through color format processing.

[0061] If the image source data is in YUV format, it is converted by the YUV2RGB module in the pixel format converter PFC, such as... Figure 2 As shown, the specific processing procedure is as follows: 24-bit YUV source data is input to the YUV2RGB algorithm implementation module, converted into 24-bit RGB format according to the preset algorithm, and then the preset α value is logically concatenated with the above 24-bit RGB value to obtain 32-bit ARGB8888 image data.

[0062] (III) The next step involves using the cutout and color replacement module to achieve the cutout or color replacement function. The specific process of this step is as follows:

[0063] Preparation stage: The preset low color key value subunit and the preset high color key value subunit preset the required low color key value and high color key value, and the preset color change value unit presets the required color change value;

[0064] Processing phase:

[0065] First, the image data output by the pixel format converter PFC enters the chroma key matting unit for matting. That is, the colors within the preset low chroma key value and preset high chroma key value range are matted and processed into transparent colors, and the matted image data is output. If the preset low chroma key value and the preset high chroma key value are equal, only one color becomes transparent.

[0066] The cutout data is input to the 0 input terminal of the 2x1 selector, while another identical data is processed by the color-changing shadow register and then input to the 1 input terminal of the 2x1 selector.

[0067] The color-changing shadow register converts the image data after image cutout into color-changing image data according to the preset color-changing value. The color-changing value can be pre-loaded, meaning that the color-changing value can be changed at any time during the display process. Furthermore, the color-changing shadow register is refreshed with the vertical synchronization signal, so that when a new frame of image is displayed, the color-changing value in the color-changing shadow register is output. This avoids the problem of screen tearing caused by modifying the color-changing value in the middle of displaying a frame of image.

[0068] If only the image needs to be cut out for output, the color change enable configuration signal controls the 2x1 selector to output the data at its 0 input terminal, that is, the 2x1 selector outputs only the data after the image has been cut out;

[0069] If color change output is required, change the color change enable configuration signal to control the 2x1 selector to output the data at its input terminal 1, that is, the 2x1 selector outputs the data after color change.

[0070] (iv) After processing by a 3-layer data blending algorithm, the first layer 1 blend module blends the background layer and the first layer image data, and the blended data then enters the second layer Blend module to blend the second layer image data.

[0071] (v) The data output from the Layer 2 Blend module enters the Dither module for dithering, and finally outputs the RGB888 pixel data values ​​to the LCD display panel.

[0072] Figure 4 and Figure 5 The configuration flow is shown separately when using the YUV source data format and when using color-changing logic in this embodiment.

[0073] The above embodiments of the present invention are merely illustrative examples and are not intended to limit the implementation of the invention. Those skilled in the art can make other variations and modifications based on the above description. It is impossible to exhaustively list all possible implementations here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.

Claims

1. An LCD-TFT controller, characterized by The image processing unit comprises a direct memory access module (DMA), two layers of image processing units, a blending module (Blend), and a dithering module (Dither), wherein: The direct memory access module (DMA) is configured to read image source data, and the output of the two layers of image source data is input into the two layers of image processing units respectively; The specific structure of each layer of image processing unit is that one of the image source data output by the direct memory access module (DMA) is connected to one input end of a 2x1 selector (MUX), and the other is connected to another input end of the 2x1 selector (MUX) through a color lookup table (CLUT); the output end of the 2x1 selector (MUX) is connected to a pixel format converter (PFC), and the output end of the pixel format converter (PFC) is connected to an input end of a matte color replacement module; the matte color replacement module is configured to selectively realize a matte or color replacement function under the control of an enable signal and output; The pixel format converter (PFC) further comprises a YUV2RGB module, which is configured to convert the YUV format image source data into the RGB format; The background layer preset source data is connected to one input end of the first layer blending module (Blend), and the output end of the matte color replacement module in the first layer image processing unit is connected to another input end of the first layer blending module (Blend); The output end of the first layer blending module (Blend) is connected to one input end of the second layer blending module (Blend) after mixing the two input data, and the output end of the matte color replacement module in the second layer image processing unit is connected to another input end of the second layer blending module (Blend); The output end of the second layer blending module (Blend) is connected to the dithering module (Dither) after mixing the two input data; The dithering module (Dither) is configured to insert dithering, and the output image data is connected to a display panel.

2. The LCD-TFT controller according to claim 1, wherein, The types of the image source data format at least include RGB565 and RGB888, the image data format output by the pixel format converter (PFC) and the matte color replacement module is ARGB8888, and the image data format output by the dithering module (Dither) is RGB888.

3. The LCD-TFT controller of claim 1, wherein, The YUV2RGB module comprises a YUV2RGB conversion algorithm implementation unit, an α preset value unit, and a bit splicing logic unit, wherein: The YUV2RGB conversion algorithm implementation unit is configured to convert 24-bit YUV format image source data into 24-bit RGB format data under the control of an input YUV enable configuration signal; The α preset value unit is configured to preset an α value, and the α value is used to control the transparency of the layer; The bit splicing logic unit is configured to logically splice the preset α value and the 24-bit RGB format data to output 32-bit ARGB8888 format image data.

4. The LCD-TFT controller of claim 1, wherein, The matte color replacement module comprises a color key matte unit, a color replacement shadow register, a preset color replacement value unit, and a 2x1 selector, wherein: The color key matting unit comprises a preset low color key value subunit and a preset high color key value subunit, the preset low color key value subunit and the preset high color key value subunit are respectively used for presetting a required low color key value and a high color key value, the color key matting unit is used for performing matting on input image data, i.e. performing matting processing on colors within a preset low color key value and a high color key value range to transparent colors, and outputting the image data after matting; An output signal of the color key matting unit is connected to one input end of a 2x1 selector, and the other output signal is connected to the other input end of the 2x1 selector through a color changing shadow register; The preset color changing value unit is used for presetting a required color changing value and outputting the color changing value to the color changing shadow register; The color changing shadow register is used for converting and outputting the image data after matting to image data after color changing under the refresh of a vertical synchronization signal according to the preset color changing value; The 2x1 selector is used for outputting the image data after matting or color changing alternatively under the control of a color changing enable configuration signal.

Citation Information

Patent Citations

  • Display control method and device and storage medium

    CN117453170A

  • A control system for screen display

    CN1964442A