CN117135349A - Image encoding method, image decoding device, and storage medium - Google Patents

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

Info

Publication number
CN117135349A
CN117135349A CN202310884876.6A CN202310884876A CN117135349A CN 117135349 A CN117135349 A CN 117135349A CN 202310884876 A CN202310884876 A CN 202310884876A CN 117135349 A CN117135349 A CN 117135349A
Authority
CN
China
Prior art keywords
block
intra
current
current sub
sub
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
CN202310884876.6A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202310884876.6A priority Critical patent/CN117135349A/en
Publication of CN117135349A publication Critical patent/CN117135349A/en
Pending legal-status Critical Current

Links

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
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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

Abstract

The application discloses an image encoding method, an image decoding device and a computer storage medium, wherein the image encoding method comprises the following steps: acquiring a current block to be encoded, and dividing the current block into a plurality of current sub-blocks according to a preset dividing mode; carrying out gradient statistics on reference pixels of each current sub-block to obtain an intra-frame mode histogram of each current sub-block; selecting a corresponding intra mode based on the amplitude of the intra mode histogram of each current sub-block, and acquiring a predicted value of each current sub-block; and encoding the current block according to the predicted values of all the current sub-blocks to obtain the encoding code stream of the current block. The image coding method can consider the conditions of different current sub-blocks, select a proper intra-frame coding mode for each current sub-block, adapt to more various video contents and improve the image quality.

Description

Image encoding method, image decoding device, and storage medium
Technical Field
The present application relates to the field of image encoding technology, and in particular, to an image encoding method, an image decoding device, and a computer storage medium.
Background
Traditional image coding techniques are designed for human visual characteristics, and with the superior performance exhibited by deep neural networks in various machine vision tasks, such as image classification, object detection, semantic segmentation, etc., a large number of artificial intelligence applications based on machine vision emerge. In order to ensure that the performance of the machine vision task is not damaged due to the image coding process, a mode of analyzing before coding is adopted to meet the machine vision requirement, namely, lossless images are directly subjected to feature extraction through a neural network at an image acquisition end, then the extracted features are subjected to coding transmission, and a decoding end directly utilizes the decoded features to input the decoded features into a subsequent network structure so as to finish different machine vision tasks. Therefore, in order to save transmission bandwidth resources, it is necessary to study an image encoding method for machine vision.
Current feature coding algorithms derive the intra prediction mode of the current block by decoding intra mode derivation techniques, thereby reducing the bit rate used to express the prediction mode. However, since each current sub-block uses the same prediction mode, it is not flexible enough to accommodate more diverse video contents.
Disclosure of Invention
The application provides an image encoding method, an image decoding method, an image encoding device and a computer storage medium.
The application adopts a technical scheme that an image coding method is provided, and the image coding method comprises the following steps:
acquiring a current block to be encoded, and dividing the current block into a plurality of current sub-blocks according to a preset dividing mode;
carrying out gradient statistics on reference pixels of each current sub-block to obtain an intra-frame mode histogram of each current sub-block;
selecting a corresponding intra mode based on the amplitude of the intra mode histogram of each current sub-block, and acquiring a predicted value of each current sub-block;
and encoding the current block according to the predicted values of all the current sub-blocks to obtain the encoding code stream of the current block.
Wherein, after the gradient statistics is performed on the reference pixel of each current sub-block to obtain the intra-frame mode histogram of each current sub-block, the image encoding method further comprises:
determining the amplitude weight of each intra-frame mode according to the distance between the reference pixel of each current sub-block and the current sub-block;
and adjusting the amplitude value of each intra-frame mode in the intra-frame mode histogram by using the amplitude value weight.
Wherein the reference pixels comprise reconstructed pixels of a sub-block that has been reconstructed before the current sub-block and/or neighboring pixels of the current block.
Wherein the distance between the reference pixel of each current sub-block and the amplitude weight of each intra-frame mode are positively correlated.
Wherein the selecting a corresponding intra mode based on the magnitude of the intra mode histogram of each current sub-block, and obtaining the predicted value of each current sub-block, includes:
acquiring n intra modes corresponding to the first n maximum amplitudes in an intra mode histogram of each current sub-block;
acquiring the predicted sub-value of each current sub-block predicted by the n intra-frame modes and the preset m intra-frame modes respectively;
and carrying out weighted fusion on the n+m predicted sub-values to obtain the predicted value of each current sub-block.
Wherein, the image coding method further comprises:
setting a syntax identification for the current block;
wherein when the value of the syntax flag is 1, the current block is encoded by using the image encoding method of claim 1.
Another technical solution adopted by the present application is to provide an image decoding method, the image decoding method comprising:
acquiring a predicted value of a coded code stream of a current block;
decoding the predicted value according to the intra-frame mode of the current block and the reference pixel to obtain a reconstructed image of the current block;
wherein, the intra mode of the current block is determined by the image coding method.
Another technical scheme adopted by the application is to provide an image coding device, which comprises a memory and a processor coupled with the memory;
wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the image encoding method as described above.
Another technical scheme adopted by the application is to provide an image decoding device, which comprises a memory and a processor coupled with the memory;
wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the image decoding method as described above.
Another aspect of the present application is to provide a computer storage medium storing program data, which when executed by a computer, is configured to implement the image encoding method and/or the image encoding method as described above.
The beneficial effects of the application are as follows: the method comprises the steps that an image coding device obtains a current block to be coded, and the current block is divided into a plurality of current sub-blocks according to a preset dividing mode; carrying out gradient statistics on reference pixels of each current sub-block to obtain an intra-frame mode histogram of each current sub-block; selecting a corresponding intra mode based on the amplitude of the intra mode histogram of each current sub-block, and acquiring a predicted value of each current sub-block; and encoding the current block according to the predicted values of all the current sub-blocks to obtain the encoding code stream of the current block. The image coding method can consider the conditions of different current sub-blocks, select a proper intra-frame coding mode for each current sub-block, adapt to more various video contents and improve the image quality.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a schematic view of an intra prediction mode according to the present application;
FIG. 2 is a schematic illustration of filling of reference pixels in multiple reference lines provided by the present application;
fig. 3 is a schematic diagram of partitioning of the unit blocks of 4*8 and 8*4 provided by the present application;
FIG. 4 is a schematic diagram of the division of other sized cell blocks provided by the present application;
FIG. 5 is a schematic diagram of one embodiment of a reference pixel location provided by the present application;
FIG. 6 is a schematic diagram of magnitude computation of an intra mode histogram provided by the present application;
FIG. 7 is a schematic diagram of a DIMD weighted fusion calculation provided by the present application;
FIG. 8 is a flowchart of an embodiment of an image encoding method according to the present application;
FIG. 9 is a schematic overall flow chart of an image encoding method provided by the application;
FIG. 10 is a schematic diagram of an embodiment of a reference pixel selection scheme according to the present application;
FIG. 11 is a schematic diagram of another embodiment of a reference pixel selection scheme provided by the present application;
FIG. 12 is a flowchart of another embodiment of an image encoding method according to the present application;
FIG. 13 is a flowchart illustrating an embodiment of an image decoding method according to the present application;
FIG. 14 is a schematic diagram of an embodiment of an image encoding apparatus according to the present application;
fig. 15 is a schematic structural diagram of an embodiment of an image decoding apparatus according to the present application;
fig. 16 is a schematic structural diagram of an embodiment of a computer storage medium according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The image coding method provided by the application belongs to a part of intra-frame prediction, so that the intra-frame prediction is roughly described. First, a video is formed by the sequential play of a number of still images, each of which can be considered a frame. Since the pixel values of the similar pixels in a frame are usually relatively close, the color will not change suddenly, so the spatial correlation can be used for compression, and this technique is intra prediction. Intra prediction is to predict a pixel value of a current pixel according to pixel values (i.e., reference pixels) of pixels surrounding the current pixel in a frame of image. The current intra prediction modes include three types, DC, planar and a plurality of angle modes, where 2-N represent angle modes. In addition to the above modes, in the prior art, for the case that the correlation between the reference pixels adjacent to the long side of the non-square block is stronger than that between the reference pixels adjacent to the short side, some wide-angle modes are added, so that the reference pixels can be selected as the reference pixels adjacent to one side of the long side as much as possible. If N is taken 66, all intra prediction modes including the wide angle mode are as shown in fig. 1.
Referring specifically to fig. 1, where 2-66 are normal angle modes, angle modes-13-1 and 67-81 are wide angle modes, representing different predicted directions, and modes 18 and 50 are horizontal and vertical, respectively. The reference pixel positions are shown in fig. 2, and the current intra prediction technology adopts a multi-reference line technology, and a plurality of reference lines are arranged on the upper side and the left side of the current block and used for acquiring the reference pixels. The intra prediction process is roughly: the current pixel point finds out corresponding reference pixels on each reference line according to the direction pointed by the prediction mode, and if the reference pixels on each reference line are all integral pixel points, the integral pixel value on the reference line with the minimum cost value is selected as the predicted value of the current pixel; if a reference pixel on a certain reference line is a sub-pixel point, interpolation is needed to be carried out through the whole pixel points on the left and right (or upper and lower) sides of the sub-pixel point, the obtained values are compared with the cost value, and the reference pixel value with the minimum cost value is selected as the predicted value of the current pixel.
The sub-block division (ISP) mode flow in prior art intra prediction is generally: sub-block segmentation, reference pixel construction, filtering of reference pixels in ISP mode, construction of MPM list in ISP mode, prediction mode selection process. The sub-block is a block of the current intra prediction luminance CU that continues to be divided downward, and if the CU size is determined, the CU block continues to be divided, and the dividing conditions and dividing manner of the CU are described below.
(1) Partitioning condition of CU blocks
Only CU blocks larger than 4*4 are divided, with both 4*8 and 8*4 CU blocks divided into 2 sub-blocks and the other CU blocks divided into 4 sub-blocks.
(2) Subblock division method of CU block
As shown in fig. 3 and 4, the division of CU blocks of different sizes into sub-blocks is illustrated. The division mode is divided into two types of vertical and horizontal, each CU can be divided only once, vertical and horizontal division cannot be performed simultaneously under the same division, and each sub-block has the same size, and each sub-block contains 16 pixels at least, i.e., width×height > =16.
The forward order of the sub-blocks is top to bottom or left to right. In acquiring reference pixels in ISP mode, the prior art only uses the first reference line. When the horizontal segmentation is carried out, the reference pixels of the first sub-block are consistent with the original block, but the reference pixels above the rear sub-block are the last row of pixels after the reconstruction of the previous sub-block, and the left reference pixels are consistent with the original block; when the vertical segmentation is performed, the reference pixel of the first sub-block is consistent with the original block, but the left reference pixel of the rear sub-block is the last column of pixels after the reconstruction of the previous sub-block, and the upper reference pixel is consistent with the original block.
After determining the reference pixel filtering modes in different modes, the best prediction mode needs to be selected next. The intra mode candidate list of the ISP needs to be constructed before the best prediction mode is selected. The following describes the construction of an ISP intra prediction mode candidate list, which only uses the first reference line, and the MPM list is the corresponding MPM list in ISP intra prediction mode.
(1) Obtaining a list of cost values of non-ISP for the second roughing
(2) non-ISP three roughing stage (non-ISP computes rdcost cost for the last 5 patterns in MPM lists on the second and third reference lines)
ISP mode at this time, MPM [0] or MPM [1] (if L=A, only MPM [0] is inserted, MPM [0] and MPM [1] are inserted when L|=A, the positions of L and A blocks are shown in FIG. 5) are inserted into 6 preferred modes in the candidate list, and the repeated modes are combined to obtain ISP intra prediction mode candidate list isplist [ N1]. This stage also uses only the first reference line, so index is also 0.
(3) Four roughing stages
After the mode with the reference line index of 0 in the non-ISP intra-frame prediction mode candidate list is finely selected, a temporary list templist [ N2] is formed according to the rdcost from small to large, and finally the Planar mode, all angle modes according to the sequence of templist [ N2], DC mode in templist [ N2] and modes according to the sequence of isplist [ N1] which are different from the previous modes are sequentially arranged in the ISP intra-frame prediction mode candidate list.
(5) Fine selection stage
The most finely selected modes of ISP are set to 16 (16 is 4 if LFNST is used), the order of ISP candidate list is adjusted, non-ISP modes are placed in front of the ISP candidate list, the rdcost cost of each mode in the list and BDPCM mode is compared, a minimum rdcost cost value is selected, and the mode corresponding to the cost value is the optimal intra-frame prediction mode.
DIMD (Decoder-side Intra Mode Derivation, decoded intra mode derivation) technique introduction:
the idea of the DIMD technique is to derive an intra prediction mode of the current block using neighboring reconstructed pixels, thereby reducing the bit rate for expressing the prediction mode. In addition, to improve the performance of the DIDM, the technique performs weighted fusion of the derived prediction mode and Planar mode.
The specific derivation of DIMD is as follows:
1. a histogram is derived from reconstructed neighboring pixels of the template region adjacent to the current block using a sobel operator.
As shown in the left side of fig. 6, the region a is the current block to be predicted, and the region B is the template region, where t=3, i.e., the thickness of the template region is 3.
In the histogram statistics process, first, a sobel operator (sobel operator) window slides on the adjacent pixel to be counted, that is, the yellow pixel C in fig. 6. The sobel operator includes a 3x3 horizontal sobel filter and a vertical sobel filter, as shown in the right side of fig. 6, for calculating the horizontal gradient Gx and the vertical gradient Gy, respectively. Then, the prediction angle of the corresponding pixel is obtained by atan (Gy/Gx), and converted into one of 65 prediction angle modes in the multifunctional video coding (Versatile Video Coding, VVC). Finally, the sum of the absolute values of Gx and Gy is calculated as the accumulated magnitude of the pattern.
2. And selecting two intra-frame modes with the largest amplitude in the histogram to be fused with the Planar mode.
And deducing two intra modes with maximum amplitude according to the histogram obtained by statistics, and carrying out weighted fusion on the predicted values of the two modes and the predicted value of the Planar mode. Where Planar weights are fixed at 21/64, the weights of the other two modes are derived from the gradient magnitudes, and the remaining 43/64 weights are assigned according to the magnitudes of the two modes, as shown in FIG. 7.
The application introduces the DIMD technology in ISP mode, can save bit rate expenditure for expressing the prediction mode and improve compression performance. The different prediction modes available for each sub-block of the ISP can adapt to more various video contents and improve the image quality.
Referring to fig. 8 and fig. 9, fig. 8 is a flow chart of an embodiment of an image encoding method according to the present application, and fig. 9 is an overall flow chart of the image encoding method according to the present application.
As shown in fig. 8, the image encoding method of the embodiment of the present application includes the steps of:
step S11: and obtaining a current block to be encoded, and dividing the current block into a plurality of current sub-blocks according to a preset dividing mode.
In an embodiment of the present application, an image encoding apparatus determines a current block to be encoded and a current sub-block thereof. In other embodiments, the current block to be encoded may also be obtained in the ISP mode, and then the current block is divided into a plurality of current sub-blocks according to a unit block division mode preset in the ISP mode, and finally the image encoding method of the present application is executed for each current sub-block.
The reference pixel selection of the DIMD in ISP mode is achieved by the new sub-mode in ISP mode. Specifically, the image encoding device may select the reference pixels of each current sub-block, and allow each current sub-block to perform gradient statistics by using an edge detection operator, that is, the intra-frame modes obtained by final calculation of each current sub-block may be different.
It should be noted that, the edge detection operators adopted in the present application include, but are not limited to: sobel operator, isotopic Sobel operator, roberts operator, prewitt operator, laplacian operator, canny operator, etc., and Sobel operator, i.e., sobel operator, will be described below as an example.
Step S12: and carrying out gradient statistics on the reference pixels of each current sub-block to obtain an intra-frame mode histogram of each current sub-block.
In the embodiment of the present application, since the DIMD process needs to use the sobel operator to perform gradient calculation, multiple reference lines are required for selecting reference pixels based on DIMD in the present application, and further, multiple reference lines are required for ISP scheme based on DIMD, and for each current sub-block, the number of reference lines used n > =3.
For reference pixel selection, taking as an example the DIMD-based ISP scheme, including but not limited to the following:
A. and performing a DIMD process by using only n0 reference lines adjacent to the complete current block, and using the DIMD derived intra modes for all the current sub-blocks, namely, the intra modes of all the current sub-blocks are consistent, except that the reference pixels used by each current sub-block in prediction are different.
B. Each current sub-block only uses n1 reference lines adjacent to each other to perform the DIMD process, and m current sub-blocks only need to perform m current sub-block DIMD processes, so that intra-frame modes derived by each current sub-block DIMD can be different. For example, sub-block 2 participates in the DIMD process with some reconstructed pixels in sub-block 1 that are adjacent to itself, and as shown in fig. 10, one example is that the reference line selected by sub-block 1 is a dashed reference line, and the reference line selected by sub-block 2 is a solid reference line.
C. Each current sub-block not only utilizes n reference lines adjacent to each other to perform the DIMD process, but also can perform the DIMD process with reconstructed pixels in previous sub-blocks and/or with partial reference pixels adjacent to the complete current block. An example is shown in fig. 11 below, where sub-block 3 uses its own adjacent 3 reference lines, including partially reconstructed pixels in sub-block 2, and partially reference pixels in sub-block 1, and partially reference pixels above sub-block 1 and sub-block 2.
Further, since the correlation of each reference pixel range to the current sub-block is different, the pattern histogram magnitude counted from the reference pixel range having stronger correlation with the current sub-block should take a larger weight. Therefore, based on the above technology, the present application provides an image encoding method for implementing statistical improvement of a pattern histogram, and referring specifically to fig. 12, fig. 12 is a flow chart of another embodiment of the image encoding method provided by the present application.
As shown in fig. 12, the image encoding method of the embodiment of the present application includes the steps of:
step S21: and determining the amplitude weight of each intra-frame mode according to the distance between the reference pixel of each current sub-block and the current sub-block.
In the embodiment of the application, after the selection of the reference pixel is performed and the gradient statistics is performed on the selected reference pixel region, the corresponding intra-frame mode histogram needs to be derived.
Specifically, the manner in which the intra-mode histogram is derived employed by the present application includes, but is not limited to:
a. and directly carrying out the amplitude statistics of the histogram by using all the selected reference pixels.
b. The mode histogram magnitude, which is counted when at least some of the pixels in the previous sub-block are used as reference pixels, may be multiplied by a weight coefficient greater than 1 because the correlation between the previous sub-block and the current sub-block is stronger. And the closer the previous sub-block is to the current sub-block, the larger the weight coefficient.
In a specific embodiment, the image encoding device selects the scheme b described above, and also in the case of fig. 11, assuming that the sub-block 3 is the current sub-block, the solid line reference line range is closer to the current sub-block 3, and the broken line reference line range is further.
The intra modes derived by reference pixel statistics with solid reference lines are: { Pattern 20, pattern 19, pattern 18}, magnitudes are respectively: {30, 20, 10}; the intra modes derived by reference pixel statistics using the dashed reference line are: { Pattern 40, pattern 20, pattern 19}, histogram magnitudes are respectively: {100, 90, 80}.
Let the mode histogram amplitude derived from the solid line reference line range be multiplied by the weight coefficient 1.5, and the mode histogram amplitude derived from the dashed line reference line range be multiplied by the coefficient 1.2, then the final synthetic mode has: { Pattern 40, pattern 20, pattern 19, pattern 18}, corresponding magnitudes are: {100, 153, 126, 10}.
The subsequent histogram amplitude-based mode selection and weighting process is consistent with the prior art, namely, the mode 20 and the mode 19 are selected, and the predicted values corresponding to the planar mode are subjected to predicted value weighted fusion.
Step S22: and adjusting the amplitude of each intra-frame mode in the intra-frame mode histogram by using the amplitude weight.
In the embodiment of the present application, the image encoding apparatus adjusts the amplitude of each intra mode in the intra mode histogram by using the amplitude weight of each intra mode determined in step S21, and can consider the correlation between the reference pixel and the current block by referring to the amplitude weight set by the pixel distance, thereby improving the encoding rate.
Step S13: and selecting a corresponding intra mode based on the amplitude of the intra mode histogram of each current sub-block, and acquiring a predicted value of each current sub-block.
In the embodiment of the application, an image coding device acquires n intra modes corresponding to the first n maximum amplitudes in an intra mode histogram of each current sub-block and preset m intra modes; and then, respectively predicting the predictor values of the current sub-block by using n+m intra modes, and carrying out weighted fusion on the n+m predictor values to obtain the predictor value of each current sub-block.
It should be noted that, when n+m predictors are weighted and fused, weights of predictors corresponding to m intra modes are preset, and weights of predictors corresponding to n intra modes are distributed according to magnitudes in the histogram of the intra modes.
Step S14: and encoding the current block according to the predicted values of all the current sub-blocks to obtain an encoding code stream of the current block.
In the embodiment of the present application, when the image encoding device directly uses the DIMD mode to replace the existing ISP mode, no additional syntax is required, and if the DIMD mode is used as a sub-mode in the ISP mode and competes with the conventional ISP mode, an additional syntax is required to transmit the mode, indicating whether to use the DIMD-based ISP mode of the present application.
Specifically, a syntax flag ISP_DIMD_mode needs to be set at the unit block (CU) level, ISP_DIMD_mode equal to 0 represents the use of DIMD mode, and ISP_DIMD_mode equal to 1 represents the use of DIMD-based ISP mode.
In the embodiment of the application, an image coding device acquires a current block to be coded, and divides the current block into a plurality of current sub-blocks according to a preset dividing mode; carrying out gradient statistics on reference pixels of each current sub-block to obtain an intra-frame mode histogram of each current sub-block; selecting a corresponding intra mode based on the amplitude of the intra mode histogram of each current sub-block, and acquiring a predicted value of each current sub-block; and encoding the current block according to the predicted values of all the current sub-blocks to obtain the encoding code stream of the current block. The image coding method can consider the conditions of different current sub-blocks, select a proper intra-frame coding mode for each current sub-block, adapt to more various video contents and improve the image quality.
The application introduces the DIMD technology in ISP mode, can save bit rate expenditure for expressing the prediction mode and improve compression performance. The different prediction modes available for each sub-block of the ISP can adapt to more various video contents and improve the image quality.
The application introduces the DIMD technology in ISP mode, can save bit rate expenditure for expressing the prediction mode and improve compression performance.
With continued reference to fig. 13, fig. 13 is a flowchart illustrating an embodiment of an image decoding method according to the present application.
As shown in fig. 13, the image decoding method of the embodiment of the present application includes the steps of:
step S31: and obtaining the predicted value of the coded code stream of the current block.
Step S32: and decoding the predicted value according to the intra-frame mode of the current block and the reference pixel to obtain a reconstructed image of the current block.
It should be noted that, in the embodiment of the present application, the intra mode is determined by the image encoding method shown in fig. 8, and the encoded code stream is transmitted to the image decoding apparatus to reconstruct the image.
The above embodiments are only one common case of the present application, and do not limit the technical scope of the present application, so any minor modifications, equivalent changes or modifications made to the above matters according to the scheme of the present application still fall within the scope of the technical scheme of the present application.
With continued reference to fig. 14, fig. 14 is a schematic structural diagram of an image encoding device according to an embodiment of the application. The image encoding apparatus 500 of the embodiment of the present application includes a processor 51, a memory 52, an input-output device 53, and a bus 54.
The processor 51, the memory 52, and the input/output device 53 are respectively connected to the bus 54, and the memory 52 stores program data, and the processor 51 is configured to execute the program data to implement the image encoding method described in the above embodiment.
In an embodiment of the present application, the processor 51 may also be referred to as a CPU (Central Processing Unit ). The processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general purpose processor, a digital signal processor (DSP, digital Signal Process), an application specific integrated circuit (ASIC, application Specific Integrated Circuit), a field programmable gate array (FPGA, field Programmable Gate Array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The general purpose processor may be a microprocessor or the processor 51 may be any conventional processor or the like.
With continued reference to fig. 15, fig. 15 is a schematic diagram of an image decoding apparatus according to an embodiment of the application. The image decoding apparatus 600 of the embodiment of the present application includes a processor 61, a memory 62, an input-output device 63, and a bus 64.
The processor 61, the memory 62, and the input/output device 63 are respectively connected to the bus 64, and the memory 62 stores program data, and the processor 61 is configured to execute the program data to implement the image decoding method described in the above embodiment.
The present application further provides a computer storage medium, and referring to fig. 16, fig. 16 is a schematic structural diagram of an embodiment of the computer storage medium provided by the present application, in which program data 71 is stored in the computer storage medium 700, and the program data 71, when executed by a processor, is used to implement the image encoding method and/or the image decoding method of the above embodiments.
Embodiments of the present application may be stored in a computer readable storage medium when implemented in the form of software functional units and sold or used as a stand alone product. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and the equivalent structures or equivalent processes disclosed in the specification and the drawings are used in the same way or directly or indirectly in other related technical fields, which are also included in the scope of the application.

Claims (10)

1. An image encoding method, characterized in that the image encoding method comprises:
acquiring a current block to be encoded, and dividing the current block into a plurality of current sub-blocks according to a preset dividing mode;
carrying out gradient statistics on reference pixels of each current sub-block to obtain an intra-frame mode histogram of each current sub-block;
selecting a corresponding intra mode based on the amplitude of the intra mode histogram of each current sub-block, and acquiring a predicted value of each current sub-block;
and encoding the current block according to the predicted values of all the current sub-blocks to obtain the encoding code stream of the current block.
2. The image encoding method according to claim 1, wherein,
after the gradient statistics is performed on the reference pixels of each current sub-block to obtain the intra-frame mode histogram of each current sub-block, the image coding method further comprises:
determining the amplitude weight of each intra-frame mode according to the distance between the reference pixel of each current sub-block and the current sub-block;
and adjusting the amplitude value of each intra-frame mode in the intra-frame mode histogram by using the amplitude value weight.
3. The image encoding method according to claim 1 or 2, wherein,
the reference pixels include reconstructed pixels of a previously reconstructed sub-block of the current sub-block and/or neighboring pixels of the current block.
4. The image encoding method according to claim 3, wherein,
the distance between the reference pixel of each current sub-block and the amplitude weight of each intra-frame mode are positively correlated.
5. The image encoding method according to claim 4, wherein,
the selecting a corresponding intra mode based on the magnitude of the intra mode histogram of each current sub-block, and obtaining the predicted value of each current sub-block includes:
acquiring n intra modes corresponding to the first n maximum amplitudes in an intra mode histogram of each current sub-block;
acquiring the predicted sub-value of each current sub-block predicted by the n intra-frame modes and the preset m intra-frame modes respectively;
and carrying out weighted fusion on the n+m predicted sub-values to obtain the predicted value of each current sub-block.
6. The image encoding method according to claim 1, wherein,
the image encoding method further includes:
setting a syntax identification for the current block;
wherein when the value of the syntax flag is 1, the current block is encoded by using the image encoding method of claim 1.
7. An image decoding method, characterized in that it comprises the steps of,
acquiring a predicted value of a coded code stream of a current block;
decoding the predicted value according to the intra-frame mode of the current block and the reference pixel to obtain a reconstructed image of the current block;
wherein the intra mode of the current block is determined by the image encoding method of any one of claims 1 to 6.
8. An image encoding device, comprising a memory and a processor coupled to the memory;
wherein the memory is for storing program data and the processor is for executing the program data to implement the image encoding method as claimed in any one of claims 1-6.
9. An image decoding device, comprising a memory and a processor coupled to the memory;
wherein the memory is for storing program data and the processor is for executing the program data to implement the image decoding method of claim 7.
10. A computer storage medium for storing program data which, when executed by a computer, is adapted to carry out the image encoding method of any one of claims 1-6 and/or the image decoding method of claim 7.
CN202310884876.6A 2023-07-18 2023-07-18 Image encoding method, image decoding device, and storage medium Pending CN117135349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310884876.6A CN117135349A (en) 2023-07-18 2023-07-18 Image encoding method, image decoding device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310884876.6A CN117135349A (en) 2023-07-18 2023-07-18 Image encoding method, image decoding device, and storage medium

Publications (1)

Publication Number Publication Date
CN117135349A true CN117135349A (en) 2023-11-28

Family

ID=88853499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310884876.6A Pending CN117135349A (en) 2023-07-18 2023-07-18 Image encoding method, image decoding device, and storage medium

Country Status (1)

Country Link
CN (1) CN117135349A (en)

Similar Documents

Publication Publication Date Title
Li et al. A deep learning approach for multi-frame in-loop filter of HEVC
US11095894B2 (en) Method for encoding/decoding image, and device therefor
CN1179302C (en) Method and apparatus for motion estimating using block matching in orthogonal transformation field
CN103404137B (en) The method and apparatus of effective sample adaptive equalization
JP4335440B2 (en) Detection of conversion in Videokens
US7095903B2 (en) Method and apparatus for visual lossless image syntactic encoding
EP1146748A2 (en) A method of directional filtering for post-processing compressed video
EP2378775B1 (en) Image decoding device and image coding device
US20050147319A1 (en) System and method for removing ringing artifacts
JPH08186714A (en) Noise removal of picture data and its device
EP4006824A1 (en) Image processing method and apparatus, mobile terminal video processing method and apparatus, device and medium
CN109587491A (en) A kind of intra-frame prediction method, device and storage medium
CN102754440B (en) Method for encoding images, picture coding device and camera system
CN108347602B (en) Method and apparatus for lossless compression of video data
CN111031315B (en) Compressed video quality enhancement method based on attention mechanism and time dependence
JP4235162B2 (en) Image encoding apparatus, image encoding method, image encoding program, and computer-readable recording medium
CN113674165A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
JP5364264B2 (en) Location detection of block defect using neural network
CN111432212B (en) Intra-frame division method and system based on texture features and storage medium
KR20060111528A (en) Detection of local visual space-time details in a video signal
JP2007027980A (en) Decoding apparatus and coding apparatus
CN117135349A (en) Image encoding method, image decoding device, and storage medium
CN106878754A (en) A kind of 3D video depths image method for choosing frame inner forecast mode
US8175150B1 (en) Methods and/or apparatus for implementing rate distortion optimization in video compression
CN113518220B (en) Intra-frame division method, device and medium based on guide filtering and edge detection

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