WO2021042300A1 - Procédé de codage, procédé de décodage, dispositif de codage et dispositif de décodage - Google Patents
Procédé de codage, procédé de décodage, dispositif de codage et dispositif de décodage Download PDFInfo
- Publication number
- WO2021042300A1 WO2021042300A1 PCT/CN2019/104428 CN2019104428W WO2021042300A1 WO 2021042300 A1 WO2021042300 A1 WO 2021042300A1 CN 2019104428 W CN2019104428 W CN 2019104428W WO 2021042300 A1 WO2021042300 A1 WO 2021042300A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- prediction mode
- target pixel
- pixel
- image block
- value
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
Definitions
- This application relates to the field of image coding and decoding, and more specifically, to coding methods, decoding methods, and coding devices and decoding devices.
- Image coding technology can compress image data to facilitate the storage and transmission of image data.
- image coding technology is widely used in various fields, such as the field of mobile terminals and the field of UAV image transmission.
- the principle of the traditional differential coding is to quantize and encode the residual value of the analog signal amplitude sampling, that is, use the past sample value to predict the current sample value and encode their residual value .
- this coding method is based on the quantization of the residual value, which may lead to errors, and further, it is easy to cause errors to accumulate.
- the encoding method, decoding method, encoding device, and decoding device provided by the embodiments of the present application can avoid errors, and further, can avoid the accumulation of errors.
- an encoding method to generate an image block of a target image; obtain multiple residual values of a first target pixel of the image block in multiple prediction modes, the multiple prediction modes including pre-based At least two of a set prediction mode, a left prediction mode, and an upward prediction mode; the first prediction mode is determined according to the residual value; and the first target pixel is coded based on the first prediction mode.
- the first prediction mode in the process of determining the prediction mode of the first target pixel, the first prediction mode may be determined from the multiple prediction modes based on the multiple residual values obtained by the multiple prediction modes Since the first prediction mode is determined based on the residual value from multiple prediction modes, the prediction mode of the target pixel can be flexibly selected, and the error caused by the quantization of the residual value of the differential coding can be avoided as much as possible, thereby improving The prediction accuracy of differential coding can further avoid the problem of error accumulation.
- another encoding method is provided to generate an image block of a target image; according to a prediction mode based on a preset value, the residual value of the first target pixel of the image block and the residual value of the first target pixel are determined
- the index value of the reference pixel, the reference pixel is selected from the prediction table and the absolute value of the difference with the first target pixel is less than or equal to the first threshold, or the reference pixel is selected from the The pixel selected in the prediction table and the absolute value of the difference with the first target pixel is the smallest; and the first target pixel is encoded based on the index value and the residual value.
- the first target pixel is encoded by the residual value and the index value of the reference pixel.
- the residual value and the index value are used for encoding. Minimize the problem of large bit overhead caused by directly encoding the target pixel. Further, the error caused by the quantization of the residual value of the differential encoding can be avoided, so that the prediction accuracy of the differential encoding can be improved, and the prediction accuracy of the differential encoding can be improved, and further can be avoided The problem of error accumulation.
- a decoding method is provided to obtain the coded bit of the first target pixel of the image block of the target image; according to the coded bit, the first prediction mode is determined from multiple prediction modes, wherein the multiple The prediction modes include at least two of a prediction mode based on a preset value, a left prediction mode, and an upward prediction mode; the first target pixel is decoded based on the first prediction mode.
- another decoding method is provided to obtain the encoded bit of the first target pixel of the image block of the target image; according to the encoded bit, the residual of the first target pixel is determined based on the prediction mode of the preset value.
- a difference and an index value of a reference pixel of the first target pixel where the reference pixel is a pixel selected from a prediction table and whose absolute value of the difference with the first target pixel is less than or equal to a first threshold, Alternatively, the reference pixel is a pixel selected from the prediction table and having the smallest absolute value of the difference with the first target pixel; based on the index value and the residual value, the first target pixel is The target pixel is decoded.
- an encoding device configured to execute the foregoing first aspect or the method in any possible implementation manner of the first aspect.
- the device includes a module for executing the above-mentioned first aspect or any possible implementation of the first aspect.
- a sixth aspect another encoding device is provided, which is used to execute the foregoing second aspect or the method in any possible implementation manner of the second aspect.
- the device includes a module for executing the foregoing second aspect or any possible implementation of the second aspect.
- a decoding device configured to execute the foregoing third aspect or the method in any possible implementation manner of the third aspect.
- the device includes a module for executing the foregoing third aspect or any possible implementation of the third aspect.
- another decoding device is provided, which is configured to execute the foregoing fourth aspect or the method in any possible implementation manner of the fourth aspect.
- the device includes a module for executing the foregoing fourth aspect or the method in any possible implementation manner of the fourth aspect.
- an image processing system including a processor and a memory.
- the memory is used to store a computer program
- the processor is used to call and run the computer program stored in the memory, and execute the methods in the first aspect to the fourth aspect described above or their respective implementation modes.
- a chip is provided, which is used to implement the methods in the first to fourth aspects or their respective implementation manners.
- the chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the chip executes the methods in the first to fourth aspects described above or their respective implementation manners.
- a computer-readable storage medium for storing a computer program, and the computer program includes any possible implementation manners for executing the first aspect to the second aspect or the first aspect to the second aspect Method of instruction.
- a computer-readable storage medium for storing a computer program, and the computer program includes any possible implementation manner for executing the third aspect to the fourth aspect or the third aspect to the fourth aspect Method of instruction.
- a computer program product including computer program instructions that cause a computer to execute the methods in the foregoing first aspect to the second aspect or the implementation manners of the first aspect to the second aspect.
- a computer program product including computer program instructions that cause a computer to execute the methods in the implementation manners of the third aspect to the fourth aspect or the third aspect to the fourth aspect.
- a computer program which when running on a computer, causes the computer to execute the method in any possible implementation manner of the first aspect to the second aspect or the first aspect to the second aspect.
- a computer program which when running on a computer, causes the computer to execute the method in any one of the above-mentioned third aspect to the fourth aspect or the third aspect to the fourth aspect.
- Figure 1 is an example diagram of the relationship between image frames, strips, components, and code streams
- Figure 2 is a schematic diagram of the general architecture of the image processing system
- FIG. 3 is a schematic flowchart of an encoding method provided by an embodiment of the present application.
- FIG. 4 is a schematic flowchart of an encoding method provided by another embodiment of the present application.
- FIG. 5 is a schematic flowchart of a decoding method provided by an embodiment of the present application.
- FIG. 6 is a schematic flowchart of a decoding method provided by another embodiment of the present application.
- FIG. 7 is a schematic diagram of an encoding device provided by an embodiment of the present application.
- FIG. 8 is a schematic diagram of an encoding device provided by another embodiment of the present application.
- FIG. 9 is a schematic diagram of a decoding device provided by an embodiment of the present application.
- FIG. 10 is a schematic diagram of a decoding device provided by another embodiment of the present application.
- Fig. 11 is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of a chip provided by an embodiment of the present application.
- the image encoding device usually performs encoding in units of image blocks. This image block may sometimes be called a slice.
- a frame of image may include one or more bands, and each band may include multiple components of the image.
- each band may include multiple components of the image.
- the format of the image frame is 4K
- the format of the image frame is YUV.
- the size of the 4K format image frame can be 4096 ⁇ 2160.
- the image frame can be divided in units of 128 ⁇ 16, resulting in a total of 4320 slices, and each slice can be coded and decoded independently.
- the pixels in the image frame usually contain multiple components (Y component, U component, and V component), as shown in Figure 1 (c).
- a bitstream can be obtained.
- the code stream includes a frame header of the image frame, and the frame data corresponding to the frame header may include code stream information of 4320 sub-streams.
- the sub-stream can contain the header file and Y, U, and V components corresponding to the code stream information.
- the Y component represents the brightness, that is, the grayscale value
- the U component and the V component represent the chromaticity, which is used to describe the color and saturation, and is used to specify the color of the pixel.
- Figure 2 is an example of the overall framework of the image processing system.
- the image processing system 20 may include an image sensor 22 (sensor), an image signal processor (image signal processor, ISP) 24, a memory 26, and an encoding device 28.
- the image processing system 20 may further include an external memory 29.
- the image sensor 22 can be used to collect image signals.
- the image sensor 22 may be, for example, an image sensor based on Complementary Metal Oxide Semiconductor (CMOS), or an image sensor based on Charge Coupled Device (CCD).
- CMOS Complementary Metal Oxide Semiconductor
- CCD Charge Coupled Device
- the image signal processor 24 can be used to process the image signal collected by the image sensor 22 to obtain an image frame in a corresponding format.
- the memory 26 may be, for example, Double Data Rate (DDR).
- DDR Double Data Rate
- the memory 26 can be used to store image frames output by the image signal processor 24.
- the encoding device 28 can be used to encode the image frames stored in the memory 26 to compress the data amount of the image frames, thereby facilitating the storage and transmission of the image frames.
- the external memory 29 may be, for example, a solid state disk (Solid State Disk, SSD), or other types of storage devices.
- SSD Solid State Disk
- the encoding method 300 provided by the embodiment of the present application will be described in detail below with reference to FIG. 3.
- the encoding method 300 provided in the embodiment of the present application may be executed by an encoding device, and the encoding device may be, for example, the encoding device 28 described above. As shown in Fig. 3, the encoding method 300 may include steps 310-340.
- the image may be divided into at least one image block, and each image block may include multiple pixels.
- an image block may be called a tile or other names, but this embodiment of the present application does not limit this.
- the regions of different image blocks in the image may have the same or different lengths.
- the height of the image block may be 1 pixel or multiple pixels, which is not limited in the embodiment of the present application.
- an image may be divided into a plurality of image blocks according to the first preset size, and the image blocks that are not located at the border of the image may have the same size.
- the image block located on the image boundary is limited by the image size. Its size can be determined by the first preset size and the image size. It may be the same size as other image blocks not located on the image boundary, or may be different from the size of other image blocks. the same. For example, assuming that the image length is 800 pixels, and the first preset size is 64 pixels, the image can be divided into 13 image blocks in the order from left to right, where the length of the first to the twelfth image blocks It can be 64 pixels, and the 13th image block is located at the image boundary. If the length of the image block is still 64 pixels, the image block will exceed the image boundary. At this time, the length of the 13th image block can be set There are 22 pixels, but the embodiment of the present application is not limited to this.
- different segments in the image block may have the same or different lengths.
- one image block may be divided into multiple segments according to the second preset size, and each segment may include at least one pixel. Segments that are not located at the boundary of image blocks can have the same size, and segments located at the boundary of image blocks are limited by the size of the image block, and their size may be the same or different from the sizes of other segments that are not located at the boundary of image blocks. Make a limit.
- the image block for generating the target image in the embodiment of the present application may include the image block representing the luminance channel and the image block representing the chrominance channel of the generated target image.
- the multiple prediction modes including a prediction mode based on a preset value, a left prediction mode, and an upward prediction mode. At least two.
- the first target pixel in the embodiment of the present application may include one pixel or multiple pixels, which is not specifically limited in the present application.
- the residual value in the embodiment of the present application may be the difference between each pixel in the first target pixel and the reference pixel in multiple prediction modes.
- the first target pixel is encoded based on the first prediction mode
- the encoded bits may include the bit position of the first prediction mode, the bit position of the residual value of the first target pixel, and the first target pixel
- the bit position of the sign of the residual value for example, the sign of the residual value, etc.
- the first prediction mode in the process of determining the prediction mode of the first target pixel, the first prediction mode may be determined from the multiple prediction modes based on the multiple residual values obtained by the multiple prediction modes Since the first prediction mode is determined based on the residual value from multiple prediction modes, the prediction mode of the target pixel can be flexibly selected, and the error caused by the quantization of the residual value of the differential coding can be avoided as much as possible, thereby improving The prediction accuracy of differential coding can further avoid the problem of error accumulation.
- the sources of the reference pixels on which the residual values obtained based on different prediction modes of the multiple prediction modes are based are different.
- the reference pixel of the prediction mode based on the preset value is a pixel selected from a prediction table and whose absolute value of the difference with the first target pixel is less than or equal to a first threshold;
- the reference pixel of the prediction mode based on the preset value is a pixel selected from the prediction table and the absolute value of the difference with the first target pixel is the smallest, and the index value of the reference pixel is changed Encode to code stream.
- the reference pixel of the left prediction mode is a pixel on the left side of the first target pixel and adjacent to the first target pixel.
- the reference pixel of the upward prediction mode is a pixel above and adjacent to the first target pixel.
- the prediction mode based on the preset value in the embodiment of the present application may be a table look-up prediction mode.
- the residual value obtained may be different.
- the first target pixel includes one pixel
- the pixel value of the first target pixel is 100
- it can be selected from the prediction table, and at the same time, If the absolute value of the difference between the pixel value 100 of the first target pixel is less than or equal to the first threshold value, if the first threshold value is 4, a pixel in the range of 96-104 can be selected from the prediction table as the first target pixel Reference pixels.
- the prediction mode based on the preset value can be selected from the prediction table. If the prediction table, the pixel value of the first target pixel and the reference The minimum absolute value of the pixel difference is 3, then the pixel corresponding to the absolute value of the difference 3 can be used as the reference pixel; if the minimum absolute value difference of the reference pixel of the first target pixel in the prediction table is predicted If it is 5, the pixel corresponding to the absolute value of 5 can be used as the reference pixel.
- This implementation can avoid the problem of no reference pixels meeting preset conditions in the prediction table.
- the left prediction mode if the pixel value of the first target pixel is 100, and the pixel value located to the left of the first target pixel and adjacent to the first target pixel is 97, then the first target obtained based on the left prediction mode The residual value of the pixel is 3.
- the residual value of the first target pixel obtained based on the upward prediction mode is 102.
- the difference is -2.
- multiple prediction modes may include a prediction mode based on a preset value, a left prediction mode, and an upward prediction mode.
- multiple prediction modes include different modes, which will be described in detail below.
- YUV formats can include YUV444, YUV422, and YUV420.
- YUV444 means complete sampling;
- YUV422 means that horizontal sampling is 2:1, and vertical sampling is full sampling;
- YUV420 means that horizontal sampling is 2:1, and vertical sampling is 2:1. It should be understood that in the embodiments of the present application, the YUV format is only an example for illustration, and other formats may also be used, and the present application should not be particularly limited.
- the image block includes a Y-channel image block. If the first target pixel is a pixel other than the first n pixels in the first row of the Y-channel image block, the multiple The prediction mode includes: a prediction mode based on a preset value and a left prediction mode.
- the image block includes a Y-channel image block. If the first target pixel is the first m pixels of a row other than the first row of the Y-channel image block, the multiple The prediction mode includes: a prediction mode based on a preset value and an upward prediction mode.
- the image block includes a Y-channel image block, and if the first target pixel is a row other than the first row of the Y-channel image block, excluding the first m pixels Pixel, multiple prediction modes include: prediction mode based on preset values, upward prediction mode, and left prediction mode.
- the residual values of the first target pixel in multiple prediction modes can be used to determine the first prediction mode from the multiple prediction modes.
- the first target pixel is a pixel other than the first n pixels in the first row of the image block
- the first target pixel can be predicted based on the preset value of the prediction mode and the left prediction mode, so that the first target pixel can be predicted based on
- the first prediction mode is determined from the prediction mode of the preset value and the residual value obtained based on the left prediction mode, and the first target pixel may be encoded further based on the first prediction mode.
- the first target pixel is the first m pixels of a line other than the first line of the image block
- the first target pixel can be predicted based on the preset value prediction mode and the upward prediction mode, so that the prediction based on the preset value
- the first prediction mode is determined from the mode and the residual value obtained based on the upward prediction mode, and further the first target pixel may be encoded based on the first prediction mode.
- the upward prediction mode may include: For the first p pixels of the line other than the first line, the upward prediction mode can be used; for the non-first p pixels of the line other than the first line, the upward prediction mode can be used, or the leftward prediction mode can be used, where p ⁇ m, this application does not specifically limit this.
- the upward prediction mode may be adopted, and the upward prediction mode may include: For one pixel, the upward prediction mode can be used; for the non-first pixel in the rows other than the first row, the upward prediction mode or the left prediction mode can also be used, which is not specifically limited in this application.
- the first target pixel is a pixel other than the first m pixels of a line other than the first line of the image block
- the first target can be predicted based on the prediction mode of the preset value, the upward prediction mode, and the left prediction mode Pixel
- the first prediction mode can be determined from the residual values obtained based on the preset value prediction mode, the upward prediction mode, and the left prediction mode, and further, the first target pixel can be encoded based on the first prediction mode.
- n and m may be the same value or different values, which is not specifically limited in the present application.
- the image block includes an image block of the UV channel.
- the color coding format of the image block is YUV444 or YUV422
- if the first target pixel is the first of the image block of the UV channel For pixels other than the first n pixels of the row, multiple prediction modes include: a prediction mode based on a preset value and a left prediction mode.
- the image block includes an image block of the UV channel.
- the color coding format of the image block is YUV444 or YUV422
- multiple prediction modes include: a prediction mode based on a preset value and an upward prediction mode.
- the image block includes an image block of the UV channel.
- the color coding format of the image block is YUV444 or YUV422
- if the first target pixel is the image block of the UV channel For pixels other than the first m pixels of rows other than the first row, multiple prediction modes include: a prediction mode based on a preset value, an upward prediction mode, and a left prediction mode.
- the first prediction mode is determined from the multiple prediction modes.
- the image block of the UV channel can be different from the above method, which will be described in detail below.
- multiple prediction modes include: a prediction mode based on a preset value and a left prediction mode.
- the Y channel image block can be divided into 64*2 segments, and the UV channel image block can be divided into 32*1 segments. Therefore, in this case, for the pixels other than the first s pixels in the first row of the image block of the UV channel, the first target pixel can be predicted based on the preset value prediction mode and the left prediction mode, thereby The first prediction mode may be determined from the prediction mode based on the preset value and the residual value obtained based on the left prediction mode, and further, the first target pixel may be encoded based on the first prediction mode.
- the first target pixel may also be predicted based on the left prediction mode.
- the first target pixel can be encoded based on the left prediction mode.
- the encoding end can determine the first prediction mode according to the residual value.
- the encoding end may determine the first prediction mode by the mode corresponding to the smallest residual value among the multiple residual values of the first target pixel of the image block in the multiple prediction modes .
- the first target pixel in the embodiment of the present application may include one or more pixels, so they can be described separately.
- the determining the first prediction mode according to the residual value includes: combining multiple residuals obtained based on the multiple prediction modes.
- the prediction mode corresponding to the smallest residual value among the differences is determined as the first prediction mode.
- the three prediction modes If the residual values are 5, 8, and 4, respectively, the prediction mode 3 corresponding to the minimum value 4 in the residual values can be used as the first prediction mode, and the encoding end can encode the first target pixel based on the prediction mode 3.
- the prediction mode corresponding to the second smaller value among the residual values obtained by predicting the first target pixel by multiple prediction modes may also be used as the first prediction mode.
- the residual values in the three prediction modes are 5, 8, and 4, respectively, and the prediction mode 1 corresponding to the next smaller value of 5 can be used as the prediction mode 1
- the encoding end may encode the first target pixel based on the prediction mode 1.
- the multiple prediction modes include s prediction modes, namely prediction mode 1, prediction mode 2, ... prediction mode s, for the first target pixel, in these s prediction modes, the corresponding residual values are respectively t1, t2...ts, the encoding end can sort these s values in the order of arrival, the encoding end can use the prediction mode corresponding to the first value as the first prediction mode, or the second value
- the corresponding prediction mode is used as the first prediction mode, and a prediction mode corresponding to a value can be arbitrarily selected from the s values as the first prediction mode, which is not specifically limited in this application.
- the minimum residual error in the embodiment of the present application may also be the minimum absolute value of the residual error.
- multiple prediction modes include prediction mode 1, second prediction mode 2, and third prediction mode 3, when the first target pixel includes one pixel, the residual values in these three prediction modes are 5 respectively. , -8 and 4, according to the above method, the prediction mode 2 corresponding to the minimum value of -8 in the residual value can be used as the first prediction mode.
- the prediction mode 3 corresponding to the smallest absolute value 4 in the residual value may be used as the first prediction mode, and the encoding end may encode the first target pixel based on the prediction mode 3.
- the first prediction mode is determined from the multiple prediction modes according to the multiple residual values obtained by the first target pixel based on multiple prediction modes.
- the first prediction mode is determined from the plurality of prediction modes according to the plurality of residual values obtained by the first target pixel based on the plurality of prediction modes.
- the obtaining multiple residual values of the first target pixel of the image block in multiple prediction modes includes: obtaining The residual value of each pixel in the first target pixel in the multiple prediction modes; the determining the first prediction mode according to the residual value includes: selecting each of the multiple prediction modes The residual maximum value of a prediction mode is used to obtain a residual maximum value set; the minimum value is selected from the residual maximum value set, and the mode corresponding to the minimum value is determined as the first prediction mode.
- the first target pixel is a pixel other than the first n pixels in a row other than the first row of the image block
- the corresponding pixel values are respectively The values are 100 and 105
- the reference pixel of the first target pixel can be selected from the prediction table. Assuming that the pixel values of the reference pixels with the smaller residual value of each pixel value of the first target pixel are 96 and 96, then the residual value of each pixel obtained by the first target pixel based on the prediction mode of the preset value is respectively For 4 and 9.
- the first target pixel is predicted based on the left prediction mode, and the first target pixel is obtained
- the residual values of each of the pixels are 2 and 5, respectively.
- the first target pixel is predicted based on the upward prediction mode, and the residual of each pixel in the first target pixel is obtained
- the values are 30 and 20, respectively.
- the residual of each prediction mode in the three prediction modes Maximum value As mentioned above, the maximum residual error in the first target pixel in the prediction mode based on the preset value is 9, the maximum residual error in the first target pixel in the left prediction mode is 5, and the maximum residual error in the first target pixel in the upward prediction mode is 5.
- the maximum residual error of the first target pixel is 30, and 9, 5, and 30 are used as the set of maximum residual errors of the first target pixel.
- the mode corresponding to the minimum residual value can be selected from the maximum residual value set as the first prediction mode, that is, the left prediction mode corresponding to the residual value of 5 is used as the first prediction Mode, further, the encoding end may encode the first target pixel based on the left prediction mode.
- the maximum residual error in the embodiment of the present application may be the maximum absolute value of the residual of each prediction mode in multiple prediction modes.
- the first target pixel is predicted based on the left prediction mode, and the first target pixel is obtained.
- the residual value of each pixel of a target pixel is -8 and 5.
- the maximum absolute value of the residual value obtained by the first pixel in the first target pixel based on the left prediction mode is 8, and the values included in the maximum residual value set are 9, 8, and 30.
- the mode corresponding to the smaller residual value in the set can be used as the first prediction mode, that is, the left prediction mode corresponding to the residual value of 8 can be used as the first prediction mode.
- the encoder can be based on left prediction The mode encodes the first target pixel.
- the method further includes: obtaining multiple residual values of the second target pixel of the image block in the multiple prediction modes; and determining the second target pixel according to the residual value.
- Prediction mode, the second target pixel and the first target pixel belong to the same target pixel group; if the second prediction mode is different from the first prediction mode, calculate that the second target pixel is in the second The first difference between the residual value in the prediction mode and the residual value of the second target pixel in the first prediction mode; if the absolute value of the first difference is less than or equal to the second threshold, then The prediction mode of the second target pixel is adjusted to the prediction mode of the first target pixel; and the second target pixel is encoded based on the adjusted second prediction mode.
- the second target pixel in the embodiment of the present application may or may not be adjacent to the first target pixel, which is not specifically limited in the present application.
- the prediction mode of the second target pixel in the case of determining that the prediction mode of the second target pixel is the second prediction mode, if the second prediction mode is different from the first prediction mode, if the second target pixel meets certain conditions, for example, if the second prediction mode If the absolute value of the first difference between the residual value of the target pixel in the second prediction mode and the residual value of the second target pixel in the first prediction mode is less than or equal to the second threshold, the The prediction mode is adjusted, and the prediction mode of the second target pixel is adjusted to the prediction mode of the first target pixel, that is, the first prediction mode.
- the prediction mode of the second target pixel is the prediction mode based on a preset value.
- the second threshold is 2, by calculation, the difference between the residual value of the second target pixel in the prediction mode based on the preset value and the residual value of the second target pixel in the left prediction mode is 1, which is less than
- the prediction mode of the second target pixel can be adjusted to the left prediction mode.
- the encoding end can encode the second target pixel based on the left prediction mode.
- the first target pixel and the second target pixel in the embodiment of the present application may include one pixel or multiple pixels, which is not specifically limited in the present application.
- the residual value of the target pixel in the prediction mode may be the residual value of the pixel included in the target pixel in the prediction mode; in the first target pixel
- the residual value of the target pixel in the prediction mode may be the maximum value of the residual of the plurality of pixels included in the target pixel in the prediction mode.
- the residual value of the target pixel in the prediction mode may also be the residual value of the multiple pixels included in the target pixel in the prediction mode.
- the second largest value of the difference may also be any one of the residual values of the multiple pixels included in the target pixel in the prediction mode, which is not specifically limited in this application.
- the prediction mode of the second target pixel is adjusted to the same prediction mode as the first target pixel.
- the method further includes: obtaining multiple residual values of the third target pixel of the image block in the multiple prediction modes; and determining the third residual value according to the residual value.
- Prediction mode, the third target pixel and the first target pixel belong to the same target pixel group; if the third prediction mode is different from the first prediction mode, calculate that the third target pixel is in the third The second difference between the residual value in the prediction mode and the residual value of the third target pixel in the specific prediction mode, and calculating the residual value of the first target pixel in the first prediction mode and The third difference of the residual value of the first target pixel in the specific prediction mode; if the absolute value of the second difference and the third difference is less than or equal to the third threshold, the The specific prediction mode is determined to be the adjusted first prediction mode and the adjusted third prediction mode; the third target pixel is encoded based on the adjusted third prediction mode; the third target pixel is encoded based on the adjusted third prediction mode;
- the first prediction mode, encoding the first target pixel includes:
- the third prediction mode is different from the first prediction mode, if the first target pixel and the third target pixel meet certain conditions, For example, if the absolute value of the second difference between the residual value of the third target pixel in the third prediction mode and the residual value of the third target pixel in the specific prediction mode is less than or equal to the third threshold, and the first target The absolute value of the third difference between the residual value of the pixel in the first prediction mode and the residual value of the first target pixel in the specific prediction mode is less than or equal to the third threshold, then the first target pixel and the third The prediction mode of the target pixel is adjusted, that is, the prediction modes of the first target pixel and the third target pixel can be adjusted to a specific prediction mode.
- the prediction mode of the first target pixel is a left prediction mode
- the prediction mode of the third target pixel is a prediction mode based on a preset value.
- the specific prediction mode is the upward prediction mode
- the third threshold is 4, through calculation, the residual value of the third target pixel in the prediction mode based on the preset value and the residual value of the third target pixel in the upward prediction mode
- the second difference is 1, which is less than the third threshold; in addition, the residual value of the first target pixel in the left prediction mode and the first target pixel in the upward prediction mode are the first
- the triple difference value is 2, and the third difference value is also less than the third threshold, the prediction mode of the first target pixel and the third target pixel can be adjusted to the upward prediction mode.
- the encoding end can compare the first target pixel to the first target pixel based on the upward prediction mode
- a target pixel and a third target pixel are encoded.
- the specific prediction mode in the embodiment of the present application may be an upward prediction mode, a leftward prediction mode, or a prediction mode based on a preset value, which is not specifically limited in this application.
- the first target pixel and the third target pixel in the embodiment of the present application may include one pixel or multiple pixels, which is not specifically limited in the present application.
- the residual value of the target pixel in the prediction mode may be the residual value of the pixel included in the target pixel in the prediction mode; in the first target pixel And the third target pixel includes multiple pixels, the residual value of the target pixel in the prediction mode may be the maximum residual value of the multiple pixels included in the target pixel in the prediction mode, or the residual value of multiple pixels included in the target pixel.
- the residual error of the pixel in the prediction mode is the second largest value, and may also be any one of the residual values of the multiple pixels included in the target pixel in the prediction mode, which is not specifically limited in this application.
- the first target pixel belongs to a target pixel group, and if the prediction modes of the target pixels in the target pixel group are the same, the target pixels in the target pixel group share the first bit.
- the first bit indicates the prediction mode of the target pixel in the target pixel group; if the prediction mode of the target pixel in the target pixel group is different, the target pixel in the target pixel group shares the second bit
- each target pixel has a third bit
- the second bit indicates that the prediction mode of the target pixel in the target pixel group is different
- the third bit indicates that each target in the target pixel group The prediction mode of the pixel.
- bit "1" when the prediction modes of different target pixels are different, bit "1" can be used to indicate that the prediction modes of different target pixels belonging to the same target pixel group are different; In the same situation, the bit "0" can be used to indicate that the prediction modes of different target pixels belonging to the same target pixel group are the same.
- the set prediction mode, left prediction mode, and upward prediction mode can be represented by bits “00", "01” and "10" respectively.
- bits “00”, “01”, and “10” can also be used to indicate the left prediction mode, the upward prediction mode, and the prediction mode based on a preset value, which are not specifically limited in this application.
- the preset prediction mode, left prediction mode, and upward prediction mode can be represented by bits "11", “10” and "01", respectively.
- bits “11”, “10”, and “01” can also be used to indicate the left prediction mode, the upward prediction mode, and the prediction mode based on a preset value, which are not specifically limited in this application.
- bits are only examples, and other bits may also be used to indicate different prediction modes, which should not be particularly limited to this application.
- the bit "0" can be used to indicate that the prediction modes of different target pixels belonging to the same target pixel group are different;
- the bit "1" can be used to indicate that the prediction modes of different target pixels belonging to the same target pixel group are the same.
- FIG. 4 is a schematic diagram of an encoding method 400 provided by another embodiment of this application. As shown in FIG. 4, the method 400 may include steps 410-430.
- the image may be divided into at least one image block, and each image block may include multiple pixels.
- an image block may be called a tile or other names, but this embodiment of the present application does not limit this.
- the regions of different image blocks in the image may have the same or different lengths.
- the height of the image block may be 1 pixel or multiple pixels, which is not limited in the embodiment of the present application.
- different segments in the image block may have the same or different lengths.
- the image block for generating the target image in the embodiment of the present application may include the image block representing the luminance channel and the image block representing the chrominance channel of the generated target image.
- the first target pixel in the embodiment of the present application may include one pixel or multiple pixels, which is not specifically limited in the present application.
- the residual value of the first target pixel and the index value of the reference pixel of the first target pixel are described based on the prediction mode of the preset value.
- the prediction table includes 8 columns, corresponding to the index value They can be 000, 001, 010, 011, 100, 101, 110, 111, respectively. If the reference pixel of the first target pixel is located in the third column of the prediction table, the index value of the reference pixel of the first target pixel is 010.
- the number of columns of the prediction table in the embodiment of this application may be 8 columns or 4 columns, etc., which is not specifically limited in this application.
- the corresponding index value can be 00, 01, 10, and 11. If the reference pixel of the first target pixel is located in the third column in the prediction table, then the first target pixel is located in the third column of the prediction table.
- the index value of the reference pixel of a target pixel is 10, so that the number of bits can be reduced.
- the first target pixel is encoded, and the encoded bits may include the index value, the bit position of the residual value of the first target pixel, and the bit position of the sign of the residual value of the first target pixel, for example , The sign of the residual value, etc.
- the first target pixel is encoded by the residual value and the index value of the reference pixel.
- the residual value and the index value are used for encoding. Minimize the problem of large bit overhead caused by directly encoding the target pixel. Further, the error caused by the quantization of the residual value of the differential encoding can be avoided, so that the prediction accuracy of the differential encoding can be improved, and the prediction accuracy of the differential encoding can be improved, and further can be avoided The problem of error accumulation.
- the first target pixel includes the first n pixels of the first row of the image block.
- the first target pixel in the embodiment of the present application may include the first n pixels in the first row of the image block.
- the first target pixel is the first n pixels of the first row of the image block
- the pixel may be predicted based on the prediction mode of the preset value.
- the encoding end may code the first target pixel based on the residual value determined by the prediction mode of the preset value and the index value of the reference pixel.
- the first target pixel can be encoded based on the residual value determined by the prediction mode of the preset value and the index value of the reference pixel.
- the prediction mode of the preset value For the non-first n pixels of the first row of the image block or pixels of the rows other than the first row of the image block, there may be other prediction modes, which will be described in detail below.
- the method further includes: respectively calculating the second target pixel of the image block according to the prediction mode based on the preset value and the at least one prediction mode not based on the preset value. Residual value; select a minimum residual value from the residual value, and use the mode corresponding to the minimum residual value as the first prediction mode of the second target pixel; based on the first prediction mode, The second target pixel is encoded.
- the second target pixel can be predicted according to a prediction mode based on a preset value and at least one prediction mode not based on a preset value, so that the second target pixel can be obtained. Based on the prediction mode of the preset value and the residual value of at least one prediction mode not based on the preset value, select the minimum residual value from the residual value, and use the mode corresponding to the minimum residual value as the second target pixel Prediction mode.
- the prediction mode is 4, 8, and 2, respectively, and the prediction mode 2 corresponding to the residual value of 2 can be used as the first prediction mode of the second target pixel.
- the non-first n pixels of the first row of the image block or the pixels of the row other than the first row of the image block may include a prediction mode based on a preset value and at least one prediction that is not based on a preset value. mode. For different pixels in different rows, at least one prediction mode that is not based on a preset value included is different, which will be specifically introduced below.
- the image block includes a Y-channel image block, and if the second target pixel is a pixel other than the first n pixels in the first row of the Y-channel image block, at least one non- The prediction mode based on the preset value includes a left prediction mode, and the reference pixel of the left prediction mode is a pixel on the left side of the second target pixel and adjacent to the second target pixel.
- the image block includes a Y-channel image block, and if the second target pixel is the first m pixels of a row other than the first row of the Y-channel image block, at least one non- The prediction mode based on the preset value includes an upward prediction mode, and the reference pixel of the upward prediction mode is a pixel above and adjacent to the second target pixel.
- the image block includes a Y-channel image block, and if the second target pixel is a row other than the first row of the Y-channel image block, excluding the first m pixels
- at least one prediction mode that is not based on a preset value includes an upward prediction mode and a left prediction mode.
- the reference pixel in the upward prediction mode is a pixel above and adjacent to the second target pixel
- the reference pixel in the left prediction mode is on the left side of the second target pixel and is connected to the second target pixel. Pixels adjacent to pixels.
- the first prediction mode can be determined from the multiple prediction modes according to the residual value of the first target pixel in multiple prediction modes.
- the second target pixel is a pixel other than the first n pixels in the first row of the image block, since there are adjacent pixels on the left side of the second target pixel, at least one is not based on a preset
- the prediction mode of the value may include the left prediction mode, and the encoding end may predict the second target pixel based on the preset value prediction mode and the left prediction mode, so that the prediction mode based on the preset value and the left prediction mode can be obtained from the prediction mode based on the preset value and the left prediction mode.
- the first prediction mode is determined from the residual value, and the second target pixel may be coded based on the first prediction mode.
- the encoding end can predict the second target pixel based on the preset value prediction mode and the upward prediction mode, so that the first prediction mode can be determined from the preset value prediction mode and the residual value obtained based on the upward prediction mode, and further The second target pixel may be encoded based on the first prediction mode.
- the upward prediction mode may include: For the first p pixels of the line other than the first line, the upward prediction mode can be used; for the non-first p pixels of the line other than the first line, the upward prediction mode can be used, or the leftward prediction mode can be used, where p ⁇ m, this application does not specifically limit this.
- the upward prediction mode may be adopted, and the upward prediction mode may include: For one pixel, the upward prediction mode can be used; for the non-first pixel in the rows other than the first row, the upward prediction mode or the left prediction mode can also be used, which is not specifically limited in this application.
- the preset value prediction mode may include an upward prediction mode and a left prediction mode.
- the encoder can predict the second target pixel based on the preset value prediction mode, the upward prediction mode, and the left prediction mode, so that the prediction based on the preset value
- the first prediction mode is determined from the residual values obtained from the mode, the upward prediction mode, and the left prediction mode, and the second target pixel may be encoded based on the first prediction mode.
- n and m may be the same value or different values, which is not specifically limited in the present application.
- the image block includes an image block of the UV channel, and if the color coding format of the image block is YUV444 or YUV422, if the second target pixel is the UV channel
- the at least one prediction mode that is not based on a preset value includes a left prediction mode, and the reference pixel of the left prediction mode is in the first Two pixels on the left side of the target pixel and adjacent to the second target pixel.
- the image block includes an image block of the UV channel, and if the color coding format of the image block is YUV444 or YUV422, if the second target pixel is the UV channel
- the at least one prediction mode not based on a preset value includes an upward prediction mode, and the reference pixel of the upward prediction mode is the second target A pixel above the pixel and adjacent to the second target pixel.
- the image block includes an image block of the UV channel, and if the color coding format of the image block is YUV444 or YUV422, if the second target pixel is the UV channel
- the at least one non-preset value-based prediction mode includes an upward prediction mode and a leftward prediction mode; wherein, the upward The reference pixel of the prediction mode is the pixel above the second target pixel and adjacent to the second target pixel, and the reference pixel of the left prediction mode is the pixel on the left side of the second target pixel and is adjacent to the second target pixel. A pixel adjacent to the second target pixel.
- the second prediction mode is determined from the multiple prediction modes.
- the image block of the UV channel can be different from the above method, which will be described in detail below.
- the image block includes an image block of the UV channel, and if the color coding format of the image block is YUV420, if the second target pixel is an image of the UV channel
- the at least one prediction mode not based on a preset value includes a left prediction mode, and the reference pixel of the left prediction mode is the second target The pixel on the left side of the pixel and adjacent to the second target pixel.
- the image block of the Y channel can be divided into 64*2 segments, and the image block of the UV channel can be divided into 32*1 segments. Therefore, in this case, for pixels other than the first s pixels in the first row of the image block of the UV channel, the second target pixel can be predicted based on the preset value of the prediction mode and the left prediction mode, thereby The first prediction mode may be determined from the prediction mode based on the preset value and the residual value obtained based on the left prediction mode, and the second target pixel may be encoded based on the first prediction mode.
- the image block includes an image block of the UV channel.
- the method further includes: predicting according to a non-preset value In this mode, a third target pixel is coded, and the third target pixel is a pixel other than the first s pixels in the first row of the image block representing the chrominance channel.
- the prediction mode not based on a preset value is a left prediction mode.
- the first target pixel can also be predicted based on the left prediction mode, so that The second target pixel is encoded based on the left prediction mode.
- the calculation of the second target pixel is based on the prediction mode based on the preset value and at least one prediction mode not based on the preset value.
- the residual value of the second target pixel of the image block includes: using the prediction mode based on the preset value and the at least one prediction mode not based on the preset value to respectively calculate each pixel of the plurality of pixels Residual values to obtain residual values of the plurality of pixels in the prediction mode based on the preset value and the at least one prediction mode not based on the preset value; the selecting from the residual value
- the minimum residual value, and using the mode corresponding to the minimum residual value as the first prediction mode of the second target pixel includes: selecting the prediction mode based on the preset value and the at least one non-preset based The maximum residual value of each prediction mode in the prediction mode of the value to obtain the maximum residual value set; the minimum value is selected from the maximum residual value set, and the mode corresponding to the minimum
- the second target pixel is a pixel other than the first n pixels in the first row of the image block
- the corresponding pixel values are 100 and 105, respectively.
- the reference pixel of the second target pixel can be selected from the prediction table. Assuming that the pixel values of the reference pixels with the smaller residual value of each pixel value of the second target pixel are 96 and 96, the second target pixel has the residual value of each pixel obtained by the prediction mode of the preset value, respectively For 4 and 9.
- the second target pixel is predicted based on the left prediction mode, and the second target pixel is obtained
- the residual values of each of the pixels are 2 and 5, respectively.
- the residual of each prediction mode in the two prediction modes Maximum value As mentioned above, the maximum residual error in the second target pixel in the prediction mode based on the preset value is 9, and the maximum residual error in the second target pixel in the left prediction mode is 5, taking 9 and 5 as The residual maximum set of the first target pixel.
- the mode corresponding to the minimum residual value can be selected from the maximum residual value set as the first prediction mode, that is, the left prediction mode corresponding to the residual value of 5 is used as the first prediction Mode, further, the encoding end may encode the second target pixel based on the left prediction mode.
- the prediction table includes adjacent pixels whose predicted pixel value difference is greater than or equal to a second threshold, and the second threshold is greater than zero.
- the prediction table includes adjacent pixels whose predicted pixel value difference is equal to zero.
- the same predicted pixel value or different predicted pixel values can be set in the prediction table.
- Table 1 shows the predicted reference pixel values of image blocks and their corresponding indexes.
- Left in Table 1 may be the left prediction mode mentioned above, that is, the reference pixel based on Left may be a pixel on the left side of the first target pixel and adjacent to the first target pixel; in Table 1
- the UP of may be the above-mentioned upward prediction mode, that is, the UP-based reference pixel may be a pixel above and adjacent to the first target pixel.
- the color coding format of the image block is YUV420 as an example for description. Since the sampling of the Y channel and the UV channel are different, the prediction mode used can also be different.
- the prediction mode of the Y channel will be explained. Assume that the Y channel of the image block includes the pixels in the first row and the second row as shown in Table 2.
- two pixels in each row are used as a pair of pixels for prediction, that is, the above-mentioned target pixel may include two pixels.
- the steps of the encoding method of the first row of pixels are introduced.
- the first pixel and the second pixel of the first row can encode the look-up table index based on a preset prediction mode, where each index requires 3 bits.
- the other pixels in the first row can be used as a pair for every two pixels, and the prediction is based on the left prediction mode or the prediction mode based on the preset value.
- YUV420 format if the Y channel has 64 pixels in each row, it can be divided into 8 groups, each group has 8 pixels, if the prediction mode of all pixel pairs in the group is like Left, it can be represented by 0; if the prediction modes of the pixel pairs in the group are not all like the left, it can be represented by 1, and then respectively represent the optimal prediction mode of each pair of pixels.
- Optimal mode if the bit of the group mode is 0, the optimal mode does not need to be coded; if the bit of the group mode is 1, all pixel pairs in the group need to be coded separately.
- Bit width which means that the bit width of the maximum absolute value residual in the pixel group minus 1, that is, 0 means 1, and 1 means 2.
- Residual which means absolute residual.
- Each absolute residual value in the pixel group can be coded according to the determined bit width.
- Signs represent the sign of each residual. If the residual is 0, it is not coded. It is coded as 0 for positive and 1 is coded for negative.
- the encoder can send the index value 010 and the residual value to the decoder. If these two pixels The residual value of the prediction mode based on the preset value is 4 and 9, respectively. The residual value can be encoded and sent to the decoding end. The encoding of the residual value will be introduced later.
- the third pixel and the fourth pixel in the first row can be regarded as a pair for encoding.
- the code can be any one of 001-111.
- the prediction values with the smaller residual values of these two values are 125 and 125, and the residuals are 15 and 17, respectively; if the prediction mode is to the left, these two pixels
- the residual values of are 5 and -2, respectively.
- the fifth pixel and the sixth pixel of the first row refer to the method of the third pixel and the fourth pixel described above to select the optimal mode, and then perform encoding. For the sake of brevity, I won't repeat them here.
- the encoding end can send the index value 011 and the residual value to the decoding end ,
- the residual values of these two pixels in the prediction mode based on the preset values are 5 and 55, respectively.
- the encoding end can send the index value 011 and the residual value to the decoding end ,
- the residual values of these two pixels in the prediction mode based on the preset values are 5 and 15, respectively.
- the optimal prediction mode of each pair of pixels in this group of pixels has been determined, that is, the prediction mode of the first pair of pixels in the group of pixels is the prediction mode based on preset values, and the prediction mode of the second pair of pixels is In the left prediction mode, the prediction mode of the third pair of pixels is a prediction mode based on a preset value, and the prediction mode of the fourth pair of pixels is a prediction mode based on a preset value.
- the coding bit of the group mode may be 1, and the coding bits of the optimal mode of the pixels of the second pair, the third pair, and the fourth pair may be 000, 011, and 011, respectively.
- the largest absolute value residual in this group of pixels is 55, which can be expressed as 110111 in binary format.
- the bit width of the residual is 6, and the difference between the residual bit width and 1 is in binary Can be expressed as 101.
- the residuals of each pixel in the pixel group are 4, 9, 5, -2, 5, 55, 5, 15, respectively, and the corresponding codes are respectively 000100, 001001, 000101, 000010, 000101 , 110111, 000101, 001111.
- the last code of the group of pixels is 010100001101110100010000100100010100001000010111011100010100111100010000.
- Table 3 shows the coded bits of the first group of pixels in the first row.
- the pixels of the other groups in the first row can be coded with reference to the pixels of the first group later, for the sake of brevity, it will not be repeated here.
- the encoding method for the pixels in the second row is basically the same as the encoding method for the first row, but there are some differences, which will be described in detail below.
- every two pixels in the second row can be used as a pair for prediction.
- the first pixel and the second pixel in the second row can be coded based on the preset prediction mode. Combined with Table 4 in Table 1, it can be seen that the first pixel in the second row can refer to the upper pixel and The second pixel refers to the left pixel, or the first pixel and the second pixel refer to the upper pixel.
- Two other pixels in the second row form a group, which can be predicted based on a preset value prediction mode or a left prediction mode or an upward prediction mode.
- the Y channel For the YUV420 format, if the Y channel has 64 pixels in each row, it can be divided into 8 groups, and each group has 8 pixels. If the prediction mode of all pixel pairs in the group is like the left, then It can be represented by 0; if the prediction modes of the pixel pairs in the group are not all left-like, it can be represented by 1, and then the optimal prediction mode of each pair is represented respectively.
- Optimal mode If the bit of the group mode is 0, the optimal mode does not need to be coded; if the bit of the group mode is 1, all pixel pairs in the group need to be coded separately.
- Bit width which means that the bit width of the maximum absolute value residual in the pixel group minus 1, that is, 0 means 1, and 1 means 2.
- Residual coding which means absolute residual.
- Each absolute residual value in the pixel group can be coded according to the determined bit width.
- Signs represent the sign of each residual. If the residual is 0, it is not coded. It is coded as 0 for positive and 1 is coded for negative.
- the pixel value J1 of the first pixel and the pixel value J2 of the second pixel in the second row are 144 and 145, respectively. From Table 4 in Table 1, it can be seen that the actual values of these two pixels are The predicted values of the pixel with the smallest residual are T1 and T2; if the two pixels are predicted according to the upward prediction mode, the corresponding residual values are 44 and 40 respectively; if the upper pixel is referenced according to the first pixel and The second pixel is predicted by referring to the left pixel, and the corresponding residuals are 44 and 1, respectively.
- the first pixel can refer to the upper pixel and the second pixel to the left pixel as the minimum. Excellent mode. Combined with Table 4 in Table 1, the corresponding index code bit is 01.
- every two pixels can be used as a pair to determine the optimal prediction mode for the pixel.
- the pixel value J3 of the third pixel and the pixel value of the fourth pixel in the second row are 170 and 180, respectively.
- the predicted values of the pixels with the smallest residuals from the actual values of the pixels are respectively S1 and S2, and the corresponding residuals are 106 and 12, respectively; if the pixel pair is based on the upward prediction mode For prediction, the corresponding residuals are 60 and 72 respectively; if the pixel pair is predicted based on the left prediction mode, the corresponding residuals are 25 and 10, respectively. Since the minimum value of the maximum value set of the two residuals in each prediction mode of the two pixels is 25, the left prediction mode can be used as the optimal mode of the pixel pair.
- the corresponding index code bit is 00.
- the selection result of the prediction pixel of the fifth pixel and the sixth pixel in the second row is the column whose index value of Table 3 is 00 in Table 1, that is, the pixel pair is predicted based on the left prediction mode. Therefore, the encoding end The index value 00 and the residual value can be sent to the decoding end, and the residual values of these two pixels based on the left prediction mode are -70 and -6, respectively.
- the optimal mode can be selected by referring to the above method, and then encoding is performed.
- the selection result of the prediction pixel of the seventh pixel and the eighth pixel in the second row is the column whose index value is 00 in Table 3 in Table 1, that is, the pixel pair is predicted based on the left prediction mode. Therefore, the encoding end The index value 00 and the residual value can be sent to the decoding end, and the residual values of these two pixels based on the left prediction mode are 76 and 20, respectively.
- the optimal prediction mode of each pair of pixels in the group of pixels in the second row is that the first pixel refers to the upper pixel and the second pixel
- the prediction mode of the second pair of pixels is the left prediction mode
- the prediction mode of the third pair of pixels is the left prediction mode
- the prediction mode of the fourth pair of pixels is the left prediction mode.
- the encoding bit of the group mode may be 00.
- the largest absolute value residual in the pixel group is 76, which can be expressed as 1001100 in binary format.
- the bit width of the residual is 7, and the difference between the residual bit width and 1 is in binary Can be expressed as 110.
- the residuals of each pixel in the pixel group are 44, 1, 25, 10, -70, -6, 76, -20, and the corresponding codes are 0101100, 0000001, 0011001, 0001010, respectively , 1000110, 0000110, 1001100, 0010100.
- the last encoded bit of the group of pixels is 01001100101100000000100110010001010100011000001101001100001010000001101.
- Table 4 shows the bits of the first group of pixels in the second row.
- the pixels of the other groups in the second row can be coded with reference to the pixels of the first group in the second row later, which will not be repeated here for brevity.
- the UV channel For the UV channel, if the YUV format is YUV444 or YUV422, you can refer to the Y channel method for prediction and encoding; if the YUV format is YUV420, it includes a row of pixels. Therefore, for the UV channel, prediction can be made based on a left prediction mode or a prediction mode based on a preset value.
- Table 5 shows the pixels of the UV channel.
- prediction and encoding can be performed in the manner described below.
- the first pixel can be predicted based on a preset prediction mode, and the other pixels can be predicted in a leftward prediction mode.
- the encoding end can send the index value 010 and the residual value to the decoding end. If the residual value of the prediction mode of the pixel based on the preset value is 4, the residual value can be The value is encoded and sent to the decoder.
- the left prediction mode can be used for prediction. Therefore, for the UV channel, there is no need to encode the group mode and the optimal mode.
- the left prediction mode suppose the pixel values of the second pixel to the eighth pixel are 120, 115, 118, 160, 145, 180, 179, and the corresponding residuals are 10, -5, 3, 42 respectively , -15, 35, and -1.
- the maximum absolute value residual in the pixel group is 42, which can be expressed as 101010 in binary format.
- the bit width of the residual is 6, and the difference between the residual bit width and 1 can be binary. Expressed as 101.
- the residuals of each pixel in the pixel group are 10, -5, 3, 42, -15, 35, and -1, respectively, and the corresponding codes are 001010, 000101, 000011, 101010, 001111, respectively , 100011 and 000001.
- the residual values of the third pixel, the sixth pixel, and the eighth pixel in the above-mentioned pixel group are negative, the residual values of the remaining pixels are positive, and the corresponding sign is coded as 00100101.
- the last code of the group of pixels is 01010100101000010100001110101000111110001100000100100101.
- Table 6 shows the bits of the UV channel.
- the first pixel can be predicted based on a preset value prediction mode, and the other pixels can be predicted based on a preset value prediction mode or a leftward prediction mode.
- This method can refer to the prediction mode of the Y channel. For the sake of brevity, it will not be repeated here.
- the method embodiments of the encoding end of the present application are described above with reference to FIGS. 3 to 4, and the method embodiments of the decoding end of this application will be described below in conjunction with FIGS. 5-6.
- the method of the decoding end may correspond to the encoding method described above. Specifically, it may be the inverse process of the encoding method.
- the parts that are not described in detail may refer to the foregoing encoding method embodiments.
- 5 is a decoding method 500 provided by an embodiment of the present application. As shown in FIG. 5, the decoding method 500 may include steps 510-530.
- 520. Determine a first prediction mode from multiple prediction modes according to the coded bits, the multiple prediction modes including at least two of a prediction mode based on a preset value, a left prediction mode, and an upward prediction mode.
- the sources of the reference pixels on which the residual values obtained based on different prediction modes of the multiple prediction modes are based are different.
- the reference pixel of the prediction mode based on the preset value is selected from a prediction table and the absolute value of the difference with the first target pixel is less than or equal to a first threshold. Pixel; or, the reference pixel of the prediction mode based on the preset value is the pixel selected from the prediction table and the absolute value of the difference with the first target pixel is the smallest, and the index of the reference pixel The value is encoded into the code stream.
- the reference pixel of the left prediction mode is a pixel on the left side of the first target pixel and adjacent to the first target pixel.
- the reference pixel of the upward prediction mode is a pixel above and adjacent to the first target pixel.
- the image block includes an image block representing a brightness channel, and if the first target pixel is the first row of the image block representing the brightness channel other than the first n pixels
- the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the image block includes an image block representing a brightness channel
- the multiple prediction modes include: the prediction mode based on a preset value and the upward prediction mode.
- the image block includes an image block representing a brightness channel, and if the first target pixel is a row other than the first row of the image block representing the brightness channel
- the multiple prediction modes include: the prediction mode based on a preset value, the upward prediction mode, and the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Representing pixels other than the first n pixels in the first row of the image block of the chrominance channel, the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Representing the first m pixels of rows other than the first row of the image block of the chrominance channel, the multiple prediction modes include: the prediction mode based on the preset value and the upward prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Represents pixels other than the first m pixels of rows other than the first row of the image block of the chroma channel, the multiple prediction modes include: the prediction mode based on a preset value, and the upward prediction mode And the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV420, if the first target pixel is the UV channel, the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the first target pixel belongs to a target pixel group, and if the prediction modes of the target pixels in the target pixel group are the same, the target pixels in the target pixel group share the first bit.
- the first bit indicates the prediction mode of the target pixel in the target pixel group; if the prediction mode of the target pixel in the target pixel group is different, the target pixel in the target pixel group shares the second bit
- each target pixel has a third bit
- the second bit indicates that the prediction mode of the target pixel in the target pixel group is different
- the third bit indicates that each target in the target pixel group The prediction mode of the pixel.
- 6 is a decoding method 600 provided by an embodiment of the present application. As shown in FIG. 6, the decoding method 600 may include steps 610-630.
- the first target pixel includes the first n pixels of the first row of the image block.
- the method further includes: acquiring coded bits of the second target pixel of the image block; according to the coded bits, a prediction mode based on a preset value and at least one non-preset based prediction mode Value prediction mode, determine the first prediction mode of the second target pixel; decode the second target pixel based on the first prediction mode.
- FIG. 7 is an encoding device 700 provided by an embodiment of the present application.
- the encoding device 700 may include a generating unit 710, an acquiring unit 720, a determining unit 730, and an encoding unit 740.
- the generating unit 710 is configured to generate image blocks of the target image.
- the obtaining unit 720 is configured to obtain multiple residual values of the first target pixel of the image block in multiple prediction modes.
- the multiple prediction modes include a prediction mode based on a preset value, a left prediction mode, and an upward prediction mode. At least two of the prediction modes.
- the determining unit 730 is configured to determine the first prediction mode according to the residual value.
- the encoding unit 740 is configured to encode the first target pixel based on the first prediction mode.
- the sources of the reference pixels on which the residual values obtained based on different prediction modes of the multiple prediction modes are based are different.
- the reference pixel of the prediction mode based on the preset value is selected from a prediction table and the absolute value of the difference with the first target pixel is less than or equal to a first threshold. Pixel; or, the reference pixel of the prediction mode based on the preset value is the pixel selected from the prediction table and the absolute value of the difference with the first target pixel is the smallest, and the index of the reference pixel The value is encoded into the code stream.
- the reference pixel of the left prediction mode is a pixel on the left side of the first target pixel and adjacent to the first target pixel.
- the reference pixel of the upward prediction mode is a pixel above and adjacent to the first target pixel.
- the image block includes an image block representing a brightness channel, and if the first target pixel is the first row of the image block representing the brightness channel other than the first n pixels
- the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the image block includes an image block representing a brightness channel
- the multiple prediction modes include: the prediction mode based on a preset value and the upward prediction mode.
- the image block includes an image block representing a brightness channel, and if the first target pixel is a row other than the first row of the image block representing the brightness channel
- the multiple prediction modes include: the prediction mode based on a preset value, the upward prediction mode, and the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Representing pixels other than the first n pixels in the first row of the image block of the chrominance channel, the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Representing the first m pixels of rows other than the first row of the image block of the chrominance channel, the multiple prediction modes include: the prediction mode based on the preset value and the upward prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Represents pixels other than the first m pixels of rows other than the first row of the image block of the chroma channel, the multiple prediction modes include: the prediction mode based on a preset value, and the upward prediction mode And the left prediction mode.
- the image block includes an image block representing a chrominance channel, and if the color coding format of the image block is YUV420, if the first target pixel is the color representation
- the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the determining unit 730 is further configured to: determine the prediction mode corresponding to the smallest residual value among the multiple residual values obtained based on the multiple prediction modes as the first A prediction model.
- the obtaining unit 720 is further configured to: obtain each pixel in the first target pixel in the multiple prediction modes
- the device 700 further includes: a selection unit for selecting the maximum residual value of each prediction mode in the multiple prediction modes to obtain a maximum residual value set; the determining unit 730 It is further used for: selecting the minimum value from the residual maximum value set, and determining the mode corresponding to the minimum value as the first prediction mode.
- the obtaining unit 720 is further configured to: obtain multiple residual values of the second target pixel of the image block in the multiple prediction modes; the determining unit 730 is further And configured to: determine a second prediction mode according to the residual value, and the second target pixel and the first target pixel belong to the same target pixel group; the device 700 further includes: a calculation unit, configured to: The second prediction mode is different from the first prediction mode, and the residual value of the second target pixel in the second prediction mode and the residual value of the second target pixel in the first prediction mode are calculated An adjustment unit for adjusting the prediction mode of the second target pixel to the prediction mode of the first target pixel if the absolute value of the first difference is less than or equal to a second threshold The encoding unit 740 is further configured to: encode the second target pixel based on the adjusted second prediction mode.
- the obtaining unit 720 is further configured to: obtain multiple residual values of the third target pixel of the image block in the multiple prediction modes; the determining unit 730 is further And configured to: determine a third prediction mode according to the residual value, and the third target pixel and the first target pixel belong to the same target pixel group; the device 700 further includes: a calculation unit, configured to: The third prediction mode is different from the first prediction mode. The second difference between the residual value of the third target pixel in the third prediction mode and the residual value of the third target pixel in the specific prediction mode is calculated.
- an adjustment unit For determining the specific prediction mode as the adjusted first prediction mode and the adjusted first prediction mode if the absolute value of the second difference value and the third difference value is less than or equal to a third threshold value Three prediction modes; the encoding unit 740 is further configured to: encode the third target pixel based on the adjusted third prediction mode; based on the adjusted first prediction mode, perform The target pixel is encoded.
- the encoding unit 740 is further configured to: write the first prediction mode in the encoded bits of the first target pixel.
- the first target pixel belongs to a target pixel group, and if the prediction modes of the target pixels in the target pixel group are the same, the target pixels in the target pixel group share the first bit.
- the first bit indicates the prediction mode of the target pixel in the target pixel group; if the prediction mode of the target pixel in the target pixel group is different, the target pixel in the target pixel group shares the second bit
- each target pixel has a third bit
- the second bit indicates that the prediction mode of the target pixel in the target pixel group is different
- the third bit indicates that each target in the target pixel group The prediction mode of the pixel.
- the generating unit 710 is further configured to: generate an image block representing a luminance channel of the target image block and an image block representing a chrominance channel of the target image.
- FIG. 8 is an encoding device 800 provided by another embodiment of the present application. As shown in FIG. 8, the encoding device 800 may include a generating unit 810, a determining unit 820, and an encoding unit 830.
- the generating unit 810 is configured to generate image blocks of the target image.
- the determining unit 820 is configured to determine the residual value of the first target pixel of the image block and the index value of the reference pixel of the first target pixel according to the prediction mode based on the preset value, where the reference pixel is a slave prediction
- the pixel selected in the table and the absolute value of the difference with the first target pixel is less than or equal to the first threshold, or the reference pixel is selected from the prediction table and is the same as the first target pixel
- the pixel with the smallest absolute value of the difference is configured to determine the residual value of the first target pixel of the image block and the index value of the reference pixel of the first target pixel according to the prediction mode based on the preset value, where the reference pixel is a slave prediction The pixel selected in the table and the absolute value of the difference with the first target pixel is less than or equal to the first threshold, or the reference pixel is selected from the prediction table and is the same as the first target pixel The pixel with the smallest absolute value of the difference.
- the encoding unit 830 is configured to encode the first target pixel based on the index value and the residual value.
- the first target pixel includes the first n pixels of the first row of the image block.
- the device 800 further includes: a calculation unit, configured to calculate the image block according to the prediction mode based on the preset value and at least one prediction mode not based on the preset value.
- the residual value of the second target pixel a selection unit, configured to select a minimum residual value from the residual value, and use the mode corresponding to the minimum residual value as the first prediction of the second target pixel Mode;
- the encoding unit 830 is further configured to: encode the second target pixel based on the first prediction mode.
- the image block includes an image block representing a brightness channel, and if the second target pixel is the first row of the image block representing the brightness channel other than the first n pixels
- the at least one prediction mode that is not based on a preset value includes a left prediction mode, and the reference pixel of the left prediction mode is on the left side of the second target pixel and corresponds to the second target pixel Adjacent pixels.
- the image block includes an image block representing a brightness channel
- the at least one prediction mode not based on a preset value includes an upward prediction mode
- a reference pixel of the upward prediction mode is a pixel above the second target pixel and adjacent to the second target pixel .
- the image block includes an image block representing a brightness channel, and if the second target pixel is a row other than the first row of the image block representing the brightness channel pixels other than m pixels, the at least one prediction mode not based on a preset value includes an upward prediction mode and a left prediction mode; wherein the reference pixel of the upward prediction mode is above the second target pixel And for pixels adjacent to the second target pixel, the reference pixel of the left prediction mode is a pixel on the left side of the second target pixel and adjacent to the second target pixel.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the second target pixel is the Represents the pixels other than the first n pixels of the first row of the image block of the chroma channel, the at least one prediction mode not based on a preset value includes a left prediction mode, and the reference pixel of the left prediction mode is A pixel adjacent to the second target pixel on the left side of the second target pixel.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the second target pixel is the Represents the first m pixels of lines other than the first line of the image block of the chroma channel, the at least one non-preset value-based prediction mode includes an upward prediction mode, and the reference pixels of the upward prediction mode are A pixel above the second target pixel and adjacent to the second target pixel.
- the image block includes an image block representing a chrominance channel.
- the at least one non-preset value-based prediction mode includes an upward prediction mode and a left prediction mode; wherein , The reference pixel in the upward prediction mode is a pixel above the second target pixel and adjacent to the second target pixel, and the reference pixel in the left prediction mode is a pixel in the second target pixel The pixel on the left side and adjacent to the second target pixel.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV420, if the second target pixel is the color representation For pixels other than the first s pixels in the first row of the image block of the degree channel, the at least one prediction mode not based on a preset value includes a left prediction mode, and the reference pixel of the left prediction mode is A pixel on the left side of the second target pixel and adjacent to the second target pixel.
- the calculation unit is further configured to: use the preset value-based prediction mode and the at least one non-preset value
- the prediction mode for each pixel in the plurality of pixels calculates a residual value respectively to obtain the prediction mode based on the preset value and the at least one prediction mode not based on the preset value for the plurality of pixels
- the selection unit is further configured to: select the prediction mode based on the preset value and the maximum residual value of each prediction mode under the at least one prediction mode not based on the preset value, to Obtain a residual maximum value set; select a minimum value from the residual maximum value set; the determining unit 820 is further configured to: determine a mode corresponding to the minimum value as the first prediction mode.
- the image block includes an image block representing a chrominance channel
- the encoding unit is further configured to: A valued prediction mode is used to encode a third target pixel, where the third target pixel is a pixel other than the first s pixels in the first row of the image block representing the chrominance channel.
- the prediction mode not based on a preset value is a left prediction mode.
- the prediction table includes adjacent pixels whose predicted pixel value difference is greater than or equal to a second threshold, and the second threshold is greater than zero.
- the prediction table includes adjacent pixels whose predicted pixel value difference is equal to zero.
- apparatus 700 and the apparatus 800 may be specifically the execution subject of the encoding method in the foregoing embodiment, and the apparatus 700 and the apparatus 800 may be used to execute the method in the foregoing embodiment. In order to avoid repetition, the various processes and/or steps of, will not be repeated here.
- FIG. 9 is a decoding device 900 provided by an embodiment of the present application. As shown in FIG. 9, the decoding device may include an acquiring unit 910, a determining unit 920, and a decoding unit 930.
- the acquiring unit 910 is configured to acquire the encoding bit of the first target pixel of the image block of the target image.
- the determining unit 920 is configured to determine a first prediction mode from multiple prediction modes according to the coded bits, the multiple prediction modes including a prediction mode based on a preset value, a left prediction mode, and an upward prediction mode. At least two.
- the decoding unit 930 is configured to decode the first target pixel based on the first prediction mode.
- the sources of the reference pixels on which the residual values obtained based on different prediction modes of the multiple prediction modes are based are different.
- the reference pixel of the prediction mode based on the preset value is selected from a prediction table and the absolute value of the difference with the first target pixel is less than or equal to a first threshold. Pixel; or, the reference pixel of the prediction mode based on the preset value is the pixel selected from the prediction table and the absolute value of the difference with the first target pixel is the smallest, and the index of the reference pixel The value is encoded into the code stream.
- the reference pixel of the left prediction mode is a pixel on the left side of the first target pixel and adjacent to the first target pixel.
- the reference pixel of the upward prediction mode is a pixel above and adjacent to the first target pixel.
- the image block includes an image block representing a brightness channel, and if the first target pixel is the first row of the image block representing the brightness channel other than the first n pixels
- the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the image block includes an image block representing a brightness channel
- the multiple prediction modes include: the prediction mode based on a preset value and the upward prediction mode.
- the image block includes an image block representing a brightness channel, and if the first target pixel is a row other than the first row of the image block representing the brightness channel
- the multiple prediction modes include: the prediction mode based on a preset value, the upward prediction mode, and the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Representing pixels other than the first n pixels in the first row of the image block of the chrominance channel, the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Representing the first m pixels of rows other than the first row of the image block of the chrominance channel, the multiple prediction modes include: the prediction mode based on the preset value and the upward prediction mode.
- the image block includes an image block representing a chrominance channel. If the color coding format of the image block is YUV444 or YUV422, if the first target pixel is the Represents pixels other than the first m pixels of rows other than the first row of the image block of the chroma channel, the multiple prediction modes include: the prediction mode based on a preset value, and the upward prediction mode And the left prediction mode.
- the image block includes an image block representing a chrominance channel, and if the color coding format of the image block is YUV420, if the first target pixel is the color representation
- the multiple prediction modes include: the prediction mode based on a preset value and the left prediction mode.
- the first target pixel belongs to a target pixel group, and if the prediction modes of the target pixels in the target pixel group are the same, the target pixels in the target pixel group share the first bit.
- the first bit indicates the prediction mode of the target pixel in the target pixel group; if the prediction mode of the target pixel in the target pixel group is different, the target pixel in the target pixel group shares the second bit
- each target pixel has a third bit
- the second bit indicates that the prediction mode of the target pixel in the target pixel group is different
- the third bit indicates that each target in the target pixel group The prediction mode of the pixel.
- FIG. 10 is a decoding device 1000 provided by another embodiment of the present application. As shown in FIG. 10, the decoding device may include an acquiring unit 1010, a determining unit 1020, and a decoding unit 1030.
- the acquiring unit 1010 is configured to acquire the encoding bit of the first target pixel of the image block of the target image.
- the determining unit 1020 is configured to determine the residual value of the first target pixel and the index value of the reference pixel of the first target pixel based on the prediction mode of the preset value according to the coded bit, where the reference pixel is The pixel selected from the prediction table and the absolute value of the difference with the first target pixel is less than or equal to the first threshold, or the reference pixel is selected from the prediction table and is the same as the first target pixel. The pixel with the smallest absolute value of the difference of the target pixel.
- the decoding unit 1030 is configured to decode the first target pixel based on the index value and the residual value.
- the first target pixel includes the first n pixels of the first row of the image block.
- the obtaining unit 1010 is further configured to: obtain the coded bits of the second target pixel of the image block; the determining unit 1020 is further configured to: according to the coded bits, based on the preset Set a valued prediction mode and at least one prediction mode that is not based on a preset value to determine the first prediction mode of the second target pixel; the decoding unit 1030 is further configured to: based on the first prediction mode, perform the first prediction mode for the second target pixel; Two target pixels are decoded.
- the apparatus 900 and the apparatus 1000 may be specifically the decoding apparatus in the above-mentioned embodiment, and the apparatus 900 and the apparatus 1000 may be used to execute each process and/or in the above-mentioned method embodiment. Steps, in order to avoid repetition, will not be repeated here.
- FIG. 11 is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
- the image processing system 1100 shown in FIG. 11 includes a processor 1110, and the processor 1110 can call and run a computer program from the memory to implement the method in the embodiment of the present application.
- the image processing system 1100 may further include a memory 1120.
- the processor 1110 can call and run a computer program from the memory 1120 to implement the method in the embodiment of the present application.
- the memory 1120 may be a separate device independent of the processor 1110, or may be integrated in the processor 1110.
- the image processing system 1100 may further include a transceiver 1130, and the processor 1110 may control the transceiver 1130 to communicate with other devices. Specifically, it may send information or data to other devices, or receive Information or data sent by other devices.
- the image processing system can be applied to the encoding device/decoding device in the embodiments of the present application, and the image processing system can implement the corresponding processes implemented by the encoding device/decoding device in the various methods of the embodiments of the present application. It's concise, so I won't repeat it here.
- FIG. 12 is a schematic structural diagram of a chip of an embodiment of the present application.
- the chip 1200 shown in FIG. 12 includes a processor 1210, and the processor 1210 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
- the chip 1200 may further include a memory 1220.
- the processor 1210 can call and run a computer program from the memory 1220 to implement the method in the embodiment of the present application.
- the memory 1220 may be a separate device independent of the processor 1210, or may be integrated in the processor 1210.
- the chip 1200 may further include an input interface 1230.
- the processor 1210 can control the input interface 1230 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
- the chip 1200 may further include an output interface 1240.
- the processor 1210 can control the output interface 1240 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
- the chip can be applied to the encoding device/decoding device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the encoding device/decoding device in the various methods of the embodiments of the present application.
- the chip can implement the corresponding processes implemented by the encoding device/decoding device in the various methods of the embodiments of the present application.
- the chip can implement the corresponding processes implemented by the encoding device/decoding device in the various methods of the embodiments of the present application.
- the chip can be applied to the encoding device/decoding device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the encoding device/decoding device in the various methods of the embodiments of the present application.
- the chip mentioned in the embodiment of the present application may also be referred to as a system-level chip, a system-on-chip, a system-on-chip, or a system-on-chip, etc.
- the processor of the embodiment of the present application may be an integrated circuit image processing system with signal processing capability.
- the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
- the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
- DSP Digital Signal Processor
- ASIC application specific integrated circuit
- FPGA Field Programmable Gate Array
- the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
- the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
- the volatile memory may be random access memory (Random Access Memory, RAM), which is used as an external cache.
- RAM random access memory
- SRAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
- Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
- Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
- DR RAM Direct Rambus RAM
- the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
- the memory in the embodiment of the present application can provide instructions and data to the processor.
- a part of the memory may also include a non-volatile random access memory.
- the memory can also store device type information.
- the processor may be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor may execute each step corresponding to the terminal device in the foregoing method embodiment.
- each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor executes the instructions in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
- the pixels in the image can be located in different rows and/or columns, where the length of A can correspond to the number of pixels located in the same row included in A, and the height of A can be Corresponds to the number of pixels in the same column included in A.
- the length and height of A may also be referred to as the width and depth of A, which are not limited in the embodiment of the present application.
- the boundary spacing distribution with A can refer to at least one pixel spaced from the boundary of A, and can also be referred to as "not adjacent to the boundary of A” or “not located at the boundary of A”. Boundary", this embodiment of the application does not limit this, where A can be an image, a rectangular area, or a sub-image, and so on.
- the embodiment of the present application also provides a computer-readable storage medium for storing computer programs.
- the computer-readable storage medium can be applied to the encoding device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the encoding device in each method of the embodiment of the present application.
- the computer program causes the computer to execute the corresponding process implemented by the encoding device in each method of the embodiment of the present application.
- the computer-readable storage medium may be applied to the decoding device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the decoding device in each method of the embodiment of the present application.
- the computer program causes the computer to execute the corresponding process implemented by the decoding device in each method of the embodiment of the present application.
- the embodiments of the present application also provide a computer program product, including computer program instructions.
- the computer program product can be applied to the encoding device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the encoding device in each method of the embodiment of the present application.
- the computer program instructions cause the computer to execute the corresponding process implemented by the encoding device in each method of the embodiment of the present application.
- the computer program product can be applied to the decoding device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the decoding device in each method of the embodiment of the present application.
- the computer program instructions cause the computer to execute the corresponding process implemented by the decoding device in each method of the embodiment of the present application.
- the embodiment of the present application also provides a computer program.
- the computer program can be applied to the encoding device in the embodiment of the present application.
- the computer program When the computer program is run on the computer, the computer is caused to execute the corresponding process implemented by the encoding device in each method of the embodiment of the present application.
- I won’t repeat it here.
- the computer program can be applied to the decoding device in the embodiment of the present application.
- the computer program When the computer program is run on the computer, the computer is caused to execute the corresponding process implemented by the decoding device in each method of the embodiment of the present application. For the sake of brevity , I won’t repeat it here.
- the disclosed system, device, and method may be implemented in other ways.
- the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, Read-Only Memory (ROM), Random Access Memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
La présente invention concerne un procédé de codage, un procédé de décodage, un dispositif de codage, et un dispositif de décodage. Le procédé de codage comprend les étapes suivantes: la génération d'un bloc d'image d'une image cible; l'obtention d'une pluralité de signaux résiduels d'un premier pixel cible du bloc d'image dans plusieurs modes de prédiction, la pluralité de modes de prédiction comprenant au moins deux parmi un mode de prédiction basé sur une valeur prédéfinie, un mode de prédiction vers la gauche et un mode de prédiction vers le haut; la détermination d'un premier mode de prédiction en fonction des signaux résiduels; et le codage du premier pixel cible sur la base du premier mode de prédiction. Étant donné que le premier mode de prédiction est déterminé à partir de plusieurs modes de prédiction sur la base des signaux résiduels, le procédé selon l'invention dans les modes de réalisation de la présente invention permet de sélectionner de manière flexible un mode de prédiction pour un pixel cible, permettant ainsi d'éviter une erreur de codage différentiel provoquée par la quantification des signaux résiduels dans la plus grande mesure possible, et par conséquent, la précision de prédiction d'un codage différentiel peut être améliorée, et le problème d'accumulation d'erreurs peut en outre être évité.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2019/104428 WO2021042300A1 (fr) | 2019-09-04 | 2019-09-04 | Procédé de codage, procédé de décodage, dispositif de codage et dispositif de décodage |
| CN201980096675.1A CN113853790A (zh) | 2019-09-04 | 2019-09-04 | 编码方法、解码方法以及编码装置和解码装置 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2019/104428 WO2021042300A1 (fr) | 2019-09-04 | 2019-09-04 | Procédé de codage, procédé de décodage, dispositif de codage et dispositif de décodage |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021042300A1 true WO2021042300A1 (fr) | 2021-03-11 |
Family
ID=74852673
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/104428 Ceased WO2021042300A1 (fr) | 2019-09-04 | 2019-09-04 | Procédé de codage, procédé de décodage, dispositif de codage et dispositif de décodage |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN113853790A (fr) |
| WO (1) | WO2021042300A1 (fr) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114501029A (zh) * | 2022-01-12 | 2022-05-13 | 深圳市洲明科技股份有限公司 | 图像编码、图像解码方法、装置、计算机设备和存储介质 |
| CN117221553A (zh) * | 2023-09-19 | 2023-12-12 | 海宁奕斯伟集成电路设计有限公司 | 图像压缩装置、方法、电子设备和存储介质 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116168095A (zh) * | 2023-03-01 | 2023-05-26 | 西安紫光展锐科技有限公司 | 图像压缩方法、装置及设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101170688A (zh) * | 2007-11-26 | 2008-04-30 | 电子科技大学 | 一种宏块模式的快速选择方法 |
| US20110274170A1 (en) * | 2010-05-05 | 2011-11-10 | Paz Adar | Device, system, and method for predicting residual data for intra and inter frame encoding of image or video data |
| CN105491376A (zh) * | 2014-10-06 | 2016-04-13 | 同济大学 | 图像编码、解码方法及装置 |
| CN106034235A (zh) * | 2015-03-11 | 2016-10-19 | 杭州海康威视数字技术股份有限公司 | 计算编码失真度和编码模式控制的方法及其系统 |
| CN106162176A (zh) * | 2016-10-09 | 2016-11-23 | 北京数码视讯科技股份有限公司 | 帧内预测模式选择方法和装置 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2014202458B2 (en) * | 2007-04-17 | 2016-12-22 | Smith & Nephew Plc | Dental implant |
| US9558567B2 (en) * | 2013-07-12 | 2017-01-31 | Qualcomm Incorporated | Palette prediction in palette-based video coding |
| CN104079942B (zh) * | 2014-06-25 | 2017-06-06 | 华为技术有限公司 | 一种图像处理方法、装置及系统 |
| CN109451324A (zh) * | 2018-10-26 | 2019-03-08 | 西安科锐盛创新科技有限公司 | 用于带宽压缩的自适应模板预测方法 |
| CN109391820A (zh) * | 2018-10-26 | 2019-02-26 | 西安科锐盛创新科技有限公司 | 基于视频压缩的预测方法 |
-
2019
- 2019-09-04 CN CN201980096675.1A patent/CN113853790A/zh active Pending
- 2019-09-04 WO PCT/CN2019/104428 patent/WO2021042300A1/fr not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101170688A (zh) * | 2007-11-26 | 2008-04-30 | 电子科技大学 | 一种宏块模式的快速选择方法 |
| US20110274170A1 (en) * | 2010-05-05 | 2011-11-10 | Paz Adar | Device, system, and method for predicting residual data for intra and inter frame encoding of image or video data |
| CN105491376A (zh) * | 2014-10-06 | 2016-04-13 | 同济大学 | 图像编码、解码方法及装置 |
| CN106034235A (zh) * | 2015-03-11 | 2016-10-19 | 杭州海康威视数字技术股份有限公司 | 计算编码失真度和编码模式控制的方法及其系统 |
| CN106162176A (zh) * | 2016-10-09 | 2016-11-23 | 北京数码视讯科技股份有限公司 | 帧内预测模式选择方法和装置 |
Non-Patent Citations (1)
| Title |
|---|
| R. JOSHI (QUALCOMM), J. SOLE (QUALCOMM), M. KARCZEWICZ (QUALCOMM): "AHG8: Residual DPCM for visually lossless coding", 13. JCT-VC MEETING; 20130418 - 20130426; INCHEON; (JOINT COLLABORATIVE TEAM ON VIDEO CODING OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 18 April 2013 (2013-04-18), XP030237264 * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114501029A (zh) * | 2022-01-12 | 2022-05-13 | 深圳市洲明科技股份有限公司 | 图像编码、图像解码方法、装置、计算机设备和存储介质 |
| CN114501029B (zh) * | 2022-01-12 | 2023-06-06 | 深圳市洲明科技股份有限公司 | 图像编码、图像解码方法、装置、计算机设备和存储介质 |
| CN117221553A (zh) * | 2023-09-19 | 2023-12-12 | 海宁奕斯伟集成电路设计有限公司 | 图像压缩装置、方法、电子设备和存储介质 |
| CN117221553B (zh) * | 2023-09-19 | 2025-06-03 | 海宁奕斯伟计算技术有限公司 | 图像压缩装置、方法、电子设备和存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113853790A (zh) | 2021-12-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110602491B (zh) | 帧内色度预测方法、装置、设备及视频编解码系统 | |
| CN113574880B (zh) | 关于子块变换模式的分割 | |
| CN113950829B (zh) | 简化的变换编解码工具 | |
| US11792398B2 (en) | Video encoding | |
| CN113994666B (zh) | 隐式选择变换候选 | |
| KR102817161B1 (ko) | 픽처 컴포넌트 예측 방법, 인코더, 디코더 및 저장 매체 | |
| CN110868594B (zh) | 分割方法的冗余移除 | |
| WO2021042300A1 (fr) | Procédé de codage, procédé de décodage, dispositif de codage et dispositif de décodage | |
| US12166988B2 (en) | Residual coefficients coding | |
| KR20210108389A (ko) | 크로마 인트라 예측 방법, 장치 및 컴퓨터 저장 매체 | |
| CN106375762A (zh) | 参考帧数据压缩方法及其装置 | |
| CN107027054B (zh) | 图像像素采样值处理方法及装置,图像的转换方法及装置 | |
| EP3761646A1 (fr) | Procédé et dispositif de modélisation de contexte de bit indicateur de partition | |
| US20250317591A1 (en) | Image coding and decoding method and apparatus, and storage medium | |
| JP7067655B2 (ja) | 画像コーディング装置、画像デコーディング装置、及び画像処理機器 | |
| WO2022252567A1 (fr) | Procédé et dispositif de détermination d'un ordre de priorité de codage et de décodage vidéo à base de comparaison de corrélations | |
| WO2023193260A1 (fr) | Procédé de codage/décodage, flux de codes, codeur, décodeur et support de stockage | |
| WO2019041219A1 (fr) | Procédé de codage, procédé de décodage, appareil de codage, et appareil de décodage | |
| WO2019109264A1 (fr) | Procédé d'encodage et de codage d'informations de mode, dispositif correspondant et appareil électronique | |
| WO2024060099A1 (fr) | Procédé d'encodage, procédé de décodage, flux de code, encodeur, décodeur et support de stockage | |
| TW202422470A (zh) | 透過圖塊尺寸選擇來減少影像縮放假影 | |
| WO2024197748A1 (fr) | Procédé de codage/décodage, flux de codes, codeur, décodeur et support de stockage | |
| WO2025010541A1 (fr) | Procédé de codage, procédé de décodage, flux de code, codeur, décodeur et support de stockage | |
| TW202408230A (zh) | 編解碼方法、裝置及電腦設備 | |
| TW202408235A (zh) | 視訊影像處理方法及裝置、編解碼器、碼流、儲存媒介 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19944221 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19944221 Country of ref document: EP Kind code of ref document: A1 |