Method for simultaneously providing 4K60 standard YUV420 code stream and 4K60 YUV444 code stream
By converting RGB888 data into YUV444 data and splitting it into YUV420 format for encoding, the problem that the standard decoder cannot restore the original image, and the color balance improvement is achieved by recombining the code stream, solving the image transmission in the existing technology color balance difference problem.
Patent Information
- Application Number
- CN202410778824.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, after the RGB data is converted to YUV420 format, the standard decoder cannot restore the original image, and the quantization of the Y, U, and V channels during the encoding process leads to the difference in color balance of the decoded image, affecting the visual perception.
The RGB888 data is collected and converted into YUV444 data, split into two sets of intermediate data in the YUV420 sampling format, and then recombined into the YUV444 code stream when needed, ensuring that the standard decoder can restore the original image and avoid color balance differences.
It realizes that the standard decoder can correctly restore the original image, improving the color balance and appearance of the image after decoding.
Smart Images

Figure CN118945368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image transmission, and in particular to a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60YUV444 code stream. Background Art
[0002] Multimedia technology has increasingly higher requirements for the color reproduction of images. In the prior art, for example, a method for YUV444 image transmission based on H.264 or H.265 disclosed in Chinese patent application No. 202110799752.9 provides a low-cost image transmission method for improving image quality, including: converting the collected RGB888 data into YUV444 data, and then dividing the YUV444 data into 2 groups of intermediate data in YUV420 sampling format, and compressing, decompressing and reorganizing it through H.264 or H.265 encoding, and reversely restoring it to the source data in YUV444 sampling format; the above method can complete the segmentation and transmission of YUV444 data.
[0003] In the prior art, RGB888 data is usually collected, and three groups of image data are generated by the three color channels of R, G and B respectively, and the above three groups of data are divided into two groups of intermediate data in YUV420 sampling format through DSP or NPU; the first group of intermediate data uses the image data generated by the R channel as Y format data, and uses the image data generated by half of the B channel as UV format data; the second group of intermediate data uses the image data generated by the G channel as Y format data, and uses the image data generated by the other half of the B channel as UV format data; the above two groups of intermediate data in YUV420 sampling format can be encoded through two YUV420 encoding channels respectively to obtain two code streams; then the two code streams are decoded to obtain two YUV420 format data, and then the two YUV420 format data are combined to form an image display.
[0004] However, there are some problems with the method provided above: first, its bitstream is not a standard YUV420 bitstream, but is actually part of the RGB data in the YUV420 data format. The standard decoder cannot restore the original image based on the bitstream it provides; second, during the encoding process, since the Y, U and V channels are quantized differently, there is a difference in color balance between the decoded image and the original RGB image, especially the white balance, which affects people's perception of the decoded image. Summary of the invention
[0005] In response to the above-mentioned problems, the present invention provides a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60YUV444 code stream, which can solve the problem that the prior art fills RGB data into two YUV420 formats, and the standard decoder cannot restore the original image according to the code stream provided by it, so that the image decoded by the decoder is the same as the original RGB image in color balance, thereby improving people's perception of the decoded image.
[0006] To achieve the above object, the technical solution adopted by the present invention is:
[0007] The present invention provides a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream, comprising the following steps:
[0008] S101: Collect RGB888 data and convert it into YUV444 data;
[0009] S102: splitting and re-arranging the YUV444 data to convert them into two groups of intermediate data in a YUV420 sampling format; the first group of intermediate data is composed of first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel; the second group of intermediate data is composed of second YUV structure data created by 3 U component pixels and 3 V component pixels;
[0010] S103: The first set of intermediate data and the second set of intermediate data are encoded through two YUV420 encoding channels respectively to obtain two YUV420 code streams;
[0011] S104: When a 4K60 YUV444 code stream is required, two YUV420 code streams are decoded to re-obtain a first set of intermediate data and a second set of intermediate data, the first set of intermediate data and the second set of intermediate data are combined, and encoded through a YUV444 encoding channel to obtain a YUV444 code stream.
[0012] The method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream provided by the present invention preferably splits and re-sequences the YUV444 data through a DSP or an NPU in the step S102.
[0013] The method for simultaneously providing 4K60 standard YUV420 code stream and 4K60 YUV444 code stream provided by the present invention preferably comprises, in step S102, using 2 U component pixels and 2 V component pixels in the second set of intermediate data as component pixels in Y format.
[0014] The method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream provided by the present invention, preferably, in step S103, the YUV420 code stream obtained from the first group of intermediate data in the two YUV420 code streams is a 4K60 standard YUV420 code stream, and the YUV420 code stream obtained from the second group of intermediate data is a complementary difference code stream.
[0015] The above technical solution has the following advantages or beneficial effects:
[0016] The present invention provides a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream. In step S101, RGB888 data is collected and converted into YUV444 data to complete the conversion of RGB data into YUV data. RGB888 and YUV444 are both fully sampled data and can fully express the original image information.
[0017] In step S102, in order to transmit image data faster and support the output of standard YUV420 code stream, the YUV444 data is split and re-ordered to be converted into two groups of intermediate data in YUV420 sampling format; the first group of intermediate data is composed of first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel, which constitutes the standard YUV420 format; the second group of intermediate data is composed of second YUV structure data created by 3 U component pixels and 3 V component pixels, which simulates the YUV420 format; the first group of intermediate data and the second group of intermediate data can constitute YUV444 data;
[0018] In step S103, the first group of intermediate data and the second group of intermediate data are encoded through two YUV420 encoding channels respectively to obtain two YUV420 code streams; since the first group of intermediate data is composed of the first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel, it is standard YUV420 format data. Compared with the prior art that fills RGB data into two YUV420 formats, the YUV420 code stream formed by the first group of intermediate data here can be adapted to the standard decoder, and the standard decoder can restore the original image according to the code stream provided by it; and since the first group of intermediate data and the second group of intermediate data are both divided from YUV444 format data, the first group of intermediate data and the second group of intermediate data are both YUV type data, and the YUV420 code stream encoded by the first group of intermediate data and the second group of intermediate data supports the working principle of the encoder, is not affected by the quantization of the Y channel and the UV channel by the encoder, and the image decoded by the decoder is the same as the original RGB image in color balance, avoiding the difference in white balance, and improving people's perception of the decoded image;
[0019] In step S104, in order to provide both 4K60 standard YUV420 bitstream and 4K60YUV444 bitstream, when 4K60 YUV444 bitstream is needed, the two YUV420 bitstreams are decoded to obtain the first group of intermediate data and the second group of intermediate data, combine the first group of intermediate data and the second group of intermediate data, and encode them through the YUV444 encoding channel to obtain the YUV444 bitstream. If only the standard YUV420 bitstream is needed at this time, you can choose to receive only the YUV420 bitstream, and the user can flexibly choose between bandwidth and image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The present invention and its features, configurations and advantages will become more apparent by reading the detailed description of non-limiting embodiments with reference to the following drawings. The same reference numerals indicate the same parts throughout the drawings. The drawings are not drawn to scale, but rather to illustrate the subject matter of the present invention.
[0021] Figure 1 It is a process wireframe schematic diagram of a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0022] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0023] Embodiment 1:
[0024] like Figure 1 As shown, a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60YUV444 code stream provided by Embodiment 1 of the present invention includes the following steps:
[0025] S101: Collect RGB888 data and convert it into YUV444 data;
[0026] S102: splitting and re-arranging the YUV444 data to convert them into two groups of intermediate data in a YUV420 sampling format; the first group of intermediate data is composed of first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel; the second group of intermediate data is composed of second YUV structure data created by 3 U component pixels and 3 V component pixels;
[0027] S103: The first set of intermediate data and the second set of intermediate data are encoded through two YUV420 encoding channels respectively to obtain two YUV420 code streams;
[0028] S104: When a 4K60 YUV444 code stream is required, two YUV420 code streams are decoded to re-obtain a first set of intermediate data and a second set of intermediate data, the first set of intermediate data and the second set of intermediate data are combined, and encoded through a YUV444 encoding channel to obtain a YUV444 code stream.
[0029] In the method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream provided in Embodiment 1 of the present invention, in step S101, RGB888 data is collected and converted into YUV444 data, and the conversion from RGB data to YUV data is completed. RGB888 and YUV444 are both fully sampled data, and can fully express the original image information;
[0030] In step S102, in order to transmit image data faster and support the output of standard YUV420 code stream, the YUV444 data is split and re-ordered to be converted into two groups of intermediate data in YUV420 sampling format; the first group of intermediate data is composed of first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel, which constitutes the standard YUV420 format; the second group of intermediate data is composed of second YUV structure data created by 3 U component pixels and 3 V component pixels, which simulates the YUV420 format; the first group of intermediate data and the second group of intermediate data can constitute YUV444 data;
[0031] In step S103, the first group of intermediate data and the second group of intermediate data are encoded through two YUV420 encoding channels respectively to obtain two YUV420 code streams; since the first group of intermediate data is composed of the first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel, it is standard YUV420 format data. Compared with the prior art that fills RGB data into two YUV420 formats, the YUV420 code stream formed by the first group of intermediate data here can be adapted to the standard decoder, and the standard decoder can restore the original image according to the code stream provided by it; and since the first group of intermediate data and the second group of intermediate data are both divided from YUV444 format data, the first group of intermediate data and the second group of intermediate data are both YUV type data, and the YUV420 code stream encoded by the first group of intermediate data and the second group of intermediate data supports the working principle of the encoder, is not affected by the quantization of the Y channel and the UV channel by the encoder, and the image decoded by the decoder is the same as the original RGB image in color balance, avoiding the difference in white balance, and improving people's perception of the decoded image;
[0032] In step S104, in order to provide both 4K60 standard YUV420 bitstream and 4K60YUV444 bitstream, when 4K60 YUV444 bitstream is needed, the two YUV420 bitstreams are decoded to obtain the first group of intermediate data and the second group of intermediate data, combine the first group of intermediate data and the second group of intermediate data, and encode them through the YUV444 encoding channel to obtain the YUV444 bitstream. If only the standard YUV420 bitstream is needed at this time, you can choose to receive only the YUV420 bitstream, and the user can flexibly choose between bandwidth and image quality.
[0033] Embodiment 1 of the present invention provides a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream. Preferably, in step S102, the YUV444 data is split and re-sequenced through a DSP or an NPU, so that the YUV444 data forms two YUV420 format data. The YUV420 code stream has a faster transmission speed than the YUV444 code stream. Splitting the YUV444 data into two YUV420 format data is beneficial to improving the image data transmission speed; wherein the DSP is a digital signal processor, and the NPU is a neural network processor; in addition to the DSP and the NPU, the YUV444 data can also be split and re-sequenced through software or other hardware.
[0034] Embodiment 1 of the present invention provides a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream. Preferably, in step S102, in the second group of intermediate data, 2 U component pixels and 2 V component pixels are used as component pixels in Y format, so that they can meet the YUV420 format, so that they can be encoded through the YUV420 encoding channel to form a YUV420 code stream transmission, thereby improving the image data transmission speed.
[0035] Embodiment 1 of the present invention provides a method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream. Preferably, the YUV420 code stream obtained from the first group of intermediate data in the two YUV420 code streams is a 4K60 standard YUV420 code stream, which can restore the original image through a standard decoder, and the YUV420 code stream obtained from the second group of intermediate data is a complementary code stream, which is combined with the YUV420 standard code stream to obtain a YUV444 code stream to obtain better image quality; when the YUV420 standard code stream and the YUV444 code stream are provided at the same time, the user can flexibly choose between bandwidth and image quality.
[0036] In summary, the method provided by the present invention for simultaneously providing 4K60 standard YUV420 code stream and 4K60YUV444 code stream can solve the problem that the prior art fills RGB data into two YUV420 formats, and the standard decoder cannot restore the original image according to the code stream provided by it, so that the image decoded by the decoder is the same as the original RGB image in color balance, thereby improving people's perception of the decoded image.
[0037] Those skilled in the art should understand that those skilled in the art can implement the above-mentioned variations by combining the prior art and the above-mentioned embodiments, which will not be described in detail here. Such variations do not affect the essential content of the present invention, and will not be described in detail here.
[0038] The above describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the above-mentioned specific embodiments, and the devices and structures that are not described in detail should be understood to be implemented in a common manner in the art; any technician familiar with the art can make many possible changes and modifications without departing from the technical solution of the present invention, or modify them into equivalent embodiments with equivalent changes, which does not affect the essential content of the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of protection of the technical solution of the present invention.
Claims
1. A method for simultaneously providing 4K60 standard YUV420 code stream and 4K60 YUV444 code stream, characterized in that: The following steps are involved: S101: Collect RGB888 data and convert it into YUV444 data; S102: splitting and re-arranging the YUV444 data to convert them into two groups of intermediate data in a YUV420 sampling format; the first group of intermediate data is composed of first YUV structure data created by 4 Y component pixels, 1 U component pixel and 1 V component pixel; the second group of intermediate data is composed of second YUV structure data created by 3 U component pixels and 3 V component pixels; S103: The first set of intermediate data and the second set of intermediate data are encoded through two YUV420 encoding channels respectively to obtain two YUV420 code streams; S104: When a 4K60 YUV444 code stream is required, two YUV420 code streams are decoded to re-obtain a first set of intermediate data and a second set of intermediate data, the first set of intermediate data and the second set of intermediate data are combined, and encoded through a YUV444 encoding channel to obtain a YUV444 code stream.
2. The method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream as claimed in claim 1, characterized in that: In step S102, the YUV444 data is split and reassembled through the DSP or NPU.
3. The method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream as claimed in claim 1, characterized in that: In step S102, in the second set of intermediate data, two U component pixel points and two V component pixel points are used as component pixel points in Y format.
4. The method for simultaneously providing a 4K60 standard YUV420 code stream and a 4K60 YUV444 code stream as claimed in claim 1, characterized in that: In step S103, the YUV420 code stream obtained from the first set of intermediate data in the two YUV420 code streams is a 4K60 standard YUV420 code stream, and the YUV420 code stream obtained from the second set of intermediate data is a supplementary code stream.
