WO2021056223A1 - 图像编解码方法、编码器、解码器以及存储介质 - Google Patents

图像编解码方法、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2021056223A1
WO2021056223A1 PCT/CN2019/107612 CN2019107612W WO2021056223A1 WO 2021056223 A1 WO2021056223 A1 WO 2021056223A1 CN 2019107612 W CN2019107612 W CN 2019107612W WO 2021056223 A1 WO2021056223 A1 WO 2021056223A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
offset
value
mip
size
Prior art date
Application number
PCT/CN2019/107612
Other languages
English (en)
French (fr)
Inventor
霍俊彦
马彦卓
万帅
张伟
杨付正
王海鑫
孙宇
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to JP2021532342A priority Critical patent/JP7461353B2/ja
Priority to CN201980060144.7A priority patent/CN112840652A/zh
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP19946790.3A priority patent/EP3863287A4/en
Priority to KR1020237038224A priority patent/KR20230156810A/ko
Priority to AU2019467372A priority patent/AU2019467372B2/en
Priority to MX2021005546A priority patent/MX2021005546A/es
Priority to RU2021113334A priority patent/RU2767188C1/ru
Priority to CN202310401510.9A priority patent/CN116634157A/zh
Priority to PCT/CN2019/107612 priority patent/WO2021056223A1/zh
Priority to BR112021008833A priority patent/BR112021008833A2/pt
Priority to KR1020237038239A priority patent/KR20230157531A/ko
Priority to KR1020217015292A priority patent/KR102602418B1/ko
Priority to CN202110629410.2A priority patent/CN113905236B/zh
Priority to CA3116601A priority patent/CA3116601C/en
Priority to CN202310399573.5A priority patent/CN116347086A/zh
Publication of WO2021056223A1 publication Critical patent/WO2021056223A1/zh
Priority to IL282280A priority patent/IL282280A/en
Priority to US17/230,769 priority patent/US11159814B2/en
Priority to PH12021550833A priority patent/PH12021550833A1/en
Priority to ZA2021/02495A priority patent/ZA202102495B/en
Priority to US17/463,146 priority patent/US11882304B2/en
Priority to US18/527,169 priority patent/US20240107050A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation

Definitions

  • the embodiments of the present application relate to the field of video coding and decoding technologies, and in particular to an image coding and decoding method, an encoder, a decoder, and a storage medium.
  • MIP Matrix-based Intra Prediction
  • the parameters used by brightness blocks of different sizes may also be different. Therefore, a large storage space is required to store a large number of parameters, and the parameters are searched and called during the prediction process. It also increases the overall time, thereby reducing the coding and decoding efficiency.
  • the embodiments of the present application provide an image encoding and decoding method, an encoder, a decoder, and a storage medium, which can reduce the storage space and overall time required in the encoding and decoding process on the basis of ensuring the encoding and decoding performance, and effectively improve the encoding and decoding process. Decoding efficiency.
  • the embodiment of the present application provides an image coding method, which is applied to an encoder, and the method includes:
  • the current block is encoded.
  • the embodiment of the present application provides an image decoding method, which is applied to a decoder, and the method includes:
  • the coding mode of the current block is MIP mode, determine the first offset according to the size of the current block;
  • the reconstruction value of the current block is determined.
  • An embodiment of the present application provides an encoder, which includes: a first determining part, a first calculating part, and an encoding part,
  • the first determining part is configured to determine the size of the current block; and when the current block is encoded in the MIP mode, determine the first offset according to the size of the current block;
  • the first calculation part is configured to calculate a second offset by using the first offset and the reconstructed value of the neighboring pixel corresponding to the current block;
  • the first determining part is further configured to determine the first prediction value of the current block according to the second offset
  • the encoding part is configured to encode the current block based on the first predicted value.
  • An embodiment of the present application provides a decoder, which includes: an analysis part, a second determination part, and a second calculation part,
  • the parsing part is configured to analyze the code stream to obtain the current block size and encoding mode
  • the second determining part is configured to determine the first offset according to the size of the current block when the coding mode of the current block is the MIP mode;
  • the second calculation part is configured to calculate a second offset by using the first offset and the reconstructed value of the neighboring pixel corresponding to the current block;
  • the second determining part is further configured to determine the first prediction value of the current block according to the second offset; and determine the reconstruction value of the current block based on the first prediction value.
  • An embodiment of the present application provides an encoder.
  • the encoder includes a first processor, a first memory storing executable instructions of the first processor, a first communication interface, and a first communication interface for connecting to the first processor.
  • the embodiment of the present application provides a decoder, the decoder includes a second processor, a second memory storing executable instructions of the second processor, a second communication interface, and a second communication interface for connecting to the second processor.
  • the embodiment of the present application provides a computer-readable storage medium with a program stored thereon and applied to an encoder and a decoder.
  • the program is executed by a processor, the image encoding and decoding method described above is implemented.
  • the embodiments of the application provide an image encoding and decoding method, an encoder, a decoder, and a storage medium.
  • the encoder determines the size of the current block; when the current block is encoded in the MIP mode, the first block is determined according to the size of the current block. Offset; use the first offset and the reconstruction value of the neighboring pixels corresponding to the current block to calculate the second offset; determine the first predicted value of the current block according to the second offset; based on the first predicted value , To encode the current block.
  • the decoder parses the code stream to obtain the size and coding mode of the current block; when the coding mode of the current block is MIP mode, the first offset is determined according to the size of the current block; the first offset and the corresponding value of the current block are used Calculate the second offset based on the reconstructed value of the neighboring pixels; determine the first predicted value of the current block according to the second offset; determine the reconstructed value of the current block based on the first predicted value.
  • the image encoding and decoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when encoding and decoding using the MIP mode, and then the first offset can be used
  • the current block is encoded and decoded based on the corresponding relationship between the pre-stored index sequence number and the offset in this application. After the MIP block size index sequence number corresponding to the current block size is determined, the index sequence number corresponding to the current block size can be directly obtained.
  • the first offset corresponding to the index number of the MIP block size thereby reducing the complexity of the MIP algorithm during encoding and decoding processing, and reducing the storage space and storage space required in the encoding and decoding process while ensuring the encoding and decoding performance.
  • the overall time effectively improving the coding and decoding efficiency.
  • Figure 1 is a schematic diagram of the arrangement of 67 prediction modes in intra prediction
  • Figure 2 is a schematic flow chart of encoding in MIP mode
  • FIG. 3 is a schematic diagram of the arrangement of the adjacent brightness block on the upper side and the adjacent brightness block on the left side of the current block;
  • Figure 4 is a schematic diagram of the arrangement of determining the DM mode
  • Figure 5 is a schematic diagram of the structure of a video encoding system
  • Figure 6 is a schematic diagram of the structure of a video decoding system
  • Fig. 7 is a schematic diagram of an implementation process of an image coding method
  • Fig. 8 is a schematic diagram of an implementation process of an image decoding method
  • Fig. 9 is a schematic diagram 1 of the composition structure of the encoder.
  • Figure 10 is a second schematic diagram of the composition of the encoder
  • Figure 11 is a schematic diagram of the structure of the decoder
  • Figure 12 is a second schematic diagram of the structure of the decoder.
  • VVC accepted the ray-like weighted intra prediction technology (Affine Linear Weighted Intra Prediction) proposed in the Joint Video Experts Team (JVET)-N0217, and changed its name to matrix-based intra prediction , Namely MIP technology, this technology adds a different number of matrix-based intra prediction modes in the intra-frame brightness prediction process according to the different size of the intra-frame luminance coding block.
  • JVET Joint Video Experts Team
  • VVC expands the 33 kinds of intra-frame brightness prediction angle modes defined in the video compression standard (High Efficiency Video Coding, HEVC) to 65 kinds.
  • Figure 1 shows the intra-frame prediction.
  • these 67 prediction modes are referred to as traditional intra prediction modes.
  • MIP is a neural network-based intra-frame prediction technology, which uses a multi-layer neural network to predict the brightness value of the current block based on adjacent reconstructed pixels. Specifically, the MIP technology divides the brightness coding blocks into three categories according to the size of the intra-frame brightness coding block, and set the brightness coding block size as W ⁇ H, where W is the width parameter and H is the height parameter, according to the size of the brightness coding block Luma coding blocks can be divided into three categories:
  • Luminance coding blocks with a size of 4 ⁇ 4 belong to the first type of luminance block
  • 8 ⁇ 4, 4 ⁇ 8 and 8 ⁇ 8 luminance coding blocks are classified as the second type of luminance block
  • other sizes of luminance coding blocks belong to the third type. Brightness block.
  • MIP technology is only applied to intra-frame brightness prediction.
  • the input of MIP prediction is also the previous row and left column of the current block, and the output is the predicted value of the current block.
  • the specific prediction process is divided into three Steps: averaging, matrix vector multiplication and interpolation. In other words, by performing these three operations on the input reconstructed luminance values of the adjacent pixels in the upper row and the left column, the predicted value of the luminance component of the current block can be obtained.
  • FIG. 2 is a schematic diagram of the flow of encoding in MIP mode. As shown in Figure 2, the specific implementation of brightness prediction in MIP mode is as follows:
  • Step 1 Perform averaging operation on the adjacent reference points on the upper side of the current block to obtain the vector bdry top with a total of N values; perform averaging operation on the adjacent reference points on the left side of the current block to obtain the vector bdry left with a total of N values.
  • N the first type of luminance coding
  • the vector bdry top and the vector bdry left form a new vector bdry red and perform subsequent operations;
  • Step 2 Obtain the corresponding matrix A k and the offset b k through the mode number k of the MIP mode, and obtain the partial prediction value of the current block identified by the cross line as shown in Figure 2 through the following formula (1):
  • Pred red A k ⁇ bdry red +b k (1)
  • the third step through linear interpolation, the remaining prediction value Predred in the current block is obtained.
  • a mode whether it is a traditional mode or a MIP mode; if it is a traditional mode, which one is the specific traditional mode; if it is a MIP mode, which is the specific MIP mode.
  • VVC intra-frame prediction the rate-distortion cost RDcost of 67 traditional modes and M MIP modes is compared for each luminance coding block, and the optimal mode is selected from the 67 traditional modes and M MIP modes and performed coding.
  • VVC uses an intra mode coding technique based on the Most Probable Modes List (MPM).
  • the optimal mode selected by the current block is the traditional mode, it is necessary to construct an MPM list containing the 6 most likely traditional modes;
  • the optimal mode selected by the block is the MIP mode, and a MIPMPM list containing the 3 most probable MIP modes needs to be constructed.
  • Fig. 3 is a schematic diagram of the arrangement of the adjacent luminance block on the upper side of the current block and the adjacent luminance block on the left side. As shown in Fig. 3, the above two lists are based on the upper neighbouring The optimal mode of the luminance block (A) and the adjacent luminance block (L) on the left is derived.
  • the MIPMPM list in VVC intra prediction, if the optimal mode of the current block is the MIP mode, the MIPMPM list needs to be constructed. In the process of constructing the MIPMPM list, it is first necessary to obtain the MIP mode ABOVE_MIP corresponding to the optimal mode of the upper adjacent luminance block and the MIP mode LEFT_MIP corresponding to the optimal mode of the adjacent luminance block on the left.
  • MIPMPM the number in MIPMPM is the number of the MIP mode, and the number range is 0 to (M-1)
  • M-1 the number in MIPMPM is the number of the MIP mode
  • the number range is 0 to (M-1)
  • the default list of the first type of brightness block is: ⁇ 17, 34, 5 ⁇ ;
  • the default list of the second type of brightness block is: ⁇ 0, 7, 16 ⁇ ;
  • the default list of the third type of luminance block is: ⁇ 1, 4, 6 ⁇ .
  • FIG 4 is a schematic diagram of determining the arrangement of the DM mode. As shown in Figure 4, since the MIP technology is only applied to the luma coding block, when the frame at the CR position in Figure 4 When the intra prediction mode is the MIP mode, the MIP mode needs to be mapped to the traditional mode through the "MIP-traditional mapping table" to perform intra-frame prediction of the current chrominance block. Table 1 is the MIP-traditional mapping table.
  • the traditional mode needs to be mapped to the MIP mode in the construction of the MIPMPM list, and the MIP mode needs to be mapped to the traditional mode in the construction of the MPM list and the determination of the DM mode.
  • mapping from the MIP mode to the traditional mode needs to be used in the MPM list construction process and the DM mode acquisition process.
  • 35/19/11 MIP modes are mapped into 67 traditional modes through the "MIP-Traditional Mapping Table".
  • MIP-Traditional Mapping Table For the three types of luminance blocks, three "MIP-traditional mapping tables" are shown in Table 2, Table 3, and Table 4.
  • MIP mode 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
  • Traditional model 0 1 0 1 0 twenty two 18 18 1 0 1 0 1 0 44 0 50 1 0
  • FIG. 5 is a schematic structural diagram of a video encoding system.
  • the video encoding system 100 includes a transform and quantization module 101, an intra-frame estimation module 102, an intra-frame prediction module 103, a motion compensation module 104, and a motion estimation module 105, Inverse transform and inverse quantization module 106, filter control analysis module 107, deblocking filter and sample adaptive indentation (Sample Adaptive Offset, SAO) filter module 108, header information coding and context-based adaptive binary arithmetic coding (Context- Based on Adaptive Binary Arithmatic Coding, CABAC) encoding module 109 and decoded image buffer module 110;
  • Figure 6 is a schematic diagram of the structure of the video decoding system, as shown in Figure 6, the video decoding system 200 includes header information decoding and CABAC decoding module 201 , Inverse transform and inverse quantization module 202, intra-frame prediction module 203, motion compensation module 204, deblocking filter and SAO filter module 205, de
  • the video image passes through the transformation and quantization module 101, the intra-frame estimation module 102, the intra-frame prediction module 103, the motion compensation module 104, the motion estimation module 105, the deblocking filtering and SAO filtering module 108, the header information encoding and CABAC in the video encoding system 100
  • the module 109 and other parts it outputs the code stream of the video image;
  • the code stream is input into the video decoding system 200, and passes through the header information decoding and CABAC decoding module 201 in the video decoding system 200, the inverse transform and inverse quantization module 202, and the intra-frame
  • the prediction module 203 and the motion compensation module 204 perform partial processing, and finally restore the original video image.
  • the current block can have 25 sizes.
  • the standard specifies that the maximum size of the brightness block is 128 ⁇ 128, but since the maximum size of the transform unit is 64 ⁇ 64, that is, the brightness block is at 128 ⁇ Under the size of 128, quadtree division must be performed first, so the maximum luminance block size is 64 ⁇ 64.
  • Table 5 is a schematic table of the size of the brightness block, as shown in Table 5.
  • the MIP mode is restricted according to the height parameter and the width parameter of the current block. Specifically, if the aspect ratio of the current block is greater than 4, or the aspect ratio is greater than 4, the current block is not encoded in the MIP mode.
  • Table 6 is the limitation of the brightness block size in the MIP mode in the prior art, as shown in Table 6,
  • the first type of brightness block in the MIP mode (corresponding to a 4 ⁇ 4 brightness block), there are two upper and left neighboring brightness blocks each. After matrix operation, a 4 ⁇ 4 prediction block is generated ; In the second type of brightness block in MIP mode (corresponding to 4 ⁇ 8, 8 ⁇ 4, 8 ⁇ 8 brightness blocks), there are 4 upper and left neighboring brightness blocks each, after matrix operation, 4 ⁇ 4 prediction blocks; in the third type of brightness block in the MIP mode (corresponding to brightness blocks of other sizes), there are 4 upper and left adjacent brightness blocks each. After matrix operation, a 4 ⁇ 8 prediction block ( 4 ⁇ 16 brightness block), 8 ⁇ 4 prediction block (16 ⁇ 4 brightness block) or 8 ⁇ 8 prediction block (other size brightness block). Among them, since the third type of luminance blocks will generate non-square prediction blocks, it is necessary to extract odd rows of the matrix during calculation.
  • MipSizeId can be used to indicate the application category of MIP, that is, MipSizeId is the MIP block size index number, numModes indicates the number of MIP modes, boundarySize indicates the number of brightness blocks in the upper reference row or left reference column obtained by downsampling , PredW represents the width parameter of the prediction block, predH represents the height parameter of the prediction block, and predC represents the side length of the MIP matrix.
  • Table 7 shows the grammatical relationship corresponding to the MIP mode in the prior art. As shown in Table 7, MipSizeId, numModes, boundarySize, predW, predH, and predC in the grammar have the following relationships:
  • the value of the MIP block size index number is 0 for 4 ⁇ 4 brightness blocks, the value 1 is for 4 ⁇ 8, 8 ⁇ 4, 8 ⁇ 8 brightness blocks, and the value is 2 for other The size of the brightness block.
  • numModes indicates how many MIP prediction modes there will be, that is, there are 35 types of 4 ⁇ 4 brightness blocks, 19 types of 4 ⁇ 8, 8 ⁇ 4, and 8 ⁇ 8 brightness blocks, and a total of 11 types of brightness blocks of other sizes.
  • the boundarySize indicates that the adjacent luminance blocks in the upper or left column of the current block are finally down-sampled into 2 or 4 adjacent luminance blocks.
  • mWeight and vBias are weight matrices and bias matrices trained through deep learning for each MIP mode.
  • mWeight is the weight matrix of each type of MIP mode
  • vBias is the bias matrix of each type of MIP mode.
  • sB is the left shift amount of the bias matrix
  • oW is the rounded reserved value
  • sW is the right shift amount of the overall predicted value. The sW value in different MIP modes needs to be obtained by looking up the table.
  • the encoder uses the variables incW and incH to determine whether the predicted value of odd rows needs to be extracted.
  • the fO variable represents the value to be subtracted from mWeight, specifically:
  • Table 8 is a grammatical description of SW in the prior art. As shown in Table 8, since the value of SW in the MIP mode is a mapping relationship, the value of SW in all modes can be obtained through Table 8.
  • Table 9 is the grammatical description of fO in the prior art. As shown in Table 9, in the calculation process of the predicted value of the MIP mode, the fO variable represents the value of mWeight that needs to be subtracted, and it is necessary to look up the table to obtain the different brightness blocks in the calculation process. The fO value in different MIP modes. mWeight is the weight matrix trained by deep learning for each MIP mode.
  • fO is related to the size of the luminance block and the mode number.
  • fO in Table 9 is related to the brightness block size and mode number, that is to say, the syntax description of fO in different MIP modes is different.
  • the encoder performs brightness prediction through the MIP mode, it is different for different MipSizeIds.
  • the value of fO may be different, which will cause the algorithm to be inconsistent, and the process of querying the above Table 9 increases the time complexity of the algorithm, and the storage of Table 9 also requires storage space. .
  • this application proposes an image coding method.
  • the encoder can set the pre-stored index number and offset, that is, set the corresponding relationship between MipSizeId and fO to achieve The value of the current block fO is only related to the size of the current block, which can make the implementation of MIP more concise and unified; on the other hand, the corresponding relationship between MipSizeId and fO can be stored using a one-dimensional array or a data structure with similar functions to reduce Dimensionality is saved, and the storage space occupied by fO itself is saved.
  • the encoder modifies and updates fO uniformly, it can also use the updated fO to update the corresponding mWeight, so as to avoid coding performance degradation. reduce.
  • the image coding method proposed in this application can affect the intra prediction part in the video coding hybrid framework, that is, it is mainly used in the intra prediction module 103 in video coding and the intra prediction module 203 in video decoding.
  • the encoding end and the decoding end act at the same time.
  • FIG. 7 is a schematic diagram of the implementation flow of the image encoding method.
  • the method for the encoder to perform image encoding may include the following steps:
  • Step 101 Determine the size of the current block.
  • the encoder may first determine the size of the current block, where the current block may be the current encoding block to be encoded, that is, the encoder may first determine the current block size before encoding the current block The specific size of the block.
  • the current block may be a luminance block to be encoded.
  • the size of the current block can include 25 sizes.
  • the standard stipulates that the current block is a maximum of 128 ⁇ 128, but Since the maximum size of the transform unit is 64 ⁇ 64, that is to say, the current block must be divided into a quadtree first under the size of 128 ⁇ 128, therefore, the maximum size of the current block is 64 ⁇ 64.
  • the size of the current block may include (4 ⁇ 4), (4 ⁇ 8), (4 ⁇ 16), (4 ⁇ 32), (4 ⁇ 64) , (8 ⁇ 4), (8 ⁇ 8), (8 ⁇ 16), (8 ⁇ 32), (8 ⁇ 64), (16 ⁇ 4), (16 ⁇ 8), (16 ⁇ 16), ( 16 ⁇ 32), (16 ⁇ 64), (32 ⁇ 4), (32 ⁇ 8), (32 ⁇ 16), (32 ⁇ 32), (32 ⁇ 64), (64 ⁇ 4), (64 ⁇ 8), (64 ⁇ 16), (64 ⁇ 32), (64 ⁇ 64) these 25 sizes.
  • Step 102 When encoding the current block in the MIP mode, determine the first offset according to the size of the current block.
  • the encoder when the encoder uses the MIP mode to encode the current block, it may first determine the first offset corresponding to the current block according to the size of the current block. Among them, based on the above formula (2), the first offset corresponding to the current block may be f0 representing the value to be subtracted from the weight matrix mWeight.
  • the encoder may be set with different first offsets for encoding processing. Specifically, the encoder may first determine the MIP block size index sequence number corresponding to the current block according to the current block size, and then may further determine the first offset corresponding to the current block according to the MIP block size index sequence number.
  • the MIP block size index sequence number of the current block is the MipSizeId determined according to the size of the current block
  • the first offset of the current block is the value of the parameter that needs to be subtracted from the mWeight of the current block. fO.
  • the encoder determines the MIP block size index sequence number corresponding to the current block according to the size of the current block, it can be specifically performed based on the following steps:
  • the encoder may be preset with the corresponding relationship between MipSizeId and fO, that is, the encoder is set with the corresponding relationship between the pre-stored index number and the offset. Therefore, the encoder determines that the current block corresponds to After the MIP block size index sequence number of the MIP block, the first offset corresponding to the current block can be obtained by mapping based on the corresponding relationship between the pre-stored index sequence number and the offset.
  • the encoder can directly use the MIP block size index sequence number corresponding to the current block to determine the first offset corresponding to the current block, so that it can further Use the first offset to perform encoding processing.
  • the encoder may first set the correspondence between the pre-stored index number and the offset. In other words, the encoder needs to set different fO for different MipSizeId first.
  • the encoder can set the corresponding relationship between the pre-stored index number and the offset, for the brightness blocks of the same MipSizeId, the encoder can set the f0 corresponding to these brightness blocks to The same value. That is to say, in this application, the encoder can uniformly set f0 corresponding to luminance blocks with the same MipSizeId.
  • Table 10 shows the corresponding relationship between the pre-stored index number and the offset.
  • the encoder can directly set the same fO to the same MipSizeId, so that when the encoder encodes the current block, it can Determine the value of the corresponding first offset directly according to the MIP block size index number corresponding to the current block; for example, if the size of the current block is 4 ⁇ 4, the encoder can determine the MIP block size index number corresponding to the current block If the value is 0, the encoder can determine that the first offset corresponding to the current block is 66 through the correspondence between MipSizeId and fO shown in Table 10.
  • Table 11 shows the corresponding relationship between the pre-stored index number and the offset.
  • the encoder can directly set the same fO to the same MipSizeId, so that the encoder can directly encode the current block according to
  • the MIP block size index sequence number corresponding to the current block determines the value of the corresponding first offset. For example, if the size of the current block is 4 ⁇ 4, the encoder can determine the value of the MIP block size index sequence number corresponding to the current block If the value is 1, the encoder can determine that the first offset corresponding to the current block is 34 through the correspondence between MipSizeId and f0 shown in Table 11.
  • the encoder when the encoder sets the corresponding relationship between the pre-stored index number and the offset, it can first determine the different MIP modes of the same MipSizeId based on the original fO syntax description The fO with the largest value among the fO corresponding to the number modeId is determined, and then the fO with the largest value is determined as the first offset corresponding to the one MipSizeId. For example, based on the original fO grammatical description shown in Table 9, it can be determined that when MipSizeId is 0, the fO with the largest value is 66 when the mode number modeId is 15.
  • the encoder can set MipSizeId to 0 for all modes
  • the fO corresponding to the number modeId is set to 66, that is, the corresponding relationship between MipSizeId of 0 and fO of 66 is established; accordingly, based on the original syntax description of fO as shown in Table 9, it can be determined that when MipSizeId is 1, the value The largest fO is 45 when the mode number modeId is 3.
  • the encoder can set the fO corresponding to all the mode numbers modeId with MipSizeId of 1 to 45, that is, establish the corresponding relationship between MipSizeId of 1 and fO of 45; Ground, based on the original syntax description of fO as shown in Table 9, it can be determined that when MipSizeId is 2, the fO with the largest value is 46 when the mode number modeId is 1. Therefore, the encoder can set all the values when MipSizeId is 2.
  • the fO corresponding to the mode number modeId is all set to 46, that is, the corresponding relationship between MipSizeId of 2 and fO of 46 is established. That is, Table 10 above is obtained.
  • the encoder does not need to determine the MipSizeId and modeId corresponding to the current block at the same time before using the above Table 10 and Table 11 to obtain fO. It only needs to determine the MipSizeId using the size of the current block to obtain the corresponding MipSizeId. fO.
  • the encoder can use a one-dimensional array or a data structure with similar functions.
  • the corresponding relationship between MipSizeId and fO is stored. Compared with Table 9 above, the dimension of the array is reduced, and the storage space occupied by the array itself is saved.
  • Step 103 Calculate the second offset using the first offset and the reconstructed value of the neighboring pixel corresponding to the current block.
  • the encoder after the encoder determines the first offset according to the size of the current block, it can use the first offset and the reconstruction value of the neighboring pixels corresponding to the current block to calculate the second offset.
  • the second offset may be the oW in the above formula (2), specifically, the second offset may be the offset for controlling the bit shift operation, for example, the oW in the above formula (2) is rounding
  • the retention value of can be calculated by the above formula (3).
  • the encoder determines the MIP block size index sequence number corresponding to the current block according to the size of the current block, and determines the current block corresponding to the corresponding relationship between the prestored index sequence number and the offset.
  • the second offset corresponding to the current block can be calculated by using the first offset based on the above formula (3). Specifically, when the encoder determines the second offset, it also needs to use the reconstructed value of the neighboring pixel corresponding to the current block for calculation.
  • Step 104 Determine the first prediction value of the current block according to the second offset.
  • the encoder after the encoder calculates the second offset based on the first offset and the reconstruction value of the adjacent pixel corresponding to the current block, it can determine the current block corresponding to the second offset according to the second offset.
  • the first predicted value after the encoder calculates the second offset based on the first offset and the reconstruction value of the adjacent pixel corresponding to the current block, it can determine the current block corresponding to the second offset according to the second offset. The first predicted value.
  • the encoder when the encoder determines the first prediction value of the current block according to the second offset, it may first calculate the preset position in the current block through the second offset. The second predicted value of the pixel; then the second predicted value can be filtered, so that the first predicted value of all pixels in the current block can be obtained.
  • the preset position may be a specific position in the current block, specifically, the preset position may be a specific position of some pixels in the current block. That is to say, in this application, the encoder calculates the second predicted value by using the second offset, not the predicted value of all pixels in the current block, but the predicted value of some pixels at specific locations in the current block.
  • the second predicted value may be filtered, thereby The predicted value of all pixels in the current block can be obtained, that is, the first predicted value corresponding to the current block can be obtained.
  • the second offset may be used to control the offset of the bit shift operation in the process of calculating the second predicted value.
  • Step 105 Encode the current block based on the first predicted value.
  • the encoder after the encoder determines the first prediction value of the current block according to the second offset, it can perform coding processing on the current coding block based on the first prediction value, so as to obtain the current block corresponding The code stream.
  • the encoder when the encoder encodes the current block based on the first predicted value, it can first calculate the prediction difference between the original value of the current block and the first predicted value, and then can predict The difference is encoded.
  • the encoder when the encoder encodes the current block, it does not directly encode the first predicted value of the current block, but is based on the first predicted value and the corresponding value of the current block. For the original value, determine the difference between the two, that is, the prediction difference, and then encode the prediction difference, which can effectively improve the coding and decoding efficiency.
  • the embodiment of the present application provides an image encoding method.
  • the encoder determines the size of the current block; when the current block is encoded in the MIP mode, the first offset is determined according to the size of the current block; the first offset is used Calculate the second offset according to the reconstructed value of the neighboring pixels corresponding to the current block; determine the first predicted value of the current block according to the second offset; and encode the current block based on the first predicted value.
  • the image encoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when encoding in the MIP mode, and then the first offset can be used to The current block is encoded.
  • the MIP block size index number corresponding to the current block size can be directly obtained after the MIP block size index number is determined.
  • the first offset corresponding to the index number thereby reducing the complexity of the MIP algorithm during encoding processing, can reduce the storage space and overall time required in the encoding process on the basis of ensuring the encoding performance, and effectively improve Coding efficiency.
  • the encoder since the encoder is preset with the corresponding relationship between the pre-stored index number and the offset, when the encoder encodes the current block, it only needs to be based on the size of the current block. After determining the MIP block size index serial number corresponding to the current block, the corresponding first offset can be determined by using the corresponding relationship between the pre-stored index serial number and the offset.
  • the encoder can directly determine the value of fO according to MipSizeId, and does not need to determine the value of fO according to the values of the two variables MipSizeId and modeId, which can greatly reduce the computational complexity and save the storage of MipSizeId
  • fO in the above formula (2) represents the value of mWeight that needs to be subtracted, and the current block can be obtained by querying the correspondence between MipSizeId, modeId, and fO shown in Table 9 above. It can be seen that the value of fO is related to the size and mode number of the current block, which results in the inconsistency of the algorithm. At the same time, the corresponding relationship between MipSizeId, modeId and fO in Table 9 is also stored. Need to take up more storage space.
  • this application only needs to store the corresponding relationship between MipSizeId and fO, and for the same MipSizeId, even if the modeId is different, the value of the corresponding fO is the same, thus saving storage space and reducing The complexity of the operation.
  • the present application simplifies the syntax of the MIP prediction calculation process, and uniformly modifies the fO of the same MipSizeId, that is, it only needs to determine the size of the current block according to the current block size. The corresponding fO.
  • the encoder when the encoder simplifies the syntax of the MIP prediction calculation process, it can also directly set the fO corresponding to any brightness block of different MipSizeId and different modeId to the same value. That is to say, fO is a fixed value, cancel the correlation between the size of the brightness block and fO, define fO in all cases as a uniform value, and no longer store the table related to fO, which can further reduce the complexity of the MIP algorithm It reduces the storage space of the algorithm and makes the implementation and grammar of MIP technology more concise and unified.
  • the encoder needs to modify the value of mWeight correspondingly while modifying f0 uniformly. Specifically, after setting the correspondence between the pre-stored index number and the offset, the encoder can add the increased part of fO in the corresponding mode to each weight value in the weight matrix mWeight corresponding to the current block, that is, it can correct Each original weight value in the original mWeight corresponding to the mWeight of the current block plus the updated fO can keep the coding performance completely unchanged. That is to say, the encoder can use fO to update the mWeight accordingly, so that While reducing storage space and reducing computational complexity, the coding performance can be kept basically unchanged, and the prediction calculation result can be kept unchanged at the same time.
  • the encoder when the encoder uses fO to update mWeight accordingly, if there is a weight value greater than the preset weight threshold in the updated mWeight, the weight value can be set Is less than or equal to the preset weight threshold. For example, the encoder sets the preset weight threshold to the upper limit of 7-bit binary number 127. If there is a weight value greater than 127 in the updated mWeight, the weight value greater than 127 can be modified to Less than or equal to the preset weight threshold, such as setting it to 127.
  • the method of reducing sW can also be used to keep all the weight values in the updated mWeight at the preset value. Set the weight within the range of the threshold.
  • the pseudo code shown in formula (9) can also be used to calculate the value of the p[0] parameter, that is, the formula (9) can be used to replace the formula ( 6) It is understandable that the calculation method using formula (9) can reduce the dynamic range of the data in the MIP matrix:
  • the encoder when updating the original mWeight corresponding to mWeight, in order to reduce the dynamic range of the data in the MIP matrix, the encoder uses formula (9) to replace formula (6).
  • the encoder can continue to update the initial update mWeight of the luminance block whose MIP mode number modeId is 1 by using f0 with a value of 34. That is, based on the above Table 15, add 34 to each weight value in Table 15, and output The updated mWeight can be obtained as shown in Table 17.
  • the encoder can set the pre-stored index number and offset, that is, by setting the corresponding relationship between MipSizeId and fO, to achieve the current block fO during encoding.
  • the value is only related to the size of the current block, which can make the implementation of MIP more concise and unified; on the other hand, the corresponding relationship between MipSizeId and fO can be stored using a one-dimensional array or a data structure with similar functions, which reduces the dimensionality and saves The storage space occupied by fO itself; on the other hand, when the encoder performs unified modification and update to fO, it can also use the updated fO to update the corresponding mWeight, so as to avoid the degradation of encoding performance.
  • the embodiment of the present application provides an image encoding method.
  • the encoder determines the size of the current block; when the current block is encoded in the MIP mode, the first offset is determined according to the size of the current block; the first offset is used Calculate the second offset according to the reconstructed value of the neighboring pixels corresponding to the current block; determine the first predicted value of the current block according to the second offset; and encode the current block based on the first predicted value.
  • the image encoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when encoding in the MIP mode, and then the first offset can be used to The current block is encoded.
  • the MIP block size index number corresponding to the current block size can be directly obtained after the MIP block size index number is determined.
  • the first offset corresponding to the index number thereby reducing the complexity of the MIP algorithm during encoding processing, can reduce the storage space and overall time required in the encoding process on the basis of ensuring the encoding performance, and effectively improve Coding efficiency.
  • FIG. 8 is a schematic diagram of the implementation flow of the image decoding method.
  • the method for the decoder to perform image decoding may include the following steps:
  • Step 201 Parse the code stream to obtain the size and coding mode of the current block.
  • the decoder may first determine the size and encoding mode of the current block, where the current block may be the current encoding block to be decoded, that is, before the decoder decodes the current block, it may first Determine the specific size and coding mode of the current block.
  • the coding mode of the current block may be 67 traditional intra prediction modes or MIP modes.
  • the current block may be a luminance block to be decoded.
  • the size of the current block can include 25 sizes.
  • the standard stipulates that the current block is a maximum of 128 ⁇ 128, but Since the maximum size of the transform unit is 64 ⁇ 64, that is to say, the current block must be divided into a quadtree first under the size of 128 ⁇ 128, therefore, the maximum size of the current block is 64 ⁇ 64.
  • Step 202 When the coding mode of the current block is the MIP mode, determine the first offset according to the size of the current block.
  • the decoder may first determine the first offset corresponding to the current block according to the size of the current block. Among them, based on the above formula (2), the first offset corresponding to the current block may be f0 representing the value to be subtracted from mWeight.
  • the decoder may set different first offsets for decoding processing. Specifically, the decoder may first determine the MIP block size index sequence number corresponding to the current block according to the current block size, and then may further determine the first offset corresponding to the current block according to the MIP block size index sequence number.
  • the MIP block size index sequence number of the current block is the MipSizeId determined according to the size of the current block
  • the first offset of the current block is the value of the parameter that needs to be subtracted from the mWeight of the current block. fO.
  • the decoder determines the MIP block size index sequence number corresponding to the current block according to the size of the current block, it can specifically proceed based on the following steps:
  • the decoder may be preset with the corresponding relationship between MipSizeId and fO, that is, the decoder is set with the corresponding relationship between the pre-stored index number and the offset. Therefore, the decoder is determining the corresponding relationship between the current block After the MIP block size index sequence number of the MIP block, the first offset corresponding to the current block can be obtained by mapping based on the correspondence between the pre-stored index sequence number and the offset.
  • the corresponding first offset is also the same, that is, in the embodiment of the present application, when the decoder uses the MIP mode to decode the current block, the decoder can directly use the MIP block size index sequence number corresponding to the current block to determine the first offset corresponding to the current block, thereby further The first offset is used for decoding processing.
  • the decoder may first set the correspondence between the pre-stored index number and the offset. In other words, the decoder needs to first set different fO for different MipSizeId.
  • the decoder can set the corresponding relationship between the pre-stored index number and the offset, for the brightness blocks of the same MipSizeId, the decoder can set the f0 corresponding to these brightness blocks to The same value. That is to say, in this application, the decoder can uniformly set f0 corresponding to luminance blocks with the same MipSizeId. For example, in Table 10, if the size of the current block is 4 ⁇ 4, the decoder can determine that the MIP block size index number corresponding to the current block is 0, and the decoder can use the corresponding relationship between MipSizeId and fO as shown in Table 10.
  • the decoder determines the first offset corresponding to the current block, it does not need to be based on the two variables MipSizeId and MIP mode number modeId.
  • the value of determines the first offset corresponding to the current block, and the first offset corresponding to the current block can be obtained only according to a parameter of MipSizeId, which can reduce the complexity of the operation and save the storage for storing the table as described above.
  • 9 is an example of the storage overhead of a two-dimensional table of fO.
  • the decoder when the decoder sets the correspondence between the pre-stored index number and the offset, it can first determine the different MIP modes of the same MipSizeId based on the original fO syntax description The fO with the largest value among the fO corresponding to the number modeId is determined, and then the fO with the largest value is determined as the first offset corresponding to the one MipSizeId. For example, based on the original fO syntax description shown in Table 9, it can be determined that when MipSizeId is 0, the fO with the largest value is 66 when the mode number modeId is 15.
  • the decoder can set MipSizeId to 0 for all modes
  • the fO corresponding to the number modeId is set to 66, that is, the corresponding relationship between MipSizeId of 0 and fO of 66 is established; accordingly, based on the original syntax description of fO as shown in Table 9, it can be determined that when MipSizeId is 1, the value The largest fO is 45 when the mode number modeId is 3.
  • the decoder can set the fO corresponding to all the mode numbers modeId with MipSizeId of 1 to 45, that is, establish the corresponding relationship between MipSizeId of 1 and fO of 45; correspondingly; Ground, based on the original fO grammatical description shown in Table 9, it can be determined that when MipSizeId is 2, the fO with the largest value is 46 when the mode number modeId is 1. Therefore, the decoder can set all the values when MipSizeId is 2.
  • the fO corresponding to the mode number modeId is all set to 46, that is, the corresponding relationship between MipSizeId of 2 and fO of 46 is established. That is, Table 10 above is obtained.
  • the decoder does not need to determine the MipSizeId and modeId corresponding to the current block at the same time before using the above-mentioned Table 10 and Table 11 to obtain fO. It only needs to determine the MipSizeId by using the size of the current block to obtain the corresponding MipSizeId. fO.
  • the decoder can use a one-dimensional array or a data structure with similar functions to pair The corresponding relationship between MipSizeId and fO is stored. Compared with Table 9 above, the dimension of the array is reduced, and the storage space occupied by the array itself is saved.
  • Step 203 Calculate the second offset by using the first offset and the reconstructed value of the neighboring pixel corresponding to the current block.
  • the decoder after the decoder determines the first offset according to the size of the current block, it can use the first offset and the reconstruction value of the neighboring pixels corresponding to the current block to calculate the second offset.
  • the second offset may be the oW in the above formula (2), specifically, the second offset may be the offset for controlling the bit shift operation, for example, the oW in the above formula (2) is rounding
  • the retention value of can be calculated by the above formula (3).
  • the decoder determines the MIP block size index sequence number corresponding to the current block according to the size of the current block, and determines the current block corresponding to the corresponding relationship between the prestored index sequence number and the offset.
  • the second offset corresponding to the current block can be calculated by using the first offset based on the above formula (3).
  • the decoder determines the second offset, it also needs to use the reconstructed value of the neighboring pixel corresponding to the current block for calculation.
  • Step 204 Determine the first prediction value of the current block according to the second offset.
  • the decoder after the decoder calculates the second offset based on the first offset and the reconstruction value of the neighboring pixels corresponding to the current block, it can determine the current block corresponding to the second offset according to the second offset. The first predicted value.
  • the decoder when the decoder determines the first prediction value of the current block according to the second offset, it may first calculate the preset position in the current block through the second offset. The second predicted value of the pixel; then the second predicted value can be filtered, so that the first predicted value of all pixels in the current block can be obtained.
  • the preset position may be a specific position in the current block, specifically, the preset position may be a specific position of some pixels in the current block. That is to say, in this application, the decoder calculates the second predicted value through the second offset, not the predicted value of all pixels in the current block, but the predicted value of some pixels at specific locations in the current block.
  • the second predicted value may be filtered, thereby The predicted value of all pixels in the current block can be obtained, that is, the first predicted value corresponding to the current block can be obtained.
  • the second offset may be used to control the offset of the bit shift operation in the process of calculating the second predicted value.
  • Step 205 Based on the first predicted value, decode the current block.
  • the decoder after the decoder determines the first predicted value of the current block according to the second offset, it can perform decoding processing on the current decoded block based on the first predicted value, so as to obtain the current block corresponding The code stream.
  • the decoder when the decoder decodes the current block based on the first predicted value, it can first calculate the prediction difference between the original value of the current block and the first predicted value, and then can predict The difference is decoded.
  • the decoder when the decoder decodes the current block, it does not directly decode the first predicted value of the current block, but is based on the first predicted value and the corresponding value of the current block.
  • the original value, the difference between the two is determined, that is, the prediction difference, and then the prediction difference is decoded, which can effectively improve the coding and decoding efficiency.
  • the decoder may first obtain the prediction difference of the current block by parsing the code stream.
  • the decoder after determining the prediction difference of the current block and determining the first prediction value of the current block, the decoder can directly calculate the sum of the first prediction value and the prediction difference, and change The sum value sets the reconstruction value of the current block.
  • the decoder determines the reconstruction value of the current block based on the first prediction value, it can add the first prediction value and the prediction difference to obtain the reconstruction value of the current block to complete the decoding process of the current block. .
  • the embodiment of the application provides an image decoding method.
  • the decoder parses the code stream to obtain the size and coding mode of the current block; when the coding mode of the current block is MIP mode, the first offset is determined according to the size of the current block ; Use the first offset and the reconstruction value of the neighboring pixels corresponding to the current block to calculate the second offset; determine the first predicted value of the current block according to the second offset; determine the current block based on the first predicted value The reconstruction value of the block. It can be seen that the image decoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when decoding using the MIP mode, and then the first offset can be used to The current block is decoded.
  • the MIP block size index number corresponding to the current block size can be directly obtained after the MIP block size index number is determined.
  • the first offset corresponding to the index number can reduce the complexity of the MIP algorithm during the decoding process, and can reduce the storage space and overall time required in the decoding process on the basis of ensuring the decoding performance, and effectively improve Decoding efficiency.
  • FIG. 9 is a schematic diagram of the composition structure of an encoder.
  • the encoder 300 proposed in this embodiment of the present application may include a first determining part 301 and a first determining part 301, A calculation part 302 and an encoding part 303.
  • the first determining part 301 is configured to determine the size of the current block; and when encoding the current block in the MIP mode, determine the first offset according to the size of the current block;
  • the first calculation part 302 is configured to use the first offset and the reconstructed value of the neighboring pixel corresponding to the current block to calculate the second offset;
  • the first determining part 301 is further configured to determine the first predicted value of the current block according to the second offset;
  • the encoding part 303 is configured to encode the current block based on the first predicted value.
  • FIG. 10 is a schematic diagram of the composition structure of the encoder.
  • the encoder 300 proposed in the embodiment of the present application may further include a first processor 304, and a first memory 305 storing executable instructions of the first processor 304 , A first communication interface 306, and a first bus 307 for connecting the first processor 304, the first memory 305, and the first communication interface 306.
  • the above-mentioned first processor 304 is configured to determine the size of the current block; when the current block is encoded in the MIP mode, the first processor 304 is determined according to the size of the current block. Offset; use the first offset and the reconstruction value of the adjacent pixel corresponding to the current block to calculate a second offset; determine the first offset of the current block according to the second offset Predicted value; based on the first predicted value, encode the current block.
  • the functional modules in this embodiment 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 above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this embodiment is essentially or correct
  • the part that the prior art contributes or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer).
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the embodiment of the present application provides an encoder that determines the size of the current block; when encoding the current block in the MIP mode, the first offset is determined according to the size of the current block; the first offset is used Calculate the second offset according to the reconstructed value of the neighboring pixels corresponding to the current block; determine the first predicted value of the current block according to the second offset; and encode the current block based on the first predicted value. It can be seen that the image encoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when encoding in the MIP mode, and then the first offset can be used to The current block is encoded.
  • the MIP block size index number corresponding to the current block size can be directly obtained after the MIP block size index number is determined.
  • the first offset corresponding to the index number thereby reducing the complexity of the MIP algorithm during encoding processing, can reduce the storage space and overall time required in the encoding process on the basis of ensuring the encoding performance, and effectively improve Coding efficiency.
  • FIG. 11 is a schematic diagram of the structure of the decoder.
  • the decoder 400 proposed in this embodiment of the present application may include a parsing part 401, and the second determining Part 402 and the second calculation part 403.
  • the parsing part 401 is configured to analyze the code stream to obtain the current block size and encoding mode
  • the second determining part 402 is configured to determine the first offset according to the size of the current block when the coding mode of the current block is the MIP mode;
  • the second calculation part 403 is configured to use the first offset and the reconstructed value of the neighboring pixel corresponding to the current block to calculate the second offset;
  • the second determining part 402 is further configured to determine the first predicted value of the current block according to the second offset; and determine the reconstructed value of the current block based on the first predicted value.
  • FIG. 12 is a second schematic diagram of the structure of the decoder.
  • the decoder 400 proposed in the embodiment of the present application may further include a second processor 404 and a second memory 405 storing executable instructions of the second processor 404 , A second communication interface 406, and a second bus 407 for connecting the second processor 404, the first memory 405, and the second communication interface 406.
  • the above-mentioned second processor 404 is configured to parse the code stream to obtain the size and coding mode of the current block; when the coding mode of the current block is the MIP mode, according to the current The size of the block, determine the first offset; use the first offset and the reconstruction value of the neighboring pixels corresponding to the current block to calculate the second offset; determine according to the second offset The first predicted value of the current block; and based on the first predicted value, the reconstruction value of the current block is determined.
  • the functional modules in this embodiment 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 above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this embodiment is essentially or correct
  • the part that the prior art contributes or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer).
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the embodiment of the present application provides a decoder that parses the code stream to obtain the size and coding mode of the current block; when the coding mode of the current block is MIP mode, the first offset is determined according to the size of the current block ; Use the first offset and the reconstruction value of the neighboring pixels corresponding to the current block to calculate the second offset; determine the first predicted value of the current block according to the second offset; determine the current block based on the first predicted value The reconstruction value of the block. It can be seen that the image decoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when decoding using the MIP mode, and then the first offset can be used to The current block is decoded.
  • the MIP block size index number corresponding to the current block size can be directly obtained after the MIP block size index number is determined.
  • the first offset corresponding to the index number can reduce the complexity of the MIP algorithm during the decoding process, and can reduce the storage space and overall time required in the decoding process on the basis of ensuring the decoding performance, and effectively improve Decoding efficiency.
  • the embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method as described in the above-mentioned embodiment is implemented.
  • the program instructions corresponding to an image encoding method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc.
  • storage media such as optical disks, hard disks, USB flash drives, etc.
  • the current block is encoded.
  • the program instructions corresponding to an image decoding method in this embodiment can be stored on storage media such as optical disks, hard disks, USB flash drives, etc.
  • storage media such as optical disks, hard disks, USB flash drives, etc.
  • the coding mode of the current block is MIP mode, determine the first offset according to the size of the current block;
  • the reconstruction value of the current block is determined.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of hardware embodiment, software embodiment, or a combination of software and hardware embodiments. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device realizes the functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in one or more processes in the schematic diagram and/or one block or more in the block diagram.
  • the embodiments of the application provide an image encoding and decoding method, an encoder, a decoder, and a storage medium.
  • the encoder determines the size of the current block; when the current block is encoded in the MIP mode, the first block is determined according to the size of the current block. Offset; use the first offset and the reconstructed value of the neighboring pixels corresponding to the current block to calculate the second offset; determine the first predicted value of the current block according to the second offset; based on the first predicted value , To encode the current block.
  • the decoder parses the code stream to obtain the size and coding mode of the current block; when the coding mode of the current block is MIP mode, the first offset is determined according to the size of the current block; the first offset and the corresponding value of the current block are used Calculate the second offset based on the reconstructed value of the neighboring pixels; determine the first predicted value of the current block according to the second offset; determine the reconstructed value of the current block based on the first predicted value.
  • the image encoding and decoding method proposed in this application can directly determine the first offset corresponding to the current block according to the size of the current block when encoding and decoding using the MIP mode, and then the first offset can be used
  • the current block is encoded and decoded based on the corresponding relationship between the pre-stored index sequence number and the offset in this application. After the MIP block size index sequence number corresponding to the current block size is determined, the index sequence number corresponding to the current block size can be directly obtained.
  • the first offset corresponding to the index number of the MIP block size thereby reducing the complexity of the MIP algorithm during encoding and decoding processing, and reducing the storage space and storage space required in the encoding and decoding process while ensuring the encoding and decoding performance.
  • the overall time effectively improving the coding and decoding efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本申请实施例公开了一种图像编解码方法、编码器、解码器以及存储介质,编码器确定当前块的大小;在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,对当前块进行编码。解码器解析码流,获得当前块的大小和编码模式;当当前块的编码模式为MIP模式时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,确定当前块的重建值。

Description

图像编解码方法、编码器、解码器以及存储介质 技术领域
本申请实施例涉及视频编解码技术领域,尤其涉及的是一种图像编解码方法、编码器、解码器以及存储介质。
背景技术
在多功能视频编码(Versatile Video Coding,VVC)的参考软件测试平台中,一种新的帧内编码技术,基于矩阵的帧内预测(Matrix-based Intra Prediction,MIP)被提出,MIP是基于神经网络的帧内预测技术,即利用多层神经网络基于相邻已重建亮度块预测当前块的亮度值。具体地,与传统帧内模式相同,在利用MIP模式进行帧内预测时,MIP预测的输入也为当前块的上一行和左一列相邻亮度块的数据,输出为当前块的亮度分量第一预测值。具体的预测过程分为三步:下采样,矩阵向量乘法和插值。
然而,在通过MIP模式进行亮度预测时,尺寸大小不同的亮度块所采用的参数也有可能不同,因此,需要占用较大的存储空间对大量参数进行存储,且预测过程中对参数的查找和调用也增加了整体时间,从而降低了编解码效率。
发明内容
本申请实施例提供一种图像编解码方法、编码器、解码器以及存储介质,能够在保证编解码性能的基础上,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。
本申请实施例的技术方案是这样实现的:
本申请实施例提供了一种图像编码方法,应用于编码器,所述方法包括:
确定当前块的大小;
在利用MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;
利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
根据所述第二偏移量,确定所述当前块的第一预测值;
基于所述第一预测值,对所述当前块进行编码。
本申请实施例提供了一种图像解码方法,应用于解码器,所述方法包括:
解析码流,获得当前块的大小和编码模式;
当所述当前块的编码模式为MIP模式时,根据所述当前块的大小,确定第一偏移量;
利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
根据所述第二偏移量,确定所述当前块的第一预测值;
基于所述第一预测值,确定所述当前块的重建值。
本申请实施例提供了一种编码器,所述编码器包括:第一确定部分,第一计算部分以及编码部分,
所述第一确定部分,配置于确定当前块的大小;以及在利用MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;
所述第一计算部分,配置于利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
所述第一确定部分,还配置于根据所述第二偏移量,确定所述当前块的第一预测值;
所述编码部分,配置于基于所述第一预测值,对所述当前块进行编码。
本申请实施例提供了解码器,所述解码器包括:解析部分,第二确定部分以及第二计算部分,
所述解析部分,配置于解析码流,获得当前块的大小和编码模式;
所述第二确定部分,配置于当所述当前块的编码模式为MIP模式时,根据所述当前块的大小, 确定第一偏移量;
所述第二计算部分,配置于利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
所述第二确定部分,还配置于根据所述第二偏移量,确定所述当前块的第一预测值;以及基于所述第一预测值,确定所述当前块的重建值。
本申请实施例提供了一种编码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器、第一通信接口,和用于连接所述第一处理器、所述第一存储器以及所述第一通信接口的第一总线,当所述指令被所述第一处理器执行时,实现如如上所述的图像编码方法。
本申请实施例提供了一种解码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器、第二通信接口,和用于连接所述第二处理器、所述第二存储器以及所述第一通信接口的第二总线,当所述指令被所述第二处理器执行时,实现如如上所述的图像解码方法。
本申请实施例提供了一种计算机可读存储介质,其上存储有程序,应用于编码器和解码器中,所述程序被处理器执行时,实现如上所述的图像编解码方法。
本申请实施例提供了一种图像编解码方法、编码器、解码器以及存储介质,编码器确定当前块的大小;在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,对当前块进行编码。解码器解析码流,获得当前块的大小和编码模式;当当前块的编码模式为MIP模式时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,确定当前块的重建值。由此可见,本申请提出的图像编解码方法,在利用MIP模式进行编解码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行编解码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行编解码处理时,降低MIP算法的复杂度,能够在保证编解码性能的基础上,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。
附图说明
图1为帧内预测中的67种预测模式的排布示意图;
图2为MIP模式进行编码的流程示意图;
图3为当前块的上侧相邻亮度块和左侧相邻亮度块的排布示意图;
图4为确定DM模式的排布示意图;
图5为视频编码系统的结构示意图;
图6为视频解码系统的结构示意图;
图7为图像编码方法的实现流程示意图;
图8为图像解码方法的实现流程示意图;
图9为编码器的组成结构示意图一;
图10为编码器的组成结构示意图二;
图11为解码器的组成结构示意图一;
图12为解码器的组成结构示意图二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。
在视频图像中,VVC接受了联合视频专家组(Joint Video Experts Team,JVET)-N0217中提出的仿射线性权重帧内预测技术(Affine Linear Weighted Intra Prediction),并更名为基于矩阵的帧内预测,即MIP技术,该技术针对帧内亮度编码块大小的不同,在帧内亮度预测过程中增加了不同数量的基于矩阵的帧内预测模式。
为了捕捉自然视频中呈现的更精细的边缘方向,VVC中将视频压缩标准(High Efficiency Video Coding,HEVC)中定义的33种帧内亮度预测角度模式扩展到了65种,图1为帧内预测中的67种预测模式的排布示意图,如图1所示,箭头编号为2-66的表示65种帧内角度预测模式,另外还有两种非角度模式,即编号为0的渐变平坦Planar模式和编号为1的直流DC模式;所以,VVC中的帧内预测过程中包含两种非角度模式和65种角度模式,这里,将这67种预测模式称为帧内预测的传统模式。
MIP是基于神经网络的帧内预测技术,即利用多层神经网络基于相邻已重建像素预测当前块的亮度值。具体地,MIP技术根据帧内亮度编码块的大小将亮度编码块分为三类,设亮度编码块大小为W×H,其中,W为宽度参数,H为高度参数,按照亮度编码块的大小可以将亮度编码块分为三类:
大小为4×4的亮度编码块为第一类亮度块,大小为8×4,4×8和8×8的亮度编码块为第二类亮度块,其他大小的亮度编码块为第三类亮度块。
针对这三种类型的帧内亮度编码块,MIP技术在67种传统帧内预测模式的基础上增加了M种MIP模式,其中,针对第一类亮度块,M=35,针对第二类亮度块,M=19,针对第三类亮度块,M=11。
具体来说,MIP技术只应用于帧内亮度预测,与传统模式相同,MIP预测的输入也为当前块的上一行和左一列数据,输出为当前块的预测值,具体的预测过程分为三步:平均,矩阵向量乘法和插值。也就是说,通过对输入的上一行和左一列相邻像素点的重建亮度值进行这三步操作,就可以得到当前块的亮度分量预测值。
图2为MIP模式进行编码的流程示意图,如图2所示,MIP模式进行亮度预测的具体实现如下:
第一步:对当前块的上侧相邻参考点进行平均操作获得向量bdry top,共N个值;对当前块的左侧相邻参考点进行平均操作获得向量bdry left,共N个值。当当前块为第一类亮度编码时,N=2;当当前块为第二类或第三类亮度编码时,N=4。向量bdry top和向量bdry left组成一个新的向量bdry red并进行后续操作;
第二步:通过MIP模式的模式号k获取对应的矩阵A k和偏移量b k,通过下列公式(1)计算获得如图2中用交叉线标识的当前块的部分预测值:
Pred red=A k·bdry red+b k   (1)
第三步:通过线性插值,获得当前块中剩余的预测值Predred。
需要说明的是,针对当前块进行编码的实现过程,需要将帧内预测具体使用的哪一种编码模式写入到压缩码流中,从而使解码端通过解析该模式信息,可以确定具体使用哪一种模式,是传统模式还是MIP模式;若是传统模式,具体是哪一种传统模式;若是MIP模式,具体是哪一种MIP模式。
在VVC的帧内预测中,对每个亮度编码块都会进行67个传统模式和M个MIP模式的率失真代价RDcost比较,在67个传统模式和M个MIP模式中选出最优模式并进行编码。为了节省比特开销,VVC中使用了基于最可能模式列表(Most Probable Modes List,MPM)的帧内模式编码技术。
需要注意的是,由于多参考行技术(extend reference line)和帧内子块划分技术(Intra Sub-Patitionar,ISP)只对MPM列表中的模式使用,所以当extendrefflag和ispflag都为0,即使用0参考行且不进行子块划分时,不必编码mpmflag,直接编码最优模式在MPM列表中的位置。
进一步地,针对MPM列表和MIPMPM列表的构造来说,在VVC亮度帧内预测中,若当前块选中的最优模式是传统模式,则需要构造包含6个最可能传统模式的MPM列表;若当前块选中的最优模式是MIP模式,则需要构造包含3个最可能MIP模式的MIPMPM列表。
图3为当前块的上侧相邻亮度块和左侧相邻亮度块的排布示意图,如图3所示,上述两个列表都是根据如图3所示的当前块的上侧相邻亮度块(A)和左侧相邻亮度块(L)的最优模式进行推导的。
进一步地,针对MIPMPM列表的构造来说,在VVC帧内预测中,若当前块的最优模式是MIP模式,则需要构造MIPMPM列表。构造MIPMPM列表的过程中,首先需要获取上侧相邻亮度块的最优模式所对应的MIP模式ABOVE_MIP和左侧相邻亮度块的最优模式所对应的MIP模式LEFT_MIP模式。
进一步地,在获取到LEFT_MIP和ABOVE_MIP之后,按照如下方法进行包含3个最可能MIPMPM模式的MIPMPM列表的构造,其中,MIPMPM中的编号为MIP模式的编号,编号范围为0至(M-1),对于第一类亮度块编号为0-34;对于第二类亮度块编号为0-18;对于第三类亮度块编号为0-10:
若LEFT_MIP可用(不为-1),将LEFT_MIP放入MIPMPMlist中;
若ABOVE_MIP可用(不为-1),将ABOVE_MIP通过冗余检查后放入MIPMPMlist中;
若LEFT_MIP不可用(为-1),ABOVE_MIP不可用(为-1),根据当前块的类型将默认列表通过冗余检查后添入直到补满MIPMPMlist:
第一类亮度块默认列表为:{17,34,5};
第二类亮度块默认列表为:{0,7,16};
第三类亮度块默认列表为:{1,4,6}。
进一步地,需要补充的是,在VVC的色度帧内预测过程中有一种利用分量间相关性的直接模式(Direct Mode,DM),会使用当前块对应的同位亮度编码块的中心位置的帧内预测模式来进行当前色度块的帧内预测,图4为确定DM模式的排布示意图,如图4所示,由于MIP技术只应用于亮度编码块,所以当图4中CR位置的帧内预测模式为MIP模式时,需要将该MIP模式通过“MIP-传统映射表”映射为传统模式,进行当前色度块的帧内预测,表1为MIP-传统映射表。
表1
Figure PCTCN2019107612-appb-000001
也就是说,由于MIP技术的引入,在帧内预测过程中,在构建MIPMPM列表中,需要将传统 模式映射为MIP模式,在构建MPM列表和确定DM模式中,需要将MIP模式映射为传统模式。
另外,在MPM列表构造过程和DM模式的获取过程中需要使用到MIP模式到传统模式的映射。具体通过“MIP-传统映射表”将35/19/11种MIP模式映射为67种传统模式。针对三种类型的亮度块,三种“MIP-传统映射表”如表2,表3和表4所示。
表2
MIP模式 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
传统模式 0 18 18 0 18 0 12 0 18 2 18 12 18 18 1 18 18 0
MIP模式 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34  
传统模式 0 50 0 50 0 56 0 50 66 50 56 50 50 1 50 50 50  
表3
MIP模式 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
传统模式 0 1 0 1 0 22 18 18 1 0 1 0 1 0 44 0 50 1 0
表4
MIP模式 0 1 2 3 4 5 6 7 8 9 10
传统模式 1 1 1 1 18 0 1 0 1 50 0
图5为视频编码系统的结构示意图,如图5所示,该视频编码系统100包括变换与量化模块101、帧内估计模块102、帧内预测模块103、运动补偿模块104、运动估计模块105、反变换与反量化模块106、滤波器控制分析模块107、去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波模块108、头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmatic Coding,CABAC)编码模块109和解码图像缓存模块110等部件;图6为视频解码系统的结构示意图,如图6所示,该视频解码系统200包括头信息解码及CABAC解码模块201、反变换与反量化模块202、帧内预测模块203、运动补偿模块204、去方块滤波及SAO滤波模块205和解码图像缓存模块206等部件。视频图像经过视频编码系统100中变换与量化模块101、帧内估计模块102、帧内预测模块103、运动补偿模块104、运动估计模块105、去方块滤波及SAO滤波模块108以及头信息编码及CABAC模块109等部分处理之后,输出该视频图像的码流;该码流输入视频解码系统200中,经过视频解码系统200中头信息解码及CABAC解码模块201、反变换与反量化模块202、帧内预测模块203以及运动补偿模块204等部分处理,最终恢复出原来的视频图像。
按照高度参数和宽度参数,当前块可以为25种尺寸,具体地,标准中规定亮度块最大为128×128,但由于变换单元的最大尺寸为64×64,也就是说,亮度块在128×128的尺寸下必定需要先进行四叉树划分,因此最大的亮度块尺寸是64×64。表5为亮度块的尺寸示意表,如表5所示,
表5
(4×4) (4×8) (4×16) (4×32) (4×64)
(8×4) (8×8) (8×16) (8×32) (8×64)
(16×4) (16×8) (16×16) (16×32) (16×64)
(32×4) (32×8) (32×16) (32×32) (32×64)
(64×4) (64×8) (64×16) (64×32) (64×64)
现有技术中,根据当前块的高度参数和宽度参数对MIP模式进行限制,具体地,如果当前块的宽高比大于4,或者高宽比大于4,则不通过MIP模式对当前块进行编码,表6为现有技术中MIP模式下亮度块尺寸的限制,如表6所示,
表6
Figure PCTCN2019107612-appb-000002
现有技术中,在MIP模式的第一类亮度块中(对应于4×4的亮度块),上相邻和左相邻亮度块各2个,经过矩阵运算,生成4×4的预测块;在MIP模式的第二类亮度块中(对应于4×8,8×4,8×8的亮度块),上相邻和左相邻亮度块各4个,经过矩阵运算,生成4×4的预测块;在MIP模式的第三类亮度块中(对应于其他大小的亮度块),上相邻和左相邻亮度块各4个,经过矩阵运算,生成4×8的预测块(4×16的亮度块),8×4的预测块(16×4的亮度块)或8×8的预测块(其他大小的亮度块)。其中,由于第三类亮度块会生成非正方形预测块,因此在计算时需要对矩阵进行奇数行的抽取。
进一步地,在语法中,可以通过MipSizeId表示MIP的应用类别,即MipSizeId为MIP块大小索引序号,numModes表示MIP模式的数量,boundarySize表示下采样获得的上参考行或左参考列的亮度块个数,predW表示预测块的宽度参数,predH表示预测块的高度参数,predC表示MIP的矩阵的边长。表7为现有技术中MIP模式对应的语法关系,如表7所示,语法中的MipSizeId,numModes,boundarySize,predW,predH,predC有以下关系:
表7
MipSizeId numModes boundarySize predW predH predC
0 35 2 4 4 4
1 19 4 4 4 4
2 11 4 Min(nTbW,8) Min(nTbH,8) 8
进一步地,在语法中,MIP块大小索引序号取值为0表示4×4的亮度块,取值为1表示4×8,8×4,8×8的亮度块,取值为2表示其他大小的亮度块。numModes表示一共会有多少种MIP预测模式,即4×4的亮度块共有35种,4×8,8×4,8×8的亮度块共有19种,其他大小的亮度块共有11种。boundarySize表示当前块上行或左列的相邻亮度块最终被下采样成2个或4个相邻亮度块。
现有技术中,编码器在通过MIP模式进行亮度预测时,可以通过如下的公式(2)进行:
Figure PCTCN2019107612-appb-000003
其中,mWeight和vBias是各MIP模式通过深度学习训练出来的权重矩阵和偏置矩阵,具体地,mWeight为每一类MIP模式的权重矩阵,vBias为每一类MIP模式的偏置矩阵。sB为偏置矩阵的左移量,oW为四舍五入的保留值,sW为整体预测值的右移量,需要通过查表得到不同MIP模式下的sW值。
基于JVET-N1001-v7,在生成MIP的预测矩阵时,编码器是通过变量incW和incH来判断是否需要抽取奇数行的预测值,fO变量代表了mWeight需要减去的数值,具体地:
Figure PCTCN2019107612-appb-000004
sincW=(predC>mipW)?2:1   (4)
incH=(predC>mipH)?2:1   (5)
如果MipSizeId<2,则
p[0]=pTemp[0]-(1<<(BitDepthY-1))   (6)
p[x]=pTemp[x]-pTemp[0]for x=1,inSize–1   (7)
否则
p[x]=pTemp[x+1]-pTemp[0]   (8)
其中,incW=2或incH=2代表需要在宽度参数或者高度参数上进行抽取。
表8为现有技术中的sW的语法描述,如表8所示,由于MIP模式下sW取值为映射关系,因通过表8可以获得全部模式下的sW取值。
表8
Figure PCTCN2019107612-appb-000005
表9为现有技术中的fO的语法描述,如表9所示,在MIP模式预测值的计算过程中,fO变量代表了mWeight需要减去的数值,且需要通过查表得到不同亮度块在不同MIP模式下的fO值。mWeight是各MIP模式通过深度学习训练出来的权重矩阵。
由表9中fO的语法描述可以看出,fO的取值与亮度块尺寸大小和模式编号均相关。
表9
Figure PCTCN2019107612-appb-000006
正是由于表9中fO的取值与亮度块尺寸和模式编号均相关,也就是说,不同MIP模式下fO的语法描述不同,编码器在通过MIP模式进行亮度预测时,对于不同MipSizeId或不同MIP模式编号modeId的当前编码块,fO的取值可能并不相同,因此会造成算法的不统一,且查询上述表9的流程 增加了算法的时间复杂度,表9的存储也需要占用存储空间。
由此可见,现有技术在通过MIP模式进行亮度预测时,尺寸不同的亮度块所采用的参数也有可能不同,因此,需要占用较大的存储空间对大量参数进行存储,且预测过程中对参数的查找和调用也增加了整体时间,从而降低了编解码效率。
为了解决上述问题,本申请提出了一种图像编码方法,一方面,编码器可以通过对预存索引序号与偏移量的设定,即通过MipSizeId与fO的对应关系的设定,实现在编码时当前块fO的取值仅与当前块的大小相关,从而可以使MIP的实现更加简洁统一;另一方面,MipSizeId与fO的对应关系可以利用一维数组或具有类似功能的数据结构进行存储,降低了维度,节省了fO本身所占用的存储空间;再一方面,编码器在对fO进行统一化的修改更新时,还可以利用更新后的fO对相应的mWeight进行更新,从而可以避免编码性能的降低。
进一步地,本申请提出的图像编码方法,可以影响视频编码混合框架中的帧内预测部分,即主要应用于视频编码中的帧内预测模块103和视频解码中的帧内预测模块203中,对编码端和解码端同时作用。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
在本申请的一个实施例中,图7为图像编码方法的实现流程示意图,如图7所示,在本申请的实施例中,编码器进行图像编码的方法可以包括以下步骤:
步骤101、确定当前块的大小。
在本申请的实施例中,编码器可以先确定当前块的大小,其中,当前块可以为待编码的当前编码块,也就是说,编码器在对当前块进行编码之前,可以先确定出当前块的具体尺寸大小。
进一步地,在本申请的实施例中,当前块可以为待编码的亮度块。
需要说明的是,在本申请的实施例中,按照当前块的高度参数H和宽度参数W,当前块的大小可以包括25种尺寸,具体地,标准中规定当前块最大为128×128,但由于变换单元的最大尺寸为64×64,也就是说,当前块在128×128的尺寸下必定需要先进行四叉树划分,因此,当前块的最大尺寸是64×64。
具体地,如上述表5所示,当前块的大小(H×W)可以包括(4×4)、(4×8)、(4×16)、(4×32)、(4×64)、(8×4)、(8×8)、(8×16)、(8×32)、(8×64)、(16×4)、(16×8)、(16×16)、(16×32)、(16×64)、(32×4)、(32×8)、(32×16)、(32×32)、(32×64)、(64×4)、(64×8)、(64×16)、(64×32)、(64×64)这25种尺寸。
步骤102、在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量。
在本申请的实施例中,编码器在利用MIP模式对当前块进行编码时,可以先根据当前块的大小,确定出当前块对应的第一偏移量。其中,基于上述公式(2),当前块对应的第一偏移量可以为表征权重矩阵mWeight需要减去的数值的fO。
需要说明的是,在本申请的实施例中,对于不同大小的当前块,编码器可以设置有不同的第一偏移量进行编码处理。具体地,编码器可以先根据当前块的大小确定出当前块对应的MIP块大小索引序号,然后可以根据MIP块大小索引序号进一步地确定出当前块对应的第一偏移量。
进一步地,在申请的实施例中,当前块的MIP块大小索引序号即为根据当前块的尺寸大小确定的MipSizeId,当前块的第一偏移量即为当前块的mWeight需要减去的参数的fO。
可以理解的是,在本申请的实施例中,编码器在根据当前块的大小,确定当前块对应的MIP块大小索引序号时,具体可以基于以下步骤进行:
(1)、若当前块的大小为4×4,则MipSizeId取值为0;
(2)、若当前块的大小为4×8、8×4或8×8,则MipSizeId取值为1;
(3)、若当前块的大小为其他情况,则MipSizeId取值为2。
进一步地,在本申请的实施例中,编码器可以预先设置有MipSizeId和fO的对应关系,即编码器设置有预存索引序号与偏移量的对应关系,因此,编码器在确定出当前块对应的MIP块大小索引序号之后,便可以基于预存索引序号与偏移量的对应关系,映射获得当前块对应的第一偏移量。
需要说明的是,在本申请的实施例中,基于预存索引序号与偏移量的对应关系,对于相同的MIP块大小索引序号,对应的第一偏移量也是相同的,也就是说,在本申请的实施例中,编码器在利用MIP模式对当前块进行编码时,编码器可以直接利用当前块对应的MIP块大小索引序号,确定出当前块对应的第一偏移量,从而可以进一步利用第一偏移量进行编码处理。
在本申请的实施例中,进一步地,在按照MIP模式对当前块进行编码之前,编码器可以先对预存索引序号与偏移量的对应关系进行设定。也就是说,编码器需要先对不同的MipSizeId设置不同 的fO。
进一步地,在本申请的实施例中,编码器可以在对预存索引序号与偏移量的对应关系进行设定时,对于相同MipSizeId的亮度块,编码器可以将这些亮度块对应的fO设置为相同的数值。也就是说,在本申请中,编码器可以将具有相同MipSizeId的亮度块所对应的fO进行统一化设置。例如,表10为预存索引序号与偏移量的对应关系一,如表10所示,编码器可以直接对相同的MipSizeId设定相同的fO,从而使编码器在对当前块进行编码时,可以直接根据当前块对应的MIP块大小索引序号确定出对应的第一偏移量的取值;例如,如果当前块的大小为4×4,那么编码器可以确定当前块对应的MIP块大小索引序号取值为0,编码器便可以通过表10所示的MipSizeId和fO的对应关系,确定当前块对应的第一偏移量为66。
表10
MipSizeId fO
0 66
1 45
2 46
表11为预存索引序号与偏移量的对应关系二,如表11所示,编码器可以直接对相同的MipSizeId设定相同的fO,从而使编码器在对当前块进行编码时,可以直接根据当前块对应的MIP块大小索引序号确定出对应的第一偏移量的取值,例如,如果当前块的大小为4×4,那么编码器可以确定当前块对应的MIP块大小索引序号取值为1,编码器便可以通过表11所示的MipSizeId和fO的对应关系,确定当前块对应的第一偏移量为34。
表11
MipSizeId fO
0 34
1 23
2 46
由此可见,本申请中的上述表10、表11与上述表9相比,编码器在确定当前块对应的第一偏移量时,不需要再根据MipSizeId和MIP模式编号modeId两个变量的取值确定当前块对应的第一偏移量,而仅仅根据MipSizeId一个参数便可以获得当前块对应的第一偏移量,从而可以降低运算的复杂度,同时节省了用于存储如上述表9为例的fO的二维表的存储开销。
进一步地,在本申请的实施例中,编码器在对预存索引序号与偏移量的对应关系进行设定时,可以先基于原有的fO的语法描述,确定出同一个MipSizeId的不同MIP模式编号modeId所对应的fO中数值最大的fO,然后将该数值最大的fO确定为该一个MipSizeId所对应的第一偏移量。例如,基于如表9所示的原有的fO的语法描述,可以确定MipSizeId为0时,数值最大的fO为模式编号modeId为15时的66,因此,编码器可以将MipSizeId为0的所有模式编号modeId对应的fO均设定为66,即建立MipSizeId为0与fO为66的对应关系;相应地,基于如表9所示的原有的fO的语法描述,可以确定MipSizeId为1时,数值最大的fO为模式编号modeId为3时的45,因此,编码器可以将MipSizeId为1的所有模式编号modeId对应的fO均设定为45,即建立MipSizeId为1与fO为45的对应关系;相应地,基于如表9所示的原有的fO的语法描述,可以确定MipSizeId为2时,数值最大的fO为模式编号modeId为1时的46,因此,编码器可以将MipSizeId为2时的所有模式编号modeId对应的fO均设定为46,即建立MipSizeId为2与fO为46的对应关系。即获得上述表10。
具体地,编码器在利用上述表10、表11进行fO的获取之前,不需要同时确定出当前块对应的MipSizeId和modeId,只需要利用当前块的大小确定出MipSizeId,便可以获得当前块对应的fO。
可以理解的是,在本申请的实施例中,由于上述表10所示的MipSizeId和fO之间的对应关系为的一维数组,因此编码器可以利用一维数组或具有类似功能的数据结构对MipSizeId和fO之间的对应关系进行存储,与上述表9相比,降低了数组的维度,节省了数组本身所占用的存储空间。
步骤103、利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量。
在本申请的实施例中,编码器在根据当前块的大小,确定第一偏移量之后,便可以利用第一偏移量和当前块对应的相邻像素的重建值,计算获得第二偏移量。其中,第二偏移量可以为上述公式(2)中的oW,具体地,第二偏移量可以为控制比特移位操作的偏移量,例如,上述公式(2)中的 oW为四舍五入的保留值,可以通过上述公式(3)计算获得。
需要说明的是,在本申请的实施例中,编码器在根据当前块的大小确定出当前块对应的MIP块大小索引序号,并基于预存索引序号与偏移量的对应关系确定出当前块对应的第一偏移量之后,便可以基于上述公式(3),利用第一偏移量计算获得当前块对应的第二偏移量。具体地,编码器在确定第二偏移量时,还需要利用当前块对应的相邻像素的重建值进行计算。
步骤104、根据第二偏移量,确定当前块的第一预测值。
在本申请的实施例中,编码器在基于第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量之后,可以根据第二偏移量,确定出当前块对应的第一预测值。
需要说明的是,在本申请的实施例中,编码器在根据第二偏移量确定当前块的第一预测值时,可以先通过第二偏移量,计算当前块中的预设位置的像素的第二预测值;然后可以对第二预测值进行滤波处理,从而可以得到当前块中的全部像素的第一预测值。
进一步地,在本申请的实施例中,预设位置可以为当前块中的特定位置,具体地,预设位置可以为当前块中的部分像素的特定位置。也就是说,在本申请中,编码器通过第二偏移量计算第二预测值,并不是当前块中的全部像素的预测值,而是当前块中的部分特定位置像素的预测值。
需要说明的是,在本申请的实施例中,编码器在通过第二偏移量计算获得当前块中的部分特定位置像素的第二预测值之后,可以对第二预测值进行滤波处理,从而可以获得当前块中的全部像素的预测值,即获得当前块对应的第一预测值。
可以理解的是,在本申请的实施例中,第二偏移量,可以用于在计算第二预测值的过程中,控制比特移位操作的偏移量。
步骤105、基于第一预测值,对当前块进行编码。
在本申请的实施例中,编码器在根据第二偏移量,确定当前块的第一预测值之后,便可以基于第一预测值,对当前编码块进行编码处理,从而可以获得当前块对应的码流。
进一步地,在本申请的实施例中,编码器在基于第一预测值,对当前块进行编码时,可以先计算当前块的原始值与第一预测值之间的预测差,然后可以对预测差值进行编码。
需要说明的是,在本申请的实施例中,编码器在对当前块进行编码时,并不是直接对当前块的第一预测值进行编码的,而是基于第一预测值和当前块对应的原始值,确定出二者之间的差值,即预测差,然后对预测差进行编码处理,从而可以有效地提高编解码效率。
本申请实施例提供了一种图像编码方法,编码器确定当前块的大小;在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,对当前块进行编码。由此可见,本申请提出的图像编码方法,在利用MIP模式进行编码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行编码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行编码处理时,降低MIP算法的复杂度,能够在保证编码性能的基础上,减小编码过程中所需要的存储空间和整体时间,有效地提高编码效率。
基于上述实施例,在本申请的再一实施例中,由于编码器预先设置有预存索引序号与偏移量的对应关系,因此编码器在对当前块进行编码时,只需要根据当前块的大小确定出当前块对应的MIP块大小索引序号,便可以利用预存索引序号与偏移量的对应关系确定出相应地第一偏移量,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,编码器可以直接根据MipSizeId确定fO的取值,而不需要根据MipSizeId和modeId两个变量的取值确定fO取值,从而可以大大降低运算复杂度,节省了用于存储MipSizeId、modeId以及fO三者对应关系的二维表的存储开销。
也就是说,现有技术中,上述公式(2)中的fO代表了mWeight需要减去的数值,且需要通过查询图上述表9所示的MipSizeId、modeId以及fO三者对应关系才能得到当前块的fO值,由此可见,fO的取值与当前块的大小和模式编号均相关,这就造成了算法的不统一,同时如上述表9的MipSizeId、modeId以及fO三者对应关系的存储也需要占用较多存储空间。相比之下,本申请中的只需要存储MipSizeId与fO的对应关系,且对于相同的MipSizeId,即使modeId不同,对应的fO的取值也是相同的,从而既节省了存储空间,同时也降低了运算的复杂度。
具体地,在本申请的实施例中,语法上,本申请将MIP的预测计算过程的语法进行了简化,对相同MipSizeId的fO进行统一化修改,即仅需要根据当前块的大小便可以确定出对应的fO。
在本申请的实施例中,进一步地,编码器在将MIP的预测计算过程的语法进行了简化时,也可 以直接将不同MipSizeId、不同modeId的任意亮度块所对应的fO均设置成相同的数值,也就是说,fO为固定数值,取消亮度块的大小与fO的相关性,将所有情况下的fO均定义为统一数值,不再存储与fO相关的表格,从而可以进一步降低MIP算法的复杂度,减少算法的存储空间,并使得MIP技术的实现和语法更加简洁统一。
在本申请的实施例中,进一步地,为了避免编码性能的损失,编码器在统一化修改fO的同时,还需要对mWeight的取值进行相应的修改。具体地,编码器在设定预存索引序号与偏移量的对应关系之后,可以对当前块对应的权重矩阵mWeight中的每一个权重值加上对应模式下的fO增大的部分,即可以对当前块的mWeight对应的原始mWeight中的每一个原始权重值加上更新后的fO,从而可以保持编码性能完全不改变,也就是说,编码器可以同时利用fO对mWeight进行相应的更新,从而可以在减少了存储空间、降低运算复杂度的同时,还能保持编码性能基本不变,同时保持预测计算结果不变。
需要说明的是,在本申请的实施例中,编码器在利用fO对mWeight进行相应的更新时,如果更新后的mWeight中存在大于预设权重阈值的权重值时,可以将该权重值设定为小于或者等于预设权重阈值。例如,编码器将预设权重阈值设定为7位二进制数的上限值127,若更新后的mWeight中存在权重值大于127,则可以通过钳位的方式,将大于127的权重值修改为小于或者等于预设权重阈值,如将其设定为127。
进一步地,在本申请的实施例中,如果更新后的mWeight中出现了大于预设权重阈值的权重值,还可以使用减小sW的方式,使更新后的mWeight中的全部权重值保持在预设权重阈值的范围以内。
进一步地,在本申请的实施例中,为了更好的保持编码性能,还可以使用公式(9)中所示的伪代码计算p[0]参数的值,即利用公式(9)替换公式(6),可以理解的是,使用公式(9)的计算方法可以缩小MIP矩阵中数据的动态范围:
p[0]=(1<<(BitDepthY-1))-pTemp[0]   (9)
示例性的,对于MipSizeId的取值为0的亮度块,在统一化修改fO之前,初始的fO的语法描述如下表12所示,不同的MIP模式编号modeId,fO的取值也不同。
表12
MipSizeId 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
0 34 21 7 27 27 28 56 13 47 15 40 21 16 7 45 66 21 32
其中,modeId取值为1的fO为21,对应的mWeight如下表13所示,
表13
18 16 72 2
16 19 55 7
12 72 34 14
0 84 13 21
20 19 65 54
18 19 48 65
15 23 31 73
10 27 18 76
20 21 18 87
19 21 19 87
20 20 22 85
20 20 25 84
20 21 24 82
20 20 24 82
20 22 24 82
19 23 24 82
基于上述表12,利用modeId为1时的取值为21的fO,可以获得modeId取值为1时对应的原始mWeight,具体地,可以对上述表13中的每一个权重值与21进行减法运算,从而可以获得对应的原始mWeight如下表14所示,
表14
-3 -5 51 -19
-5 -2 34 -14
-9 51 13 -7
-21 63 -8 0
-1 -2 44 33
-3 -2 27 44
-6 2 10 52
-11 6 -3 55
-1 0 -3 66
-2 0 -2 66
-1 -1 1 64
-1 -1 4 63
-1 0 3 61
-1 -1 3 61
-1 1 3 61
-2 2 3 61
在本申请的实施例中,在更新mWeight对应的原始mWeight时,为了缩小MIP矩阵中数据的动态范围,编码器利用公式(9)替换公式(6)。
表15
3 -5 51 -19
5 -2 34 -14
9 51 13 -7
21 63 -8 0
1 -2 44 33
3 -2 27 44
6 2 10 52
11 6 -3 55
1 0 -3 66
2 0 -2 66
1 -1 1 64
1 -1 4 63
1 0 3 61
1 -1 3 61
1 1 3 61
2 2 3 61
具体来说,是需要将MipSizeId的取值为0和1的亮度块的全部MIP模式编号modeId,所对应的全部原始mWeight的第一列取相反。例如,基于上述如表14,对第一列中的权重值取反之后,获得的初步更新mWeight如表15所示。
由于上述表12中fO数值最大的是MIP模式编号modeId为0的34,因此,编码器在对fO进行统一化修改时,可以直接将MipSizeId为0的全部亮度块对应的fO均设置为34,即获得更新后的fO的语法描述如下表16所示,
表16
MipSizeId fO
0 34
同时,编码器可以利用取值为34的fO继续对MIP模式编号modeId为1的亮度块的初步更新mWeight继续更新,即基于上述表15,对表15中的每一个权重值加上34,出从而可以获得更新后的mWeight如表17所示,
表17
37 29 85 15
39 32 68 20
43 85 47 27
55 97 26 34
35 32 78 67
37 32 61 78
40 36 44 86
45 40 31 89
35 34 31 100
36 34 32 100
35 33 35 98
35 33 38 97
35 34 37 95
35 33 37 95
35 35 37 95
36 36 37 95
可以理解的是,在此过程中,如果更新后的mWeight中出现了大于预设权重阈值的权重值,既可以将该权重值钳位至预设权重阈值的范围以内,还可以使用减小sW的方式,使更新后的mWeight中的全部权重值保持在预设权重阈值的范围以内。
通过上述描述可以理解,在本申请中,一方面,编码器可以通过对预存索引序号与偏移量的设定,即通过MipSizeId与fO的对应关系的设定,实现在编码时当前块fO的取值仅与当前块的大小相关,从而可以使MIP的实现更加简洁统一;另一方面,MipSizeId与fO的对应关系可以利用一维数组或具有类似功能的数据结构进行存储,降低了维度,节省了fO本身所占用的存储空间;再一方面,编码器在对fO进行统一化的修改更新时,还可以利用更新后的fO对相应的mWeight进行更新,从而可以避免编码性能的降低。
本申请实施例提供了一种图像编码方法,编码器确定当前块的大小;在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,对当前块进行编码。由此可见,本申请提出的图像编码方法,在利用MIP模式进行编码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行编码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行编码处理时,降低MIP算法的复杂度,能够在保证编码性能的基础上,减小编码过程中所需要的存储空间和整体时间,有效地提高编码效率。
在本申请的另一个实施例中,图8为图像解码方法的实现流程示意图,如图8所示,在本申请的实施例中,解码器进行图像解码的方法可以包括以下步骤:
步骤201、解析码流,获得当前块的大小和编码模式。
在本申请的实施例中,解码器可以先确定当前块的大小和编码模式,其中,当前块可以为待解码的当前编码块,也就是说,解码器在对当前块进行解码之前,可以先确定出当前块的具体尺寸大小和编码模式。
需要说明的是,在本申请的实施例中,当前块的编码模式可以为67种传统帧内预测模式或MIP模式。
进一步地,在本申请的实施例中,当前块可以为待解码的亮度块。
需要说明的是,在本申请的实施例中,按照当前块的高度参数H和宽度参数W,当前块的大小可以包括25种尺寸,具体地,标准中规定当前块最大为128×128,但由于变换单元的最大尺寸为64×64,也就是说,当前块在128×128的尺寸下必定需要先进行四叉树划分,因此,当前块的最大尺寸是64×64。
步骤202、当当前块的编码模式为MIP模式时,根据当前块的大小,确定第一偏移量。
在本申请的实施例中,解码器在确定当前块的编码模式为MIP模式之后,可以先根据当前块的大小,确定出当前块对应的第一偏移量。其中,基于上述公式(2),当前块对应的第一偏移量可以为表征mWeight需要减去的数值的fO。
需要说明的是,在本申请的实施例中,对于不同大小的当前块,解码器可以设置有不同的第一偏移量进行解码处理。具体地,解码器可以先根据当前块的大小确定出当前块对应的MIP块大小索 引序号,然后可以根据MIP块大小索引序号进一步地确定出当前块对应的第一偏移量。
进一步地,在申请的实施例中,当前块的MIP块大小索引序号即为根据当前块的尺寸大小确定的MipSizeId,当前块的第一偏移量即为当前块的mWeight需要减去的参数的fO。
可以理解的是,在本申请的实施例中,解码器在根据当前块的大小,确定当前块对应的MIP块大小索引序号时,具体可以基于以下步骤进行:
(1)、若当前块的大小为4×4,则MipSizeId取值为0;
(2)、若当前块的大小为4×8、8×4或8×8,则MipSizeId取值为1;
(3)、若当前块的大小为其他情况,则MipSizeId取值为2。
进一步地,在本申请的实施例中,解码器可以预先设置有MipSizeId和fO的对应关系,即解码器设置有预存索引序号与偏移量的对应关系,因此,解码器在确定出当前块对应的MIP块大小索引序号之后,便可以基于预存索引序号与偏移量的对应关系,映射获得当前块对应的第一偏移量。
需要说明的是,在本申请的实施例中,基于预存索引序号与偏移量的对应关系,对于相同的MIP块大小索引序号,对应的第一偏移量也是相同的,也就是说,在本申请的实施例中,解码器在利用MIP模式对当前块进行解码时,解码器可以直接利用当前块对应的MIP块大小索引序号,确定出当前块对应的第一偏移量,从而可以进一步利用第一偏移量进行解码处理。
在本申请的实施例中,进一步地,在按照MIP模式对当前块进行解码之前,解码器可以先对预存索引序号与偏移量的对应关系进行设定。也就是说,解码器需要先对不同的MipSizeId设置不同的fO。
进一步地,在本申请的实施例中,解码器可以在对预存索引序号与偏移量的对应关系进行设定时,对于相同MipSizeId的亮度块,解码器可以将这些亮度块对应的fO设置为相同的数值。也就是说,在本申请中,解码器可以将具有相同MipSizeId的亮度块所对应的fO进行统一化设置。例如,上述表10中,如果当前块的大小为4×4,那么解码器可以确定当前块对应的MIP块大小索引序号为0,解码器便可以通过表10所示的MipSizeId和fO的对应关系,确定当前块对应的第一偏移量为66;上述表11中,如果当前块的大小为4×4,那么编码器可以确定当前块对应的MIP块大小索引序号取值为1,编码器便可以通过表11所示的MipSizeId和fO的对应关系,确定当前块对应的第一偏移量为34。
由此可见,本申请中的上述表10、表11与与上述表9相比,解码器在确定当前块对应的第一偏移量时,不需要再根据MipSizeId和MIP模式编号modeId两个变量的取值确定当前块对应的第一偏移量,而仅仅根据MipSizeId一个参数便可以获得当前块对应的第一偏移量,从而可以降低运算的复杂度,同时节省了用于存储如上述表9为例的fO的二维表的存储开销。
进一步地,在本申请的实施例中,解码器在对预存索引序号与偏移量的对应关系进行设定时,可以先基于原有的fO的语法描述,确定出同一个MipSizeId的不同MIP模式编号modeId所对应的fO中数值最大的fO,然后将该数值最大的fO确定为该一个MipSizeId所对应的第一偏移量。例如,基于如表9所示的原有的fO的语法描述,可以确定MipSizeId为0时,数值最大的fO为模式编号modeId为15时的66,因此,解码器可以将MipSizeId为0的所有模式编号modeId对应的fO均设定为66,即建立MipSizeId为0与fO为66的对应关系;相应地,基于如表9所示的原有的fO的语法描述,可以确定MipSizeId为1时,数值最大的fO为模式编号modeId为3时的45,因此,解码器可以将MipSizeId为1的所有模式编号modeId对应的fO均设定为45,即建立MipSizeId为1与fO为45的对应关系;相应地,基于如表9所示的原有的fO的语法描述,可以确定MipSizeId为2时,数值最大的fO为模式编号modeId为1时的46,因此,解码器可以将MipSizeId为2时的所有模式编号modeId对应的fO均设定为46,即建立MipSizeId为2与fO为46的对应关系。即获得上述表10。
具体地,解码器在利用上述表10、表11进行fO的获取之前,不需要同时确定出当前块对应的MipSizeId和modeId,只需要利用当前块的大小确定出MipSizeId,便可以获得当前块对应的fO。
可以理解的是,在本申请的实施例中,由于上述表10所示的MipSizeId和fO之间的对应关系为的一维数组,因此解码器可以利用一维数组或具有类似功能的数据结构对MipSizeId和fO之间的对应关系进行存储,与上述表9相比,降低了数组的维度,节省了数组本身所占用的存储空间。
步骤203、利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量。
在本申请的实施例中,解码器在根据当前块的大小,确定第一偏移量之后,便可以利用第一偏移量和当前块对应的相邻像素的重建值,计算获得第二偏移量。其中,第二偏移量可以为上述公式(2)中的oW,具体地,第二偏移量可以为控制比特移位操作的偏移量,例如,上述公式(2)中的 oW为四舍五入的保留值,可以通过上述公式(3)计算获得。
需要说明的是,在本申请的实施例中,解码器在根据当前块的大小确定出当前块对应的MIP块大小索引序号,并基于预存索引序号与偏移量的对应关系确定出当前块对应的第一偏移量之后,便可以基于上述公式(3),利用第一偏移量计算获得当前块对应的第二偏移量。具体地,解码器在确定第二偏移量时,还需要利用当前块对应的相邻像素的重建值进行计算。
步骤204、根据第二偏移量,确定当前块的第一预测值。
在本申请的实施例中,解码器在基于第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量之后,可以根据第二偏移量,确定出当前块对应的第一预测值。
需要说明的是,在本申请的实施例中,解码器在根据第二偏移量确定当前块的第一预测值时,可以先通过第二偏移量,计算当前块中的预设位置的像素的第二预测值;然后可以对第二预测值进行滤波处理,从而可以得到当前块中的全部像素的第一预测值。
进一步地,在本申请的实施例中,预设位置可以为当前块中的特定位置,具体地,预设位置可以为当前块中的部分像素的特定位置。也就是说,在本申请中,解码器通过第二偏移量计算第二预测值,并不是当前块中的全部像素的预测值,而是当前块中的部分特定位置像素的预测值。
需要说明的是,在本申请的实施例中,解码器在通过第二偏移量计算获得当前块中的部分特定位置像素的第二预测值之后,可以对第二预测值进行滤波处理,从而可以获得当前块中的全部像素的预测值,即获得当前块对应的第一预测值。
可以理解的是,在本申请的实施例中,第二偏移量,可以用于在计算第二预测值的过程中,控制比特移位操作的偏移量。
步骤205、基于第一预测值,对当前块进行解码。
在本申请的实施例中,解码器在根据第二偏移量,确定当前块的第一预测值之后,便可以基于第一预测值,对当前解码块进行解码处理,从而可以获得当前块对应的码流。
进一步地,在本申请的实施例中,解码器在基于第一预测值,对当前块进行解码时,可以先计算当前块的原始值与第一预测值之间的预测差,然后可以对预测差值进行解码。
需要说明的是,在本申请的实施例中,解码器在对当前块进行解码时,并不是直接对当前块的第一预测值进行解码的,而是基于第一预测值和当前块对应的原始值,确定出二者之间的差值,即预测差,然后对预测差进行解码处理,从而可以有效地提高编解码效率。
进一步地,在本申请的实施例中,解码器在基于第一预测值,确定当前块的重建值之前,可以先通过解析码流,获得当前块的预测差。
相应地,在本申请的实施例中,解码器在确定当前块的预测差,并确定当前块的第一预测值之后,便可以直接计算第一预测值与预测差之间的和值,将和值设定当前块的重建值。也就是说,解码器在基于第一预测值,确定当前块的重建值时,可以对第一预测值和预测差进行加法运算,从而获得当前块的重建值,以完成对当前块的解码处理。
本申请实施例提供了一种图像解码方法,解码器解析码流,获得当前块的大小和编码模式;当当前块的编码模式为MIP模式时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,确定当前块的重建值。由此可见,本申请提出的图像解码方法,在利用MIP模式进行解码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行解码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行解码处理时,降低MIP算法的复杂度,能够在保证解码性能的基础上,减小解码过程中所需要的存储空间和整体时间,有效地提高解码效率。
基于上述实施例,在本申请的再一实施例中,图9为编码器的组成结构示意图一,如图9所示,本申请实施例提出的编码器300可以包括第一确定部分301、第一计算部分302以及编码部分303。
所述第一确定部分301,配置于确定当前块的大小;以及在利用MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;
所述第一计算部分302,配置于利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
所述第一确定部分301,还配置于根据所述第二偏移量,确定所述当前块的第一预测值;
所述编码部分303,配置于基于所述第一预测值,对所述当前块进行编码。
图10为编码器的组成结构示意图二,如图10所示,本申请实施例提出的编码器300还可以包 括第一处理器304、存储有第一处理器304可执行指令的第一存储器305、第一通信接口306,和用于连接第一处理器304、第一存储器305以及第一通信接口306的第一总线307。
进一步地,在本申请的实施例中,上述第一处理器304,用于确定当前块的大小;在利用MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;根据所述第二偏移量,确定所述当前块的第一预测值;基于所述第一预测值,对所述当前块进行编码。
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供了一种编码器,该编码器确定当前块的大小;在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,对当前块进行编码。由此可见,本申请提出的图像编码方法,在利用MIP模式进行编码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行编码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行编码处理时,降低MIP算法的复杂度,能够在保证编码性能的基础上,减小编码过程中所需要的存储空间和整体时间,有效地提高编码效率。
基于上述实施例,在本申请的另一实施例中,图11为解码器的组成结构示意图一,如图11所示,本申请实施例提出的解码器400可以包括解析部分401,第二确定部分402以及第二计算部分403。
所述解析部分401,配置于解析码流,获得当前块的大小和编码模式;
所述第二确定部分402,配置于当所述当前块的编码模式为MIP模式时,根据所述当前块的大小,确定第一偏移量;
所述第二计算部分403,配置于利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
所述第二确定部分402,还配置于根据所述第二偏移量,确定所述当前块的第一预测值;以及基于所述第一预测值,确定所述当前块的重建值。
图12为解码器的组成结构示意图二,如图12所示,本申请实施例提出的解码器400还可以包括第二处理器404、存储有第二处理器404可执行指令的第二存储器405、第二通信接口406,和用于连接第二处理器404、第饿存储器405以及第二通信接口406的第二总线407。
进一步地,在本申请的实施例中,上述第二处理器404,用于解析码流,获得当前块的大小和编码模式;当所述当前块的编码模式为MIP模式时,根据所述当前块的大小,确定第一偏移量;利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;根据所述第二偏移量,确定所述当前块的第一预测值;基于所述第一预测值,确定所述当前块的重建值。
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access  Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供了一种解码器,该解码器解析码流,获得当前块的大小和编码模式;当当前块的编码模式为MIP模式时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,确定当前块的重建值。由此可见,本申请提出的图像解码方法,在利用MIP模式进行解码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行解码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行解码处理时,降低MIP算法的复杂度,能够在保证解码性能的基础上,减小解码过程中所需要的存储空间和整体时间,有效地提高解码效率。
本申请实施例提供计算机可读存储介质和计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上述实施例所述的方法。
具体来讲,本实施例中的一种图像编码方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种图像编码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
确定当前块的大小;
在利用MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;
利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
根据所述第二偏移量,确定所述当前块的第一预测值;
基于所述第一预测值,对所述当前块进行编码。
具体来讲,本实施例中的一种图像解码方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种图像解码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
解析码流,获得当前块的大小和编码模式;
当所述当前块的编码模式为MIP模式时,根据所述当前块的大小,确定第一偏移量;
利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
根据所述第二偏移量,确定所述当前块的第一预测值;
基于所述第一预测值,确定所述当前块的重建值。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的实现流程示意图和/或方框图来描述的。应理解可由计算机程序指令实现流程示意图和/或方框图中的每一流程和/或方框、以及实现流程示意图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
工业实用性
本申请实施例提供了一种图像编解码方法、编码器、解码器以及存储介质,编码器确定当前块 的大小;在利用MIP模式对当前块进行编码时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,对当前块进行编码。解码器解析码流,获得当前块的大小和编码模式;当当前块的编码模式为MIP模式时,根据当前块的大小,确定第一偏移量;利用第一偏移量和当前块对应的相邻像素的重建值,计算第二偏移量;根据第二偏移量,确定当前块的第一预测值;基于第一预测值,确定当前块的重建值。由此可见,本申请提出的图像编解码方法,在利用MIP模式进行编解码时,可以根据当前块的大小直接确定出与当前块对应的第一偏移量,然后便可以利用第一偏移量对当前块进行编解码处理,也就是说,在本申请中,基于预存索引序号与偏移量的对应关系,可以在确定出当前块的大小对应的MIP块大小索引序号之后,直接获得与MIP块大小索引序号对应的第一偏移量,从而在进行编解码处理时,降低MIP算法的复杂度,能够在保证编解码性能的基础上,减小编解码过程中所需要的存储空间和整体时间,有效地提高编解码效率。

Claims (29)

  1. 一种图像编码方法,应用于编码器,所述方法包括:
    确定当前块的大小;
    在利用基于矩阵的帧内预测MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;
    利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
    根据所述第二偏移量,确定所述当前块的第一预测值;
    基于所述第一预测值,对所述当前块进行编码。
  2. 根据权利要求1所述方法,其中,所述根据所述当前块的大小,确定第一偏移量,包括:
    根据所述当前块的大小,确定所述当前块对应的MIP块大小索引序号;
    根据所述MIP块大小索引序号,确定所述第一偏移量。
  3. 根据权利要求2所述方法,其中,所述根据所述MIP块大小索引序号,确定所述第一偏移量,包括:
    根据预存索引序号与偏移量的对应关系,确定所述MIP块大小索引序号对应的所述第一偏移量。
  4. 根据权利要求1所述方法,其中,所述根据所述第二偏移量,确定所述当前块的第一预测值,包括:
    通过所述第二偏移量,计算所述当前块中的预设位置的像素的第二预测值;其中,所述预设位置为所述当前块中的特定位置;
    对所述第二预测值进行滤波处理,得到所述当前块中的全部像素的所述第一预测值。
  5. 根据权利要求4所述方法,其中,
    所述第二偏移量,用于在计算所述第二预测值的过程中,控制比特移位操作的偏移量。
  6. 根据权利要求1所述方法,其中,所述基于所述第一预测值,对所述当前块进行编码,包括:
    计算所述当前块的原始值与所述第一预测值之间的预测差;
    对所述预测差值进行编码。
  7. 一种图像解码方法,应用于解码器,所述方法包括:
    解析码流,获得当前块的大小和编码模式;
    当所述当前块的编码模式为MIP模式时,根据所述当前块的大小,确定第一偏移量;
    利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
    根据所述第二偏移量,确定所述当前块的第一预测值;
    基于所述第一预测值,确定所述当前块的重建值。
  8. 根据权利要求7所述方法,其中,所述根据所述当前块的大小,确定第一偏移量,包括:
    根据所述当前块的大小,确定所述当前块对应的MIP块大小索引序号;
    根据所述MIP块大小索引序号,确定所述第一偏移量。
  9. 根据权利要求8所述方法,其中,所述根据所述MIP块大小索引序号,确定所述第一偏移量,包括:
    根据预存索引序号与偏移量的对应关系,确定所述MIP块大小索引序号对应的所述第一偏移量。
  10. 根据权利要求7所述方法,其中,所述根据所述第二偏移量,确定所述当前块的第一预测值,包括:
    通过所述第二偏移量,计算所述当前块中的预设位置的像素的第二预测值;所述预设位置为所述当前块中的特定位置;
    对所述第二预测值进行滤波处理,得到所述当前块中的全部像素的所述第一预测值。
  11. 根据权利要求10所述方法,其中,
    所述第二偏移量,用于在计算所述第二预测值的过程中,控制比特移位操作的偏移量。
  12. 根据权利要求7所述方法,其中,所述基于所述第一预测值,确定所述当前块的重建值之前,所述方法还包括:
    解析所述码流,获得所述当前块的预测差。
  13. 根据权利要求12所述方法,其中,所述基于所述第一预测值,确定所述当前块的重建值,包括:
    计算所述第一预测值与所述预测差之间的和值,将所述和值设定所述当前块的重建值。
  14. 一种编码器,所述编码器包括:第一确定部分,第一计算部分以及编码部分,
    所述第一确定部分,配置于确定当前块的大小;以及在利用MIP模式对所述当前块进行编码时,根据所述当前块的大小,确定第一偏移量;
    所述第一计算部分,配置于利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
    所述第一确定部分,还配置于根据所述第二偏移量,确定所述当前块的第一预测值;
    所述编码部分,配置于基于所述第一预测值,对所述当前块进行编码。
  15. 根据权利要求14所述的编码器,其中,
    所述第一确定部分,具体配置于根据所述当前块的大小,确定所述当前块对应的MIP块大小索引序号;以及根据所述MIP块大小索引序号,确定所述第一偏移量。
  16. 根据权利要求15所述的编码器,其中,
    所述第一确定部分,还具体配置于根据预存索引序号与偏移量的对应关系,确定所述MIP块大小索引序号对应的所述第一偏移量。
  17. 根据权利要求14所述的编码器,其中,
    所述第一确定部分,还具体配置于通过所述第二偏移量,计算所述当前块中的预设位置的像素的第二预测值;其中,所述预设位置为所述当前块中的特定位置;以及对所述第二预测值进行滤波处理,得到所述当前块中的全部像素的所述第一预测值。
  18. 根据权利要求17所述的编码器,其中,所述第二偏移量,用于在计算所述第二预测值的过程中,控制比特移位操作的偏移量。
  19. 根据权利要求14所述的编码器,其中,
    所述编码部分,具体配置于计算所述当前块的原始值与所述第一预测值之间的预测差;以及对所述预测差值进行编码。
  20. 一种解码器,所述解码器包括:解析部分,第二确定部分以及第二计算部分,
    所述解析部分,配置于解析码流,获得当前块的大小和编码模式;
    所述第二确定部分,配置于当所述当前块的编码模式为MIP模式时,根据所述当前块的大小,确定第一偏移量;
    所述第二计算部分,配置于利用所述第一偏移量和所述当前块对应的相邻像素的重建值,计算第二偏移量;
    所述第二确定部分,还配置于根据所述第二偏移量,确定所述当前块的第一预测值;以及基于所述第一预测值,确定所述当前块的重建值。
  21. 根据权利要求20所述的解码器,其中,
    所述第二确定部分,具体配置于根据所述当前块的大小,确定所述当前块对应的MIP块大小索引序号;以及根据所述MIP块大小索引序号,确定所述第一偏移量。
  22. 根据权利要求21所述的解码器,其中,
    所述第二确定部分,还具体配置于根据预存索引序号与偏移量的对应关系,确定所述MIP块大小索引序号对应的所述第一偏移量。
  23. 根据权利要求20所述的解码器,其中,
    所述第二确定部分,还具体配置于通过所述第二偏移量,计算所述当前块中的预设位置的像素的第二预测值;其中,所述预设位置为所述当前块中的特定位置;以及对所述第二预测值进行滤波处理,得到所述当前块中的全部像素的所述第一预测值。
  24. 根据权利要求23所述的解码器,其中,所述第二偏移量,用于在计算所述第二预测值的过程中,控制比特移位操作的偏移量。
  25. 根据权利要求20所述的解码器,其中,
    所述解析部分,还配置于基于所述第一预测值,确定所述当前块的重建值之前,解析所述码流,获得所述当前块的预测差。
  26. 根据权利要求25所述的解码器,其中,
    所述第二计算部分,具体配置于计算所述第一预测值与所述预测差之间的和值,将所述和值设定所述当前块的重建值。
  27. 一种编码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器、第一通信接口,和用于连接所述第一处理器、所述第一存储器以及所述第一通信接口的第一总 线,当所述指令被所述第一处理器执行时,实现如权利要求1-6任一项所述的方法。
  28. 一种解码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器、第二通信接口,和用于连接所述第二处理器、所述第二存储器以及所述第一通信接口的第二总线,当所述指令被所述第二处理器执行时,实现如权利要求7-13任一项所述的方法。
  29. 一种计算机可读存储介质,其上存储有程序,应用于编码器和解码器中,所述程序被处理器执行时,实现如权利要求1-13任一项所述的方法。
PCT/CN2019/107612 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质 WO2021056223A1 (zh)

Priority Applications (21)

Application Number Priority Date Filing Date Title
KR1020237038239A KR20230157531A (ko) 2019-09-24 2019-09-24 픽처 인코딩/디코딩 방법, 인코더, 디코더 및 저장 매체
BR112021008833A BR112021008833A2 (pt) 2019-09-24 2019-09-24 Método de codificação de foto aplicável a um codificador, método de decodificação de foto aplicável a um decodificador, codificador e decodificador
EP19946790.3A EP3863287A4 (en) 2019-09-24 2019-09-24 IMAGE CODING/DECODING METHOD, ENCODER, DECODER AND STORAGE MEDIA
KR1020237038224A KR20230156810A (ko) 2019-09-24 2019-09-24 픽처 인코딩/디코딩 방법, 인코더, 디코더 및 저장 매체
AU2019467372A AU2019467372B2 (en) 2019-09-24 2019-09-24 Image coding/decoding method, coder, decoder, and storage medium
MX2021005546A MX2021005546A (es) 2019-09-24 2019-09-24 Metodo de codificacion/decodificacion de imagenes, codificador, decodificador y medio de almacenamiento.
CN201980060144.7A CN112840652A (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质
CN202310401510.9A CN116634157A (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质
KR1020217015292A KR102602418B1 (ko) 2019-09-24 2019-09-24 픽처 인코딩/디코딩 방법, 인코더, 디코더 및 저장 매체
JP2021532342A JP7461353B2 (ja) 2019-09-24 2019-09-24 画像符号化/復号化方法、エンコーダ、デコーダ及び記憶媒体
RU2021113334A RU2767188C1 (ru) 2019-09-24 2019-09-24 Способ кодирования/декодирования изображений, кодер, декодер и носитель данных
PCT/CN2019/107612 WO2021056223A1 (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质
CN202110629410.2A CN113905236B (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质
CA3116601A CA3116601C (en) 2019-09-24 2019-09-24 Image coding/decoding method, coder, decoder, and storage medium
CN202310399573.5A CN116347086A (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质
IL282280A IL282280A (en) 2019-09-24 2021-04-13 Image encoding/decoding method, encoder, decoder and storage medium
US17/230,769 US11159814B2 (en) 2019-09-24 2021-04-14 Image coding/decoding method, coder, decoder, and storage medium
PH12021550833A PH12021550833A1 (en) 2019-09-24 2021-04-14 Image coding/decoding method, coder, decoder, and storage medium
ZA2021/02495A ZA202102495B (en) 2019-09-24 2021-04-15 Image coding/decoding method, coder, decoder, and storage medium
US17/463,146 US11882304B2 (en) 2019-09-24 2021-08-31 Image coding/decoding method, coder, decoder, and storage medium
US18/527,169 US20240107050A1 (en) 2019-09-24 2023-12-01 Image coding/decoding method, coder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/107612 WO2021056223A1 (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/230,769 Continuation US11159814B2 (en) 2019-09-24 2021-04-14 Image coding/decoding method, coder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2021056223A1 true WO2021056223A1 (zh) 2021-04-01

Family

ID=75166224

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/107612 WO2021056223A1 (zh) 2019-09-24 2019-09-24 图像编解码方法、编码器、解码器以及存储介质

Country Status (14)

Country Link
US (3) US11159814B2 (zh)
EP (1) EP3863287A4 (zh)
JP (1) JP7461353B2 (zh)
KR (3) KR102602418B1 (zh)
CN (4) CN116347086A (zh)
AU (1) AU2019467372B2 (zh)
BR (1) BR112021008833A2 (zh)
CA (1) CA3116601C (zh)
IL (1) IL282280A (zh)
MX (1) MX2021005546A (zh)
PH (1) PH12021550833A1 (zh)
RU (1) RU2767188C1 (zh)
WO (1) WO2021056223A1 (zh)
ZA (1) ZA202102495B (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113170101A (zh) * 2019-03-12 2021-07-23 Oppo广东移动通信有限公司 帧内预测方法及装置、计算机可读存储介质
CN116389724A (zh) 2019-07-10 2023-07-04 Oppo广东移动通信有限公司 图像分量预测方法、编码器、解码器以及存储介质
US20230254507A1 (en) * 2019-10-11 2023-08-10 Interdigital Vc Holdings France Deep intra predictor generating side information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102934430A (zh) * 2010-06-11 2013-02-13 索尼公司 图像处理装置和方法
WO2017209328A1 (ko) * 2016-06-03 2017-12-07 엘지전자 주식회사 영상 코딩 시스템에서 인트라 예측 방법 및 장치
CN108702509A (zh) * 2016-02-25 2018-10-23 株式会社Kt 用于处理视频信号的方法和设备
US20180309995A1 (en) * 2015-04-21 2018-10-25 Vid Scale, Inc. High dynamic range video coding
CN109804624A (zh) * 2016-10-04 2019-05-24 株式会社Kt 用于处理视频信号的方法和设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG10201808973XA (en) * 2012-04-13 2018-11-29 Mitsubishi Electric Corp Image encoding device, image decoding device, image encoding method and image decoding method
TWI617148B (zh) * 2012-09-28 2018-03-01 內數位專利控股公司 用於報告回饋的無線發射/接收單元及方法
KR102250092B1 (ko) * 2013-10-14 2021-05-10 삼성전자주식회사 다시점 비디오 부호화 방법 및 장치, 다시점 비디오 복호화 방법 및 장치
WO2016070808A1 (en) * 2014-11-05 2016-05-12 Mediatek Singapore Pte. Ltd. Method and apparatus of video coding with prediction offset
EP3301915A1 (en) 2016-09-30 2018-04-04 Thomson Licensing Method and apparatus for omnidirectional video coding with adaptive intra most probable modes
WO2018134363A1 (en) * 2017-01-19 2018-07-26 Telefonaktiebolaget Lm Ericsson (Publ) Filter apparatus and methods
EP3685577A4 (en) * 2017-10-12 2021-07-28 MediaTek Inc. METHOD AND DEVICE OF A NEURAL NETWORK FOR VIDEO ENCODING
US11838541B2 (en) * 2019-08-30 2023-12-05 Alibaba Group Holding Limited Matrix weighted intra prediction of video signals
US11184622B2 (en) 2019-09-18 2021-11-23 Sharp Kabushiki Kaisha Video decoding apparatus and video coding apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102934430A (zh) * 2010-06-11 2013-02-13 索尼公司 图像处理装置和方法
US20180309995A1 (en) * 2015-04-21 2018-10-25 Vid Scale, Inc. High dynamic range video coding
CN108702509A (zh) * 2016-02-25 2018-10-23 株式会社Kt 用于处理视频信号的方法和设备
WO2017209328A1 (ko) * 2016-06-03 2017-12-07 엘지전자 주식회사 영상 코딩 시스템에서 인트라 예측 방법 및 장치
CN109804624A (zh) * 2016-10-04 2019-05-24 株式会社Kt 用于处理视频信号的方法和设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
M. SALEHIFAR (LGE), S. KIM (LGE): "CE3 Related: Low Memory and Computational Complexity Matrix Based Intra Prediction (MIP)", 127. MPEG MEETING; 20190708 - 20190712; GOTHENBURG; (MOTION PICTURE EXPERT GROUP OR ISO/IEC JTC1/SC29/WG11), 21 June 2019 (2019-06-21), XP030205483 *

Also Published As

Publication number Publication date
US20210235104A1 (en) 2021-07-29
JP7461353B2 (ja) 2024-04-03
EP3863287A1 (en) 2021-08-11
CN116347086A (zh) 2023-06-27
KR20210078536A (ko) 2021-06-28
CN116634157A (zh) 2023-08-22
JP2022511877A (ja) 2022-02-01
MX2021005546A (es) 2021-06-23
PH12021550833A1 (en) 2021-10-04
KR102602418B1 (ko) 2023-11-15
ZA202102495B (en) 2023-02-22
US11882304B2 (en) 2024-01-23
US11159814B2 (en) 2021-10-26
CA3116601C (en) 2023-01-03
AU2019467372B2 (en) 2022-05-19
CA3116601A1 (en) 2021-04-01
CN113905236A (zh) 2022-01-07
IL282280A (en) 2021-05-31
EP3863287A4 (en) 2022-02-23
KR20230156810A (ko) 2023-11-14
US20240107050A1 (en) 2024-03-28
US20210400297A1 (en) 2021-12-23
KR20230157531A (ko) 2023-11-16
RU2767188C1 (ru) 2022-03-16
CN113905236B (zh) 2023-03-28
BR112021008833A2 (pt) 2022-04-12
CN112840652A (zh) 2021-05-25
AU2019467372A1 (en) 2021-05-13

Similar Documents

Publication Publication Date Title
WO2020258010A1 (zh) 图像编解码方法、编码器、解码器以及存储介质
WO2021056223A1 (zh) 图像编解码方法、编码器、解码器以及存储介质
JP7481332B2 (ja) デコードのための予測方法及びその装置、並びにコンピュータ記憶媒体
CN114830663A (zh) 变换方法、编码器、解码器以及存储介质
WO2022116113A1 (zh) 一种帧内预测方法、装置及解码器和编码器
CN113992914B (zh) 帧间预测方法及装置、设备、存储介质
KR20210070368A (ko) 비디오 이미지 요소 예측 방법 및 장치, 컴퓨터 저장 매체
RU2790323C2 (ru) Способ кодирования изображений, способ декодирования изображений, кодер, декодер и носитель данных
WO2020258001A1 (zh) 亮度分量预测方法、编码器、解码器以及存储介质
JP2022521366A (ja) イントラ予測方法、装置およびコンピュータ記憶媒体
CN113395520A (zh) 解码预测方法、装置及计算机存储介质
WO2022188114A1 (zh) 帧内预测方法、编码器、解码器以及存储介质
JP2023123729A (ja) 予測方向の決定方法、デコーダ及びコンピュータ記憶媒体
TW202325023A (zh) 視頻編解碼系統中基於交叉分量線性模型的預測方法及裝置
CN113261279A (zh) 预测值的确定方法、编码器、解码器以及存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 3116601

Country of ref document: CA

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

Ref document number: 19946790

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019467372

Country of ref document: AU

Date of ref document: 20190924

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112021008833

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2019946790

Country of ref document: EP

Effective date: 20210507

Ref document number: 20217015292

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021532342

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112021008833

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20210506