Moving image decoding device, moving image encoding device, and angle mode derivation device
Through the gradient derivation and angle pattern table search methods, the problem of large amount of calculation in angle pattern derivation is solved, and efficient intra prediction is achieved.
Patent Information
- Application Number
- CN202380044555.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-16
- Filing Date
- 2023-05-26
- Publication Date
- 2025-01-14
AI Technical Summary
In the prior art, the gradient direction needs to be repeatedly compared during the angular mode derivation process, resulting in an increase in the processing amount, and the derivation of the angle ratio and the mode transformation are two stages, increasing the calculation amount.
The gradient derivation unit and the angle mode derivation unit are used to derive the angle mode by logarithmic shift of the gradient, and the angle mode is found through the table, and the average value is selected as the representative value, which reduces the calculation amount.
The angle mode is appropriately derived in intra prediction without increasing the calculation amount of intra mode derivation on the decoder side, which improves efficiency.
Smart Images

Figure CN119318142A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to a motion picture decoding device, a motion picture encoding device, and an angle mode derivation device. This application claims priority based on Japanese Patent Application No. 2022-90076 filed in Japan on June 2, 2022 and Japanese Patent Application No. 2022-96934 filed in Japan on June 16, 2022, and the contents thereof are hereby incorporated by reference. Background Art
[0002] In order to efficiently transmit or record moving images, a moving image encoding device that generates encoded data by encoding the moving image and a moving image decoding device that generates a decoded image by decoding the encoded data are used.
[0003] As specific moving picture coding methods, for example, methods proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding) can be cited.
[0004] In such a motion image coding method, images (pictures) constituting the motion image are managed through a hierarchical structure and encoded / decoded for each CU. The hierarchical structure includes slices obtained by dividing the image, coding tree units (CTU: Coding Tree Unit) obtained by dividing the slices, coding units (sometimes also called coding units (Coding Unit: CU)) obtained by dividing the coding tree units, and transform units (TU: Transform Unit) obtained by dividing the coding units.
[0005] In such a moving picture coding method, a prediction image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and a prediction error (sometimes also referred to as a "difference image" or "residual image") obtained by subtracting the prediction image from the input image (original image) is encoded. Examples of methods for generating a prediction image include inter-picture prediction (inter-frame prediction) and intra-picture prediction (intra-frame prediction).
[0006] In addition, as a recent technology for motion picture encoding and decoding, there is Non-Patent Document 1. Non-Patent Document 1 discloses a decoder-side intra mode derivation (DIMD) prediction in which a decoder uses pixels in an adjacent area to derive an intra-frame directional prediction mode number, thereby deriving a predicted image. Prior art literature Non-patent literature
[0007] Non-patent literature 1: M. Abdoli, T. Guionnet, E. Mora, et al., “Non-CE3: Decoder-side Intra Mode Derivation with Prediction Fusion Using Planar”, JVET-O0449, Gothenburg, July 2019. Summary of the invention Problem that the invention aims to solve
[0008] In the angle mode derivation as shown in Non-Patent Document 1, the gradient of the pixel value of the object area is used to estimate the angle mode for derivation of the intra mode on the decoder side. In this case, the magnitude relationship comparison is repeatedly performed to transform the direction of the gradient into the angle mode, which increases the processing amount. In addition, the derivation of the angle ratio of the gradient and the transformation from the angle ratio to the angle mode are two stages, which increases the processing amount.
[0009] An object of the present invention is to perform appropriate angle mode derivation without increasing the amount of processing for deriving the angle mode based on a gradient. Technical Solution
[0010] In order to solve the above-mentioned problem, an angle pattern derivation device of one scheme of the present invention is characterized in that it comprises: a gradient derivation unit, which derives a first gradient as the gradient of pixel values contained in a gradient derivation object image; and an angle pattern derivation unit, which derives the angle pattern using the above-mentioned first gradient, a second gradient different from the above-mentioned first gradient, and two prescribed tables.
[0011] The above-mentioned angle mode derivation device uses the value derived by the logarithmic shift of the gradient in the first pixel to derive the first value with reference to the first table, and uses the first value and the index obtained by the logarithmic shift to derive the angle mode with reference to the second table.
[0012] The above-mentioned angle pattern derivation device is characterized in that a first value is deduced with reference to a first table using a value deduced by a logarithmic shift of a first gradient in a second pixel, and an angle pattern is deduced with reference to a second table using a product of the first value and the second gradient and an index obtained by the logarithmic shift of the above-mentioned first gradient.
[0013] The above-mentioned angle mode derivation device is characterized by comprising an angle mode selection unit, which selects an angle mode representative value from a plurality of angle modes derived from pixels in a gradient derivation target image.
[0014] The above-mentioned angle pattern derivation device is characterized in that the elements of the table are integers greater than 0.
[0015] The angle pattern derivation device is characterized in that the elements of the table are integers greater than 0, are values in ascending order, and the number of elements having the same value increases except for the last element.
[0016] The angle pattern derivation device is characterized in that the angle pattern selection unit selects the angle pattern representative value using an average value of the angle pattern.
[0017] In addition, a motion image decoding device of one embodiment of the present invention is characterized in that it comprises: the above-mentioned angle mode derivation device; and a prediction image derivation unit, which uses the area adjacent to the top and left of the object block as a gradient derivation object image, and derives the prediction image based on the intra-frame prediction mode derived by adding the angle mode derived from the table to the reference mode.
[0018] Furthermore, the moving picture decoding device is characterized by comprising an inverse transform unit that performs inverse transform of transform coefficients using a transform matrix derived based on the above-mentioned angle mode.
[0019] In addition, a motion image encoding device of one embodiment of the present invention is characterized in that it comprises: the above-mentioned angle mode derivation device; and a prediction image derivation unit, which uses the area adjacent to the top and left of the object block as a gradient derivation object image, and derives the prediction image based on the intra-frame prediction mode derived by adding the angle mode derived from the table to the reference mode. Beneficial Effects
[0020] According to an aspect of the present invention, appropriate intra-frame prediction can be performed without increasing the computational complexity of intra-frame mode derivation at the decoder side. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a schematic diagram showing the configuration of the image transmission system according to the present embodiment. Figure 2 This is a diagram showing the hierarchical structure of the data of the coded stream. Figure 3 This is a schematic diagram showing the types (mode numbers) of intra prediction modes. Figure 4 This is a schematic diagram showing the structure of a moving picture decoding device. Figure 5 This is a diagram showing the structure of an intra-frame prediction image generation unit. Figure 6 This is a diagram showing the details of the DIMD prediction unit. Figure 7 This is an example of the syntax of DIMD. Figure 8 is an example of a spatial filter. Fig. 9 FIG. 1 is a diagram showing an example of a gradient derivation target pixel. Fig.10 It is a graph showing the relationship between gradient and area. Fig.11 This is a block diagram showing the structure of a moving picture encoding device. Fig.12 This is a block diagram showing the structure of the angle pattern derivation unit. Fig.13 This is a functional block diagram showing a configuration example of an inverse quantization / inverse transform unit. DETAILED DESCRIPTION (First Embodiment)
[0022] Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0023] Figure 1 It is a schematic diagram showing the configuration of the image transmission system 1 according to the present embodiment.
[0024] The image transmission system 1 is a system for transmitting a coded stream obtained by encoding a coding target image, decoding the transmitted coded stream and displaying the image. The image transmission system 1 is configured to include: a moving image encoding device (image encoding device) 11, a network 21, a moving image decoding device (image decoding device) 31, and a moving image display device (image display device) 41.
[0025] The video image encoding device 11 receives the image T as input.
[0026] The network 21 transmits the coded stream Te generated by the motion image coding device 11 to the motion image decoding device 31. The network 21 is the Internet, a wide area network (WAN), a small network (LAN) or a combination thereof. The network 21 is not necessarily limited to a two-way communication network, but may also be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. In addition, the network 21 may also be replaced by a storage medium such as a DVD (Digital Versatile Disc: Digital Versatile Disc, registered trademark) or a BD (Blu-ray Disc: Blu-ray Disc, registered trademark) that records the coded stream Te.
[0027] The moving picture decoding device 31 decodes each of the coded streams Te transmitted through the network 21 , and generates one or more decoded pictures Td after decoding.
[0028] The moving image display device 41 displays all or part of one or more decoded images Td generated by the moving image decoding device 31. The moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. Examples of the form of the display include a fixed type, a mobile type, an HMD (Head Mounted Display), etc. Further, when the moving image decoding device 31 has high processing power, an image with high display quality is displayed, and when it has only low processing power, an image that does not require high processing power and high display ability is displayed. <Operator>
[0029] The following describes the operators used in this specification.
[0030] >> represents a right shift, << represents a left shift, & represents a bitwise AND, | represents a bitwise OR, ^ represents a bitwise XOR, |= represents an OR assignment operator,! represents a logical negation (NOT), && represents a logical product (AND), and || represents a logical sum (OR).
[0031] x? y : z is a ternary operator that takes y when x is true (other than 0) and takes z when x is false (0).
[0032] Clip3(a, b, c) is a function that clips c to a value between a and b (inclusive), returning a when c < a, b when c > b, and c otherwise (where a <= b).
[0033] Clip1Y(c) is an operator where a = 0 and b = (1 << BitDepthY) - 1 are set in Clip3(a, b, c). BitDepthY is the bit depth of luminance.
[0034] abs(a) is a function that returns the absolute value of a.
[0035] Int(a) is a function that returns the integer value of a.
[0036] Floor(a) is a function that returns the largest integer less than or equal to a.
[0037] Log2(a) is a function that returns the logarithm to the base 2.
[0038] Ceil(a) is a function that returns the smallest integer greater than or equal to a.
[0039] a / d represents a divided by d (truncating the decimal part).
[0040] Min(a, b) is a function that returns the smaller of a and b. <Structure of coded stream Te>
[0041] Before describing in detail the moving picture encoding device 11 and the moving picture decoding device 31 of the present embodiment, the data structure of the coded stream Te generated by the moving picture encoding device 11 and decoded by the moving picture decoding device 31 will be described.
[0042] Figure 2 : is a diagram showing the hierarchical structure of data in the coded stream Te. The coded stream Te exemplarily includes a sequence and a plurality of pictures constituting the sequence. Figure 2 The diagrams respectively show a coded video sequence representing a specified sequence SEQ, a coded picture of a specified picture PICT, a coded slice of a specified slice S, coded slice data of the specified slice data, a coding tree unit included in the coded slice data, and a coding unit included in the coding tree unit. (Encoded video sequence)
[0043] In the coded video sequence, a set of data is defined for reference by the moving image decoding device 31 in order to decode the sequence SEQ to be processed. Figure 2 As shown in the coded video sequence, the sequence SEQ includes: a video parameter set VPS (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT and supplemental enhancement information SEI (Supplemental Enhancement Information).
[0044] The video parameter set VPS defines a set of coding parameters common to a plurality of moving images, and a set of coding parameters associated with a plurality of layers included in the moving image and each layer, in the moving image.
[0045] In the sequence parameter set SPS, a set of coding parameters is specified for reference by the motion image decoding device 31 to decode the object sequence. For example, the width and height of the picture are specified. It should be noted that there can be multiple SPSs. In this case, any one of the multiple SPSs is selected from the PPS.
[0046] In the picture parameter set PPS, a set of coding parameters is specified for reference by the motion image decoding device 31 to decode each picture in the target sequence. For example, it includes a reference value (pic_init_qp_minus26) of the quantization width used for decoding the picture and a flag (weighted_pred_flag) indicating the application of weighted prediction. It should be noted that there can be multiple PPSs. In this case, any one of the multiple PPSs is selected from each picture in the target sequence. (Encoded image)
[0047] In the coded picture, a set of data is defined for reference by the moving image decoding device 31 in order to decode the picture PICT to be processed. Figure 2 As shown in the coded picture, the picture PICT includes slices 0 to slice NS-1 (NS is the total number of slices included in the picture PICT).
[0048] It should be noted that, in the following, when there is no need to distinguish between slices 0 to NS-1, the code subscript may be omitted for description. The same is true for data included in the coded stream Te described below, that is, other data with suffixes. (Encoding slice)
[0049] In the coded slice, a set of data is defined to be referred to by the video decoding device 31 in order to decode the slice S to be processed. Figure 2 As shown in the coded slice, the slice includes a slice header and slice data.
[0050] The slice header includes a coding parameter group that the moving picture decoding device 31 refers to in order to determine a decoding method of a target slice. Slice type designation information (slice_type) that designates a slice type is one example of a coding parameter included in the slice header.
[0051] Examples of slice types that can be specified by the slice type specification information include: (1) I slices that use only intra-frame prediction when encoding, (2) P slices that use unidirectional prediction or intra-frame prediction when encoding, and (3) B slices that use unidirectional prediction, bidirectional prediction, or intra-frame prediction when encoding. It should be noted that inter-frame prediction is not limited to unidirectional prediction and bidirectional prediction, and more reference pictures can be used to generate predicted images. Hereinafter, the cases referred to as P and B slices refer to slices that include blocks that can use inter-frame prediction.
[0052] It should be noted that the slice header may also include a reference to the picture parameter set PPS (pic_parameter_set_id). (Encoded slice data)
[0053] The coded slice data specifies a set of data that the moving image decoding device 31 refers to in order to decode the slice data to be processed. Figure 2 As shown in the coded slice header of , the slice data includes CTU. CTU is a fixed-size (for example, 64×64) block constituting a slice, and is also called the Largest Coding Unit (LCU). (Coding Tree Unit)
[0054] exist Figure 2 In the coding tree unit, a set of data is specified for reference by the motion image decoding device 31 in order to decode the CTU of the processing object. The CTU is divided into coding units CU, which are basic units of coding processing, by recursive quadtree partitioning (QT (Quad Tree) partitioning), binary tree partitioning (BT (Binary Tree) partitioning) or ternary tree partitioning (TT (Ternary Tree) partitioning). BT partitioning and TT partitioning are collectively referred to as multi-tree partitioning (MT (Multi Tree) partitioning). The nodes of the tree structure obtained by recursive quadtree partitioning are called coding nodes (Coding Node). The intermediate nodes of the quadtree, binary tree and ternary tree are coding nodes, and the CTU itself is also specified as the top-level coding node. (Coding unit)
[0055] like Figure 2 As shown in the coding unit of the CU, a set of data is specified for reference by the motion image decoding device 31 to decode the coding unit to be processed. Specifically, the CU is composed of a CU header CUH, prediction parameters, transformation parameters, quantized transformation coefficients, etc. The prediction mode, etc. are specified in the CU header.
[0056] The prediction process may be performed in units of CU or in units of sub-CUs obtained by further dividing the CU. When the size of the CU and the sub-CU are equal, there is one sub-CU in the CU. When the size of the CU is larger than the size of the sub-CU, the CU is divided into sub-CUs. For example, when the CU is 8×8 and the sub-CU is 4×4, the CU is divided into four sub-CUs consisting of two parts divided horizontally and two parts divided vertically.
[0057] There are two types of prediction (prediction modes): intra prediction and inter prediction. Intra prediction is prediction within the same picture, while inter prediction refers to prediction processing between different pictures (for example, between display times, between layer images).
[0058] The transform / quantization process is performed in units of CUs, but the quantized transform coefficients may be entropy-coded in units of 4×4 or other sub-blocks. (Prediction parameters)
[0059] The predicted image is derived from prediction parameters attached to the block. The prediction parameters include prediction parameters for intra-frame prediction and inter-frame prediction.
[0060] The prediction parameters of the intra prediction are described below. The intra prediction parameters are composed of a luma prediction mode IntraPredModeY and a chroma prediction mode IntraPredModeC. Figure 3 is a schematic diagram showing the types (mode numbers) of intra-frame prediction modes. Figure 3 As shown, there are 67 intra-frame prediction modes (0 to 66). For example, there are plane prediction (0), DC prediction (1), and angular prediction (2 to 66). In addition, linear model (LM) prediction such as cross component linear model (CCLM) prediction and multi-mode linear model (MMLM) prediction can also be used. Moreover, LM mode can be added to color difference. (Configuration of Moving Image Decoding Device)
[0061] The video decoding device 31 ( Figure 4 ) is described below.
[0062] The moving image decoding device 31 is configured to include an entropy decoding unit 301, a parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, an inverse quantization / inverse transformation unit 311, and an addition unit 312. It should be noted that, according to the moving image encoding device 11 described later, there is also a configuration in which the loop filter 305 is not included in the moving image decoding device 31.
[0063] The parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304 (not shown). The predicted image generation unit 308 includes an inter prediction image generation unit 309 and an intra prediction image generation unit 310 .
[0064] In addition, the following describes an example of using CTU and CU as processing units, but the present invention is not limited to this example, and processing may be performed in sub-CU units. Alternatively, CTU and CU may be replaced with blocks, and sub-CU may be replaced with sub-blocks, and processing may be performed in blocks or sub-blocks.
[0065] The entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, separates each code (syntax element) and decodes it. There are the following methods in entropy coding: a method of variable-length coding the syntax element using a context (probability model) appropriately selected according to the type of syntax element and the surrounding conditions; and a method of variable-length coding the syntax element using a predetermined table or calculation formula. The former CABAC (Context Adaptive Binary Arithmetic Coding) stores the probability model updated for each encoded or decoded picture (slice) in a memory. Then, as the initial state of the context of the P picture or B picture, the probability model of the picture using the same slice type and the same slice level quantization parameter is set according to the probability model stored in the memory. This initial state is used for encoding and decoding processing. The separated code contains prediction information for generating a predicted image and a prediction error for generating a differential image.
[0066] The entropy decoding unit 301 outputs the separated codes to the parameter decoding unit 302. Based on the instruction of the parameter decoding unit 302, control is performed as to which code is to be decoded. (Configuration of Intra-frame Prediction Parameter Decoding Unit 304)
[0067] The intra prediction parameter decoding unit 304 decodes the intra prediction parameters, for example, the intra prediction mode IntraPredMode, by referring to the prediction parameters stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301. The intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameters to the prediction image generation unit 308, and then stores them in the prediction parameter memory 307. The intra prediction parameter decoding unit 304 can also derive intra prediction modes that are different in brightness and color difference.
[0068] The intra-frame prediction parameter decoding unit 304 decodes the Figure 7 The syntax elements shown are related to intra-frame prediction and are decoded.
[0069] The loop filter 305 is a filter provided in the encoding loop, and is a filter for improving image quality by removing block distortion and ringing distortion. The loop filter 305 performs filtering such as deblocking filtering, sample adaptive offset (SAO), and adaptive loop filtering (ALF) on the decoded image of the CU generated by the adding unit 312.
[0070] The reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each target picture and target CU.
[0071] The prediction parameter memory 307 stores the prediction parameter at a predetermined position for each CTU or CU to be decoded. Specifically, the prediction parameter memory 307 stores the parameters decoded by the parameter decoding unit 302 and the prediction mode predMode separated by the entropy decoding unit 301 .
[0072] The prediction image generation unit 308 receives the prediction mode predMode, prediction parameters, and the like as input. In addition, the prediction image generation unit 308 reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of a block or a sub-block using the prediction parameters and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode. Here, the reference picture block refers to a set of pixels on the reference picture (usually rectangular, so it is called a block), which is a region referenced to generate a prediction image. (Intra-frame prediction image generation unit 310)
[0073] When the prediction mode predMode indicates the intra prediction mode, the intra prediction image generation unit 310 performs intra prediction using the intra prediction parameters input from the intra prediction parameter decoding unit 304 and the reference pixels read from the reference picture memory 306 .
[0074] Specifically, the intra prediction image generator 310 reads neighboring blocks within a predetermined range from the target block on the target picture from the reference picture memory 306. The predetermined range is the neighboring blocks to the left, upper left, upper, and upper right of the target block, and the reference area varies depending on the intra prediction mode.
[0075] The intra-frame prediction image generation unit 310 generates a prediction image of the target block by referring to the read decoded pixel value and the prediction mode indicated by IntraPredMode. The intra-frame prediction image generation unit 310 outputs the generated prediction image of the block to the addition unit 312.
[0076] The following describes the generation of a predicted image based on an intra prediction mode. In planar prediction, DC prediction, and angular prediction, a decoded surrounding area adjacent to (close to) the prediction target block is set as a reference area R. Then, a predicted image is generated by extrapolating pixels on the reference area R in a specific direction. For example, the reference area R can be set to an L-shaped area including the left and top (or further the top left, top right, and bottom left) of the prediction target block. (Details of Prediction Image Generator)
[0077] Next, use Figure 5The following describes the details of the configuration of the intra-prediction image generator 310. The intra-prediction image generator 310 includes a reference sample filter 3103 (second reference image setting unit), a prediction unit 3104, and a prediction image correction unit 3105 (prediction image correction unit, filter switching unit, weighting coefficient changer).
[0078] The prediction unit 3104 generates a prediction image (temporary prediction image, pre-correction prediction image) of the prediction target block based on each reference pixel (reference image) on the reference region R, the filtered reference image generated by the reference pixel filter (first filter), and the intra prediction mode, and outputs it to the prediction image correction unit 3105. The prediction image correction unit 3105 corrects the temporary prediction image according to the intra prediction mode, generates and outputs a prediction image (corrected prediction image).
[0079] Hereinafter, each unit included in the intra-frame prediction image generation unit 310 will be described. (See sample filter unit 3103)
[0080] The reference sample filter unit 3103 refers to the reference image to derive the reference samples s[x][y] at each position (x, y) on the reference region R. In addition, the reference sample filter unit 3103 applies reference sample filtering (first filtering) to the reference samples s[x][y] according to the intra prediction mode, and updates the reference samples s[x][y] at each position (x, y) on the reference region R (derives the filtered reference image s[x][y]). Specifically, a low-pass filter is applied to the reference image at the position (x, y) and its surroundings to derive the filtered reference image. It should be noted that the low-pass filter is not necessarily applied to all intra prediction modes, and the low-pass filter may also be applied to a part of the intra prediction modes. It should be noted that the filter applied to the reference image on the reference region R in the reference sample filter unit 3103 is referred to as the "reference pixel filter (first filter)", and in contrast, the filter for correcting the temporary prediction image in the prediction image correction unit 3105 described later is referred to as the "position-dependent filter (second filter)". (Configuration of the intra prediction unit 3104)
[0081] The intra prediction unit 3104 generates a temporary prediction image (temporary prediction pixel value, prediction image before correction) of the prediction target block based on the intra prediction mode, the reference image and the filtered reference pixel value, and outputs it to the prediction image correction unit 3105. The prediction unit 3104 internally includes a plane prediction unit 31041, a DC prediction unit 31042, an angle prediction unit 31043, an LM prediction unit 31044, a MIP (Matrix-based Intra Prediction: matrix-based intra prediction) unit 31045, and a DIMD prediction unit 31046 (Decoder-side Intra Mode Derivation, DIMD). The prediction unit 3104 selects a specific prediction unit according to the intra prediction mode, and inputs a reference image and a filtered reference image. The relationship between the intra prediction mode and the corresponding prediction unit is as follows. · Plane prediction···· Plane prediction unit 31041 ·DC Prediction····DC Prediction Department 31042 · Angle prediction····Angle prediction unit 31043 LM Forecast LM Forecast Department 31044 ·Matrix Intra Prediction··MIP Section 31045 ·DIMD Forecast······IMD Forecast Department 31046 (Plane Prediction) The plane prediction unit 31041 linearly adds the reference samples s[x][y] according to the distance between the prediction target pixel position and the reference pixel position, generates a temporary prediction image, and outputs it to the prediction image correction unit 3105 . (DC Prediction)
[0082] The DC prediction unit 31042 derives a DC prediction value equivalent to the average value of the reference samples s[x][y], and outputs a temporary prediction image q[x][y] using the DC prediction value as a pixel value. (Angle Prediction)
[0083] The angular prediction unit 31043 generates a temporary predicted image q[x][y] using the reference samples s[x][y] in the prediction direction (reference direction) indicated by the intra prediction mode, and outputs the temporary predicted image q[x][y] to the predicted image correction unit 3105 . (LM forecast)
[0084] The LM prediction unit 31044 predicts the pixel value of the color difference based on the pixel value of the brightness. Specifically, it is a method of generating a predicted image of the color difference image (Cb, Cr) using a linear model based on the decoded brightness image. As one of the LM predictions, there is CCLM (Cross-Component Linear Model prediction). CCLM prediction is a prediction method that uses a linear model for predicting color difference based on brightness for a block. (Matrix Intra Prediction)
[0085] The MIP unit 31045 generates a temporary predicted image q[x][y] by performing a sum-of-product operation on the reference samples s[x][y] derived from the adjacent region and the weighting matrix, and outputs the result to the predicted image correction unit 3105 . (DIMD forecast)
[0086] The DIMD prediction unit 31046 is a prediction method for generating a predicted image using an intra-frame prediction mode that is not explicitly communicated through a signal. The intra-frame prediction parameter decoding unit 304 uses the information of the adjacent area in the angle mode derivation device 310465 to derive an intra-frame prediction mode suitable for the target block, and the DIMD prediction unit 31046 generates a predicted image using the intra-frame prediction mode. The details will be described later. (Configuration of the Prediction Image Correction Unit 3105)
[0087] The predicted image correction unit 3105 corrects the temporary predicted image output from the prediction unit 3104 according to the intra-frame prediction mode. Specifically, the predicted image correction unit 3105 derives a weighting coefficient that depends on the position for each pixel of the temporary predicted image based on the reference area R and the position of the target predicted pixel. Then, by weighted addition (weighted average) of the reference sample s[][] and the temporary predicted image q[x][y], a predicted image (corrected predicted image) Pred[][] of the corrected temporary predicted image is derived. It should be noted that in some intra-frame prediction modes, the temporary predicted image q[x][y] may be set as a predicted image without being corrected by the predicted image correction unit 3105. (Example 1)
[0088] Figure 6 4 shows the configuration of the DIMD prediction unit 31046 of this embodiment. The DIMD prediction unit 31046 is composed of an angle mode derivation device 310465 (a gradient derivation unit 310461, an angle mode derivation unit 310462), an angle mode selection unit 310463, and a temporary prediction image generation unit 310464. The angle mode derivation device 310465 may also include an angle mode selection unit 310463.
[0089] Figure 7 An example of syntax representing encoded data related to DIMD. The intra-frame prediction parameter decoding unit 304 decodes the flag dimd_flag indicating whether DIMD is used for each block from the encoded data. When dimd_flag is 1, the parameter decoding unit 302 may not decode syntax elements related to the intra-frame prediction mode from the encoded data (for example, the flag intra_mip_flag indicating whether MIP prediction is performed, the flag intra_luma_mpm_flag indicating whether the most probable mode (Most Probable Mode: MPM) of the prediction candidate is used, the index intra_luma_mpm_idx specifying the MPM when using the MPM, and the index intra_luma_mpm_reminder for selecting the remaining candidates when not using the MPM). When dimd_flag is 0, intra_luma_mpm_flag is decoded, and when intra_luma_mpm_flag is 0, intra_luma_mpm_remainer is further decoded. When intra_luma_mpm_flag is 1, intra_luma_not_planar_flag and intra_luma_mpm_idx are decoded. When dimd_flag is 1, the DIMD prediction unit 31046 uses the pixel value to derive the angle representing the texture direction in the adjacent area. Then, the intra-frame prediction mode corresponding to the angle is used to generate a temporary prediction image. For example, (1) The gradient direction of the pixel value is derived for the pixel at a specified position in the adjacent area. (2) The derived gradient direction is transformed into the corresponding direction prediction mode (angle prediction mode). (3) For each specified pixel in the adjacent area, a histogram of the respectively obtained prediction directions is generated. (4) The prediction mode of the most frequent value or multiple prediction modes including the most frequent value is selected from the histogram, and the temporary prediction image is generated using the prediction mode. The following is for Figure 6 The processing in each unit of the DIMD prediction unit 31046 shown is described in more detail. (1) Gradient derivation part
[0090] The gradient derivation unit 310461 derives an angle (angle information) indicating a texture direction based on the image data of the gradient derivation target image. The angle information may be a value indicating an angle with a precision of 1 / 36, or other values. The gradient derivation unit 310461 derives gradients in two or more specific directions (e.g., Dx, Dy), and derives the direction (angle information) of the gradient based on the relationship between the gradients Dx and Dy.
[0091] Spatial filters can also be used to derive gradients. Spatial filters can also be used, for example Figure 8 The 3×3 pixel Sobel filters corresponding to the horizontal and vertical directions shown in (a) and (b) of FIG. 310461 derive the gradient for the point Pn[0][0] (n=0..N-1) of the N gradient derivation target positions in the gradient derivation target image. Fig. 9 (a) shows an example of the position of the gradient derivation target pixel in the target block of 8×8 pixels. Fig. 9 (b) shows an example of the position of the gradient derivation object pixel in the object block of 4×4 pixels. When the angle mode derivation device 310465 is used for intra-frame prediction, the image of the grid located in the adjacent area of the object block can also be the gradient derivation object image. In addition, the gradient derivation object image can also be a luminance image corresponding to the color difference image of the object block. In this way, the number of gradient derivation object pixels, the position mode, and the reference range of the spatial filter can also be changed according to information such as the size of the object block and the prediction mode of the blocks included in the adjacent area.
[0092] Specifically, the gradient derivation unit 310461 derives the gradients Dx and Dy in the horizontal and vertical directions for each point Pn as shown in the following formulas. Dx=Pn[-1][-1]+2*Pn[-1][0]+Pn[-1][1]-Pn[1][-1]-2*Pn[1][0]-Pn[1][1] Dy=-Pn[-1][-1]-2*Pn[0][-1]-Pn[1][-1]+Pn[-1][1]+2*Pn[0][1]+Pn[1][1] Here, Pn[x][y] is the pixel value in the pixel represented by the relative coordinates of the point Pn([0][0]) where the distance gradient is derived. Figure 8 (a) and (b) are filters that have been inverted left and right or up and down. Figure 8 In this case, Dx and Dy are derived using the following formula. Dx=-Pn[-1][-1]-2*Pn[-1][0]-Pn[-1][1]+Pn[1][-1]+2*Pn[1][0]+Pn[1][1] Dy=Pn[-1][-1]+2*Pn[0][-1]+Pn[1][-1]-Pn[-1][1]-2*Pn[0][1]-Pn[1][1] The gradient derivation method is not limited to this, and other methods (filters, calculation formulas, tables, etc.) may also be used. For example, a Prewitt filter, a Scharr filter, etc. may be used instead of a Sobel filter, and the filter size may be set to 2×2 or 5×5. The gradient derivation unit 310461 uses the Prewitt filter to derive Dx and Dy as shown below. Dx=Pn[-1][-1]+Pn[-1][0]+Pn[-1][1]-Pn[1][-1]-Pn[1][0]-Pn[1][1] Dy=-Pn[-1][-1]-Pn[0][-1]-Pn[1][-1]+Pn[-1][1]+Pn[0][1]+Pn[1][1] The following formula is an example of deriving Dx and Dy using the Scharr filter. Dx=3*Pn[-1][-1]+10*Pn[-1][0]+3*Pn[-1][1]-3*Pn[1][-1]-10*Pn[1][0]-3*Pn[1][1] Dy=-3*Pn[-1][-1]-10*Pn[0][-1]-3*Pn[1][-1]+3*Pn[-1][1]+10*Pn[0][1]+3*Pn[1][1] The gradient derivation method can also be changed for each block. For example, a Sobel filter is used for a 4×4 pixel object block, and a Scharr filter is used for a block larger than 4×4. In this way, the increase in the amount of calculation in a small block can be suppressed by using a filter with simpler calculation in the small block.
[0093] The gradient derivation method may be changed for each position of the gradient derivation target pixel. For example, a Sobel filter may be used for the gradient derivation target pixel in the upper or left adjacent region, and a Scharr filter may be used for the gradient derivation target pixel in the upper left adjacent region.
[0094] The gradient derivation unit 310461 derives angle information consisting of the quadrant (hereinafter referred to as region) of the angle of the texture of the object block and the angle (angle) in the quadrant based on the sign and size relationship of Dx and Dy. The processing of directions in a rotationally symmetric or linearly symmetric relationship can be generalized according to the region. However, the angle information is not limited to the angle in the region and the quadrant. For example, the region can be derived as needed as only the angle information. In addition, in the present embodiment, the intra-frame direction prediction mode derived below is limited to the direction from the lower left to the upper right ( Figure 32~66), the intra-frame directional prediction mode in the direction of 180-degree rotational symmetry is processed in the same way.
[0095] Fig.10 (a) is a table showing the relationship between the signs (signx, signy) and the magnitude relationship (xgty) of Dx and Dy, and the region region (Ra to Rd are constants indicating the region, respectively). Fig.10 (b) shows the quadrant shown in the region Ra to Rd. The gradient derivation unit 310461 derives signx, signy, and xgty as shown below. absx=abs(Dx) absy=abs(Dy) signx=Dx<0?1:0 signy=Dy<0?1:0 xgty=absx>absy? 1:0 Here, the inequality sign (>, <) may be accompanied by an equality sign (>=, <=). The area represents a rough angle and can be derived only from the signs signx, signy and the size relationship xgty of Dx and Dy.
[0096] The gradient derivation unit 310461 uses operations and table references to derive region based on the symbols signx, signy and the size relationship xgty. The gradient derivation unit can also refer to Fig.10 The corresponding region is derived from the table in (a).
[0097] The gradient derivation unit 310461 may also derive the region using a logical expression as shown below. region=xgty? ((signx^signy)?1:0): ((signx^signy)?2:3) Here, ^ represents XOR (exclusive OR). region is represented by values from 0 to 3. {Ra, Rb, Rc, Rd}={0, 1, 2, 3}. It should be noted that the method of assigning the value of region is not limited to the above.
[0098] The gradient derivation unit 310461 may also derive the region using other logical expressions and addition and multiplication as shown below. region=2*(!xgty)+(signx^signy^!xgty) Here, the sign ! refers to logical negation. (2) Angle mode derivation section
[0099] The angle mode derivation unit 310462 derives an angle mode (a prediction mode corresponding to the gradient, such as an intra prediction mode) based on the gradient information of point Pn.
[0100] Fig.12 is a block diagram showing a configuration of the angle mode derivation unit 310462. As Fig.12 shown, the first gradient, the second gradient, and these two tables can also be used to derive the angle mode mode_delta as follows.
[0101] The angle mode derivation unit 310462 is composed of an angle coefficient derivation unit 310466 and a mode transformation unit 310467. The angle coefficient derivation unit 310466 derives an angle coefficient iRatio (or v) based on two gradients. Here, the second iRatio (= absy ÷ absx) is derived based on the absolute value absx of the first gradient and the absolute value absy of the second gradient. As iRatio, an integer representing ratio in units of 1 / R_UNIT is used. R_UNIT uses a power of 2 (1 << shiftR), such as 65536 (shiftR = 16), etc.
[0102] The following shows an example of the derivation method of iRatio, but it is not limited to this example.
[0103] Here, gradDivTable = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} Alternatively, the above formula can also be calculated with +8. Similarly, |16, |32, |64 can be calculated with +16, +32, +64 respectively. Alternatively, the angle coefficient derivation unit 310466 can also derive iRatio using a LUT that outputs the same value as the above formula for the inputs of S0 and S1. o .
[0104] The mode transformation unit 310467 derives idx from iRatio, and uses this idx to refer to the following look-up table (LUT) to derive the first angle mode mode_delta as differential information from the reference direction. idx = iRatio >> shiftI mode_delta = LUT[idx] shiftI represents a prescribed constant such as 10. Here, LUT[N_LUT]={0,1,1,2,2,3,3,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,13,13,14,14,14,14,14,15,15,15,15,15,16,16,16,16}. Here, N_LUT represents the number of elements of LUT. N_LUT=(1<<(shiftR-shiftI))+1 It should be noted that when iRatio is approximately 0, that is, idx==0, the gradient is in the horizontal or vertical direction, and the difference from the reference direction is 0. Therefore, the first element 0 of the LUT can also be omitted, and the LUT is composed of N_LUT′=(1<<(shiftR-shiftI)) elements that are powers of 2. In this case, the lookup table LUT′ can be used as follows. LUT'[N_LUT']={1,1,2,2,3,3,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,1 1,11,11,12,12,12,12,12,13,13,13,13,13,13,14,14,14,14,14,14,15,15,15,15,15,15,16,16,16,16} The above table is characterized in that it is an integer greater than 0, and the size relationship of adjacent elements is ">=" or "<=". In the above table, integers greater than 0 and values in ascending order and the number of elements with the same value have an increasing relationship except for the last element. However, a table in which integers greater than 0 and values in descending order and the number of elements with the same value have a decreasing relationship except for the first element may be used. For example, LUT_dec[N_LUT′]={16,16,16,16,15,15,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,12,12,12,12,11,11,11,11,10,10,10,9,9,9,9,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,3,3,2,2,1,1} At this time, the mode conversion unit 310467 uses the following formula to derive the first angle mode mode_delta. mode_delta=idx? LUT'[idx-1]: 0 In case of using a descending table, mode_delta=idx? LUT_dec[63-idx]: 0 In the case of idx>0 (idx!=0), by referring to the table, the number of table elements N_LUT′ can be made a power of 2, and the memory utilization efficiency when the table is stored in the memory can be improved.
[0105] The mode conversion unit 310467 derives the second angle mode modeVal by adding or subtracting mode_delta from the reference direction base_mode[region]. base_mode[4]={18, 18, 50, 50} direction[4]={-1, 1, -1, 1} modeVal=base_mode[region]+direction[region]*mode_delta The value of base_mode is 18, which indicates a horizontal mode number (intra-frame prediction (HOR)), and 50, which indicates a vertical mode number (intra-frame prediction (VER)). base_mode is not limited to these values.
[0106] It should be noted that the derivation of the gradient ratio iRatio and the derivation of the angle mode mode_delta according to the gradient can also be performed in one process. For example, the first angle mode mode_delta can be derived as shown below using the first gradient, the second gradient, and the two tables. Here, the angle coefficient v is derived using the first table (gradDivTable[]), and then the angle mode mode_delta is derived according to the angle coefficient v and the second table (LUT′). s0=xgty?absy:absx s1=xgty?absx:absy x = Floor(Log2(s1)) norm_s1=(s1< <4> >x)&15 v = gradDivTable[norm_s1]|8 x+=(norm_s1!=0) idx=(x<3)? (s0*v)<<(3-x): (s0*v)>>(x-3) mode_delta=idx? LUT'[idx-1]: 0
[0107] Here, “(s0*v)<<(3-x)” can be represented by “(s0*v)< <3> >x". In addition, here <<3 is not limited to 3, and the accuracy of the angle mode can also be made higher, such as <<4, <<5, etc. In addition, by remaking the table, << can be eliminated, and it can also be set to <<1, <2.
[0108] In the above configuration, the value norm_s1 is derived using the shift of the logarithmic value x based on the gradient (absx or absy) in a certain pixel. A certain slope v is derived using norm_s1 with reference to the first table gradDivTable. Furthermore, idx is derived from the slope v and the shift based on the logarithmic value x. The angle mode mode_delta is derived using Idx with reference to the second table LUT.
[0109] In addition, the value norm_s1 is derived using a shift based on the logarithmic value x of the first gradient (absx or absy) in a certain pixel. The angle coefficient v is derived using norm_s1 with reference to gradDivTable. Furthermore, idx is derived based on the shift of the logarithmic value x by the product of v and a second gradient (s0 or s1) different from the first gradient. The angle mode mode_delta is derived using idx with reference to the second table LUT (LUT′). Accordingly, the effect of being able to derive the angle mode from the gradient using a shift operation and a table reference is achieved. In addition, the amount of processing can be reduced by performing a shift operation after deriving the second table LUT once.
[0110] It should be noted that in order to prevent idx from exceeding the range of the number of regions in the LUT, truncation may be performed as shown below. idx=min((s0*v)<<3>>x, N_LUT-1)
[0111] Furthermore, it is also appropriate to truncate the multiplication of s0*v to a value less than a predetermined value KK and then shift the value so that the value does not exceed 32 bits, for example. s0*v=(min(s0*v,KK)<<3)>>x
[0112] KK is, for example, (1<<(31-3))-1=268435455 (Example for other tables) The angle mode derivation unit 310462 may also derive mode_delta using the first gradient, the second gradient, and two tables as shown below. norm_s1=(s1< <7> >x)&127 v = gradDivTable3[norm_s1] | 64 x+=(norm_s1!=0) idx=(s0*v)>>x
[0113] Here, gradDivTable3 = {0,63,62,61,60,59,58,57,56,56,55,54,53,52,51,51,50,49,48,47,47,46,45,45,44,43,42,42,41,40,40,39,38,38,37,37,36,35,35,34,34,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26 ,25,25,24,24,23,23,22,22,21,21,20,20,20,19,19,18,18,18,17,17,16,16,16,15,15,14,14,14,13,13,13,12,12,11,11,10,10,10,9,9,9,8,8,8,8,7,7,7,6,6,6,5,5,5,5,4,4,4,3,3,3,3,2,2,2,2,1,1,1,1,0} It should be noted that the derivation method of mode_delta is not limited to this The angle mode derivation unit 310462 may also use rounding operation when deriving idx as shown below. idx=(iRatio+roundI)>>shiftI Here, roundI=1<<(shiftI-1), and shiftI is a predetermined constant such as 10.
[0114] In the angle mode derivation unit 310462, the number of elements N_LUT of the LUT may be 17 (shiftR-shiftI=4), 33 (shiftR-shiftI=5), or 129 (shiftR-shiftI=7) in addition to the 65 (shiftR-shiftI=6) in the above example. , 257 (shiftR-shiftI=8) and other numbers.
[0115] For example, in the case where the number of stages is set to be greater than 65, the following derivation can be performed. idx=iRatio>>9 LUT_N128
[128] ={1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,15,15,15,16,16,16,17,17,17,17,18,18,18,19,19,19,19,20,20,20,20, 21,21,21,21,22,22,22,23,23,23,23,24,24,24,24,24,25,25,25,25,25,26,26,26,26,26,27,27,27,27,27,27,28,28,28,28,29,29,29,29,29,30,30,30,30,30,31,31,31,31,31,31,32,32,32} idx=(x<4)? (s0*v)<<(4-x): (s0*v)>>(x-4)=(s0*v)<<4>>x If this table is used, the angle pattern can be derived with an accuracy of 32 directions every 90 degrees. mode_delta=idx? LUT_N128[idx-1]: 0 The mode conversion unit 310467 uses mode_delta to derive and output the second angle mode modeVal. modeVal=base_mode[region]+direction[region]*mode_delta (3) Angle mode selection part The angle mode selection unit 310463 uses the modeVal (modeValPn) at multiple points Pn included in the gradient derivation object image to derive representative values dimdModeVal (dimdModeVal0, dimdModeVal1, ...) of one or more angle modes. The representative value of the angle mode in this embodiment is an estimated value of the directionality of the texture pattern of the object block. Here, the representative value dimdModeVal is derived based on the most frequent value derived using the histogram. The histogram (frequency HistMode) of the value modeValPn of the angle mode modeVal obtained for each point Pn is derived, and the first mode dimdModeVal0 and the second mode dimdModeVall are derived by selecting the mode with the highest frequency and the mode with the second highest frequency in the frequency, respectively. The histogram can be obtained by increasing the value of HistMode by 1 at each point Pn. HistMode[modeValPn]+=1
[0116] Then, regarding the x scan HistMode[x], the value of x that provides the maximum value of HistMode is set to dimdModeVal0, and the value of x that provides the second largest value is set to dimdModeVal1.
[0117] It should be noted that the derivation method of dimdModeVal0 or dimdModeVal1 is not limited to the histogram. For example, the angle mode selection unit 310463 may set the average value of modeValPn as dimdModeVal0 or dimdModeVal1.
[0118] As the third mode, the angle mode selection unit 310463 sets a predetermined mode (for example, intra prediction mode, transform mode) to dimdModeVal2. Here, dimdModeVal2=0 (planar), but the present invention is not limited thereto. Other modes may be adaptively set, and the third mode may not be used.
[0119] The angle mode selection unit 310463 can also derive weights corresponding to representative values of each angle mode for the intra-frame prediction in the temporary prediction image generation unit 310464 described later. For example, the weight w2 of the third mode is set to 21, and the remaining parts are respectively allocated as weights w0 and w1 according to the ratio of the frequencies of the first and second modes in the histogram. It should be noted that the total weight is set to 64. The derivation of weights is not limited to this, and the weights w0, w1, and w2 of the first, second, and third modes can also be adaptively changed. For example, w2 can also be increased or decreased according to the number or frequency of the first mode or the second mode, or their ratio. It should be noted that the angle mode selection unit sets the corresponding weight value to 0 for any of the first to third modes when the mode is not used.
[0120] The above-mentioned angle mode selection unit 310463 has an angle mode selection unit that selects a representative value of an angle mode from multiple angle modes derived from pixels in the gradient-derived object image, thereby being able to derive an angle mode with higher accuracy. As described above, the angle mode selection unit 310463 selects an angle mode (a representative value of the angle mode) estimated based on the gradient, and outputs it together with the weight corresponding to each angle mode.
[0121] According to the above-mentioned angle mode derivation device 310465 (gradient derivation unit 310461, angle mode derivation unit 310462 or / and angle mode selection unit 310463), a table is used to derive the angle equivalent to arctan from the gradient ratio iRatio, thereby having a simple effect.
[0122] The configuration of the gradient derivation unit, the angle mode derivation unit, and the angle mode selection unit can also be used to derive information other than the intra-frame prediction mode. For example, if the angle mode selection unit uses the directionality of the texture pattern derived by the gradient derivation unit and the angle mode derivation unit to select a transformation matrix for the residual, a matrix suitable for the transformation of the residual in a region having the directionality can be selected, and improvement in coding efficiency can be expected. (4) Temporary prediction image generation unit
[0123] The temporary prediction image generation unit 310464 generates a prediction image (temporary prediction image) using one or more angle mode representative values (intra-frame prediction modes) that are input. When there is one intra-frame prediction mode, an intra-frame prediction image based on the prediction mode is generated and output as a temporary prediction image q[x][y]. When there are multiple intra-frame prediction modes, prediction images (pred0, pred1, pred2) based on each prediction mode are generated. Multiple prediction images are synthesized using corresponding weights (w0, w1, w2) and output as a temporary prediction image q[x][y]. The temporary prediction image q[x][y] is derived as shown below. q[x][y]=(w0*pred0[x][y]+w1*pred1[x][y]+w2*pred2[x][y])>>6 However, when the frequency of the second mode is 0 or it is not a directional prediction mode (DC mode, etc.), the predicted image pred0 based on the first prediction mode is set as a temporary predicted image.
[0124] The inverse quantization / inverse transformation unit 311 inversely quantizes the quantized transformation coefficients input from the entropy decoding unit 301 to obtain transformation coefficients. The quantized transformation coefficients are obtained by performing DCT (Discret e Cosin e Transfor m , Discrete Cosine Transform), DST (Discret e Sin e Transfor mThe inverse quantization / inverse transformation unit 311 performs an inverse frequency transformation such as inverse DCT and inverse DST on the transformation coefficients to calculate the prediction error. The inverse quantization / inverse transformation unit 311 outputs the prediction error to the addition unit 312.
[0125] Fig.13 1 is a block diagram showing the structure of the inverse quantization / inverse transformation unit 311 of the present embodiment. The inverse quantization / inverse transformation unit 311 is composed of a scaling unit 31111, an inverse non-separable transformation unit 31121, and an inverse separate transformation unit 31123. It should be noted that the transform coefficients decoded from the encoded data may be transformed using the angle mode derived by the angle mode derivation device 310465.
[0126] The inverse quantization / inverse transformation unit 311 performs scaling (inverse quantization) on the quantized transformation coefficient qd[][] input from the entropy decoding unit 301 through the scaling unit 31111 to obtain a transformation coefficient d[][]. The quantized transformation coefficient qd[][] is obtained by performing DCT (Discrete Cosine Transform) on the prediction error in the encoding process. m , Discrete Cosine Transform), DST (Discret e Sin e Transfor m , discrete sine transform) and quantized coefficients or coefficients obtained by further performing non-separable transform on the transformed coefficients. When the non-separable transform flag lfnst_idx! = 0, the inverse quantization / inverse transform unit 311 performs inverse transform through the inverse non-separable transform unit 31121. Furthermore, inverse frequency transform such as inverse DCT and inverse DST is performed on the transform coefficients to calculate the prediction error. In addition, in lfnst_idx! x When ==0, the inverse non-separable transform unit 31121 does not process the transform coefficients scaled by the scaler 31111, but performs inverse frequency transform such as inverse DCT and inverse DST to calculate the prediction error. The inverse quantization / inverse transform unit 311 outputs the prediction error to the adder 312.
[0127] The inverse non-separable transform unit 31121 rearranges a part of the transform coefficients d[][] of the TU into a one-dimensional array u[]. Specifically, the inverse non-separable transform unit 31121 refers to the transform coefficients x=0..nonZeroSize-1 and derives u[] from the two-dimensional transform coefficients d[][] of the object TU indicated by the region RU. xC and yC are positions on the TU, which are derived from the array DiagScanOrder indicating the scan order and the position x of the array u[]. xC=DiagScan0rder[log2StSize][log2StSize][x][0] yC=DiagScan0rder[log2StSize][log2StSize][x][1] u[x]=d[xC][yC]
[0128] The transformation matrix selection unit of the inverse non-separable transformation unit 31121 can obtain the angle mode modeVal (for example, dimdModeVal0) derived by the angle mode derivation device 310465 by the following steps: x Select secTransMatri in 0 x One of 4. secTransMatrix[][]=secTransMatrix0(dimdModeVal0<10) secTransMatrix[][] = secTransMatrix1 (except for the above, dimdModeVal0<26) secTransMatrix[][] = secTransMatrix2 (except for the above, dimdModeVal0<42) secTransMatrix[][] = secTransMatrix3 (except for the above, dimdModeVal0<58) secTransMatrix[][] = secTransMatrix4 (other than the above)
[0129] In the above, the angle modes are classified using the specified domain values 10, 26, 42, and 58, and the transformation matrix is assigned according to the classification. It is also possible to derive the direct transformation matrix according to the angle mode of the specified transformation matrix instead of the transformation matrix. It should be noted that the threshold used for the classification of the angle mode is not limited to the above. In addition, the number of transformation matrices such as values 0-4 can also be used as the value of the LUT, and the derivation is performed as shown below. secTransMatrix[][]=secTransMatrix0(dimdModeVal0==0) secTransMatrix[][]=secTransMatrix1(dimdModeVal0==1) secTransMatrix[][]=secTransMatrix2(dimdModeVal0==2) secTransMatrix[][]=secTransMatrix3(dimdModeVal0==3) secTransMatrix[][]=secTransMatrix4(dimdModeVal0==4)
[0130] The inverse non-separable transformation unit 31121 transforms u[] of length nonZeroSize using the transformation matrix secTransMatrix[][], and derives the coefficients v[] of a one-dimensional array of length nStOutSize as output. v[i]=Clip3(CoeffMin, CoeffMax, ∑(secTransMatrix[i][j]*u[j]+64)>>7)
[0131] Here, Σ is the sum up to j=0..nonZeroSize-1. Also, the process is performed for i=..nStSize-1. CoeffMin and CoeffMax represent the range of the value of the transform coefficient.
[0132] The inverse non-separable transform unit 31121 re-arranges the coefficients v[] of the transformed one-dimensional array at predetermined positions in the TU (d[][]). Specifically, the following processing is performed on x=0..nStSize-1 and y=0..nStSize-1.
[0133] According to the above, the transformation coefficients are transformed according to the angle pattern derived from the pixels of the adjacent image by the angle pattern derivation device 310465 (gradient derivation unit 310461, angle pattern derivation unit 310462, angle pattern selection unit 310463), thereby achieving the effect of improving efficiency.
[0134] The adding unit 312 adds the predicted image of the block input from the predicted image generating unit 308 and the prediction error input from the inverse quantization / inverse transform unit 311 for each pixel to generate a decoded image of the block. The adding unit 312 stores the decoded image of the block in the reference picture memory 306 and outputs it to the loop filter 305. (Configuration of Moving Image Coding Device)
[0135] Next, the configuration of the moving picture encoding device 11 according to this embodiment will be described. Fig.111 is a block diagram showing the structure of the video encoding device 11 of the present embodiment. The video encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a transformation / quantization unit 103, an inverse quantization / inverse transformation unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference picture storage unit, frame memory) 109, a coding parameter determination unit 110, a parameter coding unit 111, and an entropy coding unit 104.
[0136] The predicted image generation unit 101 generates a predicted image for each CU which is a region obtained by dividing each picture of the image T. The predicted image generation unit 101 performs the same operation as the predicted image generation unit 308 described above, and the description thereof is omitted here.
[0137] The subtraction unit 102 generates a prediction error by subtracting the pixel value of the predicted image of the block input from the predicted image generation unit 101 from the pixel value of the image T. The subtraction unit 102 outputs the prediction error to the transformation / quantization unit 103 .
[0138] The transform / quantization unit 103 calculates transform coefficients by frequency transforming the prediction error input from the subtraction unit 102 , and derives quantized transform coefficients by quantization. The transform / quantization unit 103 outputs the quantized transform coefficients to the entropy coding unit 104 and the inverse quantization / inverse transform unit 105 .
[0139] The inverse quantization / inverse transformation unit 105 and the inverse quantization / inverse transformation unit 311 ( Figure 4 ) is the same as that of FIG. 106, and its description is omitted. The calculated prediction error is output to the addition unit 106.
[0140] The entropy coding unit 104 receives the quantized transform coefficients from the transform / quantization unit 103 and the coding parameters from the parameter coding unit 111. The entropy coding unit 104 performs entropy coding on the partition information, the prediction parameters, the quantized transform coefficients, etc., to generate and output a coded stream Te.
[0141] The parameter coding unit 111 includes a header coding unit 1110 (not shown), a CT information coding unit 1111 , a CU coding unit 1112 (prediction mode coding unit), an inter prediction parameter coding unit 112 , and an intra prediction parameter coding unit 113 . The CU coding unit 1112 further includes a TU coding unit 1114 . (Configuration of Intra-frame Prediction Parameter Coding Unit 113)
[0142] The intra prediction parameter encoding unit 113 encodes the IntraPredMode and the like input from the encoding parameter determination unit 110. The intra prediction parameter encoding unit 113 includes the same configuration as that of the intra prediction parameter decoding unit 304 for deriving the intra prediction parameter.
[0143] The adder 106 generates a decoded image by adding pixel values of the block prediction image input from the prediction image generator 101 and the prediction error input from the inverse quantization / inverse transform unit 105 for each pixel. The adder 106 stores the generated decoded image in the reference picture memory 109.
[0144] The loop filter 107 applies a deblocking filter, SAO, and ALF to the decoded image generated by the adding unit 106. It should be noted that the loop filter 107 does not necessarily include the above three filters, and may include only a deblocking filter, for example.
[0145] The prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 in a predetermined position for each target picture and CU.
[0146] The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each target picture and CU.
[0147] The coding parameter determination unit 110 selects one of a plurality of sets of coding parameters. The coding parameters refer to the QT, BT or TT partition information, prediction parameters or parameters generated in association with them as the coding target. The predicted image generation unit 101 generates a predicted image using these coding parameters.
[0148] The coding parameter determination unit 110 calculates the RD cost value indicating the size of the information amount and the coding error for each of the plurality of sets. The coding parameter determination unit 110 selects the set of coding parameters with the smallest calculated cost value. Thus, the entropy coding unit 104 outputs the selected set of coding parameters as the coding stream Te. The coding parameter determination unit 110 stores the determined coding parameters in the prediction parameter memory 108.
[0149] It should be noted that a part of the moving image encoding device 11 and the moving image decoding device 31 in the above-mentioned embodiment can be implemented by a computer, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse transformation unit 311, the addition unit 312, the predicted image generation unit 101, the subtraction unit 102, the transformation / quantization unit 103, the entropy encoding unit 104, the inverse quantization / inverse transformation unit 105, the loop filter 107, the encoding parameter determination unit 110 and the parameter encoding unit 111. In this case, the program for realizing the control function can be recorded in a computer-readable recording medium, and the computer system can read the program recorded in the recording medium and execute it. It should be noted that the "computer system" mentioned here refers to a computer system built into any one of the moving image encoding device 11 and the moving image decoding device 31, and a computer system including hardware such as an OS and peripheral devices is used. In addition, "computer-readable recording medium" refers to removable media such as floppy disks, magneto-optical disks, ROMs, CD-ROMs, and storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording medium" may include: a medium that dynamically stores a program for a short period of time, such as a communication line in the case where a program is sent via a network such as the Internet or a communication line such as a telephone line; a medium that stores a program for a fixed period of time, such as a volatile memory inside a computer system that serves as a server or client in this case. In addition, the above program may be a program for realizing a part of the above functions, and may also be a program that can realize the above functions by combining with a program already recorded in a computer system.
[0150] In addition, part or all of the motion image encoding device 11 and the motion image decoding device 31 in the above-mentioned embodiment may be implemented as an integrated circuit such as LSI (Large Scale Integration). Each functional block of the motion image encoding device 11 and the motion image decoding device 31 may be individually processor-based, or part or all may be integrated to form a processor. In addition, the method of integrated circuitization is not limited to LSI, and it may be implemented by a dedicated circuit or a general-purpose processor. In addition, when a technology for integrated circuitization that replaces LSI emerges with the advancement of semiconductor technology, an integrated circuit based on the technology may also be used.
[0151] As mentioned above, one embodiment of the present invention has been described in detail with reference to the drawings, but the specific configuration is not limited to the above embodiment, and various design changes and the like can be made within the scope not departing from the gist of the present invention.
[0152] Furthermore, a moving picture decoding device, a moving picture encoding device, and an angle mode derivation device according to one embodiment of the present invention can also be represented as follows. A motion image decoding device and an angle mode derivation device, comprising: a gradient derivation unit, which derives the gradient of pixel values in blocks adjacent to the top and left of an object block; an angle mode derivation unit, which derives an angle mode corresponding to the gradient; an angle mode selection unit, which selects the derived angle mode; and a temporary prediction image derivation unit, which derives a temporary prediction image based on the angle mode. The motion image decoding device and the angle mode derivation device are characterized in that the derivation is performed based on a table including angle modes corresponding to the above-mentioned gradients. Furthermore, the motion picture decoding device and the angle mode derivation device are characterized in that the table includes differential information from a reference direction of an intra-direction prediction mode corresponding to a gradient. Furthermore, the motion picture decoding device and the angle mode derivation device are characterized in that the differential information is a positive integer. Furthermore, the motion picture decoding device and the angle mode derivation device are characterized in that the angle mode selection unit performs selection using an average value of the derived angle modes. In addition, a motion image encoding device and an angle mode derivation device include: a gradient derivation unit, which derives the gradient of pixel values in blocks adjacent to the top and left of the object block; an angle mode derivation unit, which derives the angle mode corresponding to the gradient; an angle mode selection unit, which selects the derived angle mode; and a temporary prediction image derivation unit, which derives a temporary prediction image based on the angle mode. The motion image encoding device and the angle mode derivation device are characterized in that the derivation is performed based on a table including the angle mode corresponding to the above-mentioned gradient. Industrial Applicability
[0153] The embodiments of the present invention can be preferably applied to a motion picture decoding device that decodes coded data obtained by encoding image data, and a motion picture encoding device that generates coded data obtained by encoding image data. In addition, it can be appropriately applied to the data structure of the coded data generated by the motion picture encoding device and referred to by the motion picture decoding device. Description of Reference Numerals 31: Image decoding device 301: Entropy decoding unit 302: Parameter decoding unit 303: Inter-frame prediction parameter decoding unit 304: Intra-frame prediction parameter decoding unit 308: Prediction image generation unit 309: Inter-frame prediction image generation unit 310: Intra-frame prediction image generation unit 31046: DIMD Forecast Department 310465: Angle mode derivation device 310461: Gradient derivation department 310462: Angle mode derivation 310463: Angle mode selection unit 310464: Temporary prediction image generation unit 311: Inverse quantization / inverse transformation unit 312: Addition Department 11: Image coding device 101: Prediction image generation unit 102: Subtraction Department 103: Transformation / Quantization Unit 104: Entropy coding unit 105: Inverse quantization / inverse transformation unit 107: Loop filter 110: Coding parameter determination unit 111: Parameter encoding unit 112: Inter-frame prediction parameter encoding unit 113: Intra-frame prediction parameter encoding unit 1110: Header encoding unit 1111: CT Information Coding Department 1112: CU encoding unit (prediction mode encoding unit) 1114: TU encoding unit
Claims
1. An angle mode derivation device, characterized in that: The angle mode derivation device comprises: a gradient derivation unit that derives a first gradient that is a gradient of pixel values included in the gradient derivation target image; and The angle pattern derivation unit derives an angle pattern using the first gradient, a second gradient different from the first gradient, and two predetermined tables.
2. The angle mode derivation device according to claim 1, characterized in that: A first value is derived with reference to a first table using a value derived using a logarithmic value-based shift of a gradient in a first pixel, and an angle pattern is derived with reference to a second table using the first value and an index obtained by the logarithmic value-based shift.
3. The angle mode derivation device according to claim 2, characterized in that: A first value is derived using a value derived using a logarithmic shift of the first gradient in the second pixel, and an angle mode is derived using a second table using a product of the first value and the second gradient and an index obtained by the logarithmic shift of the first gradient.
4. The angle mode derivation device according to any one of claims 1 to 3, characterized in that: An angle mode selection unit is provided, which selects an angle mode representative value from a plurality of angle modes derived from pixels in a gradient derivation target image.
5. The angle mode derivation device according to claim 1, characterized in that: The elements of the table are integers greater than or equal to 0.
6. The angle mode derivation device according to claim 5, characterized in that: The elements of the table are integers greater than or equal to 0, and are in ascending order, and the number of elements having the same value increases except for the last element.
7. The angle mode derivation device according to claim 4, characterized in that: The angle pattern selection unit selects the angle pattern representative value using an average value of the angle patterns.
8. A moving picture decoding device, characterized in that: The video decoding device comprises: The angle mode derivation device as described in claim 1 above; and The predicted image derivation unit uses the area adjacent to the upper and left sides of the target block as a gradient derivation target image, and derives a predicted image based on the intra-frame prediction mode derived by adding the angle mode derived from the table to the reference mode.
9. The moving picture decoding device according to claim 8, characterized in that: An inverse transform unit is provided, which performs an inverse transform of transform coefficients using a transform matrix derived based on the angle pattern.
10. A motion picture encoding device, characterized in that: The video encoding device comprises: The angle mode derivation device as described in claim 1 above; and The predicted image derivation unit uses the area adjacent to the upper and left sides of the target block as a gradient derivation target image, and derives a predicted image based on the intra-frame prediction mode derived by adding the angle mode derived from the table to the reference mode.
Citation Information
Patent Citations
gaming machines
JP2022090076A
Projector
JP2022096934A