Coding and decoding method and device, equipment, storage medium and program product

By carrying the original UV44 data and residual data in the YUV444 format image encoding, the image quality problem caused by YUV420 format encoding and decoding is solved, and a high-quality screen sharing effect is achieved.

CN121284263APending Publication Date: 2026-01-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410904499.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

In existing technologies, the use of YUV420 format encoding and decoding during screen sharing results in poor image quality, especially problems such as blurred text and loss of detail.

Method used

When encoding screen images in YUV444 format, the images are first downsampled to obtain images in YUV420 format, and the original UV44 data is carried in the bitstream to ensure that the receiving end can reconstruct the YUV444 format image. The residual data is then encoded and transmitted through the target field.

Benefits of technology

Without increasing hardware costs, it improves the display quality of screen images, solves the image blurring problem caused by the loss of color information, and improves encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121284263A_ABST
    Figure CN121284263A_ABST
Patent Text Reader

Abstract

The invention discloses a coding and decoding method and device, equipment, a storage medium and a program product, and belongs to the technical field of image compression. The method comprises the following steps: extracting data of a target component in a first image to obtain first component data; wherein the color space model of the first image comprises data of a plurality of color components, and the target component is at least one of the plurality of color components; obtaining a second image with the same content as the first image, wherein the sampling rate of the target component in the second image is smaller than the sampling rate of the target component in the first image; and compiling the first component data and the second image into a code stream. According to the invention, all original data in the first image can be coded and transmitted to the receiving end, and the coded data is more complete and comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image compression technology, and in particular to an encoding / decoding method, apparatus, device, storage medium, and program product. Background Technology

[0002] Screen sharing is a core function in video conferencing. It is typically used to share screen content such as browser windows, applications, presentations (PowerPoint, PPT), documents (Word), and spreadsheets (Excel), so that members of the video conference can see the same content.

[0003] In related technologies, screen sharing is typically achieved by taking screenshots. That is, during a video conference, a screenshot of the screen content to be shared is taken and downsampled to obtain a YUV420 format screen image. This YUV420 format screen image is then encoded into a bitstream, which is transmitted to the destination. The destination receives the bitstream, decodes it to obtain the reconstructed screen image, and then displays the reconstructed screen image.

[0004] However, encoding and decoding screen images in YUV420 format can lead to poor image quality issues when sharing screens, such as blurry images or blurry text or loss of detail in images containing text content. Summary of the Invention

[0005] This application provides an encoding / decoding method, apparatus, device, storage medium, and program product, capable of encoding, decoding, and transmitting screen images in YUV422 and YUV44 formats, thereby improving the display effect of screen images in projection / screen sharing scenarios. The technical solution is as follows:

[0006] Firstly, an encoding method is provided, the method comprising:

[0007] Extract the target component data from the first image to obtain the first component data; wherein, the color space model of the first image includes data of multiple color components, and the target component is at least one of the multiple color components; obtain a second image with the same content as the first image, wherein the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image; and encode the first component data and the second image into a bitstream.

[0008] Considering that encoding a first image typically involves downsampling at least one color component to achieve image compression, but the loss of color component data can degrade image quality, this application, to reduce the degradation of image quality in the first image during compression, adopts a similar encoding method to related technologies. First, the target component in the first image is downsampled to obtain a second image with the same content as the first image but a lower sampling rate for the target component. This second image is then encoded into the bitstream. Furthermore, this application also encodes the first component data corresponding to the original target component in the first image into the bitstream. This ensures that all original data in the first image can be encoded and transmitted to the receiving end, resulting in more complete and comprehensive encoded data.

[0009] Furthermore, after receiving the bitstream, the receiving end can parse the reconstructed first component data and the reconstructed second image from the bitstream, and then reconstruct the first image based on the reconstructed first component data and the reconstructed second image. In this way, reconstructing the first image by combining the first component data of the first image can greatly improve the quality of the reconstructed image.

[0010] Therefore, this application can effectively solve the problem of image blurring caused by loss of chroma information under the existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0011] Optionally, the color space model of the first image is a luminance-color-saturation YUV model, and the target component is a chromaticity component, which includes a U component and / or a V component; obtaining a second image with the same content as the first image includes: downsampling the data of the chromaticity component in the first image to obtain the second image.

[0012] Therefore, this application does not change the encoding process of the YUV420 format second image when encoding the first image. Instead, it encodes and transmits the original UV44 data from the first image as well, ensuring that the bitstream transmitted to the receiving end includes both the YUV420 format second image and the original UV44 data from the first image. Thus, after receiving the bitstream, the receiving end can parse the reconstructed YUV420 format second image and the reconstructed UV44 data, and then reconstruct the YUV444 format first image.

[0013] In other words, this application can be compatible with YUV444 or YUV422 image encoding and decoding schemes on the basis of existing YUV420 format image encoding and decoding schemes, so that the image quality loss of the decoded reconstructed image is small and the quality of the reconstructed image is improved.

[0014] Optionally, the step of encoding the first component data and the second image into a bitstream includes: encoding the second image into the bitstream; and encoding the first component data into a target field in the bitstream, wherein the target field is a field in the bitstream used to carry auxiliary information.

[0015] Optionally, the target field includes a Supplemental Enhancement Information (SEI) field.

[0016] Therefore, this application can transmit the first component data and the second image through two separate bitstreams, or through a single bitstream. When transmitting the first component data and the second image through a single bitstream, the first component data can be written into the target field of the second image-encoded bitstream.

[0017] Encoding the first component data includes the following two cases:

[0018] In the first case, referring to the encoding process of the second image, the first component data is encoded independently, and the encoded data is written into the target field in the bitstream.

[0019] In the second scenario, a reconstructed second image is obtained based on the bitstream; second component data is acquired, which is obtained by upsampling the data of the target component in the reconstructed second image; and the residual data between the second component data and the first component data is encoded into the target field in the bitstream.

[0020] In other words, the target field carries the residual data corresponding to the first component data.

[0021] When encoding the first component data, if the residual data is calculated using inter-frame prediction, the previous frame of the first image is used as the reference frame, and the residual between the target component data and the first component data in the reference frame is encoded into the target field of the bitstream. If the residual data is calculated using intra-frame prediction, when encoding the first component data independently using the first case described above, the reconstructed first image is used as the reference frame, and the residual between the target component data and the first component data in the reconstructed first image is encoded into the target field of the bitstream. When encoding using the second case described above, the reference information is the second component data, that is, the residual between the second component data and the first data is encoded into the target field of the bitstream.

[0022] Optionally, the first image is in YUV444 format, the second image is in YUV420 format, and the first component data includes UV44 data; or, the first image is in YUV444 format, the second image is in YUV422 format, and the first component data includes UV44 data; or, the first image is in YUV422 format, the second image is in YUV420 format, and the first component data includes UV22 data.

[0023] Optionally, the first image is determined based on the screen content during the screen sharing process.

[0024] For example, taking screenshots, recording screens, or taking photos of the screen content during screen sharing to obtain a first image. This application does not limit the method of obtaining the first image in a screen sharing scenario.

[0025] Secondly, a decoding method is provided, the method comprising:

[0026] A second image is reconstructed based on the bitstream; wherein the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image, the color space model of the first image includes data of multiple color components, the target component is at least one of the multiple color components, and the content of the second image is the same as that of the first image; reconstructed first component data is obtained based on the bitstream, the first component data is the data of the target component in the first image; the first image is reconstructed based on the reconstructed second image and the reconstructed first component data.

[0027] Therefore, after receiving the bitstream, the receiving end can parse the reconstructed first component data and the reconstructed second image from the bitstream, and then combine the reconstructed first component data and the reconstructed second image to reconstruct the first image. Since the sampling rate of each channel data in the reconstructed first image is consistent with that of the first image, the image quality loss of the reconstructed first image is small, thereby improving the quality of the reconstructed image.

[0028] In other words, this application can effectively solve the problem of image blurring caused by the loss of chroma information under the existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0029] Optionally, the color space model of the first image is a luminance-color-saturation YUV model, and the target component is a chromaticity component, which includes a U component and / or a V component.

[0030] Taking a screen image in YUV444 format as an example, after receiving the bitstream encoded according to the encoding method provided in this application, the receiving end can parse out the reconstructed YUV420 format second image and the reconstructed UV44 data from it, and then merge the Y channel data in the second image with the reconstructed UV44 data to reconstruct the first image in YUV444 format.

[0031] Therefore, this application can be compatible with YUV444 or YUV422 image encoding and decoding schemes on the basis of existing YUV420 format image encoding and decoding schemes, so that the image quality loss of the decoded reconstructed image is small and the quality of the reconstructed image is improved.

[0032] Optionally, obtaining the reconstructed first component data based on the bitstream includes: obtaining the reconstructed first component data based on a target field in the bitstream, wherein the target field is a field in the bitstream used to carry auxiliary information.

[0033] Optionally, the target field includes a Supplemental Enhancement Information (SEI) field.

[0034] Therefore, this application can transmit the first component data and the second image through two separate bitstreams, or through a single bitstream. When transmitting the first component data and the second image through a single bitstream, the first component data can be written into the target field of the second image-encoded bitstream.

[0035] Optionally, obtaining the reconstructed first component data based on the target field in the bitstream includes:

[0036] The reconstructed second component data is obtained by upsampling the data of the target component in the reconstructed second image; the reconstructed residual data is obtained based on the target field in the bitstream, the residual data being the residual between the first component data and the reconstructed second component data; and the reconstructed first component data is obtained based on the residual data and the reconstructed second component data.

[0037] In other words, the target field carries the residual data corresponding to the first component data. If the residual data is determined based on the target component data in the reconstructed second image as reference information, then when obtaining the reconstructed first component data, it is also necessary to refer to the target component data in the reconstructed second image.

[0038] Optionally, reconstructing the first image based on the reconstructed second image and the reconstructed first component data includes:

[0039] Extract the data corresponding to the other color components of the reconstructed second image besides the target component to obtain the third component data; merge the third component data and the reconstructed first component data to obtain the reconstructed first image.

[0040] In this case, if both the first and second images are in YUV format, then the first component data can be chromaticity data, and the third component data can be luminance data. For example, if the first image is in YUV444 format and the second image is in YUV420 format, the first component data is UV data, and the third component data is Y data.

[0041] Optionally, the reconstructed second image is in YUV420 format, the reconstructed first component data includes UV44 data, and the reconstructed first image is in YUV444 format; or, the reconstructed second image is in YUV422 format, the reconstructed first component data includes UV44 data, and the reconstructed first image is in YUV444 format; or, the reconstructed second image is in YUV420 format, the reconstructed first component data includes UV22 data, and the reconstructed first image is in YUV422 format.

[0042] Optionally, the first image is determined based on the screen content during the screen sharing process.

[0043] For example, taking screenshots, recording screens, or taking photos of the screen content during screen sharing to obtain a first image. This application does not limit the method of obtaining the first image in a screen sharing scenario.

[0044] Thirdly, an encoding apparatus is provided, which has the function of implementing the encoding method behavior described in the first aspect. The encoding apparatus includes at least one module for implementing the encoding method provided in the first aspect.

[0045] Fourthly, a decoding apparatus is provided, which has the function of implementing the decoding method behavior described in the second aspect above. The decoding apparatus includes at least one module for implementing the decoding method provided in the second aspect above.

[0046] Fifthly, an encoding apparatus is provided, comprising a processor and a memory, the memory being used to store a computer program for executing the encoding method provided in the first aspect. The processor is configured to execute the computer program stored in the memory to implement the encoding method described in the first aspect.

[0047] Optionally, the encoding device may further include a communication bus for establishing a connection between the processor and the memory.

[0048] In a sixth aspect, a decoding device is provided, the decoding device including a processor and a memory, the memory being used to store a computer program for executing the decoding method provided in the second aspect above. The processor is configured to execute the computer program stored in the memory to implement the decoding method described in the second aspect above.

[0049] Optionally, the decoding device may further include a communication bus for establishing a connection between the processor and the memory.

[0050] In a seventh aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when the computer program is run on a computer or processor, causes the computer or processor to perform the steps of the encoding method described in the first aspect, or to perform the steps of the decoding method described in the second aspect.

[0051] Eighthly, a computer program product is provided, the computer program product comprising computer instructions that, when executed by a computer or processor, cause the computer or processor to perform the steps of the encoding method described in the first aspect, or the steps of the decoding method described in the second aspect. Alternatively, a computer program is provided that, when run on a computer or processor, causes the computer or processor to perform the steps of the encoding method described in the first aspect, or the steps of the decoding method described in the second aspect.

[0052] Ninthly, a coding and decoding system is provided, the coding and decoding system including an encoding device and a decoding device, the encoding device being used to implement the steps of the encoding method described in the first aspect above, and the decoding device being used to implement the steps of the decoding method described in the second aspect above.

[0053] In a tenth aspect, an encoded bitstream is provided, the bitstream being generated according to the encoding method described in the first aspect above.

[0054] In the eleventh aspect, an encoded bitstream is provided, the bitstream comprising a first component data and a second image;

[0055] Wherein, the first component data is the target component data in the first image, the color space model of the first image includes data of multiple color components, and the target component is at least one of the multiple color components; the second image has the same content as the first image, and the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image.

[0056] In a twelfth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a bitstream generated according to the encoding method described in the first aspect above.

[0057] In a thirteenth aspect, an apparatus for storing a bitstream is provided, the apparatus comprising: a receiver and at least one storage medium, the receiver being configured to receive a bitstream generated according to the encoding method described in the first aspect above, and the at least one storage medium being configured to store the bitstream.

[0058] In a fourteenth aspect, an apparatus for transmitting a bitstream is provided, the apparatus comprising: a transmitter and a receiver, the receiver being configured to receive a bitstream generated according to the encoding method described in the first aspect above, and the transmitter being configured to transmit the bitstream to an end-side device via a transmission medium.

[0059] In a fifteenth aspect, an apparatus for transmitting a bitstream is provided, the apparatus comprising: a transmitter and at least one storage medium, the at least one storage medium being used to store a bitstream generated according to the encoding method described in the first aspect above, the transmitter being used to retrieve the bitstream from the storage medium and transmit the bitstream to an end-side device via a transmission medium.

[0060] In a sixteenth aspect, a system for distributing bitstreams is provided, the system comprising: at least one storage medium for storing bitstreams generated according to the encoding method described in the first aspect above; and a streaming media device for obtaining a target bitstream from the at least one storage medium and sending the target bitstream to an end-side device, wherein the streaming media device includes a content server or a content distribution server.

[0061] The technical effects achieved by the third to sixteenth aspects mentioned above are similar to those achieved by the corresponding technical means in the first and second aspects, and will not be repeated here. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of a screen sharing process provided in an embodiment of this application;

[0063] Figure 2 This is a schematic diagram of an H.264 encoding process provided in an embodiment of this application;

[0064] Figure 3 This is a schematic diagram of an implementation environment provided in an embodiment of this application;

[0065] Figure 4 This is a schematic diagram of another implementation environment provided in the embodiments of this application;

[0066] Figure 5 This is a schematic diagram of the structure of a first video module provided in an embodiment of this application;

[0067] Figure 6 This is a schematic diagram of the structure of a second video module provided in an embodiment of this application;

[0068] Figure 7 This is a flowchart illustrating an encoding method provided in an embodiment of this application;

[0069] Figure 8 This is a flowchart illustrating a decoding method provided in an embodiment of this application;

[0070] Figure 9 This is a schematic diagram of the encoding and decoding process when sharing screen images in a video conference, provided in an embodiment of this application.

[0071] Figure 10 This is a schematic diagram of the encoding process of a YUV444 image provided in an embodiment of this application;

[0072] Figure 11 This is a schematic diagram of another YUV444 image encoding process provided in an embodiment of this application;

[0073] Figure 12 This is a schematic diagram of the structure of an encoding device provided in an embodiment of this application;

[0074] Figure 13 This is a schematic diagram of the structure of a decoding device provided in an embodiment of this application. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0076] To facilitate understanding, before explaining the encoding and decoding methods provided in the embodiments of this application, the terminology, application background, and implementation environment involved in the embodiments of this application will be introduced first.

[0077] First, the terminology used in the embodiments of this application will be introduced.

[0078] 1. H.26x encoding

[0079] H.26x encoding is a commonly used video coding format and a block-oriented, motion-compensated video coding standard. Examples include Advanced Video Coding (AVC, also known as H.264) and High Efficiency Video Coding (HEVC, also known as H.265).

[0080] 2. Quantization parameters

[0081] The quantization parameter (QP) value reflects the spatial detail compression of an image. A smaller QP value indicates higher quantization accuracy, resulting in higher image quality and a higher bitrate, while maintaining the same resolution and frame rate.

[0082] 3. Multipoint control unit (MCU)

[0083] An MCU, also known as a multipoint controller, is a key component of a multipoint video conferencing system. The MCU acts as a "switch" within the system, synchronously separating information streams from various meeting points, extracting audio, video, data, and signaling information, and then sending these to a single processing module. This module handles audio mixing or switching, video mixing or switching, data broadcasting and routing, timing, and meeting control. Finally, it reassembles the necessary information from each meeting point and sends it to the appropriate terminal devices. In other words, the MCU is responsible for the access of all video conferencing terminals and the exchange, forwarding, and processing of the conference audio and video streams.

[0084] 4. RGB format

[0085] RGB is a commonly used image format. Here, R represents red, G represents green, and B represents blue. These three colors, when combined in different amounts, can display a rich variety of colors. For example, in 8-bit RGB format, (0, 0, 0) represents black, and (255, 255, 255) represents white.

[0086] 5. YUV format

[0087] YUV is a commonly used image format. In YUV, "Y" represents luminance (or Luma), i.e., grayscale value; "U" and "V" represent chrominance (or Chrominance), used to specify the color of a pixel, describing its color and saturation. Higher UV values ​​indicate more saturated colors. YUV often refers to YCbCr, where Y represents the luminance component, Cb represents the blue chrominance component, and Cr represents the red chrominance component. For example, in the H.264 encoding standard, YUV refers to YCbCr, meaning that U in YUV is equivalent to Cb, and the term V is equivalent to Cr.

[0088] Because the human eye is more sensitive to Y than U and V, in order to reduce bandwidth, more luminance information and less chrominance information can be preserved in image encoding. That is, by reducing the sampling rate of U and V, the chrominance information, which is relatively insensitive to the human eye, can be compressed and sampled, thereby obtaining a relatively small image file for transmission and display without significantly reducing image quality.

[0089] Commonly used YUV formats include YUV444, YUV422, and YUV420. YUV444 represents full sampling, meaning that 4 Y, 4 U, and 4 V values ​​are sampled for every 4 points. YUV422 represents 2:1 horizontal sampling and full vertical sampling, meaning that 4 Y, 2 U, and 2 V values ​​are sampled for every 4 points. YUV420 represents 2:1 horizontal sampling and 2:1 vertical sampling, with every 4 Y values ​​sharing a pair of UV values, meaning that 4 Y, 1 U, and 1 V value are sampled for every 4 points.

[0090] It should be noted that, in the embodiments of this application, the YUV format is referred to as the luminance color saturation format, the Y component is referred to as the luminance component, UV is referred to as color saturation, and the U component and V component are referred to as chroma components.

[0091] 6. 1080P and 4K

[0092] 1080P, also known as 1080P resolution, has two million pixels, and the common resolution format is 1920*1080. 4K, also known as 4K resolution, has more than 8 million pixels, which is four times that of 1080P, and the common resolution format is 3840*2160.

[0093] 7. Image upsampling

[0094] Image upsampling is the process of converting an image from low resolution to high resolution, thus achieving image magnification. For an image with a resolution of H*W, performing an S-fold upsampling on the image yields an image with a resolution of (SH)*(SW).

[0095] 8. Image downsampling

[0096] Image downsampling, also known as image reduction sampling, is the process of reducing the resolution of an image from high resolution to low resolution, thereby shrinking the image. For an image with a resolution of H*W, performing an S-fold downsampling on the image will result in an image with a resolution of (H / S)*(W / S).

[0097] 9. Supplemental Enhancement Information (SEI)

[0098] The SEI field in H.264 / H.265 encoding is a standard mechanism for embedding additional information into the video bitstream. During video encoding, the SEI field allows the addition of unnecessary auxiliary information to the video data stream. This auxiliary information does not directly affect the video decoding process, but it can be used to provide additional contextual information or enhance the user experience of the video content.

[0099] Taking the H.264 video coding standard as an example, the H.264 video coding standard divides the entire system framework into two layers: the video coding layer (VCL) and the network abstraction layer (NAL). The VCL layer is responsible for processing the content of the video data, including algorithms for compression and decompression, to ensure the effective transmission and storage of the video data. The main task of the NAL layer is to format the video data and provide necessary header information. The header information primarily ensures that the data can adapt to the requirements of various channels and storage media during transmission, such as different network bandwidths, transmission protocols, and storage formats.

[0100] The NAL unit (also known as the NAL module) is the basic syntax structure of the NAL layer, used to encapsulate the raw byte sequence payload (RBSP) from the VCL. Each NAL unit consists of a one-byte header and a series of RBSP data. The NAL header contains a NAL unit type field, which identifies the data type carried by the NAL unit; the RBSP data is passed from the VCL layer and contains the main content of the video data.

[0101] The H.264 / AVC standard has 17 different NAL unit types, each corresponding to different data types, such as video keyframes and video decoder configuration parameters. When the NAL unit type field value is 6, this NAL unit contains SEI information, which can include various types of data, such as timecode, scene descriptions, and user-defined data.

[0102] In some implementations, the SEI field has a specific format, including data type (payload type), data size (payload size), universally unique identifier (UUID), and valid data content (payload content). Specifically, when the data type is 5, this field is used to process unregistered user data, and this is handled by the function user_data_unregistered().

[0103] Therefore, the SEI field has the characteristics of independence and flexibility. Independence means that the SEI information is independent of the video decoding process. Even if the SEI information is lost, it will not affect the video decoding and playback. Flexibility means that the SEI field can be used to transmit various types of information, such as encoder parameters, copyright information, camera parameters, editing events, custom messages, etc.

[0104] In summary, when encoding and decoding video data, SEI information can be embedded in the video bitstream during encoding; during decoding, specific business logic can be executed based on this SEI information, such as obtaining copyright information or user-defined data.

[0105] 10. Screen content coding (SCC)

[0106] In recent years, screen content video, including computer-generated text, graphics, and animations, has become increasingly popular. This screen content video exhibits different colors and other signal characteristics compared to natural video. To address the need for efficient encoding of screen content video, many SCC (Screen Computing and Coding) tools have been developed, achieving significant progress in encoding efficiency.

[0107] HEVC-SCC is an encoding standard that includes SCC functionality. It has made many optimizations for screen content encoding, including encoding tools such as intra block copy (IBC), palette mode, adaptive color transformation, and adaptive motion vector resolution, which have improved the compression efficiency of screen content and the display effect of screen images to a certain extent.

[0108] Since HEVC-SCC encoding is an extension of HEVC encoding, it naturally inherits all the characteristics of HEVC encoding, including the SEI field.

[0109] Secondly, the relevant background of the embodiments of this application will be introduced.

[0110] Screen sharing is a core function in video conferencing. Screen sharing is typically used to share the display of screen content such as browser windows, applications, PPTs, documents, and spreadsheets, so that members of the video conference can see the same content.

[0111] In related technologies, screen sharing is typically achieved by taking a screenshot. That is, please refer to... Figure 1 The system acquires a video source image from the sending end, which is a screenshot of the screen content to be shared. The sending end then encodes this screen image to obtain a bitstream, which is transmitted to the receiving end. Upon receiving the bitstream, the receiving end decodes it to obtain a reconstructed screen image, which is then displayed.

[0112] Optionally, for local screen projection, the bitstream can be transmitted via wireless connection (WiFi) or wired connection (HDMI); for remote screen sharing, video conferencing supports point-to-point, point-to-multipoint, and multipoint real-time synchronous interactive communication, which is mainly controlled by the MCU.

[0113] Optionally, for screen sharing, the video source image is usually in RGB format, which needs to be converted to YUV format according to relevant algorithms to obtain the screen image to be encoded. For the receiving end, the image display format it supports is usually RGB format. If the decoded and reconstructed image is in YUV format, it needs to be converted to RGB format before display.

[0114] In some embodiments, the video encoding methods employed primarily include traditional video encoding techniques for camera-captured images, such as H.264 / H.265 encoding, and encoding techniques for screen image content, such as HEVC-SCC encoding. Specifically, camera-captured images often contain sensor noise, continuous tones, and complex textures; screen images, on the other hand, typically exhibit noise-free characteristics, discrete tones, fine lines, and sharp edges.

[0115] Taking H.264 encoding, a traditional video coding technology, as an example, please refer to [link / reference]. Figure 2 In encoding the current frame image F n At that time, first set the current frame image F nThe image is divided into multiple pixel blocks. For example, H.264 encoding uses a 16x16 pixel region as a macroblock by default, dividing the current frame into multiple 16x16 macroblocks. Alternatively, smaller sub-blocks can be created from the 16x16 macroblocks, such as 16x8, 8x8, 4x4, 8x4, 4x8, etc. Then, each pixel block is encoded separately to encode the current frame image. Figure 2 In the middle, the reference frame is only based on the current frame image F n The previous frame image (denoted as F) n-1 Taking a frame as an example, the current frame image F n The reconstructed frame image is denoted as F. n '.

[0116] H.264 encoding primarily employs the following four compression methods to compress the current frame image.

[0117] (1) Intra-frame prediction compression.

[0118] Intra-frame predictive compression, also known as spatial compression, is a video coding technique that reduces the amount of data to be encoded by predicting the value of the current pixel block based on the correlation between pixels within an image. In other words, intra-frame predictive compression reduces the amount of data needed to encode the current macroblock by predicting the pixel value of the current macroblock based on the correlation between pixels within an image, thereby solving the spatial data redundancy problem of a single frame and achieving efficient compression.

[0119] The implementation process of intra-frame prediction compression can be as follows: first, the current block is predicted in multiple modes (such as longitudinal prediction, lateral prediction and average prediction) to obtain the corresponding prediction block; then, the current block and the prediction block are subtracted to calculate the residual (i.e., difference); and then the residual data is encoded and transmitted.

[0120] (2) Inter-frame prediction compression.

[0121] Inter-frame predictive compression, also known as temporal compression, is a video coding technique that reduces the amount of data that needs to be encoded by predicting the pixel values ​​of the current block based on the correlation (i.e., temporal correlation) between video image frames. In other words, inter-frame prediction utilizes the similarity between adjacent frames to predict the pixel values ​​of the current block, thereby reducing the amount of data that needs to be encoded, solving the problem of temporal redundancy between video frames, and achieving efficient compression.

[0122] Since the content between adjacent frames in a video is often very similar, this similarity can be used to reduce the amount of data that needs to be transmitted or stored. The principle of inter-frame predictive compression is to find the reference block with the smallest difference between it and the current block in the current frame from the adjacent reference frames through motion estimation (ME), and then encode and transmit the motion vector (MV) of this reference block and the residual data (i.e., the difference between the current block and the reference block).

[0123] Correspondingly, during decoding, the receiving end reconstructs the image of the current frame based on the received motion vectors and residual data, combined with the reference frame.

[0124] As an example, the reference frame can be the current frame F. n The previous encoded reconstructed frame, i.e., F n-1 The reference frame can also be multiple encoded reconstructed frames, and this application embodiment does not limit this.

[0125] (3) Integer Discrete Cosine Transform (DCT).

[0126] Integer DCT is a technique for lossy data compression of image blocks. It achieves efficient data compression while maintaining acceptable image quality by transforming the image from the spatial domain to the frequency domain and combining quantization and coding techniques.

[0127] During encoding, a Directional Transform (DCT) is first applied to each macroblock, converting it from the spatial domain to the frequency domain. In the frequency domain, image energy is typically concentrated in the low-frequency range, while the high-frequency range contains image details and noise. The DCT makes this energy distribution more apparent, facilitating subsequent compression steps. Then, the DCT-transformed coefficients are quantized. Quantization is a lossy process that rounds or truncates the DCT coefficients according to a specific quantization table, reducing the amount of data that needs to be stored or transmitted. The quantization step size determines the trade-off between compression ratio and image quality: a larger quantization step size results in a higher compression ratio but also a greater loss of image quality; conversely, a smaller quantization step size results in higher image quality but a correspondingly lower compression ratio. Furthermore, the quantized DCT coefficients are further encoded, for example using Huffman coding or isoentropy coding techniques, to further reduce the data volume. Finally, the encoded data can be stored or transmitted.

[0128] During the decoding process, the encoded data is decoded, dequantized, and subjected to inverse DCT transform (also known as IDCT) to recover an approximate representation of the image. Since quantization is lossy, there will be some quality loss between the decoded image and the original image; however, in most cases, this quality loss is acceptable to the human eye.

[0129] (4) Context-based adaptive binaryarithmetic coding (CABAC) compression.

[0130] CABAC is a context-based adaptive binary arithmetic coding technique that uses the principles of arithmetic coding to encode input data (such as syntax elements in video coding) into binary form. Unlike traditional variable-length coding (such as Huffman coding), arithmetic coding does not map each symbol to a fixed-length or variable-length codeword, but instead encodes the entire message as a real number in the interval [0, 1).

[0131] Both CABAC and Huffman coding utilize statistical properties of the data for encoding. In Huffman coding, frequently occurring data (high-frequency data) is assigned shorter codewords, while infrequently occurring data (low-frequency data) is assigned longer codewords. CABAC employs a similar strategy, assigning a probability model to each syntax element and using arithmetic coding to generate codewords. High-frequency syntax elements are typically assigned shorter codewords, while low-frequency syntax elements are assigned longer codewords.

[0132] Furthermore, as an adaptive encoding technique, CABAC dynamically updates the probability model of each syntax element during the encoding process to better match the actual data distribution. This adaptability makes CABAC generally more efficient than fixed-encoding techniques such as Huffman coding. Moreover, CABAC also considers contextual information. When encoding a syntax element, it considers the values ​​and types of previously encoded syntax elements to select a probability model that is more suitable for the current context. This contextual relevance allows CABAC to compress data more effectively.

[0133] In summary, traditional video coding techniques (such as H.264 / H.265 coding) typically employ a hybrid coding structure combining inter-frame prediction, intra-frame prediction, transform, and quantization. However, when using this coding structure to encode content from screen images, issues such as blurred text and loss of detail can occur, resulting in poor coding quality.

[0134] Furthermore, in the H.264 encoding process described above, since screen images are typically in RGB or YUV444 format, but most existing hardware devices only support YUV420 format encoding, decoding, and transmission, the screen image needs to be converted to YUV420 format before encoding. However, after converting the screen image from YUV444 to YUV420, the sampling rate of the U and V components becomes one-quarter of the original, and the loss of chromaticity information leads to a loss of image quality. Especially in auxiliary stream projection scenarios in video conferencing, the loss of chromaticity information can cause color anomalies such as blurred text edges and black borders.

[0135] Based on this, the embodiments of this application provide an encoding and decoding method that can realize the encoding and decoding of YUV444 format images under the conditions of existing software and hardware devices, while being compatible with the encoding and decoding of YUV420 format images, so as to ensure that the shared YUV444 format screen image can be normally received and displayed at the receiving end, effectively solving the problem of image blurring caused by the loss of chroma information, and improving the display effect of screen images in screen projection / screen sharing scenarios.

[0136] Finally, the implementation environment of the embodiments of this application will be described.

[0137] Please refer to Figure 3 , Figure 3 This is a schematic diagram of an implementation environment provided in an embodiment of this application. The implementation environment includes a source device 10, a destination device 20, a link 30, and a storage device 40. The source device 10 can generate encoded video, i.e., a bitstream. Therefore, the source device 10 can also be called an encoding device. The destination device 20 can decode the bitstream generated by the source device 10. Therefore, the destination device 20 can also be called a decoding device. The link 30 can receive the encoded video generated by the source device 10 and can transmit the encoded video to the destination device 20. The storage device 40 can receive the encoded video generated by the source device 10 and can store the encoded video. Under these conditions, the destination device 20 can directly obtain the encoded video from the storage device 40. Alternatively, the storage device 40 can correspond to a file server or another intermediate storage device that can store the encoded video generated by the source device 10. Under these conditions, the destination device 20 can stream or download the encoded video stored in the storage device 40.

[0138] Both source device 10 and destination device 20 may include one or more processors and memory coupled to the one or more processors. This memory may include random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or any other media that can be used to store desired program code in the form of computer-accessible instructions or data structures. For example, both source device 10 and destination device 20 may include mobile phones, smartphones, personal digital assistants (PDAs), wearable devices, pocket PCs (PPCs), tablets, smart car systems, smart TVs, smart speakers, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.

[0139] Link 30 may include one or more media or devices capable of transmitting encoded video from source device 10 to destination device 20. In one possible implementation, link 30 may include one or more communication media enabling source device 10 to directly transmit encoded video to destination device 20 in real time. In this embodiment, source device 10 may modulate the encoded video based on a communication standard, such as a wireless communication protocol, and transmit the modulated video to destination device 20. The one or more communication media may include wireless and / or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, wide area network, or global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices facilitating communication from source device 10 to destination device 20, etc., which are not specifically limited in this embodiment.

[0140] In one possible implementation, storage device 40 can store the received encoded video sent by source device 10, and destination device 20 can directly retrieve the encoded video from storage device 40. Under such conditions, storage device 40 can include any of a variety of distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, digital versatile discs (DVDs), compact disc read-only memory (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing bitstreams.

[0141] In one possible implementation, storage device 40 may correspond to a file server or another intermediate storage device that can store the bitstream generated by source device 10, and destination device 20 may stream or download the images stored on storage device 40. The file server can be any type of server capable of storing encoded video and sending it to destination device 20. In one possible implementation, the file server may include a web server, a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive, etc. Destination device 20 can acquire the encoded images via any standard data connection (including an Internet connection). Any standard data connection may include a wireless channel (e.g., Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), cable modem, etc.), or a combination of both suitable for acquiring encoded video stored on a file server. The transmission of encoded video from storage device 40 may be streaming, downloading, or a combination of both.

[0142] Figure 3 The implementation environment shown is only one possible implementation, and the technology of this application embodiment can be applied to more than just this. Figure 2 The source device 10 shown can encode images, and the destination device 20 can decode encoded video. It can also be applied to other devices that can encode video and decode bitstreams. This application embodiment does not specifically limit them.

[0143] exist Figure 3In the illustrated implementation environment, source device 10 includes a data source 120, an encoder 100, and an output interface 140. In some embodiments, the output interface 140 may include a modem / demodulator and / or a transmitter, wherein the transmitter may also be referred to as a transmitter. The data source 120 may include a video capture device (e.g., a camera, etc.), an archive containing previously captured video, a feed interface for receiving video from a video content provider, and / or a computer graphics system for generating video, or a combination of these sources of video.

[0144] Data source 120 can send video to encoder 100, which can encode the received video from data source 120 to obtain encoded video. The encoder can then send the encoded video to an output interface. In some embodiments, source device 10 directly sends the encoded video to destination device 20 via output interface 140. In other embodiments, the encoded video can also be stored on storage device 40 for later retrieval by destination device 20 for decoding and / or display.

[0145] exist Figure 3 In the illustrated implementation environment, destination device 20 includes an input interface 240, a decoder 200, and a display device 220. In some embodiments, the input interface 240 includes a receiver and / or a modem. The input interface 240 may receive encoded video via link 30 and / or from storage device 40, and then send it to the decoder 200, which may decode the received encoded video to obtain decoded video. The decoder may send the decoded video to the display device 220. The display device 220 may be integrated with destination device 20 or may be external to destination device 20. Generally, the display device 220 displays the decoded video. The display device 220 may be any type of display device, for example, a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display devices.

[0146] although Figure 3Not shown, but in some respects, encoder 100 and decoder 200 may be integrated with each other and may include appropriate multiplexer-demultiplexer (MUX-DEMUX) units or other hardware and software for encoding both audio and video in a common data stream or separate data streams. In some embodiments, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol, or other protocols such as User Datagram Protocol (UDP), if applicable.

[0147] Encoder 100 and decoder 200 may each be any of the following circuits: one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the techniques of the embodiments of this application are implemented in part in software, the apparatus may store instructions for software in a suitable non-volatile computer-readable storage medium, and the instructions may be executed in hardware using one or more processors to implement the techniques of the embodiments of this application. Any of the foregoing (including hardware, software, combinations of hardware and software, etc.) may be considered as one or more processors. Each of encoder 100 and decoder 200 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (encoder-decoder) in the respective apparatus.

[0148] In this application embodiment, encoder 100 may be generally referred to as an apparatus that “signals” or “sends” certain information to, for example, decoder 200. The terms “signals” or “sends” may generally refer to the transmission of syntax elements and / or other data for decoding compressed video. This transmission may occur in real-time or near real-time. Alternatively, this communication may occur after a period of time, for example, during encoding when syntax elements are stored in a computer-readable storage medium in a encoded bitstream, and the decoding apparatus may then retrieve the syntax elements at any time after they have been stored in this medium.

[0149] Figure 4This is a schematic diagram of another implementation environment provided in this application embodiment. The implementation environment includes a transmitting end, a receiving end, and an MCU. The transmitting end includes a first control module, and a first video module, a first display module, and a first network transmission module respectively connected to the first control module; the receiving end includes a second control module, and a second video module, a second display module, and a second network transmission module respectively connected to the second control module.

[0150] The local conferencing terminal (i.e., the sending end) can capture screenshots of the screen content to be shared via the first video module to obtain a screen image, and then encode the screen image to obtain a first bitstream. The first video module sends the first bitstream to the MCU via the first network transmission module. The MCU sends the first bitstream to the receiving end, and the second network transmission module of the receiving end receives the first bitstream and sends it to the second video module. The second video module can parse the first bitstream to obtain a reconstructed screen image, and then send the reconstructed screen image to the second control module. The second control module controls the second display module to display the reconstructed screen image.

[0151] The MCU is primarily used for real-time synchronous interactive communication between the transmitting and receiving ends. In some embodiments, if the receiving end's decoding capability is insufficient, the MCU can also convert the bitstream into a format that the receiving end can decode, based on the receiving end's decoding capability.

[0152] Optionally, the transmitting end further includes a first audio module that can be connected to a microphone, and the receiving end further includes a second audio module that can be connected to a speaker. In this case, the microphone at the transmitting end can process the captured sound through the first audio module to obtain an audio file, and then send the audio file to the MCU through the first network transmission module. The MCU receives the audio file and sends it to the second network transmission module at the receiving end. The second network transmission module sends the audio file to the second audio module, which receives the audio file and controls the speaker to play the audio file.

[0153] Optionally, the first control module of the transmitting end can also be connected to a camera used to capture images of users participating in screen sharing. In this case, the camera of the transmitting end can send the captured image to the first control module. The first control module receives the captured image and sends it to the first video module. The first video module receives the captured image and encodes it to obtain a second bitstream. This second bitstream is then sent to the MCU via the first network transmission module. The MCU sends the second bitstream to the receiving end. The second network transmission module of the receiving end receives the second bitstream and sends it to the second video module. The second video module parses the second bitstream to obtain a reconstructed captured image, which is then sent to the second control module. The second control module controls the second display module to display the reconstructed captured image.

[0154] In other words, when the first control module is connected to the camera, screen sharing can not only share the screen content, but also enable real-time video for the user.

[0155] Please refer to Figure 5 The first video module of the sending end includes a data acquisition submodule, an image encoding submodule, a component encoding submodule, and a bitstream merging submodule. When executing the encoding method provided in this application embodiment, a screenshot of the screen content to be shared is taken to obtain a first image. Then, the data acquisition submodule extracts the data of the target component from the first image to obtain the first component data. A second image with the same content as the first image is then acquired, where the sampling rate of the target component in the second image is lower than that in the first image. Next, the image encoding submodule encodes the second image into a bitstream, the component encoding submodule encodes the first component data into a bitstream, and the bitstream processing submodule merges the bitstreams of the second image and the first component data before sending them to the receiving end.

[0156] Please refer to Figure 6 The second video module at the receiving end includes an image decoding submodule, a component decoding submodule, and an image reconstruction submodule. When executing the decoding method provided in this application embodiment, the image decoding submodule parses the reconstructed second image from the bitstream, and the component decoding submodule parses the reconstructed first component data from the bitstream. Then, based on the reconstructed second image and the reconstructed first component data, a reconstructed first image is generated.

[0157] The aforementioned sending and receiving ends can be any electronic device with screen sharing capabilities, such as a PC (personal computer), mobile phone, PPC (Pocket PC), tablet computer, television, etc.

[0158] The above Figure 4 , Figure 5 and Figure 6 The structures of the receiving and transmitting ends described are merely examples. In practical applications, the transmitting end can also act as the receiving end, and vice versa. This application does not limit this. If the transmitting end can also act as the receiving end, and the receiving end can also act as the transmitting end, then the structures of the transmitting and receiving ends are the same. That is, both the transmitting end and the receiving end include a first control module, a first video module, a first display module, a first network transmission module, a second control module, a second video module, a second display module, and a second network transmission module.

[0159] It should be noted that the application scenarios and implementation environments described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, as the application scenarios and implementation environments evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0160] Figure 7 This is a flowchart illustrating an encoding method provided in an embodiment of this application. Please refer to it. Figure 7 The method includes the following steps.

[0161] Step 701: Extract the data of the target component from the first image to obtain the first component data; wherein, the color space model of the first image includes data of multiple color components, and the target component is at least one of the multiple color components.

[0162] In some embodiments, the color space model of the first image can be YUV, HSV, etc. YUV uses one luminance component (Y) and two chrominance components (U, V) to describe the color of a pixel. "Y" represents luminance, which is the grayscale value; "U" and "V" represent chrominance, used to describe color and saturation. HSV, on the other hand, is a color space model based on hue, saturation, and value. "H" represents hue, which determines the type of color, such as red, blue, etc.; "S" represents saturation, which determines the purity of the color; the purer the color, the higher its saturation; and "V" represents the brightness of the color.

[0163] In one possible implementation, the color space model of the first image in step 701 above is a YUV model, and the target component is a chromaticity component, which includes a U component and / or a V component.

[0164] As an example, the first image is in YUV444 format, and the first component data is UV44 data; or, the first image is in YUV422 format, and the first component data is UV22 data. This application does not impose limitations on these embodiments.

[0165] In some embodiments, when the encoding method provided in this application is applied to the content encoding of screen projection / sharing in a video conference, the first image is determined based on the screen content during the screen sharing process. For example, the screen content during the screen sharing process is captured by taking screenshots, recording screens, or taking photos to obtain the first image. This application does not limit the method of obtaining the first image in the screen sharing scenario.

[0166] In practical applications, the image obtained by taking a screenshot of the screen content during screen sharing may also be in RGB format. In this case, it is necessary to convert the image format to YUV444 format according to the relevant algorithm.

[0167] It should be noted that the resolution of the first image is not limited in the embodiments of this application. For example, the resolution of the first image can be 180P, 360P, 540P, 720P, 1080P (i.e., 1920*1080), 4K, etc.

[0168] Step 702: Obtain a second image with the same content as the first image, wherein the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image.

[0169] In one possible implementation, step 702 can be performed as follows: determine the data of the target component in the first image, and then perform downsampling on the data of the target component to obtain the second image.

[0170] As explained above, the color space model of the first image is the YUV model, and the target component is the chromaticity component. The process of obtaining the second image can be as follows: downsample the data of the chromaticity component in the first image to obtain the second image.

[0171] As an example, the first image is in YUV444 format, and the second image obtained after downsampling is in YUV420 format; or, the first image is in YUV444 format, and the second image obtained after downsampling is in YUV422 format; or, the first image is in YUV422 format, and the second image obtained after downsampling is in YUV420 format.

[0172] Step 703: Encode the first component data and the second image into the bitstream.

[0173] In one possible implementation, step 703 can be implemented by: encoding the first component data into the bitstream to obtain an encoded first bitstream; and encoding the second image into the bitstream to obtain an encoded second bitstream.

[0174] That is, the first component data and the second image are encoded separately to obtain two bitstreams. The encoding method can be the traditional video encoding technology H.264 / H.265 encoding or HEVC-SCC encoding, and this application embodiment does not limit this.

[0175] In another possible implementation, step 703 can be implemented by: encoding the second image into a bitstream, and encoding the first component data into a target field within the bitstream. The target field is a field in the bitstream used to carry auxiliary information.

[0176] Optionally, the target field mentioned above includes the SEI field. That is, when encoding the second image using encoding protocols such as H.264 encoding, H.265 encoding, and HEVC-SCC encoding, the first component data can be written into the SEI field of the bitstream.

[0177] In some embodiments, encoding the first component data includes the following two cases:

[0178] In the first case, referring to the encoding process of the second image, the first component data is encoded independently, and the encoded data is written into the target field in the bitstream.

[0179] In the second scenario, a reconstructed second image is first obtained based on the bitstream. Then, second component data is extracted from the reconstructed second image. This second component data is obtained by upsampling the target component data in the reconstructed second image. Finally, the residual data between the second component data and the first component data is encoded into the target field of the bitstream.

[0180] It should be noted that, regardless of the first or second scenario, when encoding the first component data, if the residual data is calculated using inter-frame prediction, the previous frame of the first image is used as the reference frame, and the residual between the target component data and the first component data in the reference frame is encoded into the target field of the bitstream. If the residual data is calculated using intra-frame prediction, when independently encoding the first component data using the first scenario, the reconstructed first image is used as the reference frame, and the residual between the target component data and the first component data in the reconstructed first image is encoded into the target field of the bitstream; when encoding using the second scenario, the reference information is the second component data, that is, the residual between the second component data and the first data is encoded into the target field of the bitstream. This application does not impose any limitations on this.

[0181] In summary, considering that encoding the first image typically involves downsampling at least one color component to achieve image compression, but data loss in the color component can lead to image quality degradation, this embodiment of the application, to reduce the image quality loss of the first image to be encoded during image compression, adopts the encoding method in related technologies. First, the target component in the first image is downsampled to obtain a second image with the same content as the first image but a lower sampling rate for the target component. Then, the second image is encoded into the bitstream. Furthermore, this embodiment also encodes the first component data corresponding to the original target component in the first image into the bitstream. This ensures that all original data in the first image can be encoded and transmitted to the receiving end, resulting in more complete and comprehensive encoded data.

[0182] Furthermore, after receiving the bitstream, the receiving end can parse the reconstructed first component data and the reconstructed second image from the bitstream, and then reconstruct the first image based on the reconstructed first component data and the reconstructed second image. In this way, reconstructing the first image by combining the first component data of the first image can greatly improve the quality of the reconstructed image.

[0183] Taking a screen image in YUV444 format as an example, as explained above, relevant image encoding and decoding schemes all downsample the first image to obtain a second image in YUV420 format, and then encode and transmit the second image in YUV420 format. However, the method provided in this application does not change the encoding process of the second image in YUV420 format when encoding the first image. Instead, it encodes and transmits the original UV44 data from the first image as well, ensuring that the bitstream transmitted to the receiving end includes both the second image in YUV420 format and the original UV44 data from the first image. Thus, after receiving the bitstream, the receiving end can parse the reconstructed second image in YUV420 format and the reconstructed UV44 data, and then reconstruct the first image in YUV444 format.

[0184] Therefore, the embodiments of this application can effectively solve the problem of image blurring caused by loss of chroma information under the existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0185] Figure 8 This is a flowchart of a decoding method provided in an embodiment of this application. Please refer to it. Figure 8 The method includes the following steps.

[0186] Step 801: Obtain the reconstructed second image based on the bitstream; wherein the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image, the color space model of the first image includes data of multiple color components, the target component is at least one of the multiple color components, and the content of the second image is the same as that of the first image.

[0187] In other words, the second image is obtained by downsampling the data of the target component in the first image, and then encoding it before sending it to the receiving end. Based on this, after receiving the bitstream corresponding to the second image, the receiving end can parse the reconstructed second image from the bitstream.

[0188] In some embodiments, the color space model of the first image is a YUV model, and the target component is a chromaticity component, which includes a U component and / or a V component.

[0189] As an example, when the first image is in YUV444 format and the target component is the chroma component, the reconstructed second image can be in YUV422 format or YUV420 format; when the first image is in YUV422 format and the target component is the chroma component, the reconstructed second image can be in YUV420 format.

[0190] In some embodiments, when the encoding method provided in this application is applied to the content encoding of screen projection / sharing in a video conference, the first image is determined based on the screen content during the screen sharing process. For example, the screen content during the screen sharing process is captured by taking screenshots, recording screens, or taking photos to obtain the first image. This application does not limit the method of obtaining the first image in the screen sharing scenario.

[0191] Step 802: Obtain the first component data of the reconstruction based on the bitstream. The first component data is the data of the target component in the first image.

[0192] As an example, when the first image is in YUV444 format and the reconstructed second image is in YUV422 format, the reconstructed first component data is UV44 data; when the first image is in YUV444 format and the reconstructed second image is in YUV420 format, the reconstructed first component data is UV44 data; when the first image is in YUV422 format and the reconstructed second image is in YUV420 format, the reconstructed first component data is UV22 data.

[0193] It should be noted that the bitstreams in steps 802 and 801 can be two different bitstreams or the same bitstream. This application embodiment does not impose any restrictions on this.

[0194] When the bitstreams in steps 802 and 801 are different bitstreams, the receiving end receives two bitstreams, assuming they are a first bitstream and a second bitstream. In this case, the receiving end can parse the reconstructed first component data and the reconstructed second image from the two bitstreams based on their identification information. For example, if the identification information of the first bitstream indicates that it is an encoded bitstream of component data, then the first bitstream can be parsed to obtain the reconstructed first component data; if the identification information of the second bitstream indicates that it is an encoded bitstream of an image, then the second bitstream can be parsed to obtain the reconstructed second image. This application embodiment does not limit the identification information corresponding to the two bitstreams, aiming to illustrate that the second image and the first component data can be transmitted to the receiving end through two bitstreams.

[0195] When the bitstreams from steps 802 and 801 are the same, this bitstream carries both the encoded data of the second image and the encoded data of the first component. In this case, a single decoding operation can be performed on the bitstream to extract the reconstructed first component data and the reconstructed second image.

[0196] In one possible implementation, the process of obtaining the reconstructed first component data based on the bitstream in step 802 above can be: obtaining the reconstructed first component data based on the target field in the bitstream, where the target field is a field in the bitstream used to carry auxiliary information.

[0197] Optionally, the target field mentioned above includes the SEI field. That is, when encoding the second image using encoding protocols such as H.264 encoding, H.265 encoding, and HEVC-SCC encoding, the first component data can be written into the SEI field of the bitstream.

[0198] Optionally, the target field carries the residual data corresponding to the first component data. Referring to the relevant explanation in the encoding method, if the residual data is determined based on the target component data in the reconstructed second image as reference information, then when obtaining the reconstructed first component data, it is also necessary to refer to the target component data in the reconstructed second image.

[0199] Based on this, the process of obtaining the reconstructed first component data based on the target field in the bitstream can be as follows: obtain the reconstructed second component data, which is obtained by upsampling the target component data in the reconstructed second image; obtain the reconstructed residual data based on the target field in the bitstream, which is the residual between the first component data and the reconstructed second component data; and obtain the reconstructed first component data based on the residual data and the reconstructed second component data.

[0200] Step 803: Reconstruct the first image based on the reconstructed second image and the reconstructed first component data.

[0201] In one possible implementation, step 803 can be implemented as follows: extracting data corresponding to other color components of the reconstructed second image besides the target component to obtain third component data; merging the third component data and the reconstructed first component data to obtain the reconstructed first image.

[0202] As an example, assuming that both the first and second images are in YUV format and the target component is the chromaticity component, the reconstructed second image is in YUV420 format, and the reconstructed first component data is the reconstructed UV44 data. In this case, the Y channel data in the reconstructed second image and the reconstructed UV44 data can be merged to obtain the reconstructed first image.

[0203] In summary, after receiving the bitstream, the receiving end can parse the reconstructed first component data and the reconstructed second image from the bitstream. Then, by combining the reconstructed first component data and the reconstructed second image, the first image is reconstructed. Since the sampling rate of each channel data in the reconstructed first image is consistent with that of the first image, the image quality loss of the reconstructed first image is small, thereby improving the quality of the reconstructed image.

[0204] Taking a screen image in YUV444 format as an example, after receiving the bitstream encoded by the encoding method shown in the embodiment of this application, the receiving end can parse out the reconstructed YUV420 format second image and the reconstructed UV44 data from it, and then merge the Y channel data in the second image with the reconstructed UV44 data to reconstruct the first image in YUV444 format.

[0205] Therefore, the embodiments of this application can effectively solve the problem of image blurring caused by loss of chroma information under the existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0206] To facilitate understanding, the following example of screen projection / sharing in a video conference will be used to illustrate the encoding and decoding method provided in this application.

[0207] Whether it's local screen mirroring (e.g., mirroring a local phone / PC to a local large screen) or remote screen sharing (e.g., sharing a local phone / PC screen and transmitting it over a network to a remote display), the overall encoding and decoding process is as follows: Figure 9 As shown. See also Figure 9 The sending end collects the screen image to be shared. The screen image can be a natural image taken by a camera, or a screenshot containing text, pictures, or a mixture of text and images. This application embodiment does not limit this.

[0208] It should be noted that if the screen image is in RGB format, it needs to be converted to YUV444 format to obtain a YUV444 image. In this example, for ease of explanation, the YUV444 format image will be referred to as a YUV444 image, and the YUV420 format image will be referred to as a YUV420 image.

[0209] See Figure 10 In one possible implementation, the process of encoding a YUV444 image by the transmitting end according to the encoding method provided in this application embodiment can be as follows: First, the YUV444 image is downsampled to obtain a YUV420 image; simultaneously, the U and V channel data are extracted from the YUV444 image to obtain the original UV data. Then, the YUV420 image is encoded using an existing encoding protocol. For example, the YUV420 image is encoded according to the H.264 encoding protocol to obtain the YUV420 image bitstream. During the encoding of the YUV420 image, a reconstructed YUV420 image is also generated. The UV channels in the reconstructed YUV420 image are upsampled by a factor of 2 to obtain UV44 data (i.e., an image containing only the UV channels, with the same resolution as the Y channel). Using this UV44 data as a reference, the original UV44 data is encoded to obtain UV44 encoded data. Finally, the UV44 encoded data is written into the SEI field of the corresponding bitstream of the YUV420 image to obtain the final output bitstream, which is then sent to the receiving end.

[0210] It should be noted that in the above implementation, the encoding method of UV44 data is similar to the encoding process of the three channels of YUV420 image. Except that the intra-frame and inter-frame prediction references the UV44 data obtained by upsampling, the other steps such as calculating residuals, transformation and quantization, inverse residual transformation, filtering, and entropy coding remain unchanged.

[0211] See Figure 11In another possible implementation, the process of the transmitting end encoding a YUV444 image according to the encoding method provided in the embodiments of this application can be as follows: First, the YUV444 image is downsampled to obtain a YUV420 image; simultaneously, the U and V channel data are extracted from the YUV444 image to obtain the original UV data. Then, the YUV420 image is encoded using an existing encoding protocol. For example, the YUV420 image is encoded according to the H.264 encoding protocol to obtain a YUV420 image bitstream. Similarly, referring to the encoding method of the three channels in the YUV420 image, the original UV44 data is encoded to obtain UV44 encoded data. Finally, the UV44 encoded data is written into the SEI field of the YUV420 image bitstream to obtain the final output bitstream, and this bitstream is sent to the receiving end.

[0212] It should be noted that in this implementation, since the original UV data is encoded independently and does not refer to the UV data in the YUV420 image, it can be directly decoded without referring to the UV data in the reconstructed YUV420 image.

[0213] When the receiving end receives the bitstream, if the SEI field in the bitstream does not carry UV44 encoded data, it directly decodes the bitstream to obtain the reconstructed YUV420 image, thus achieving compatibility with the YUV420 format. If the SEI field in the bitstream carries UV44 encoded data, it decodes the bitstream to obtain the reconstructed UV44 data, and then merges the reconstructed UV44 data with the Y channel data in the reconstructed YUV420 image to obtain the reconstructed YUV444 image, thus achieving YUV444 image encoding and decoding.

[0214] In summary, when encoding and transmitting YUV444 images, the encoding process of YUV420 images is not changed. Instead, the original UV44 data in the YUV444 image is also encoded and transmitted to ensure that the bitstream transmitted to the receiving end includes both the data from the YUV420 image and the UV44 data from the YUV444 image. After receiving the bitstream, the receiving end can parse the reconstructed YUV420 image and the reconstructed UV44 data from it, and then reconstruct the YUV444 image. Therefore, this embodiment can effectively solve the problem of image blurring caused by the loss of chroma information under existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0215] Figure 12This is a schematic diagram of an encoding device provided in an embodiment of this application. The encoding device can be implemented by software, hardware, or a combination of both, serving as part or all of an encoding end device or a transmitting end device. See also... Figure 12 The encoding device includes: a component extraction module 1201, an image acquisition module 1202, and an encoding module 1203.

[0216] The component extraction module 1201 is used to extract the data of the target component in the first image to obtain the first component data; wherein, the color space model of the first image includes the data of multiple color components, and the target component is at least one of the multiple color components;

[0217] The image acquisition module 1202 is used to acquire a second image with the same content as the first image, wherein the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image;

[0218] Encoding module 1203 is used to encode the first component data and the second image into a bitstream.

[0219] Optionally, the color space model of the first image is a lightness-color-saturation YUV model, and the target component is a chromaticity component, which includes a U component and / or a V component; the image acquisition module 1202 is specifically used for:

[0220] The chromaticity component data in the first image is downsampled to obtain the second image.

[0221] Optionally, the encoding module 1203 includes:

[0222] The first encoding unit is used to encode the second image into the bitstream;

[0223] The second encoding unit is used to encode the first component data into the target field of the bitstream, where the target field is a field in the bitstream used to carry auxiliary information.

[0224] Optionally, the second coding unit is specifically used for:

[0225] The reconstructed second image is obtained based on the bitstream;

[0226] The second component data is obtained by upsampling the target component data in the reconstructed second image.

[0227] The residual data between the second component data and the first component data is encoded into the target field in the bitstream.

[0228] Optionally, the target field includes the Supplemental Enhancement Information (SEI) field.

[0229] Optionally, the first image is in YUV444 format, the second image is in YUV420 format, and the first component data includes UV44 data; or, the first image is in YUV444 format, the second image is in YUV422 format, and the first component data includes UV44 data; or, the first image is in YUV422 format, the second image is in YUV420 format, and the first component data includes UV22 data.

[0230] Optionally, the first image is determined based on the screen content during the screen sharing process.

[0231] In this embodiment, considering that at least one color component in the first image is usually downsampled during encoding to achieve image compression, but the loss of color component data can lead to image quality degradation, this embodiment adopts a similar encoding method to reduce image quality degradation during image compression. First, the target component in the first image is downsampled to obtain a second image with the same content as the first image but a lower sampling rate for the target component. Then, the second image is encoded into the bitstream. Furthermore, this embodiment also encodes the first component data corresponding to the original target component in the first image into the bitstream. This ensures that all original data in the first image can be encoded and transmitted to the receiving end, resulting in more complete and comprehensive encoded data.

[0232] Furthermore, after receiving the bitstream, the receiving end can parse the reconstructed first component data and the reconstructed second image from the bitstream, and then reconstruct the first image based on the reconstructed first component data and the reconstructed second image. In this way, reconstructing the first image by combining the first component data of the first image can greatly improve the quality of the reconstructed image.

[0233] Therefore, the embodiments of this application can effectively solve the problem of image blurring caused by loss of chroma information under the existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0234] It should be noted that the encoding device provided in the above embodiments is only illustrated by the division of the above functional modules when encoding the first image. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the encoding device and encoding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0235] Figure 13This is a schematic diagram of a decoding device provided in an embodiment of this application. The decoding device can be implemented as part or all of a decoding end device or a receiving device by software, hardware, or a combination of both. See also... Figure 13 The decoding device includes: a first decoding module 1301, a second decoding module 1302, and an image reconstruction module 1303.

[0236] The first decoding module 1301 is used to obtain the reconstructed second image based on the bitstream; wherein the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image, the color space model of the first image includes data of multiple color components, the target component is at least one of the multiple color components, and the content of the second image is the same as that of the first image.

[0237] The second decoding module 1302 is used to obtain the reconstructed first component data based on the bitstream, wherein the first component data is the data of the target component in the first image;

[0238] Image reconstruction module 1303 is used to reconstruct a first image based on the reconstructed second image and the reconstructed first component data.

[0239] Optionally, the color space model of the first image is a luminance-color-saturation YUV model, and the target component is a chromaticity component, which includes a U component and / or a V component.

[0240] Optionally, the second decoding module 1302 is specifically used for:

[0241] The first component data of the reconstruction is obtained based on the target field in the bitstream, which is the field in the bitstream used to carry auxiliary information.

[0242] Optionally, the target field includes the Supplemental Enhancement Information (SEI) field.

[0243] Optionally, the second decoding module 1302 is specifically used for:

[0244] The second component data of the reconstruction is obtained by upsampling the data of the target component in the reconstructed second image;

[0245] The reconstructed residual data is obtained based on the target field in the bitstream. The residual data is the residual between the first component data and the reconstructed second component data.

[0246] Based on the residual data and the reconstructed second component data, the reconstructed first component data is obtained.

[0247] Optionally, the image reconstruction module 1303 is specifically used for:

[0248] Extract the data corresponding to the color components other than the target component from the reconstructed second image to obtain the third component data;

[0249] The third component data and the reconstructed first component data are merged to obtain the reconstructed first image.

[0250] Optionally, the reconstructed second image is in YUV420 format, the reconstructed first component data includes UV44 data, and the reconstructed first image is in YUV444 format; or, the reconstructed second image is in YUV422 format, the reconstructed first component data includes UV44 data, and the reconstructed first image is in YUV444 format; or, the reconstructed second image is in YUV420 format, the reconstructed first component data includes UV22 data, and the reconstructed first image is in YUV422 format.

[0251] Optionally, the first image is determined based on the screen content during the screen sharing process.

[0252] In this embodiment, the decoding device can parse the reconstructed first component data and the reconstructed second image from the bitstream, and then combine the reconstructed first component data and the reconstructed second image to reconstruct the first image. Since the sampling rate of each channel data in the reconstructed first image is consistent with that of the first image, the image quality loss of the reconstructed first image is small, thereby improving the quality of the reconstructed image.

[0253] Therefore, the embodiments of this application can effectively solve the problem of image blurring caused by loss of chroma information under the existing software and hardware conditions, that is, improve the efficiency of encoding screen images without increasing additional hardware costs.

[0254] It should be noted that the decoding device provided in the above embodiments, when reconstructing the first image based on the bitstream decoding, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the decoding device and the decoding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0255] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the encoding method shown in the above embodiments, or to perform the steps of the decoding method shown in the above embodiments.

[0256] This application also provides a computer program product comprising computer instructions that, when executed by a computer or processor, cause the computer or processor to perform the steps of the encoding method shown in the above embodiments, or the steps of the decoding method shown in the above embodiments. Alternatively, a computer program is provided that, when run on a computer or processor, causes the computer or processor to perform the steps of the encoding method shown in the above embodiments, or the steps of the decoding method shown in the above embodiments.

[0257] This application also provides an encoding / decoding system, which includes an encoding device and a decoding device. The encoding device is used to implement the steps of the encoding method shown in the above embodiments, and the decoding device is used to implement the steps of the decoding method shown in the above embodiments.

[0258] This application also provides an encoded bitstream, which is generated according to the encoding method shown in the above embodiments.

[0259] Optionally, the bitstream includes first component data and a second image; wherein the first component data is the data of a target component in the first image, the color space model of the first image includes data of multiple color components, and the target component is at least one of the multiple color components; the second image has the same content as the first image, and the sampling rate of the target component in the second image is less than the sampling rate of the target component in the first image.

[0260] This application also provides a computer-readable storage medium storing a bitstream generated according to the encoding method shown in the above embodiments.

[0261] This application also provides an apparatus for storing a bitstream, the apparatus including a receiver and at least one storage medium, the receiver being used to receive a bitstream generated according to the encoding method shown in the above embodiments, and the at least one storage medium being used to store the bitstream.

[0262] This application also provides an apparatus for transmitting a bitstream, which includes a transmitter and a receiver. The receiver is used to receive the bitstream generated according to the encoding method shown in the above embodiments, and the transmitter is used to send the bitstream to an end-side device through a transmission medium.

[0263] This application also provides an apparatus for transmitting a bitstream, which includes a transmitter and at least one storage medium. The at least one storage medium is used to store the bitstream generated according to the encoding method shown in the above embodiments, and the transmitter is used to obtain the bitstream from the storage medium and transmit the bitstream to the end-side device through the transmission medium.

[0264] This application also provides a system for distributing bitstreams. The system includes at least one storage medium for storing bitstreams generated according to the encoding method shown in the above embodiments. A streaming media device is used to obtain a target bitstream from the at least one storage medium and send the target bitstream to an end-side device. The streaming media device includes a content server or a content distribution server.

[0265] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.

[0266] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.

[0267] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0268] The above descriptions are embodiments provided in this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An encoding method characterized by comprising: The method comprises: extracting data of a target component in a first image to obtain first component data, wherein a color space model of the first image comprises data of a plurality of color components, and the target component is at least one of the plurality of color components; obtaining a second image with the same content as the first image, wherein a sampling rate of the target component in the second image is less than a sampling rate of the target component in the first image; encoding the first component data and the second image into a code stream.

2. The method of claim 1, wherein, The color space model of the first image is a YUV model, the target component is a chroma component, and the chroma component comprises a U component and / or a V component. The obtaining of the second image with the same content as the first image comprises: performing down-sampling processing on data of the chroma component in the first image to obtain the second image.

3. The method of claim 1 or 2, wherein, The encoding of the first component data and the second image into the code stream comprises: encoding the second image into the code stream; encoding the first component data into a target field in the code stream, wherein the target field is a field in the code stream for carrying auxiliary information.

4. The method of claim 3, wherein, The encoding of the first component data into the target field in the code stream comprises: obtaining a reconstructed second image based on the code stream; obtaining second component data by performing up-sampling processing on data of the target component in the reconstructed second image; encoding residual data between the second component data and the first component data into the target field in the code stream.

5. The method of claim 3 or 4, wherein, The target field comprises a SEI field.

6. The method according to any one of claims 1 to 5, wherein, The first image is determined based on screen content in a screen sharing process.

7. A decoding method, comprising: The method comprises: obtaining a reconstructed second image based on a code stream, wherein a sampling rate of a target component in the second image is less than a sampling rate of the target component in a first image, a color space model of the first image comprises data of a plurality of color components, the target component is at least one of the plurality of color components, and the second image has the same content as the first image; obtaining reconstructed first component data based on the code stream, wherein the first component data is data of the target component in the first image; reconstructing the first image based on the reconstructed second image and the reconstructed first component data.

8. The method of claim 7, wherein, The color space model of the first image is a YUV model, the target component is a chroma component, and the chroma component comprises a U component and / or a V component.

9. The method of claim 7 or 8, wherein, The obtaining of the reconstructed first component data based on the code stream comprises: obtaining the reconstructed first component data based on a target field in the code stream, wherein the target field is a field in the code stream for carrying auxiliary information.

10. The method of claim 9, wherein, The target field comprises a SEI field.

11. The method of claim 9 or 10, wherein, The obtaining of the reconstructed first component data based on the target field in the code stream comprises: obtaining reconstructed second component data by performing up-sampling processing on data of the target component in the reconstructed second image; reconstructed residual data based on the target field in the code stream, the residual data being a residual between the first component data and the reconstructed second component data; reconstructing the first component data based on the residual data and the reconstructed second component data.

12. The method according to any one of claims 7 to 11, wherein, reconstructing the first image based on the reconstructed second image and the reconstructed first component data, comprises: extracting data corresponding to other color components of the reconstructed second image except the target component to obtain third component data; performing component data merging on the third component data and the reconstructed first component data to obtain the reconstructed first image.

13. The method according to any one of claims 7 to 12, wherein, The first image is determined based on screen content in a screen sharing process.

14. An encoding apparatus, comprising: The apparatus comprises: a component extraction module configured to extract data of a target component in a first image to obtain first component data, wherein a color space model of the first image comprises data of a plurality of color components, and the target component is at least one of the plurality of color components; an image acquisition module configured to acquire a second image having the same content as the first image, wherein a sampling rate of the target component in the second image is less than a sampling rate of the target component in the first image; an encoding module configured to encode the first component data and the second image into a code stream.

15. A decoding apparatus, characterized by comprising: The apparatus comprises: a first decoding module configured to obtain a reconstructed second image based on a code stream, wherein a sampling rate of a target component in the second image is less than a sampling rate of the target component in a first image, a color space model of the first image comprises data of a plurality of color components, the target component is at least one of the plurality of color components, and the second image has the same content as the first image; a second decoding module configured to obtain reconstructed first component data based on the code stream, the first component data being data of the target component in the first image; an image reconstruction module configured to reconstruct the first image based on the reconstructed second image and the reconstructed first component data.

16. An encoding device, comprising: The encoding device comprises a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program to implement steps of the encoding method in any one of claims 1-6.

17. A decoding device, comprising: The decoding device comprises a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program to implement steps of the decoding method in any one of claims 7-13.

18. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program runs on a computer or a processor, causes the computer or the processor to execute steps of the encoding method in any one of claims 1-6, or execute steps of the decoding method in any one of claims 7-13.

19. A computer program product, characterised in that, The computer program product contains computer instructions, when the computer instructions are executed by a computer or a processor, causes steps of the encoding method in any one of claims 1-6 to be executed, or steps of the decoding method in any one of claims 7-13 to be executed.

20. A coded bitstream, comprising: The code stream is generated according to the method of any one of claims 1-6.

21. A coded bitstream, comprising: The code stream comprises first component data and a second image; The first component data is data of a target component in the first image, the color space model of the first image comprises data of a plurality of color components, and the target component is at least one of the plurality of color components; the second image has the same content as the first image, and a sampling rate of a target component in the second image is less than a sampling rate of the target component in the first image.

22. A computer-readable storage medium, characterized in that, The computer readable storage medium stores the code stream of any one of claims 1-6.

23. An apparatus for storing a bitstream, characterized by The apparatus comprises a receiver and at least one storage medium, The receiver is configured to receive the code stream of any one of claims 1-6; The at least one storage medium is configured to store the code stream.

24. An apparatus for transmitting a code stream, the apparatus comprising: The apparatus comprises a transmitter and a receiver, The receiver is configured to receive the code stream of any one of claims 1-6; The transmitter is configured to transmit the code stream to an end-side device via a transmission medium.

25. An apparatus for transmitting a code stream, the apparatus comprising: The apparatus comprises a transmitter and at least one storage medium, The at least one storage medium is configured to store the code stream of any one of claims 1-6; The transmitter is configured to obtain the code stream from the storage medium and transmit the code stream to an end-side device via a transmission medium.

26. A system for distributing a code stream, the system comprising: The system comprises: At least one storage medium configured to store at least one code stream of any one of claims 1-6; A streaming media device configured to obtain a target code stream from the at least one storage medium and transmit the target code stream to an end-side device, wherein the streaming media device comprises a content server or a content distribution server.