CN113613004A - Image encoding method, image encoding device, electronic device, and storage medium - Google Patents

Image encoding method, image encoding device, electronic device, and storage medium Download PDF

Info

Publication number
CN113613004A
CN113613004A CN202111076563.5A CN202111076563A CN113613004A CN 113613004 A CN113613004 A CN 113613004A CN 202111076563 A CN202111076563 A CN 202111076563A CN 113613004 A CN113613004 A CN 113613004A
Authority
CN
China
Prior art keywords
encoding
target
data
image
quantization
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111076563.5A
Other languages
Chinese (zh)
Inventor
张凯明
包佳晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bigo Technology Singapore Pte Ltd
Original Assignee
Bigo Technology Singapore Pte Ltd
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 Bigo Technology Singapore Pte Ltd filed Critical Bigo Technology Singapore Pte Ltd
Priority to CN202111076563.5A priority Critical patent/CN113613004A/en
Publication of CN113613004A publication Critical patent/CN113613004A/en
Priority to PCT/CN2022/114080 priority patent/WO2023040600A1/en
Pending legal-status Critical Current

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/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/172Methods 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 picture, frame or field
    • 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/124Quantisation
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Abstract

The application discloses an image decoding method, an image decoding device and electronic equipment, wherein the method comprises the following steps: acquiring an original image to be coded; and encoding the original image by using a preset encoding standard to obtain target encoded data, wherein the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization. The method can reduce the complexity of image coding processing on the premise of giving consideration to the image compression performance.

Description

Image encoding method, image encoding device, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of image encoding technologies, and in particular, to an image encoding method, an image encoding device, an electronic device, and a computer-readable storage medium.
Background
Image coding techniques are compression methods applied to image data in order to minimize the bandwidth required to transmit the image data. In recent years, with the continuous development of intelligent terminal technology, the number of images spread on the internet starts to increase sharply, and the volume of the images is also increasing, which presents a new challenge to image coding technology.
The current image coding scheme is extremely optimized to reach certain performance, and further improvement of compression performance is difficult to realize; or the problems of high complexity of encoding and decoding processing and more redundant information exist. Therefore, it is necessary to provide an image encoding method to solve the above problems.
Disclosure of Invention
The embodiment of the disclosure provides an image encoding method, an image encoding device, an electronic device, a storage medium, and an image decoding method, so as to reduce the complexity of image encoding and decoding processing on the premise of considering the image compression performance.
In a first aspect of the present disclosure, there is provided an image encoding method, including:
acquiring an original image to be coded;
and encoding the original image by using a preset encoding standard to obtain target encoded data, wherein the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization.
In a second aspect of the present disclosure, there is also provided an image decoding method, including:
acquiring target coded data to be analyzed, wherein the target coded data are data obtained after an original image is coded by using a preset coding standard, the preset coding standard is based on intra-frame prediction coding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid coding quantization;
and decoding the target coded data by using a preset decoding standard corresponding to the preset coding standard to obtain a reconstructed image corresponding to the original image.
In a third aspect of the present disclosure, there is also provided an image encoding apparatus including:
the original image acquisition module is used for acquiring an original image to be coded;
the encoding module is used for encoding the original image by using a preset encoding standard to obtain target encoded data, wherein the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization.
In a fourth aspect of the present disclosure, there is also provided an image decoding apparatus comprising:
the system comprises an encoded data acquisition module, a target encoding data analysis module and a target quantization processing module, wherein the encoded data acquisition module is used for acquiring target encoded data to be analyzed, the target encoded data is data obtained by encoding an original image by using a preset encoding standard, the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization;
and the decoding module is used for decoding the target coded data by using a decoding standard corresponding to the preset coding standard to obtain a reconstructed image corresponding to the original image.
According to a fifth aspect of the present disclosure, there is also provided an electronic device, including:
a memory for storing executable instructions;
a processor configured to execute the electronic device to perform the method according to the first or second aspect of the disclosure according to the control of the executable instructions.
According to a sixth aspect of the present disclosure, there is also provided a computer readable storage medium storing a computer program readable and executable by a computer, the computer program being configured to perform the method according to the first or second aspect of the present disclosure when read and executed by the computer.
The method has the advantages that according to the embodiment of the disclosure, for the original image to be encoded, the original image is encoded by using the preset encoding standard which is based on intra-frame prediction encoding and comprises the target block division processing and the target quantization processing, so that the electronic equipment can flexibly select a proper block division mode to split the original image, and the image compression rate is improved under the condition of ensuring that the image quality is unchanged; in addition, in the encoding process, the effect of quantization processing can be improved by quantization based on grid encoding, so that the image compression rate is further improved on the premise of not increasing the encoding and decoding complexity.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flowchart of an image encoding method provided in an embodiment of the present disclosure.
Fig. 2 is a schematic view of an application scenario of image encoding and decoding processing provided in an embodiment of the present disclosure.
Fig. 3 is a schematic flowchart of an image decoding method according to an embodiment of the present disclosure.
Fig. 4 is a schematic block diagram of an image encoding apparatus provided in an embodiment of the present disclosure.
Fig. 5 is a schematic block diagram of an image decoding apparatus provided in an embodiment of the present disclosure.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
The terms first, second and the like in the description and in the claims of the present disclosure are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that embodiments of the disclosure can be practiced in sequences other than those illustrated or described herein.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< method embodiment I >
Currently, commonly used image coding methods may generally be: 1. JPEG (Joint Photographic Experts group) image lossy coding method is a compression method applied to photo image content, and realizes compression coding of images at the cost of losing part of information. 2. The method is a compression method based on lossless coding, can retain all information of an image, supports a transparent (Alpha) channel and also supports gamma correction of brightness, and can obtain a better color reconstruction effect. 3. The WebP encoding method, which is derived based on the video encoding standard VP8, supports lossless and lossy encoding with a compression ratio improvement of more than 20% compared to methods 1 and 2. 4. The H.264/H.265 video coding standard is an international video coding standard established by an MPEG organization, and both adopt a hybrid coding framework and can realize high-efficiency coding compression.
Although the scheme can compress image data to a certain extent, the method 1 can only achieve good reconstruction quality for smooth regions of images generally, and has poor reconstruction effect on complex texture regions such as lines and characters; the method 2 is a lossless coding mode, so that the compression efficiency is not high, and the large-amplitude image compression is difficult to realize; although the image compression rate can be improved by the method 3, because the method is based on the VP8 architecture, the image block is divided into a few supported division modes, for example, the detailed judgment of block modes such as 8 × 8 is lacked, and the complexity of the encoding and decoding processing is greatly increased, for example, the encoding complexity is increased by 10 times compared with the method 1, and the decoding complexity is increased by 1.5 times compared with the method 1, so the method has a relatively high hardware requirement on the electronic device; the encoding and decoding complexity of the method 4 is relatively lower than that of the method 3, and the compression efficiency is higher than that of the methods 1 and 2, but the video encoding standard used in the method 3 is generally applied to encoding and decoding video data, so that the encoded code stream contains redundant video header information, which causes a certain amount of encoded byte waste, and therefore, the method is generally less applied to image encoding scenes.
As can be seen from the above analysis, the conventional image encoding method has a problem that both the image compression performance and the encoding and decoding complexity cannot be considered. To solve the problem, an embodiment of the present disclosure provides an image encoding method, please refer to fig. 1, which is a flowchart illustrating the image encoding method according to the embodiment of the present disclosure. The method can be implemented by an electronic device, and the electronic device can be a terminal device, for example, a mobile phone, a tablet computer, and the like; alternatively, the electronic device may be a server, for example, a blade server, a rack server, or the like, and is not limited herein.
As shown in FIG. 1, the method of the present embodiment may include the following steps S1100-S1200, which are described in detail below.
Step S1100, an original image to be encoded is acquired.
The original image refers to an image to be subjected to volume compression for transmission in a network, wherein the original image may be a static image or a dynamic image, and is not particularly limited herein. For example, the original image may be an image to be transmitted into a network in the terminal device.
Step S1200, encoding the original image by using a preset encoding standard to obtain target encoded data, where the preset encoding standard is based on intra-frame prediction encoding and includes target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing includes data quantization processing based on mesh encoding quantization.
In this embodiment, a preset encoding standard, abbreviated as hpic standard, is an encoding standard based on intra prediction encoding, and when encoding image data, the encoding standard can support target image block division processing for block division of an original image by using any one of 4 pixels by 4 pixels, 8 pixels by 8 pixels, and 16 pixels by 16 pixels as a unit image block, and for each item of block division mode, support corresponding intra prediction encoding and transform encoding processing; in addition, in order to improve the image compression rate, the preset encoding standard also introduces data quantization processing based on trellis encoding quantization, for example, trellis quantization optimization, where trellis quantization refers to evaluation of an initial quantization coefficient obtained in quantization processing to determine which quantization coefficient can improve the image compression rate as much as possible while ensuring that the image quality is substantially unchanged when the initial quantization coefficient is used for subsequent encoding processing or a quantization coefficient after the initial quantization coefficient-1 is used for subsequent encoding processing. How to encode the original image using the preset encoding standard will be described in detail below. Generally, for an original image to be encoded, after an electronic device, for example, a server acquires the original image, the original image is generally cached in a memory in an RGB format, and considering that the RGB format independently represents colors of pixels through a combination of an R channel, a G channel, and a B channel when representing colors, data of the three channels need to be transmitted simultaneously when transmitting the image in the RGB format, thereby causing a large bandwidth occupation; when representing colors, the YUV format may separate the Y channel and the UV channel to represent colors independently, and may not need to transmit data of the two channels at the same time, and because the data packet of the YUV format also contains more redundant information at the same time, in an embodiment, before acquiring an original image and preparing to encode the original image, the method further includes: acquiring a color format of an original image; and under the condition that the color format is a non-YUV format, converting the original image into a YUV format, and encoding the original image converted into the YUV format by using a preset encoding standard to obtain target encoded data with high compression rate.
In other words, in specific implementation, it is considered that redundant information included in image data in the YUV format is often more than that of image data in the RGB format, and therefore, after an original image is acquired, the current color format of the original image may be determined, and in a case where the color format is not in the YUV format, the color format of the original image may be converted, so that redundant information in the image data can be effectively removed during encoding, and the image compression ratio is improved.
Taking an original image in an RGB format as an example, when performing color format conversion on the original image in the RGB format, the following formula may be specifically used to convert each color channel data of a pixel in the original image to obtain the original image in the YUV format:
Figure BDA0003262428570000061
in one embodiment, the encoding the original image using the preset encoding standard to obtain the target encoded data includes: splitting the original image according to the preset rule to obtain a plurality of image blocks; obtaining a plurality of data to be quantized respectively corresponding to the plurality of image blocks by performing intra prediction encoding processing and transform encoding processing on the plurality of image blocks, wherein the intra prediction encoding processing is used for removing redundant data in the plurality of image blocks from a spatial domain, and the transform encoding processing is used for transforming the plurality of image blocks from which the redundant data are removed from the spatial domain to a frequency domain to obtain the plurality of data to be quantized; respectively carrying out the target quantization processing on the data to be quantized to obtain a plurality of quantization coefficients; and obtaining the target coding data according to the plurality of quantization coefficients.
Considering that the h.264/h.265 video coding standard can implement low-complexity and high-compression-rate coding on video data, the predetermined coding standard, that is, the hpic coding standard provided by the embodiments of the present disclosure may refer to the intra-frame prediction coding mode in h.264/h.265, and obtain a coding standard more suitable for an image compression scene by removing inter-frame prediction coding therein.
Specifically, as described in the foregoing steps, the method provided by the embodiment of the present disclosure may include at least a target block division process, an intra prediction encoding process, a transform encoding process, and a target quantization process when encoding a target image converted into a YUV format.
The target block division processing may specifically be to divide the image according to the attribute information and the size of the image to be encoded and according to a preset rule, so as to obtain a plurality of image blocks. For example, the image to be encoded may be divided into unit image blocks of any one of 4 pixels by 4 pixels, 8 pixels by 8 pixels, 16 pixels by 16 pixels, and the like, so as to obtain a plurality of image blocks. Compared with the existing encoding method which may only support the block division mode of 4 pixels by 4 pixels and 16 pixels by 16 pixels, the method provided by the embodiment of the disclosure can further improve the image compression performance by increasing the block division mode of 8 pixels by 8 pixels under the condition of ensuring that the image quality is not changed, so as to realize more detailed image encoding.
The intra-frame prediction coding processing is to predict the change of pixels in adjacent blocks through a reference block and a group of prediction coefficients based on the correlation and the similarity of the pixel values of each adjacent image block in a spatial domain, namely a pixel domain, aiming at a plurality of image blocks obtained by splitting an original image by taking a single-frame image as a unit, and remove a part of redundant data through the difference between the actual value and the predicted value of the pixels, so that the dynamic range of the pixel values in image data is reduced, the reduction of the number of bits for representing the values is realized, and the purpose of compressing the image data is achieved.
Transform coding (transform coding) is a process of transforming image data obtained after an original image is subjected to intra-prediction coding processing from a spatial domain to a frequency domain to transform the image data from a dynamic continuous series of values into discrete values with small correlation.
Considering the Transform speed and performance of the Discrete Cosine Transform (DCT) process, the Transform coding process may be specifically a DCT Transform coding process to increase the coding speed of the image coding process and the decoding speed when decoding is performed subsequently, in one embodiment, because of other Transform processes such as DFT, WHT, and the like.
The target quantization processing is processing for quantizing a series of discrete values with small correlation obtained after the transform coding processing, that is, for a plurality of values after the transform coding processing, the values in the same quantization range are quantized into the same quantization coefficient, so as to achieve the purpose of compressing the plurality of values. For example, for the numerical values (a1, a2, a3, …, an), the numerical values (a1, a2) in the same quantization range may be quantized to quantized coefficients b1, and the numerical values (a6, a7) in another quantization range may be quantized to quantized coefficients b 2.
In one embodiment, the performing the target quantization processing on the multiple data to be quantized respectively to obtain multiple quantization coefficients includes: acquiring a first to-be-determined quantization parameter corresponding to first to-be-quantized data according to preset mapping data, wherein the first to-be-quantized data is any one of the plurality of quantized data, and the preset mapping data is used for reflecting the corresponding relation between the to-be-quantized data and the quantization parameter; according to the first quantization parameter to be determined, Rate Distortion optimization selection (RDO) is carried out on the first data to be quantized based on grid coding quantization, and a first target quantization parameter is obtained; according to the first target quantization parameter, performing quantization processing on the first data to be quantized to obtain a first quantization coefficient; obtaining the plurality of quantized coefficients according to the first quantized coefficient.
Specifically, in the embodiment of the present disclosure, for the data to be quantized obtained after the transform coding process, that is, the transform coefficients to be coded, in order to improve the quantization result and further improve the image compression rate while ensuring the image quality, a trellis coding quantization, for example, a trellis quantization process, may be introduced into the quantization process to screen the quantization coefficients more suitable for the subsequent process, for example, the subsequent entropy coding, by performing RDO selection on the data to be quantized.
That is, in one embodiment, the obtaining the target encoded data from the plurality of quantized coefficients includes: the target encoded data is obtained by performing entropy encoding (entropy encoding) processing on the plurality of quantized coefficients, respectively.
The entropy encoding process may be a process based on encoding algorithms such as Shannon (Shannon) encoding, Huffman (Huffman) encoding, and arithmetic encoding (arithmetric encoding), and the detailed process is not described herein again.
In one embodiment, the obtaining the target encoded data by respectively performing entropy encoding processing on the plurality of quantized coefficients includes: obtaining first encoded data by performing the entropy encoding processing on the plurality of quantized coefficients, respectively; obtaining second encoded data according to attribute information of the original image, target quantization coefficients corresponding to the plurality of quantized data in the target quantization process, and an image block division rule used in the target block division, wherein the second encoded data is used for indicating an encoding format of the first encoded data, and the attribute information includes a height and a width of the original image; and obtaining the target coded data according to the first coded data and the second coded data.
The first encoded data is a binary code stream obtained by performing encoding and compression processing on image data, for example, an original image or image data included in a target image corresponding to the original image, that is, a main data code stream in an hpic encoding format.
The second coded data is a binary code stream for indicating the coding format of the first coded data, namely a head data code stream in an hpic coding format,
specifically, when image data is encoded in a predetermined encoding standard, that is, an hpic encoding standard, provided by the embodiment of the present disclosure, after obtaining main code stream data, in order to facilitate pre-allocation of memory and selection of an appropriate decoding tool in decoding processing, when an original image or a target image is encoded, image data, for example, attribute information of the original image, encoding tool information used in encoding, and the like may also be recorded and encoded, where the attribute information may be a height and a width of the original image.
Please refer to table 1, which is a syntax constraint representation table of a second encoding data, i.e., a header information encoding format, provided by the embodiment of the present disclosure:
syntax element name Descriptor(s)
frame_width u(16)
frame_height u(16)
b_transform_8x8 ue(v)
slice_qp_delta se(w)
reserved_zero_4Bytes u(32)
Wherein, at the beginning of the second encoding data, the width and height of the original image can be represented by frame _ width and frame _ height fields, each field being represented by 2 bytes respectively, so as to perform the predecoding process in the decoding stage; b _ transform _8x8 is used to indicate whether 8x8 DCT transform is used in encoding; the slice _ qp _ delta is used for recording information of a quantization parameter adopted during encoding; the last 4 bytes can be used as an extension field; in addition, in the descriptor definition, u (n) is used to represent n-bit unsigned integers and are transmitted directly without encoding, for example, u (16) represents the image width transmitted with a length of 16 bits, ue (v) represents an unsigned integer type syntax element v encoded in golomb coding, se (w) represents a signed integer type syntax element w encoded in golomb coding; in particular, the header information may include other fields, for example, a version of an encoding standard used in the encoding process, so that the decoding end can select a decoding standard of a version corresponding to the encoding standard to perform the decoding process.
Through the encoding processing, the target encoding data corresponding to the original image can be obtained, so that when the original image needs to be transmitted in a network, the target encoding data can be transmitted, so that under the condition of ensuring the image quality, the bandwidth consumption is reduced, and the transmission efficiency is improved. In addition, after the image receiving end receives the target encoded data, the target encoded data may be decoded by the following image decoding method to obtain a decoded image corresponding to the original image: acquiring target coding data to be analyzed; and decoding the target coded data by using a preset decoding standard corresponding to the preset coding standard to obtain a reconstructed image corresponding to the original image.
Specifically, corresponding to the image encoding process, the image decoding process may include: header information decoding, that is, second encoded data decoding processing, entropy decoding processing, inverse quantization processing, inverse transform decoding processing, intra prediction reconstruction processing, post-processing filtering processing, and the like.
The entropy decoding processing is used for analyzing a binary code stream corresponding to first coded data included in the target coded data into a plurality of quantized coefficients; the inverse quantization process restores a plurality of quantization coefficients obtained by the entropy decoding process into transform coefficients of a frequency domain according to the quantization parameter information obtained by analysis; the inverse transformation decoding processing is used for carrying out corresponding inverse transformation on the transformation coefficient obtained by reduction in the inverse quantization processing according to the size of each decoding coefficient block so as to map back to a space domain, namely a residual coefficient of a pixel domain; the intra-frame prediction reconstruction processing is used for constructing a reference pixel according to the prediction mode obtained by analysis and adding the reference pixel and the residual coefficient to obtain a reconstructed pixel; the post-processing filtering process is used for filtering the reconstructed pixels to eliminate the blocking effect problem caused by the block-level coding process.
In one embodiment, in the case that the target encoded data includes attribute information of an original image, the image decoding process may further include a pre-decoding process, which may specifically be: pre-decoding the target coded data to obtain the attribute information; and setting a caching space for caching the reconstructed image according to the attribute information.
That is, before the target encoded data is acquired and is ready to be subjected to specific decoding processing, pre-decoding processing may be performed to acquire attributes, such as width and height, of the original image from the second encoded data of the target encoded data, and then, according to the width and height, a memory space is allocated to the reconstructed image in advance, so as to ensure that a sufficient space is ensured to store the reconstructed image on the premise that the memory space is not wasted.
It should be noted that the reconstructed image obtained after the above processing is still image data in YUV format, and therefore, in an embodiment, the color format inverse transformation processing may be further performed on the reconstructed image in YUV format to obtain a reconstructed image in RGB format, where the inverse transformation processing may be implemented by the following formula:
Figure BDA0003262428570000111
to facilitate understanding of the image encoding method provided by the embodiment of the present disclosure, please refer to fig. 2, which is a schematic view of an application scenario of the image encoding and decoding process provided by the embodiment of the present disclosure. As shown in fig. 2, at the encoding end, for an original image to be encoded, a YUV format conversion process may be performed first to obtain an original image in a YUV format, then, second encoded data may be obtained by encoding using a syntax constraint that defines a second encoded data in advance, that is, a header information encoding format, and then, a main body encoding process, that is, a target block division process, an intra prediction encoding process, a transform encoding process, a target quantization process, an entropy encoding process, and the like, may be performed for pixel data in the image to obtain a first encoded data; then, target coded data corresponding to the original image are obtained by packaging the first coded data and the second coded data and are stored in a cloud server; the server of the cloud end can generate a corresponding URL identification link for the target coded data so as to facilitate downloading of a decoding end; meanwhile, when a server at the cloud receives a download request of a decoding end, whether transcoding is required to be performed in a Content Delivery Network (CDN) or not can be judged according to a preset transcoding strategy, and if transcoding is required, decoding is performed in the CDN to obtain a URL of transcoded code stream data; if no transcoding is needed, the URL identification link corresponding to the target coded data can be directly provided for the decoding end; the decoding end acquires target coded data according to the received URL identification link, performs pre-decoding processing and main body decoding processing, namely header information decoding, namely second coded data decoding processing, entropy decoding processing, inverse quantization processing, inverse transformation decoding processing, intra-frame prediction reconstruction processing, post-processing filtering processing and the like to obtain a reconstructed image, and then performs color format inverse transformation processing to obtain a reconstructed image in an RGB format corresponding to the original image and display the reconstructed image on a display device corresponding to the decoding end.
To sum up, the image decoding method provided by the embodiment of the present disclosure, for an original image to be encoded, encodes the original image by using a preset encoding standard that is based on intra-frame prediction encoding and includes target block division processing and target quantization processing, so that an electronic device can flexibly select a suitable block division mode to split the original image, and thus, the image compression rate is improved under the condition that the image quality is ensured to be unchanged; in addition, in the encoding process, the effect of quantization processing can be improved by quantization based on grid encoding, so that the image compression rate is further improved on the premise of not increasing the encoding and decoding complexity. Experimental data show that compared with the existing webp coding method, the compression rate of the image coding method is improved by 14%, the coding complexity is reduced by 16%, the time consumption for downloading is saved by 12%, and high-quality and low-complexity image compression processing is realized.
< method example two >
Corresponding to the first method embodiment, the present embodiment further provides an image decoding method, which may be applied to an electronic device, for example, may be used in a server or a terminal device.
Please refer to fig. 3, which is a flowchart illustrating an image decoding method according to an embodiment of the disclosure. As shown in fig. 3, the method includes the following steps S3100-S3200, which are described in detail below.
Step S3100, acquiring target encoded data to be parsed, where the target encoded data is data obtained by encoding an original image using a preset encoding standard, the preset encoding standard is based on intra prediction encoding and includes target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing includes data quantization processing based on mesh encoding quantization.
Step S3200, decoding the target encoded data using a preset decoding standard corresponding to the preset encoding standard, to obtain a reconstructed image corresponding to the original image.
In one embodiment, the target encoding data includes attribute information of the original image; the method further comprises the following steps: pre-decoding the target coded data to obtain the attribute information; and setting a caching space for caching the reconstructed image according to the attribute information.
< first embodiment of the apparatus >
Corresponding to the first method embodiment, in this embodiment, an image encoding apparatus is further provided, and as shown in fig. 4, the apparatus 4000 may include an original image obtaining module 4100 and an encoding module 4200.
The original image obtaining module 4100 is configured to obtain an original image to be encoded; the encoding module 4200 is configured to encode the original image using a preset encoding standard to obtain target encoded data, where the preset encoding standard is based on intra prediction encoding and includes a target block division process and a target quantization process, the target block division process is an image block division process based on a preset rule, and the target quantization process includes a data quantization process based on mesh encoding quantization.
< example II of the apparatus >
Corresponding to the above two embodiments of the method, in this embodiment, an image decoding apparatus is further provided, and as shown in fig. 5, the apparatus 5000 may include an encoded data obtaining module 5100 and a decoding module 5200.
The encoded data obtaining module 5100 is configured to obtain target encoded data to be parsed, where the target encoded data is data obtained by encoding an original image using a preset encoding standard, the preset encoding standard is based on intra-frame prediction encoding and includes target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing includes data quantization processing based on mesh encoding quantization; the decoding module 5200 is configured to perform decoding processing on the target encoded data using a decoding standard corresponding to the preset encoding standard, so as to obtain a reconstructed image corresponding to the original image.
< apparatus embodiment >
In this embodiment, an electronic device is also provided, as shown in fig. 6, the electronic device 6000 may further include a processor 6200 and a memory 6100, where the memory 6100 is configured to store executable instructions; the processor 6200 is configured to operate the electronic device according to control of the instructions to perform a method according to any embodiment of the present disclosure.
The electronic device 6000 may be a terminal device, or may also be a server, which is not limited herein.
< media examples >
Corresponding to the first method embodiment and the first method embodiment, in this embodiment, a computer-readable storage medium is further provided, where the computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is configured to, when read and executed by the computer, perform the method according to any of the above embodiments of the present disclosure.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims (14)

1. An image encoding method, comprising:
acquiring an original image to be coded;
and encoding the original image by using a preset encoding standard to obtain target encoded data, wherein the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization.
2. The method according to claim 1, wherein before the encoding the original image using a preset encoding standard to obtain target encoded data, the method further comprises:
acquiring a color format of the original image;
under the condition that the color format is a non-YUV format, converting the original image into a YUV format;
the encoding the original image by using a preset encoding standard to obtain target encoded data comprises the following steps:
and encoding the original image converted into the YUV format by using the preset encoding standard to obtain the target encoding data.
3. The method according to claim 1, wherein the encoding the original image using the preset encoding standard to obtain the target encoded data comprises:
splitting the original image according to the preset rule to obtain a plurality of image blocks;
obtaining a plurality of data to be quantized respectively corresponding to the plurality of image blocks by performing intra prediction encoding processing and transform encoding processing on the plurality of image blocks, wherein the intra prediction encoding processing is used for removing redundant data in the plurality of image blocks from a spatial domain, and the transform encoding processing is used for transforming the plurality of image blocks from which the redundant data are removed from the spatial domain to a frequency domain to obtain the plurality of data to be quantized;
respectively carrying out the target quantization processing on the data to be quantized to obtain a plurality of quantization coefficients;
and obtaining the target coding data according to the plurality of quantization coefficients.
4. The method according to claim 3, wherein the performing the target quantization processing on the plurality of data to be quantized respectively to obtain a plurality of quantization coefficients comprises:
acquiring a first to-be-determined quantization parameter corresponding to first to-be-quantized data according to preset mapping data, wherein the first to-be-quantized data is any one of the plurality of quantized data, and the preset mapping data is used for reflecting the corresponding relation between the to-be-quantized data and the quantization parameter;
according to the first to-be-determined quantization parameter, rate distortion optimization selection is carried out on the first to-be-quantized data based on grid coding quantization to obtain a first target quantization parameter;
according to the first target quantization parameter, performing quantization processing on the first data to be quantized to obtain a first quantization coefficient;
obtaining the plurality of quantized coefficients according to the first quantized coefficient.
5. The method of claim 3, wherein obtaining the target encoded data from the plurality of quantized coefficients comprises:
the target encoded data is obtained by performing entropy encoding processing on the plurality of quantized coefficients, respectively.
6. The method according to claim 5, wherein the obtaining the target encoded data by entropy encoding the plurality of quantized coefficients, respectively, comprises:
obtaining first encoded data by performing the entropy encoding processing on the plurality of quantized coefficients, respectively;
obtaining second coded data according to attribute information of the original image, the preset mapping data used in the target quantization processing process and an image block division rule used in the target block division, wherein the second coded data is used for indicating a coding format of the first coded data, and the attribute information comprises the height and the width of the original image;
and obtaining the target coded data according to the first coded data and the second coded data.
7. The method according to claim 3, wherein the preset rule includes block-dividing the original image by any one of 4 pixels by 4 pixels, 8 pixels by 8 pixels, and 16 pixels by 16 pixels as a unit image block.
8. The method of claim 3, wherein the transform coding process comprises a discrete cosine transform coding process.
9. An image decoding method, comprising:
acquiring target coded data to be analyzed, wherein the target coded data are data obtained after an original image is coded by using a preset coding standard, the preset coding standard is based on intra-frame prediction coding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid coding quantization;
and decoding the target coded data by using a preset decoding standard corresponding to the preset coding standard to obtain a reconstructed image corresponding to the original image.
10. The method according to claim 9, wherein the target encoding data includes attribute information of the original image; the method further comprises the following steps:
pre-decoding the target coded data to obtain the attribute information;
and setting a caching space for caching the reconstructed image according to the attribute information.
11. An image encoding device characterized by comprising:
the original image acquisition module is used for acquiring an original image to be coded;
the encoding module is used for encoding the original image by using a preset encoding standard to obtain target encoded data, wherein the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization.
12. An image decoding apparatus, comprising:
the system comprises an encoded data acquisition module, a target encoding data analysis module and a target quantization processing module, wherein the encoded data acquisition module is used for acquiring target encoded data to be analyzed, the target encoded data is data obtained by encoding an original image by using a preset encoding standard, the preset encoding standard is based on intra-frame prediction encoding and comprises target block division processing and target quantization processing, the target block division processing is image block division processing based on a preset rule, and the target quantization processing comprises data quantization processing based on grid encoding quantization;
and the decoding module is used for decoding the target coded data by using a decoding standard corresponding to the preset coding standard to obtain a reconstructed image corresponding to the original image.
13. An electronic device, comprising:
a memory for storing executable instructions;
a processor configured to execute the electronic device to perform the method according to the control of the instruction, wherein the method is as claimed in any one of claims 1 to 10.
14. A computer-readable storage medium, in which a computer program is stored which is readable and executable by a computer, and which, when read by the computer, is adapted to perform the method according to any one of claims 1 to 10.
CN202111076563.5A 2021-09-14 2021-09-14 Image encoding method, image encoding device, electronic device, and storage medium Pending CN113613004A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111076563.5A CN113613004A (en) 2021-09-14 2021-09-14 Image encoding method, image encoding device, electronic device, and storage medium
PCT/CN2022/114080 WO2023040600A1 (en) 2021-09-14 2022-08-23 Image encoding method and apparatus, image decoding method and apparatus, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111076563.5A CN113613004A (en) 2021-09-14 2021-09-14 Image encoding method, image encoding device, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN113613004A true CN113613004A (en) 2021-11-05

Family

ID=78310496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111076563.5A Pending CN113613004A (en) 2021-09-14 2021-09-14 Image encoding method, image encoding device, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113613004A (en)
WO (1) WO2023040600A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114337920A (en) * 2021-12-23 2022-04-12 中国农业银行股份有限公司 Code analysis method and device and electronic equipment
WO2023040600A1 (en) * 2021-09-14 2023-03-23 百果园技术(新加坡)有限公司 Image encoding method and apparatus, image decoding method and apparatus, electronic device, and medium
CN116527903A (en) * 2023-06-30 2023-08-01 鹏城实验室 Image shallow compression method and decoding method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012238997A (en) * 2011-05-11 2012-12-06 Sony Corp Image processing device and image processing method
CN102907101A (en) * 2010-05-27 2013-01-30 索尼公司 An image compression method with random access capability
WO2014167179A1 (en) * 2013-04-12 2014-10-16 Nokia Corporation Harmonized inter-view and view synthesis prediction for 3d video coding
US20150215637A1 (en) * 2014-01-29 2015-07-30 Ecole De Technologie Superieure Method and system for rate-constrained search ordering
CN107888919A (en) * 2012-01-17 2018-04-06 杰尼普Pte有限公司 For exporting the device of reconstruction image
EP3334164A1 (en) * 2016-12-09 2018-06-13 Nokia Technologies Oy A method and an apparatus and a computer program product for video encoding and decoding
CN109842803A (en) * 2018-09-19 2019-06-04 华为技术有限公司 A kind of method and device of compression of images
US20190191168A1 (en) * 2017-12-19 2019-06-20 Google Llc Video quality and throughput control
CN111277828A (en) * 2018-12-04 2020-06-12 华为技术有限公司 Video encoding and decoding method, video encoder and video decoder

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3205532B2 (en) * 1997-12-04 2001-09-04 松下電器産業株式会社 Image processing method, image processing apparatus, and data storage medium
TW201028018A (en) * 2009-01-07 2010-07-16 Ind Tech Res Inst Encoder, decoder, encoding method and decoding method
US20170155905A1 (en) * 2015-11-30 2017-06-01 Intel Corporation Efficient intra video/image coding using wavelets and variable size transform coding
CN113613004A (en) * 2021-09-14 2021-11-05 百果园技术(新加坡)有限公司 Image encoding method, image encoding device, electronic device, and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102907101A (en) * 2010-05-27 2013-01-30 索尼公司 An image compression method with random access capability
JP2012238997A (en) * 2011-05-11 2012-12-06 Sony Corp Image processing device and image processing method
CN107888919A (en) * 2012-01-17 2018-04-06 杰尼普Pte有限公司 For exporting the device of reconstruction image
WO2014167179A1 (en) * 2013-04-12 2014-10-16 Nokia Corporation Harmonized inter-view and view synthesis prediction for 3d video coding
US20150215637A1 (en) * 2014-01-29 2015-07-30 Ecole De Technologie Superieure Method and system for rate-constrained search ordering
EP3334164A1 (en) * 2016-12-09 2018-06-13 Nokia Technologies Oy A method and an apparatus and a computer program product for video encoding and decoding
US20190191168A1 (en) * 2017-12-19 2019-06-20 Google Llc Video quality and throughput control
CN109842803A (en) * 2018-09-19 2019-06-04 华为技术有限公司 A kind of method and device of compression of images
CN111277828A (en) * 2018-12-04 2020-06-12 华为技术有限公司 Video encoding and decoding method, video encoder and video decoder

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韩从道: "基于H.264的视频快速压缩技术研究", 中国优秀硕士毕业论文 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023040600A1 (en) * 2021-09-14 2023-03-23 百果园技术(新加坡)有限公司 Image encoding method and apparatus, image decoding method and apparatus, electronic device, and medium
CN114337920A (en) * 2021-12-23 2022-04-12 中国农业银行股份有限公司 Code analysis method and device and electronic equipment
CN114337920B (en) * 2021-12-23 2024-03-26 中国农业银行股份有限公司 Code analysis method and device and electronic equipment
CN116527903A (en) * 2023-06-30 2023-08-01 鹏城实验室 Image shallow compression method and decoding method
CN116527903B (en) * 2023-06-30 2023-09-12 鹏城实验室 Image shallow compression method and decoding method

Also Published As

Publication number Publication date
WO2023040600A1 (en) 2023-03-23

Similar Documents

Publication Publication Date Title
US10200690B2 (en) Video decoder conformance for high dynamic range (HDR) video coding using a core video standard
KR101223983B1 (en) Bitrate reduction techniques for image transcoding
TWI431948B (en) Efficient coding and decoding of transform blocks
Wallace The JPEG still picture compression standard
US6031937A (en) Method and apparatus for video compression using block and wavelet techniques
US7050642B2 (en) Method and apparatus for video compression using microwavelets
CN101267563B (en) Adaptive variable-length coding
US8300698B2 (en) Signalling of maximum dynamic range of inverse discrete cosine transform
CN113613004A (en) Image encoding method, image encoding device, electronic device, and storage medium
JP2008527789A (en) Entropy encoding method
CN103098463A (en) Variable length coding of coded block pattern (CBP) in video compression
IL168511A (en) Apparatus and method for multiple description encoding
TWI705693B (en) Apparatus and method for vector-based entropy coding for display stream compression
US9451257B2 (en) Method and apparatus for image encoding and/or decoding and related computer program products
US20100002946A1 (en) Method and apparatus for compressing for data relating to an image or video frame
US6693961B1 (en) System and method of video frame memory reduction of video decoders
CN112672164B (en) Video compression system and method, and video decompression system and method
Nakachi et al. Lossless and near-lossless compression of still color images
TWI829424B (en) Decoding method, encoding method and apparatus
KR100620606B1 (en) Jpeg quantization table design method using r-d optimization
WO2022037464A1 (en) Video decoding method and apparatus, video coding method and apparatus, device, and storage medium
JPH0822063B2 (en) Image signal encoding device
FI116350B (en) A method, apparatus, and computer program on a transmission medium for encoding a digital image
KR950008640B1 (en) Image compression coding method and decoding method for bit fixation
TW202341739A (en) Image decoding methods, image coding method, and devices thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination