WO2020135357A1 - Data compression method and apparatus, and data encoding/decoding method and apparatus - Google Patents

Data compression method and apparatus, and data encoding/decoding method and apparatus Download PDF

Info

Publication number
WO2020135357A1
WO2020135357A1 PCT/CN2019/127600 CN2019127600W WO2020135357A1 WO 2020135357 A1 WO2020135357 A1 WO 2020135357A1 CN 2019127600 W CN2019127600 W CN 2019127600W WO 2020135357 A1 WO2020135357 A1 WO 2020135357A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
block
data
information
background information
Prior art date
Application number
PCT/CN2019/127600
Other languages
French (fr)
Chinese (zh)
Inventor
邵庆龙
高俊平
蒲宇亮
崔振峰
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020135357A1 publication Critical patent/WO2020135357A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • This application relates to, but not limited to, video processing technology, and in particular, to a data compression method and device, data encoding/decoding method and device.
  • the color code table encoding scheme generally includes: classify similar colors according to the color distribution of the text block, generate the same color code table, use lossless compression for the color code table, and completely restore the text block according to the index value at the decoding end content.
  • the color code table coding scheme is suitable for text blocks with relatively single color distribution. When the color distribution is complex and there are many types of divisions, the color code table coding scheme has low coding efficiency and usually switches to the JPEG algorithm.
  • the lossy compression coding scheme generally includes:
  • the video sampling format generally uses a full sampling method of 4:4:4 (also a lossless compression method), which allows the chroma of the screen content to be completely retained, so it will be consumed during the encoding process More coding bits, and in order to ensure the clarity of the font that is more sensitive to the human eye, generally use completely lossless compression on the font, but this will lead to increased transmission bandwidth and reduced coding efficiency.
  • the present application provides a data compression method and device, data encoding/decoding method and device, which can reduce the transmission bandwidth occupation while ensuring the fidelity of data transmission.
  • This application provides a data compression method, including:
  • the pixel distribution information determine whether the coding block to be processed is an image block or a text block
  • For the determined text block obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information;
  • Lossy compression is performed on the determined image blocks, lossy compression is performed on text blocks that do not contain color background information, and lossless compression is performed on text blocks that contain color background information.
  • This application also provides a data encoding method, including:
  • the pixel distribution information determine whether the coding block to be processed is an image block or a text block
  • For the determined text block obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information;
  • Lossy compression of the determined image blocks lossy compression of text blocks that do not contain color background information, and lossless compression of text blocks that contain color background information
  • the present application also provides a computer-readable storage medium that stores computer-executable instructions for performing the data compression method described in any one of the above, and/or any of the above Data encoding method.
  • the present application also provides a data compression apparatus, including a processor and a memory; wherein the memory stores a computer program that can run on the processor: for performing the steps of any one of the data compression methods described above.
  • the present application further provides a data encoding device, including a processor and a memory; wherein, the memory stores a computer program executable on the processor: for performing the steps of any one of the data encoding methods described above.
  • This application further provides a data decoding method, including:
  • the lossy data packet After decoding the lossless data packet and filling it in the decoded frame, it is determined that the lossy data packet is an image block or a text block;
  • the present application also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to perform any one of the data decoding methods described above.
  • the present application further provides a data decoding device, including a processor and a memory; wherein the memory stores a computer program executable on the processor: for performing the steps of any one of the data decoding methods described above.
  • This application classifies the coded blocks to be processed before coding, and adopts lossy coding or lossless coding for different types of coding blocks to be processed, which satisfies the reduction of transmission bandwidth occupation; moreover, the decoding end uses chrominance information to encode the lossy
  • the decoded data after the bitstream is subjected to necessary color compensation to ensure the fidelity of the data after transmission.
  • Figure 1 is a flow chart of the data compression method of this application.
  • FIG. 3 is a schematic diagram of the composition of the data encoding device of the present application.
  • FIG. 5 is a schematic diagram of the composition structure of the data decoding device of the present application.
  • the YUV4:2:2 sub-sampling method is a lossy compression method. While ensuring the integrity of the luminance component Y, each group of components in the horizontal direction, that is, the chroma component cb and the chroma component cr are shared A set of luminance component Y values are used for encoding and decoding. Using this sampling method will reduce the transmission of chrominance component Y to achieve the purpose of reducing bandwidth consumption. However, due to the large number of thin lines such as fonts and borders in the screen content video, some Even a monochrome line with a pixel of 1 will cause a decrease in the fidelity of the displayed content after the above sampling.
  • the inventor of the present application has found through analysis that if the content of the screen is classified before encoding, then different encoding strategies are adopted for different types of screen content to meet the requirement of reducing the transmission bandwidth occupation; at the same time, the lossy compression Partially compensate to ensure the fidelity of the displayed content.
  • Figure 1 is a flowchart of the data compression method of this application, as shown in Figure 1, including:
  • Step 100 Determine the coding block to be processed as an image block or a text block according to the pixel distribution information.
  • this step may include:
  • the image block and the text block are distinguished from the coding block to be processed.
  • the method may further include:
  • the pixels of the original screen data are color space converted, that is, the pixels of the original screen data are converted from RGB color space to YUV color space such as YUV4:4:4 color space;
  • the original screen data is divided into blocks according to the coding unit size to obtain the coding block to be processed.
  • YUV refers to the pixel format that the luminance parameter and the chromaticity parameter are separately expressed
  • Y represents the brightness (Luminance, Luma)
  • U and V represent the chromaticity (Chrominance, Chroma).
  • YUV4:4:4 sampling means that the sampling ratio of the three components of the luminance component Y, the chroma component U, and the chroma component V is the same. Therefore, in the generated image, the information of the three components of each pixel is complete. 8-bit bit is one byte.
  • Step 101 Obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information.
  • this step may include:
  • the text block is determined to be a color background area class, that is, the text block contains color background information; when the statistical color category is less than ( For example, less than) the preset first threshold, then it is determined that the text block is a non-color background area type, that is, the text block does not contain color background information.
  • the preset first threshold may be configured according to actual application scenarios and experience.
  • the text block when it is lower than a preset first threshold, that is, the text block does not contain color background information, it may further include:
  • the text block is a non-color background and color text area class, that is, the text block does not contain color background information but the text Is colored text;
  • the text block has no color information, and the text block is determined to be a non-color background and a non-color text area class
  • the text block does not contain colored background information and the text is non-color text.
  • obtaining chroma information in this step includes:
  • the color types of the text blocks are counted; when the luminance component Y is the same, but the chrominance component difference is greater than the preset first threshold, the luminance component Y is used for offset processing to convert the luminance The value of component Y is offset to distinguish different colors.
  • the color type of the text block is counted; when the brightness component Y is the same, but the chrominance component difference is greater than the preset At the first threshold, the luminance component Y is used for offset processing, and the value of the luminance component Y is offset to distinguish different colors. If the text block does not contain colored background information and the text is non-color text, the color type of the text block is not counted.
  • the statistical chrominance information can be used to perform necessary color compensation on the decoded data of the lossy-encoded code stream to ensure the fidelity of the transmitted data.
  • Step 102 Perform lossy compression on the image block, lossy compression on the text block that does not contain color background information, and lossless compression on the text block that contains color background information.
  • the image blocks are sub-sampled to achieve lossy compression.
  • text blocks that do not contain color background information are sub-sampled to achieve lossy compression.
  • a text block containing colored background information is fully sampled to achieve lossless compression.
  • sub-sampling may include, but is not limited to, such as YUV4:2:2 sampling, YUV4:2:0, etc.
  • YUV 4:2:2 sampling means that the chrominance component U and chrominance component V are half of the luminance component Y sampling, and the luminance component Y and chrominance component U and chrominance component V are sampled at a ratio of 2:1. For example, if there are 10 pixels in the horizontal direction, then 10 luminance components Y are sampled, and only 5 chroma components U and chroma components V are sampled.
  • full sampling may include, but is not limited to, YUV 4:4:4 sampling and the like.
  • the luma component Y is fully sampled to achieve lossless compression, and the chroma component U and chroma component V are sub-sampled to achieve lossy compression.
  • a text block that does not contain colored background information is further divided into: a text block that does not contain colored background information but the text is colored text, and a text block that does not contain colored background information and the text is achromatic Text blocks of text; then, in this step, sub-sampling text blocks that do not contain colored background information to achieve lossy compression, including:
  • Sub-sampling text blocks that do not contain color background information and the text is non-color text to achieve lossy compression.
  • the encoding blocks to be processed are classified before encoding, and different types of encoding blocks to be processed are sampled using different compression methods, which satisfies the reduction of transmission bandwidth occupation.
  • the present application also provides a data encoding method. Based on the data compression method shown in FIG. 1, the method further includes:
  • Step 103 Perform lossless encoding on the lossless compressed information, perform lossy encoding on the lossy compressed information, and encode the chroma information to complete the encoding of the encoding block to be processed.
  • a lossless encoder can be called to losslessly encode the information after lossless compression
  • a lossy encoder can be called to lossy encode the information after lossy compression
  • a lossless encoder can be called to perform chroma information To encode.
  • the lossless encoder may include, but is not limited to: ZLIB, GLZ and other encoders.
  • the lossy encoder may include, but is not limited to: X264, X265 and other encoders.
  • the data encoding method of the present application classifies the encoding blocks to be processed before encoding, and adopts lossy encoding or lossless encoding for different types of encoding blocks to be processed, which satisfies the reduction of transmission bandwidth occupation; moreover, the decoding end uses chrominance information Perform necessary color compensation on the decoded data of the lossy encoded code stream to ensure the fidelity of the transmitted data.
  • the lossy encoded data packet, the lossless encoded data packet and the chroma encoded data packet are obtained through the data encoding method of the present application, and the data packet to be decoded is obtained after integrating the obtained data packet, and the integrated code stream will be output to the receiving end to receive After decoding, the original information before encoding can be recovered.
  • decoding please refer to Figure 4.
  • the identification information used to distinguish between different compression types, different encoding types, and chroma information in this application can be NAL unit extension field to record.
  • NAL Network, Abstract, Layer
  • field 5 in H.264 represents instant decoding refresh (IDR, Instantaneous Decoding (Refresh) frame
  • field 7 represents the sequence parameter set (SPS, Sequence Parameter Set)
  • self-calculated 8 represents the image parameter set (PPS, Picture Parameter Set).
  • the NAL reserved fields 16-18 can be used to separately store the above identification information and other information for use in decoding at the decoding end.
  • An embodiment of the present invention further provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to perform any one of the data compression method and/or data encoding method described above.
  • An embodiment of the present invention further provides a data compression apparatus, including a processor and a memory; wherein, the memory stores a computer program that can run on the processor: for performing any of the steps of the above data compression method
  • An embodiment of the present invention further provides a data encoding device, including a processor and a memory; wherein, the memory stores a computer program that can run on the processor: for performing any of the steps of the data encoding method described above.
  • FIG. 2 is a schematic diagram of the composition structure of the data compression device of the present application. As shown in FIG. 2, it includes at least: a first distinction module, a second distinction module, a statistics module, a lossy compression module, and a lossless compression module;
  • the first differentiation module is configured to determine that the coding block to be processed is an image block or a text block according to pixel distribution information
  • the second distinction module is set to determine whether the text block contains colored background information according to the chromaticity of the pixels
  • the statistics module is set to obtain the chroma information of the text block
  • the lossy compression module is set to perform lossy compression on image blocks and lossy compression on text blocks that do not contain color background information
  • the lossless compression module is set to perform lossless compression on text blocks containing colored background information.
  • the data compression apparatus of the present application may further include:
  • the third distinction module is set to determine that the text block that does not contain color background information is a text block that does not contain color background information but the text is color text, or is a text that does not contain color background information and the text is non-color text according to the chromaticity distribution. Block; at this time,
  • the statistics module is specifically configured to: count the chroma information of the text block containing the color background information, and count the chroma information of the text block which does not contain the color background information but the text is color text.
  • the second distinction module is specifically set as:
  • the text block is determined to be a color background area class, that is, the text block contains color background information; when the statistical color category is less than ( For example, less than) the preset first threshold, then it is determined that the text block is a non-color background area type, that is, the text block does not contain color background information.
  • the third distinction module is specifically set as:
  • the text block is a non-color background and color text area class, that is, the text block does not contain color background information but the text It is colored text; if the pixel chromaticity values of the text block are all distributed within the preset error range of the preset value, such as around 128, it means that the text block has no color information, and the text block is determined to be an achromatic background and achromatic text Area class, that is, the text block does not contain colored background information and the text is non-color text.
  • FIG. 3 is a schematic diagram of the composition structure of the data encoding device of the present application. As shown in FIG. 3, it includes at least: a first distinguishing module, a second distinguishing module, a statistics module, a lossy compression module, a lossless compression module, a lossy encoder, and a lossless Encoder; where,
  • the first differentiation module is configured to determine that the coding block to be processed is an image block or a text block according to pixel distribution information
  • the second distinction module is set to determine whether the text block contains colored background information according to the chromaticity of the pixels
  • the statistics module is set to obtain the chroma information of the text block
  • the lossy compression module is set to perform lossy compression on image blocks and lossy compression on text blocks that do not contain color background information
  • Lossless compression module set to losslessly compress text blocks containing colored background information
  • Lossy encoder set to lossy encode the information after lossy compression
  • Lossless encoder set to losslessly encode information after lossless compression; encode chroma information.
  • the specific implementation of the first distinguishing module, the second distinguishing module, the statistics module, the lossy compression module, and the lossless compression module in FIG. 3 are the same as those in FIG. 2, and will not be repeated here.
  • the lossless encoder may include, but is not limited to: ZLIB, GLZ and other encoders.
  • the lossy encoder may include, but is not limited to: X264, X265 and other encoders.
  • FIG. 4 is a flowchart of a data decoding method of the present application. As shown in FIG. 4, it includes:
  • Step 400 Obtain the data packet to be decoded, and determine that the data packet to be decoded includes a lossless data packet or a lossy data packet.
  • the data packet to be decoded includes any one or any combination of the following: lossy encoded data packet, lossless encoded data packet, and chroma encoded data packet.
  • the lossless coded data packet includes: a coded text block that includes color background information; the lossy coded data packet includes: a coded image block, and the coded text block that does not include color background information.
  • the lossless coded data packet includes: the luminance component in the encoded text block containing the color background information; the lossy coded data packet includes: the coded image block, the coded color code containing the color background information The chroma component in a text block, a text block that does not contain colored background information but the text is colored text, and a text block that does not contain colored background information and the text is achromatic text.
  • Step 401 After decoding the lossless data packet and filling it in the decoded frame, it is determined that the lossy data packet is an image block or a text block.
  • a lossless decoder can be invoked to decode a lossless data packet.
  • the lossless decoder may include, but is not limited to: ZLIB, GLZ, and other decoders.
  • the decoded frame may be a fully sampled YUV 4:4:4 data frame.
  • Step 402 Decode the image block and fill it in the decoded frame; decode the text block and compensate the decoded text block according to the chroma information in the data packet to be decoded and fill it in the decoded frame.
  • a lossy decoder can be invoked to decode the lossy data packet.
  • the lossy decoder may include, but is not limited to: X264, X265, and other decoders.
  • the method before compensating the decoded text block, the method further includes:
  • the decoder may include a lossy decoder or a lossless decoder.
  • the lossy encoded data packet includes: a text block that does not contain colored background information and the text is non-color text. Then, the compensation for the decoded text blocks that do not contain color background information and the text is non-color text includes:
  • the chroma value 128 is backfilled into the decoded frame according to the Y value of the luminance component. That is to say, the chrominance information at this time is not from the chrominance information in the data packet to be decoded.
  • the method of direct decoding or decoding after compensation according to different encoding methods of the data packet not only ensures the processing efficiency, but also guarantees the fidelity of certain information such as text information.
  • An embodiment of the present invention further provides a computer-readable storage medium that stores computer-executable instructions, where the computer-executable instructions are used to perform any one of the data decoding methods described above.
  • An embodiment of the present invention further provides a data decoding device, including a processor and a memory; wherein, the memory stores a computer program that can run on the processor: for performing any of the steps of the above data decoding method.
  • FIG. 5 is a schematic diagram of the composition of the data decoding device of the present application. As shown in FIG. 5, it includes at least: a first processing module, a second processing module, a third processing module, a fourth processing module, a lossy decoder, a decoder, Lossless decoder; where,
  • the first processing module is configured to determine that the data packet to be decoded includes a lossless data packet or a lossy data packet;
  • the second processing module is configured to determine that the lossy data packet is an image block or a text block
  • Lossy decoder set to decode the image block and output to the fourth processing module; decode the text block and output to the third processing module;
  • the decoder is set to decode the chroma information data packet to obtain chroma information
  • Lossless decoder set to decode the lossless data packet and output to the fourth processing module
  • the third processing module is set to compensate the decoded text block according to the obtained chrominance information and output it to the fourth processing module;
  • the fourth processing module is configured to fill the decoded information into the decoded frame.
  • the lossless coded data packet includes: a coded text block that includes color background information; the lossy coded data packet includes: a coded image block, and the coded text block that does not include color background information.
  • the lossless coded data packet includes: the luminance component in the encoded text block containing the color background information; the lossy coded data packet includes: the coded image block, the coded color code containing the color background information The chroma component in a text block, a text block that does not contain colored background information but the text is colored text, and a text block that does not contain colored background information and the text is achromatic text.
  • the lossy encoded data packet includes: a text block that does not contain colored background information and the text is non-color text.
  • the third processing module is specifically configured to compensate the text block that does not contain color background information and the text is achromatic text according to the chroma value 128 of the luminance component Y value. That is to say, the chrominance information at this time is not from the chrominance information in the data packet to be decoded.
  • the decoded frame may be a fully sampled YUV 4:4:4 data frame.
  • the decoding end of the present application performs data compensation to different degrees according to different decoded data, and restores the complete YUV 4:4:4 display code stream.
  • the first embodiment taking the coding block to be processed as an image block as an example, includes:
  • the cloud server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and blocks the original desktop data according to the coding unit size Dividing to obtain the coding block to be processed; in the first embodiment, it is assumed that it is determined as an image block according to the pixel gradient distribution and color distribution of the current coding block to be processed;
  • chroma sub-sampling such as YUV4:2:2 sampling is performed on the image block, and the pixel format is sampled from YUV4:4:4 format to YUV4:2:2 format to achieve lossy compression of the image block;
  • the lossy encoder performs lossy encoding on the lossy compressed information to obtain a lossy encoded data packet, and establishes a desktop transmission code stream including the lossy encoded data packet;
  • the cloud terminal After that, after receiving the data packet to be decoded and determining that the lossy encoded data packet includes the image block, the cloud terminal calls the lossy decoder to decode the lossy encoded data packet;
  • the decoded pixels are spatially converted into RGB pixels required for final display and displayed.
  • taking the coding block to be processed as a text block containing a colored background as an example it includes:
  • the server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and divides the original desktop data into blocks according to the coding unit size to obtain all The coding block to be processed; in the second embodiment, it is assumed that it is determined as a text block according to the pixel gradient distribution and color distribution of the current coding block to be processed, and it is further determined that the text block contains a colored background according to the chromaticity information Text block
  • the luminance component Y is the same and the chrominance component differs by more than the first threshold set in advance, the luminance component Y is used for offset processing, and the value of the luminance component Y is offset to distinguish different colors.
  • the chroma component of the current block is chroma sub-sampled, such as YUV4:2:2 sampling, to achieve lossy compression, and the lossy encoder is called for encoding; the full brightness component of the current block is sampled, such as YUV4:4: 4 Sampling to achieve lossless compression and call lossless encoder encoding; call encoder to encode chroma information. Integrate including the encoded lossy encoded data packet, the encoded lossless data packet and the encoded chrominance data packet to obtain the desktop transmission code stream;
  • the cloud terminal After receiving the data packet to be decoded, the cloud terminal calls the lossless decoder to decode the lossless coded data packet; calls the lossy decoder to decode the lossy coded data packet, and decodes the decoded data according to the decoded chroma information The chroma component is compensated;
  • the pixels obtained after decoding and compensation are spatially converted into RGB pixels required for final display and displayed.
  • the server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and divides the original desktop data into blocks according to the coding unit size to obtain all Describe the coding block to be processed; in the third embodiment, it is assumed that it is determined as a text block according to the pixel gradient distribution and color distribution of the current coding block to be processed, and it is further determined according to the chromaticity information that the text block is an office scene. Common: Text blocks that do not contain a colored background but the text is colored text;
  • the luminance component Y is the same and the chrominance component differs by more than the first threshold set in advance, the luminance component Y is used for offset processing, and the value of the luminance component Y is offset to distinguish different colors.
  • the chroma sub-sampling of the current text block such as YUV4:2:2 sampling, to achieve lossy compression of the text block, and call the lossy encoder encoding; call the encoder to encode the chrominance information.
  • the cloud terminal After receiving the data packet to be decoded, the cloud terminal calls the lossy decoder to decode the lossy encoded data packet, and compensates the chroma component of the decoded text block according to the chroma information obtained by decoding;
  • the pixels obtained after decoding and compensation are spatially converted into RGB pixels required for final display and displayed.
  • the server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and divides the original desktop data into blocks according to the coding unit size to obtain all Describe the coding block to be processed; in the third embodiment, it is assumed that it is determined as a text block according to the pixel gradient distribution and color distribution of the current coding block to be processed, and it is further determined according to the chromaticity information that the text block is an office scene. Common: Text blocks that do not contain a colored background and the text is non-colored text;
  • the text block is mainly black and white, and the chroma components are distributed around 128, the statistics of the chroma information can be omitted, and the lossy encoder can be directly encoded after sampling. Therefore, the current text block Chroma sub-sampling, such as YUV4:2:2 sampling, to achieve lossy compression of the text block, and call the lossy encoder encoding; call the encoder to encode the chrominance information. Integrate the encoded lossy encoded data packet and the encoded chroma data packet to obtain the desktop transmission code stream;
  • the cloud terminal After receiving the data packet to be decoded, the cloud terminal calls the lossy decoder to decode the lossy encoded data packet, and realizes the chroma of the decoded text block by backfilling the chroma value 128 according to the Y value of the luminance component Component compensation;
  • the pixels obtained after decoding and compensation are spatially converted into RGB pixels required for final display and displayed.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Above, optionally, they can be implemented with program code executable by the computing device, so that they can be stored in the storage device to be executed by the computing device, and in some cases, can be in a different order than here
  • the steps shown or described are performed, or they are made into individual integrated circuit modules respectively, or multiple modules or steps among them are made into a single integrated circuit module to achieve. In this way, the present invention is not limited to any specific combination of hardware and software.
  • the data compression method and device, data encoding/decoding method and device provided by the embodiments of the present invention have the following beneficial effects: classify the encoding blocks to be processed before encoding, and for different types of encoding to be processed
  • the block adopts lossy coding or lossless coding, which satisfies the reduction of transmission bandwidth occupation; moreover, the decoding end uses chrominance information to perform necessary color compensation on the data after decoding the coded stream with lossy coding, to ensure the data transmission. Fidelity.

Abstract

Disclosed in the present application are a data compression method and apparatus, and a data encoding/decoding method and apparatus; in the data encoding method described in the present application, an encoding block to be processed is first classified before encoding, and lossy encoding or lossless encoding is used for different types of encoding blocks to be processed, thus reducing the occupied transmission bandwidth; moreover, a decoding end uses chromaticity information to perform necessary color compensation on decoded data of a bitstream that has undergone lossy encoding, thus ensuring the fidelity of transmitted data.

Description

数据压缩方法及装置、数据编码/解码方法及装置Data compression method and device, data encoding/decoding method and device 技术领域Technical field
本申请涉及但不限于视频处理技术,尤指一种数据压缩方法及装置、数据编码/解码方法及装置。This application relates to, but not limited to, video processing technology, and in particular, to a data compression method and device, data encoding/decoding method and device.
背景技术Background technique
随着云计算、虚拟桌面等技术的普及,大量的远端数据需要通过网络传输到用户端进行处理,基于现有的图像压缩技术已经满足不了窄带宽网络状况下桌面内容的传输,因此,基于屏幕内容的视频编码技术被广泛应用在虚拟桌面领域。With the popularization of technologies such as cloud computing and virtual desktops, a large amount of remote data needs to be transmitted to users through the network for processing. Based on the existing image compression technology, the transmission of desktop content under narrow-bandwidth network conditions has not been met. Therefore, based on Video encoding technology for screen content is widely used in the field of virtual desktops.
为了实现云桌面场景下画面质量的高保真,当前基于屏幕内容的视频编码方案大致分为两类,一类是采用色码表编码方案,另一类是采用有损压缩编码方案。其中,色码表编码方案大致包括:根据文字块的色彩分布,将相似颜色归类,生成同一色码表后,对该色码表使用无损压缩,并在解码端根据索引值完全恢复文字块内容。色码表编码方案适用于色彩分布相对单一的文字块,当色彩分布复杂,划分种类繁多时,色码表编码方案编码效率低下,通常会切换到JPEG算法。有损压缩编码方案大致包括:视频采样格式一般采用4:4:4的完整采样方式(也是一种无损压缩方式),这使得屏幕内容的色度可以完整的保留,因此在编码过程中会消耗更多的编码位,并且为了保证人眼比较敏感的字体清晰度,一般对字体使用完全无损的压缩,但是,这样会导致传输带宽增加,编码效率降低。In order to achieve high fidelity of picture quality in cloud desktop scenes, current video encoding schemes based on screen content are roughly divided into two categories, one is to adopt a color code table encoding scheme, and the other is to use a lossy compression encoding scheme. Among them, the color code table encoding scheme generally includes: classify similar colors according to the color distribution of the text block, generate the same color code table, use lossless compression for the color code table, and completely restore the text block according to the index value at the decoding end content. The color code table coding scheme is suitable for text blocks with relatively single color distribution. When the color distribution is complex and there are many types of divisions, the color code table coding scheme has low coding efficiency and usually switches to the JPEG algorithm. The lossy compression coding scheme generally includes: The video sampling format generally uses a full sampling method of 4:4:4 (also a lossless compression method), which allows the chroma of the screen content to be completely retained, so it will be consumed during the encoding process More coding bits, and in order to ensure the clarity of the font that is more sensitive to the human eye, generally use completely lossless compression on the font, but this will lead to increased transmission bandwidth and reduced coding efficiency.
发明内容Summary of the invention
本申请提供一种数据压缩方法及装置、数据编码/解码方法及装置,能够在降低传输带宽占用的同时,确保数据传输的保真度。The present application provides a data compression method and device, data encoding/decoding method and device, which can reduce the transmission bandwidth occupation while ensuring the fidelity of data transmission.
本申请提供了一种数据压缩方法,包括:This application provides a data compression method, including:
根据像素分布信息确定待处理的编码块为图像块或文字块;According to the pixel distribution information, determine whether the coding block to be processed is an image block or a text block;
对于确定出的文字块,获取色度信息,根据色度信息确定文字块是否包含彩色背景信息;For the determined text block, obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information;
对确定出的图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩,对包含彩色背景信息的文字块进行无损压缩。Lossy compression is performed on the determined image blocks, lossy compression is performed on text blocks that do not contain color background information, and lossless compression is performed on text blocks that contain color background information.
本申请还提供了一种数据编码方法,包括:This application also provides a data encoding method, including:
根据像素分布信息确定待处理的编码块为图像块或文字块;According to the pixel distribution information, determine whether the coding block to be processed is an image block or a text block;
对于确定出的文字块,获取色度信息,根据色度信息确定文字块是否包含彩色背景信息;For the determined text block, obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information;
对确定出的图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩,对包含彩色背景信息的文字块进行无损压缩;Lossy compression of the determined image blocks, lossy compression of text blocks that do not contain color background information, and lossless compression of text blocks that contain color background information;
对无损压缩后的信息进行无损编码、对有损压缩后的信息进行有损编码,对色度信息进行编码,以完成对待处理的编码块的编码。Perform lossless encoding on the information after lossless compression, lossy encoding on the information after lossy compression, and encode chrominance information to complete the encoding of the encoding block to be processed.
本申请还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项所述的数据压缩方法,和/或上述任一项所述的数据编码方法。The present application also provides a computer-readable storage medium that stores computer-executable instructions for performing the data compression method described in any one of the above, and/or any of the above Data encoding method.
本申请还提供了一种数据压缩装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行上述任一项所述的数据压缩方法的步骤。The present application also provides a data compression apparatus, including a processor and a memory; wherein the memory stores a computer program that can run on the processor: for performing the steps of any one of the data compression methods described above.
本申请又提供了一种数据编码装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行上述任一项所述的数据编码方法的步骤。The present application further provides a data encoding device, including a processor and a memory; wherein, the memory stores a computer program executable on the processor: for performing the steps of any one of the data encoding methods described above.
本申请再提供了一种数据解码方法,包括:This application further provides a data decoding method, including:
获取待解码数据包,确定待解码数据包包括无损数据包或有损数据包;Obtain the data packet to be decoded, and determine that the data packet to be decoded includes a lossless data packet or a lossy data packet;
对无损数据包解码后填入解码帧中,确定有损数据包为图像块或文字块;After decoding the lossless data packet and filling it in the decoded frame, it is determined that the lossy data packet is an image block or a text block;
对图像块进行解码后填入解码帧中;对文字块解码,并根据待解码数 据包中的色度信息对解码后的文字块进行补偿后填入解码帧中。Decode the image block and fill it in the decoded frame; decode the text block and compensate the decoded text block according to the chroma information in the packet to be decoded and fill it in the decoded frame.
本申请还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项所述的数据解码方法。The present application also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to perform any one of the data decoding methods described above.
本申请又提供了一种数据解码装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行上述任一项所述的数据解码方法的步骤。The present application further provides a data decoding device, including a processor and a memory; wherein the memory stores a computer program executable on the processor: for performing the steps of any one of the data decoding methods described above.
本申请在编码前先对待处理的编码块进行分类,对于不同类型的待处理的编码块采用有损编码或无损编码,满足了降低传输带宽占用;而且,解码端利用色度信息对有损编码后的码流进行解码后的数据进行必要的色彩补偿,保证了传输后的数据的保真度。This application classifies the coded blocks to be processed before coding, and adopts lossy coding or lossless coding for different types of coding blocks to be processed, which satisfies the reduction of transmission bandwidth occupation; moreover, the decoding end uses chrominance information to encode the lossy The decoded data after the bitstream is subjected to necessary color compensation to ensure the fidelity of the data after transmission.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present invention will be explained in the subsequent description, and partly become obvious from the description, or be understood by implementing the present invention. The objects and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings.
附图说明BRIEF DESCRIPTION
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present application, and form a part of the specification. They are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute limitations on the technical solutions of the present application.
图1为本申请数据压缩方法的流程图;Figure 1 is a flow chart of the data compression method of this application;
图2为本申请数据压缩装置的组成结构示意图;2 is a schematic diagram of the composition structure of the data compression device of this application;
图3为本申请数据编码装置的组成结构示意图;3 is a schematic diagram of the composition of the data encoding device of the present application;
图4为本申请数据解码方法的流程图;4 is a flowchart of a data decoding method of this application;
图5为本申请数据解码装置的组成结构示意图。FIG. 5 is a schematic diagram of the composition structure of the data decoding device of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附 图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other without conflict.
相关技术中,YUV4:2:2亚采样方式是一种有损压缩方式,是在保证亮度分量Y完整性的同时,在水平方向上每两组分量即色度分量cb和色度分量cr共用一组亮度分量Y取值进行编解码,使用这种采样方式会减少色度分量Y的传输,达到降低带宽占用的目的,但是,由于屏幕内容视频中含有大量细线条如字体、边框等,有些甚至是像素为1的单色线条,经过上述采样后会造成显示内容保真度的降低。本申请发明人通过分析发现,如果编码前,先对屏幕内容进行分类,而后对于不同类型的屏幕内容采取不同的编码策略,以实现满足降低传输带宽占用;同时,在解码时通过有损压缩的部分进行补偿,以确保显示内容的保真度。In the related art, the YUV4:2:2 sub-sampling method is a lossy compression method. While ensuring the integrity of the luminance component Y, each group of components in the horizontal direction, that is, the chroma component cb and the chroma component cr are shared A set of luminance component Y values are used for encoding and decoding. Using this sampling method will reduce the transmission of chrominance component Y to achieve the purpose of reducing bandwidth consumption. However, due to the large number of thin lines such as fonts and borders in the screen content video, some Even a monochrome line with a pixel of 1 will cause a decrease in the fidelity of the displayed content after the above sampling. The inventor of the present application has found through analysis that if the content of the screen is classified before encoding, then different encoding strategies are adopted for different types of screen content to meet the requirement of reducing the transmission bandwidth occupation; at the same time, the lossy compression Partially compensate to ensure the fidelity of the displayed content.
图1为本申请数据压缩方法的流程图,如图1所示,包括:Figure 1 is a flowchart of the data compression method of this application, as shown in Figure 1, including:
步骤100:根据像素分布信息确定待处理的编码块为图像块或文字块。Step 100: Determine the coding block to be processed as an image block or a text block according to the pixel distribution information.
在一种示例性实例中,本步骤可以包括:In an exemplary example, this step may include:
根据待处理的编码块内部像素分布的梯度特征和色彩分布信息,从待处理的编码块中区分出图像块和文字块。According to the gradient characteristics and color distribution information of the pixel distribution inside the coding block to be processed, the image block and the text block are distinguished from the coding block to be processed.
首先计算该区域的文理特征,利用文本较强边界与非文本区域的较大对比度,区分出图像场景和文字场景。First calculate the literary and artistic characteristics of the area, and use the strong contrast between the strong text boundary and the non-text area to distinguish the image scene and the text scene.
在一种示例性实例中,本步骤之前还可以包括:In an exemplary example, before this step, the method may further include:
针对原始屏幕数据中的变化区域,对原始屏幕数据的像素进行色彩空间转换,即对原始屏幕数据的像素进行RGB色彩空间到YUV色彩空间如YUV4:4:4色彩空间的色彩空间转换;For the changing area in the original screen data, the pixels of the original screen data are color space converted, that is, the pixels of the original screen data are converted from RGB color space to YUV color space such as YUV4:4:4 color space;
按照编码单元大小对原始屏幕数据进行块的划分以得到所述待处理的编码块。The original screen data is divided into blocks according to the coding unit size to obtain the coding block to be processed.
其中,YUV是指亮度参量和色度参量分开表示的像素格式,Y表示明亮度(Luminance、Luma),U和V表示色度(Chrominance、Chroma)。Among them, YUV refers to the pixel format that the luminance parameter and the chromaticity parameter are separately expressed, Y represents the brightness (Luminance, Luma), U and V represent the chromaticity (Chrominance, Chroma).
YUV4:4:4采样,意味着亮度分量Y、色度分量U、色度分量V这三个分量的采样比例相同,因此,在生成的图像中,每个像素的三个分量信息完整,都是8比特bit即一个字节。YUV4:4:4 sampling means that the sampling ratio of the three components of the luminance component Y, the chroma component U, and the chroma component V is the same. Therefore, in the generated image, the information of the three components of each pixel is complete. 8-bit bit is one byte.
步骤101:获取色度信息,根据色度信息确定文字块是否包含彩色背景信息。Step 101: Obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information.
在一种示例性实例中,本步骤可以包括:In an exemplary example, this step may include:
对单个编码单元如16X16的编码单元进行色彩种类的统计以获取色度信息;Count the color types of a single coding unit such as a 16X16 coding unit to obtain chromaticity information;
当统计出的色彩种类超过(比如大于或等于)预先设置的第一阈值,那么,确定出文字块为彩色背景区域类,即该文字块包含彩色背景信息;当统计出的色彩种类低于(比如小于)预先设置的第一阈值,那么,确定出文字块为非彩色背景区域类,即该文字块不包含彩色背景信息。When the statistical color category exceeds (eg, greater than or equal to) the preset first threshold, then the text block is determined to be a color background area class, that is, the text block contains color background information; when the statistical color category is less than ( For example, less than) the preset first threshold, then it is determined that the text block is a non-color background area type, that is, the text block does not contain color background information.
这里,预先设置的第一阈值可以是根据实际应用场景和经验配置的。Here, the preset first threshold may be configured according to actual application scenarios and experience.
可选地,在一种示例性实例中,当统计出的色彩种类低于预先设置的第一阈值,即该文字块不包含彩色背景信息,还可以包括:Optionally, in an exemplary example, when the statistical color type is lower than a preset first threshold, that is, the text block does not contain color background information, it may further include:
如果文字块的大部分像素色度分布在预设值的预设误差范围内如128附近,那么,确定文字块为非彩色背景和彩色文字区域类,即该文字块不包含彩色背景信息但文字是彩色文字;If most of the pixel chromaticity distribution of the text block is within the preset error range of the preset value, such as around 128, then determine that the text block is a non-color background and color text area class, that is, the text block does not contain color background information but the text Is colored text;
如果文字块的像素色度值均分布在预设值的预设误差范围内如128附近,那么,表明该文字块没有色彩信息,确定该文字块为非彩色背景和非彩色文字区域类,即该文字块不包含彩色背景信息且文字是非彩色文字。If the pixel chromaticity values of the text block are all distributed within the preset error range of the preset value, such as around 128, it means that the text block has no color information, and the text block is determined to be a non-color background and a non-color text area class The text block does not contain colored background information and the text is non-color text.
在一种示例性实例中,本步骤中的获取色度信息,包括:In an exemplary example, obtaining chroma information in this step includes:
对于包含彩色背景信息的文字块,对文字块进行色彩种类的统计;当出现亮度分量Y相同,而色度分量相差大于预先设置的第一阈值时,采用亮度分量Y进行偏移处理,将亮度分量Y的值进行偏移后用来区分不同的色彩。For text blocks containing colored background information, the color types of the text blocks are counted; when the luminance component Y is the same, but the chrominance component difference is greater than the preset first threshold, the luminance component Y is used for offset processing to convert the luminance The value of component Y is offset to distinguish different colors.
对于不包含彩色背景信息的文字块,如果该文字块不包含彩色背景信息但文字是彩色文字,对文字块进行色彩种类的统计;当出现亮度分量Y相同,而色度分量相差大于预先设置的第一阈值时,采用亮度分量Y进行偏移处理,将亮度分量Y的值进行偏移后用来区分不同的色彩。如果该文字块不包含彩色背景信息且文字是非彩色文字,则不对文字块进行色彩种类的统计。For a text block that does not contain color background information, if the text block does not contain color background information but the text is color text, the color type of the text block is counted; when the brightness component Y is the same, but the chrominance component difference is greater than the preset At the first threshold, the luminance component Y is used for offset processing, and the value of the luminance component Y is offset to distinguish different colors. If the text block does not contain colored background information and the text is non-color text, the color type of the text block is not counted.
这里,统计出的色度信息可以用于对有损编码后的码流进行解码后的数据进行必要的色彩补偿,以保证传输后的数据的保真度。Here, the statistical chrominance information can be used to perform necessary color compensation on the decoded data of the lossy-encoded code stream to ensure the fidelity of the transmitted data.
步骤102:对图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩,对包含彩色背景信息的文字块进行无损压缩。Step 102: Perform lossy compression on the image block, lossy compression on the text block that does not contain color background information, and lossless compression on the text block that contains color background information.
在一种示例性实例中,对图像块进行亚采样以实现有损压缩。In an illustrative example, the image blocks are sub-sampled to achieve lossy compression.
在一种示例性实例中,对不包含彩色背景信息的文字块进行亚采样以实现有损压缩。In one illustrative example, text blocks that do not contain color background information are sub-sampled to achieve lossy compression.
在一种示例性实例中,对包含彩色背景信息的文字块进行全采样以实现无损压缩。In an exemplary example, a text block containing colored background information is fully sampled to achieve lossless compression.
在一种示例性实例中,亚采样可以包括但不限于如YUV4:2:2采样、YUV4:2:0等。其中,YUV 4:2:2采样,意味着色度分量U、色度分量V是亮度分量Y采样的一半,亮度分量Y和色度分量U、色度分量V按照2:1的比例采样。比如:如果水平方向有10个像素点,那么,采样10个亮度分量Y,只采样5个色度分量U、色度分量V。In an exemplary example, sub-sampling may include, but is not limited to, such as YUV4:2:2 sampling, YUV4:2:0, etc. Among them, YUV 4:2:2 sampling means that the chrominance component U and chrominance component V are half of the luminance component Y sampling, and the luminance component Y and chrominance component U and chrominance component V are sampled at a ratio of 2:1. For example, if there are 10 pixels in the horizontal direction, then 10 luminance components Y are sampled, and only 5 chroma components U and chroma components V are sampled.
在一种示例性实例中,全采样可以包括但不限于如YUV4:4:4采样等。In an exemplary example, full sampling may include, but is not limited to, YUV 4:4:4 sampling and the like.
在一种示例性实例中,对包含彩色背景信息的文字块,对亮度分量Y进行全采样以实现无损压缩,对色度分量U、色度分量V进行亚采样以实现有损压缩。In an exemplary example, for a text block containing color background information, the luma component Y is fully sampled to achieve lossless compression, and the chroma component U and chroma component V are sub-sampled to achieve lossy compression.
可选地,在一种示例性实例中,如果将不包含彩色背景信息的文字块进一步区分为:不包含彩色背景信息但文字是彩色文字的文字块,以及不包含彩色背景信息且文字是非彩色文字的文字块;那么,本步骤中的对不 包含彩色背景信息的文字块进行亚采样以实现有损压缩,包括:Optionally, in an exemplary example, if a text block that does not contain colored background information is further divided into: a text block that does not contain colored background information but the text is colored text, and a text block that does not contain colored background information and the text is achromatic Text blocks of text; then, in this step, sub-sampling text blocks that do not contain colored background information to achieve lossy compression, including:
对不包含彩色背景信息但文字是彩色文字的文字块进行亚采样以实现有损压缩;Subsampling text blocks that do not contain colored background information but the text is colored text to achieve lossy compression;
对不包含彩色背景信息且文字是非彩色文字的文字块进行亚采样以实现有损压缩。Sub-sampling text blocks that do not contain color background information and the text is non-color text to achieve lossy compression.
本申请数据压缩方法,在编码前先对待处理的编码块进行分类,对于不同类型的待处理的编码块采用不同的压缩方式进行采样,满足了降低传输带宽占用。In the data compression method of the present application, the encoding blocks to be processed are classified before encoding, and different types of encoding blocks to be processed are sampled using different compression methods, which satisfies the reduction of transmission bandwidth occupation.
本申请还提供一种数据编码方法,在图1所示的数据压缩方法的基础上,还包括:The present application also provides a data encoding method. Based on the data compression method shown in FIG. 1, the method further includes:
步骤103:对无损压缩后的信息进行无损编码、对有损压缩后的信息进行有损编码,对色度信息进行编码,以完成对待处理的编码块的编码。Step 103: Perform lossless encoding on the lossless compressed information, perform lossy encoding on the lossy compressed information, and encode the chroma information to complete the encoding of the encoding block to be processed.
在一种示例性实例中,可以调用无损编码器对无损压缩后的信息进行无损编码,可以调用有损编码器对有损压缩后的信息进行有损编码,可以调用无损编码器对色度信息进行编码。In an exemplary example, a lossless encoder can be called to losslessly encode the information after lossless compression, a lossy encoder can be called to lossy encode the information after lossy compression, and a lossless encoder can be called to perform chroma information To encode.
在一种示例性实例中,无损编码器可以包括但不限于:ZLIB,GLZ等编码器。In an exemplary example, the lossless encoder may include, but is not limited to: ZLIB, GLZ and other encoders.
在一种示例性实例中,有损编码器可以包括但不限于:X264,X265等编码器。In an exemplary example, the lossy encoder may include, but is not limited to: X264, X265 and other encoders.
本申请数据编码方法,在编码前先对待处理的编码块进行分类,对于不同类型的待处理的编码块采用有损编码或无损编码,满足了降低传输带宽占用;而且,解码端利用色度信息对有损编码后的码流进行解码后的数据进行必要的色彩补偿,保证了传输后的数据的保真度。The data encoding method of the present application classifies the encoding blocks to be processed before encoding, and adopts lossy encoding or lossless encoding for different types of encoding blocks to be processed, which satisfies the reduction of transmission bandwidth occupation; moreover, the decoding end uses chrominance information Perform necessary color compensation on the decoded data of the lossy encoded code stream to ensure the fidelity of the transmitted data.
这样,通过本申请数据编码方法得到有损编码数据包、无损编码数据包和色度编码数据包,整合得到的数据包后得到待解码数据包,整合后的码流会输出给接收端,接收端解码后可以恢复出编码前的原始信息,解码 的具体实现请参见图4所示。In this way, the lossy encoded data packet, the lossless encoded data packet and the chroma encoded data packet are obtained through the data encoding method of the present application, and the data packet to be decoded is obtained after integrating the obtained data packet, and the integrated code stream will be output to the receiving end to receive After decoding, the original information before encoding can be recovered. For the specific implementation of decoding, please refer to Figure 4.
需要说明的是,本申请中不同类型的压缩块、不同类型的编码数据包、色度信息等均设置有不同的标识,以便接收端在采用不同解码策略是进行区分。It should be noted that different types of compressed blocks, different types of encoded data packets, and chroma information are set with different identifiers in this application, so that the receiving end uses different decoding strategies to distinguish.
本申请兼容且不限于当前应用广泛的如H.264、H.265等视频传输协议,本申请中用于区分不同压缩类型、不同编码类型、色度信息等的标识信息,可以通过视频协议的NAL单元扩展字段来记录。以H.264或H.265数据帧以00 00 00 01或00 00 01为分隔符分割网络抽样层(NAL,Network Abstract Layer)单元为例,H.264中字段5代表即时解码刷新(IDR,Instantaneous Decoding Refresh)帧,字段7代表序列参数集(SPS,Sequence Parameter Set),自算8代表图像参数集(PPS,Picture Parameter Set)。本申请可以利用NAL保留字段16-18,分别保存上述标识信息等信息,以便在解码端解码时使用。This application is compatible and not limited to the currently widely used video transmission protocols such as H.264, H.265, etc. The identification information used to distinguish between different compression types, different encoding types, and chroma information in this application can be NAL unit extension field to record. Taking the H.264 or H.265 data frame as the delimiter to divide the network sampling layer (NAL, Network, Abstract, Layer) unit as 00.00, 00, 00, or 01 as an example, field 5 in H.264 represents instant decoding refresh (IDR, Instantaneous Decoding (Refresh) frame, field 7 represents the sequence parameter set (SPS, Sequence Parameter Set), self-calculated 8 represents the image parameter set (PPS, Picture Parameter Set). In this application, the NAL reserved fields 16-18 can be used to separately store the above identification information and other information for use in decoding at the decoding end.
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项所述的数据压缩方法和/或数据编码方法。An embodiment of the present invention further provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to perform any one of the data compression method and/or data encoding method described above.
本发明实施例还提供一种数据压缩装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行上述任一项数据压缩方法的步骤An embodiment of the present invention further provides a data compression apparatus, including a processor and a memory; wherein, the memory stores a computer program that can run on the processor: for performing any of the steps of the above data compression method
本发明实施例又提供一种数据编码装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行上述任一项数据编码方法的步骤。An embodiment of the present invention further provides a data encoding device, including a processor and a memory; wherein, the memory stores a computer program that can run on the processor: for performing any of the steps of the data encoding method described above.
图2为本申请数据压缩装置的组成结构示意图,如图2所示,至少包括:第一区分模块、第二区分模块、统计模块、有损压缩模块,以及无损压缩模块;其中,2 is a schematic diagram of the composition structure of the data compression device of the present application. As shown in FIG. 2, it includes at least: a first distinction module, a second distinction module, a statistics module, a lossy compression module, and a lossless compression module;
第一区分模块,设置为根据像素分布信息确定待处理的编码块为图像块或文字块;The first differentiation module is configured to determine that the coding block to be processed is an image block or a text block according to pixel distribution information;
第二区分模块,设置为根据像素的色度确定文字块是否包含彩色背景信息;The second distinction module is set to determine whether the text block contains colored background information according to the chromaticity of the pixels;
统计模块,设置为获取文字块的色度信息;The statistics module is set to obtain the chroma information of the text block;
有损压缩模块,设置为对图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩;The lossy compression module is set to perform lossy compression on image blocks and lossy compression on text blocks that do not contain color background information;
无损压缩模块,设置为对包含彩色背景信息的文字块进行无损压缩。The lossless compression module is set to perform lossless compression on text blocks containing colored background information.
可选地,在一种示例性实例中,本申请数据压缩装置还可以包括:Optionally, in an exemplary example, the data compression apparatus of the present application may further include:
第三区分模块,设置为根据色度分布情况确定不包含彩色背景信息的文字块为不包含彩色背景信息但文字是彩色文字的文字块,或为不包含彩色背景信息且文字是非彩色文字的文字块;此时,The third distinction module is set to determine that the text block that does not contain color background information is a text block that does not contain color background information but the text is color text, or is a text that does not contain color background information and the text is non-color text according to the chromaticity distribution. Block; at this time,
统计模块具体设置为:统计包含彩色背景信息的文字块的色度信息,统计不包含彩色背景信息但文字是彩色文字的文字块的色度信息。The statistics module is specifically configured to: count the chroma information of the text block containing the color background information, and count the chroma information of the text block which does not contain the color background information but the text is color text.
在一种示例性实例中,第二区分模块具体设置为:In an exemplary example, the second distinction module is specifically set as:
当统计出的色彩种类超过(比如大于或等于)预先设置的第一阈值,那么,确定出文字块为彩色背景区域类,即该文字块包含彩色背景信息;当统计出的色彩种类低于(比如小于)预先设置的第一阈值,那么,确定出文字块为非彩色背景区域类,即该文字块不包含彩色背景信息。When the statistical color category exceeds (eg, greater than or equal to) the preset first threshold, then the text block is determined to be a color background area class, that is, the text block contains color background information; when the statistical color category is less than ( For example, less than) the preset first threshold, then it is determined that the text block is a non-color background area type, that is, the text block does not contain color background information.
在一种示例性实例中,第三区分模块具体设置为:In an exemplary example, the third distinction module is specifically set as:
如果文字块的大部分像素色度分布在预设值的预设误差范围内如128附近,那么,确定文字块为非彩色背景和彩色文字区域类,即该文字块不包含彩色背景信息但文字是彩色文字;如果文字块的像素色度值均分布在预设值的预设误差范围内如128附近,那么,表明该文字块没有色彩信息,确定该文字块为非彩色背景和非彩色文字区域类,即该文字块不包含彩色背景信息且文字是非彩色文字。If most of the pixel chromaticity distribution of the text block is within the preset error range of the preset value, such as around 128, then determine that the text block is a non-color background and color text area class, that is, the text block does not contain color background information but the text It is colored text; if the pixel chromaticity values of the text block are all distributed within the preset error range of the preset value, such as around 128, it means that the text block has no color information, and the text block is determined to be an achromatic background and achromatic text Area class, that is, the text block does not contain colored background information and the text is non-color text.
图3为本申请数据编码装置的组成结构示意图,如图3所示,至少包括:第一区分模块、第二区分模块、统计模块、有损压缩模块、无损压缩 模块、有损编码器、无损编码器;其中,FIG. 3 is a schematic diagram of the composition structure of the data encoding device of the present application. As shown in FIG. 3, it includes at least: a first distinguishing module, a second distinguishing module, a statistics module, a lossy compression module, a lossless compression module, a lossy encoder, and a lossless Encoder; where,
第一区分模块,设置为根据像素分布信息确定待处理的编码块为图像块或文字块;The first differentiation module is configured to determine that the coding block to be processed is an image block or a text block according to pixel distribution information;
第二区分模块,设置为根据像素的色度确定文字块是否包含彩色背景信息;The second distinction module is set to determine whether the text block contains colored background information according to the chromaticity of the pixels;
统计模块,设置为获取文字块的色度信息;The statistics module is set to obtain the chroma information of the text block;
有损压缩模块,设置为对图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩;The lossy compression module is set to perform lossy compression on image blocks and lossy compression on text blocks that do not contain color background information;
无损压缩模块,设置为对包含彩色背景信息的文字块进行无损压缩;Lossless compression module, set to losslessly compress text blocks containing colored background information;
有损编码器,设置为对有损压缩后的信息进行有损编码;Lossy encoder, set to lossy encode the information after lossy compression;
无损编码器,设置为对无损压缩后的信息进行无损编码;对色度信息进行编码。Lossless encoder, set to losslessly encode information after lossless compression; encode chroma information.
图3中的第一区分模块、第二区分模块、统计模块、有损压缩模块和无损压缩模块的具体实现与图2中一致,这里不再赘述。The specific implementation of the first distinguishing module, the second distinguishing module, the statistics module, the lossy compression module, and the lossless compression module in FIG. 3 are the same as those in FIG. 2, and will not be repeated here.
在一种示例性实例中,无损编码器可以包括但不限于:ZLIB,GLZ等编码器。In an exemplary example, the lossless encoder may include, but is not limited to: ZLIB, GLZ and other encoders.
在一种示例性实例中,有损编码器可以包括但不限于:X264,X265等编码器。In an exemplary example, the lossy encoder may include, but is not limited to: X264, X265 and other encoders.
图4为本申请数据解码方法的流程图,如图4所示,包括:FIG. 4 is a flowchart of a data decoding method of the present application. As shown in FIG. 4, it includes:
步骤400:获取待解码数据包,确定待解码数据包包括无损数据包或有损数据包。Step 400: Obtain the data packet to be decoded, and determine that the data packet to be decoded includes a lossless data packet or a lossy data packet.
在一种示例性实例中,待解码数据包中包括以下任一项或任意组合:有损编码数据包、无损编码数据包、色度编码数据包。In an exemplary example, the data packet to be decoded includes any one or any combination of the following: lossy encoded data packet, lossless encoded data packet, and chroma encoded data packet.
在一种示例性实例中,无损编码数据包包括:编码后的包含彩色背景信息的文字块;有损编码数据包包括:编码后的图像块、编码后的不包含彩色背景信息的文字块。In an exemplary example, the lossless coded data packet includes: a coded text block that includes color background information; the lossy coded data packet includes: a coded image block, and the coded text block that does not include color background information.
在一种示例性实例中,无损编码数据包包括:编码后的包含彩色背景信息的文字块中的亮度分量;有损编码数据包包括:编码后的图像块、编码后的包含彩色背景信息的文字块中的色度分量、不包含彩色背景信息但文字是彩色文字的文字块、不包含彩色背景信息且文字是非彩色文字的文字块。In an exemplary example, the lossless coded data packet includes: the luminance component in the encoded text block containing the color background information; the lossy coded data packet includes: the coded image block, the coded color code containing the color background information The chroma component in a text block, a text block that does not contain colored background information but the text is colored text, and a text block that does not contain colored background information and the text is achromatic text.
步骤401:对无损数据包解码后填入解码帧中,确定有损数据包为图像块或文字块。Step 401: After decoding the lossless data packet and filling it in the decoded frame, it is determined that the lossy data packet is an image block or a text block.
在一种示例性实例中,可以调用无损解码器对无损数据包进行解码。In an exemplary example, a lossless decoder can be invoked to decode a lossless data packet.
在一种示例性实例中,无损解码器可以包括但不限于:ZLIB,GLZ等解码器。In an exemplary example, the lossless decoder may include, but is not limited to: ZLIB, GLZ, and other decoders.
在一种示例性实例中,解码帧可以是一种完全抽样的YUV4:4:4的数据帧。In an illustrative example, the decoded frame may be a fully sampled YUV 4:4:4 data frame.
步骤402:对图像块进行解码后填入解码帧中;对文字块解码,并根据待解码数据包中的色度信息对解码后的文字块进行补偿后填入解码帧中。Step 402: Decode the image block and fill it in the decoded frame; decode the text block and compensate the decoded text block according to the chroma information in the data packet to be decoded and fill it in the decoded frame.
在一种示例性实例中,可以调用有损解码器对有损数据包进行解码。In an exemplary example, a lossy decoder can be invoked to decode the lossy data packet.
在一种示例性实例中,有损解码器可以包括但不限于:X264,X265等解码器。In an exemplary example, the lossy decoder may include, but is not limited to: X264, X265, and other decoders.
在一种示例性实例中,在对解码后的文字块进行补偿之前,还包括:In an exemplary example, before compensating the decoded text block, the method further includes:
调用解码器,对待解码数据包中的色度编码数据包进行解码,得到色度信息。Call the decoder to decode the chroma-encoded data packet in the decoded data packet to obtain chroma information.
在一种示例性实例中,解码器可以包括:有损解码器或无损解码器。In an exemplary example, the decoder may include a lossy decoder or a lossless decoder.
本步骤中的对解码后的文字块进行补偿的具体实现并不用于限定本申请的保护范围。The specific implementation of compensating the decoded text block in this step is not used to limit the protection scope of the present application.
在一种实例性实例中,如果有损编码数据包包括:不包含彩色背景信息且文字是非彩色文字的文字块。那么,对解码出的不包含彩色背景信息 且文字是非彩色文字的文字块的补偿,包括:In an illustrative example, if the lossy encoded data packet includes: a text block that does not contain colored background information and the text is non-color text. Then, the compensation for the decoded text blocks that do not contain color background information and the text is non-color text includes:
根据亮度分量Y值将色度值128回填至解码帧。也就是说,此时的色度信息不是来自待解码数据包中的色度信息。The chroma value 128 is backfilled into the decoded frame according to the Y value of the luminance component. That is to say, the chrominance information at this time is not from the chrominance information in the data packet to be decoded.
本申请数据解码方法中,按照数据包的不同编码方式进行直接解码或补偿后解码的方式,既保证了处理效率,也保证了对某些信息如文字信息的保真度。In the data decoding method of the present application, the method of direct decoding or decoding after compensation according to different encoding methods of the data packet not only ensures the processing efficiency, but also guarantees the fidelity of certain information such as text information.
这样,将解码后得到的解码数据帧,从YUV色彩空间转换到显示需要的RGB色彩空间中,即可得到编码前的原始信息并显示。In this way, by converting the decoded data frame obtained after decoding from the YUV color space to the RGB color space required for display, the original information before encoding can be obtained and displayed.
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项所述的数据解码方法。An embodiment of the present invention further provides a computer-readable storage medium that stores computer-executable instructions, where the computer-executable instructions are used to perform any one of the data decoding methods described above.
本发明实施例还提供一种数据解码装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行上述任一项数据解码方法的步骤。An embodiment of the present invention further provides a data decoding device, including a processor and a memory; wherein, the memory stores a computer program that can run on the processor: for performing any of the steps of the above data decoding method.
图5为本申请数据解码装置的组成结构示意图,如图5所示,至少包括:第一处理模块、第二处理模块、第三处理模块、第四处理模块、有损解码器、解码器、无损解码器;其中,5 is a schematic diagram of the composition of the data decoding device of the present application. As shown in FIG. 5, it includes at least: a first processing module, a second processing module, a third processing module, a fourth processing module, a lossy decoder, a decoder, Lossless decoder; where,
第一处理模块,设置为确定待解码数据包包括无损数据包或有损数据包;The first processing module is configured to determine that the data packet to be decoded includes a lossless data packet or a lossy data packet;
第二处理模块,设置为确定有损数据包为图像块或文字块;The second processing module is configured to determine that the lossy data packet is an image block or a text block;
有损解码器,设置为对图像块进行解码后输出给第四处理模块;对文字块解码输出给第三处理模块;Lossy decoder, set to decode the image block and output to the fourth processing module; decode the text block and output to the third processing module;
解码器,设置为对色度信息数据包进行解码得到色度信息;The decoder is set to decode the chroma information data packet to obtain chroma information;
无损解码器,设置为对无损数据包解码后输出给第四处理模块;Lossless decoder, set to decode the lossless data packet and output to the fourth processing module;
第三处理模块,设置为根据得到的色度信息对解码后的文字块进行补偿后输出给第四处理模块;The third processing module is set to compensate the decoded text block according to the obtained chrominance information and output it to the fourth processing module;
第四处理模块,设置为将解码后的信息填入解码帧中。The fourth processing module is configured to fill the decoded information into the decoded frame.
在一种示例性实例中,无损编码数据包包括:编码后的包含彩色背景信息的文字块;有损编码数据包包括:编码后的图像块、编码后的不包含彩色背景信息的文字块。In an exemplary example, the lossless coded data packet includes: a coded text block that includes color background information; the lossy coded data packet includes: a coded image block, and the coded text block that does not include color background information.
在一种示例性实例中,无损编码数据包包括:编码后的包含彩色背景信息的文字块中的亮度分量;有损编码数据包包括:编码后的图像块、编码后的包含彩色背景信息的文字块中的色度分量、不包含彩色背景信息但文字是彩色文字的文字块、不包含彩色背景信息且文字是非彩色文字的文字块。In an exemplary example, the lossless coded data packet includes: the luminance component in the encoded text block containing the color background information; the lossy coded data packet includes: the coded image block, the coded color code containing the color background information The chroma component in a text block, a text block that does not contain colored background information but the text is colored text, and a text block that does not contain colored background information and the text is achromatic text.
在一种实例性实例中,如果有损编码数据包包括:不包含彩色背景信息且文字是非彩色文字的文字块。那么,第三处理模块具体设置为:根据亮度分量Y值将色度值128,对解码出的不包含彩色背景信息且文字是非彩色文字的文字块进行补偿。也就是说,此时的色度信息不是来自待解码数据包中的色度信息。In an illustrative example, if the lossy encoded data packet includes: a text block that does not contain colored background information and the text is non-color text. Then, the third processing module is specifically configured to compensate the text block that does not contain color background information and the text is achromatic text according to the chroma value 128 of the luminance component Y value. That is to say, the chrominance information at this time is not from the chrominance information in the data packet to be decoded.
在一种示例性实例中,解码帧可以是一种完全抽样的YUV4:4:4的数据帧。In an illustrative example, the decoded frame may be a fully sampled YUV 4:4:4 data frame.
在一种实例性实例中,本申请解码端根据不同解码数据,进行不同程度的数据补偿,恢复处理完整的YUV4:4:4显示码流。In an exemplary example, the decoding end of the present application performs data compensation to different degrees according to different decoded data, and restores the complete YUV 4:4:4 display code stream.
下面以云桌面场景下,对屏幕内容的传输为例,结合具体实施例对本申请获取网络拓扑的方法进行详细描述。The following uses a cloud desktop scenario to transmit screen content as an example, and a method for obtaining a network topology in the present application will be described in detail in conjunction with specific embodiments.
第一实施例,以待处理的编码块为图像块为例,包括:The first embodiment, taking the coding block to be processed as an image block as an example, includes:
首先,云桌面中的云服务器(server)从共享内存中获取原始桌面像素数据,将获得的原始桌面像素数据从RGB像素转换为YUV格式的像素,并按照编码单元大小对原始桌面数据进行块的划分以得到所述待处理的编码块;第一实施例中,假设根据当前待处理的编码块的像素梯度分布和色彩分布,判断出为图像块;First, the cloud server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and blocks the original desktop data according to the coding unit size Dividing to obtain the coding block to be processed; in the first embodiment, it is assumed that it is determined as an image block according to the pixel gradient distribution and color distribution of the current coding block to be processed;
然后,对该图像块进行色度亚采样如YUV4:2:2采样,将像素格式由YUV4:4:4格式采样为YUV4:2:2格式,以实现对图像块的有损压缩;调用 有损编码器对有损压缩后的信息进行有损编码得到有损编码数据包,并建立包括有损编码数据包的桌面传输码流;Then, chroma sub-sampling such as YUV4:2:2 sampling is performed on the image block, and the pixel format is sampled from YUV4:4:4 format to YUV4:2:2 format to achieve lossy compression of the image block; The lossy encoder performs lossy encoding on the lossy compressed information to obtain a lossy encoded data packet, and establishes a desktop transmission code stream including the lossy encoded data packet;
之后,云终端在收到待解码数据包,并确定出有损编码数据包中包括的是图像块后,调用有损解码器对有损编码数据包进行解码;After that, after receiving the data packet to be decoded and determining that the lossy encoded data packet includes the image block, the cloud terminal calls the lossy decoder to decode the lossy encoded data packet;
最后,将解码后得到的像素进行空间转换,转换为最终显示需要的RGB像素并显示。Finally, the decoded pixels are spatially converted into RGB pixels required for final display and displayed.
第二实施例,以待处理的编码块为包含彩色背景的文字块为例,包括:In the second embodiment, taking the coding block to be processed as a text block containing a colored background as an example, it includes:
首先,云桌面中的server从共享内存中获取原始桌面像素数据,将获得的原始桌面像素数据从RGB像素转换为YUV格式的像素,并按照编码单元大小对原始桌面数据进行块的划分以得到所述待处理的编码块;第二实施例中,假设根据当前待处理的编码块的像素梯度分布和色彩分布,判断出为文字块,并进一步根据色度信息确定出文字块是包含彩色背景的文字块;First, the server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and divides the original desktop data into blocks according to the coding unit size to obtain all The coding block to be processed; in the second embodiment, it is assumed that it is determined as a text block according to the pixel gradient distribution and color distribution of the current coding block to be processed, and it is further determined that the text block contains a colored background according to the chromaticity information Text block
这种情况下,需要对当前块进行色度统计以得到色度信息。当出现亮度分量Y相同,而色度分量相差大于预先设置的第一阈值时,采用亮度分量Y进行偏移处理,将亮度分量Y的值进行偏移后用来区分不同的色彩。In this case, it is necessary to perform chroma statistics on the current block to obtain chroma information. When the luminance component Y is the same and the chrominance component differs by more than the first threshold set in advance, the luminance component Y is used for offset processing, and the value of the luminance component Y is offset to distinguish different colors.
然后,对当前块的色度分量进行色度亚采样如YUV4:2:2采样,以实现有损压缩,并调用有损编码器编码;对当前块的亮度分量进行全采样如YUV4:4:4采样,以实现无损压缩,并调用无损编码器编码;调用编码器对色度信息进行编码。整合包括编码后的有损编码数据包、编码后的无损数据包和编码后的色度数据包,得到桌面传输码流;Then, the chroma component of the current block is chroma sub-sampled, such as YUV4:2:2 sampling, to achieve lossy compression, and the lossy encoder is called for encoding; the full brightness component of the current block is sampled, such as YUV4:4: 4 Sampling to achieve lossless compression and call lossless encoder encoding; call encoder to encode chroma information. Integrate including the encoded lossy encoded data packet, the encoded lossless data packet and the encoded chrominance data packet to obtain the desktop transmission code stream;
之后,云终端在收到待解码数据包,调用无损解码器对无损编码数据包进行解码;调用有损解码器对有损编码数据包进行解码,并根据解码得到的色度信息对解码得到的色度分量进行补偿;After receiving the data packet to be decoded, the cloud terminal calls the lossless decoder to decode the lossless coded data packet; calls the lossy decoder to decode the lossy coded data packet, and decodes the decoded data according to the decoded chroma information The chroma component is compensated;
最后,将解码和补偿后得到的像素进行空间转换,转换为最终显示需要的RGB像素并显示。Finally, the pixels obtained after decoding and compensation are spatially converted into RGB pixels required for final display and displayed.
第三实施例,以待处理的编码块为不包含彩色背景信息但文字是彩色 文字的文字块为例,包括:In the third embodiment, taking the coding block to be processed as a text block that does not contain color background information but the text is color text as an example, it includes:
首先,云桌面中的server从共享内存中获取原始桌面像素数据,将获得的原始桌面像素数据从RGB像素转换为YUV格式的像素,并按照编码单元大小对原始桌面数据进行块的划分以得到所述待处理的编码块;第三实施例中,假设根据当前待处理的编码块的像素梯度分布和色彩分布,判断出为文字块,并进一步根据色度信息确定出文字块是办公场景下较为常见的:不包含彩色背景但文字是彩色文字的文字块;First, the server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and divides the original desktop data into blocks according to the coding unit size to obtain all Describe the coding block to be processed; in the third embodiment, it is assumed that it is determined as a text block according to the pixel gradient distribution and color distribution of the current coding block to be processed, and it is further determined according to the chromaticity information that the text block is an office scene. Common: Text blocks that do not contain a colored background but the text is colored text;
这种情况下,需要对当前块进行色度统计以得到色度信息。当出现亮度分量Y相同,而色度分量相差大于预先设置的第一阈值时,采用亮度分量Y进行偏移处理,将亮度分量Y的值进行偏移后用来区分不同的色彩。In this case, it is necessary to perform chroma statistics on the current block to obtain chroma information. When the luminance component Y is the same and the chrominance component differs by more than the first threshold set in advance, the luminance component Y is used for offset processing, and the value of the luminance component Y is offset to distinguish different colors.
然后,对当前文字块进行色度亚采样如YUV4:2:2采样,以实现对文字块的有损压缩,并调用有损编码器编码;调用编码器对色度信息进行编码。整合包括编码后的有损编码数据包和编码后的色度数据包,得到桌面传输码流;Then, the chroma sub-sampling of the current text block, such as YUV4:2:2 sampling, to achieve lossy compression of the text block, and call the lossy encoder encoding; call the encoder to encode the chrominance information. Integrate the encoded lossy encoded data packet and the encoded chroma data packet to obtain the desktop transmission code stream;
之后,云终端在收到待解码数据包,调用有损解码器对有损编码数据包进行解码,并根据解码得到的色度信息对解码得到的文字块的色度分量进行补偿;After receiving the data packet to be decoded, the cloud terminal calls the lossy decoder to decode the lossy encoded data packet, and compensates the chroma component of the decoded text block according to the chroma information obtained by decoding;
最后,将解码和补偿后得到的像素进行空间转换,转换为最终显示需要的RGB像素并显示。Finally, the pixels obtained after decoding and compensation are spatially converted into RGB pixels required for final display and displayed.
第四实施例,以待处理的编码块为不包含彩色背景信息且文字是非彩色文字的文字块为例,包括:In the fourth embodiment, taking the coding block to be processed as a text block that does not contain color background information and the text is non-color text as an example, including:
首先,云桌面中的server从共享内存中获取原始桌面像素数据,将获得的原始桌面像素数据从RGB像素转换为YUV格式的像素,并按照编码单元大小对原始桌面数据进行块的划分以得到所述待处理的编码块;第三实施例中,假设根据当前待处理的编码块的像素梯度分布和色彩分布,判断出为文字块,并进一步根据色度信息确定出文字块是办公场景下较为常见的:不包含彩色背景且文字是非彩色文字的文字块;First, the server in the cloud desktop obtains the original desktop pixel data from the shared memory, converts the obtained original desktop pixel data from RGB pixels to YUV format pixels, and divides the original desktop data into blocks according to the coding unit size to obtain all Describe the coding block to be processed; in the third embodiment, it is assumed that it is determined as a text block according to the pixel gradient distribution and color distribution of the current coding block to be processed, and it is further determined according to the chromaticity information that the text block is an office scene. Common: Text blocks that do not contain a colored background and the text is non-colored text;
本实施例中,由于该文字块以黑白色为主,色度分量分布在128左右,所以可以省略对色度信息的统计,直接进行采样后调用有损编码器编码,因此,对当前文字块进行色度亚采样如YUV4:2:2采样,以实现对文字块的有损压缩,并调用有损编码器编码;调用编码器对色度信息进行编码。整合包括编码后的有损编码数据包和编码后的色度数据包,得到桌面传输码流;In this embodiment, since the text block is mainly black and white, and the chroma components are distributed around 128, the statistics of the chroma information can be omitted, and the lossy encoder can be directly encoded after sampling. Therefore, the current text block Chroma sub-sampling, such as YUV4:2:2 sampling, to achieve lossy compression of the text block, and call the lossy encoder encoding; call the encoder to encode the chrominance information. Integrate the encoded lossy encoded data packet and the encoded chroma data packet to obtain the desktop transmission code stream;
之后,云终端在收到待解码数据包,调用有损解码器对有损编码数据包进行解码,并通过根据亮度分量Y值将色度值128的回填实现对解码得到的文字块的色度分量进行补偿;After receiving the data packet to be decoded, the cloud terminal calls the lossy decoder to decode the lossy encoded data packet, and realizes the chroma of the decoded text block by backfilling the chroma value 128 according to the Y value of the luminance component Component compensation;
最后,将解码和补偿后得到的像素进行空间转换,转换为最终显示需要的RGB像素并显示。Finally, the pixels obtained after decoding and compensation are spatially converted into RGB pixels required for final display and displayed.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Above, optionally, they can be implemented with program code executable by the computing device, so that they can be stored in the storage device to be executed by the computing device, and in some cases, can be in a different order than here The steps shown or described are performed, or they are made into individual integrated circuit modules respectively, or multiple modules or steps among them are made into a single integrated circuit module to achieve. In this way, the present invention is not limited to any specific combination of hardware and software.
以上所述,仅为本发明的较佳实例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred examples of the present invention and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
工业实用性Industrial applicability
如上所述,本发明实施例提供的一种数据压缩方法及装置、数据编码/解码方法及装置具有以下有益效果:在编码前先对待处理的编码块进行分类,对于不同类型的待处理的编码块采用有损编码或无损编码,满足了降低传输带宽占用;而且,解码端利用色度信息对有损编码后的码流进行解 码后的数据进行必要的色彩补偿,保证了传输后的数据的保真度。As described above, the data compression method and device, data encoding/decoding method and device provided by the embodiments of the present invention have the following beneficial effects: classify the encoding blocks to be processed before encoding, and for different types of encoding to be processed The block adopts lossy coding or lossless coding, which satisfies the reduction of transmission bandwidth occupation; moreover, the decoding end uses chrominance information to perform necessary color compensation on the data after decoding the coded stream with lossy coding, to ensure the data transmission. Fidelity.

Claims (32)

  1. 一种数据压缩方法,包括:A data compression method, including:
    根据像素分布信息确定待处理的编码块为图像块或文字块;According to the pixel distribution information, determine whether the coding block to be processed is an image block or a text block;
    对于确定出的文字块,获取色度信息,根据色度信息确定文字块是否包含彩色背景信息;For the determined text block, obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information;
    对确定出的图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩,对包含彩色背景信息的文字块进行无损压缩。Lossy compression is performed on the determined image blocks, lossy compression is performed on text blocks that do not contain color background information, and lossless compression is performed on text blocks that contain color background information.
  2. 根据权利要求1所述的数据压缩方法,所述方法还包括:The data compression method according to claim 1, further comprising:
    针对原始屏幕数据中的变化区域,对原始屏幕数据的像素进行色彩空间转换,得到YUV色彩空间的原始屏幕数据;Aiming at the changing area in the original screen data, the pixels of the original screen data are color space converted to obtain the original screen data in the YUV color space;
    按照编码单元大小对原始屏幕数据进行块的划分以得到所述待处理的编码块;Dividing the original screen data into blocks according to the size of the coding unit to obtain the coding block to be processed;
    其中,YUV是亮度参量和色度参量分开表示的像素格式,Y表示明亮度,U和V表示色度。Among them, YUV is a pixel format in which the luminance parameter and the chromaticity parameter are separately expressed, Y represents the brightness, and U and V represent the chromaticity.
  3. 根据权利要求1或2所述的数据压缩方法,其中,所述确定待处理的编码块为图像块或文字块,包括:The data compression method according to claim 1 or 2, wherein the determining that the encoding block to be processed is an image block or a text block includes:
    根据所述待处理的编码块内部像素分布的梯度特征和色彩分布信息,从所述待处理的编码块中区分出所述图像块和所述文字块。According to the gradient characteristics and color distribution information of the pixel distribution inside the coding block to be processed, the image block and the text block are distinguished from the coding block to be processed.
  4. 根据权利要求1或2所述的数据压缩方法,其中,所述确定文字块是否包含彩色背景信息,包括:The data compression method according to claim 1 or 2, wherein the determining whether the text block contains colored background information includes:
    对单个编码单元进行色彩种类的统计以获取色度信息;Statistics on the color types of a single coding unit to obtain chromaticity information;
    当统计出的色彩种类超过预先设置的第一阈值,确定出所述包含彩色背景信息的文字块;当统计出的色彩种类低于预先设置的第一阈值,确定出所述文字块为不包含彩色背景信息的文字块。When the counted color type exceeds the preset first threshold, the text block containing the color background information is determined; when the counted color type is lower than the preset first threshold, the text block is determined not to contain Text block with colored background information.
  5. 根据权利要求1所述的数据压缩方法,当所述文字块为不包含彩色背景信息,所述方法还包括:The data compression method according to claim 1, when the text block does not contain color background information, the method further comprises:
    如果所述文字块的大部分像素色度分布在预设值的预设误差范围内,确定出所述文字块为不包含彩色背景信息但文字是彩色文字的文字块;If most of the pixel chromaticity of the text block is distributed within a preset error range of a preset value, it is determined that the text block is a text block that does not contain colored background information but the text is colored text;
    如果所述文字块的像素色度值均分布在预设值的预设误差范围内,确定出所述文字块为不包含彩色背景信息且文字是非彩色文字的文字块。If the pixel chromaticity values of the text block are all distributed within a preset error range of a preset value, it is determined that the text block is a text block that does not contain colored background information and the text is non-color text.
  6. 根据权利要求1所述的数据压缩方法,其中,所述对图像块进行有损压缩,包括:The data compression method according to claim 1, wherein the lossy compression of the image block includes:
    对所述图像块进行亚采样。Sub-sampling the image block.
  7. 根据权利要求1所述的数据压缩方法,其中,所述对不包含彩色背景信息的文字块进行有损压缩,包括:The data compression method according to claim 1, wherein the lossy compression of the text block that does not contain color background information includes:
    对所述不包含彩色背景信息的文字块进行亚采样。Sub-sampling the text block that does not contain color background information.
  8. 根据权利要求1所述的数据压缩方法,其中,所述对包含彩色背景信息的文字块进行无损压缩,包括:The data compression method according to claim 1, wherein the lossless compression of the text block containing colored background information includes:
    对所述包含彩色背景信息的文字块进行全采样;Fully sampling the text block containing colored background information;
    或者,针对所述包含彩色背景信息的文字块,对亮度分量进行全采样,对色度分量进行亚采样。Alternatively, for the text block containing color background information, the luminance component is fully sampled, and the chrominance component is sub-sampled.
  9. 根据权利要求5所述的数据压缩方法,其中,所述对不包含彩色背景信息的文字块进行亚采样以实现有损压缩,包括:The data compression method according to claim 5, wherein the sub-sampling of text blocks that do not contain color background information to achieve lossy compression includes:
    对所述不包含彩色背景信息但文字是彩色文字的文字块进行亚采样;Sub-sampling the text block that does not contain color background information but the text is color text;
    对所述不包含彩色背景信息且文字是非彩色文字的文字块进行亚采样。Sub-sampling the text block that does not contain color background information and the text is non-color text.
  10. 根据权利要求6~9任一项所述的数据压缩方法,其中,所述亚采样包括:YUV4:2:2采样;所述全采样包括:YUV4:4:4采样。The data compression method according to any one of claims 6 to 9, wherein the subsampling includes: YUV4:2:2 sampling; and the full sampling includes: YUV4:4:4 sampling.
  11. 一种数据编码方法,包括:A data encoding method, including:
    根据像素分布信息确定待处理的编码块为图像块或文字块;According to the pixel distribution information, determine whether the coding block to be processed is an image block or a text block;
    对于确定出的文字块,获取色度信息,根据色度信息确定文字块是否包含彩色背景信息;For the determined text block, obtain chromaticity information, and determine whether the text block contains colored background information according to the chromaticity information;
    对确定出的图像块进行有损压缩,对不包含彩色背景信息的文字块进行有损压缩,对包含彩色背景信息的文字块进行无损压缩;Lossy compression of the determined image blocks, lossy compression of text blocks that do not contain color background information, and lossless compression of text blocks that contain color background information;
    对无损压缩后的信息进行无损编码、对有损压缩后的信息进行有损编码,对色度信息进行编码,以完成对待处理的编码块的编码。Perform lossless encoding on the information after lossless compression, lossy encoding on the information after lossy compression, and encode chrominance information to complete the encoding of the encoding block to be processed.
  12. 根据权利要求11所述的数据编码方法,其中,所述确定待处理的编码块为图像块或文字块,包括:The data encoding method according to claim 11, wherein the determining that the encoding block to be processed is an image block or a text block includes:
    根据所述待处理的编码块内部像素分布的梯度特征和色彩分布信息,从所述待处理的编码块中区分出所述图像块和所述文字块。According to the gradient characteristics and color distribution information of the pixel distribution inside the coding block to be processed, the image block and the text block are distinguished from the coding block to be processed.
  13. 根据权利要求11所述的数据编码方法,其中,所述确定文字块是否包含彩色背景信息,包括:The data encoding method according to claim 11, wherein the determining whether the text block contains colored background information includes:
    对单个编码单元进行色彩种类的统计以获取色度信息;Statistics on the color types of a single coding unit to obtain chromaticity information;
    当统计出的色彩种类超过预先设置的第一阈值,确定出所述包含彩色背景信息的文字块;当统计出的色彩种类低于预先设置的第一阈值,确定出所述文字块为不包含彩色背景信息的文字块。When the counted color type exceeds the preset first threshold, the text block containing the color background information is determined; when the counted color type is lower than the preset first threshold, the text block is determined not to contain Text block with colored background information.
  14. 根据权利要求11所述的数据编码方法,当所述文字块为不包含彩色背景信息,所述方法还包括:The data encoding method according to claim 11, when the text block does not contain color background information, the method further comprises:
    如果所述文字块的大部分像素色度分布在预设值的预设误差范围内,确定出所述文字块为不包含彩色背景信息但文字是彩色文字的文字块;If most of the pixel chromaticity of the text block is distributed within a preset error range of a preset value, it is determined that the text block is a text block that does not contain colored background information but the text is colored text;
    如果所述文字块的像素色度值均分布在预设值的预设误差范围内,确定出所述文字块为不包含彩色背景信息且文字是非彩色文字的文字块。If the pixel chromaticity values of the text block are all distributed within a preset error range of a preset value, it is determined that the text block is a text block that does not contain colored background information and the text is non-color text.
  15. 根据权利要求11所述的数据压缩方法,其中,The data compression method according to claim 11, wherein
    所述对图像块进行有损压缩,包括:The lossy compression of the image block includes:
    对所述图像块进行亚采样;Sub-sampling the image block;
    所述对不包含彩色背景信息的文字块进行有损压缩,包括:The lossy compression of text blocks that do not contain color background information includes:
    对所述不包含彩色背景信息的文字块进行亚采样;Sub-sampling the text block that does not contain color background information;
    所述对包含彩色背景信息的文字块进行无损压缩,包括:The lossless compression of text blocks containing colored background information includes:
    对所述包含彩色背景信息的文字块进行全采样;或者,Fully sampling the text block containing colored background information; or,
    针对所述包含彩色背景信息的文字块,对亮度分量进行全采样,对色度分量进行亚采样。For the text block containing color background information, the luma component is fully sampled, and the chroma component is sub-sampled.
  16. 根据权利要求14所述的数据编码方法,其中,所述对不包含彩色背景信息的文字块进行亚采样以实现有损压缩,包括:The data encoding method according to claim 14, wherein the sub-sampling of text blocks that do not contain color background information to achieve lossy compression includes:
    对所述不包含彩色背景信息但文字是彩色文字的文字块进行亚采样;Sub-sampling the text block that does not contain color background information but the text is color text;
    对所述不包含彩色背景信息且文字是非彩色文字的文字块进行亚采样。Sub-sampling the text block that does not contain color background information and the text is non-color text.
  17. 根据权利要求15或16所述的数据编码方法,其中,所述亚采样包括:YUV4:2:2采样;所述全采样包括:YUV4:4:4采样。The data encoding method according to claim 15 or 16, wherein the subsampling includes: YUV4:2:2 sampling; the full sampling includes: YUV4:4:4 sampling.
  18. 根据权利要求11所述的数据编码方法,其中,所述对无损压缩后的信息进行无损编码、对有损压缩后的信息进行有损编码,对色度信息进行编码,包括:The data encoding method according to claim 11, wherein the lossless encoding of the information after lossless compression, the lossy encoding of the information after lossy compression, and the encoding of chroma information include:
    调用无损编码器对所述无损压缩后的信息进行所述无损编码,调用有损编码器对所述有损压缩后的信息进行所述有损编码,调用无损编码器对所述色度信息进行编码。Calling a lossless encoder to perform the lossless encoding on the lossless compressed information, calling a lossy encoder to perform the lossy encoding on the lossy compressed information, and calling a lossless encoder to perform the chroma information coding.
  19. 根据权利要求11所述的数据编码方法,所述方法还包括:The data encoding method according to claim 11, further comprising:
    采用标识信息区分不同类型的所述压缩后的信息、不同类型的所述编码后的数据包、编码后的所述色度信息。The identification information is used to distinguish different types of the compressed information, different types of the encoded data packets, and the encoded chrominance information.
  20. 根据权利要求19所述的数据编码方法,其中,所述标识信息携带在网络抽样层NAL单元中。The data encoding method according to claim 19, wherein the identification information is carried in a network sampling layer NAL unit.
  21. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~权利要求10任一项所述的数据压缩方法,和/或权利要求11~权利要求20任一项所述的数据编码方法。A computer-readable storage medium storing computer-executable instructions for performing the data compression method according to any one of claims 1 to 10, and/or claim 11 to claims The data encoding method according to any one of 20.
  22. 一种数据压缩装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行权利要求1~权利要求10任一项所述的数据压缩方法的步骤。A data compression device includes a processor and a memory; wherein the memory stores a computer program that can run on the processor: for performing the steps of the data compression method according to any one of claims 1 to 10.
  23. 一种数据编码装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行权利要求11~权利要求20任一项所述的数据编码方法的步骤。A data encoding device includes a processor and a memory; wherein the memory stores a computer program executable on the processor: for performing the steps of the data encoding method according to any one of claims 11 to 20.
  24. 一种数据解码方法,包括:A data decoding method, including:
    获取待解码数据包,确定待解码数据包包括无损数据包或有损数据包;Obtain the data packet to be decoded, and determine that the data packet to be decoded includes a lossless data packet or a lossy data packet;
    对无损数据包解码后填入解码帧中,确定有损数据包为图像块或文字块;After decoding the lossless data packet and filling it in the decoded frame, it is determined that the lossy data packet is an image block or a text block;
    对图像块进行解码后填入解码帧中;对文字块解码,并根据待解码数据包中的色度信息对解码后的文字块进行补偿后填入解码帧中。Decode the image block and fill it in the decoded frame; decode the text block and compensate the decoded text block according to the chroma information in the data packet to be decoded and fill it in the decoded frame.
  25. 根据权利要求24所述的数据解码方法,其中,所述待解码数据包中包括以下任一项或任意组合:有损编码数据包、无损编码数据包、色度编码数据包。The data decoding method according to claim 24, wherein the data packet to be decoded includes any one or any combination of the following: a lossy encoded data packet, a lossless encoded data packet, and a chroma encoded data packet.
  26. 根据权利要求25所述的数据解码方法,其中,The data decoding method according to claim 25, wherein
    所述无损编码数据包包括:编码后的包含彩色背景信息的文字块;The lossless coded data packet includes: a coded text block containing colored background information;
    所述有损编码数据包包括:编码后的图像块、编码后的不包含彩色背景信息的文字块。The lossy encoded data packet includes: an encoded image block and an encoded text block that does not contain color background information.
  27. 根据权利要求25所述的数据解码方法,其中,The data decoding method according to claim 25, wherein
    所述无损编码数据包包括:编码后的包含彩色背景信息的文字块中的亮度分量;The lossless coded data packet includes: the luminance component in the coded text block containing colored background information;
    所述有损编码数据包包括:编码后的图像块、编码后的包含彩色背景信息的文字块中的色度分量、不包含彩色背景信息但文字是彩色文字的文字块、不包含彩色背景信息且文字是非彩色文字的文字块。The lossy coded data packet includes: a coded image block, a chroma component in the coded text block containing colored background information, a text block that does not contain color background information but the text is color text, and does not contain color background information And the text is a block of non-color text.
  28. 根据权利要求24所述的数据解码方法,所述对解码后的文字块进行补偿之前,还包括:The data decoding method according to claim 24, before the compensating the decoded text block, further comprising:
    调用解码器,对所述待解码数据包中的色度编码数据包进行解码,得到色度信息。Call the decoder to decode the chroma-encoded data packet in the data packet to be decoded to obtain chroma information.
  29. 根据权利要求28所述的数据解码方法,其中,所述有损编码数据包包括不包含彩色背景信息且文字是非彩色文字的文字块;所述对解码后的文字块进行补偿,包括:The data decoding method according to claim 28, wherein the lossy encoded data packet includes a text block that does not contain color background information and the text is achromatic text; and the compensating for the decoded text block includes:
    根据亮度分量Y值将色度值128回填至所述解码帧。The chroma value 128 is backfilled into the decoded frame according to the luminance component Y value.
  30. 根据权利要求28所述的数据解码方法,其中,所述解码帧是完全抽样的YUV4:4:4的数据帧。The data decoding method according to claim 28, wherein the decoded frame is a fully sampled YUV 4:4:4 data frame.
  31. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求24~权利要求30任一项所述的数据解码方法。A computer-readable storage medium storing computer-executable instructions for performing the data decoding method according to any one of claims 24 to 30.
  32. 一种数据解码装置,包括处理器、存储器;其中,存储器上存储有可在处理器上运行的计算机程序:用于执行权利要求24~权利要求30任一项所述的数据解码方法的步骤。A data decoding device includes a processor and a memory; wherein the memory stores a computer program executable on the processor: for performing the steps of the data decoding method according to any one of claims 24 to 30.
PCT/CN2019/127600 2018-12-29 2019-12-23 Data compression method and apparatus, and data encoding/decoding method and apparatus WO2020135357A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811630766.2A CN109831668B (en) 2018-12-29 2018-12-29 Data compression method and device, data coding/decoding method and device
CN201811630766.2 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020135357A1 true WO2020135357A1 (en) 2020-07-02

Family

ID=66860002

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/127600 WO2020135357A1 (en) 2018-12-29 2019-12-23 Data compression method and apparatus, and data encoding/decoding method and apparatus

Country Status (2)

Country Link
CN (1) CN109831668B (en)
WO (1) WO2020135357A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113676728A (en) * 2021-08-25 2021-11-19 国网吉林省电力有限公司长春供电公司 Digital platform area unstructured data compression method
CN115208413A (en) * 2022-09-14 2022-10-18 北京四维纵横数据技术有限公司 Chain coding compression method and device, computer equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831668B (en) * 2018-12-29 2022-06-24 中兴通讯股份有限公司 Data compression method and device, data coding/decoding method and device
CN110492888A (en) * 2019-08-26 2019-11-22 武汉和时利自动化系统工程有限公司 A kind of data encoding and decoding system and method for water treatment system
CN111200740A (en) * 2020-01-09 2020-05-26 西安万像电子科技有限公司 Encoding method and encoder
CN111447450A (en) * 2020-03-16 2020-07-24 西安万像电子科技有限公司 Data processing method and device
CN113129395B (en) * 2021-05-08 2021-09-10 深圳市数存科技有限公司 Data compression encryption system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8326051B1 (en) * 2008-02-22 2012-12-04 Teradici Corporation Method and apparatus for progressive encoding for text transmission
US8442311B1 (en) * 2005-06-30 2013-05-14 Teradici Corporation Apparatus and method for encoding an image generated in part by graphical commands
CN103873877A (en) * 2012-12-14 2014-06-18 华为技术有限公司 Image transmission method and device for remote desktop
CN107483934A (en) * 2017-08-17 2017-12-15 西安万像电子科技有限公司 Decoding method, device and system
CN107665128A (en) * 2017-09-13 2018-02-06 深信服科技股份有限公司 Image processing method, system, server and readable storage medium storing program for executing
CN108184118A (en) * 2016-12-08 2018-06-19 中兴通讯股份有限公司 Cloud desktop contents encode and coding/decoding method and device, system
CN109831668A (en) * 2018-12-29 2019-05-31 中兴通讯股份有限公司 Data compression method and apparatus, data encoding/decoding method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6594385B2 (en) * 1998-10-27 2003-07-15 Hewlett-Packard Development Company, L.P. Image compression of background and text tiles
EP1355484B1 (en) * 2002-04-17 2017-03-01 Canon Kabushiki Kaisha Image compression method and apparatus, and image coding method and apparatus
US7650039B2 (en) * 2005-03-03 2010-01-19 Canon Kabushiki Kaisha Image encoding apparatus, image decoding apparatus, control method therefor, computer program, and computer-readable storage medium
CN100576921C (en) * 2008-01-14 2009-12-30 浙江大学 Mixed image compression method based on block sort
JP4538514B2 (en) * 2008-07-30 2010-09-08 シャープ株式会社 Image compression method, image compression apparatus, image forming apparatus, computer program, and recording medium
CN101651769B (en) * 2009-09-11 2012-01-18 南京大学 Method for deciding color number and representative color value based on picture quality limiting condition
CN102098507B (en) * 2010-06-08 2013-12-25 同济大学 Integrative compressing method and device of image
GB2481870B (en) * 2010-12-14 2012-06-13 Realvnc Ltd Method and system for remote computing
CN102164167B (en) * 2011-02-21 2014-10-15 北京奇虎科技有限公司 Method and system for remote-control classified transmission
CN103886623B (en) * 2012-12-19 2017-03-15 华为技术有限公司 A kind of method for compressing image, equipment and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8442311B1 (en) * 2005-06-30 2013-05-14 Teradici Corporation Apparatus and method for encoding an image generated in part by graphical commands
US8326051B1 (en) * 2008-02-22 2012-12-04 Teradici Corporation Method and apparatus for progressive encoding for text transmission
CN103873877A (en) * 2012-12-14 2014-06-18 华为技术有限公司 Image transmission method and device for remote desktop
CN108184118A (en) * 2016-12-08 2018-06-19 中兴通讯股份有限公司 Cloud desktop contents encode and coding/decoding method and device, system
CN107483934A (en) * 2017-08-17 2017-12-15 西安万像电子科技有限公司 Decoding method, device and system
CN107665128A (en) * 2017-09-13 2018-02-06 深信服科技股份有限公司 Image processing method, system, server and readable storage medium storing program for executing
CN109831668A (en) * 2018-12-29 2019-05-31 中兴通讯股份有限公司 Data compression method and apparatus, data encoding/decoding method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113676728A (en) * 2021-08-25 2021-11-19 国网吉林省电力有限公司长春供电公司 Digital platform area unstructured data compression method
CN115208413A (en) * 2022-09-14 2022-10-18 北京四维纵横数据技术有限公司 Chain coding compression method and device, computer equipment and storage medium
CN115208413B (en) * 2022-09-14 2023-01-17 北京四维纵横数据技术有限公司 Chain coding compression method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109831668B (en) 2022-06-24
CN109831668A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
WO2020135357A1 (en) Data compression method and apparatus, and data encoding/decoding method and apparatus
US11445201B2 (en) Video encoding and decoding method, device, and system, and storage medium
CN107950028B (en) Method and apparatus for processing video data
US20190222623A1 (en) Picture file processing method, picture file processing device, and storage medium
AU2016212243B2 (en) A method and apparatus of encoding and decoding a color picture
KR102509504B1 (en) Coding and decoding methods and corresponding devices
KR102523233B1 (en) Method and device for decoding a color picture
KR102593617B1 (en) Encoding device, decoding device and corresponding method using palette coding
RU2758035C2 (en) Method and device for reconstructing image data by decoded image data
WO2018178367A1 (en) Method and device for color gamut mapping
KR20180123046A (en) Method and device for encoding high dynamic range picture, corresponding decoding method and decoding device
EP3318063A1 (en) Method and device for encoding both a hdr picture and a sdr picture obtained from said hdr picture using color mapping functions
TWI713354B (en) Color remapping information sei message signaling for display adaptation
EP3453175B1 (en) Method and apparatus for encoding/decoding a high dynamic range picture into a coded bistream
CN110741623A (en) Method and apparatus for gamut mapping
WO2019203973A1 (en) Method and device for encoding an image or video with optimized compression efficiency preserving image or video fidelity
CN110719484B (en) Image processing method
CN114827620A (en) Image processing method, apparatus, device and medium
WO2021109846A1 (en) Bit stream data processing method and apparatus
US20180014024A1 (en) Method and apparatus of encoding and decoding a color picture
CN114494051A (en) Image processing method and device, electronic equipment and readable storage medium
CN117956172A (en) Video transmission display method and system
CN111669532A (en) High dynamic range video end-to-end realization method
EP3350774A1 (en) Determination of a co-located luminance sample of a color component sample, for hdr coding/decoding

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19904983

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19904983

Country of ref document: EP

Kind code of ref document: A1