A method and system for converting a yuv420 image into an rgb565 image

A YUV420, image conversion technology, used in image communication, color signal processing circuits, electrical components, etc., can solve the problems of reducing user experience, increasing the amount of memory access, and many cycles, improving conversion efficiency and reducing access to memory. , the effect of maintaining locality

Inactive Publication Date: 2011-12-14
SHENZHEN TEMOBI SCI &TECH
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the embodiment of the present invention is to propose a method for converting a YUV420 image into an RGB565 image, which aims to solve the problem that the YUV420 image file generated by the direct decoding of the video decoder in the prior art cannot be directly displayed in many mobile terminals, and must be processed through YUV420. The image is converted into an RGB565 image, and after being directly converted into an RGB565 image, there will be a blank area when displayed on the mobile terminal, which reduces the user experience effect. It is necessary to perform scaling, rotation, and color conversion before converting the YUV420 image into an RGB565 image (that is, calculate rgb value), because the YUV420 image needs to go through 2 cycles for each operation step when zooming, rotating, and color converting, so the cumulative number of cycles is large, the amount of access memory increases, resource waste, and low efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for converting a yuv420 image into an rgb565 image
  • A method and system for converting a yuv420 image into an rgb565 image
  • A method and system for converting a yuv420 image into an rgb565 image

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Image 6 It is a flow chart of the first preferred embodiment of the method for converting a YUV420 image into an RGB565 image in the present invention. The method comprises the steps of:

[0027] S601, divide the original YUV420 image into at least one original YUV420 image block; and preset the original YUV420 image's scaling factor Fx in the horizontal direction and scaling factor Fy in the vertical direction;

[0028] The horizontal scaling factor Fx=Ns_x / Ds_x of the original YUV420 image, the vertical scaling factor Fy=Ns_y / Ds_y of the original YUV420 image;

[0029] Among them, Ns_x, Ds_x, Ns_y and Ds_y are all positive integers and the values ​​meet the conditions: they are in the relationship of scaling multiples and are positive integers. At the same time, (2*Ds_x)*(Ns_x / Ds_x) is equal to the width of the scaled YUV420 image block tx, (2*Ds_y)*(Ns_y / Ds_y) is equal to the height ty of the scaled YUV420 image block; divide the YUV420 image into at least one YUV...

Embodiment 2

[0039] Figure 7 It is a flow chart of the second preferred embodiment of the method for converting a YUV420 image into an RGB565 image in the present invention. The method comprises the steps of:

[0040] S701, preset the Y, U, V components of the original YUV420 image, the original YUV420 image is equally divided into at least one YUV420 image block; the horizontal zoom factor Fx and the vertical zoom factor Fy of the preset YUV420 image; the preset zoom buffer , used to store the Y component, U component and V component of the scaled YUV420 image block, which are referenced by the variables Yt, Ut and Vt respectively; the preset loop variables x, y, x1, y1, i, j are initially 0;

[0041] The first address pointer rgb of the target address of the preset RGB565 image and the pointer p of the target address stored in the current RGB565 image block are both defined as short* type; the output coordinate variables x2 and y2 of the preset RGB565 image block;

[0042] The horizon...

Embodiment 3

[0144] Figure 8 It is a schematic structural diagram of the first preferred embodiment of the system for converting YUV420 images into RGB565 images of the present invention.

[0145] The system includes: an initial module, a scaling module and an output module;

[0146] The initial module is connected with the scaling module, and is used to equally divide the original YUV420 image into at least one original YUV420 image block; and preset the scaling factor of the horizontal direction and the vertical direction of the original YUV420 image;

[0147] The horizontal zoom factor Fx=Ns_x / Ds_x of the original YUV420 image, the vertical zoom factor Fy=Ns_y / Ds_y of the original YUV420 image, wherein the values ​​of Ns_x and Ds_x, Ns_y and Ds_y satisfy the condition: a zoom factor relationship , and is a positive integer, at the same time, (2*Ds_x)*(Ns_x / Ds_x) is equal to the width tx of the scaled YUV420 image block, (2*Ds_y)*(Ns y / Ds_y) is equal to the scaled YUV420 image block’s ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and system for converting a YUV420 image into an RGB565 image. By dividing the original YUV420 image into original YUV420 image blocks and performing scaling, the U component and the V component of the scaled YUV420 image block are obtained, and the rgb value is calculated. According to the size of the YUV420 image and the screen size of the mobile terminal, determine whether to rotate and write the rgb value into the target address respectively, so as to achieve continuous scaling of each original YUV420 image block, calculate the rgb value and output it after rotation or non-rotation, reducing the cycle time The number of times and the number of memory accesses improves the conversion efficiency. The output RGB565 image can be displayed on a mobile terminal with different pixels. Excellent display effect, accelerated memory access speed.

Description

technical field [0001] The invention relates to the field of video playback, in particular to a method and system for converting a YUV420 image into an RGB565 image. Background technique [0002] In the prior art, the YUV420 image files generated by the direct decoding of the video decoder cannot be directly displayed in many mobile terminals, and must be converted into RGB565 through YUV420 to be displayed. In addition, the screen pixels of many mobile terminals are inconsistent with the size of the video image, resulting in When the mobile terminal displays RGB565, there will be a lot of blank areas, which reduces the user experience. For example, the size of the video image is 240x180 pixels, while the mobile terminal screen is 240x320. There are many blank areas at the upper and lower ends, which requires scaling, rotating, and color conversion (that is, calculating rgb values) before the mobile terminal displays the video. Each operation step needs to go through 2 cycl...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04N1/60H04N9/64
Inventor 张磊邓邹平
Owner SHENZHEN TEMOBI SCI &TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products