Image decoding device and image encoding device
The system optimizes template-based intra-mode derivation in video encoding by reducing computational complexity through efficient pixel value management and reference sample derivation, maintaining predictive image accuracy.
Patent Information
- Application Number
- JP2022153696
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-07-13
- Estimated Expiration
- 2042-09-27
Smart Images

Figure 0007888420000001 
Figure 0007888420000002 
Figure 0007888420000003
Abstract
Description
Technical Field
[0005] ,
[0004] , , , , ,
[0003] ,
[0006]
[0001] Embodiments of the present invention relate to an image decoding apparatus and an image encoding apparatus.
Background Art
[0002] In order to efficiently transmit or record a moving image, a moving image encoding apparatus that generates encoded data by encoding the moving image, and a moving image decoding apparatus that generates a decoded image by decoding the encoded data are used.
[0003] Specific moving image encoding methods include, for example, methods proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
[0004] In such a moving image encoding method, an image (picture) constituting the moving image is managed by a hierarchical structure composed of a slice obtained by dividing the image, a coding tree unit (CTU: Coding Tree Unit) obtained by dividing the slice, a coding unit (sometimes called a coding unit (CU)) obtained by dividing the coding tree unit, and a transform unit (TU: Transform Unit) obtained by dividing the coding unit, and is encoded / decoded for each CU.
[0005] Also, in such a moving image encoding method, usually, a predicted image is generated based on a local decoded image obtained by encoding / decoding an input image, and a prediction error (sometimes called a "difference image" or "residual image") obtained by subtracting the predicted image from the input image (original image) is encoded. Methods for generating the predicted image include inter-picture prediction (inter prediction) and intra-picture prediction (intra prediction).
[0006] Furthermore, Non-Patent Document 1 is cited as a recent technique for video encoding and decoding. Non-Patent Document 1 discloses a template-based intra-mode derivation (TIMD) prediction method in which a decoder generates a predicted image by deriving an intra-directional predicted mode number using pixels in adjacent regions. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] K. Cao, N. Hu, V. Seregin, M. Karczewicz, Y. Wang, K. Zhang, L. Zhang, “EE2-related: Fusion for template-based intra mode derivation”, JVET-W0123 [Overview of the project] [Problems that the invention aims to solve]
[0008] In template-based intra-mode derivation, such as in Non-Patent Document 1, a template prediction image is generated from adjacent images (template images) of the target block for intra-prediction mode candidates, using images of the template reference region near the target block. Then, the intra-prediction mode candidate with the smallest cost for both the template image and the template prediction image is selected as the intra-prediction mode for the target block. However, this method requires the derivation of template prediction images and cost calculations for multiple intra-prediction mode candidates, which presents a significant computational challenge.
[0009] The present invention aims to reduce the complexity of template-based intra-mode derivation while maintaining the accuracy of predictive images. [Means for solving the problem]
[0010] The system comprises a parameter decoding unit that decodes a template-based intra-prediction flag from encoded data; a reference sample derivation unit that derives a reference sample using an image of a template reference region near the target block; an intra-prediction image generation unit that generates a template prediction image for a predetermined intra-prediction mode candidate using the reference sample; a template cost derivation unit that derives a cost from the template prediction image and a template image which is an image near the target block; and an intra-prediction mode selection unit that selects an intra-prediction mode for the target block based on the cost, wherein when the prediction flag has a predetermined value, the system generates a prediction image for the target block using the selected intra-prediction mode.
[0011] The above-mentioned reference sample derivation unit derives the pixel value of the reference sample by right-shifting the pixel value of the template reference region near the target block according to the bit depth of the image, and the above-mentioned cost derivation unit derives the pixel value of the template image by right-shifting the pixel value of the surrounding pixel value of the target block according to the bit depth of the image.
[0012] The intra-predictive image generation unit described above is characterized in that, when generating the template predictive image, it refers to MTAP reference samples, and when generating the predictive image of the target block, it refers to NTAP reference samples, with MTAP being smaller than NTAP.
[0013] The system comprises a parameter encoding unit that encodes a template-based intra-prediction flag from encoded data; a reference sample derivation unit that derives a reference sample using an image of a template reference region near the target block; an intra-prediction image generation unit that generates a template prediction image for a predetermined intra-prediction mode candidate using the reference sample; a template cost derivation unit that derives a cost from the template prediction image and a template image which is an image near the target block; and an intra-prediction mode selection unit that selects an intra-prediction mode for the target block based on the cost, wherein when the prediction flag has a predetermined value, the system generates a prediction image for the target block using the selected intra-prediction mode.
[0014] The above-mentioned reference sample derivation unit derives the pixel value of the reference sample by right-shifting the pixel value of the template reference region near the target block according to the bit depth of the image, and the above-mentioned cost derivation unit derives the pixel value of the template image by right-shifting the pixel value of the surrounding pixel value of the target block according to the bit depth of the image.
[0015] The intra-predictive image generation unit described above is characterized in that, when generating the template predictive image, it refers to MTAP reference samples, and when generating the predictive image of the target block, it refers to NTAP reference samples, with MTAP being smaller than NTAP. [Effects of the Invention]
[0016] According to one aspect of the present invention, the complexity of template-based intra-mode derivation can be reduced while maintaining the accuracy of the predicted image. [Brief explanation of the drawing]
[0017] [Figure 1] This is a schematic diagram showing the configuration of the image transmission system according to this embodiment. [Figure 2] This diagram shows the hierarchical structure of the encoded stream data. [Figure 3]It is a schematic diagram showing the types (mode numbers) of intra prediction modes. [Figure 4] It is a schematic diagram showing the configuration of a moving image decoding device. [Figure 5] It is a diagram showing the configuration of an intra prediction image generation unit. [Figure 6] It is a diagram showing the relationship between a target block, a template area, and a template reference area. [Figure 7] It is a diagram showing the details of a TIMD prediction unit. [Figure 8] It is an example of syntax regarding TIMD prediction. [Figure 9] It is a diagram showing the configuration of a TIMD prediction unit that realizes the derivation of a template area and a template reference area for limiting the bit depth of an image. [Figure 10] It is a diagram showing the switching of the number of filter taps in the generation of a template prediction image during intra prediction mode search of TIMD prediction. [Figure 11] It is a block diagram showing the configuration of a moving image encoding device. [[ID=2�]]
Mode for Carrying Out the Invention
[0018] (First Embodiment) Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0019] FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to the present embodiment.
[0020] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding an image to be encoded and decodes the transmitted encoded stream to display an image. The image transmission system 1 includes 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.
[0021] An image T is input to the moving image encoding device 11.
[0022] Network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31. Network 21 is the Internet, a wide area network (WAN), a local area network (LAN), or a combination thereof. Network 21 is not necessarily limited to a bidirectional communication network; it may also be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting or satellite broadcasting. Furthermore, network 21 may be replaced by a storage medium that records the encoded stream Te, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blu-ray Disc: registered trademark).
[0023] The video decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td.
[0024] The video display device 41 displays all or part of one or more decoded images Td generated by the video decoding device 31. The video display device 41 includes a display device such as a liquid crystal display or an organic EL (electro-luminescence) display. Examples of display forms include stationary, mobile, and HMD (head-mounted display). Furthermore, if the video decoding device 31 has high processing power, it displays high-quality images, and if it has lower processing power, it displays images that do not require high processing power or display power.
[0025] <operators> The operators used in this specification are listed below.
[0026] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, ^ is a bitwise XOR, |= is an OR assignment operator, ! is logical negation (NOT), && is logical AND, and || is logical OR.
[0027] x?y:z is a ternary operator that takes y when x is true (non-zero) and z when x is false (0).
[0028] Clip3(a, b, c) is a function that clips c to a value between a and b. If c < a, it returns a; if c > b, it returns b; otherwise, it returns c (where a <= b).
[0029] Clip1Y(c) is an operator where in Clip3(a, b, c), a is set to 0 and b is set to (1 << BitDepthY) - 1. BitDepthY is the bit depth of luminance.
[0030] abs(a) is a function that returns the absolute value of a.
[0031] Int(a) is a function that returns the integer value of a.
[0032] Floor(a) is a function that returns the largest integer less than or equal to a.
[0033] Log2(a) is a function that returns the logarithm to the base 2 of a.
[0034] Ceil(a) is a function that returns the smallest integer greater than or equal to a.
[0035] a / d represents the division of a by d (truncating the fractional part).
[0036] Min(a, b) is a function that returns the smaller value of a and b.
[0037] <Structure of the encoded stream Te> Prior to the detailed description of the moving image encoding device 11 and the moving image decoding device 31 according to this embodiment, the data structure of the encoded stream Te generated by the moving image encoding device 11 and decoded by the moving image decoding device 31 will be described.
[0038] Figure 2 shows the hierarchical structure of data in the encoded stream Te. The encoded stream Te includes, exemplarily, a sequence and multiple pictures that make up the sequence. Figure 2 shows, respectively, the encoded video sequence that defines the sequence SEQ, the encoded picture that defines the picture PICT, the encoded slice that defines the slice S, the encoded slice data that defines the slice data, the encoded tree unit contained in the encoded slice data, and the encoded unit contained in the encoded tree unit.
[0039] (Encoded video sequence) In the encoded video sequence, a set of data that the video decoding device 31 references to decode the sequence SEQ to be processed is defined. As shown in the encoded video sequence in Figure 2, the sequence SEQ includes a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a picture (PICT), and supplemental enhancement information (SEI).
[0040] The Video Parameter Set (VPS) defines a set of encoding parameters common to multiple video layers in a video composed of multiple layers, as well as a set of encoding parameters associated with the multiple layers included in the video and with each individual layer.
[0041] The sequence parameter set (SPS) defines a set of encoding parameters that the video decoding device 31 references to decode the target sequence. For example, the width and height of the picture are defined. Multiple SPSs may exist. In that case, one of the multiple SPSs is selected from the PPS.
[0042] The Picture Parameter Set (PPS) defines a set of encoding parameters that the video decoding device 31 references to decode each picture in the target sequence. For example, it includes a reference value for the quantization width used for decoding the picture (pic_init_qp_minus26) and a flag indicating the application of weighted prediction (weighted_pred_flag). Multiple PPSs may exist. In that case, one of the multiple PPSs is selected for each picture in the target sequence.
[0043] (Encoded picture) The encoded picture defines the set of data that the video decoding device 31 references to decode the picture PICT to be processed. The picture PICT includes slices 0 to NS-1 (NS being the total number of slices included in the picture PICT), as shown in the encoded picture in Figure 2.
[0044] In the following, if it is not necessary to distinguish between slices 0 through NS-1, the code subscripts may be omitted. The same applies to other data included in the coded stream Te described below that have subscripts.
[0045] (Encoded slice) An encoded slice defines the set of data that the video decoding device 31 references to decode the slice S to be processed. As shown in the encoded slice in Figure 2, the slice includes a slice header and slice data.
[0046] The slice header contains a set of encoding parameters that the video decoding device 31 references to determine the decoding method for the target slice. The slice type specification information (slice_type), which specifies the slice type, is an example of the encoding parameters included in the slice header.
[0047] The slice types that can be specified by the slice type specification information include (1) I slices that use only intra prediction during encoding, (2) P slices that use unidirectional prediction or intra prediction during encoding, and (3) B slices that use unidirectional prediction, bidirectional prediction or intra prediction during encoding. Note that interpretation is not limited to single or bidirectional prediction, and prediction images may be generated using more reference pictures. Hereinafter, when referring to P slices and B slices, we mean slices that contain blocks on which interpretation can be used.
[0048] The slice header may also include a reference to the picture parameter set PPS (pic_parameter_set_id).
[0049] (Encoded slice data) The encoded slice data defines the set of data that the video decoding device 31 references to decode the slice data to be processed. The slice data includes a CTU, as shown in the encoded slice header of Figure 2. A CTU is a fixed-size (e.g., 64x64) block that makes up a slice, and is sometimes called a Largest Coding Unit (LCU).
[0050] (Code tree unit) The coding tree unit in Figure 2 defines the set of data that the video decoding device 31 references to decode the CTU to be processed. The CTU is divided into coding units CU, which are the basic units of coding processing, by recursive quad tree partitioning (QT), binary tree partitioning (BT), or ternary tree partitioning (TT). BT and TT partitioning together are called multi-tree partitioning (MT). The nodes of the tree structure obtained by recursive quad tree partitioning are called coding nodes. The intermediate nodes of quad trees, binary trees, and ternary trees are coding nodes, and the CTU itself is defined as the top-level coding node.
[0051] (Encoding Unit) As shown in the coding unit of Figure 2, a set of data that the video decoding device 31 references to decode the coding unit to be processed is defined. Specifically, the CU consists of a CU header CUH, prediction parameters, transformation parameters, quantization transformation coefficients, etc. The prediction mode, etc., is defined in the CU header.
[0052] Prediction processing can be performed at the CU (Unit) level or at the subCU level, which is a further division of the CU. If the size of the CU and the subCU are equal, there is one subCU within the CU. If the CU is larger than the size of the subCU, the CU is divided into subCUs. For example, if the CU is 8x8 and the subCU is 4x4, the CU will be divided into four subCUs, each consisting of two horizontal and two vertical divisions.
[0053] There are two types of predictions (prediction modes): intra-prediction and inter-prediction. Intra-prediction is prediction within the same picture, while inter-prediction refers to prediction processing performed between different pictures (for example, between display times or between layer images).
[0054] The transformation and quantization processes are performed in units of CUs, but the quantization transformation coefficients may be entropy-encoded in subblock units such as 4x4.
[0055] (Prediction parameters) The predicted image is derived from the prediction parameters associated with the block. These prediction parameters include intra-prediction and inter-prediction parameters.
[0056] The following describes the prediction parameters for intra-prediction. The intra-prediction parameters consist of the luminance prediction mode IntraPredModeY and the color difference prediction mode IntraPredModeC. Figure 3 is a schematic diagram showing the types (mode numbers) of intra-prediction modes. As shown in the figure, there are, for example, 67 types (0 to 66) of intra-prediction modes. For example, planar prediction (0), DC prediction (1), and angular prediction (2 to 66). In addition, linear model (LM) predictions such as cross-component linear model (CCLM) prediction and multi-mode linear model (MMLM) prediction may be used. Furthermore, an LM mode may be added for color difference.
[0057] (Configuration of the video decoding device) The configuration of the video decoding device 31 (Figure 4) according to this embodiment will be described below.
[0058] The video decoding device 31 includes an entropy decoding unit 301, a parameter decoding unit (predictive image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (predictive image generation device) 308, an inverse quantization / inverse transform unit 311, and an addition unit 312 and a prediction parameter derivation unit 320. Note that, in accordance with the video encoding device 11 described later, there is also a configuration in the video decoding device 31 that does not include the loop filter 305.
[0059] The parameter decoding unit 302 comprises a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit 3022 (prediction mode decoding unit), and the CU decoding unit 3022 further comprises a TU decoding unit 3024. These may be collectively referred to as a decoding module. The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS, and APS, and slice headers (slice information) from the encoded data. The CT information decoding unit 3021 decodes CT from the encoded data. The CU decoding unit 3022 decodes CU from the encoded data. The TU decoding unit 3024 decodes QP update information (quantization correction value) and quantization prediction error (residual_coding) from the encoded data if the TU contains a prediction error.
[0060] The TU decoding unit 3024 decodes the QP update information and quantization prediction error from the encoded data when the skip mode is not active (skip_mode==0). More specifically, when skip_mode==0, the TU decoding unit 3024 decodes the flag cu_cbp, which indicates whether or not the target block contains a quantization prediction error, and decodes the quantization prediction error if cu_cbp is 1. If cu_cbp does not exist in the encoded data, it is derived to be 0.
[0061] The predictive image generation unit 308 is configured to include an inter-predictive image generation unit 309 and an intra-predictive image generation unit 310.
[0062] The prediction parameter derivation unit 320 is configured to include an inter-prediction parameter derivation unit 303 and an intra-prediction parameter derivation unit 304.
[0063] Furthermore, while the following examples use CTU and CU as processing units, processing may be performed in sub-CU units, or the system may be reinterpreted as blocks (CTU and CU) and sub-CU as sub-blocks (sub-CU), and processing may be performed in block or sub-block units.
[0064] The entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from an external source to decode individual codes (syntax elements). Entropy coding includes CABAC (Context Adaptive Binary Arithmetic Coding), a method that uses a context (probability model) adaptively selected according to the type of syntax element and surrounding circumstances to encode syntax elements to a variable length, and a method that uses a predetermined table or calculation formula to encode syntax elements to a variable length. The entropy decoding unit 301 initializes all CABAC states at the beginning of a segment (tile, CTU row, slice). The entropy decoding unit 301 converts the syntax elements into a binary string and decodes each bit of the Bin String. When using a context, it derives a context index ctxInc for each bit of the syntax element, decodes the bits using the context, and updates the CABAC state of the context used. Bits that do not use context are decoded with equal probability (EP, bypass), and the ctxInc derivation and CABAC state are omitted.
[0065] The entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302. The control of which code to decode is performed based on the instructions of the parameter decoding unit 302.
[0066] (Configuration of the intra-prediction parameter derivation unit 304) The intra-prediction parameter derivation unit 304 decodes intra-prediction parameters, such as the intra-prediction mode, based on the code input from the entropy decoding unit 301, by referring to the prediction parameters stored in the prediction parameter memory 307. The intra-prediction parameter derivation unit 304 outputs the decoded intra-prediction parameters to the prediction image generation unit 308 and also stores them in the prediction parameter memory 307. The intra-prediction parameter derivation unit 304 may derive different intra-prediction modes based on luminance and color difference.
[0067] The intra-prediction parameter derivation unit 304 decodes the syntax elements related to intra-prediction as shown in Figure 8.
[0068] The loop filter 305 is a filter installed within the encoding loop that removes block distortion and ringing distortion, thereby improving image quality. The loop filter 305 applies filters such as a deblocking filter, sample-adaptive offset (SAO), and adaptive loop filter (ALF) to the decoded CU image generated by the summing unit 312.
[0069] The reference picture memory 306 stores the decoded image of the CU generated by the adder 312 at a predetermined location for each target picture and target CU.
[0070] The prediction parameter memory 307 stores prediction parameters at predetermined locations 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.
[0071] The prediction image generation unit 308 receives the prediction mode (predMode), prediction parameters, etc. The prediction image generation unit 308 also reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a block or subblock prediction image using the prediction mode indicated by the prediction mode (predMode), the prediction parameters, and the read reference picture (reference picture block). Here, a reference picture block is a collection of pixels on the reference picture (usually rectangular, hence called a block), and is the area referenced to generate the prediction image.
[0072] (Intra predictive image generation unit 310) When the prediction mode predMode indicates intra-prediction mode, the intra-prediction image generation unit 310 performs intra-prediction using the intra-prediction parameters input from the intra-prediction parameter derivation unit 304 and the reference pixels read from the reference picture memory 306.
[0073] Specifically, the intra-predictive image generation unit 310 reads adjacent blocks on the target picture that are within a predetermined range from the target block from the reference picture memory 306. The predetermined range consists of adjacent blocks to the left, upper left, top, and upper right of the target block, and the area referenced differs depending on the intra-predictive mode.
[0074] The intra-predictive image generation unit 310 generates a predicted image of the target block by referring to the read decoded pixel value and the prediction mode indicated by IntraPredMode. The intra-predictive image generation unit 310 outputs the generated predicted image of the block to the summing unit 312.
[0075] The generation of predicted images based on intra-prediction mode is described below. In planar prediction, DC prediction, and angular prediction, the decoded surrounding region adjacent to (nearby) the block to be predicted is set as the reference region R. Then, the predicted image is generated by extrapolating the pixels on the reference region R in a specific direction. For example, the reference region R may be set as an L-shaped region including the left and top (or even the top-left, top-right, and bottom-left) of the block to be predicted.
[0076] (Details of the predictive image generation unit) Next, the configuration of the intra predictive image generation unit 310 will be explained in detail using Figure 5. The intra predictive image generation unit 310 comprises a reference sample filter unit 3103 (second reference image setting unit), a prediction unit 3104, and a predictive image correction unit 3105 (predictive image correction unit, filter switching unit, weight coefficient changing unit).
[0077] The prediction unit 3104 generates a predicted image (provisional predicted image, uncorrected predicted image) of the block to be predicted based on each reference pixel (reference image) on the reference region R, the filtered reference image generated by applying the reference pixel filter (first filter), and the intra prediction mode, and outputs it to the predicted image correction unit 3105. The predicted image correction unit 3105 corrects the provisional predicted image according to the intra prediction mode, generates a predicted image (corrected predicted image), and outputs it.
[0078] The following describes the various components of the intra-predictive image generation unit 310.
[0079] (Reference sample filter section 3103) The reference sample filter unit 3103 derives reference samples s[x][y] for each position (x,y) on the reference region R by referring to the reference image. Furthermore, the reference sample filter unit 3103 applies a reference pixel filter (first filter) to the reference samples s[x][y] according to the intra-prediction mode to update the reference samples s[x][y] for each position (x,y) on the reference region R (deriving the filtered reference image s[x][y]). Specifically, a low-pass filter is applied to the reference image at position (x,y) and its surroundings to derive the filtered reference image. Note that it is not necessarily required to apply the low-pass filter to all intra-prediction modes; it may be applied to only some of the intra-prediction modes. In the reference sample filter unit 3103, the filter applied to the reference image on the reference region R is referred to as the "reference pixel filter (first filter)," whereas the filter used to correct the provisional predicted image in the predicted image correction unit 3105, described later, is referred to as the "position-dependent filter (second filter)."
[0080] (Configuration of prediction unit 3104) The prediction unit 3104 generates a provisional prediction image (provisional prediction pixel values, uncorrected prediction image) of the block to be predicted based on the intra prediction mode, the reference image, and the filtered reference pixel values, and outputs it to the prediction image correction unit 3105. The prediction unit 3104 internally includes a Planar prediction unit 31041, a DC prediction unit 31042, an Angular prediction unit 31043, an LM prediction unit 31044, an MIP (Matrix-based Intra Prediction) unit 31045, and a TIMD prediction unit 31047 (Template-based Intra Mode Derivation, TIMD). The prediction unit 3104 selects a specific prediction unit according to the intra prediction mode and inputs the reference image and the filtered reference image. The relationship between the intra prediction mode and the corresponding prediction unit is as follows. • Planar prediction • Planar prediction unit 31041 • DC prediction • DC prediction unit 31042 ·Angular prediction ····Angular prediction unit 31043 • LM prediction • LM prediction unit 31044 • Matrix Intranet Prediction • MIP Department 31045 ·TIMD prediction······TIMD prediction unit 3104
[0081] (Planar prediction) The Planar prediction unit 31041 generates a provisional prediction image by linearly adding reference samples s[x][y] according to the distance between the prediction target pixel position and the reference pixel position, and outputs it to the prediction image correction unit 3105. Note that s[][] may also be called p[][].
[0082] (DC prediction) The DC prediction unit 31042 derives a DC prediction value corresponding to the average value of the reference sample s[x][y], and outputs a provisional prediction image q[x][y] with the DC prediction value as the pixel value.
[0083] (Angular prediction) The Angular prediction unit 31043 derives a predicted image predSamples[][] (= provisional predicted image q[][]) using the reference sample s[x][y] of the prediction direction (reference direction) indicated by the intra prediction mode, and outputs it to the predicted image correction unit 3105. If IntraPredMode >= DIR ref[x] = s[-1-refIdx+x][-1-refIdx] (x=0..bW+refIdx+1) Furthermore, for x = 0..bW-1, y = 0..bH-1, perform the following: iIdx = (((y+1+refIdx) * intraPredAngle) >> 5) + refIdx iFact = ((y + 1 + refIdx) * intraPredAngle) & 31 predSamples[x][y] = Clip1(((Σ(fT[i]*ref[x+iIdx+i])) + 32) >> 6) Otherwise (IntraPredMode < DIR) ref[x] = s[-1-refIdx][-1-refIdx+x] (x=0..bH+refIdx+1) Furthermore, for x = 0..bW-1, y = 0..bH-1, perform the following: iIdx = (((x+1+refIdx) * intraPredAngle) >> 5) + refIdx iFact = ((x + 1 + refIdx) * intraPredAngle) & 31 predSamples[x][y] = Clip1(((Σ(fT[i]*ref[y+iIdx+i])) + 32) >> 6) DIR and refIdx are predetermined constants, for example, DIR=34, 66, etc. refIdx=0, 1, 2, etc. In the case of normal angular prediction, the value of refIdx may be set by decoding the syntax of the encoded data. In the case of prediction image generation for TIMD prediction described later, refIdx may be fixed at 0. Also, when deriving a template prediction image, refIdx=2 or 4 may be used.
[0084] (LM prediction) The LM prediction unit 31044 predicts the pixel values of color difference based on the pixel values of brightness. Specifically, it is a method that generates a predicted image of the color difference (Cb, Cr) using a linear model based on the decoded brightness image. One type of LM prediction is CCLM (Cross-Component Linear Model) prediction. CCLM prediction is a prediction method that uses a linear model to predict the color difference from brightness for each block.
[0085] (Matrix intra prediction) The MIP unit 31045 generates a provisional predicted image q[x][y] by performing a sum-of-products operation on the reference sample s[x][y] derived from the adjacent region and the weight matrix, and outputs it to the predicted image correction unit 3105.
[0086] (TIMD forecast) The TIMD prediction unit 31047 is a prediction method that generates a prediction image using an intra-prediction mode that is not explicitly signaled (also called a template-based intra-mode). The intra-prediction parameter derivation unit 304 first generates a template prediction image of the template image, which is the adjacent region of the target block from which intra-prediction mode candidates are derived. Next, it generates template prediction images for multiple intra-prediction mode candidates using images of the reference region (template reference region) near the target block. Then, it selects the intra-prediction mode candidate used to derive the template prediction image that minimizes the cost (e.g., sum of absolute differences) between the template image and the template prediction image as the TIMD intra-prediction mode for the target block. The TIMD prediction unit 31047 generates a prediction image (provisional prediction image) using this TIMD intra-prediction mode. Details will be described later.
[0087] (Configuration of the predictive image correction unit 3105) The prediction image correction unit 3105 corrects the provisional prediction image output from the prediction unit 3104 according to the intra prediction mode. Specifically, for each pixel of the provisional prediction image, the prediction image correction unit 3105 derives a position-dependent weight coefficient according to the reference region R and the position of the target prediction pixel. Then, by weighted addition (weighted average) of the reference sample s[][] and the provisional prediction image q[x][y], it derives a corrected prediction image (corrected prediction image) Pred[][]. Note that in some intra prediction modes, the prediction image correction unit 3105 may set the provisional prediction image q[x][y] as the prediction image without correction.
[0088] (Example 1) Figure 8 shows an example of the syntax of encoded data related to TIMD. The parameter decoding unit 302 decodes the template-based intra prediction flag timd_flag from the encoded data, indicating whether TIMD is used for each block. If timd_flag is 1, the parameter decoding unit 302 does not need to decode some syntax elements related to the intra prediction mode from the encoded data. If timd_flag is 0, it decodes intra_luma_mpm_flag. intra_luma_mpm_flag is a flag indicating whether the intra prediction mode is derived from the prediction candidate list candModeList (Most Probable Mode (MPM) list). If intra_luma_mpm_flag is 1, it decodes intra_luma_not_planar_flag and intra_luma_mpm_idx. If intra_luma_mpm_flag is 0, it decodes intra_luma_mpm_reminder. `intra_not_planar_flag` is a flag indicating whether or not to perform planar prediction. `intra_luma_mpm_idx` is the index that specifies the prediction candidate in the MPM list `candModeList[]`. `intra_luma_mpm_reminder` is the index that selects a prediction candidate from candidates outside the MPM list.
[0089] For example, let the top-left coordinates of the target block be (xC, yC), the block width be bW, and the block height be bH. The intraPredMode of block A, which is adjacent to the left of the target block, is intraPredModeA, and the intraPredMode of block B, which is adjacent to the top of the target block, is intraPredModeB. The following can be used to derive the values: Block A (hereinafter A) is a block containing coordinates (xC-1, yC+bH-1). Block B (hereinafter B) is a block containing coordinates (xC+bW-1, yC-1).
[0090] candModePredModeA = (A is not available || A is not MODE_INTRA) ? INTRA_PLANAR : intraPredModeA candModePredModeB = (B is not available || B is not MODE_INTRA || B's position is above the upper CTU boundary of the target block) ? INTRA_PLANAR : intraPredModeB Furthermore, the boundary above the CTU can be determined by checking whether yC-1 < ((yC >> CtbLog2SizeY ) << CtbLog2SizeY) is true or not. Here, CtbLog2SizeY = Log2 (CTU size). Alternatively, the syntax element sps_log2_ctu_size_minus5 in the encoded data can be decoded and CtbLog2SizeY = sps_log2_ctu_size_minus5 + 5. Alternatively, the value related to candModePredModeX can be derived by setting X = A or B.
[0091] candModeList[0] = candIntraPredModeA candModeList[1] = candIntraPredModeB minAB = Min(candIntraPredModeA, candIntraPredModeB) candModeList[2] = 2 + ((minAB + 61) % 64) candModeList[3] = 2 + ((minAB - 1) % 64) candModeList[4] = 2 + ((minAB + 60) % 64) If timd_flag is 1, the TIMD prediction unit 31047 generates a template prediction image for intra prediction mode candidates using an image of the template reference region near the target block, and selects an intra prediction mode suitable as the prediction image for the template image of the target block.
[0092] Figure 6 shows the template region RT and the template reference region (template reference sample region) RTRS, which are referenced in TIMD prediction. The template region is the region of the template image. The template reference image region is the region referenced when generating the template prediction image, which is the predicted image of the template image.
[0093] Figure 7 shows the configuration of the TIMD prediction unit 31047 in this embodiment. The TIMD prediction unit 31047 consists of a reference sample derivation unit 4701, a template derivation unit 4702, an intra-prediction image derivation unit 4703, an intra-prediction mode candidate derivation unit 4711, a template prediction image generation unit 4712, a template cost derivation unit 4713, and an intra-prediction mode selection unit 4714. The intra-prediction mode candidate derivation unit 4711, the template prediction image generation unit 4712, and the template cost derivation unit 4713 may be collectively referred to as the template intra-prediction mode derivation device 4710.
[0094] The intra-prediction mode candidate derivation unit 4711 derives a list of intra-prediction mode candidates, timdModeList[], from the intra-prediction modes of the blocks adjacent to the target block. For example, an MPM list, candModeList[], may be used as timdModeList.
[0095] timdModeList[i] = candModeList[i] (i=0..number of elements in candModeList-1) The template derivation unit 4702 derives the template image tempSamples for the target block. As shown in Figure 6, it may also be derived from the template region RT of the L-shaped, 1-pixel wide pre-decoded pixels recSamples adjacent to the target block.
[0096] tempSamples[x+i][y+j] = recSamples[xC+i][yC+j] (i=-1..bW-1, j=-1), (i=-1, j=-1..bH-1) The region on recSamples used to derive tempSamples is called the template region RT, and is represented by a set of coordinates (i, j). That is, RT = {{i=-1..bW-1, j=-1}, {i=-1, j=-1..bH-1}}. Alternatively, instead of using tempSamples, the sequence of decoded images corresponding to the template region, recSamples, may be used as the template image (in this case, the region where tempSamples is located is called the template region). Alternatively, the template region may be a 2-pixel wide, L-shaped set of pre-decoded pixels adjacent to the target block.
[0097] tempSamples[x+i][y+j] = recSamples[xC+i][yC+j] (i=-2..bW-1, j=-2..-1), (i=-2..-1, j=-2..bH-1) The reference sample derivation unit 4701 derives the reference sample refUnit from the template reference area RTRS. Alternatively, the operation of the reference sample derivation unit 4701 may be performed by the reference sample filter unit 3103.
[0098] refUnit[x][y] = recSamples[xNbCmp+x][yNbComp+y] Here, xNbCmp=xC and yNbCmp=yC, and the ranges x=-1-refIdxW, y=-1-refIdxH..refH-1 and x=-refIdxW..refW-1, y=-1-refIdxH. Here, refIdxW and refIdxH are the distances from the target block boundary of the template reference region. refIdxW = refIdxH can be set to 2 or 4, or they can be changed depending on the block size.
[0099] refIdxW = refIdxH = (bW >= 8) && (bH >= 8) ? 4 : 2 Here, refW = bW*2 and refH = bH*2.
[0100] Furthermore, we can apply a filter to the reference sample refUnit[x][y] to derive the reference sample p[x][y].
[0101] The template prediction image generation unit 4712 generates prediction images (template prediction images) for the intra-prediction mode (IntraPredMode) from the template reference area. The prediction image derivation operation of the template prediction image generation unit 4712 may also be performed by the prediction unit 3104. For example, the Planar prediction unit 31041, DC prediction unit 31042, and Angular prediction unit 31043 may perform both the derivation of template prediction images and the derivation of prediction images for target blocks.
[0102] Specifically, for each intra-mode intraPredMode included in timdModeList[i] (tIntraPredMode=timdModeList[i]), a one-dimensional reference pixel array ref[] is generated from the reference sample refUnit[x][y] or the filtered reference sample p[x][y]. Then, tIntraPredMode and ref[] are transmitted to the intra-prediction image derivation unit 4703. The intra-prediction image derivation unit 4703 generates a template prediction image tpredSamples[][] corresponding to tIntraPredMode and outputs it to the template prediction image generation unit 4712.
[0103] The template prediction image generation unit 4712 generates ref[] as shown in the following (formula TIMD-ANGULAR-REF). Below, tpredSamples[][] is generated from p[][], but refUnit[][] may be used instead of p[][].
[0104] (Formula TIMD-ANGULAR-REF) If tIntraPredMode >= DIR ref[x] = p[-1-refIdx+x][-1-refIdx], (x=0..bW+refIdx+1) Otherwise (tIntraPredMode < DIR) ref[x] = p[-1-refIdx][-1-refIdx+x], (x=0..bH+refIdx+1) DIR is a predetermined constant, for example, DIR=34, 66, etc. Here, refIdx is the distance from the target block, and the template region uses refIdx=0 (or 1), while the template reference region that uses the image of the template region for prediction uses refIdx>0 (for example, refIdx=2, 4, etc.). Refidx may be changed depending on the block size.
[0105] refIdx = (bW >= 8) && (bH >= 8) 4 : 2 The template prediction image generation unit 4712 (intra prediction image derivation unit 4703) generates template prediction images tpredSamples[][] corresponding to tIntraPredMode, for example, as shown in the following (formula TIMD-ANGULAR-PRED). If tIntraPredMode >= DIR (expression TIMD-ANGULAR-PRED) iIdx = ( ( ( y + 1 + refIdx ) * intraPredAngle ) >> 5 ) + refIdx iFact = ( ( y + 1 + refIdx ) * intraPredAngle ) & 31 tpredSamples[x][y] = Clip1((Σ(filt[i]*ref[x+iIdx+i]) + 32) >> 6) Otherwise (tIntraPredMode < DIR) iIdx = ( ( ( x + 1 + refIdx ) * intraPredAngle ) >> 5 ) + refIdx iFact = ( ( x + 1 + refIdx ) * intraPredAngle ) & 31 tpredSamples[x][y] = Clip1((Σ(filt[i]*ref[y+iIdx+i]) + 32) >> 6) x = -1, bW-1, y = -1 and x = -1, y = -1, bH-1
[0106] Here, Σ is the sum from i=0 to MTAP-1, and fT is the interpolation filter coefficient for the template prediction image. The number of taps (MTAP) of the interpolation filter used to derive the template prediction image is, for example, 4. intraPredAngle is the angle parameter for each intra-prediction mode. filt can also be derived from iFast as follows: filtG[phase][j] are the coefficients of the interpolation filter for generating the template prediction image.
[0107] filt[j] = filtG[iFact][j] The template cost derivation unit 4713 derives the cost tempCost of each intra prediction mode candidate from the difference between the template prediction images tpredSamples of each intra prediction mode candidate and the template images tempSamples of the target block. The cost may also be SAD (Sum of Absolute Difference).
[0108] tempCost = Σabs(tpredSamples[i][j] - tempSamples[i][j]) (i, j) are, for example, (i=-1, bW-1, j=-1), (i=-1, j=-1, bH-1)). Alternatively, the cost may be SATD (Sum of Absolute Transformed Difference).
[0109] The intra-prediction mode selection unit 4714 derives the intra-prediction mode corresponding to the minimum value of tempCost as the intra-prediction mode IntraPredMode of the TIMD mode.
[0110] The intra-predictive image derivation unit 4703 derives intra-predictive images predSamples[][] corresponding to the IntraPredMode derived above. Alternatively, this may be done by the prediction unit 3104. If IntraPredMode >= DIR ref[x] = p[-1-refIdx+x][-1-refIdx], (x=0..bW+refIdx+1) Otherwise (IntraPredMode < DIR) ref[x] = p[-1-refIdx][-1-refIdx+x], (x=0..bH+refIdx+1) if (intraPredMode >= DIR) (expression INTRA-ANGULAR-PRED){ iIdx = (((y + 1) * intraPredAngle) >> 5) iFact = ((y + 1) * intraPredAngle) & 31 predSamples[x][y] = Clip1((Σ(fT[i] * ref[x+iIdx+i]) + 32) >> 6) } else { / * intraPredMode < DIR* / iIdx = (((x + 1) * intraPredAngle) >> 5) iFact = ((x + 1) * intraPredAngle) & 31 predSamples[x][y] = Clip1((Σ(fT[i] * ref[y+iIdx+i]) + 32) >> 6) } Here, Σ is the sum from i=0 to NTAP-1, and fT is the interpolation filter coefficient for the intra-prediction image. The number of taps (NTAP) of the interpolation filter used to derive the intra-prediction image is, for example, 6.
[0111] fT can also be derived from iFast as follows: fG[phase][j] are the coefficients of the interpolation filter for generating the intra-prediction image. fT[j] = fG[iFact][j] Alternatively, IntraPredMode may be selected from fG and fC according to the difference minDistVerHor between the horizontal and vertical directions and a predetermined threshold THRES, as shown below. fT[j] = minDistVerHor > THRES : fG[iFact][j] : fC[iFact][j
[0112] (Template reference area by block size) Alternatively, in another configuration, the distance from the target block to the template reference area RTRS of the reference sample derivation unit 4701 and the ref of the template prediction image generation unit 4712 may be changed in the horizontal and vertical directions.
[0113] refIdxW = (bW >= 8) ? 4 : 2 refIdxH = (bH >= 8) ? 4 : 2 If tIntraPredMode >= DIR ref[x] = p[-1-refIdxW+x][-1-refIdxH], (x=0..bW+refIdxW+1) Otherwise (tIntraPredMode < DIR) ref[x] = p[-1-refIdxW][-1-refIdxH+x], (x=0..bH+refIdxH+1) The template prediction image generation unit 4712 is If tIntraPredMode >= DIR (expression TIMD-ANGULAR-PRED) iIdx = ( ( ( y + 1 + refIdxH ) * intraPredAngle ) >> 5 ) + refIdxH iFact = ( ( y + 1 + refIdxH ) * intraPredAngle ) & 31 tpredSamples[x][y] = Clip1((Σ(filt[i]*ref[x+iIdx+i]) + 32) >> 6) Otherwise (tIntraPredMode < DIR) iIdx = ( ( ( x + 1 + refIdxW ) * intraPredAngle ) >> 5 ) + refIdxW iFact = ( ( x + 1 + refIdxW ) * intraPredAngle ) & 31 tpredSamples[x][y] = Clip1((Σ(filt[i]*ref[y+iIdx+i]) + 32) >> 6) x = -1, bW-1, y = -1 and x = -1, y = -1, bH-1 According to the above configuration, the region referenced in the template prediction image is made variable according to the size of the target block, which improves the accuracy of the template prediction image and has the effect of improving the accuracy of TIMD's intra-prediction image.
[0114] (Summary of examples of changing the number of taps) Figure 10 shows the switching of the number of filter taps during intra-prediction mode search and intra-prediction image generation in TIMD prediction. The intra-prediction image derivation unit 4703 consists of an MTAPS filter 47031, an NTAPS filter 47032, and a memory 47032.
[0115] When the template prediction image generation unit 4712 derives a template prediction image, the MTAPS filter 47031 of the intra prediction image derivation unit 4703 refers to tIntraPredMode and the reference samples p[][] stored in memory 47032, and derives the template prediction image tpredSamples[][] according to (formula TIMD-ANGULAR-PRED). tIntraPredMode is an intra prediction mode candidate input from the template prediction image generation unit 4712.
[0116] When the TIMD prediction unit 31047 derives an intra-predicted image, the NTAPS filter 47033 of the intra-predicted image deriving unit 4703 refers to the IntraPredMode selected by the intra-prediction mode selection unit 4714 and the reference samples p[][] stored in memory 47032, and generates intra-predicted images predSamples[][] according to the formula (INTRA-ANGULAR-PRED). Then, predSamples[][] is output as the intra-predicted image of the target block.
[0117] As described above, the template prediction image generation unit 4712 (prediction unit 3104, intra prediction image derivation unit 4703) generates the prediction image using the sum of products of ref[i] of i=0..MTAP-1 and the filter coefficient filt when generating the template prediction image. That is, it refers to MTAP reference samples p (refUnit). Also, the TIMD prediction unit 31047 (prediction unit 3104, intra prediction image derivation unit 4703) generates the prediction image of the target block using the sum of products of ref[i] of i=0..NTAP-1 and the filter coefficient fT when generating the prediction image of the target block. That is, it refers to NTAP reference samples p (refUnit). In this embodiment, the filter used to generate the template prediction image and the filter used to generate the prediction image of the target block are switched. Furthermore, the number of taps MTAP of the filter used to generate the template prediction image may be set to be smaller than the number of taps NTAPS of the filter used to generate the prediction image of the target block. For example, any of the following combinations may be used: {MTAP=2, NTAP=4}, {MTAP=2, NTAP=6}, {MTAP=4, NTAP=6}, {MTAP=2, NTAP=8}, or {MTAP=4, NTAP=8}.
[0118] Also, in the generation of the template prediction image by the Intra prediction image generation unit 4712, fixed filter coefficients filt[][] are used without switching the filter according to tIntraPredMode. According to the configuration in which fG[][] and fC[][] are switched according to IntraPredMode in the generation of the prediction image of the target block by the TIMD prediction unit 31047, it is possible to reduce the processing load of generating the template prediction image using a fixed filter.
[0119] According to the above configuration, in the TIMD prediction in which a plurality of intra prediction candidates are used for the target block to repeatedly derive the template prediction image (intra prediction image), it is possible to reduce the processing amount of deriving the prediction image of the template image.
[0120] <Summary of TIMD Prediction Configuration> A parameter decoding unit that decodes a decoder-side intra prediction flag indicating whether to generate a prediction image by the decoder deriving an intra prediction mode number using pixels in an adjacent region from encoded data, a reference sample derivation unit 4701 that derives a reference sample using an image in a template reference region near the target block, a template intra prediction image generation unit 4712 that generates a template prediction image for a predetermined intra prediction mode candidate using the reference sample, a template cost derivation unit 4713 that derives a cost from the template prediction image and a template image that is an image near the target block of the TIMD prediction, and an intra prediction mode selection unit 4714 that selects an intra prediction mode (TIMD intra prediction mode) based on the cost. When the decoder-side intra prediction flag has a predetermined value, a prediction image of the target block is generated using the selected intra prediction mode.
[0121] <Another Configuration Example 1> Figure 9 shows the configuration of the TIMD prediction unit 31047, which achieves template-based intra-mode derivation by limiting the bit depth in the derivation of the template region and the template reference sample region. In this configuration example, the TIMD prediction unit 31047 is equipped with a bit shift derivation unit 4704 in addition to the above configuration.
[0122] The bit shift derivation unit 4704 derives a shift value bitShift according to the bit depth bitDepth of the image. For example, if bitDepth exceeds a predetermined bit depth TIMD_DEPTH, bitShift is set to 1 or greater, and otherwise bitShift is set to 0.
[0123] bitShift = max(bitDepth-TIMD_DEPTH, 0) Here, TIMD_DEPTH is a predetermined value, for example, 10.
[0124] The template derivation unit 4702a may derive a template image for the target block according to the bit depth bitDepth of the image. For example, if bitDepth exceeds a predetermined bit depth TIMD_DEPTH, the template image tempSamples may be derived from the image recSamples of the template region using the bitShift right shift described above.
[0125] tempSamples[x+i][y+j] = (recSamples[xC-1+i][yC-1+j] + bitOffset) >> bitShift (i=0..bW, j=0), (i=0, j=0..bH) bitOffset = (bitShift>0) ? 1<<(bitShift-1) : 0 Note that bitOffset = (1<<bitShift)> Setting it to >1 also yields the same value.
[0126] The reference sample derivation unit 4701a may derive a reference sample refUnit from the image in the template reference region using the bitShift described above if the bit depth of the image exceeds a predetermined bit depth TIMD_DEPTH.
[0127] refUnit[x][y] = (recSamples[xNbCmp+x][yNbComp+y]+bitOffset)>>bitShift Here, xNbCmp=xC and yNbCmp=yC, and the ranges are x=-1-tempWidth, y=-1-tempHeight..refH-1 and x=-tempWidth..refW-1, y=-1-tempHeight. Alternatively, the shift operation may be performed in the template image derivation unit (intra-prediction image unit 4703) instead of the reference sample derivation unit 4701a by setting (formula TIMD-ANGULAR-REF) as follows. If tIntraPredMode(IntraPredMode) >= DIR ref[x] = (p[-1-refIdx+x][-1-refIdx]+bitOffet)>>bitOffset, (x=0..bW+refIdx+1) Otherwise (tIntraPredMode < DIR) ref[x] = (p[-1-refIdx][-1-refIdx+x]+bitOffet)>>bitOffset, (x=0..bH+refIdx+1) As already explained, refUnit is used to generate the template prediction image tpredSamples. When using TIMD prediction, restricting the bit depth (and corresponding value range) of refUnit in advance makes it easier to derive the template prediction image tpredSamples. Also, since the range of tempSamples is restricted in bit depth (and corresponding value range) by the same bit shift amount bitShift, the derivation of tempCost is also simplified as it is performed with a predetermined threshold value.
[0128] As described above, the reference sample derivation unit 4701 derives the reference sample by right-shifting the image of the template reference region near the target block according to the bit depth of the image. Alternatively, the cost derivation unit may derive the template image by right-shifting the pixel values of the image near the target block according to the bit depth of the image. This allows processing of images with a bit depth greater than a predetermined bit depth to be performed with a fixed bit depth, thus reducing the amount of processing required.
[0129] The summing unit 312 adds the predicted image of the block input from the prediction image generation unit 308 and the prediction error input from the inverse quantization / inverse transform unit 311 pixel by pixel to generate a decoded image of the block. The summing unit 312 stores the decoded image of the block in the reference picture memory 306 and also outputs it to the loop filter 305.
[0130] (Configuration of the video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Figure 11 is a block diagram showing the configuration of the video encoding device 11 according to this 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 image storage unit, frame memory) 109, an encoding parameter determination unit 110, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.
[0131] The predictive image generation unit 101 generates a predictive image for each CU, which is a region obtained by dividing each picture of image T. The predictive image generation unit 101 includes an intra predictive image generation unit 310. The predictive image generation unit 101 operates in the same way as the predictive image generation unit 308 already described, so its description is omitted.
[0132] The subtraction unit 102 subtracts the pixel values of the predicted image of the block input from the predicted image generation unit 101 from the pixel values of image T to generate a prediction error. The subtraction unit 102 outputs the prediction error to the conversion / quantization unit 103.
[0133] The conversion / quantization unit 103 calculates conversion coefficients by frequency conversion for the prediction error input from the subtraction unit 102, and derives quantized conversion coefficients by quantization. The conversion / quantization unit 103 outputs the quantized conversion coefficients to the parameter coding unit 111 and the inverse quantization / inverse conversion unit 105.
[0134] The inverse quantization / inverse transformation unit 105 is the same as the inverse quantization / inverse transformation unit 311 (Figure 4) in the video decoding device 31, and therefore its explanation is omitted. The calculated prediction error is output to the summing unit 106.
[0135] The parameter coding unit 111 comprises a header coding unit 1110, a CT information coding unit 1111, and a CU coding unit 1112 (predictive mode coding unit). The CU coding unit 1112 further comprises a TU coding unit 1114. The general operation of each module is described below.
[0136] The header encoding unit 1110 performs encoding processing on parameters such as header information, partitioning information, prediction information, and quantization conversion coefficients.
[0137] The CT information encoding unit 1111 encodes QT, MT (BT, TT) division information, etc.
[0138] The CU encoding unit 1112 encodes CU information, prediction information, division information, etc.
[0139] The TU encoding unit 1114 encodes the QP update information and the quantization prediction error when the TU contains a prediction error.
[0140] The CT information coding unit 1111 and the CU coding unit 1112 supply syntax elements such as inter-prediction parameters, intra-prediction parameters, and quantization conversion coefficients to the parameter coding unit 111.
[0141] The entropy coding unit 104 receives quantization conversion coefficients and coding parameters from the parameter coding unit 111. The entropy coding unit 104 entropy codes these to generate and output a coded stream Te.
[0142] The prediction parameter derivation unit 120 is a means that includes an inter-prediction parameter coding unit 112 and an intra-prediction parameter coding unit 113, and derives intra-prediction parameters and intra-prediction parameters from parameters input from the coding parameter determination unit 110. The derived intra-prediction parameters and intra-prediction parameters are output to the parameter coding unit 111.
[0143] (Configuration of the intra-predictive parameter coding unit 113) The intra-prediction parameter coding unit 113 encodes IntraPredMode and other parameters input from the coding parameter determination unit 110. The intra-prediction parameter coding unit 113 includes some configurations that are identical to those of the intra-prediction parameter derivation unit 304, which derives intra-prediction parameters.
[0144] The addition unit 106 generates a decoded image by adding the pixel values of the prediction blocks input from the prediction image generation unit 101 and the prediction error input from the inverse quantization / inverse transform unit 105 for each pixel. The addition unit 106 stores the generated decoded image in the reference picture memory 109.
[0145] The loop filter 107 applies a deblocking filter, SAO, and ALF to the decoded image generated by the summing unit 106. Note that the loop filter 107 does not necessarily have to include the above three types of filters; for example, it may consist of only a deblocking filter.
[0146] The prediction parameter memory 108 stores the prediction parameters generated by the coding parameter determination unit 110 in predetermined locations for each target picture and CU.
[0147] The reference picture memory 109 stores the decoded images generated by the loop filter 107 at predetermined locations for each target picture and CU.
[0148] The coding parameter determination unit 110 selects one set from among several sets of coding parameters. The coding parameters are the QT, BT, or TT segmentation information, prediction parameters, or parameters that are to be coded and generated in relation to these. The prediction image generation unit 101 generates a prediction image using these coding parameters.
[0149] The coding parameter determination unit 110 calculates an RD cost value for each of the multiple sets, which indicates the amount of information and the coding error. The coding parameter determination unit 110 selects the set of coding parameters that minimizes the calculated cost value. As a result, the entropy coding unit 104 outputs the selected set of coding parameters as a coded stream Te. The coding parameter determination unit 110 stores the determined coding parameters in the prediction parameter memory 108.
[0150] Furthermore, some parts of the video encoding device 11 and video decoding device 31 in the above-described embodiments, such as the entropy decoding unit 301, parameter decoding unit 302, loop filter 305, prediction image generation unit 308, inverse quantization / inverse transformation unit 311, addition unit 312, prediction image generation unit 101, subtraction unit 102, transformation / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse transformation unit 105, loop filter 107, encoding parameter determination unit 110, and parameter encoding unit 111, may be implemented using a computer. In that case, a program for realizing this control function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be loaded into a computer system and executed. Hereinafter, "computer system" refers to a computer system built into either the video encoding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. Furthermore, "computer-readable recording media" refers to portable media such as flexible disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage devices such as hard disks built into computer systems. In addition, "computer-readable recording media" may also include those that dynamically hold programs for a short period of time, such as communication lines used when transmitting programs over networks such as the Internet or communication lines such as telephone lines, and those that hold programs for a certain period of time, such as volatile memory inside computer systems that act as servers or clients in such cases. Moreover, the above-mentioned programs may be for the purpose of realizing some of the functions described above, and may also be able to realize the above-mentioned functions in combination with programs already recorded in the computer system.
[0151] Furthermore, some or all of the video encoding device 11 and video decoding device 31 in the above-described embodiment may be implemented as integrated circuits such as LSIs (Large Scale Integration). Each functional block of the video encoding device 11 and video decoding device 31 may be individually implemented as a processor, or some or all of them may be integrated into a single processor. In addition, the method of implementing the integrated circuit is not limited to LSIs; it may also be implemented using dedicated circuits or general-purpose processors. Furthermore, if an integrated circuit technology that can replace LSIs emerges due to advances in semiconductor technology, an integrated circuit using that technology may be used.
[0152] Although one embodiment of this invention has been described in detail above with reference to the drawings, the specific configuration is not limited to that described above, and various design changes can be made without departing from the spirit of this invention. [Industrial applicability]
[0153] Embodiments of the present invention can be suitably applied to a video decoding device that decodes encoded data from image data, and a video encoding device that generates encoded data from image data. Furthermore, they can be suitably applied to the data structure of encoded data generated by the video encoding device and referenced by the video decoding device. [Explanation of symbols]
[0154] 31 Image Decoder 301 Entropy Decoder 302 Parameter Decoding Unit 303 Interpretation parameter derivation section 304 Intra Prediction Parameter Derivation Unit 308 Predictive Image Generation Unit 309 Interpretation Image Generation Unit 310 Intra Predictive Image Generation Unit 31047 TIMD Prediction Unit 4701 Reference Sample Derivation Section 4702 Template Derivation Unit 4703 Intra Predictive Image Derivation Unit 47031 NTAPS filter 47032 memory 47033 MTAPS filter 4704 Bit Shift Derivation Section 4711 Intra prediction mode candidate derivation unit, 4712 Template Prediction Image Generation Unit 4713 Template Cost Derivation Unit 4714 Intra Prediction Mode Selection Section 311 Inverse Quantization / Inverse Transformation Section 312 Addition section 11 Image encoding device 101 Predictive Image Generation Unit 102 Subtraction Unit 103 Conversion / Quantization Section 104 Entropy coding unit 105 Inverse Quantization / Inverse Transformation Section 107 Loop Filter 110 Encoding parameter determination unit 111 Parameter coding section 112 Interpretation Parameter Coding Unit 113 Intra Prediction Parameter Coding Unit 1110 Header Encoding Section 1111 CT information encoder 1112 CU coding unit (predictive mode coding unit) 1114 TU encoder
Claims
1. A parameter decoding unit that decodes template-based intra prediction flags from encoded data, A reference sample derivation unit that derives a reference sample using an image of a template reference region near the target block, A template derivation unit that derives a template image by right-shifting the pixel values of pixels adjacent to the target block according to the bit depth of the image, An intra-predictive image derivation unit derives a template predictive image by right-shifting the pixel values of the template reference region near the target block according to the bit depth of the above image, An intra-prediction image generation unit generates the above template prediction image for one of the predetermined intra-prediction mode candidates using the above reference sample, A template cost derivation unit that derives a cost from the above template prediction image and the above template image which is the image in the vicinity of the above target block, The system includes an intra-prediction mode selection unit that selects the template-based intra-mode for the target block from the predetermined intra-prediction mode candidates based on the above cost, An image decoding device characterized in that, when the template-based intra prediction flag is set to a predetermined value, the intra prediction image generation unit generates a prediction image of the target block using the template-based intra mode.
2. The image decoding device according to claim 1, characterized in that the intra-predictive image generation unit refers to MTAP reference samples when generating the template predictive image for one of the predetermined intra-predictive mode candidates, and refers to NTAP reference samples when generating the predictive image for the target block using a template-based intra-mode selected from the predetermined intra-predictive mode candidates, wherein MTAP is smaller than NTAP.
3. A reference sample derivation unit that derives a reference sample using an image of a template reference region near the target block, A template derivation unit that derives a template image by right-shifting the pixel values of pixels adjacent to the target block according to the bit depth of the image, An intra-predictive image derivation unit derives a template predictive image by right-shifting the pixel values of the template reference region near the target block according to the bit depth of the above image, An intra-prediction image generation unit generates the above template prediction image for one of the predetermined intra-prediction mode candidates using the above reference sample, A template cost derivation unit that derives a cost from the above template prediction image and the above template image which is the image in the vicinity of the above target block, An intra-prediction mode selection unit selects the template-based intra-mode of the target block from the predetermined intra-prediction mode candidates based on the above cost, The system comprises a parameter coding unit that encodes the template-based intra prediction flag from the template-based intra mode described above, An image encoding device characterized in that, when the template-based intra prediction flag is set to a predetermined value, the intra prediction image generation unit generates a prediction image of the target block using the template-based intra mode.
4. The image encoding device according to claim 3, characterized in that the intra prediction image generation unit refers to MTAP reference samples when generating the template prediction image for one of the predetermined intra prediction mode candidates, and refers to NTAP reference samples when generating the prediction image for the target block using a template-based intra mode selected from the predetermined intra prediction mode candidates, wherein MTAP is smaller than NTAP.
Citation Information
Patent Citations
In-loop block-based image reconstruction in high dynamic range video coding
JP2018514145A
Image encoding / decoding method and device
JP2019535211A
Template matching for JVET intra prediction
US20170339404A1
Usage of templates for decoder-side intra mode derivation
US20220224915A1
Methods and apparatuses for cross-component prediction
US20220248025A1
