Method for determining predicted value, encoder, decoder, and computer storage medium
By calculating a constant value based on pixel depth to adjust reference values, the method improves prediction accuracy and coding efficiency in MIP-based video coding, addressing precision issues in existing MIP technologies.
Patent Information
- Application Number
- CN202310084157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-24
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2039-09-24
AI Technical Summary
The prediction accuracy of the MIP mode in existing video codecs is low, which affects the encoding and decoding efficiency. It is mainly due to the limitation of the value range of the bit-right shift parameter, which causes the value interval of the predicted input value to be too large, which reduces the accuracy of the predicted value.
By obtaining the reconstruction value of adjacent pixels of the current block for filtering, the values of the first or second constant are calculated, and the predicted input value set is determined. Combined with the MIP matrix, bit-right shift parameters and weighted parameters, the predicted value of the current block is calculated, and the filtering process is performed to improve the accuracy.
When the same number of bits is used to represent the predicted input value set and the MIP matrix, the data in the dynamic range is more accurately represented, which improves the accuracy and encoding efficiency of predicted value calculation in MIP mode.
Smart Images

Figure CN116095323B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the matrix-based intra prediction technology (MIP) in intra prediction in the field of video coding, and in particular, to a method for determining a prediction value, an encoder, a decoder, and a computer storage medium. Background Art
[0002] Currently, in video coding and decoding, when using MIP to determine a prediction value, three values are involved and need to be obtained during the calculation of the prediction value, namely the MIP matrix, the weighting parameter, and the bit shift parameter. In the existing method for determining the prediction value, in order to ensure the complete representation of the numerical range, the value of the bit shift parameter cannot be too large. In this way, when determining the prediction value, the value range of the prediction input value is too large, which affects the prediction accuracy of the prediction value and further affects the coding and decoding efficiency. It can be seen from this that the prediction accuracy of the existing prediction method in video coding and decoding is low. Summary of the Invention
[0003] The embodiments of the present application provide a method for determining a prediction value, an encoder, a decoder, and a computer storage medium, which can improve the prediction accuracy in video coding and decoding and increase the coding and decoding rate.
[0004] The technical solution of the embodiments of the present application can be implemented as follows:
[0005] In a first aspect, the embodiments of the present application provide a method for determining a prediction value, which is applied to an encoder, and the method includes:
[0006] Obtain the reconstructed values of the adjacent pixels of the current block; perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block; when the size of the current block is smaller than a preset threshold, calculate the value of a first constant according to the value of the bit depth of the pixel luminance component in the current block; determine that the first prediction input value in the prediction input value set is the difference between the value of the first constant and the first reference value in the reference value set; determine the other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; calculate the prediction value of the pixel at a specific position in the current block according to the prediction input value set; perform filtering processing on the prediction value of the pixel at the specific position to obtain the prediction values of all pixels in the current block.
[0007] In a second aspect, the embodiments of the present application provide a method for determining a prediction value, which is applied to a decoder, and the method includes:
[0008] Parse the bitstream to obtain the size and coding mode of the current block; when the coding mode of the current block is the matrix-based intra prediction mode MIP, obtain the reconstructed values of the adjacent pixels of the current block, perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block; when the size of the current block is less than a preset threshold, calculate the value of a second constant according to the value of the bit depth of the pixel luminance component in the current block; determine that the first prediction input value in the preset input value set is the difference between the value of the second constant and the first reference value in the reference value set; determine the other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; calculate the prediction value of the pixel at a specific position in the current block according to the prediction input value set; perform interpolation filtering on the prediction value of the pixel at the specific position to obtain the prediction values of the pixels at other positions in the current block except the specific position.
[0009] In a third aspect, an embodiment of the present application provides an encoder, where the encoder includes:
[0010] A first acquisition module, configured to acquire the reconstructed values of the adjacent pixels of the current block; a first processing module, configured to perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block; a first calculation module, configured to calculate the value of a first constant according to the value of the bit depth of the pixel luminance component in the current block when the size of the current block is less than a preset threshold; a first determination module, configured to determine that the first prediction input value in the preset input value set is the difference between the value of the first constant and the first reference value in the reference value set; a second calculation module, configured to determine the other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; a third calculation module, configured to calculate the prediction value of the pixel at a specific position in the current block according to the prediction input value set; a second processing module, configured to perform filtering processing on the prediction value of the pixel at the specific position to obtain the prediction values of all the pixels in the current block.
[0011] In a fourth aspect, an embodiment of the present application provides a decoder, where the decoder includes:
[0012] A second acquisition module, configured to parse a bitstream to obtain the size and coding mode of a current block; a third processing module, configured to, when the coding mode of the current block is a matrix-based intra prediction mode MIP, obtain the reconstructed values of adjacent pixels of the current block, perform filtering processing on the reconstructed values of the adjacent pixels to obtain a reference value set of the current block; a fourth calculation module, configured to, when the size of the current block is less than a preset threshold, calculate the value of a second constant according to the value of the bit depth of the pixel luminance component in the current block; a second determination module, configured to determine that the first prediction input value in a preset input value set is the difference between the value of the second constant and the first reference value in the reference value set; a fifth calculation module, configured to determine other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; a sixth calculation module, configured to calculate the prediction value of a pixel at a specific position in the current block according to the prediction input value set; a fourth processing module, configured to perform interpolation filtering on the prediction value of the pixel at the specific position to obtain the prediction values of pixels at other positions in the current block except the specific position.
[0013] In a fifth aspect, an embodiment of the present application provides an encoder, including: a processor and a storage medium storing executable instructions of the processor, the storage medium depends on the processor to execute operations through a communication bus, and when the instructions are executed by the processor, execute the method for determining a prediction value described in one or more of the above embodiments.
[0014] In a sixth aspect, an embodiment of the present application provides a decoder, including: a processor and a storage medium storing executable instructions of the processor, the storage medium depends on the processor to execute operations through a communication bus, and when the instructions are executed by the processor, execute the method for determining a prediction value described in one or more of the above embodiments.
[0015] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium storing executable instructions, and when the executable instructions are executed by one or more processors, the processors execute the method for determining a prediction value described in one or more of the above embodiments.
[0016] Embodiments of the present application provide a method for determining a predicted value, an encoder, a decoder, and a computer storage medium. The method may include: The encoder obtains the reconstructed values of adjacent pixels of the current block, performs filtering processing on the reconstructed values of the adjacent pixels to obtain a reference value set of the current block. When the size of the current block is smaller than a preset threshold, according to the value of the bit depth of the pixel luminance component in the current block, calculate the value of a first constant, determine that the first predicted input value in the preset input value set is the difference between the value of the first constant and the first reference value in the reference value set. According to the reference value set, determine the other predicted input values in the predicted input value set except the first predicted input value. According to the predicted input value set, calculate the predicted value of the pixel at a specific position in the current block, and perform filtering processing on the predicted value of the pixel at the specific position to obtain the predicted values of all pixels in the current block. That is to say, in the embodiments of the present application, by calculating the first constant, and determining the difference between the value of the first constant and the first reference value in the reference value set as the first predicted input value in the predicted input value set, and using the predicted input value set to calculate the predicted value of the current block, it is possible to effectively reduce the dynamic value range of the predicted input value set during MIP mode prediction. Therefore, compared with the prior art, when using the same number of bits to represent the predicted input value set and the MIP matrix, the data in the dynamic range can be represented more accurately, improving the accuracy in the process of calculating the predicted value in the MIP mode, and further improving the coding efficiency. Description of the Drawings
[0017] Figure 1 It is a schematic structural diagram of a video coding system;
[0018] Figure 2 It is a schematic structural diagram of a video decoding system;
[0019] Figure 3 It is a schematic flowchart of encoding pixels using the MIP mode;
[0020] Figure 4 It is a schematic flowchart of encoding using the MIP mode;
[0021] Figure 5 It is a schematic flowchart of an optional method for determining a predicted value provided by an embodiment of the present application;
[0022] Figure 6 It is a schematic flowchart of another optional method for determining a predicted value provided by an embodiment of the present application;
[0023] Figure 7 It is a schematic structural diagram of an optional encoder provided by an embodiment of the present application;
[0024] Figure 8 It is a schematic structural diagram of an optional decoder provided by an embodiment of the present application;
[0025] Figure 9 Another optional structural schematic diagram of the encoder proposed in the embodiment of the present application;
[0026] Figure 10 Another optional structural schematic diagram of the decoder proposed in the embodiment of the present application. Detailed implementation manners
[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, rather than limiting the application. In addition, it should be noted that, for the sake of description, only the parts related to the related application are shown in the drawings.
[0028] In video images, in the latest Versatile Video Coding (VVC), the AffineLinear Weighted Intra Prediction proposed by HHI in Joint Video Explore Team (JVET)-N0217 is adopted and renamed as the MIP technology. For different sizes of intra-frame luminance coding blocks, different numbers of matrix-based intra-frame prediction modes are added in the intra-frame luminance prediction process.
[0029] Among them, the MIP technology divides the luminance blocks into three categories according to the size of the intra-frame luminance coding blocks. Assuming the size of the luminance block is W*H, the luminance blocks can be divided into three categories according to the size: the luminance blocks with a size of 4×4 are the first category of luminance blocks, the luminance blocks with sizes of 8×4, 4×8, and 8×8 are the second category of luminance blocks, and the luminance blocks of other sizes are the third category of luminance blocks. For these three types of intra-frame luminance coding blocks, the MIP technology adds M MIP modes on the basis of 67 traditional intra-frame prediction modes.
[0030] Figure 1 Structural schematic diagram of a video coding system, as Figure 1As shown in the figure, the video encoding system 100 includes components such as a transform and quantization module 101, an intra-frame estimation module 102, an intra-frame prediction module 103, a motion compensation module 104, a motion estimation module 105, an inverse transform and inverse quantization module 106, a filter control analysis module 107, a deblocking filter and sample adaptive offset (SAO) filter module 108, a header information encoding and context-based adaptive binary arithmetic coding (CABAC) encoding module 109, and a decoded image buffer module 110.
[0031] Figure 2 It is a schematic structural diagram of a video decoding system. As Figure 2 shown, the video decoding system 200 includes components such as a header information decoding and CABAC decoding module 201, an inverse transform and inverse quantization module 202, an intra-frame prediction module 203, a motion compensation module 204, a deblocking filter and SAO filter module 205, and a decoded image buffer module 206; after the video image is processed by parts such as the transform and quantization module 101, intra-frame estimation module 102, intra-frame prediction module 103, motion compensation module 104, motion estimation module 105, deblocking filter and SAO filter module 108, and header information encoding and CABAC encoding module 109 in the video encoding system 100, the bitstream of the video image is output; this bitstream is input into the video decoding system 200 and is processed by parts such as the header information decoding and CABAC decoding module 201, inverse transform and inverse quantization module 202, intra-frame prediction module 203, and motion compensation module 204 in the video decoding system 200, and finally the original video image is restored.
[0032] When the MIP mode is used for encoding and decoding provided by the embodiments of this application, the method for determining the predicted value is mainly applied to the intra-frame prediction module 103 in video encoding and the intra-frame prediction module 203 in video decoding, and acts on both the encoding end and the decoding end.
[0033] For the first type of luminance block, M = 35; for the second type of luminance block, M = 19; for the third type of luminance block, M = 11.
[0034] Specifically, the MIP technology is only applied to intra-frame luminance prediction. Similar to the traditional mode, the input of MIP prediction is also the data of the upper row and the left column of the current block (equivalent to the to-be-encoded image block below), 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. That is to say, by performing these three operations on the reconstructed luminance values of the adjacent pixel points in the upper row and the left column of the input, the luminance predicted value of the current block can be obtained.
[0035] Figure 3 It is a schematic diagram of the process for encoding pixels using the MIP mode, as Figure 3 shown, and the specific implementation is as follows:
[0036] Step 1: Perform an averaging operation on the upper adjacent reference points of the current luminance block to obtain a vector redT, with a total of N values; perform an averaging operation on the left adjacent reference points of the current luminance block to obtain a vector redL, with a total of N values. When the luminance block size is a first type of block, N = 2; when the luminance block size is a second or third type of block, N = 4. The vector redT and the vector redL form a new vector pTemp and subsequent operations are performed;
[0037] Step 2: Obtain the matrix mWeight, the weighting parameter fO, and the bit right shift parameter sW, and calculate the partial prediction value of the current block marked with cross lines in Figure 3 by the following formula:
[0038]
[0039]
[0040] where, when MipSizeId = 0 or 1, the following formula is used for calculation:
[0041] p[0] = pTemp[0] - (1 << (BitDepth - 1)) (3)
[0042] p[i] = pTemp[i] - pTemp[0] i = 1,..., inSize - 1 (4)
[0043] When MipSizeId = 2, the following formula is used for calculation:
[0044] p[i] = pTemp[i + 1] - pTemp[0] i = 0,..., inSize - 2 (5)
[0045] Among them, predMip[x, y] is the predicted value at the pixel position (x, y); pTemp[i] is the i-th reference value in the reference value set of the current block when predicting using the MIP mode, and p[x] is the i-th prediction input value when predicting using the MIP mode; inSize is determined according to the mode serial number MipSizeId of MIP. When the value of MipSizeId is equal to 0, the value of inSize is equal to 4. When the value of MipSizeId is equal to 1, the value of inSize is equal to 8. When the value of MipSizeId is equal to 2, the value of inSize is equal to 7. The value of MipSizeId is determined according to the current block size. When the current block size is 4x4, the value of MipSizeId is equal to 0. When the current block size is 4x8, 8x4 or 8x8, the value of MipSizeId is equal to 1. When the current block size is greater than 8x8, the value of MipSizeId is equal to 2. BitDepth is the bit depth of the luminance component (bitdepth, that is, how many bits of binary numbers are used to represent the luminance component sample value sample), mWeight represents the MIP matrix, predC, incH, and incW are used to determine the parameters of the matrix element corresponding to the pixel position (x, y). ">>" is the bit right shift operator, oW represents the shift offset used in the bit right shift operation, sW represents the number of bits of bit right shift, fO represents the weighting parameter, and sW and fO can be determined at least according to the current block size or the value of MipSizeId. For example, the values of sW and fO are determined using a mapping table related to the value of MipSizeId. The mapping table records at least the values of sW and fO under different values of MipSizeId.
[0046] Step 3: Obtain the remaining predicted values in the current block through linear interpolation, and then the partial predicted values of the current block marked by multiple small dots as shown in Figure 3 can be obtained.
[0047] It can be seen that in the MIP technology, three values need to be obtained during the process of determining the predicted value, namely mWeight, fO, and sW. Among them, the value of mWeight is related to both the prediction mode and the pixel spatial position, while fO and sW are only related to the prediction mode. And p[i] is calculated through formulas (3), (4), and (5). The value of mWeight and fO are both saved as unsigned 7-bit binary numbers. sW is the offset corresponding to the prediction mode. According to the prediction mode (as shown in Table 1 below), it takes one of the values 5, 6, 7. It is obtained by looking up Table 1. Calculating the matrix-vector product can obtain the pixel value of this pixel. Finally, the overall memory requirement is 4.5395 kilobytes.
[0048] Table 1
[0049]
[0050] When performing prediction in the MIP mode, for the current block, first determine the index of the mode used. According to this mode index, obtain a fixed sW value for the current block by looking up a table. Then, mWeight - fO, and then right-shift by sW bits to obtain the original floating-point number matrix for calculating the prediction value. Figure 4 It is a schematic flowchart of the encoding process using the MIP mode, as Figure 4 shown:
[0051] First, obtain the index number of the MIP mode. Then, according to the index number of the MIP mode, obtain the mWeight and fO trained by the machine from the mapping table. According to the index number of the MIP mode, obtain sW from the mapping table. Finally, perform (mWeight[x][y] - fO) >> sW for prediction to obtain the prediction value.
[0052] That is to say, in the existing MIP technology in VVC, the original floating-point numbers mWeightf[x][y] of all values of mWeight are represented as fixed-point values of the offset starting from its minimum value (usually a negative value, represented by fO):
[0053] mWeight[x][y] = (mWeight f [x][y] + fO) << sW (6)
[0054] Among them, mWeight[x][y] is stored as an unsigned 7-bit binary number, resulting in a certain loss of its representation accuracy. Here, the larger sW is, the higher the accuracy. However, to ensure the complete representation of the numerical range, the value of sW cannot be too large. Since the same sW value is used without difference in the entire matrix, the parameters with a relatively small original value range also have to further reduce the representation accuracy to adapt to the common value change range of all parameters in the entire matrix. The change range of the parameters in the original matrix is also related to the acquisition method of the p[i] data. The calculation method of the p[i] data in the existing method causes an expansion of the parameter change range, reduces the accuracy of the data in the weight matrix, increases the prediction error of the MIP mode, and reduces the encoding efficiency.
[0055] In order to improve the prediction accuracy of the MIP mode and thus improve the encoding efficiency, the embodiments of the present application provide a method for determining a prediction value. Figure 5 It is a schematic flowchart of an optional method for determining a prediction value provided by the embodiments of the present application. Refer to Figure 5 shown. This method is applied to an encoder, and this method may include:
[0056] S501: Obtain the reconstructed values of the adjacent pixels of the current block;
[0057] Specifically, during the encoding process, in order to determine the predicted value of the current block, it is first necessary to obtain the reconstructed values of the adjacent pixels of the current block. Here, the adjacent pixels include the reconstructed values at the pixel positions in the upper row of the current block and the reconstructed values at the pixel positions in the left column.
[0058] S502: Perform filtering processing on the reconstructed values of the adjacent pixels to obtain a reference value set for the current block;
[0059] After obtaining the reconstructed values of the adjacent pixels, for example, the reconstructed values of the upper row of pixels obtained are redT, a total of N values, and the reconstructed values of the left column of pixels are redL, a total of N values. redT and redL form a new vector pTemp as the reference value set for the current block. In order to obtain the reference value set for the current block through filtering processing, in an optional embodiment, S502 may include:
[0060] Divide the reconstructed values of the adjacent pixels into N groups, calculate the mean value of the reconstructed values of the adjacent pixels in each group, and use the mean value as the reference value in the reference value set, where N is a positive integer.
[0061] Among them, N is set to the positive integer value corresponding to the preset current block size. That is to say, the process of performing filtering processing on the reconstructed values of the adjacent pixels in S502 can specifically be: first divide redT and redL into N groups, then calculate the mean value for each group to obtain N mean values, and use the N mean values as the reference values in the reference set.
[0062] For example, when the current block size is 4x4, the value of inSize is equal to 4; when the current block size is 4x8, 8x4, or 8x8, the value of inSize is equal to 8; when the current block size is greater than 8x8, the value of inSize is equal to 7.
[0063] S503: When the size of the current block is less than a preset threshold, calculate the value of the first constant according to the value of the bit depth of the pixel luminance component in the current block;
[0064] In practical applications, when the size of the current block can be represented by MipSizeId, and MipSizeId is a number less than 2, that is, when MipSizeId is equal to 0 or 1, first calculate the value of the first constant according to the value of the bit depth of the pixel luminance component in the current block.
[0065] In order to calculate the value of the first constant, in an optional embodiment, S503 may include:
[0066] Set the value of the first constant to the value after performing a binary bit left shift operation on the logarithmic value 1, where the number of bits shifted left in the binary bit left shift operation is equal to the value of the bit depth minus 1.
[0067] Specifically, the value of the first constant is the value obtained by shifting 1 to the left, and the number of bits shifted is the bit depth minus 1.
[0068] S504: Determine that the first predicted input value in the predicted input value set is the difference between the value of the first constant and the first reference value in the reference value set;
[0069] Among them, the predicted input value set is used to calculate the predicted value of the current block according to the MIP; after calculating the first constant through S504, the difference between the value of the first constant and the first reference value in the reference value can be determined as the first predicted input value. The first predicted input value p[0] can be calculated using the following formula:
[0070] p[0] = (1 << (BitDepth - 1) - pTemp[0]) (7)
[0071] S505: Determine the other predicted input values in the predicted input value set except the first predicted input value according to the reference value set;
[0072] Among them, the other predicted input values p[i] include the predicted input values except the first predicted input value when the size of the current block is less than the preset threshold. The other predicted input values p[i] can also include the predicted input values when the size of the current block is greater than or equal to the preset threshold, and can be calculated using the following formula:
[0073] p[i] = pTemp[i + 1] - pTemp[0] i = 1,..., inSize - 1 (8)
[0074] S506: Calculate the predicted value of the pixel at a specific position in the current block according to the predicted input value set;
[0075] Specifically, after determining all the predicted input values, the predicted input value set can be obtained. According to the predicted input value set, prediction can be performed to obtain the predicted value of the pixel at a specific position in the current block. For example, Figure 3 the predicted value of the pixel position marked with a cross line in.
[0076] In order to determine the predicted value of the pixel at a specific position in the current block, in an optional embodiment, S506 may include:
[0077] Determine the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables; calculate the predicted value of the specific pixel position in the current block according to the input value set, the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block.
[0078] That is to say, one or more mapping tables are pre-stored in the encoder. Through the one or more mapping tables, the MIP matrix of the current block, denoted as mWeight, the bit right shift parameter sW of the current block, and the weighting parameter fO of the current block can be determined.
[0079] Among them, sW and fO can be determined at least according to the value of the current block size or MipSizeId. For example, the values of sW and fO are determined using a mapping table related to the value of MipSizeId, and the mapping table records at least the values of sW and fO under different values of MipSizeId.
[0080] It should be noted that the values in the above mapping table are constants, that is, the values in the mapping table are not updated during the calculation of the MIP prediction value. The constant values in the mapping table can be obtained by using the offline training method according to the calculation method of the above formula (7); optionally, the constant values in the mapping table can be derived from the mapping tables corresponding to other different calculation methods of p[0] according to the calculation method of the above formula (7). In particular, in the embodiments of the present application, the mapping table derived from the MIP mapping table of VVCCD is as follows:
[0081] If MipSizeId = 0, modeId = 0; mWeight[x][y] =
[0082] {
[0083] {31, 59, 77, 28}, {36, 92, 85, 25}, {37, 69, 100, 24}, {35, 36, 106, 29}, {44, 49, 104, 48}, {44, 21, 94, 59}, {39, 0, 80, 72}, {33, 2, 66, 84}, {36, 13, 35, 99},
[0084] {29, 11, 34, 103}, {23, 21, 34, 106}, {17, 24, 40, 105}, {18, 28, 43, 101}, {12, 32, 49, 101}, {7, 31, 53, 102}, {7, 32, 54, 100}
[0085] },
[0086] If MipSizeId = 0, modeId = 1; mWeight[x][y] =
[0087] {{22, 14, 70, 0}, {24, 17, 53, 5}, {28, 70, 32, 12}, {40, 82, 11, 19}, {20, 17, 63, 52}, {22, 17, 46, 63}, {25, 21, 29, 71}, {30, 25, 16, 74}, {20, 19, 16, 85}, {21, 19, 17, 85}, {20, 18, 20, 83}, {20, 18, 23, 82}, {20, 19, 22, 80}, {20, 18, 22, 80}, {20, 20, 22, 80}, {21, 21, 22, 80}},
[0088] If MipSizeId = 0, modeId = 2; mWeight[x][y] =
[0089] {{6, 7, 62, 10}, {7, 0, 33, 9}, {7, 12, 2, 6}, {7, 63, 3, 6}, {7, 7, 73, 6}, {7, 8, 71, 9}, {7, 1, 50, 9}, {7, 9, 14, 7}, {6, 7, 55, 22}, {7, 7, 72, 5}, {7, 9, 74, 7}, {7, 3, 62, 9}, {8, 6, 2, 77}, {7, 6, 33, 45}, {7, 7, 62, 14}, {7, 8, 70, 8}},
[0090] If MipSizeId = 0, modeId = 3; mWeight[x][y] =
[0091] {{32, 32, 54, 34}, {32, 38, 34, 34}, {32, 94, 38, 30}, {34, 110, 40, 28}, {32, 30, 80, 32}, {32, 52, 56, 30}, {34, 106, 48, 30}, {44, 104, 38, 40}, {32, 30, 56, 72}, {48, 64, 38, 80}, {68, 90, 20, 86}, {76, 78, 8, 90}, {50, 32, 0, 122}, {76, 68, 4, 106}, {86, 74, 8, 96}, {82, 74, 8, 94}},
[0092] If MipSizeId = 0, modeId = 4; mWeight[x][y] =
[0093] {{27, 19, 44, 22}, {27, 35, 23, 27}, {26, 88, 29, 28}, {28, 91, 27, 27}, {32, 21, 87, 25}, {35, 22, 46, 20}, {32, 69, 26, 20}, {29, 87, 29, 23}, {32, 23, 40, 81}, {44, 16, 46, 66}, {53, 17, 17, 50}, {46, 37, 3, 40}, {31, 25, 21, 92}, {36, 24, 24, 91}, {43, 16, 23, 88}, {52, 11, 0, 81}},
[0094] If MipSizeId = 0, modeId = 5; mWeight[x][y] =
[0095] {{24, 24, 82, 26}, {24, 22, 76, 26}, {24, 32, 66, 24}, {24, 58, 56, 24}, {24, 26, 88, 22}, {24, 28, 88, 26}, {26, 26, 88, 26}, {24, 26, 86, 28}, {24, 26, 72, 40}, {24, 26, 84, 24}, {22, 28, 86, 22}, {26, 34, 82, 24}, {26, 24, 0, 110}, {26, 24, 14, 98}, {42, 26, 44, 62}, {80, 38, 76, 8}},
[0096] If MipSizeId = 0, modeId = 6; mWeight[x][y] =
[0097] {{20, 22, 48, 19}, {22, 20, 43, 18}, {21, 35, 35, 19}, {30, 62, 25, 17}, {21, 22, 47, 29}, {22, 21, 48, 27}, {23, 31, 45, 24}, {55, 44, 24, 8}, {21, 21, 25, 48}, {18, 23, 25, 51}, {39, 19, 23, 38}, {76, 27, 22, 0}, {22, 21, 20, 53}, {23, 19, 18, 54}, {60, 5, 12, 35}, {77, 25, 19, 3}},
[0098] If MipSizeId = 0, modeId = 7; mWeight[x][y] =
[0099] {{13, 10, 73, 12}, {13, 3, 54, 15}, {13, 0, 29, 14}, {13, 22, 13, 13}, {13, 13, 80, 10}, {14, 14, 86, 7}, {15, 11, 84, 8}, {14, 3, 68, 11}, {13, 12, 30, 59}, {14, 10, 45, 43}, {15, 11, 63, 26}, {17, 11, 75, 15}, {16, 10, 6, 83}, {18, 9, 6, 83}, {19, 8, 9, 78}, {24, 5, 21, 63}},
[0100] If MipSizeId = 0, modeId = 8; mWeight[x][y] =
[0101] {{24, 22, 74, 30}, {24, 20, 22, 44}, {26, 68, 6, 32}, {26, 90, 20, 28}, {24, 26, 46, 66}, {24, 20, 36, 74}, {24, 44, 10, 58}, {38, 82, 6, 30}, {24, 24, 34, 76}, {24, 24, 40, 74}, {24, 26, 32, 78}, {86, 42, 10, 32}, {26, 22, 38, 74}, {22, 26, 38, 74}, {40, 16, 36, 72}, {118, 0, 34, 32}},
[0102] If MipSizeId = 0, modeId = 9; mWeight[x][y] =
[0103] {{14, 39, 85, 0}, {15, 49, 42, 39}, {17, 30, 22, 66}, {17, 18, 19, 74}, {18, 19, 24, 73}, {17, 11, 13, 83}, {17, 12, 18, 78}, {17, 15, 19, 75}, {16, 15, 14, 78}, {16, 16, 19, 75}, {17, 17, 18, 75}, {18, 17, 18, 75}, {16, 16, 19, 75}, {17, 16, 18, 76}, {17, 16, 18, 76}, {18, 16, 19, 75}},
[0104] If MipSizeId = 0, modeId = 10; mWeight[x][y] =
[0105] {{26, 24, 57, 22}, {30, 14, 30, 24}, {28, 61, 25, 25}, {26, 100, 29, 27}, {29, 27, 92, 30}, {31, 19, 72, 25}, {40, 15, 37, 21}, {46, 70, 24, 18}, {29, 26, 30, 89}, {30, 26, 34, 87}, {41, 14, 27, 81}, {67, 12, 0, 65}, {29, 26, 24, 92}, {29, 27, 24, 92}, {28, 29, 27, 93}, {36, 22, 25, 89}},
[0106] If MipSizeId = 0, modeId = 11; mWeight[x][y] =
[0107] {{21, 19, 60, 7}, {26, 12, 35, 9}, {26, 14, 27, 11}, {22, 50, 24, 13}, {24, 18, 75, 38}, {29, 16, 60, 39}, {38, 6, 30, 41}, {41, 0, 3, 45}, {22, 19, 21, 84}, {23, 19, 21, 85}, {25, 20, 22, 84}, {28, 18, 16, 83}, {20, 20, 20, 83}, {20, 21, 21, 82}, {19, 21, 21, 83}, {19, 22, 22, 82}},
[0108] If MipSizeId = 0, modeId = 12; mWeight[x][y] =
[0109] {{16, 14, 75, 3}, {16, 43, 57, 16}, {18, 63, 20, 43}, {14, 46, 0, 65}, {15, 20, 54, 52}, {15, 22, 23, 76}, {13, 17, 15, 83}, {10, 17, 17, 82}, {14, 17, 11, 84}, {12, 18, 14, 83}, {11, 20, 16, 81}, {9, 21, 16, 81}, {12, 18, 18, 80}, {10, 19, 17, 81}, {9, 20, 16, 82}, {8, 20, 16, 82}},
[0110] If MipSizeId = 0, modeId = 13; mWeight[x][y] =
[0111] {{7, 6, 82, 0}, {7, 4, 83, 0}, {7, 2, 83, 0}, {7, 3, 80, 0}, {7, 8, 59, 16}, {7, 8, 58, 17}, {7, 8, 58, 17}, {7, 7, 57, 18}, {7, 7, 7, 70}, {7, 7, 7, 71}, {7, 7, 6, 71}, {7, 8, 7, 70}, {6, 7, 8, 71}, {6, 7, 8, 70}, {6, 7, 8, 70}, {6, 7, 9, 69}},
[0112] If MipSizeId = 0, modeId = 14; mWeight[x][y] =
[0113] {{21, 16, 39, 18}, {19, 35, 27, 17}, {19, 56, 17, 28}, {30, 46, 8, 40}, {17, 26, 47, 25}, {21, 40, 24, 40}, {41, 31, 9, 46}, {57, 13, 10, 41}, {22, 25, 15, 55}, {49, 14, 12, 46}, {65, 3, 18, 36}, {63, 4, 19, 35}, {49, 8, 13, 46}, {65, 0, 19, 33}, {63, 1, 19, 35}, {61, 3, 18, 36}},
[0114] If MipSizeId = 0, modeId = 15; mWeight[x][y] =
[0115] {{23, 43, 54, 26}, {23, 56, 50, 24}, {22, 57, 49, 25}, {23, 61, 47, 24}, {24, 51, 57, 20}, {21, 55, 51, 27}, {23, 56, 52, 24}, {24, 59, 51, 23}, {23, 43, 60, 24}, {27, 55, 58, 12}, {23, 58, 52, 23}, {24, 59, 52, 23}, {64, 26, 13, 80}, {89, 48, 51, 0}, {43, 57, 59, 7}, {24, 57, 54, 22}},
[0116] If MipSizeId = 0, modeId = 16; mWeight[x][y] =
[0117] {{20, 20, 51, 22}, {21, 22, 51, 22}, {21, 29, 50, 22}, {21, 32, 48, 22}, {21, 23, 53, 22}, {21, 24, 53, 22}, {21, 23, 53, 22}, {21, 24, 53, 22}, {18, 24, 47, 28}, {18, 24, 48, 27}, {19, 25, 48, 26}, {20, 25, 48, 26}, {30, 16, 0, 71}, {35, 14, 1, 67}, {38, 14, 2, 64}, {38, 13, 4, 63}},
[0118] If MipSizeId = 0, modeId = 17; mWeight[x][y] =
[0119] {{25, 21, 34, 25}, {27, 34, 3, 39}, {30, 55, 24, 23}, {26, 41, 40, 18}, {28, 22, 13, 48}, {44, 38, 6, 29}, {35, 44, 43, 10}, {25, 30, 45, 21}, {35, 29, 12, 44}, {56, 34, 31, 2}, {33, 30, 47, 14}, {24, 28, 44, 25}, {39, 37, 33, 19}, {48, 29, 40, 0}, {31, 25, 44, 19}, {25, 28, 44, 24}},
[0120] If MipSizeId = 1, modeId = 0; mWeight[x][y] =
[0121] {{18, 22, 18, 20, 72, 43, 9, 19}, {18, 8, 22, 26, 56, 58, 5, 20}, {19, 21, 10, 35, 35, 72, 3, 20}, {21, 21, 21, 29, 18, 78, 7, 18}, {19, 16, 16, 19, 3, 70, 46, 8}, {21, 18, 15, 20, 4, 58, 61, 4}, {25, 16, 18, 18, 8, 42, 73, 3}, {28, 14, 20, 18, 13, 30, 76, 6}, {20, 18, 17, 17, 19, 4, 69, 40}, {24, 18, 17, 16, 19, 3, 55, 51}, {30, 14, 18, 15, 17, 5, 39, 63, {31, 14, 18, 16, 16, 8, 28, 70}, {22, 15, 18, 16, 16, 20, 2, 92}, {26, 14, 18, 15, 15, 19, 0, 91}, {29, 15, 18, 16, 14, 19, 3, 88}, {29, 16, 17, 17, 15, 17, 7, 84}},
[0122] If MipSizeId = 1, modeId = 1; mWeight[x][y] =
[0123] {{20, 35, 18, 20, 58, 35, 18, 20}, {20, 75, 26, 19, 32, 31, 20, 20}, {21, 6, 93, 22, 20, 25, 21, 20}, {24, 25, 0, 99, 18, 21, 21, 18}, {20, 28, 20, 20, 8, 78, 30, 19}, {20, 67, 22, 20, 10, 59, 27, 19}, {22, 7, 93, 18, 15, 30, 25, 20}, {26, 25, 1, 97, 20, 18, 22, 18}, {20, 28, 19, 20, 15, 14, 81, 25}, {20, 59, 20, 20, 12, 22, 65, 23}, {23, 7, 93, 16, 14, 24, 34, 22}, {30, 24, 3, 95, 19, 20, 20, 18}, {20, 29, 20, 20, 14, 23, 8, 90}, {20, 51, 19, 21, 14, 19, 15, 77}, {24, 7, 88, 16, 14, 20, 21, 43}, {33, 22, 6, 91, 19, 18, 20, 21}},
[0124] If MipSizeId = 1, modeId = 2; mWeight[x][y] =
[0125] {{10, 19, 10, 12, 81, 14, 10, 11}, {10, 26, 15, 10, 79, 6, 12, 11}, {11, 16, 31, 12, 69, 2, 14, 10}, {11, 13, 8, 44, 54, 3, 14, 10}, {11, 11, 12, 11, 1, 83, 13, 9}, {11, 12, 12, 12, 11, 83, 4, 12}, {11, 15, 11, 13, 24, 77, 0, 12}, {11, 14, 13, 16, 38, 63, 2, 12}, {11, 12, 11, 11, 14, 2, 82, 12}, {11, 13, 12, 12, 10, 14, 79, 5}, {11, 12, 12, 13, 6, 29, 70, 3}, {11, 12, 11, 16, 3, 45, 55, 4}, {11, 12, 11, 12, 10, 12, 1, 84}, {11, 13, 11, 12, 12, 8, 13, 76}, {11, 12, 12, 13, 14, 3, 29, 64}, {11, 13, 10, 17, 15, 0, 45, 49}},
[0126] If MipSizeId = 1, modeId = 3; mWeight[x][y] =
[0127] {{21, 50, 24, 20, 19, 38, 22, 24}, {22, 53, 41, 23, 14, 22, 27, 27}, {22, 22, 66, 37, 19, 17, 25, 28}, {27, 19, 12, 92, 19, 18, 21, 28}, {21, 51, 25, 20, 19, 23, 48, 27}, {21, 41, 48, 24, 17, 11, 36, 37}, {24, 17, 58, 43, 14, 17, 23, 39}, {39, 22, 4, 91, 15, 20, 16, 33}, {20, 44, 27, 21, 16, 20, 35, 54}, {22, 31, 53, 24, 13, 19, 21, 55}, {30, 14, 47, 50, 10, 20, 16, 48}, {57, 28, 0, 82, 19, 14, 18, 30}, {22, 34, 30, 21, 15, 22, 21, 70, {24, 22, 52, 26, 12, 24, 16, 61}, {38, 17, 33, 56, 14, 18, 16, 49}, {66, 32, 0, 75, 26, 4, 22, 30}},
[0128] If MipSizeId = 1, modeId = 4; mWeight[x][y] =
[0129] {{18, 32, 15, 16, 60, 34, 10, 19}, {18, 68, 28, 13, 31, 37, 11, 17}, {19, 8, 73, 23, 15, 30, 22, 14}, {19, 18, 0, 85, 11, 17, 33, 15}, {18, 18, 19, 17, 9, 56, 56, 9}, {19, 19, 20, 16, 13, 30, 73, 12}, {19, 20, 20, 18, 13, 13, 71, 28}, {18, 18, 16, 26, 12, 8, 54, 47}, {17, 16, 17, 17, 17, 10, 54, 51}, {16, 17, 16, 18, 16, 15, 28, 73}, {16, 18, 15, 18, 16, 20, 14, 83}, {15, 19, 17, 18, 15, 21, 14, 82}, {16, 17, 16, 18, 17, 18, 7, 90}, {15, 18, 16, 19, 16, 17, 11, 87}, {14, 18, 16, 20, 17, 15, 15, 84}, {13, 19, 16, 22, 17, 15, 18, 81}},
[0130] If MipSizeId = 1, modeId = 5; mWeight[x][y] =
[0131] {{11, 6, 13, 11, 75, 6, 12, 11}, {12, 3, 8, 13, 48, 2, 13, 10}, {12, 45, 1, 13, 19, 9, 12, 10}, {12, 42, 37, 8, 10, 12, 11, 10}, {11, 11, 10, 12, 18, 74, 6, 11}, {11, 12, 10, 12, 53, 47, 2, 12}, {12, 6, 10, 12, 71, 16, 9, 11}, {12, 15, 6, 13, 53, 5, 13, 10}, {12, 12, 10, 11, 9, 17, 77, 5}, {12, 11, 9, 12, 3, 51, 50, 2}, {12, 11, 9, 12, 11, 72, 18, 8}, {12, 11, 9, 12, 36, 57, 7, 10}, {12, 10, 10, 11, 10, 10, 16, 71}, {13, 11, 10, 11, 14, 0, 56, 39}, {13, 11, 9, 12, 12, 8, 76, 13}, {13, 12, 9, 12, 8, 35, 57, 7}},
[0132] If MipSizeId = 1, modeId = 6; mWeight[x][y] =
[0133] {{23, 21, 23, 23, 101, 30, 19, 25}, {24, 13, 23, 24, 101, 29, 19, 25}, {24, 24, 14, 23, 101, 29, 18, 24}, {24, 23, 25, 17, 98, 29, 18, 24}, {23, 24, 23, 23, 0, 97, 36, 17}, {24, 25, 24, 22, 1, 97, 35, 17}, {24, 22, 25, 23, 1, 96, 36, 17}, {24, 22, 23, 24, 3, 94, 36, 17}, {24, 23, 23, 22, 31, 0, 93, 34}, {24, 23, 24, 23, 31, 2, 93, 33}, {24, 22, 24, 23, 31, 1, 92, 34}, {24, 22, 23, 23, 30, 3, 90, 35}, {23, 24, 23, 23, 19, 31, 2, 102}, {23, 23, 23, 24, 19, 30, 3, 101}, {23, 23, 24, 24, 19, 30, 3, 101}, {23, 23, 23, 24, 19, 31, 4, 100}}
[0134] If MipSizeId = 1, modeId = 7; mWeight[x][y] =
[0135] {{10, 5, 10, 10, 56, 4, 11, 9}, {11, 22, 6, 10, 13, 9, 10, 10}, {11, 67, 22, 6, 10, 10, 10, 10}, {11, 6, 68, 18, 11, 9, 11, 9}, {10, 10, 10, 10, 40, 53, 3, 11}, {11, 6, 10, 9, 61, 9, 10, 9}, {11, 17, 6, 10, 23, 7, 9, 10}, {11, 56, 15, 8, 10, 11, 9, 10}, {10, 9, 11, 9, 4, 42, 54, 3}, {11, 10, 11, 9, 22, 67, 8, 8}, {10, 7, 11, 9, 57, 23, 7, 10}, {11, 11, 10, 10, 36, 8, 10, 9}, {10, 10, 11, 9, 13, 0, 41, 50}, {11, 9, 11, 9, 8, 24, 64, 8}, {10, 10, 11, 9, 15, 63, 18, 10}, {11, 10, 11, 10, 44, 33, 10, 11}},
[0136] If MipSizeId = 1, modeId = 8; mWeight[x][y] =
[0137] {{21, 44, 37, 20, 24, 68, 10, 23}, {21, 1, 55, 39, 14, 39, 41, 18}, {21, 25, 0, 68, 18, 18, 42, 39}, {22, 24, 19, 36, 19, 14, 25, 72}, {21, 11, 28, 30, 18, 23, 80, 19}, {22, 25, 8, 38, 21, 13, 45, 62}, {22, 22, 18, 25, 19, 18, 16, 90}, {23, 21, 21, 24, 19, 21, 12, 91}, {21, 22, 15, 28, 21, 20, 23, 82}, {22, 21, 19, 24, 20, 22, 9, 95}, {23, 21, 21, 22, 20, 21, 13, 92}, {23, 22, 21, 22, 19, 21, 15, 90}, {22, 21, 20, 22, 21, 22, 15, 90}, {22, 21, 21, 22, 20, 21, 16, 89}, {23, 21, 20, 23, 19, 22, 15, 89}, {24, 21, 20, 23, 19, 23, 15, 87}},
[0138] If MipSizeId = 1, modeId = 9; mWeight[x][y] =
[0139] {{8, 15, 18, 15, 51, 68, 39, 23}, {7, 4, 10, 20, 22, 76, 51, 27}, {7, 16, 1, 17, 13, 78, 55, 29}, {7, 13, 24, 0, 12, 76, 55, 27}, {7, 8, 10, 14, 10, 66, 72, 25}, {6, 12, 8, 14, 12, 59, 75, 27}, {5, 13, 9, 12, 13, 58, 75, 28}, {4, 14, 8, 13, 14, 60, 71, 29}, {7, 10, 11, 12, 12, 42, 79, 41}, {4, 14, 8, 14, 13, 45, 79, 39}, {3, 14, 8, 14, 12, 44, 81, 38}, {2, 15, 10, 14, 13, 45, 78, 36}, {7, 11, 12, 13, 13, 24, 73, 62}, {4, 15, 8, 13, 15, 28, 89, 43}, {1, 14, 10, 14, 16, 29, 85, 45}, {1, 16, 9, 15, 17, 33, 78, 46}},
[0140] If MipSizeId = 2, modeId = 0; mWeight[x][y] =
[0141] {{46,7,14,92,23,20,10},{32,22,17,52,50,25,12},{1,36,21,27,61,30,14},{0,30,27,17,61,32,17},{13,12,37,13,59,35,18},{14,13,38,11,56,38,18},{10,27,29,9,55,39,17},{10,27,32,7,53,38,17},{8,17,14,15,92,27,13},{2,16,18,8,84,38,15},{4,12,22,7,76,44,17},{8,8,25,7,72,46,18},{8,8,26,8,69,46,19},{10,11,23,9,68,47,17},{10,11,23,8,67,47,18},{10,12,26,9,64,43,20},{7,10,16,11,86,37,17},{7,9,18,9,73,47,20},{8,8,21,9,67,50,22},{7,9,22,9,66,50,22},{7,9,23,8,67,48,22},{8,9,24,8,67,48,21},{8,9,26,8,66,49,20},{9,8,29,8,64,48,20},{8,8,16,8,69,56,19},{6,9,17,8,64,55,25},{7,8,19,8,62,53,27},{7,8,21,8,61,52,28},{7,9,22,7,62,52,25},{7,9,23,6,62,53,24},{8,7,26,6,62,52,23},{8,8,28,6,61,51,22},{7,9,14,7,49,74,23},{7,7,17,7,51,65,30},{7,8,18,6,53,57,33},{7,8,20,5,56,57,31},{7,8,22,6,56,57,29},{8,8,23,5,57,57,27},{8,7,26,5,57,56,26},{8,6,27,5,57,55,25},{7,8,14,6,36,65,47},{7,7,18,5,44,59,44},{7,7,19,5,47,59,40},{7,7,20,5,50,59,35},{8,6,22,5,51,58,33},{8,5,25,5,51,59,30},{7,6,26,5,51,59,29},{9,6,27,5,50,59,28},{7,8,14,{6, 27, 44, 76}, {6, 8, 16, 5, 38, 57, 53}, {6, 7, 19, 4, 44, 63, 40}, {7, 6, 21, 4, 47, 62, 37}, {8, 6, 22, 4, 47, 62, 35}, {8, 6, 24, 5, 46, 64, 32}, {8, 6, 26, 5, 46, 63, 31}, {8, 6, 28, 6, 45, 62, 30}, {8, 7, 15, 6, 22, 43, 81}, {6, 8, 16, 5, 32, 64, 51}, {8, 8, 19, 5, 37, 66, 41}, {9, 5, 21, 4, 41, 67, 36}, {8, 7, 22, 5, 42, 65, 35}, {8, 6, 25, 6, 42, 64, 34}, {9, 5, 27, 7, 43, 63, 32}, {9, 5, 29, 8, 40, 60, 34}},
[0142] If MipSizeId = 2, modeId = 1; mWeight[x][y] =
[0143] {{50,47,46,61,50,45,46},{59,49,47,57,51,45,46},{64,52,48,55,51,46,46},{58,61,50,53,51,46,46},{52,66,53,52,51,46,46},{48,62,62,50,51,46,46},{47,49,76,49,51,46,46},{45,33,92,49,52,46,46},{50,48,46,57,63,45,46},{55,52,48,55,63,45,46},{57,56,50,53,63,45,46},{55,60,53,51,63,46,46},{51,60,59,51,63,46,46},{48,55,69,49,63,46,46},{46,42,84,48,62,46,46},{43,28,99,48,61,47,46},{49,49,47,48,73,47,46},{52,52,49,47,73,48,46},{52,55,53,47,72,48,46},{51,56,58,46,72,48,46},{48,54,65,46,71,48,46},{46,47,76,45,71,49,46},{44,34,91,44,70,49,46},{41,23,04,45,68,50,46},{48,48,48,44,68,59,45},{50,51,51,43,69,58,45},{49,52,56,43,68,58,45},{48,52,62,42,68,58,45},{45,48,71,42,68,58,45},{43,38,84,41,68,59,45},{41,27,98,41,67,59,45},{38,19,109,42,66,59,45},{47,47,49,44,52,74,45},{48,48,53,43,54,74,45},{47,48,60,43,55,73,45},{45,46,68,43,55,73,45},{43,40,78,42,56,72,45},{41,30,91,42,57,72,45},{38,20,105,41,57,71,45},{36,13,114,41,57,70,46},{46,47,50,45,43,77,51},{46,46,56,44,44,78,51},{45,43,64,43,45,77,51},{43,39,{73, 43, 45, 77, 51}, {40, 31, 85, 42, 46, 77, 51}, {38, 22, 98, 42, 46, 77, 51}, {35, 12, 111, 42, 47, 76, 51}, {33, 7, 19, 41, 48, 75, 52}, {46, 46, 51, 45, 44, 57, 71}, {45, 43, 59, 44, 44, 58, 70}, {43, 37, 68, 43, 45, 58, 70}, {40, 31, 80, 43, 45, 58, 70}, {38, 22, 92, 43, 46, 58, 70}, {36, 13, 105, 43, 46, 58, 70}, {33, 5, 117, 42, 47, 58, 70}, {31, 2, 123, 42, 48, 57, 71}, {45, 41, 55, 45, 51, 24, 96}, {44, 36, 64, 44, 52, 23, 97}, {42, 29, 75, 43, 53, 23, 97}, {39, 22, 86, 43, 52, 24, 97}, {37, 14, 98, 43, 53, 24, 97}, {34, 7, 109, 42, 53, 25, 97}, {32, 1, 118, 41, 53, 25, 97}, {30, 0, 123, 41, 53, 26, 96}},
[0144] If MipSizeId = 2, modeId = 2; mWeight[x][y] =
[0145] {{20,16,16,76,9,8,16},{37,15,16,71,11,17,16},{65,13,17,67,12,17,16},{63,30,15,63,14,17,16},{30,62,13,57,16,17,16},{14,62,28,52,18,16,16},{21,22,64,46,21,15,16},{26,0,81,40,24,15,17},{23,16,16,69,48,8,18},{28,18,16,66,50,8,17},{36,17,17,61,54,7,18},{40,20,17,56,57,7,18},{34,29,18,50,61,6,18},{27,34,22,44,64,5,18},{25,22,37,37,67,5,18},{26,9,51,31,68,6,18},{18,17,17,17,87,9,17},{19,17,17,15,88,9,17},{20,18,17,14,88,10,17},{22,17,18,12,87,12,17},{23,18,19,11,85,15,16},{23,20,19,11,83,18,16},{22,19,22,10,79,22,16},{22,16,28,11,74,26,15},{16,17,16,7,58,50,10},{17,17,16,8,53,55,10},{18,17,17,10,47,60,9},{18,16,17,11,43,64,9},{19,16,17,12,38,68,9},{20,17,18,13,35,72,9},{20,17,19,14,31,74,9},{20,16,21,13,29,74,11},{17,16,16,16,15,86,11},{18,15,17,16,13,86,13},{18,16,16,16,13,84,15},{18,15,17,16,12,82,18},{19,16,17,16,12,79,21},{18,16,17,16,12,76,24},{18,16,17,15,12,73,28},{19,16,19,15,14,68,31},{17,17,16,17,10,59,43},{17,16,16,17,10,54,47},{18,16,16,17,11,48,52},{18,16,16,16,12,44,56},{17,17,{16, 16, 13, 40, 59}, {17, 17, 16, 16, 13, 37, 62}, {17, 17, 17, 15, 14, 34, 65}, {18, 16, 18, 16, 14, 32, 66}, {17, 16, 16, 15, 16, 17, 79}, {17, 16, 16, 16, 16, 15, 81}, {18, 16, 16, 16, 16, 14, 82}, {18, 16, 16, 15, 16, 13, 83}, {17, 18, 16, 15, 16, 13, 83}, {17, 17, 17, 15, 16, 13, 84}, {17, 17, 17, 15, 16, 13, 84}, {17, 16, 18, 15, 16, 13, 83}, {16, 16, 16, 16, 17, 3, 92}, {17, 16, 16, 15, 17, 4, 91}, {18, 17, 17, 14, 18, 4, 90}, {18, 17, 16, 14, 18, 4, 91}, {17, 18, 16, 15, 18, 4, 91}, {17, 18, 17, 15, 18, 4, 90}, {17, 17, 18, 14, 18, 4, 90}, {18, 16, 19, 15, 18, 5, 89}},
[0146] If MipSizeId = 2, modeId = 3; mWeight[x][y] =
[0147] {{13,9,10,43,11,12,9},{43,2,11,22,15,12,10},{73,2,11,16,16,12,9},{52,38,5,13,16,12,10},{11,71,6,12,14,13,10},{3,50,35,10,14,13,9},{11,12,68,11,13,13,10},{13,3,74,12,11,15,10},{20,9,10,51,29,11,10},{41,5,10,37,26,13,10},{58,9,10,23,27,14,9},{41,36,6,15,24,16,10},{14,57,11,11,21,18,9},{7,39,37,9,18,19,9},{12,9,63,10,15,20,9},{15,2,68,11,12,21,10},{16,11,11,19,60,11,11},{27,11,11,20,50,16,10},{35,15,11,17,42,20,10},{29,29,11,12,35,23,10},{17,37,18,8,29,26,9},{13,26,35,6,24,27,9},{15,8,53,7,19,27,10},{16,4,57,9,14,28,11},{12,11,11,5,51,36,8},{15,13,12,8,45,36,9},{19,16,14,9,38,38,9},{19,21,16,8,32,39,10},{18,22,21,7,27,39,10},{18,16,31,7,22,39,11},{18,9,41,6,18,39,11},{19,7,44,7,15,37,13},{11,12,11,9,18,64,10},{11,12,13,10,18,61,11},{13,13,15,10,17,58,12},{15,14,17,10,16,56,13},{17,14,20,9,14,55,13},{18,11,26,9,13,52,14},{19,9,31,8,11,50,15},{19,9,33,8,10,46,17},{10,11,12,11,4,59,28},{11,10,13,11,4,60,26},{12,10,15,11,5,59,25},{14,10,16,11,5,58,24},{15,10,18,11,4,57,24},{17,9,21,11,4,56,{24}, {19, 9, 23, 10, 4, 53, 24}, {19, 9, 26, 10, 5, 49, 25}, {10, 10, 12, 11, 5, 27, 60}, {11, 8, 14, 11, 3, 34, 54}, {13, 8, 15, 12, 2, 38, 50}, {13, 8, 15, 13, 1, 41, 47}, {15, 8, 17, 13, 0, 42, 45}, {16, 8, 18, 13, 0, 44, 43}, {18, 8, 19, 12, 0, 44, 41}, {19, 9, 21, 12, 1, 43, 39}, {11, 8, 12, 11, 6, 9, 77}, {13, 7, 13, 12, 4, 16, 72}, {15, 6, 14, 13, 2, 21, 67}, {15, 6, 14, 13, 1, 25, 63}, {15, 7, 15, 14, 0, 27, 61}, {16, 8, 15, 14, 0, 29, 58}, {17, 8, 17, 14, 0, 29, 56}, {18, 8, 18, 14, 1, 30, 53}},
[0148] If MipSizeId = 2, modeId = 4; mWeight[x][y] =
[0149] {{15,13,13,55,12,13,13},{21,13,13,34,14,13,13},{39,12,13,22,14,13,13},{55,18,12,18,14,14,13},{48,37,11,16,14,14,13},{23,62,13,14,14,13,13},{11,53,35,14,14,13,12},{15,13,72,14,14,13,12},{16,13,13,63,27,12,13},{17,13,13,58,19,13,13},{22,13,13,43,18,13,13},{33,14,12,31,17,14,13},{45,18,12,24,16,14,12},{44,32,12,19,15,14,13},{29,49,15,17,14,14,12},{18,44,33,16,15,13,12},{15,13,13,32,60,10,13},{16,13,13,45,44,12,13},{17,14,13,49,32,13,12},{21,14,13,44,25,14,12},{30,14,13,37,21,14,12},{39,16,13,30,18,14,12},{39,27,13,24,17,14,12},{31,38,16,21,17,13,12},{13,13,13,13,64,27,11},{14,13,13,23,61,19,12},{15,14,13,34,51,16,12},{17,14,13,40,42,15,12},{20,14,13,40,34,14,12},{27,14,13,37,29,14,12},{33,16,13,32,25,13,12},{33,24,14,27,23,13,12},{13,13,13,13,33,61,9},{13,13,13,15,47,44,10},{14,13,13,20,54,31,11},{15,13,13,27,53,23,11},{16,14,13,32,49,18,12},{19,14,13,34,43,15,12},{24,14,13,34,37,14,12},{28,17,13,31,32,14,12},{13,14,13,15,10,71,20},{13,13,13,15,22,66,13},{14,13,13,15,37,53,11},{14,13,13,{18, 47, 40, 11}, {14, 13, 13, 23, 52, 29, 11}, {15, 14, 13, 27, 51, 23, 11}, {18, 14, 13, 30, 47, 19, 11}, {22, 15, 13, 30, 42, 17, 12}, {13, 13, 13, 14, 12, 34, 57}, {13, 13, 13, 15, 14, 50, 38}, {13, 13, 13, 15, 21, 58, 23}, {14, 13, 13, 16, 32, 54, 16}, {13, 13, 13, 18, 41, 45, 13}, {13, 14, 13, 21, 47, 36, 12}, {14, 14, 13, 24, 49, 28, 12}, {17, 14, 13, 26, 46, 24, 12}, {13, 13, 13, 13, 19, 0, 85}, {13, 13, 13, 13, 20, 12, 72}, {13, 13, 13, 15, 20, 30, 53}, {13, 13, 13, 16, 23, 44, 35}, {13, 14, 12, 17, 29, 47, 24}, {13, 14, 13, 18, 36, 44, 18}, {13, 14, 13, 20, 41, 38, 16}, {15, 14, 14, 22, 42, 33, 15}},
[0150] If MipSizeId = 2, modeId = 5; mWeight[x][y] =
[0151] {{24,9,10,52,13,10,12},{53,9,10,25,26,6,13},{48,30,9,11,30,7,13},{15,59,12,6,25,13,11},{5,48,34,7,18,19,10},{10,15,62,8,12,20,13},{13,2,70,8,9,19,19},{13,3,62,9,6,16,30},{25,14,10,40,51,0,14},{20,28,11,16,55,5,13},{8,38,18,6,41,20,11},{5,28,34,6,23,31,12},{9,12,48,8,12,33,18},{12,2,53,9,6,30,28},{14,1,50,9,4,23,40},{14,5,42,8,4,15,51},{8,20,12,5,72,12,12},{2,24,19,5,46,35,9},{5,16,29,9,21,48,13},{9,6,36,10,9,45,25},{12,3,37,11,5,36,38},{13,4,34,11,4,25,51},{13,6,29,10,4,16,61},{13,9,26,10,6,11,66},{6,14,15,6,31,60,6},{7,10,22,11,12,64,15},{10,6,26,13,6,50,32},{11,4,27,12,5,33,49},{12,5,25,11,6,20,62},{12,7,22,11,7,13,69},{12,9,19,11,7,8,74},{12,10,19,10,8,7,74},{10,9,16,12,6,67,20},{11,6,20,13,5,46,41},{11,5,21,12,7,26,59},{11,7,19,12,9,14,70},{11,8,18,11,10,8,75},{11,9,16,11,10,5,78},{12,10,15,11,10,4,80},{11,10,15,10,10,4,78},{11,9,15,12,8,34,54},{11,7,17,11,10,16,69},{11,7,17,11,11,7,76},{11,8,16,11,11,4,80},{10,10,14,11,11,3,81},{11,10,13,11,12,2,82},{11,10,13,11,12,2,82},{11,11,13,{10, 12, 3, 80}, {11, 9, 14, 11, 11, 8, 77}, {11, 8, 14, 11, 12, 3, 81}, {11, 9, 14, 11, 12, 1, 83}, {10, 10, 13, 11, 12, 2, 83}, {10, 11, 12, 11, 12, 2, 82}, {10, 11, 12, 11, 12, 3, 82}, {11, 11, 11, 11, 12, 3, 81}, {11, 11, 11, 11, 13, 5, 79}, {11, 10, 13, 11, 13, 2, 82}, {11, 9, 13, 11, 13, 1, 83}, {11, 10, 12, 11, 13, 2, 82}, {10, 11, 12, 11, 12, 3, 81}, {10, 11, 12, 11, 12, 4, 80}, {10, 11, 11, 11, 12, 5, 80}, {11, 11, 11, 11, 13, 5, 79}, {11, 11, 11, 11, 12, 6, 77}}.,
[0152] After obtaining the above parameters from the mapping table, the above parameters and the input value set can be input into Formula (1) and Formula (2) to calculate the predicted value of a specific pixel position in the current block.
[0153] In addition, in order to obtain the MIP matrix of the current block, the bit shift parameter of the current block, and the weighting parameter of the current block, in an optional embodiment, from one or more pre-stored mapping tables, determining the MIP matrix of the current block and the bit shift parameter of the current block includes:
[0154] According to the size of the current block, determine the MIP matrix of the current block, the bit shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables.
[0155] That is to say, in combination with the size of the current block, obtain the MIP matrix of the current block corresponding to the size of the current block, the bit shift parameter of the current block, and the weighting parameter of the current block from the mapping table. For example, when the size of the current block is 4x4, the value of MipSizeId is equal to 0. When the size of the current block is 4x8, 8x4, or 8x8, the value of MipSizeId is equal to 1. When the size of the current block is greater than 8x8, the value of MipSizeId is equal to 2. The MIP matrix of the current block corresponding to the size of the current block and the bit shift parameter of the current block can be found from the mapping table according to the value of MipSizeId.
[0156] S507: Perform filtering processing on the predicted value of the specific position to obtain the predicted values of all pixels in the current block.
[0157] After determining the predicted value of a specific position through S506, the predicted value of the specific position can be further filtered to obtain the predicted values of all pixels in the current block.
[0158] In order to obtain the predicted values of all pixels in the current block, in an alternative embodiment, S507 may include:
[0159] Performing interpolation filtering on the predicted value of the pixel at the specific position to obtain the predicted values of the pixels at other positions in the current block except for the specific position.
[0160] Here, mainly by performing interpolation filtering on the predicted value of the pixel at the specific position, the predicted values of the pixels at other positions except for the specific position can be obtained, and thus the predicted values of all pixels in the current block can be obtained.
[0161] That is to say, the difference between the prediction method using the MIP technology on the encoder side provided by the embodiments of the present application and the formulas (1)-(5) in the traditional method is that the calculation symbol of p[0] in formula (7) is the opposite of that in formula (3). At this time, all the p[x] value forms in formulas (3) and (7) achieve a more unified effect, that is, both subtract pTemp[0]. The mean compensation in formula (1) directly uses pTemp[0], so that in the calculation formula of predMip[x][y], the coefficient of pTemp[0] is unified as:
[0162] 1 - (mWeight[x][0] - fO) >> sW = 1 - mWeight f [x][0] (9)
[0163] And the original coefficient is:
[0164] When y = 0:
[0165] 1 - (mWeight[x][0] - fO) >> sW = 1 + mWeight f [x][0] (10) For other cases:
[0166] 1 - (mWeight[x][0] - fO) >> sW = 1 - mWeight f [x][0] (11)
[0167] Considering the essence of the MIP filter, the probability of the coefficient value being in the range of -1 to 1 is higher. Therefore, after unifying to 1 - mWeight f [x][0] expression, mWeight f [x][0] takes values more tending to positive values, and the overall change range tends to become smaller.
[0168] On this basis, the first column parameters of the trained MIP matrix mWeight f will become the corresponding values with the signs of the first column parameters of mWeight f reversed. At this time, the value range of the parameters in the entire MIP matrix mWeight f will be smaller than that of the original MIP matrix mWeight f , which is more conducive to improving the representation accuracy and thus the prediction accuracy.
[0169] In the original MIP matrix mWeight f , for the 28 original floating-point matrices with MipSizeId being 0 and 1 shown in Table 1, when the first column of data is reversed, the data range after reversal either remains unchanged or shrinks. As shown in Table 2 below, there are 11 patterns corresponding to matrices in which the numerical value range becomes smaller, and the numerical value ranges of the other 17 matrices remain unchanged. Among the patterns with the numerical value range shrinking, 4 can improve the expression accuracy of the currently known trained weights.
[0170] Table 2
[0171]
[0172] It can be seen that Table 2 shows the matrix numbers with the interval shrinking and sW increasing after the matrix is reversed for MipSizeId = 0 and 1.
[0173] The following Tables 3 - 5 are specific examples. Each table is divided into left and right parts. The left side of Tables 3 and 5 is mWeight f , and the right side is mWeight f’ . The left side of Table 4 is mWeight f ”, and the right side is mWeight. The first column in Tables 3 and 5 is the value of mWeight f [x][0], and the first column on the right side is the value after reversing mWeight f [x][0].
[0174] Tables 3 - 4 show the changes in applying the present technology under specific patterns of the same MIP. After reversing mWeight f [x][0], the data range becomes smaller, and the original sW value is changed from 5 to 6. The values of mWeight[x][y] calculated by formula (6) are all not greater than 127 and are within the effective representation range of 7 bits; Table 5 gives an example of a specific pattern where the data range remains unchanged after reversing mWeight f [x][0].
[0175] Table 3
[0176]
[0177] Among them, Table 3 shows the inversion of the first column of the original floating-point matrix with MipSizeId = 0 and modeId = 3 (the left is the original, and the right is the inverted).
[0178] Table 4
[0179] Among them, Table 4 shows the matrix with MipSizeId = 0 and modeId = 3. Applying the proposed technology, the right shift bit number sW = 6 can be taken without exceeding the 7-bit representation range.
[0180] Table 5
[0181]
[0182] Among them, Table 5 shows the inversion of the first column of the original floating-point matrix with MipSizeId = 0 and modeId = 16 (the left is the original, and the right is the inverted).
[0183] From the examples in Table 3 to Table 5 above, it can be seen that the method for determining the predicted value provided by the embodiments of the present application can narrow the numerical range of the floating-point matrix obtained by MIP training, improve the accuracy during its fixed-point representation, thereby improving the prediction accuracy, and ultimately improving the coding efficiency.
[0184] The embodiments of the present application provide a method for determining a predicted value. This method is applied to an encoder. In the embodiments of the present application, by calculating the first constant and determining the difference between the value of the first constant and the first reference value in the reference value set as the first predicted input value in the predicted input value set, and using the predicted input value set to calculate the predicted value of the current block, the dynamic value range of the predicted input value set during MIP mode prediction can be effectively reduced. Therefore, compared with the prior art, when using the same number of bits to represent the predicted input value set and the MIP matrix, the data in the dynamic range can be represented more accurately, the accuracy during the calculation of the predicted value in the MIP mode is improved, and the coding efficiency is further improved.
[0185] In order to improve the prediction accuracy of the MIP mode and thus improve the decoding efficiency, the embodiments of the present application provide a method for determining a predicted value. Figure 6 For the flow diagram of another optional method for determining the predicted value provided by the embodiments of the present application, refer to Figure 6 as shown. This method is applied to a decoder, and this method may include:
[0186] S601: Parse the code stream to obtain the size and coding mode of the current block;
[0187] Specifically, in the decoder, after receiving the bitstream, first, the bitstream is parsed so that the size and coding mode of the current block can be obtained. Among them, the coding mode can be one of the traditional intra prediction modes, or one of the MIP modes. Here, it mainly focuses on one of the MIP modes.
[0188] S602: When the coding mode of the current block is MIP, obtain the reconstructed values of the adjacent pixels of the current block, and perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block;
[0189] For example, the size of the current block is 4x4, 4x8, 8x4 or 8x8. When the size of the current block is 4x4, the coding mode M is one of 35. When the size of the current block is 4x8, 8x4 or 8x8, the coding mode M is one of 19. When the current block is of other sizes, the coding mode M is one of 11.
[0190] That is to say, when the coding mode of the current block is the MIP mode, first, the decoder obtains the reconstructed values of the adjacent pixels of the current block. Here, the adjacent pixels include the reconstructed values at the positions of the pixels in the upper row of the current block and the reconstructed values at the positions of the pixels in the left column.
[0191] After obtaining the reconstructed values of the adjacent pixels, for example, the reconstructed values of the pixels in the upper row obtained are redT, a total of N values, and the reconstructed values of the pixels in the left column are redL, a total of N values. redT and redL form a new vector pTemp as the reference value set of the current block.
[0192] In order to obtain the reference value set of the current block through filtering processing, in an optional embodiment, in S602, performing filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block includes:
[0193] Divide the reconstructed values of the adjacent pixels into N groups, calculate the mean values of the reconstructed values of the adjacent pixels in each group, and use the mean values as the reference values in the reference value set. N is a positive integer.
[0194] Among them, N is set to the positive integer value corresponding to the preset current block size.
[0195] That is to say, the process of performing filtering processing on the reconstructed values of the adjacent pixels in S602 can specifically be: first divide redT and redL into N groups, then calculate the mean value of each group to obtain N mean values, and use the N mean values as the reference values in the reference set.
[0196] For example, when the current block size is 4x4, the value of inSize is equal to 4; when the current block size is 4x8, 8x4 or 8x8, the value of inSize is equal to 8; when the current block size is greater than 8x8, the value of inSize is equal to 7.
[0197] S603: When the size of the current block is less than a preset threshold, calculate the value of the second constant according to the value of the bit depth of the pixel luminance component in the current block;
[0198] In practical applications, when the size of the current block can be represented by MipSizeId, and MipSizeId is a number less than 2, that is, when MipSizeId is equal to 0 or 1, first calculate the value of the second constant according to the value of the bit depth of the pixel luminance component in the current block.
[0199] In order to calculate the value of the second constant, in an optional embodiment, in S603, calculating the value of the second constant according to the value of the bit depth of the pixel luminance component in the current block includes:
[0200] Set the value of the second constant to the value after performing a binary bit left shift operation on the logarithm value 1, where the number of bits shifted left in the binary bit left shift operation is equal to the value of the bit depth minus 1.
[0201] Specifically, the value of the second constant is the value after shifting 1 to the left, and the number of bits shifted left is the bit depth minus 1.
[0202] S604: Determine that the first prediction input value in the prediction input value set is the difference between the value of the second constant and the first reference value in the reference value set;
[0203] Among them, the prediction input value set is used for MIP to calculate the predicted value of the current block;
[0204] After calculating the second constant through S604, the difference between the value of the second constant and the first reference value in the reference value can be determined as the first prediction input value, and the first prediction input value can be calculated using the above formula (7).
[0205] S605: Determine the other prediction input values in the prediction input value set except the first prediction input value according to the reference value set;
[0206] Among them, the other prediction input values p[i] include the prediction input values except the first prediction input value when the size of the current block is less than the preset threshold, and the other prediction input values p[i] can also include the prediction input values when the size of the current block is greater than or equal to the preset threshold, and can be calculated using the above formula (8).
[0207] S606: Calculate the predicted value of the pixel at a specific position in the current block according to the set of predicted input values;
[0208] Specifically, after determining all the predicted input values, a set of predicted input values can be obtained. According to the set of predicted input values, prediction can be performed to obtain the predicted value of the pixel at a specific position in the current block. For example, Figure 3 the predicted value of the pixel position marked with a cross line in [the figure].
[0209] In order to determine the predicted value of the pixel at a specific position in the current block, in an optional embodiment, S606 may include:
[0210] Determine the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables;
[0211] Calculate the predicted value of the specific pixel position in the current block according to the set of input values, the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block.
[0212] That is to say, one or more mapping tables are pre-stored in the encoder. Through the one or more mapping tables, the MIP matrix of the current block, denoted by mWeight, the bit right shift parameter sW of the current block, and the weighting parameter fO of the current block can be determined.
[0213] After obtaining the above parameters from the mapping table, the above parameters and the set of input values can be input into Formula (1) and Formula (2) to calculate the predicted value of the specific pixel position in the current block.
[0214] In addition, in order to obtain the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block, in an optional embodiment, determining the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables includes:
[0215] According to the size of the current block, determine the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables.
[0216] That is to say, in combination with the size of the current block, obtain the MIP matrix of the current block corresponding to the current block size, the bit right shift parameter of the current block, and the weighting parameter of the current block from the mapping table. For example, when the size of the current block is 4x4, the value of MipSizeId is equal to 0; when the current block size is 4x8, 8x4, or 8x8, the value of MipSizeId is equal to 1; when the current block size is greater than 8x8, the value of MipSizeId is equal to 2. According to the value of MipSizeId, the MIP matrix of the current block corresponding to the current block size and the bit right shift parameter of the current block can be found from the mapping table.
[0217] S607: Filter the predicted value of the pixel at the specific position to obtain the predicted values of all pixels in the current block.
[0218] After determining the predicted value of the specific position through S606, the predicted value of the specific position can be further filtered to obtain the predicted values of all pixels in the current block.
[0219] In order to obtain the predicted values of all pixels in the current block, in an optional embodiment, S607 may include:
[0220] Perform interpolation filtering on the predicted value of the specific position to obtain the predicted values of the pixels at other positions in the current block except the specific position.
[0221] Here, mainly perform interpolation filtering on the predicted value of the pixel at the specific position, then the predicted values of the pixels at other positions except the specific position can be obtained, and thus the predicted values of all pixels in the current block can be obtained.
[0222] The embodiment of the present application provides a method for determining a predicted value. This method is applied to a decoder. In the embodiment of the present application, by calculating the second constant and determining the difference between the value of the second constant and the first reference value in the reference value set as the first predicted input value in the predicted input value set, and using the predicted input value set to calculate the predicted value of the current block, the dynamic value range of the predicted input value set during MIP mode prediction can be effectively reduced. Therefore, compared with the prior art, when using the same number of bits to represent the predicted input value set and the MIP matrix, the data in the dynamic range can be represented more accurately, the accuracy in the process of calculating the predicted value in the MIP mode is improved, and thus the coding efficiency is improved.
[0223] Embodiment Two
[0224] Based on the same inventive concept, the embodiment of the present application provides an encoder. Figure 7 As a schematic structural diagram of an optional encoder provided by the embodiment of the present application, as Figure 7 shown, the encoder may include:
[0225] The first acquisition module 71 is configured to acquire the reconstruction values of adjacent pixels of the current block; the first processing module 72 is configured to perform filtering processing on the reconstruction values of the adjacent pixels to obtain a reference value set of the current block; the first calculation module 73 is configured to calculate the value of a first constant according to the value of the bit depth of the pixel luminance component in the current block when the size of the current block is smaller than a preset threshold; the first determination module 74 is configured to determine that the first prediction input value in the prediction input value set is the difference between the value of the first constant and the first reference value in the reference value set; the second calculation module 75 is configured to determine other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; the third calculation module 76 is configured to calculate the prediction value of a pixel at a specific position in the current block according to the prediction input value set; the second processing module 77 is configured to perform filtering processing on the prediction value of the pixel at the specific position to obtain the prediction values of all pixels in the current block.
[0226] In an alternative embodiment, the first processing module 72 is specifically configured to:
[0227] Divide the reconstruction values of the adjacent pixels into N groups, calculate the mean value of the reconstruction values of the adjacent pixels in each group, and use the mean value as the reference value in the reference value set, where N is a positive integer.
[0228] Wherein, N is set to a positive integer value corresponding to the preset current block size.
[0229] In an alternative embodiment, when the first calculation module 73 calculates the value of the first constant according to the value of the bit depth of the pixel luminance component in the current block, it may include: setting the value of the first constant to the value after performing a binary bit left shift operation on the logarithmic value 1, where the number of bits shifted left in the binary bit left shift operation is equal to the value of the bit depth minus 1.
[0230] In an alternative embodiment, the third calculation module 76 is specifically configured to:
[0231] Determine the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables; calculate the prediction value of a specific pixel position in the current block according to the input value set, the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block.
[0232] In an alternative embodiment, when the third calculation module 76 determines the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables, it may include: determining the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables according to the size of the current block.
[0233] In an alternative embodiment, the second processing module 77 is specifically configured to:
[0234] Perform interpolation filtering on the predicted values of pixels at specific positions to obtain the predicted values of pixels at other positions in the current block except for the specific positions.
[0235] An embodiment of the present application provides a decoder. Figure 8 As shown in the structural schematic diagram of an alternative decoder provided by the embodiment of the present application, Figure 8 the decoder may include:
[0236] A second acquisition module 81, configured to parse the code stream to obtain the size and coding mode of the current block; a third processing module 82, configured to, when the coding mode of the current block is the matrix-based intra prediction mode MIP, obtain the reconstructed values of adjacent pixels of the current block, perform filtering processing on the reconstructed values of the adjacent pixels to obtain a reference value set of the current block; a fourth calculation module 83, configured to, when the size of the current block is smaller than a preset threshold, calculate the value of a second constant according to the value of the bit depth of the pixel luminance component in the current block; a second determination module 84, configured to determine that the first predicted input value in the predicted input value set is the difference between the value of the second constant and the first reference value in the reference value set; a fifth calculation module 85, configured to determine the other predicted input values in the predicted input value set except the first predicted input value according to the reference value set; a sixth calculation module 86, configured to calculate the predicted values of pixels at specific positions in the current block according to the predicted input value set; a fourth processing module 87, configured to perform interpolation filtering on the predicted values of pixels at specific positions to obtain the predicted values of pixels at other positions in the current block except for the specific positions.
[0237] In an alternative embodiment, when the third processing module 82 performs filtering processing on the reconstructed values of adjacent pixels to obtain the reference value set of the current block, it may include: dividing the reconstructed values of adjacent pixels into N groups, calculating the mean value of the reconstructed values of adjacent pixels in each group, and using the mean value as the reference value in the reference value set, where N is a positive integer.
[0238] Wherein, N is set to a positive integer value corresponding to the preset current block size.
[0239] In an alternative embodiment, when the fourth calculation module 83 calculates the value of the second constant according to the value of the bit depth of the pixel luminance component in the current block, it may include: setting the value of the second constant to the value after performing a binary bit left shift operation on the logarithm value 1, where the number of bits shifted left in the binary bit left shift operation is equal to the value of the bit depth minus 1.
[0240] In an alternative embodiment, the sixth calculation module 86 is specifically configured to:
[0241] Determine the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables; calculate the predicted value of the pixel at a specific position in the current block according to the input value set, the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block.
[0242] In an alternative embodiment, the sixth calculation module 86 may include, when determining the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables: determining the MIP matrix of the current block, the bit right shift parameter of the current block, and the weighting parameter of the current block from one or more pre-stored mapping tables according to the size of the current block.
[0243] In an alternative embodiment, the fourth processing module 87 is specifically configured to:
[0244] Perform interpolation filtering on the predicted value of the pixel at a specific position to obtain the predicted values of the pixels at other positions in the current block except for the specific position.
[0245] Figure 9 Another schematic structural diagram of an alternative encoder proposed in an embodiment of the present application is shown in Figure 9 As shown, the encoder 900 proposed in an embodiment of the present application may further include a processor 91 and a storage medium 92 storing executable instructions of the processor 91. The storage medium 92 operates depending on the processor 91 through a communication bus 93. When the instructions are executed by the processor 91, the method for determining the predicted value described in one or more of the above embodiments is executed.
[0246] It should be noted that in actual application, each component in the encoder is coupled together through the communication bus 93. It can be understood that the communication bus 93 is used to implement the connection and communication between these components. The communication bus 93 includes not only a data bus but also a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 9 all kinds of buses are labeled as the communication bus 93.
[0247] Figure 10 Another schematic structural diagram of an alternative decoder proposed in an embodiment of the present application is shown in Figure 10 As shown, the decoder 1000 proposed in an embodiment of the present application may further include a processor 101 and a storage medium 102 storing executable instructions of the processor 101. The storage medium 102 operates depending on the processor 101 through a communication bus 103. When the instructions are executed by the processor 101, the method for determining the predicted value described in one or more of the above embodiments is executed.
[0248] It should be noted that in actual application, each component in the decoder is coupled together through the communication bus 103. It can be understood that the communication bus 103 is used to implement the connection and communication between these components. In addition to the data bus, the communication bus 103 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 10 all kinds of buses are labeled as the communication bus 103.
[0249] An embodiment of the present application provides a computer storage medium storing executable instructions, and when the executable instructions are executed by one or more processors, the processors execute the method for determining the predicted value described in the above one or more embodiments.
[0250] It can be understood that the memory in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM). The memory of the systems and methods described herein is intended to include but not be limited to these and any other suitable types of memory.
[0251] The processor may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0252] It can be understood that these embodiments described herein can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or a combination thereof.
[0253] For software implementation, the technologies described herein can be implemented by modules (such as procedures, functions, etc.) that execute the functions described herein. The software code can be stored in the memory and executed by the processor. The memory can be implemented inside or outside the processor.
[0254] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element.
[0255] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0256] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.
[0257] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims. All of these are within the protection scope of the present application.
[0258] Industrial Applicability
[0259] An embodiment of the present application provides a method for determining a predicted value, an encoder, a decoder, and a computer storage medium. The method is applied to the encoder and includes: obtaining the reconstructed values of adjacent pixels of the current block, performing filtering processing on the reconstructed values of the adjacent pixels to obtain a reference value set of the current block; when the size of the current block is smaller than a preset threshold, calculating the value of a first constant according to the value of the bit depth of the pixel luminance component in the current block, determining that the first predicted input value in the predicted input value set is the difference between the value of the first constant and the first reference value in the reference value set; determining other predicted input values in the predicted input value set except the first predicted input value according to the reference value set; calculating the predicted value of a pixel at a specific position in the current block according to the predicted input value set; and performing filtering processing on the predicted value of the pixel at the specific position to obtain the predicted values of all pixels in the current block. In this way, the prediction accuracy in video coding and decoding is improved, and the coding and decoding rate is increased.
Claims
1. A method for determining a predicted value, wherein, The method is applied to an encoder and includes: Obtaining the reconstruction values of adjacent pixels of the current block; Performing filtering processing on the reconstruction values of the adjacent pixels to obtain a reference value set of the current block, wherein the number of reference values obtained by filtering the adjacent pixels in the upper row is equal to the number of reference values obtained by filtering the pixels in the left column; When the size of the current block is less than a preset threshold, calculating a value of a first constant according to the value of the bit depth of the pixel luminance component in the current block; Determining that the first prediction input value in the prediction input value set is a difference obtained by subtracting the first reference value in the reference value set from the value of the first constant; Determining other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; Calculating a predicted value of a pixel at a specific position in the current block according to the prediction input value set; Performing filtering processing on the predicted value of the pixel at the specific position to obtain predicted values of all pixels in the current block.
2. The method according to claim 1, wherein The performing filtering processing on the reconstruction values of the adjacent pixels to obtain a reference value set of the current block includes: Dividing the reconstruction values of the adjacent pixels into N groups, calculating the mean value of the reconstruction values of the adjacent pixels in each group, and using the mean value as a reference value in the reference value set, where N is a positive integer.
3. The method according to claim 2, wherein Setting N to a positive integer value corresponding to the preset size of the current block.
4. The method according to claim 1, wherein, The calculating a value of a first constant according to the value of the bit depth of the pixel luminance component in the current block includes: Setting the value of the first constant to a value obtained by performing a binary bit left shift operation on the logarithm value 1, where the number of left shift bits used in the binary bit left shift operation is equal to the value of the bit depth minus 1.
5. The method according to claim 1, wherein The performing filtering processing on the predicted value of the pixel at the specific position to obtain predicted values of all pixels in the current block includes: Performing interpolation filtering on the predicted value of the pixel at the specific position to obtain predicted values of pixels at other positions in the current block except the specific position.
6. A method for determining a predicted value, wherein, The method is applied to a decoder and includes: Parsing a bitstream to obtain the size and coding mode of the current block; When the coding mode of the current block is the matrix-based intra prediction mode MIP, obtaining the reconstruction values of adjacent pixels of the current block, and performing filtering processing on the reconstruction values of the adjacent pixels to obtain a reference value set of the current block, wherein the number of reference values obtained by filtering the adjacent pixels in the upper row is equal to the number of reference values obtained by filtering the pixels in the left column; When the size of the current block is less than a preset threshold, calculating a value of a second constant according to the value of the bit depth of the pixel luminance component in the current block; Determining that the first prediction input value in the prediction input value set is a difference obtained by subtracting the first reference value in the reference value set from the value of the second constant; Determining other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; Calculating a predicted value of a pixel at a specific position in the current block according to the prediction input value set; Performing filtering processing on the predicted value of the pixel at the specific position to obtain predicted values of all pixels in the current block.
7. The method according to claim 6, wherein, Performing filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block, including: Dividing the reconstructed values of the adjacent pixels into N groups, calculating the mean value of the reconstructed values of the adjacent pixels in each group, and using the mean value as the reference value in the reference value set, where N is a positive integer.
8. The method according to claim 7, wherein, Setting N to the positive integer value corresponding to the preset current block size.
9. The method according to claim 6, wherein Calculating the value of the second constant according to the value of the bit depth of the pixel luminance component in the current block, including: Setting the value of the second constant to the value obtained by performing a binary bit left shift operation on the logarithmic value 1, where the number of left shift bits used in the binary bit left shift operation is equal to the value of the bit depth minus 1.
10. The method according to claim 6, wherein, Performing filtering processing on the predicted value of the pixel at the specific position to obtain the predicted values of all the pixels in the current block, including: Performing interpolation filtering on the predicted value of the pixel at the specific position to obtain the predicted values of the pixels at other positions in the current block except for the specific position.
11. An encoder, wherein, The encoder includes: A first acquisition module, configured to acquire the reconstructed values of the adjacent pixels of the current block; A first processing module, configured to perform filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block, where the number of reference values obtained by filtering the adjacent pixels in the upper row is equal to the number of reference values obtained by filtering the pixels in the left column; A first calculation module, configured to calculate the value of the first constant according to the value of the bit depth of the pixel luminance component in the current block when the size of the current block is less than a preset threshold; A first determination module, configured to determine that the first predicted input value in the predicted input value set is the difference obtained by subtracting the first reference value in the reference value set from the value of the first constant; A second calculation module, configured to determine the other predicted input values in the predicted input value set except the first predicted input value according to the reference value set; A third calculation module, configured to calculate the predicted value of the pixel at the specific position in the current block according to the predicted input value set; A second processing module, configured to perform filtering processing on the predicted value of the pixel at the specific position to obtain the predicted values of all the pixels in the current block.
12. The encoder according to claim 11, wherein, In terms of performing filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block, the first processing module is configured to: Dividing the reconstructed values of the adjacent pixels into N groups, calculating the mean value of the reconstructed values of the adjacent pixels in each group, and using the mean value as the reference value in the reference value set, where N is a positive integer.
13. The encoder according to claim 12, wherein, Setting N to the positive integer value corresponding to the preset current block size.
14. The encoder according to claim 11, wherein, In terms of calculating the value of the first constant according to the value of the bit depth of the pixel luminance component in the current block, the first calculation module is configured to: Setting the value of the first constant to the value obtained by performing a binary bit left shift operation on the logarithmic value 1, where the number of left shift bits used in the binary bit left shift operation is equal to the value of the bit depth minus 1.
15. The encoder according to claim 11, wherein, In filtering the predicted value of the pixel at the specific position to obtain the predicted values of all the pixels in the current block, the second processing module is configured to: Perform interpolation filtering on the predicted value of the pixel at the specific position to obtain the predicted values of the pixels at other positions in the current block except for the specific position.
16. A decoder, wherein, The decoder includes: A second obtaining module, configured to parse the bitstream to obtain the size and coding mode of the current block; A third processing module, configured to, when the coding mode of the current block is the matrix-based intra prediction mode MIP, obtain the reconstructed values of the adjacent pixels of the current block, perform filtering processing on the reconstructed values of the adjacent pixels to obtain a reference value set of the current block, wherein the number of reference values obtained by filtering the adjacent pixels in the upper row is equal to the number of reference values obtained by filtering the pixels in the left column; A fourth calculating module, configured to, when the size of the current block is less than a preset threshold, calculate the value of a second constant according to the value of the bit depth of the pixel luminance component in the current block; A second determining module, configured to determine that the first prediction input value in the prediction input value set is the difference obtained by subtracting the first reference value in the reference value set from the value of the second constant; A fifth calculating module, configured to determine the other prediction input values in the prediction input value set except the first prediction input value according to the reference value set; A sixth calculating module, configured to calculate the predicted value of the pixel at the specific position in the current block according to the prediction input value set; A fourth processing module, configured to perform filtering processing on the predicted value of the pixel at the specific position to obtain the predicted values of all the pixels in the current block.
17. The decoder according to claim 16, wherein, In performing filtering processing on the reconstructed values of the adjacent pixels to obtain the reference value set of the current block, the third processing module is configured to: Divide the reconstructed values of the adjacent pixels into N groups, calculate the mean value of the reconstructed values of the adjacent pixels in each group, and use the mean value as the reference value in the reference value set, where N is a positive integer.
18. The decoder according to claim 17, wherein, N is set to the positive integer value corresponding to the preset size of the current block.
19. The decoder according to claim 16, wherein, In calculating the value of the second constant according to the value of the bit depth of the pixel luminance component in the current block, the fourth calculating module is configured to: Set the value of the second constant to the value obtained by performing a binary bit left shift operation on the logarithm value 1, where the number of bits shifted left in the binary bit left shift operation is equal to the value of the bit depth minus 1.
20. The decoder according to claim 16, wherein, In performing filtering processing on the predicted value of the pixel at the specific position to obtain the predicted values of all the pixels in the current block, the fourth processing module is configured to: Perform interpolation filtering on the predicted value of the pixel at the specific position to obtain the predicted values of the pixels at other positions in the current block except for the specific position.
21. An encoder, wherein, The encoder includes: A processor and a storage medium storing instructions executable by the processor, the storage medium depends on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, execute the method for determining the predicted value according to any one of claims 1 to 5 above.
22. A decoder, wherein, The decoder includes: A processor and a storage medium storing executable instructions for the processor, the storage medium depending on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, performing the method for determining a predicted value according to any one of claims 6 to 10 above.
23. A computer-readable storage medium, wherein, The computer-readable storage medium stores executable instructions, and when the executable instructions are executed by one or more processors, the processor performs the method for determining a predicted value according to any one of claims 1 to 5, or performs the method for determining a predicted value according to any one of claims 6 to 10.
Citation Information
Patent Citations
Simplified bilateral intra smoothing filter
CN104041051A
Intra-frame coding and decoding method, coder and decoder
CN104702962A